[
  {
    "path": ".all-contributorsrc",
    "content": "{\n  \"files\": [\n    \"README.md\"\n  ],\n  \"imageSize\": 100,\n  \"commit\": false,\n  \"contributors\": [\n    {\n      \"login\": \"fabien-ml\",\n      \"name\": \"Fabien MARIE-LOUISE\",\n      \"avatar_url\": \"https://avatars.githubusercontent.com/u/2832351?v=4\",\n      \"profile\": \"https://github.com/fabien-ml\",\n      \"contributions\": [\n        \"design\",\n        \"code\",\n        \"doc\",\n        \"maintenance\"\n      ]\n    },\n    {\n      \"login\": \"bichikim\",\n      \"name\": \"Bichi Kim\",\n      \"avatar_url\": \"https://avatars.githubusercontent.com/u/13829322?v=4\",\n      \"profile\": \"https://github.com/bichikim\",\n      \"contributions\": [\n        \"code\"\n      ]\n    },\n    {\n      \"login\": \"NurbekGithub\",\n      \"name\": \"Nurbek\",\n      \"avatar_url\": \"https://avatars.githubusercontent.com/u/24915724?v=4\",\n      \"profile\": \"https://github.com/NurbekGithub\",\n      \"contributions\": [\n        \"code\"\n      ]\n    }\n  ],\n  \"contributorsPerLine\": 7,\n  \"projectName\": \"hope-ui\",\n  \"projectOwner\": \"fabien-ml\",\n  \"repoType\": \"github\",\n  \"repoHost\": \"https://github.com\",\n  \"skipCi\": true\n}\n"
  },
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\nindent_style = space\nindent_size = 2\nend_of_line = LF\ncharset = utf-8\ninsert_final_newline = true"
  },
  {
    "path": ".eslintignore",
    "content": "node_modules/\n\n# Ignore artifacts:\ncoverage/\ndist/\npublic/\n__mocks__/\n\ncommitlint.config.js\njest.config.js\n*.d.ts\n"
  },
  {
    "path": ".eslintrc.json",
    "content": "{\n  \"root\": true,\n  \"extends\": [\n    \"eslint:recommended\",\n    \"plugin:import/recommended\",\n    \"plugin:solid/recommended\",\n    \"plugin:jsx-a11y/recommended\",\n    \"plugin:@typescript-eslint/recommended\",\n    \"plugin:prettier/recommended\"\n  ],\n  \"plugins\": [\"solid\", \"jsx-a11y\", \"@typescript-eslint\", \"import\", \"simple-import-sort\"],\n  \"rules\": {\n    \"import/first\": \"warn\",\n    \"import/newline-after-import\": \"warn\",\n    \"import/no-duplicates\": \"error\",\n    \"import/no-named-as-default-member\": \"off\",\n    \"simple-import-sort/imports\": \"warn\",\n    \"simple-import-sort/exports\": \"warn\",\n    \"@typescript-eslint/no-explicit-any\": \"off\",\n    \"@typescript-eslint/ban-types\": \"off\",\n    \"@typescript-eslint/no-namespace\": \"off\"\n  },\n  \"env\": {\n    \"es6\": true,\n    \"browser\": true,\n    \"node\": true\n  },\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"tsconfigRootDir\": \"./\",\n    \"project\": [\"./tsconfig.eslint.json\", \"./apps/*/tsconfig.json\"],\n    \"ecmaVersion\": 2021,\n    \"sourceType\": \"module\",\n    \"ecmaFeatures\": {\n      \"jsx\": true\n    }\n  },\n  \"settings\": {\n    \"import/parsers\": {\n      \"@typescript-eslint/parser\": [\".ts\", \".tsx\"]\n    },\n    \"import/resolver\": {\n      \"typescript\": {\n        \"project\": [\"./tsconfig.eslint.json\", \"./apps/*/tsconfig.json\"],\n        \"alwaysTryTypes\": true\n      }\n    }\n  }\n}\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: \"\"\nlabels: \"\"\nassignees: \"\"\n---\n\n**Describe the bug**\nA clear and concise description of what the bug is.\n\n**To Reproduce**\nSteps to reproduce the behavior:\n\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error\n\n**Expected behavior**\nA clear and concise description of what you expected to happen.\n\n**Screenshots**\nIf applicable, add screenshots to help explain your problem.\n\n**Desktop (please complete the following information):**\n\n- OS: [e.g. iOS]\n- Browser [e.g. chrome, safari]\n- Version [e.g. 22]\n\n**Smartphone (please complete the following information):**\n\n- Device: [e.g. iPhone6]\n- OS: [e.g. iOS8.1]\n- Browser [e.g. stock browser, safari]\n- Version [e.g. 22]\n\n**Additional context**\nAdd any other context about the problem here.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: \"\"\nlabels: \"\"\nassignees: \"\"\n---\n\n**Is your feature request related to a problem? Please describe.**\nA clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\n\n**Describe the solution you'd like**\nA clear and concise description of what you want to happen.\n\n**Describe alternatives you've considered**\nA clear and concise description of any alternative solutions or features you've considered.\n\n**Additional context**\nAdd any other context or screenshots about the feature request here.\n"
  },
  {
    "path": ".github/workflows/build-test.yml",
    "content": "name: Build and Test Hope UI\n\n# Controls when the action will run.\non:\n  # Triggers the workflow on push or pull request events but only for the main branch\n  push:\n    branches: [main, develop]\n  pull_request:\n    branches: [main]\n\n# A workflow run is made up of one or more jobs that can run sequentially or in parallel\njobs:\n  build-test:\n    # The type of runner that the job will run on\n    runs-on: ubuntu-latest\n\n    strategy:\n      matrix:\n        node-version: [16.x]\n\n    # Steps represent a sequence of tasks that will be executed as part of the job\n    steps:\n      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it\n      - uses: actions/checkout@v2\n      - uses: pnpm/action-setup@v2.0.1\n        with:\n          version: 7.0.0-rc.2\n      - name: Use Node.js ${{ matrix.node-version }}\n        uses: actions/setup-node@v2\n        with:\n          node-version: ${{ matrix.node-version }}\n          cache: \"pnpm\"\n      - name: pnpm install, build and test\n        run: |\n          pnpm install\n          pnpm build\n          pnpm test\n"
  },
  {
    "path": ".gitignore",
    "content": "# Created by https://www.toptal.com/developers/gitignore/api/jetbrains,macos,node\n# Edit at https://www.toptal.com/developers/gitignore?templates=jetbrains,macos,node\n\n# Vercel\n.vercel\n\n# Turborepo\n.turbo\nbuild/**\ndist/**\n\n\n# Storybook\nstorybook-static\n\n# Local .env files\n*.local\n\n# Vite\ndist/\n\n### JetBrains ###\n# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider\n# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839\n\n# User-specific stuff\n.idea\n.idea/**/workspace.xml\n.idea/**/tasks.xml\n.idea/**/usage.statistics.xml\n.idea/**/dictionaries\n.idea/**/shelf\n\n# Generated files\n.idea/**/contentModel.xml\n\n# Sensitive or high-churn files\n.idea/**/dataSources/\n.idea/**/dataSources.ids\n.idea/**/dataSources.local.xml\n.idea/**/sqlDataSources.xml\n.idea/**/dynamic.xml\n.idea/**/uiDesigner.xml\n.idea/**/dbnavigator.xml\n\n# File-based project format\n*.iws\n\n# IntelliJ\nout/\n\n# mpeltonen/sbt-idea plugin\n.idea_modules/\n\n# JIRA plugin\natlassian-ide-plugin.xml\n\n# Cursive Clojure plugin\n.idea/replstate.xml\n\n# Editor-based Rest Client\n.idea/httpRequests\n\n### JetBrains Patch ###\n# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721\n\n# *.iml\n# modules.xml\n# .idea/misc.xml\n# *.ipr\n\n# Sonarlint plugin\n# https://plugins.jetbrains.com/plugin/7973-sonarlint\n.idea/**/sonarlint/\n\n# SonarQube Plugin\n# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin\n.idea/**/sonarIssues.xml\n\n# Markdown Navigator plugin\n# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced\n.idea/**/markdown-navigator.xml\n.idea/**/markdown-navigator-enh.xml\n.idea/**/markdown-navigator/\n\n# Cache file creation bug\n# See https://youtrack.jetbrains.com/issue/JBR-2257\n.idea/$CACHE_FILE$\n\n# CodeStream plugin\n# https://plugins.jetbrains.com/plugin/12206-codestream\n.idea/codestream.xml\n\n### macOS ###\n# General\n.DS_Store\n.AppleDouble\n.LSOverride\n\n# Thumbnails\n._*\n\n# Files that might appear in the root of a volume\n.DocumentRevisions-V100\n.fseventsd\n.Spotlight-V100\n.TemporaryItems\n.Trashes\n.VolumeIcon.icns\n.com.apple.timemachine.donotpresent\n\n# Directories potentially created on remote AFP share\n.AppleDB\n.AppleDesktop\nNetwork Trash Folder\nTemporary Items\n.apdisk\n\n### Node ###\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n.pnpm-debug.log*\n\n# Diagnostic reports (https://nodejs.org/api/report.html)\nreport.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul / jest\ncoverage\n*.lcov\n\n# Dependency directories\nnode_modules/\n\n# TypeScript cache\n*.tsbuildinfo\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Microbundle cache\n.rpt2_cache/\n.rts2_cache_cjs/\n.rts2_cache_es/\n.rts2_cache_umd/\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# dotenv environment variables file\n.env\n.env.test\n.env.production\n\n# Next.js build output\n.next\nout\n\n# Gatsby files\n.cache/\n# Comment in the public line in if your project uses Gatsby and not Next.js\n# https://nextjs.org/blog/next-9-1#public-directory-support\n# public\n\n# Stores VSCode versions used for testing VSCode extensions\n.vscode-test\n\n# Yarn Integrity file\n.yarn-integrity\n\n# yarn v2\n.yarn/cache\n.yarn/unplugged\n.yarn/build-state.yml\n.yarn/install-state.gz\n.pnp.*\n\n# End of https://www.toptal.com/developers/gitignore/api/jetbrains,macos,node\n"
  },
  {
    "path": ".husky/commit-msg",
    "content": "#!/bin/sh\n. \"$(dirname \"$0\")/_/husky.sh\"\n\nnpx --no-install commitlint --edit $1\n"
  },
  {
    "path": ".husky/pre-commit",
    "content": "#!/bin/sh\n. \"$(dirname \"$0\")/_/husky.sh\"\n\nnpx lint-staged\n"
  },
  {
    "path": ".prettierrc.json",
    "content": "{\n  \"arrowParens\": \"avoid\",\n  \"printWidth\": 100\n}\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing to Hope UI\n\nThank you for showing interest in contributing to Hope UI. All of your contributions are extremely valuable to the success of this project!\n\n## Ways to contribute\n\n- **Improve documentation** - fix incomplete or missing docs, bad wording, examples, or explanations.\n- **Give feedback** - we are constantly working to make Hope UI a better experience, so please feel free to share what you like, dislike, or any improvements you'd like to see via [GitHub Discussions](https://github.com/fabien-ml/hope-ui/discussions).\n- **Share Hope UI** - help us spread the word by sharing [Hope UI](https://hope-ui.com/), or even [Tweet about Hope UI directly](https://twitter.com/intent/tweet?text=Hope%20UI%20%E2%80%93%20a%20new%20SolidJS%20component%20library%20with%20over%2040%20components,%20style%20props%20API,%20native%20dark%20theme%20support%20and%20focuses%20on%20accessibility.%0A%0A%23https://hope-ui.com%0A%0A%23solidjs).\n- **GitHub Issues** - work on an [outstanding issue](https://github.com/fabien-ml/hope-ui/labels/help%20wanted) to help us keep Hope UI a reliable UI solution.\n- **Suggest New Features** - please feel free to dicuss any new features you'd like to see by creating a [GitHub issue](https://github.com/fabien-ml/hope-ui/labels/help%20wanted).\n\n## Contributing workflow\n\n- After deciding which [GitHub issue](https://github.com/fabien-ml/hope-ui/labels/help%20wanted) or feature you'd like to work on, create a local branch to track your changes\n- If applicable, add unit tests while implementing your code\n- Ensure that all commits follow [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)\n- It is highly recommended that you run the `pnpm test` command to ensure new contributions integrate with the old codebase before initiating a merge request\n- Create a merge request and keep up-to-date with any feedback you receive from a maintainer\n\n## Git branches\n\n- **main**: the current version\n- **develop**: contains the next version under development (you should create a PR to this branch)\n\n## Get started with Hope UI locally\n\n- Fork the [Hope UI repository](https://github.com/fabien-ml/hope-ui)\n- Install the [editorconfig](https://editorconfig.org/) extension for your editor\n- Install dependencies with pnpm – `pnpm install`\n- Take an initial peek at our components by running `pnpm storybook`\n\n### Project Structure\n\nHope UI is a monorepo separated in two main folders.\n\n```\napps/\n  docs/            - Hope UI documentation website\npackages/\n  design-system/   - Hope UI component library\n  primitives/      - Hope UI low level primitives for building components\n```\n\n## npm scripts\n\n### Development scripts\n\n- `dev:docs` – starts the docs development server\n- `storybook` - starts the storybook development server\n\n### Testing scripts\n\n- `typecheck` – runs TypeScript typechecking with `tsc --noEmit` on all packages and docs\n- `lint` – runs ESLint on all packages and docs\n- `test` – runs tests with jest\n"
  },
  {
    "path": "LICENSE.md",
    "content": "MIT License\n\nCopyright (c) 2022 Fabien MARIE-LOUISE\n\nPermission 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE 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.\n"
  },
  {
    "path": "README.md",
    "content": "<p align=\"center\">\n  <a href=\"https://hope-ui.netlify.app\">\n    <img\n      alt=\"Hope UI | The SolidJS component library you've hoped for.\"\n      src=\"./assets/banner.jpg\" \n    />\n  </a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://lgtm.com/projects/g/fabien-ml/hope-ui/context:javascript\">\n    <img src=\"https://img.shields.io/lgtm/grade/javascript/g/fabien-ml/hope-ui.svg?logo=lgtm&logoWidth=18\" alt=\"Language grade: JavaScript\"/>\n  </a>\n  <a href=\"LICENSE.md\">\n    <img src=\"https://img.shields.io/github/license/fabien-ml/hope-ui\" alt=\"MIT License\"/>\n  </a>\n  <a href=\"https://www.npmjs.com/package/@hope-ui/solid\">\n    <img src=\"https://img.shields.io/npm/v/@hope-ui/solid\" alt=\"npm - @hope-ui/solid\"/>\n  </a>\n  <a href=\"https://www.npmjs.com/package/@hope-ui/solid\">\n    <img src=\"https://img.shields.io/npm/dm/@hope-ui/solid.svg\" alt=\"npm - downloads\" height=\"18\">\n  </a>\n</p>\n\n# ⚠️ WARNING ⚠️\n\nHope UI is no longer maintained. Focus is on the developement of it's successor: https://github.com/kobaltedev/pigment.\n\n## Documentation\n\nFor full documentation, visit [hope-ui.netlify.app](https://hope-ui.netlify.app).\n\n## Acknowledgment\n\nThis project is inspired by :\n\n- [Chakra UI](https://chakra-ui.com/)\n- [Mantine](https://mantine.dev/)\n\n## License\n\nThis project is licensed under the MIT License.\n"
  },
  {
    "path": "ROADMAP.md",
    "content": "# Components roadmap\n\n### General\n\n|            | Development | A11y check | Tests | Storybook | Docs |\n| ---------- | :---------: | :--------: | :---: | :-------: | :--: |\n| Button     |     ✅      |     ✅     |  ✅   |    ✅     |      |\n| IconButton |     ✅      |     ✅     |  ✅   |    ✅     |      |\n\n### Layout\n\n|             | Development | A11y check | Tests | Storybook | Docs |\n| ----------- | :---------: | :--------: | :---: | :-------: | :--: |\n| AspectRatio |     ✅      |    n/a     |  ✅   |           |      |\n| Box         |     ✅      |    n/a     |  ✅   |    n/a    |      |\n| Center      |     ✅      |    n/a     |  ✅   |    ✅     |      |\n| Container   |     ✅      |    n/a     |  ✅   |    ✅     |      |\n| Divider     |     ✅      |    n/a     |       |           |      |\n| Flex        |     ✅      |    n/a     |  ✅   |           |      |\n| Grid        |     ✅      |    n/a     |  ✅   |           |      |\n| SimpleGrid  |     ✅      |    n/a     |  ✅   |           |      |\n| Stack       |     ✅      |    n/a     |  ✅   |           |      |\n\n### Typography\n\n|         | Development | A11y check | Tests | Storybook | Docs |\n| ------- | :---------: | :--------: | :---: | :-------: | :--: |\n| Text    |     ✅      |     ✅     |  ✅   |    n/a    |      |\n| Heading |     ✅      |     ✅     |  ✅   |    n/a    |      |\n\n### Data entry\n\n|                  | Development | A11y check | Tests | Storybook | Docs |\n| ---------------- | :---------: | :--------: | :---: | :-------: | :--: |\n| AutoComplete     |             |            |       |           |      |\n| Checkbox         |     ✅      |     ✅     |       |    ✅     |      |\n| DatePicker       |             |            |       |           |      |\n| FormControl      |     ✅      |     ✅     |  ✅   |    ✅     |      |\n| FormLabel        |     ✅      |     ✅     |  ✅   |    ✅     |      |\n| FormHelperText   |     ✅      |     ✅     |  ✅   |    ✅     |      |\n| FormErrorMessage |     ✅      |     ✅     |  ✅   |    ✅     |      |\n| Input (Text)     |     ✅      |     ✅     |  ✅   |    ✅     |      |\n| NumberInput      |             |            |       |           |      |\n| PasswordInput    |             |            |       |           |      |\n| RadioGroup       |     ✅      |     ✅     |       |    ✅     |      |\n| Radio            |     ✅      |     ✅     |       |    ✅     |      |\n| Select           |     ✅      |     ✅     |       |           |      |\n| MultiSelect      |     ✅      |     ✅     |       |           |      |\n| Slider           |             |            |       |           |      |\n| Switch           |     ✅      |     ✅     |       |    ✅     |      |\n| Textarea         |     ✅      |     ✅     |  ✅   |    ✅     |      |\n| TimePicker       |             |            |       |           |      |\n| UploadInput      |             |            |       |           |      |\n\n### Data display\n\n|           | Development | A11y check | Tests | Storybook | Docs |\n| --------- | :---------: | :--------: | :---: | :-------: | :--: |\n| Accordion |     ✅      |     ✅     |       |           |      |\n| Avatar    |     ✅      |     ✅     |       |           |      |\n| Badge     |     ✅      |     ✅     |       |           |      |\n| Icon      |     ✅      |     ✅     |  ✅   |           |      |\n| Kbd       |     ✅      |    n/a     |       |           |      |\n| Table     |     ✅      |     ✅     |       |           |      |\n| Tag       |     ✅      |     ✅     |  ✅   |    ✅     |      |\n| Timeline  |             |            |       |           |      |\n\n### Navigation\n\n|            | Development | A11y check | Tests | Storybook | Docs |\n| ---------- | :---------: | :--------: | :---: | :-------: | :--: |\n| Anchor     |     ✅      |     ✅     |  ✅   |    ✅     |      |\n| Breadcrumb |     ✅      |     ✅     |       |           |      |\n| Pagination |             |            |       |           |      |\n| Stepper    |             |            |       |           |      |\n| Tabs       |     ✅      |     ✅     |       |           |      |\n\n### Feedback\n\n|                      | Development | A11y check | Tests | Storybook | Docs |\n| -------------------- | :---------: | :--------: | :---: | :-------: | :--: |\n| Alert                |     ✅      |     ✅     |  ✅   |    ✅     |      |\n| CircularProgress     |     ✅      |     ✅     |       |           |      |\n| Progress             |     ✅      |     ✅     |       |           |      |\n| Spinner              |     ✅      |     ✅     |       |           |      |\n| Skeleton             |     ✅      |    n/a     |       |           |      |\n| Notification (Toast) |     ✅      |     ✅     |       |           |      |\n\n### Overlay\n\n|         | Development | A11y check | Tests | Storybook | Docs |\n| ------- | :---------: | :--------: | :---: | :-------: | :--: |\n| Drawer  |     ✅      |     ✅     |       |           |      |\n| Menu    |     ✅      |     ✅     |       |           |      |\n| Modal   |     ✅      |     ✅     |       |           |      |\n| Popover |     ✅      |     ✅     |       |           |      |\n| Tooltip |     ✅      |     ✅     |       |           |      |\n"
  },
  {
    "path": "apps/docs/.eslintrc.json",
    "content": "{\n  \"extends\": \"../../.eslintrc.json\",\n  \"parserOptions\": {\n    \"project\": [\"./tsconfig.json\"]\n  }\n}\n"
  },
  {
    "path": "apps/docs/README.md",
    "content": "## @hope-ui/docs\n\nDocumentation website of the Hope UI component library.\n"
  },
  {
    "path": "apps/docs/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <link rel=\"shortcut icon\" type=\"image/ico\" href=\"/src/assets/favicon.ico\" />\n    <title>Hope UI | The SolidJS component library you've hoped for</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n\n    <script src=\"/src/index.tsx\" type=\"module\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "apps/docs/package.json",
    "content": "{\n  \"name\": \"@hope-ui/docs\",\n  \"version\": \"0.0.1\",\n  \"private\": true,\n  \"description\": \"Documentation of the Hope UI component library\",\n  \"author\": \"Fabien MARIE-LOUISE (https://github.com/fabien-ml)\",\n  \"scripts\": {\n    \"build\": \"vite build\",\n    \"clean\": \"rm -rf .turbo && rm -rf node_modules && rm -rf dist\",\n    \"dev\": \"vite --host\",\n    \"serve\": \"vite preview --port 3000\",\n    \"typecheck\": \"tsc --noEmit\"\n  },\n  \"dependencies\": {\n    \"@felte/solid\": \"1.1.5\",\n    \"@felte/validator-yup\": \"1.0.3\",\n    \"@hope-ui/solid\": \"workspace:*\",\n    \"@stitches/core\": \"1.2.8\",\n    \"prism-themes\": \"1.9.0\",\n    \"prismjs\": \"1.27.0\",\n    \"solid-app-router\": \"0.2.1\",\n    \"solid-js\": \"1.4.0\",\n    \"solid-transition-group\": \"0.0.10\",\n    \"yup\": \"0.32.11\"\n  }\n}\n"
  },
  {
    "path": "apps/docs/src/App.tsx",
    "content": "import {\n  Anchor,\n  Box,\n  Center,\n  Container,\n  Flex,\n  hope,\n  HStack,\n  Progress,\n  ProgressIndicator,\n  Spinner,\n} from \"@hope-ui/solid\";\nimport { Outlet, Route, Routes, useIsRouting } from \"solid-app-router\";\nimport { lazy, Suspense } from \"solid-js\";\nimport { Portal } from \"solid-js/web\";\n\nimport Header from \"./components/Header\";\nimport MainNavigation from \"./components/MainNavigation\";\n\nconst LandingPage = lazy(() => import(\"./pages/landing-page\"));\nconst NotFound = lazy(() => import(\"./pages/not-found\"));\n\nconst Installation = lazy(() => import(\"./pages/getting-started/installation\"));\nconst Changelog = lazy(() => import(\"./pages/getting-started/changelog\"));\n\nconst StyleProps = lazy(() => import(\"./pages/features/style-props\"));\nconst CSSProp = lazy(() => import(\"./pages/features/css-prop\"));\nconst CreateStyles = lazy(() => import(\"./pages/features/create-styles\"));\nconst ResponsiveStyles = lazy(() => import(\"./pages/features/responsive-styles\"));\nconst GlobalStyles = lazy(() => import(\"./pages/features/global-styles\"));\nconst HopeFactory = lazy(() => import(\"./pages/features/hope-factory\"));\n\nconst DefaultTheme = lazy(() => import(\"./pages/theming/default-theme\"));\nconst CustomizeTheme = lazy(() => import(\"./pages/theming/customize-theme\"));\nconst CSSVariables = lazy(() => import(\"./pages/theming/css-variables\"));\nconst ColorMode = lazy(() => import(\"./pages/theming/color-mode\"));\n\nconst ButtonDoc = lazy(() => import(\"./pages/component-docs/general/button\"));\nconst IconButtonDoc = lazy(() => import(\"./pages/component-docs/general/icon-button\"));\n\nconst AspectRatioDoc = lazy(() => import(\"./pages/component-docs/layout/aspect-ratio\"));\nconst BoxDoc = lazy(() => import(\"./pages/component-docs/layout/box\"));\nconst CenterDoc = lazy(() => import(\"./pages/component-docs/layout/center\"));\nconst ContainerDoc = lazy(() => import(\"./pages/component-docs/layout/container\"));\nconst DividerDoc = lazy(() => import(\"./pages/component-docs/layout/divider\"));\nconst FlexDoc = lazy(() => import(\"./pages/component-docs/layout/flex\"));\nconst GridDoc = lazy(() => import(\"./pages/component-docs/layout/grid\"));\nconst SimpleGridDoc = lazy(() => import(\"./pages/component-docs/layout/simple-grid\"));\nconst StackDoc = lazy(() => import(\"./pages/component-docs/layout/stack\"));\n\nconst HeadingDoc = lazy(() => import(\"./pages/component-docs/typography/heading\"));\nconst TextDoc = lazy(() => import(\"./pages/component-docs/typography/text\"));\n\nconst CheckboxDoc = lazy(() => import(\"./pages/component-docs/data-entry/checkbox\"));\nconst FormControlDoc = lazy(() => import(\"./pages/component-docs/data-entry/form-control\"));\nconst InputDoc = lazy(() => import(\"./pages/component-docs/data-entry/input\"));\nconst RadioDoc = lazy(() => import(\"./pages/component-docs/data-entry/radio\"));\nconst SelectDoc = lazy(() => import(\"./pages/component-docs/data-entry/select\"));\nconst SwitchDoc = lazy(() => import(\"./pages/component-docs/data-entry/switch\"));\nconst TextareaDoc = lazy(() => import(\"./pages/component-docs/data-entry/textarea\"));\n\nconst AccordionDoc = lazy(() => import(\"./pages/component-docs/data-display/accordion\"));\nconst AvatarDoc = lazy(() => import(\"./pages/component-docs/data-display/avatar\"));\nconst BadgeDoc = lazy(() => import(\"./pages/component-docs/data-display/badge\"));\nconst IconDoc = lazy(() => import(\"./pages/component-docs/data-display/icon\"));\nconst ImageDoc = lazy(() => import(\"./pages/component-docs/data-display/image\"));\nconst KbdDoc = lazy(() => import(\"./pages/component-docs/data-display/kbd\"));\nconst ListDoc = lazy(() => import(\"./pages/component-docs/data-display/list\"));\nconst TableDoc = lazy(() => import(\"./pages/component-docs/data-display/table\"));\nconst TagDoc = lazy(() => import(\"./pages/component-docs/data-display/tag\"));\n\nconst AnchorDoc = lazy(() => import(\"./pages/component-docs/navigation/anchor\"));\nconst BreadcrumbDoc = lazy(() => import(\"./pages/component-docs/navigation/breadcrumb\"));\nconst TabsDoc = lazy(() => import(\"./pages/component-docs/navigation/tabs\"));\n\nconst AlertDoc = lazy(() => import(\"./pages/component-docs/feedback/alert\"));\nconst CircularProgressDoc = lazy(() => import(\"./pages/component-docs/feedback/circular-progress\"));\nconst ProgressDoc = lazy(() => import(\"./pages/component-docs/feedback/progress\"));\nconst SkeletonDoc = lazy(() => import(\"./pages/component-docs/feedback/skeleton\"));\nconst SpinnerDoc = lazy(() => import(\"./pages/component-docs/feedback/spinner\"));\nconst NotificationDoc = lazy(() => import(\"./pages/component-docs/feedback/notification\"));\n\nconst DrawerDoc = lazy(() => import(\"./pages/component-docs/overlay/drawer\"));\nconst MenuDoc = lazy(() => import(\"./pages/component-docs/overlay/menu\"));\nconst ModalDoc = lazy(() => import(\"./pages/component-docs/overlay/modal\"));\nconst PopoverDoc = lazy(() => import(\"./pages/component-docs/overlay/popover\"));\nconst TooltipDoc = lazy(() => import(\"./pages/component-docs/overlay/tooltip\"));\n\nconst CloseButtonDoc = lazy(() => import(\"./pages/component-docs/others/close-button\"));\n\nfunction AppLayout() {\n  const isRouting = useIsRouting();\n\n  return (\n    <Flex direction=\"column\">\n      <Portal>\n        <Box position=\"fixed\" top=\"0\" left=\"0\" right=\"0\" zIndex=\"$banner\">\n          <Progress indeterminate size=\"xs\" d={isRouting() ? \"block\" : \"none\"}>\n            <ProgressIndicator />\n          </Progress>\n          <HStack\n            bg=\"$danger9\"\n            color=\"white\"\n            px=\"$2\"\n            fontWeight=\"$medium\"\n            fontSize=\"$sm\"\n            lineHeight=\"$5\"\n            _dark={{\n              bg: \"$danger3\",\n              color: \"$danger11\",\n            }}\n          >\n            Hope UI is no longer maintained. Focus is on the developement of it's successor: <a href=\"https://github.com/kobaltedev/pigment\">Pigment</a>.\n          </HStack>\n        </Box>\n      </Portal>\n      <Header />\n      <Container flexGrow={1}>\n        <Flex>\n          <MainNavigation />\n          <hope.main w=\"$full\">\n            <Outlet />\n          </hope.main>\n        </Flex>\n      </Container>\n    </Flex>\n  );\n}\n\nexport default function App() {\n  return (\n    <Suspense\n      fallback={\n        <Center mt=\"$4\">\n          <Spinner size=\"lg\" thickness=\"3px\" color=\"$primary9\" />\n        </Center>\n      }\n    >\n      <Routes>\n        <Route path=\"/\" element={<LandingPage />} />\n        <Route path=\"/*all\" element={<NotFound />} />\n        <Route path=\"/docs\" element={<AppLayout />}>\n          <Route path=\"/getting-started\" element={<Installation />} />\n          <Route path=\"/changelog\" element={<Changelog />} />\n          <Route path=\"/features\">\n            <Route path=\"/style-props\" element={<StyleProps />} />\n            <Route path=\"/css-prop\" element={<CSSProp />} />\n            <Route path=\"/create-styles\" element={<CreateStyles />} />\n            <Route path=\"/responsive-styles\" element={<ResponsiveStyles />} />\n            <Route path=\"/global-styles\" element={<GlobalStyles />} />\n            <Route path=\"/hope-factory\" element={<HopeFactory />} />\n          </Route>\n          <Route path=\"/theming\">\n            <Route path=\"/default-theme\" element={<DefaultTheme />} />\n            <Route path=\"/customize-theme\" element={<CustomizeTheme />} />\n            <Route path=\"/css-variables\" element={<CSSVariables />} />\n            <Route path=\"/color-mode\" element={<ColorMode />} />\n          </Route>\n          <Route path=\"/general\">\n            <Route path=\"/button\" element={<ButtonDoc />} />\n            <Route path=\"/icon-button\" element={<IconButtonDoc />} />\n          </Route>\n          <Route path=\"/layout\">\n            <Route path=\"/aspect-ratio\" element={<AspectRatioDoc />} />\n            <Route path=\"/box\" element={<BoxDoc />} />\n            <Route path=\"/center\" element={<CenterDoc />} />\n            <Route path=\"/container\" element={<ContainerDoc />} />\n            <Route path=\"/divider\" element={<DividerDoc />} />\n            <Route path=\"/flex\" element={<FlexDoc />} />\n            <Route path=\"/grid\" element={<GridDoc />} />\n            <Route path=\"/simple-grid\" element={<SimpleGridDoc />} />\n            <Route path=\"/stack\" element={<StackDoc />} />\n          </Route>\n          <Route path=\"/typography\">\n            <Route path=\"/text\" element={<TextDoc />} />\n            <Route path=\"/heading\" element={<HeadingDoc />} />\n          </Route>\n          <Route path=\"/data-entry\">\n            <Route path=\"/checkbox\" element={<CheckboxDoc />} />\n            <Route path=\"/form-control\" element={<FormControlDoc />} />\n            <Route path=\"/input\" element={<InputDoc />} />\n            <Route path=\"/radio\" element={<RadioDoc />} />\n            <Route path=\"/select\" element={<SelectDoc />} />\n            <Route path=\"/switch\" element={<SwitchDoc />} />\n            <Route path=\"/textarea\" element={<TextareaDoc />} />\n          </Route>\n          <Route path=\"/data-display\">\n            <Route path=\"/accordion\" element={<AccordionDoc />} />\n            <Route path=\"/avatar\" element={<AvatarDoc />} />\n            <Route path=\"/badge\" element={<BadgeDoc />} />\n            <Route path=\"/icon\" element={<IconDoc />} />\n            <Route path=\"/image\" element={<ImageDoc />} />\n            <Route path=\"/kbd\" element={<KbdDoc />} />\n            <Route path=\"/list\" element={<ListDoc />} />\n            <Route path=\"/table\" element={<TableDoc />} />\n            <Route path=\"/tag\" element={<TagDoc />} />\n          </Route>\n          <Route path=\"/navigation\">\n            <Route path=\"/anchor\" element={<AnchorDoc />} />\n            <Route path=\"/breadcrumb\" element={<BreadcrumbDoc />} />\n            <Route path=\"/tabs\" element={<TabsDoc />} />\n          </Route>\n          <Route path=\"/feedback\">\n            <Route path=\"/alert\" element={<AlertDoc />} />\n            <Route path=\"/circular-progress\" element={<CircularProgressDoc />} />\n            <Route path=\"/progress\" element={<ProgressDoc />} />\n            <Route path=\"/skeleton\" element={<SkeletonDoc />} />\n            <Route path=\"/spinner\" element={<SpinnerDoc />} />\n            <Route path=\"/notification\" element={<NotificationDoc />} />\n          </Route>\n          <Route path=\"/overlay\">\n            <Route path=\"/drawer\" element={<DrawerDoc />} />\n            <Route path=\"/menu\" element={<MenuDoc />} />\n            <Route path=\"/modal\" element={<ModalDoc />} />\n            <Route path=\"/popover\" element={<PopoverDoc />} />\n            <Route path=\"/tooltip\" element={<TooltipDoc />} />\n          </Route>\n          <Route path=\"/others\">\n            <Route path=\"/close-button\" element={<CloseButtonDoc />} />\n          </Route>\n        </Route>\n      </Routes>\n    </Suspense>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/components/AppNavLink.tsx",
    "content": "import { Badge, hope } from \"@hope-ui/solid\";\nimport { NavLink } from \"solid-app-router\";\nimport { ComponentProps, Show, splitProps } from \"solid-js\";\n\nconst StyledNavLink = hope(NavLink, {\n  baseStyle: {\n    display: \"inline-flex\",\n    alignItems: \"center\",\n    justifyContent: \"flex-start\",\n    w: \"$full\",\n    height: \"$8\",\n    rounded: \"$sm\",\n    bg: \"transparent\",\n    px: \"$3\",\n    color: \"$neutral12\",\n    fontSize: \"$sm\",\n    lineHeight: \"$none\",\n    textDecoration: \"none\",\n    transition: \"color 250ms, background-color 250ms\",\n\n    _hover: {\n      bg: \"$neutral4\",\n    },\n\n    _activeLink: {\n      bg: \"$primary4\",\n      color: \"$primary11\",\n      fontWeight: \"$medium\",\n    },\n  },\n});\n\ntype AppNavLinkProps = ComponentProps<typeof StyledNavLink> & {\n  isNew?: boolean;\n};\n\nexport default function AppNavLink(props: AppNavLinkProps) {\n  const [local, others] = splitProps(props, [\"children\", \"href\", \"isNew\"]);\n\n  return (\n    <StyledNavLink href={local.href} {...others}>\n      {local.children}\n      <Show when={local.isNew}>\n        <Badge colorScheme=\"accent\" ml=\"$1_5\">\n          new\n        </Badge>\n      </Show>\n    </StyledNavLink>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/components/BeatLoader.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const BeatLoader = createIcon({\n  viewBox: \"0 0 120 30\",\n  path: () => (\n    <g fill=\"currentColor\">\n      <circle cx=\"15\" cy=\"15\" r=\"15\">\n        <animate\n          attributeName=\"r\"\n          from=\"15\"\n          to=\"15\"\n          begin=\"0s\"\n          dur=\"0.8s\"\n          values=\"15;9;15\"\n          calcMode=\"linear\"\n          repeatCount=\"indefinite\"\n        />\n        <animate\n          attributeName=\"fill-opacity\"\n          from=\"1\"\n          to=\"1\"\n          begin=\"0s\"\n          dur=\"0.8s\"\n          values=\"1;.5;1\"\n          calcMode=\"linear\"\n          repeatCount=\"indefinite\"\n        />\n      </circle>\n      <circle cx=\"60\" cy=\"15\" r=\"9\" fill-opacity=\"0.3\">\n        <animate\n          attributeName=\"r\"\n          from=\"9\"\n          to=\"9\"\n          begin=\"0s\"\n          dur=\"0.8s\"\n          values=\"9;15;9\"\n          calcMode=\"linear\"\n          repeatCount=\"indefinite\"\n        />\n        <animate\n          attributeName=\"fill-opacity\"\n          from=\"0.5\"\n          to=\"0.5\"\n          begin=\"0s\"\n          dur=\"0.8s\"\n          values=\".5;1;.5\"\n          calcMode=\"linear\"\n          repeatCount=\"indefinite\"\n        />\n      </circle>\n      <circle cx=\"105\" cy=\"15\" r=\"15\">\n        <animate\n          attributeName=\"r\"\n          from=\"15\"\n          to=\"15\"\n          begin=\"0s\"\n          dur=\"0.8s\"\n          values=\"15;9;15\"\n          calcMode=\"linear\"\n          repeatCount=\"indefinite\"\n        />\n        <animate\n          attributeName=\"fill-opacity\"\n          from=\"1\"\n          to=\"1\"\n          begin=\"0s\"\n          dur=\"0.8s\"\n          values=\"1;.5;1\"\n          calcMode=\"linear\"\n          repeatCount=\"indefinite\"\n        />\n      </circle>\n    </g>\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/components/Code.tsx",
    "content": "import { hope } from \"@hope-ui/solid\";\n\nconst Code = hope(\"code\", {\n  baseStyle: {\n    color: \"$primary11\",\n    fontFamily: \"$mono\",\n    fontSize: \"0.95em\",\n  },\n});\n\nexport default Code;\n"
  },
  {
    "path": "apps/docs/src/components/CodeSnippet.tsx",
    "content": "import { Box, HTMLHopeProps } from \"@hope-ui/solid\";\nimport { mergeProps, splitProps } from \"solid-js\";\n\nexport interface CodeSnippetProps extends HTMLHopeProps<\"div\"> {\n  snippet?: string;\n  lang?: \"bash\" | \"js\" | \"tsx\" | \"html\" | \"css\";\n}\n\nexport default function CodeSnippet(props: CodeSnippetProps) {\n  const propsWithDefault = mergeProps({ lang: \"tsx\" }, props);\n  const [local, others] = splitProps(propsWithDefault, [\"snippet\", \"lang\"]);\n\n  return (\n    <Box\n      borderRadius=\"$lg\"\n      overflow=\"hidden\"\n      position=\"relative\"\n      fontSize=\"$sm\"\n      w=\"$full\"\n      {...others}\n    >\n      <pre class=\"line-numbers\">\n        <code class={`language-${local.lang}`}>{local.snippet}</code>\n      </pre>\n    </Box>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/components/ColorScale.tsx",
    "content": "import {\n  Box,\n  Grid,\n  GridItem,\n  GridProps,\n  hope,\n  HStack,\n  SystemConfig,\n  useTheme,\n  VStack,\n} from \"@hope-ui/solid\";\nimport { For, splitProps } from \"solid-js\";\n\nexport interface ColorScaleItem {\n  name: string;\n  token: keyof SystemConfig[\"theme\"][\"colors\"];\n}\n\ntype ColorScaleProps = GridProps & {\n  scale: ColorScaleItem[];\n};\n\nexport function ColorScale(props: ColorScaleProps) {\n  const theme = useTheme();\n  const [local, others] = splitProps(props, [\"scale\"]);\n\n  return (\n    <Grid\n      templateColumns={{\n        \"@initial\": \"repeat(2, minmax(0, 1fr))\",\n        \"@md\": \"repeat(3, minmax(0, 1fr))\",\n      }}\n      gap=\"$6\"\n      {...others}\n    >\n      <For each={local.scale}>\n        {item => (\n          <GridItem>\n            <HStack spacing=\"$3\">\n              <Box\n                boxSize={{ \"@initial\": \"$10\", \"@sm\": \"$12\" }}\n                rounded=\"$md\"\n                shadow=\"$inner\"\n                bg={theme().colors[item.token].value}\n              />\n              <VStack alignItems=\"flex-start\">\n                <hope.span fontSize=\"$sm\" fontWeight=\"$semibold\">\n                  {item.name}\n                </hope.span>\n                <hope.span fontSize=\"$sm\" textTransform=\"uppercase\">\n                  {theme().colors[item.token].value}\n                </hope.span>\n              </VStack>\n            </HStack>\n          </GridItem>\n        )}\n      </For>\n    </Grid>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/components/ContextualNav.tsx",
    "content": "import { Anchor, Box, Heading, HTMLHopeProps, VStack } from \"@hope-ui/solid\";\nimport { useLocation } from \"solid-app-router\";\nimport { For, splitProps } from \"solid-js\";\n\nexport interface ContextualNavLink {\n  href: string;\n  label: string;\n  indent?: boolean;\n}\n\nexport type ContextualNavProps = HTMLHopeProps<\"div\", { links?: ContextualNavLink[] }>;\n\nexport default function ContextualNav(props: ContextualNavProps) {\n  const [local, others] = splitProps(props, [\"links\", \"children\"]);\n\n  const location = useLocation();\n\n  const isActiveLink = (href: string) => {\n    return location.hash === href.replace(\"#\", \"\");\n  };\n\n  return (\n    <Box\n      as=\"nav\"\n      position=\"sticky\"\n      overflowY=\"auto\"\n      top=\"92px\"\n      display={{\n        \"@initial\": \"none\",\n        \"@xl\": \"block\",\n      }}\n      flexShrink=\"0\"\n      maxW=\"$60\"\n      height=\"calc(100vh - 92px)\"\n      p=\"$6\"\n      {...others}\n    >\n      <Heading as=\"h3\" mb=\"$3\">\n        On this page\n      </Heading>\n      <VStack alignItems=\"flex-start\" spacing=\"$2\">\n        <For each={local.links}>\n          {link => (\n            <Anchor\n              fontSize=\"$sm\"\n              href={link.href}\n              fontWeight={isActiveLink(link.href) ? \"$semibold\" : \"$normal\"}\n              ml={link.indent ? \"$3\" : 0}\n            >\n              {link.label}\n            </Anchor>\n          )}\n        </For>\n      </VStack>\n    </Box>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/components/Footer.tsx",
    "content": "import { Anchor, Center, HStack, Text } from \"@hope-ui/solid\";\n\nimport { IconGithub } from \"@/icons/IconGithub\";\nimport { IconTwitter } from \"@/icons/IconTwitter\";\n\nexport default function Footer() {\n  return (\n    <Center as=\"footer\" flexDirection=\"column\" h=\"$40\">\n      <Text mb=\"$3\">Made in 🇫🇷 &nbsp;by Fabien MARIE-LOUISE</Text>\n      <HStack spacing=\"$3\">\n        <Anchor external href=\"https://github.com/fabien-ml\">\n          <IconGithub boxSize=\"$5\" color=\"$neutral11\" />\n        </Anchor>\n        <Anchor external href=\"https://twitter.com/MLFabien\">\n          <IconTwitter boxSize=\"$5\" color=\"$neutral11\" />\n        </Anchor>\n      </HStack>\n    </Center>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/components/Header.tsx",
    "content": "import {\n  Box,\n  Container,\n  Drawer,\n  DrawerBody,\n  DrawerCloseButton,\n  DrawerContent,\n  DrawerHeader,\n  DrawerOverlay,\n  hope,\n  HStack,\n  IconButton,\n  Tag,\n  Text,\n  useColorMode,\n  useColorModeValue,\n} from \"@hope-ui/solid\";\nimport { Link } from \"solid-app-router\";\nimport { createSignal } from \"solid-js\";\n\nimport { IconGithub } from \"@/icons/IconGithub\";\nimport { IconMenu } from \"@/icons/IconMenu\";\nimport { IconMoon } from \"@/icons/IconMoon\";\nimport { IconSun } from \"@/icons/IconSun\";\n\nimport MainNavContent from \"./MainNavContent\";\n\nexport default function Header() {\n  const [isMainNavOverlayVisible, setIsMainNavOverlayVisible] = createSignal(false);\n\n  const { toggleColorMode } = useColorMode();\n  const headerBgColor = useColorModeValue(\"white\", \"$neutral1\");\n  const colorModeButtonIcon = useColorModeValue(<IconMoon />, <IconSun />);\n  const headerShadow = useColorModeValue(\"$sm\", \"$none\");\n\n  const toggleMainNavOverlay = () => {\n    setIsMainNavOverlayVisible(prev => !prev);\n  };\n\n  const onNavKeyup = (event: KeyboardEvent) => {\n    if (isMainNavOverlayVisible() && event.key === \"Enter\") {\n      setIsMainNavOverlayVisible(false);\n    }\n  };\n\n  return (\n    <Box\n      as=\"header\"\n      position=\"sticky\"\n      top=\"20px\"\n      left=\"0\"\n      right=\"0\"\n      zIndex=\"$sticky\"\n      height=\"72px\"\n      flexShrink={0}\n      shadow={headerShadow()}\n      bg={headerBgColor()}\n    >\n      <Container h=\"$full\">\n        <HStack h=\"$full\" px=\"$4\" justifyContent=\"space-between\">\n          <HStack spacing=\"$2\">\n            <IconButton\n              display={{ \"@lg\": \"none\" }}\n              aria-label=\"Open main navigation\"\n              variant=\"ghost\"\n              colorScheme=\"neutral\"\n              size=\"sm\"\n              rounded=\"$md\"\n              fontSize=\"$lg\"\n              icon={<IconMenu />}\n              onClick={toggleMainNavOverlay}\n            />\n            <Text as={Link} href=\"/\" textDecoration=\"none\" letterSpacing=\"$wide\" fontSize=\"$2xl\">\n              <hope.span color=\"$neutral12\" fontWeight=\"$medium\" mr=\"$1\">\n                Hope\n              </hope.span>\n              <hope.span color=\"$primary9\" fontWeight=\"$bold\">\n                UI\n              </hope.span>\n            </Text>\n            <Tag size=\"sm\" rounded=\"$sm\" fontWeight=\"$semibold\">\n              v0.6.7\n            </Tag>\n          </HStack>\n          <HStack spacing=\"$2\">\n            <IconButton\n              as=\"a\"\n              href=\"https://github.com/fabien-ml/hope-ui\"\n              target=\"_blank\"\n              rel=\"noopener noreferrer\"\n              aria-label=\"Go to the github repository\"\n              variant=\"ghost\"\n              colorScheme=\"neutral\"\n              size=\"sm\"\n              rounded=\"$md\"\n              fontSize=\"$lg\"\n              icon={<IconGithub />}\n            />\n            <IconButton\n              aria-label=\"Toggle color mode\"\n              variant=\"ghost\"\n              colorScheme=\"neutral\"\n              size=\"sm\"\n              rounded=\"$md\"\n              fontSize=\"$lg\"\n              icon={colorModeButtonIcon}\n              onClick={toggleColorMode}\n            />\n          </HStack>\n        </HStack>\n      </Container>\n      <Drawer\n        placement=\"left\"\n        opened={isMainNavOverlayVisible()}\n        onClose={() => setIsMainNavOverlayVisible(false)}\n      >\n        <DrawerOverlay />\n        <DrawerContent>\n          <DrawerHeader fontWeight=\"$bold\" fontSize=\"$2xl\">\n            Hope UI\n          </DrawerHeader>\n          <DrawerCloseButton />\n          <DrawerBody>\n            <hope.nav d=\"flex\" flexDirection=\"column\" onKeyUp={onNavKeyup}>\n              <MainNavContent />\n            </hope.nav>\n          </DrawerBody>\n        </DrawerContent>\n      </Drawer>\n    </Box>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/components/MainNavContent.tsx",
    "content": "import { VStack } from \"@hope-ui/solid\";\n\nimport AppNavLink from \"./AppNavLink\";\nimport Code from \"./Code\";\nimport MainNavSubtitle from \"./MainNavSubtitle\";\nimport MainNavTitle from \"./MainNavTitle\";\n\nexport default function MainNavContent() {\n  return (\n    <>\n      <MainNavTitle mb=\"$2\">Getting started</MainNavTitle>\n      <VStack alignItems=\"flex-start\" spacing=\"$1\" mb=\"$6\">\n        <AppNavLink href=\"/docs/getting-started\">Installation</AppNavLink>\n        <AppNavLink href=\"/docs/changelog\">Changelog</AppNavLink>\n      </VStack>\n      <MainNavSubtitle mb=\"$2\">Features</MainNavSubtitle>\n      <VStack alignItems=\"flex-start\" spacing=\"$1\" mb=\"$6\">\n        <AppNavLink href=\"/docs/features/style-props\">Style props</AppNavLink>\n        <AppNavLink href=\"/docs/features/css-prop\">\n          The <Code mx=\"$1\">css</Code> prop\n        </AppNavLink>\n        <AppNavLink href=\"/docs/features/create-styles\">Create styles</AppNavLink>\n        <AppNavLink href=\"/docs/features/responsive-styles\">Responsive styles</AppNavLink>\n        <AppNavLink href=\"/docs/features/global-styles\">Global styles</AppNavLink>\n        <AppNavLink href=\"/docs/features/hope-factory\">Hope factory</AppNavLink>\n      </VStack>\n      <MainNavSubtitle mb=\"$2\">Theming</MainNavSubtitle>\n      <VStack alignItems=\"flex-start\" spacing=\"$1\" mb=\"$6\">\n        <AppNavLink href=\"/docs/theming/default-theme\">Default theme</AppNavLink>\n        <AppNavLink href=\"/docs/theming/customize-theme\">Customize theme</AppNavLink>\n        <AppNavLink href=\"/docs/theming/css-variables\">CSS variables</AppNavLink>\n        <AppNavLink href=\"/docs/theming/color-mode\">Color mode</AppNavLink>\n      </VStack>\n      <MainNavTitle mb=\"$3\">Components</MainNavTitle>\n      <MainNavSubtitle mb=\"$2\">General</MainNavSubtitle>\n      <VStack alignItems=\"flex-start\" spacing=\"$1\" mb=\"$6\">\n        <AppNavLink href=\"/docs/general/button\">Button</AppNavLink>\n        <AppNavLink href=\"/docs/general/icon-button\">IconButton</AppNavLink>\n      </VStack>\n      <MainNavSubtitle mb=\"$2\">Layout</MainNavSubtitle>\n      <VStack alignItems=\"flex-start\" spacing=\"$1\" mb=\"$6\">\n        <AppNavLink href=\"/docs/layout/aspect-ratio\">AspectRatio</AppNavLink>\n        <AppNavLink href=\"/docs/layout/box\">Box</AppNavLink>\n        <AppNavLink href=\"/docs/layout/center\">Center</AppNavLink>\n        <AppNavLink href=\"/docs/layout/container\">Container</AppNavLink>\n        <AppNavLink href=\"/docs/layout/divider\">Divider</AppNavLink>\n        <AppNavLink href=\"/docs/layout/flex\">Flex</AppNavLink>\n        <AppNavLink href=\"/docs/layout/grid\">Grid</AppNavLink>\n        <AppNavLink href=\"/docs/layout/simple-grid\">SimpleGrid</AppNavLink>\n        <AppNavLink href=\"/docs/layout/stack\">Stack</AppNavLink>\n      </VStack>\n      <MainNavSubtitle mb=\"$2\">Typography</MainNavSubtitle>\n      <VStack alignItems=\"flex-start\" spacing=\"$1\" mb=\"$6\">\n        <AppNavLink href=\"/docs/typography/heading\">Heading</AppNavLink>\n        <AppNavLink href=\"/docs/typography/text\">Text</AppNavLink>\n      </VStack>\n      <MainNavSubtitle mb=\"$2\">Data entry</MainNavSubtitle>\n      <VStack alignItems=\"flex-start\" spacing=\"$1\" mb=\"$6\">\n        <AppNavLink href=\"/docs/data-entry/checkbox\">Checkbox</AppNavLink>\n        {/* <AppNavLink href=\"/docs/data-display/date-picker\">DatePicker</AppNavLink> */}\n        <AppNavLink href=\"/docs/data-entry/form-control\">FormControl</AppNavLink>\n        <AppNavLink href=\"/docs/data-entry/input\">Input</AppNavLink>\n        {/* <AppNavLink href=\"/docs/data-entry/number-input\">NumberInput</AppNavLink> */}\n        {/* <AppNavLink href=\"/docs/data-entry/password-input\">PasswordInput</AppNavLink> */}\n        {/* <AppNavLink href=\"/docs/data-entry/file-input\">FileInput</AppNavLink> */}\n        <AppNavLink href=\"/docs/data-entry/radio\">Radio</AppNavLink>\n        <AppNavLink href=\"/docs/data-entry/select\">Select</AppNavLink>\n        {/* <AppNavLink href=\"/docs/data-entry/slider\">Slider</AppNavLink> */}\n        <AppNavLink href=\"/docs/data-entry/switch\">Switch</AppNavLink>\n        <AppNavLink href=\"/docs/data-entry/textarea\">Textarea</AppNavLink>\n        {/* <AppNavLink href=\"/docs/data-entry/time-picker\">TimePicker</AppNavLink> */}\n      </VStack>\n\n      <MainNavSubtitle mb=\"$2\">Data display</MainNavSubtitle>\n      <VStack alignItems=\"flex-start\" spacing=\"$1\" mb=\"$6\">\n        <AppNavLink href=\"/docs/data-display/accordion\">Accordion</AppNavLink>\n        <AppNavLink href=\"/docs/data-display/avatar\">Avatar</AppNavLink>\n        <AppNavLink href=\"/docs/data-display/badge\">Badge</AppNavLink>\n        <AppNavLink href=\"/docs/data-display/icon\">Icon</AppNavLink>\n        <AppNavLink href=\"/docs/data-display/image\">Image</AppNavLink>\n        <AppNavLink href=\"/docs/data-display/kbd\">Kbd</AppNavLink>\n        <AppNavLink href=\"/docs/data-display/list\">List</AppNavLink>\n        <AppNavLink href=\"/docs/data-display/table\">Table</AppNavLink>\n        <AppNavLink href=\"/docs/data-display/tag\">Tag</AppNavLink>\n        {/* <AppNavLink href=\"/docs/data-display/timeline\">Timeline</AppNavLink> */}\n      </VStack>\n      <MainNavSubtitle mb=\"$2\">Navigation</MainNavSubtitle>\n      <VStack alignItems=\"flex-start\" spacing=\"$1\" mb=\"$6\">\n        <AppNavLink href=\"/docs/navigation/anchor\">Anchor</AppNavLink>\n        <AppNavLink href=\"/docs/navigation/breadcrumb\">Breadcrumb</AppNavLink>\n        {/* <AppNavLink href=\"/docs/navigation/pagination\">Pagination</AppNavLink> */}\n        {/* <AppNavLink href=\"/docs/navigation/stepper\">Stepper</AppNavLink> */}\n        <AppNavLink href=\"/docs/navigation/tabs\">Tabs</AppNavLink>\n      </VStack>\n      <MainNavSubtitle mb=\"$2\">Feedback</MainNavSubtitle>\n      <VStack alignItems=\"flex-start\" spacing=\"$1\" mb=\"$6\">\n        <AppNavLink href=\"/docs/feedback/alert\">Alert</AppNavLink>\n        <AppNavLink href=\"/docs/feedback/circular-progress\">CircularProgress</AppNavLink>\n        <AppNavLink href=\"/docs/feedback/progress\">Progress</AppNavLink>\n        <AppNavLink href=\"/docs/feedback/skeleton\">Skeleton</AppNavLink>\n        <AppNavLink href=\"/docs/feedback/spinner\">Spinner</AppNavLink>\n        <AppNavLink href=\"/docs/feedback/notification\">Notification</AppNavLink>\n      </VStack>\n      <MainNavSubtitle mb=\"$2\">Overlay</MainNavSubtitle>\n      <VStack alignItems=\"flex-start\" spacing=\"$1\" mb=\"$6\">\n        <AppNavLink href=\"/docs/overlay/drawer\">Drawer</AppNavLink>\n        <AppNavLink href=\"/docs/overlay/menu\">Menu</AppNavLink>\n        <AppNavLink href=\"/docs/overlay/modal\">Modal</AppNavLink>\n        <AppNavLink href=\"/docs/overlay/popover\">Popover</AppNavLink>\n        <AppNavLink href=\"/docs/overlay/tooltip\">Tooltip</AppNavLink>\n      </VStack>\n      <MainNavSubtitle mb=\"$2\">Others</MainNavSubtitle>\n      <VStack alignItems=\"flex-start\" spacing=\"$1\">\n        <AppNavLink href=\"/docs/others/close-button\">CloseButton</AppNavLink>\n      </VStack>\n    </>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/components/MainNavSubtitle.tsx",
    "content": "import { ElementType, Text, TextProps } from \"@hope-ui/solid\";\n\nexport default function MainNavSubtitle<C extends ElementType = \"p\">(props: TextProps<C>) {\n  return (\n    <Text\n      as=\"span\"\n      color=\"$primary10\"\n      fontSize=\"$xs\"\n      fontWeight=\"$semibold\"\n      textTransform=\"uppercase\"\n      {...props}\n    />\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/components/MainNavTitle.tsx",
    "content": "import { ElementType, Text, TextProps } from \"@hope-ui/solid\";\n\nexport default function MainNavTitle<C extends ElementType = \"p\">(props: TextProps<C>) {\n  return <Text as=\"span\" fontSize=\"$sm\" fontWeight=\"$bold\" textTransform=\"uppercase\" {...props} />;\n}\n"
  },
  {
    "path": "apps/docs/src/components/MainNavigation.tsx",
    "content": "import { Flex } from \"@hope-ui/solid\";\n\nimport MainNavContent from \"./MainNavContent\";\n\nexport default function MainNavigation() {\n  return (\n    <Flex\n      as=\"nav\"\n      class=\"hide-scrollbar\"\n      position=\"sticky\"\n      top=\"92px\"\n      overflowY=\"auto\"\n      display={{\n        \"@initial\": \"none\",\n        \"@lg\": \"flex\",\n      }}\n      direction=\"column\"\n      flexShrink=\"0\"\n      maxW=\"$60\"\n      height=\"calc(100vh - 92px)\"\n      p=\"$6\"\n    >\n      <MainNavContent />\n    </Flex>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/components/PageLayout.tsx",
    "content": "import { Box, Flex, HStack, HTMLHopeProps, Stack, Text, VStack } from \"@hope-ui/solid\";\nimport { Link } from \"solid-app-router\";\nimport { Show, splitProps } from \"solid-js\";\n\nimport { IconArrowLeft } from \"@/icons/IconArrowLeft\";\nimport { IconArrowRight } from \"@/icons/IconArrowRight\";\n\nimport ContextualNav, { ContextualNavLink } from \"./ContextualNav\";\nimport Footer from \"./Footer\";\n\ntype PageLayoutProps = HTMLHopeProps<\n  \"div\",\n  {\n    previousLink?: ContextualNavLink;\n    nextLink?: ContextualNavLink;\n    contextualNavLinks?: ContextualNavLink[];\n  }\n>;\n\nexport default function PageLayout(props: PageLayoutProps) {\n  const [local, others] = splitProps(props, [\n    \"children\",\n    \"previousLink\",\n    \"nextLink\",\n    \"contextualNavLinks\",\n  ]);\n\n  return (\n    <Flex h=\"$full\" {...others}>\n      <Flex mt=\"$4\" mx=\"auto\" w=\"$full\" maxW=\"75ch\" direction=\"column\">\n        <Box w=\"$full\" py=\"$6\" px=\"$4\" flexGrow=\"1\">\n          {local.children}\n        </Box>\n        <Stack\n          direction={{\n            \"@initial\": \"column\",\n            \"@sm\": \"row\",\n          }}\n          rowGap={{\n            \"@initial\": \"$4\",\n            \"@sm\": 0,\n          }}\n          columnGap={{\n            \"@initial\": 0,\n            \"@sm\": \"$4\",\n          }}\n          justifyContent=\"center\"\n          alignItems=\"stretch\"\n          m=\"$6\"\n        >\n          <Show when={local.previousLink}>\n            <HStack\n              as={Link}\n              href={local.previousLink?.href ?? \"\"}\n              justifyContent=\"space-between\"\n              w=\"$full\"\n              textDecoration=\"none\"\n              border=\"1px solid $neutral4\"\n              rounded=\"$md\"\n              p=\"$4\"\n              transition=\"background-color 250ms\"\n              _hover={{\n                borderColor: \"$neutral5\",\n                bg: \"$neutral2\",\n              }}\n            >\n              <IconArrowLeft boxSize=\"$6\" />\n              <VStack alignItems=\"flex-end\" fontWeight=\"$normal\">\n                <Text size=\"sm\" color=\"$neutral11\">\n                  Previous\n                </Text>\n                <Text size=\"lg\">{local.previousLink?.label}</Text>\n              </VStack>\n            </HStack>\n          </Show>\n          <Show when={local.nextLink}>\n            <HStack\n              as={Link}\n              href={local.nextLink?.href ?? \"\"}\n              justifyContent=\"space-between\"\n              w=\"$full\"\n              border=\"1px solid $neutral4\"\n              rounded=\"$md\"\n              p=\"$4\"\n              textDecoration=\"none\"\n              transition=\"background-color 250ms\"\n              _hover={{\n                borderColor: \"$neutral5\",\n                bg: \"$neutral2\",\n              }}\n            >\n              <VStack alignItems=\"flex-start\" fontWeight=\"$normal\">\n                <Text size=\"sm\" color=\"$neutral11\">\n                  Next\n                </Text>\n                <Text size=\"lg\">{local.nextLink?.label}</Text>\n              </VStack>\n              <IconArrowRight boxSize=\"$6\" />\n            </HStack>\n          </Show>\n        </Stack>\n        <Footer />\n      </Flex>\n      <ContextualNav links={local.contextualNavLinks} />\n    </Flex>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/components/PageTitle.tsx",
    "content": "import { Heading, HTMLHopeProps } from \"@hope-ui/solid\";\n\nexport default function PageTitle(props: HTMLHopeProps<\"h1\">) {\n  return <Heading as=\"h1\" size=\"3xl\" fontWeight=\"$bold\" mb=\"$6\" {...props} />;\n}\n"
  },
  {
    "path": "apps/docs/src/components/Preview.tsx",
    "content": "import { Box } from \"@hope-ui/solid\";\nimport { Show, splitProps } from \"solid-js\";\n\nimport CodeSnippet, { CodeSnippetProps } from \"./CodeSnippet\";\n\nexport function Preview(props: CodeSnippetProps) {\n  const [local, others] = splitProps(props, [\"lang\", \"snippet\", \"children\"]);\n\n  return (\n    <Box {...others}>\n      <Box\n        border=\"1px solid $neutral5\"\n        p=\"$4\"\n        borderTopRadius=\"$lg\"\n        borderBottomRadius={local.snippet ? \"$none\" : \"$lg\"}\n        overflowY=\"auto\"\n      >\n        {local.children}\n      </Box>\n      <Show when={local.snippet}>\n        <CodeSnippet lang={local.lang} snippet={local.snippet} borderTopRadius=\"$none\" />\n      </Show>\n    </Box>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/components/PropsTable.tsx",
    "content": "import { Table, TableProps, Tag, Tbody, Td, Th, Thead, Tr, VStack } from \"@hope-ui/solid\";\nimport { For, Show, splitProps } from \"solid-js\";\n\nexport interface PropsTableItem {\n  name: string;\n  description: string;\n  type: string;\n  required?: boolean;\n  defaultValue?: string;\n}\n\ntype PropsTableProps = TableProps<\"table\"> & { items: PropsTableItem[] };\n\nexport function PropsTable(props: PropsTableProps) {\n  const [local, others] = splitProps(props, [\"items\"]);\n\n  return (\n    <VStack spacing=\"$8\" {...others}>\n      <For each={local.items}>\n        {item => (\n          <Table dense>\n            <Thead bg=\"$neutral2\">\n              <Tr>\n                <Th fontSize=\"$base\" letterSpacing=\"$normal\" textTransform=\"none\" colSpan={2}>\n                  {item.name}\n                  <Show when={item.required}>\n                    <Tag ml=\"$1_5\" colorScheme=\"danger\" rounded=\"$sm\">\n                      required\n                    </Tag>\n                  </Show>\n                </Th>\n              </Tr>\n            </Thead>\n            <Tbody>\n              <Tr>\n                <Td fontWeight=\"$medium\" maxW=\"100px\" w=\"20%\">\n                  Description\n                </Td>\n                <Td>{item.description}</Td>\n              </Tr>\n              <Tr>\n                <Td fontWeight=\"$medium\" maxW=\"100px\" w=\"20%\">\n                  Type\n                </Td>\n                <Td\n                  fontFamily=\"$mono\"\n                  fontSize=\"$sm\"\n                  color=\"$primary11\"\n                  css={{ wordBreak: \"break-word\" }}\n                >\n                  {item.type}\n                </Td>\n              </Tr>\n              <Show when={item.defaultValue}>\n                <Tr>\n                  <Td fontWeight=\"$medium\" maxW=\"100px\" w=\"20%\">\n                    Default\n                  </Td>\n                  <Td>{item.defaultValue}</Td>\n                </Tr>\n              </Show>\n            </Tbody>\n          </Table>\n        )}\n      </For>\n    </VStack>\n  );\n\n  // return (\n  //   <hope.div overflowX=\"auto\" {...others}>\n  //     <Table dense>\n  //       <Thead bg=\"$neutral2\">\n  //         <Tr>\n  //           <Th>Prop</Th>\n  //           <Th>Description</Th>\n  //           <Th>Type</Th>\n  //           <Th>Default</Th>\n  //         </Tr>\n  //       </Thead>\n  //       <Tbody>\n  //         <For each={local.items}>\n  //           {item => (\n  //             <Tr>\n  //               <Td\n  //                 fontFamily=\"$mono\"\n  //                 fontWeight=\"$semibold\"\n  //                 color=\"$neutral12\"\n  //                 css={{ whiteSpace: \"nowrap\" }}\n  //               >\n  //                 {item.name}\n  //                 <Show when={item.required}>\n  //                   <Tag ml=\"$1\" size=\"sm\" colorScheme=\"danger\" rounded=\"$sm\" fontFamily=\"$sans\">\n  //                     required\n  //                   </Tag>\n  //                 </Show>\n  //               </Td>\n  //               <Td>{item.description}</Td>\n  //               <Td fontFamily=\"$mono\" fontSize=\"$sm\" color=\"$primary11\" maxW=\"350px\">\n  //                 {item.type}\n  //               </Td>\n  //               <Td fontFamily=\"$mono\">{item.defaultValue}</Td>\n  //             </Tr>\n  //           )}\n  //         </For>\n  //       </Tbody>\n  //     </Table>\n  //   </hope.div>\n  // );\n}\n"
  },
  {
    "path": "apps/docs/src/components/SectionSubtitle.tsx",
    "content": "import { Heading, HTMLHopeProps } from \"@hope-ui/solid\";\n\nexport default function SectionSubtitle(props: HTMLHopeProps<\"h2\">) {\n  return <Heading as=\"h3\" size=\"lg\" mb=\"$3\" {...props} />;\n}\n"
  },
  {
    "path": "apps/docs/src/components/SectionTitle.tsx",
    "content": "import { Heading, HTMLHopeProps } from \"@hope-ui/solid\";\n\nexport default function SectionTitle(props: HTMLHopeProps<\"h2\">) {\n  return <Heading as=\"h2\" size=\"2xl\" mb=\"$4\" {...props} />;\n}\n"
  },
  {
    "path": "apps/docs/src/components/StylePropsTable.tsx",
    "content": "import { hope, Table, TableProps, Tbody, Td, Th, Thead, Tr } from \"@hope-ui/solid\";\nimport { For, splitProps } from \"solid-js\";\n\nexport interface StylePropsTableItem {\n  prop: string;\n  cssProperty: string;\n  themeToken?: string;\n}\n\ntype StylePropsTableProps = TableProps<\"table\"> & { items: StylePropsTableItem[] };\n\nexport function StylePropsTable(props: StylePropsTableProps) {\n  const [local, others] = splitProps(props, [\"items\"]);\n\n  return (\n    <hope.div overflowX=\"auto\" {...others}>\n      <Table dense>\n        <Thead bg=\"$neutral2\">\n          <Tr>\n            <Th>Prop</Th>\n            <Th>CSS property</Th>\n            <Th css={{ whiteSpace: \"nowrap\" }}>Theme token</Th>\n          </Tr>\n        </Thead>\n        <Tbody color=\"$primary11\" fontFamily=\"$mono\">\n          <For each={local.items}>\n            {item => (\n              <Tr>\n                <Td>{item.prop}</Td>\n                <Td>{item.cssProperty}</Td>\n                <Td color={item.themeToken ? \"inherit\" : \"$neutral12\"}>\n                  {item.themeToken || \"none\"}\n                </Td>\n              </Tr>\n            )}\n          </For>\n        </Tbody>\n      </Table>\n    </hope.div>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/icons/IconAccessibility.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconAccessibility = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M0.877197 7.49984C0.877197 3.84216 3.84234 0.877014 7.50003 0.877014C11.1577 0.877014 14.1229 3.84216 14.1229 7.49984C14.1229 11.1575 11.1577 14.1227 7.50003 14.1227C3.84234 14.1227 0.877197 11.1575 0.877197 7.49984ZM7.50003 1.82701C4.36702 1.82701 1.8272 4.36683 1.8272 7.49984C1.8272 10.6328 4.36702 13.1727 7.50003 13.1727C10.633 13.1727 13.1729 10.6328 13.1729 7.49984C13.1729 4.36683 10.633 1.82701 7.50003 1.82701ZM7.12457 9.00001C7.06994 9.12735 6.33165 11.9592 6.33165 11.9592C6.26018 12.226 5.98601 12.3843 5.71928 12.3128C5.45255 12.2413 5.29425 11.9672 5.36573 11.7004C5.36573 11.7004 6.24661 8.87268 6.24661 8.27007V6.80099L4.28763 6.27608C4.0209 6.20461 3.86261 5.93045 3.93408 5.66371C4.00555 5.39698 4.27972 5.23869 4.54645 5.31016C4.54645 5.31016 6.20042 5.87268 6.84579 5.87268H8.15505C8.80042 5.87268 10.4534 5.31042 10.4534 5.31042C10.7202 5.23895 10.9943 5.39724 11.0658 5.66397C11.1373 5.93071 10.979 6.20487 10.7122 6.27635L8.74661 6.80303V8.27007C8.74661 8.87268 9.62663 11.6971 9.62663 11.6971C9.6981 11.9639 9.5398 12.238 9.27307 12.3095C9.00634 12.381 8.73217 12.2227 8.6607 11.956C8.6607 11.956 7.91994 9.12735 7.86866 9.00001C7.81994 8.87268 7.65006 8.87268 7.65006 8.87268H7.34317C7.34317 8.87268 7.16994 8.87268 7.12457 9.00001ZM7.50043 5.12007C8.12175 5.12007 8.62543 4.61639 8.62543 3.99507C8.62543 3.37375 8.12175 2.87007 7.50043 2.87007C6.87911 2.87007 6.37543 3.37375 6.37543 3.99507C6.37543 4.61639 6.87911 5.12007 7.50043 5.12007Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconArrowLeft.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconArrowLeft = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M6.85355 3.14645C7.04882 3.34171 7.04882 3.65829 6.85355 3.85355L3.70711 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H3.70711L6.85355 11.1464C7.04882 11.3417 7.04882 11.6583 6.85355 11.8536C6.65829 12.0488 6.34171 12.0488 6.14645 11.8536L2.14645 7.85355C1.95118 7.65829 1.95118 7.34171 2.14645 7.14645L6.14645 3.14645C6.34171 2.95118 6.65829 2.95118 6.85355 3.14645Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconArrowRight.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconArrowRight = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M8.14645 3.14645C8.34171 2.95118 8.65829 2.95118 8.85355 3.14645L12.8536 7.14645C13.0488 7.34171 13.0488 7.65829 12.8536 7.85355L8.85355 11.8536C8.65829 12.0488 8.34171 12.0488 8.14645 11.8536C7.95118 11.6583 7.95118 11.3417 8.14645 11.1464L11.2929 8H2.5C2.22386 8 2 7.77614 2 7.5C2 7.22386 2.22386 7 2.5 7H11.2929L8.14645 3.85355C7.95118 3.65829 7.95118 3.34171 8.14645 3.14645Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconCaretDown.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconCaretDown = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconCheck.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconCheck = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconChevronRight.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconChevronRight = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconCircleDashed.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\n// tabler-circle-dashed\nexport const IconCircleDashed = createIcon({\n  path: () => (\n    <path\n      fill=\"none\"\n      stroke=\"currentColor\"\n      stroke-linecap=\"round\"\n      stroke-linejoin=\"round\"\n      stroke-width=\"2\"\n      d=\"M8.56 3.69a9 9 0 0 0-2.92 1.95M3.69 8.56A9 9 0 0 0 3 12m.69 3.44a9 9 0 0 0 1.95 2.92m2.92 1.95A9 9 0 0 0 12 21m3.44-.69a9 9 0 0 0 2.92-1.95m1.95-2.92A9 9 0 0 0 21 12m-.69-3.44a9 9 0 0 0-1.95-2.92m-2.92-1.95A9 9 0 0 0 12 3\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconCode.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconCode = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M9.96424 2.68571C10.0668 2.42931 9.94209 2.13833 9.6857 2.03577C9.4293 1.93322 9.13832 2.05792 9.03576 2.31432L5.03576 12.3143C4.9332 12.5707 5.05791 12.8617 5.3143 12.9642C5.5707 13.0668 5.86168 12.9421 5.96424 12.6857L9.96424 2.68571ZM3.85355 5.14646C4.04882 5.34172 4.04882 5.6583 3.85355 5.85356L2.20711 7.50001L3.85355 9.14646C4.04882 9.34172 4.04882 9.6583 3.85355 9.85356C3.65829 10.0488 3.34171 10.0488 3.14645 9.85356L1.14645 7.85356C0.951184 7.6583 0.951184 7.34172 1.14645 7.14646L3.14645 5.14646C3.34171 4.9512 3.65829 4.9512 3.85355 5.14646ZM11.1464 5.14646C11.3417 4.9512 11.6583 4.9512 11.8536 5.14646L13.8536 7.14646C14.0488 7.34172 14.0488 7.6583 13.8536 7.85356L11.8536 9.85356C11.6583 10.0488 11.3417 10.0488 11.1464 9.85356C10.9512 9.6583 10.9512 9.34172 11.1464 9.14646L12.7929 7.50001L11.1464 5.85356C10.9512 5.6583 10.9512 5.34172 11.1464 5.14646Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconComponent.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconComponent = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M4.67129 3.14634C4.47603 3.34161 4.47603 3.65819 4.67129 3.85345L7.14616 6.32833C7.34142 6.52359 7.65801 6.52359 7.85327 6.32833L10.3281 3.85345C10.5234 3.65819 10.5234 3.34161 10.3281 3.14634L7.85327 0.671471C7.65801 0.476209 7.34142 0.476209 7.14616 0.671471L4.67129 3.14634ZM7.49971 5.26766L5.73195 3.4999L7.49971 1.73213L9.26748 3.4999L7.49971 5.26766ZM8.67129 7.14634C8.47603 7.34161 8.47603 7.65819 8.67129 7.85345L11.1462 10.3283C11.3414 10.5236 11.658 10.5236 11.8533 10.3283L14.3281 7.85345C14.5234 7.65819 14.5234 7.34161 14.3281 7.14634L11.8533 4.67147C11.658 4.47621 11.3414 4.47621 11.1462 4.67147L8.67129 7.14634ZM11.4997 9.26766L9.73195 7.4999L11.4997 5.73213L13.2675 7.4999L11.4997 9.26766ZM4.67129 11.8535C4.47603 11.6582 4.47603 11.3416 4.67129 11.1463L7.14616 8.67147C7.34142 8.47621 7.65801 8.47621 7.85327 8.67147L10.3281 11.1463C10.5234 11.3416 10.5234 11.6582 10.3281 11.8535L7.85327 14.3283C7.65801 14.5236 7.34142 14.5236 7.14616 14.3283L4.67129 11.8535ZM5.73195 11.4999L7.49971 13.2677L9.26748 11.4999L7.49971 9.73213L5.73195 11.4999ZM0.671288 7.14649C0.476026 7.34175 0.476026 7.65834 0.671288 7.8536L3.14616 10.3285C3.34142 10.5237 3.65801 10.5237 3.85327 10.3285L6.32814 7.8536C6.5234 7.65834 6.5234 7.34175 6.32814 7.14649L3.85327 4.67162C3.65801 4.47636 3.34142 4.47636 3.14616 4.67162L0.671288 7.14649ZM3.49972 9.26781L1.73195 7.50005L3.49972 5.73228L5.26748 7.50005L3.49972 9.26781Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconEdit.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconEdit = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M12.1464 1.14645C12.3417 0.951184 12.6583 0.951184 12.8535 1.14645L14.8535 3.14645C15.0488 3.34171 15.0488 3.65829 14.8535 3.85355L10.9109 7.79618C10.8349 7.87218 10.7471 7.93543 10.651 7.9835L6.72359 9.94721C6.53109 10.0435 6.29861 10.0057 6.14643 9.85355C5.99425 9.70137 5.95652 9.46889 6.05277 9.27639L8.01648 5.34897C8.06455 5.25283 8.1278 5.16507 8.2038 5.08907L12.1464 1.14645ZM12.5 2.20711L8.91091 5.79618L7.87266 7.87267L8.12731 8.12732L10.2038 7.08907L13.7929 3.5L12.5 2.20711ZM9.99998 2L8.99998 3H4.9C4.47171 3 4.18056 3.00039 3.95552 3.01877C3.73631 3.03668 3.62421 3.06915 3.54601 3.10899C3.35785 3.20487 3.20487 3.35785 3.10899 3.54601C3.06915 3.62421 3.03669 3.73631 3.01878 3.95552C3.00039 4.18056 3 4.47171 3 4.9V11.1C3 11.5283 3.00039 11.8194 3.01878 12.0445C3.03669 12.2637 3.06915 12.3758 3.10899 12.454C3.20487 12.6422 3.35785 12.7951 3.54601 12.891C3.62421 12.9309 3.73631 12.9633 3.95552 12.9812C4.18056 12.9996 4.47171 13 4.9 13H11.1C11.5283 13 11.8194 12.9996 12.0445 12.9812C12.2637 12.9633 12.3758 12.9309 12.454 12.891C12.6422 12.7951 12.7951 12.6422 12.891 12.454C12.9309 12.3758 12.9633 12.2637 12.9812 12.0445C12.9996 11.8194 13 11.5283 13 11.1V6.99998L14 5.99998V11.1V11.1207C14 11.5231 14 11.8553 13.9779 12.1259C13.9549 12.407 13.9057 12.6653 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.6653 13.9057 12.407 13.9549 12.1259 13.9779C11.8553 14 11.5231 14 11.1207 14H11.1H4.9H4.87934C4.47686 14 4.14468 14 3.87409 13.9779C3.59304 13.9549 3.33469 13.9057 3.09202 13.782C2.7157 13.5903 2.40973 13.2843 2.21799 12.908C2.09434 12.6653 2.04506 12.407 2.0221 12.1259C1.99999 11.8553 1.99999 11.5231 2 11.1207V11.1206V11.1V4.9V4.87935V4.87932V4.87931C1.99999 4.47685 1.99999 4.14468 2.0221 3.87409C2.04506 3.59304 2.09434 3.33469 2.21799 3.09202C2.40973 2.71569 2.7157 2.40973 3.09202 2.21799C3.33469 2.09434 3.59304 2.04506 3.87409 2.0221C4.14468 1.99999 4.47685 1.99999 4.87932 2H4.87935H4.9H9.99998Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconEmail.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconEmail = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M1 2C0.447715 2 0 2.44772 0 3V12C0 12.5523 0.447715 13 1 13H14C14.5523 13 15 12.5523 15 12V3C15 2.44772 14.5523 2 14 2H1ZM1 3L14 3V3.92494C13.9174 3.92486 13.8338 3.94751 13.7589 3.99505L7.5 7.96703L1.24112 3.99505C1.16621 3.94751 1.0826 3.92486 1 3.92494V3ZM1 4.90797V12H14V4.90797L7.74112 8.87995C7.59394 8.97335 7.40606 8.97335 7.25888 8.87995L1 4.90797Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconExternalLink.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconExternalLink = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M3 2C2.44772 2 2 2.44772 2 3V12C2 12.5523 2.44772 13 3 13H12C12.5523 13 13 12.5523 13 12V8.5C13 8.22386 12.7761 8 12.5 8C12.2239 8 12 8.22386 12 8.5V12H3V3L6.5 3C6.77614 3 7 2.77614 7 2.5C7 2.22386 6.77614 2 6.5 2H3ZM12.8536 2.14645C12.9015 2.19439 12.9377 2.24964 12.9621 2.30861C12.9861 2.36669 12.9996 2.4303 13 2.497L13 2.5V2.50049V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3.70711L6.85355 8.85355C6.65829 9.04882 6.34171 9.04882 6.14645 8.85355C5.95118 8.65829 5.95118 8.34171 6.14645 8.14645L11.2929 3H9.5C9.22386 3 9 2.77614 9 2.5C9 2.22386 9.22386 2 9.5 2H12.4999H12.5C12.5678 2 12.6324 2.01349 12.6914 2.03794C12.7504 2.06234 12.8056 2.09851 12.8536 2.14645Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconGear.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconGear = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M7.07095 0.650238C6.67391 0.650238 6.32977 0.925096 6.24198 1.31231L6.0039 2.36247C5.6249 2.47269 5.26335 2.62363 4.92436 2.81013L4.01335 2.23585C3.67748 2.02413 3.23978 2.07312 2.95903 2.35386L2.35294 2.95996C2.0722 3.2407 2.0232 3.6784 2.23493 4.01427L2.80942 4.92561C2.62307 5.2645 2.47227 5.62594 2.36216 6.00481L1.31209 6.24287C0.924883 6.33065 0.650024 6.6748 0.650024 7.07183V7.92897C0.650024 8.32601 0.924883 8.67015 1.31209 8.75794L2.36228 8.99603C2.47246 9.375 2.62335 9.73652 2.80979 10.0755L2.2354 10.9867C2.02367 11.3225 2.07267 11.7602 2.35341 12.041L2.95951 12.6471C3.24025 12.9278 3.67795 12.9768 4.01382 12.7651L4.92506 12.1907C5.26384 12.377 5.62516 12.5278 6.0039 12.6379L6.24198 13.6881C6.32977 14.0753 6.67391 14.3502 7.07095 14.3502H7.92809C8.32512 14.3502 8.66927 14.0753 8.75705 13.6881L8.99505 12.6383C9.37411 12.5282 9.73573 12.3773 10.0748 12.1909L10.986 12.7653C11.3218 12.977 11.7595 12.928 12.0403 12.6473L12.6464 12.0412C12.9271 11.7604 12.9761 11.3227 12.7644 10.9869L12.1902 10.076C12.3768 9.73688 12.5278 9.37515 12.638 8.99596L13.6879 8.75794C14.0751 8.67015 14.35 8.32601 14.35 7.92897V7.07183C14.35 6.6748 14.0751 6.33065 13.6879 6.24287L12.6381 6.00488C12.528 5.62578 12.3771 5.26414 12.1906 4.92507L12.7648 4.01407C12.9766 3.6782 12.9276 3.2405 12.6468 2.95975L12.0407 2.35366C11.76 2.07292 11.3223 2.02392 10.9864 2.23565L10.0755 2.80989C9.73622 2.62328 9.37437 2.47229 8.99505 2.36209L8.75705 1.31231C8.66927 0.925096 8.32512 0.650238 7.92809 0.650238H7.07095ZM4.92053 3.81251C5.44724 3.44339 6.05665 3.18424 6.71543 3.06839L7.07095 1.50024H7.92809L8.28355 3.06816C8.94267 3.18387 9.5524 3.44302 10.0794 3.81224L11.4397 2.9547L12.0458 3.56079L11.1882 4.92117C11.5573 5.44798 11.8164 6.0575 11.9321 6.71638L13.5 7.07183V7.92897L11.932 8.28444C11.8162 8.94342 11.557 9.55301 11.1878 10.0798L12.0453 11.4402L11.4392 12.0462L10.0787 11.1886C9.55192 11.5576 8.94241 11.8166 8.28355 11.9323L7.92809 13.5002H7.07095L6.71543 11.932C6.0569 11.8162 5.44772 11.5572 4.92116 11.1883L3.56055 12.046L2.95445 11.4399L3.81213 10.0794C3.4431 9.55266 3.18403 8.94326 3.06825 8.2845L1.50002 7.92897V7.07183L3.06818 6.71632C3.18388 6.05765 3.44283 5.44833 3.81171 4.92165L2.95398 3.561L3.56008 2.95491L4.92053 3.81251ZM9.02496 7.50008C9.02496 8.34226 8.34223 9.02499 7.50005 9.02499C6.65786 9.02499 5.97513 8.34226 5.97513 7.50008C5.97513 6.65789 6.65786 5.97516 7.50005 5.97516C8.34223 5.97516 9.02496 6.65789 9.02496 7.50008ZM9.92496 7.50008C9.92496 8.83932 8.83929 9.92499 7.50005 9.92499C6.1608 9.92499 5.07513 8.83932 5.07513 7.50008C5.07513 6.16084 6.1608 5.07516 7.50005 5.07516C8.83929 5.07516 9.92496 6.16084 9.92496 7.50008Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconGithub.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconGithub = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M7.49933 0.25C3.49635 0.25 0.25 3.49593 0.25 7.50024C0.25 10.703 2.32715 13.4206 5.2081 14.3797C5.57084 14.446 5.70302 14.2222 5.70302 14.0299C5.70302 13.8576 5.69679 13.4019 5.69323 12.797C3.67661 13.235 3.25112 11.825 3.25112 11.825C2.92132 10.9874 2.44599 10.7644 2.44599 10.7644C1.78773 10.3149 2.49584 10.3238 2.49584 10.3238C3.22353 10.375 3.60629 11.0711 3.60629 11.0711C4.25298 12.1788 5.30335 11.8588 5.71638 11.6732C5.78225 11.205 5.96962 10.8854 6.17658 10.7043C4.56675 10.5209 2.87415 9.89918 2.87415 7.12104C2.87415 6.32925 3.15677 5.68257 3.62053 5.17563C3.54576 4.99226 3.29697 4.25521 3.69174 3.25691C3.69174 3.25691 4.30015 3.06196 5.68522 3.99973C6.26337 3.83906 6.8838 3.75895 7.50022 3.75583C8.1162 3.75895 8.73619 3.83906 9.31523 3.99973C10.6994 3.06196 11.3069 3.25691 11.3069 3.25691C11.7026 4.25521 11.4538 4.99226 11.3795 5.17563C11.8441 5.68257 12.1245 6.32925 12.1245 7.12104C12.1245 9.9063 10.4292 10.5192 8.81452 10.6985C9.07444 10.9224 9.30633 11.3648 9.30633 12.0413C9.30633 13.0102 9.29742 13.7922 9.29742 14.0299C9.29742 14.2239 9.42828 14.4496 9.79591 14.3788C12.6746 13.4179 14.75 10.7025 14.75 7.50024C14.75 3.49593 11.5036 0.25 7.49933 0.25Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconHamburgerMenu.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconHamburgerMenu = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M1.5 3C1.22386 3 1 3.22386 1 3.5C1 3.77614 1.22386 4 1.5 4H13.5C13.7761 4 14 3.77614 14 3.5C14 3.22386 13.7761 3 13.5 3H1.5ZM1 7.5C1 7.22386 1.22386 7 1.5 7H13.5C13.7761 7 14 7.22386 14 7.5C14 7.77614 13.7761 8 13.5 8H1.5C1.22386 8 1 7.77614 1 7.5ZM1 11.5C1 11.2239 1.22386 11 1.5 11H13.5C13.7761 11 14 11.2239 14 11.5C14 11.7761 13.7761 12 13.5 12H1.5C1.22386 12 1 11.7761 1 11.5Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconMenu.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconMenu = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M1.5 3C1.22386 3 1 3.22386 1 3.5C1 3.77614 1.22386 4 1.5 4H13.5C13.7761 4 14 3.77614 14 3.5C14 3.22386 13.7761 3 13.5 3H1.5ZM1 7.5C1 7.22386 1.22386 7 1.5 7H13.5C13.7761 7 14 7.22386 14 7.5C14 7.77614 13.7761 8 13.5 8H1.5C1.22386 8 1 7.77614 1 7.5ZM1 11.5C1 11.2239 1.22386 11 1.5 11H13.5C13.7761 11 14 11.2239 14 11.5C14 11.7761 13.7761 12 13.5 12H1.5C1.22386 12 1 11.7761 1 11.5Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconMinus.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconMinus = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M2.25 7.5C2.25 7.22386 2.47386 7 2.75 7H12.25C12.5261 7 12.75 7.22386 12.75 7.5C12.75 7.77614 12.5261 8 12.25 8H2.75C2.47386 8 2.25 7.77614 2.25 7.5Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconMoon.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconMoon = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n      d=\"M2.9.5a.4.4 0 0 0-.8 0v.6h-.6a.4.4 0 1 0 0 .8h.6v.6a.4.4 0 1 0 .8 0v-.6h.6a.4.4 0 0 0 0-.8h-.6V.5zm3 3a.4.4 0 1 0-.8 0v.6h-.6a.4.4 0 1 0 0 .8h.6v.6a.4.4 0 1 0 .8 0v-.6h.6a.4.4 0 0 0 0-.8h-.6v-.6zm-4 3a.4.4 0 1 0-.8 0v.6H.5a.4.4 0 1 0 0 .8h.6v.6a.4.4 0 0 0 .8 0v-.6h.6a.4.4 0 0 0 0-.8h-.6v-.6zM8.544.982l-.298-.04c-.213-.024-.34.224-.217.4A6.57 6.57 0 0 1 9.203 5.1a6.602 6.602 0 0 1-6.243 6.59c-.214.012-.333.264-.183.417c.069.07.138.139.21.206l.072.066l.26.226l.188.148l.121.09l.187.131l.176.115c.12.076.244.149.37.217l.264.135l.26.12l.303.122l.244.086a6.568 6.568 0 0 0 1.103.26l.317.04l.267.02a6.6 6.6 0 0 0 6.943-7.328l-.037-.277a6.557 6.557 0 0 0-.384-1.415l-.113-.268l-.077-.166l-.074-.148a6.602 6.602 0 0 0-.546-.883l-.153-.2l-.199-.24l-.163-.18l-.12-.124l-.16-.158l-.223-.2l-.32-.26l-.245-.177l-.292-.19l-.321-.186l-.328-.165l-.113-.052l-.24-.101l-.276-.104l-.252-.082l-.325-.09l-.265-.06l-.292-.053zm1.86 4.318a7.578 7.578 0 0 0-.572-2.894a5.601 5.601 0 1 1-4.748 10.146a7.61 7.61 0 0 0 3.66-2.51a.749.749 0 0 0 1.355-.442a.75.75 0 0 0-.584-.732c.062-.116.122-.235.178-.355A1.25 1.25 0 1 0 10.35 6.2c.034-.295.052-.595.052-.9z\"\n      fill=\"currentColor\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconPalette.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconPalette = createIcon({\n  viewBox: \"0 0 24 24\",\n  path: () => (\n    <g\n      fill=\"none\"\n      stroke=\"currentColor\"\n      stroke-linecap=\"round\"\n      stroke-linejoin=\"round\"\n      stroke-width=\"2\"\n    >\n      <path d=\"M12 21a9 9 0 1 1 0-18a9 8 0 0 1 9 8a4.5 4 0 0 1-4.5 4H14a2 2 0 0 0-1 3.75A1.3 1.3 0 0 1 12 21\"></path>\n      <circle cx=\"7.5\" cy=\"10.5\" r=\".5\" fill=\"currentColor\"></circle>\n      <circle cx=\"12\" cy=\"7.5\" r=\".5\" fill=\"currentColor\"></circle>\n      <circle cx=\"16.5\" cy=\"10.5\" r=\".5\" fill=\"currentColor\"></circle>\n    </g>\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconPhone.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconPhone = createIcon({\n  viewBox: \"0 0 20 20\",\n  path: () => (\n    <path\n      d=\"M2 3a1 1 0 0 1 1-1h2.153a1 1 0 0 1 .986.836l.74 4.435a1 1 0 0 1-.54 1.06l-1.548.773a11.037 11.037 0 0 0 6.105 6.105l.774-1.548a1 1 0 0 1 1.059-.54l4.435.74a1 1 0 0 1 .836.986V17a1 1 0 0 1-1 1h-2C7.82 18 2 12.18 2 5V3z\"\n      fill=\"currentColor\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconPlus.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconPlus = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z\"\n      fill=\"currentColor\"\n      stroke=\"currentColor\"\n      stroke-width=\"1\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconQuestionMark.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconQuestionMark = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M5.07505 4.10001C5.07505 2.91103 6.25727 1.92502 7.50005 1.92502C8.74283 1.92502 9.92505 2.91103 9.92505 4.10001C9.92505 5.19861 9.36782 5.71436 8.61854 6.37884L8.58757 6.4063C7.84481 7.06467 6.92505 7.87995 6.92505 9.5C6.92505 9.81757 7.18248 10.075 7.50005 10.075C7.81761 10.075 8.07505 9.81757 8.07505 9.5C8.07505 8.41517 8.62945 7.90623 9.38156 7.23925L9.40238 7.22079C10.1496 6.55829 11.075 5.73775 11.075 4.10001C11.075 2.12757 9.21869 0.775024 7.50005 0.775024C5.7814 0.775024 3.92505 2.12757 3.92505 4.10001C3.92505 4.41758 4.18249 4.67501 4.50005 4.67501C4.81761 4.67501 5.07505 4.41758 5.07505 4.10001ZM7.50005 13.3575C7.9833 13.3575 8.37505 12.9657 8.37505 12.4825C8.37505 11.9992 7.9833 11.6075 7.50005 11.6075C7.0168 11.6075 6.62505 11.9992 6.62505 12.4825C6.62505 12.9657 7.0168 13.3575 7.50005 13.3575Z\"\n      fill=\"currentColor\"\n      stroke=\"currentColor\"\n      stroke-width=\"1\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconRepeat.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconRepeat = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M1.90321 7.29677C1.90321 10.341 4.11041 12.4147 6.58893 12.8439C6.87255 12.893 7.06266 13.1627 7.01355 13.4464C6.96444 13.73 6.69471 13.9201 6.41109 13.871C3.49942 13.3668 0.86084 10.9127 0.86084 7.29677C0.860839 5.76009 1.55996 4.55245 2.37639 3.63377C2.96124 2.97568 3.63034 2.44135 4.16846 2.03202L2.53205 2.03202C2.25591 2.03202 2.03205 1.80816 2.03205 1.53202C2.03205 1.25588 2.25591 1.03202 2.53205 1.03202L5.53205 1.03202C5.80819 1.03202 6.03205 1.25588 6.03205 1.53202L6.03205 4.53202C6.03205 4.80816 5.80819 5.03202 5.53205 5.03202C5.25591 5.03202 5.03205 4.80816 5.03205 4.53202L5.03205 2.68645L5.03054 2.68759L5.03045 2.68766L5.03044 2.68767L5.03043 2.68767C4.45896 3.11868 3.76059 3.64538 3.15554 4.3262C2.44102 5.13021 1.90321 6.10154 1.90321 7.29677ZM13.0109 7.70321C13.0109 4.69115 10.8505 2.6296 8.40384 2.17029C8.12093 2.11718 7.93465 1.84479 7.98776 1.56188C8.04087 1.27898 8.31326 1.0927 8.59616 1.14581C11.4704 1.68541 14.0532 4.12605 14.0532 7.70321C14.0532 9.23988 13.3541 10.4475 12.5377 11.3662C11.9528 12.0243 11.2837 12.5586 10.7456 12.968L12.3821 12.968C12.6582 12.968 12.8821 13.1918 12.8821 13.468C12.8821 13.7441 12.6582 13.968 12.3821 13.968L9.38205 13.968C9.10591 13.968 8.88205 13.7441 8.88205 13.468L8.88205 10.468C8.88205 10.1918 9.10591 9.96796 9.38205 9.96796C9.65819 9.96796 9.88205 10.1918 9.88205 10.468L9.88205 12.3135L9.88362 12.3123C10.4551 11.8813 11.1535 11.3546 11.7585 10.6738C12.4731 9.86976 13.0109 8.89844 13.0109 7.70321Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconRocket.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconRocket = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M6.85357 3.85355L7.65355 3.05353C8.2981 2.40901 9.42858 1.96172 10.552 1.80125C11.1056 1.72217 11.6291 1.71725 12.0564 1.78124C12.4987 1.84748 12.7698 1.97696 12.8965 2.10357C13.0231 2.23018 13.1526 2.50125 13.2188 2.94357C13.2828 3.37086 13.2779 3.89439 13.1988 4.44801C13.0383 5.57139 12.591 6.70188 11.9464 7.34645L7.49999 11.7929L6.35354 10.6465C6.15827 10.4512 5.84169 10.4512 5.64643 10.6465C5.45117 10.8417 5.45117 11.1583 5.64643 11.3536L7.14644 12.8536C7.34171 13.0488 7.65829 13.0488 7.85355 12.8536L8.40073 12.3064L9.57124 14.2572C9.65046 14.3893 9.78608 14.4774 9.9389 14.4963C10.0917 14.5151 10.2447 14.4624 10.3535 14.3536L12.3535 12.3536C12.4648 12.2423 12.5172 12.0851 12.495 11.9293L12.0303 8.67679L12.6536 8.05355C13.509 7.19808 14.0117 5.82855 14.1887 4.58943C14.2784 3.9618 14.2891 3.33847 14.2078 2.79546C14.1287 2.26748 13.9519 1.74482 13.6035 1.39645C13.2552 1.04809 12.7325 0.871332 12.2045 0.792264C11.6615 0.710945 11.0382 0.721644 10.4105 0.8113C9.17143 0.988306 7.80189 1.491 6.94644 2.34642L6.32322 2.96968L3.07071 2.50504C2.91492 2.48278 2.75773 2.53517 2.64645 2.64646L0.646451 4.64645C0.537579 4.75533 0.484938 4.90829 0.50375 5.0611C0.522563 5.21391 0.61073 5.34954 0.742757 5.42876L2.69364 6.59928L2.14646 7.14645C2.0527 7.24022 2.00002 7.3674 2.00002 7.50001C2.00002 7.63261 2.0527 7.75979 2.14646 7.85356L3.64647 9.35356C3.84173 9.54883 4.15831 9.54883 4.35357 9.35356C4.54884 9.1583 4.54884 8.84172 4.35357 8.64646L3.20712 7.50001L3.85357 6.85356L6.85357 3.85355ZM10.0993 13.1936L9.12959 11.5775L11.1464 9.56067L11.4697 11.8232L10.0993 13.1936ZM3.42251 5.87041L5.43935 3.85356L3.17678 3.53034L1.80638 4.90074L3.42251 5.87041ZM2.35356 10.3535C2.54882 10.1583 2.54882 9.8417 2.35356 9.64644C2.1583 9.45118 1.84171 9.45118 1.64645 9.64644L0.646451 10.6464C0.451188 10.8417 0.451188 11.1583 0.646451 11.3535C0.841713 11.5488 1.1583 11.5488 1.35356 11.3535L2.35356 10.3535ZM3.85358 11.8536C4.04884 11.6583 4.04885 11.3417 3.85359 11.1465C3.65833 10.9512 3.34175 10.9512 3.14648 11.1465L1.14645 13.1464C0.95119 13.3417 0.951187 13.6583 1.14645 13.8535C1.34171 14.0488 1.65829 14.0488 1.85355 13.8536L3.85358 11.8536ZM5.35356 13.3535C5.54882 13.1583 5.54882 12.8417 5.35356 12.6464C5.1583 12.4512 4.84171 12.4512 4.64645 12.6464L3.64645 13.6464C3.45119 13.8417 3.45119 14.1583 3.64645 14.3535C3.84171 14.5488 4.1583 14.5488 4.35356 14.3535L5.35356 13.3535ZM9.49997 6.74881C10.1897 6.74881 10.7488 6.1897 10.7488 5.5C10.7488 4.8103 10.1897 4.25118 9.49997 4.25118C8.81026 4.25118 8.25115 4.8103 8.25115 5.5C8.25115 6.1897 8.81026 6.74881 9.49997 6.74881Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconSearch.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconSearch = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconStar.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconStar = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M7.22303 0.665992C7.32551 0.419604 7.67454 0.419604 7.77702 0.665992L9.41343 4.60039C9.45663 4.70426 9.55432 4.77523 9.66645 4.78422L13.914 5.12475C14.18 5.14607 14.2878 5.47802 14.0852 5.65162L10.849 8.42374C10.7636 8.49692 10.7263 8.61176 10.7524 8.72118L11.7411 12.866C11.803 13.1256 11.5206 13.3308 11.2929 13.1917L7.6564 10.9705C7.5604 10.9119 7.43965 10.9119 7.34365 10.9705L3.70718 13.1917C3.47945 13.3308 3.19708 13.1256 3.25899 12.866L4.24769 8.72118C4.2738 8.61176 4.23648 8.49692 4.15105 8.42374L0.914889 5.65162C0.712228 5.47802 0.820086 5.14607 1.08608 5.12475L5.3336 4.78422C5.44573 4.77523 5.54342 4.70426 5.58662 4.60039L7.22303 0.665992Z\"\n      fill=\"currentColor\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconSun.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconSun = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconTwitter.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconTwitter = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M7.23336 4.69629C7.23336 2.96884 8.63335 1.56857 10.36 1.56857C11.3736 1.56857 12.183 2.04804 12.7254 2.74385C13.3079 2.62467 13.8557 2.40913 14.3513 2.11508C14.1559 2.72598 13.7424 3.2396 13.2033 3.56463C13.2038 3.56568 13.2042 3.56674 13.2047 3.56779C13.7334 3.50361 14.2364 3.36302 14.7048 3.15546L14.7037 3.15715C14.3667 3.66183 13.9431 4.10736 13.4561 4.47034C13.4823 4.64672 13.4956 4.82427 13.4956 5.00079C13.4956 8.6871 10.6873 12.9746 5.52122 12.9746C3.93906 12.9746 2.46544 12.511 1.22505 11.7152C0.992632 11.5661 0.925108 11.2568 1.07423 11.0244C1.0874 11.0038 1.10183 10.9846 1.11734 10.9666C1.20582 10.8202 1.37438 10.7309 1.5554 10.7522C2.47066 10.8601 3.38568 10.7485 4.19219 10.3962C3.39226 10.0434 2.77129 9.35975 2.50204 8.51974C2.45359 8.3686 2.48835 8.20311 2.59351 8.08422C2.59716 8.0801 2.60087 8.07606 2.60464 8.0721C1.96391 7.50819 1.55973 6.68208 1.55973 5.76143V5.72759C1.55973 5.56814 1.64411 5.42059 1.78155 5.33974C1.82671 5.31317 1.87537 5.29511 1.92532 5.28558C1.70549 4.86154 1.58116 4.37984 1.58116 3.86958C1.58116 3.40165 1.58384 2.81192 1.91332 2.28081C1.98718 2.16175 2.10758 2.08915 2.2364 2.07195C2.42588 2.01237 2.64087 2.06969 2.77406 2.23302C3.86536 3.57126 5.44066 4.49583 7.23366 4.73961L7.23336 4.69629ZM5.52122 11.9746C4.73387 11.9746 3.97781 11.8435 3.27248 11.6023C4.13012 11.4538 4.95307 11.1159 5.66218 10.5602C5.81211 10.4427 5.87182 10.2435 5.81126 10.0629C5.7507 9.88234 5.583 9.75943 5.39255 9.75607C4.68968 9.74366 4.06712 9.39716 3.67793 8.86845C3.86828 8.85306 4.05428 8.82039 4.23445 8.77167C4.43603 8.71716 4.57363 8.53114 4.56674 8.32243C4.55985 8.11372 4.41029 7.93718 4.20555 7.89607C3.42694 7.73977 2.79883 7.16764 2.56169 6.42174C2.76255 6.47025 2.97102 6.4991 3.18482 6.5061C3.38563 6.51267 3.56646 6.38533 3.62795 6.19405C3.68943 6.00277 3.61666 5.79391 3.44963 5.68224C2.86523 5.29155 2.48116 4.62464 2.48116 3.86958C2.48116 3.70213 2.48352 3.55268 2.49355 3.41719C3.85115 4.79913 5.70873 5.68931 7.77588 5.79338C7.93225 5.80126 8.08328 5.73543 8.18395 5.61553C8.28463 5.49562 8.32332 5.33548 8.28851 5.18284C8.25255 5.02517 8.23336 4.86284 8.23336 4.69629C8.23336 3.52085 9.18591 2.56857 10.36 2.56857C11.5943 2.56857 12.4956 3.71208 12.4956 5.00079C12.4956 8.25709 10.0202 11.9746 5.52122 11.9746Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/icons/IconUser.tsx",
    "content": "import { createIcon } from \"@hope-ui/solid\";\n\nexport const IconUser = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M7.5 0.875C5.49797 0.875 3.875 2.49797 3.875 4.5C3.875 6.15288 4.98124 7.54738 6.49373 7.98351C5.2997 8.12901 4.27557 8.55134 3.50407 9.31167C2.52216 10.2794 2.02502 11.72 2.02502 13.5999C2.02502 13.8623 2.23769 14.0749 2.50002 14.0749C2.76236 14.0749 2.97502 13.8623 2.97502 13.5999C2.97502 11.8799 3.42786 10.7206 4.17091 9.9883C4.91536 9.25463 6.02674 8.87499 7.49995 8.87499C8.97317 8.87499 10.0846 9.25463 10.8291 9.98831C11.5721 10.7206 12.025 11.8799 12.025 13.5999C12.025 13.8623 12.2376 14.0749 12.5 14.0749C12.7623 14.075 12.975 13.8623 12.975 13.6C12.975 11.72 12.4778 10.2794 11.4959 9.31166C10.7244 8.55135 9.70025 8.12903 8.50625 7.98352C10.0187 7.5474 11.125 6.15289 11.125 4.5C11.125 2.49797 9.50203 0.875 7.5 0.875ZM4.825 4.5C4.825 3.02264 6.02264 1.825 7.5 1.825C8.97736 1.825 10.175 3.02264 10.175 4.5C10.175 5.97736 8.97736 7.175 7.5 7.175C6.02264 7.175 4.825 5.97736 4.825 4.5Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "apps/docs/src/index.css",
    "content": "@import \"prism-themes/themes/prism-night-owl.min.css\";\n\nhtml {\n  scroll-padding-top: 112px;\n}\n\n#root {\n  min-height: 100%;\n}\n\n.hope-ui-dark {\n  background-color: var(--hope-colors-neutral1);\n}\n\n/* Hide scrollbar for Chrome, Safari and Opera */\n.hide-scrollbar::-webkit-scrollbar {\n  display: none;\n}\n\n/* Hide scrollbar for IE, Edge and Firefox */\n.hide-scrollbar {\n  -ms-overflow-style: none; /* IE and Edge */\n  scrollbar-width: none; /* Firefox */\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Prism.js\n * -----------------------------------------------------------------------------------------------*/\n\n.hope-ui-dark :not(pre) > code[class*=\"language-\"],\n.hope-ui-dark pre[class*=\"language-\"] {\n  background: var(--hope-colors-neutral3);\n}\n\npre[class*=\"language-\"] {\n  margin: 0;\n}\n\n.copy-to-clipboard-button {\n  position: absolute !important;\n  top: 12px !important;\n  right: 12px !important;\n  padding: 0 12px !important;\n  height: 24px;\n  border-radius: 4px !important;\n  background: var(--hope-colors-primary9) !important;\n  color: var(--hope-colors-neutral1) !important;\n  font-weight: 600 !important;\n  font-size: 14px;\n  line-height: 1;\n  cursor: pointer !important;\n}\n\n.copy-to-clipboard-button:hover {\n  background: var(--hope-colors-primary10) !important;\n  color: var(--hope-colors-neutral1) !important;\n}\n"
  },
  {
    "path": "apps/docs/src/index.tsx",
    "content": "import \"./index.css\";\n\nimport { HopeProvider, HopeThemeConfig, NotificationsProvider } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Router } from \"solid-app-router\";\nimport { render } from \"solid-js/web\";\n\nimport App from \"./App\";\n\nconst config: HopeThemeConfig = {\n  initialColorMode: \"system\",\n  components: {\n    Menu: {\n      baseStyle: {\n        content: {\n          zIndex: 10,\n        },\n      },\n    },\n    Popover: {\n      baseStyle: {\n        content: {\n          zIndex: 10,\n        },\n      },\n    },\n    Tooltip: {\n      baseStyle: {\n        zIndex: 10,\n      },\n    },\n  },\n};\n\nrender(\n  () => (\n    <Router>\n      <HopeProvider config={config}>\n        <NotificationsProvider>\n          <App />\n        </NotificationsProvider>\n      </HopeProvider>\n    </Router>\n  ),\n  document.getElementById(\"root\") as HTMLElement\n);\n\nsetTimeout(() => {\n  Prism.highlightAll();\n}, 0);\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/accordion/index.tsx",
    "content": "import {\n  Accordion,\n  AccordionButton,\n  AccordionIcon,\n  AccordionItem,\n  AccordionPanel,\n  Alert,\n  AlertDescription,\n  Anchor,\n  Button,\n  HStack,\n  Kbd,\n  ListItem,\n  Text,\n  UnorderedList,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Link } from \"solid-app-router\";\nimport { createSignal, onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { IconMinus } from \"@/icons/IconMinus\";\nimport { IconPlus } from \"@/icons/IconPlus\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function AccordionDoc() {\n  const [itemIndex, setItemIndex] = createSignal(-1);\n\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/data-entry/textarea\",\n    label: \"Textarea\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/data-display/avatar\",\n    label: \"Avatar\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#default-expanded-item\", label: \"Default expanded item\", indent: true },\n    { href: \"#expand-multiple-items\", label: \"Expand multiple items at once\", indent: true },\n    { href: \"#styling-expanded-state\", label: \"Styling the expanded state\", indent: true },\n    { href: \"#accessing-internal-state\", label: \"Accessing the internal state\", indent: true },\n    { href: \"#controlled-accordion\", label: \"Controlled accordion\", indent: true },\n    { href: \"#accessibility\", label: \"Accessibility\" },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#accordion-props\", label: \"Accordion props\", indent: true },\n    { href: \"#accordion-item-props\", label: \"AccordionItem props\", indent: true },\n    { href: \"#other-components-props\", label: \"Other components props\", indent: true },\n  ];\n\n  const accordionPropItems: PropsTableItem[] = [\n    {\n      name: \"allowMultiple\",\n      description: \"If `true`, multiple accordion items can be expanded at once.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"index\",\n      description: \"The index(es) of the expanded accordion item (in controlled mode).\",\n      type: \"number | number[]\",\n    },\n    {\n      name: \"defaultIndex\",\n      description: \"The initial index(es) of the expanded accordion item (in uncontrolled mode).\",\n      type: \"number | number[]\",\n    },\n    {\n      name: \"onChange\",\n      description: \"The callback invoked when accordion items are expanded or collapsed.\",\n      type: \"(expandedIndex: number | number[]) => void\",\n    },\n  ];\n\n  const accordionItemPropItems: PropsTableItem[] = [\n    {\n      name: \"disabled\",\n      description: \"If `true`, the accordion item will be disabled.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"children\",\n      description:\n        \"The children of the accordion item. Can be a render props that exposes the internal `expanded` and `disabled` state.\",\n      type: \"JSX.Element | (props: { expanded: Accessor<boolean>; disabled: Accessor<boolean>; }) => JSX.Element\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Accordion</PageTitle>\n      <Text mb=\"$5\">\n        Accordions display a list of high-level options that can expand/collapse to reveal more\n        information.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>Accordion:</strong> The wrapper components that provides context for all its\n          children.\n        </ListItem>\n        <ListItem>\n          <strong>AccordionItem:</strong> A single accordion item.\n        </ListItem>\n        <ListItem>\n          <strong>AccordionButton:</strong> The button that toggles the expand/collapse state of the\n          accordion item. This button must be wrapped in an element with role <Code>heading</Code>.\n        </ListItem>\n        <ListItem>\n          <strong>AccordionIcon:</strong> A <Code>caret-down</Code> icon that rotates based on the\n          expanded/collapsed state.\n        </ListItem>\n        <ListItem>\n          <strong>AccordionPanel:</strong> The container for the details to be revealed.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Accordion>\n          <AccordionItem>\n            <h2>\n              <AccordionButton>\n                <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n                  Composable\n                </Text>\n                <AccordionIcon />\n              </AccordionButton>\n            </h2>\n            <AccordionPanel>\n              Compose your application interface with reusable building blocks.\n            </AccordionPanel>\n          </AccordionItem>\n\n          <AccordionItem>\n            <h2>\n              <AccordionButton>\n                <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n                  Accessible\n                </Text>\n                <AccordionIcon />\n              </AccordionButton>\n            </h2>\n            <AccordionPanel>\n              Hope UI follows WAI-ARIA standards, helping you to reach the largest audience possible\n              with less effort.\n            </AccordionPanel>\n          </AccordionItem>\n        </Accordion>\n      </Preview>\n      <SectionSubtitle id=\"default-expanded-item\">Default expanded item</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>defaultIndex</Code> prop to set an item expanded by default.\n      </Text>\n      <Preview snippet={snippets.defaultIndex} mb=\"$10\">\n        <Accordion defaultIndex={1}>\n          <AccordionItem>\n            <h2>\n              <AccordionButton>\n                <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n                  Composable\n                </Text>\n                <AccordionIcon />\n              </AccordionButton>\n            </h2>\n            <AccordionPanel>\n              Compose your application interface with reusable building blocks.\n            </AccordionPanel>\n          </AccordionItem>\n\n          <AccordionItem>\n            <h2>\n              <AccordionButton>\n                <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n                  Accessible\n                </Text>\n                <AccordionIcon />\n              </AccordionButton>\n            </h2>\n            <AccordionPanel>\n              Hope UI follows WAI-ARIA standards, helping you to reach the largest audience possible\n              with less effort.\n            </AccordionPanel>\n          </AccordionItem>\n        </Accordion>\n      </Preview>\n      <SectionSubtitle id=\"expand-multiple-items\">Expand multiple items at once</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>allowMultiple</Code> prop to permit multiple items to be expanded at once.\n      </Text>\n      <Preview snippet={snippets.allowMultiple} mb=\"$6\">\n        <Accordion allowMultiple>\n          <AccordionItem>\n            <h2>\n              <AccordionButton>\n                <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n                  Composable\n                </Text>\n                <AccordionIcon />\n              </AccordionButton>\n            </h2>\n            <AccordionPanel>\n              Compose your application interface with reusable building blocks.\n            </AccordionPanel>\n          </AccordionItem>\n\n          <AccordionItem>\n            <h2>\n              <AccordionButton>\n                <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n                  Accessible\n                </Text>\n                <AccordionIcon />\n              </AccordionButton>\n            </h2>\n            <AccordionPanel>\n              Hope UI follows WAI-ARIA standards, helping you to reach the largest audience possible\n              with less effort.\n            </AccordionPanel>\n          </AccordionItem>\n        </Accordion>\n      </Preview>\n      <Alert status=\"warning\" mb=\"$10\">\n        <AlertDescription>\n          If you pass this prop, ensure that the <Code>index</Code> or <Code>defaultIndex</Code>{\" \"}\n          prop is an array.\n        </AlertDescription>\n      </Alert>\n      <SectionSubtitle id=\"styling-expanded-state\">Styling the expanded state</SectionSubtitle>\n      <Text mb=\"$5\">\n        The <Code>AccordionButton</Code> component has <Code>aria-expanded</Code> set to{\" \"}\n        <Code>true</Code> or <Code>false</Code> depending on the state of the{\" \"}\n        <Code>AccordionItem</Code>. That means you can use the <Code>_expanded</Code> style prop to\n        style this state.\n      </Text>\n      <Preview snippet={snippets.stylingExpandedState} mb=\"$10\">\n        <Accordion>\n          <AccordionItem>\n            <h2>\n              <AccordionButton _expanded={{ bg: \"tomato\", color: \"white\" }}>\n                <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n                  Composable\n                </Text>\n                <AccordionIcon />\n              </AccordionButton>\n            </h2>\n            <AccordionPanel>\n              Compose your application interface with reusable building blocks.\n            </AccordionPanel>\n          </AccordionItem>\n        </Accordion>\n      </Preview>\n      <SectionSubtitle id=\"accessing-internal-state\">Accessing the internal state</SectionSubtitle>\n      <Text mb=\"$5\">\n        If you need access to the internal state of each accordion item, you can use a render prop.\n        It provides 2 internal state props: <Code>expanded</Code> and <Code>disabled</Code>.\n      </Text>\n      <Preview snippet={snippets.internalState} mb=\"$10\">\n        <Accordion>\n          <AccordionItem>\n            {({ expanded }) => (\n              <>\n                <h2>\n                  <AccordionButton>\n                    <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n                      Composable\n                    </Text>\n                    <AccordionIcon fontSize=\"1em\" as={expanded() ? IconMinus : IconPlus} />\n                  </AccordionButton>\n                </h2>\n                <AccordionPanel>\n                  Compose your application interface with reusable building blocks.\n                </AccordionPanel>\n              </>\n            )}\n          </AccordionItem>\n        </Accordion>\n      </Preview>\n      <SectionSubtitle id=\"controlled-accordion\">Controlled accordion</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>index</Code> and <Code>onChange</Code> props to control the{\" \"}\n        <Code>Accordion</Code>.\n      </Text>\n      <Preview snippet={snippets.controlled} mb=\"$12\">\n        <HStack spacing=\"$4\" mb=\"$4\">\n          <Button variant=\"subtle\" colorScheme=\"neutral\" onClick={() => setItemIndex(0)}>\n            Open item 1\n          </Button>\n          <Button variant=\"subtle\" colorScheme=\"neutral\" onClick={() => setItemIndex(1)}>\n            Open item 2\n          </Button>\n        </HStack>\n        <Accordion index={itemIndex()} onChange={value => setItemIndex(value as number)}>\n          <AccordionItem>\n            <h2>\n              <AccordionButton>\n                <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n                  Composable\n                </Text>\n                <AccordionIcon />\n              </AccordionButton>\n            </h2>\n            <AccordionPanel>\n              Compose your application interface with reusable building blocks.\n            </AccordionPanel>\n          </AccordionItem>\n\n          <AccordionItem>\n            <h2>\n              <AccordionButton>\n                <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n                  Accessible\n                </Text>\n                <AccordionIcon />\n              </AccordionButton>\n            </h2>\n            <AccordionPanel>\n              Hope UI follows WAI-ARIA standards, helping you to reach the largest audience possible\n              with less effort.\n            </AccordionPanel>\n          </AccordionItem>\n        </Accordion>\n      </Preview>\n      <SectionTitle id=\"accessibility\">Accessibility</SectionTitle>\n      <SectionSubtitle>ARIA roles and attributes</SectionSubtitle>\n      <UnorderedList spacing=\"$2\" mb=\"$8\">\n        <ListItem>\n          Each <Code>AccordionButton</Code> should be wrapped in an element with role{\" \"}\n          <Code>heading</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>AccordionButton</Code> as <Code>role</Code> set to <Code>button</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>AccordionButton</Code> as <Code>aria-controls</Code> set to the <Code>id</Code> of\n          its associated <Code>AccordionPanel</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>AccordionButton</Code> as <Code>aria-expanded</Code> set to <Code>true</Code> when\n          its associated <Code>AccordionPanel</Code> is expanded, <Code>false</Code> otherwise.\n        </ListItem>\n        <ListItem>\n          <Code>AccordionPanel</Code> as <Code>role</Code> set to <Code>region</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>AccordionPanel</Code> as <Code>aria-labelledby</Code> set to the <Code>id</Code> of\n          its associated <Code>AccordionButton</Code>.\n        </ListItem>\n      </UnorderedList>\n      <SectionSubtitle>Keyboard support</SectionSubtitle>\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <Kbd>↑</Kbd> moves focus to the previous accordion button.\n        </ListItem>\n        <ListItem>\n          <Kbd>↓</Kbd> moves focus to the next accordion button.\n        </ListItem>\n        <ListItem>\n          <Kbd>home</Kbd> moves focus to the first accordion button.\n        </ListItem>\n        <ListItem>\n          <Kbd>end</Kbd> moves focus to the last accordion button.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Accordion</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"accordion-props\">Accordion props</SectionSubtitle>\n      <PropsTable items={accordionPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"accordion-item-props\">AccordionItem props</SectionSubtitle>\n      <PropsTable items={accordionItemPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"other-components-props\">Other components props</SectionSubtitle>\n      <UnorderedList spacing=\"$2\">\n        <ListItem>\n          <Code>AccordionButton</Code> and <Code>AccordionPanel</Code> composes{\" \"}\n          <Anchor\n            as={Link}\n            href=\"/docs/layout/box\"\n            external\n            color=\"$primary11\"\n            fontWeight=\"$semibold\"\n          >\n            Box\n          </Anchor>\n          .\n        </ListItem>\n        <ListItem>\n          <Code>AccordionIcon</Code> composes{\" \"}\n          <Anchor\n            as={Link}\n            href=\"/docs/data-display/icon\"\n            external\n            color=\"$primary11\"\n            fontWeight=\"$semibold\"\n          >\n            Icon\n          </Anchor>\n          .\n        </ListItem>\n      </UnorderedList>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/accordion/snippets.ts",
    "content": "const importComponent = `import { \n  Accordion,\n  AccordionItem,\n  AccordionButton,\n  AccordionIcon,\n  AccordionPanel,\n} from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Accordion>\n  <AccordionItem>\n    <h2>\n      <AccordionButton>\n        <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n          Composable\n        </Text>\n        <AccordionIcon />\n      </AccordionButton>\n    </h2>\n    <AccordionPanel>\n      Compose your application interface with reusable building blocks.\n    </AccordionPanel>\n  </AccordionItem>\n\n  <AccordionItem>\n    <h2>\n      <AccordionButton>\n        <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n          Accessible\n        </Text>\n        <AccordionIcon />\n      </AccordionButton>\n    </h2>\n    <AccordionPanel>\n      Hope UI follows WAI-ARIA standards, \n      helping you to reach the largest audience possible with less effort.\n    </AccordionPanel>\n  </AccordionItem>\n</Accordion>`;\n\nconst defaultIndex = `<Accordion defaultIndex={1}>\n  <AccordionItem>\n    <h2>\n      <AccordionButton>\n        <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n          Composable\n        </Text>\n        <AccordionIcon />\n      </AccordionButton>\n    </h2>\n    <AccordionPanel>\n      Compose your application interface with reusable building blocks.\n    </AccordionPanel>\n  </AccordionItem>\n\n  <AccordionItem>\n    <h2>\n      <AccordionButton>\n        <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n          Accessible\n        </Text>\n        <AccordionIcon />\n      </AccordionButton>\n    </h2>\n    <AccordionPanel>\n      Hope UI follows WAI-ARIA standards, \n      helping you to reach the largest audience possible with less effort.\n    </AccordionPanel>\n  </AccordionItem>\n</Accordion>`;\n\nconst allowMultiple = `<Accordion allowMultiple>\n  <AccordionItem>\n    <h2>\n      <AccordionButton>\n        <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n          Composable\n        </Text>\n        <AccordionIcon />\n      </AccordionButton>\n    </h2>\n    <AccordionPanel>\n      Compose your application interface with reusable building blocks.\n    </AccordionPanel>\n  </AccordionItem>\n\n  <AccordionItem>\n    <h2>\n      <AccordionButton>\n        <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n          Accessible\n        </Text>\n        <AccordionIcon />\n      </AccordionButton>\n    </h2>\n    <AccordionPanel>\n      Hope UI follows WAI-ARIA standards, \n      helping you to reach the largest audience possible with less effort.\n    </AccordionPanel>\n  </AccordionItem>\n</Accordion>`;\n\nconst stylingExpandedState = `<Accordion>\n  <AccordionItem>\n    <h2>\n      <AccordionButton _expanded={{ bg: \"tomato\", color: \"white\" }}>\n        <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n          Composable\n        </Text>\n        <AccordionIcon />\n      </AccordionButton>\n    </h2>\n    <AccordionPanel>\n      Compose your application interface with reusable building blocks.\n    </AccordionPanel>\n  </AccordionItem>\n</Accordion>`;\n\nconst internalState = `<Accordion>\n  <AccordionItem>\n    {({ expanded }) => (\n      <>\n        <h2>\n          <AccordionButton>\n            <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n              Composable\n            </Text>\n            <AccordionIcon \n              fontSize=\"1em\" \n              as={expanded() ? IconMinus : IconPlus} \n            />\n          </AccordionButton>\n        </h2>\n        <AccordionPanel>\n          Compose your application interface with reusable building blocks.\n        </AccordionPanel>\n      </>\n    )}\n  </AccordionItem>\n</Accordion>`;\n\nconst controlled = `function ControlledExample() {\n  const [itemIndex, setItemIndex] = createSignal(-1);\n\n  return (\n    <>\n      <HStack spacing=\"$4\" mb=\"$4\">\n        <Button \n          variant=\"subtle\" \n          colorScheme=\"neutral\" \n          onClick={() => setItemIndex(0)}\n        >\n          Open item 1\n        </Button>\n        <Button \n          variant=\"subtle\" \n          colorScheme=\"neutral\" \n          onClick={() => setItemIndex(1)}\n        >\n          Open item 2\n        </Button>\n      </HStack>\n      <Accordion \n        index={itemIndex()} \n        onChange={value => setItemIndex(value as number)}\n      >\n        <AccordionItem>\n          <h2>\n            <AccordionButton>\n              <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n                Composable\n              </Text>\n              <AccordionIcon />\n            </AccordionButton>\n          </h2>\n          <AccordionPanel>\n            Compose your application interface with reusable building blocks.\n          </AccordionPanel>\n        </AccordionItem>\n\n        <AccordionItem>\n          <h2>\n            <AccordionButton>\n              <Text flex={1} fontWeight=\"$medium\" textAlign=\"start\">\n                Accessible\n              </Text>\n              <AccordionIcon />\n            </AccordionButton>\n          </h2>\n          <AccordionPanel>\n            Hope UI follows WAI-ARIA standards, \n            helping you to reach the largest audience possible with less effort.\n          </AccordionPanel>\n        </AccordionItem>\n      </Accordion>\n    </>\n  );\n}`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Accordion: {\n      baseStyle: {\n        root: SystemStyleObject,\n        item: SystemStyleObject,\n        button: SystemStyleObject,\n        icon: SystemStyleObject,\n        panel: SystemStyleObject,\n      },\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  defaultIndex,\n  allowMultiple,\n  stylingExpandedState,\n  internalState,\n  controlled,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/avatar/index.tsx",
    "content": "import {\n  Alert,\n  AlertDescription,\n  Avatar,\n  AvatarBadge,\n  AvatarExcess,\n  AvatarGroup,\n  hope,\n  HStack,\n  ListItem,\n  Text,\n  UnorderedList,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { IconUser } from \"@/icons/IconUser\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function AvatarDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/data-display/accordion\",\n    label: \"Accordion\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/data-display/badge\",\n    label: \"Badge\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#sizes\", label: \"Avatar sizes\", indent: true },\n    { href: \"#fallbacks\", label: \"Avatar fallbacks\", indent: true },\n    { href: \"#custom-fallback\", label: \"Customize the fallback avatar\", indent: true },\n    { href: \"#with-badge\", label: \"Avatar with badge\", indent: true },\n    { href: \"#avatar-group\", label: \"AvatarGroup\", indent: true },\n    { href: \"#change-initials-logic\", label: \"Changing the initials logic\", indent: true },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#avatar-props\", label: \"Avatar props\", indent: true },\n    { href: \"#avatar-group-props\", label: \"AvatarGroup props\", indent: true },\n  ];\n\n  const avatarPropItems: PropsTableItem[] = [\n    {\n      name: \"size\",\n      description: \"The size of the avatar.\",\n      type: '\"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"full\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"withBorder\",\n      description:\n        \"If `true`, the Avatar will show a border around it. Best for a group of avatars.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"name\",\n      description:\n        \"The name of the person in the avatar. If `src` has loaded, the name will be used as the `alt` attribute of the `img`. If `src` is not loaded, the name will be used to create the initials\",\n      type: \"string\",\n    },\n    {\n      name: \"src\",\n      description: \"The image url of the `Avatar`.\",\n      type: \"string\",\n    },\n    {\n      name: \"srcSet\",\n      description: \"List of sources to use for different screen resolutions.\",\n      type: \"string\",\n    },\n    {\n      name: \"icon\",\n      description: \"The default avatar used as fallback when `name`, and `src` is not specified.\",\n      type: \"(props: AvatarIconProps) => JSX.Element\",\n    },\n    {\n      name: \"iconLabel\",\n      description:\n        \"The `aria-label` to use with the default avatar icon when no `name` is provided.\",\n      type: \"string\",\n    },\n    {\n      name: \"loading\",\n      description: \"The image loading strategy.\",\n      type: '\"eager\" | \"lazy\"',\n    },\n    {\n      name: \"ignoreFallback\",\n      description: \"If `true`, opt out of the avatar's `fallback` logic.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"getInitials\",\n      description: \"Function to get the initials to display.\",\n      type: \"(name: string) => string\",\n    },\n    {\n      name: \"onError\",\n      description: \"Function called when image failed to load.\",\n      type: \"JSX.EventHandlerUnion<HTMLImageElement, Event>\",\n    },\n    {\n      name: \"imageProps\",\n      description: \"Props to be passed to the AvatarImage\",\n      type: \"ImageProps\",\n    },\n  ];\n\n  const avatarGroupPropItems: PropsTableItem[] = [\n    {\n      name: \"size\",\n      description: \"The size of the avatars.\",\n      type: '\"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"full\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"spacing\",\n      description: \"The space between the avatars in the group.\",\n      type: 'ResponsiveValue<MarginProps[\"margin\"]>',\n      defaultValue: \"-1em\",\n    },\n    {\n      name: \"avatarBorderRadius\",\n      description: \"The `border-radius` of the avatars.\",\n      type: 'ResponsiveValue<RadiiProps[\"borderRadius\"]>',\n    },\n    {\n      name: \"avatarBorderColor\",\n      description: \"The `border-color` of the avatars.\",\n      type: 'ResponsiveValue<BorderProps[\"borderColor\"]>',\n    },\n    {\n      name: \"avatarBorderWidth\",\n      description: \"The `border-width` of the avatars.\",\n      type: 'ResponsiveValue<BorderProps[\"borderWidth\"]>',\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Avatar</PageTitle>\n      <Text mb=\"$5\">\n        The <Code>Avatar</Code> component is used to represent a user, and displays the profile\n        picture, initials or fallback icon.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>Avatar:</strong> The image that represents the user.\n        </ListItem>\n        <ListItem>\n          <strong>AvatarBadge:</strong> A wrapper that displays its content on the right corner of\n          the avatar.\n        </ListItem>\n        <ListItem>\n          <strong>AvatarGroup:</strong> A wrapper to stack multiple Avatars together.\n        </ListItem>\n        <ListItem>\n          <strong>AvatarExcess:</strong> The number of non-displayed avatars in a group.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$5\"></Text>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <HStack wrap=\"wrap\" spacing=\"$4\">\n          <Avatar name=\"Hector Rhodes\" src=\"https://bit.ly/3pWHo72\" />\n          <Avatar name=\"Isabella Mckinney\" src=\"https://bit.ly/3tRVozX\" />\n          <Avatar name=\"Courtney Watson\" src=\"https://bit.ly/3w2rgom\" />\n          <Avatar name=\"Alberto Sanchez\" src=\"https://bit.ly/3q1WqrX\" />\n          <Avatar name=\"Nicole Steeves\" src=\"https://bit.ly/37dJ0m7\" />\n          <Avatar name=\"Micheal Dunn\" src=\"https://bit.ly/3t5O04P\" />\n          <Avatar name=\"Wanda Fisher\" src=\"https://bit.ly/35N1hXl\" />\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"sizes\">Avatar sizes</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>size</Code> prop to change the size of the Avatar. You can set the value to{\" \"}\n        <Code>2xs</Code>, <Code>xs</Code>, <Code>sm</Code>, <Code>md</Code>, <Code>lg</Code>,{\" \"}\n        <Code>xl</Code> or <Code>2xl</Code>.\n      </Text>\n      <Preview snippet={snippets.sizes} mb=\"$10\">\n        <HStack alignItems=\"flex-start\" wrap=\"wrap\" spacing=\"$4\">\n          <Avatar size=\"2xs\" name=\"Hector Rhodes\" src=\"https://bit.ly/3pWHo72\" />\n          <Avatar size=\"xs\" name=\"Isabella Mckinney\" src=\"https://bit.ly/3tRVozX\" />\n          <Avatar size=\"sm\" name=\"Courtney Watson\" src=\"https://bit.ly/3w2rgom\" />\n          <Avatar size=\"md\" name=\"Alberto Sanchez\" src=\"https://bit.ly/3q1WqrX\" />\n          <Avatar size=\"lg\" name=\"Nicole Steeves\" src=\"https://bit.ly/37dJ0m7\" />\n          <Avatar size=\"xl\" name=\"Micheal Dunn\" src=\"https://bit.ly/3t5O04P\" />\n          <Avatar size=\"2xl\" name=\"Wanda Fisher\" src=\"https://bit.ly/35N1hXl\" />\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"fallbacks\">Avatar fallbacks</SectionSubtitle>\n      <Text mb=\"$2\">\n        If there is an error loading the <Code>src</Code> of the avatar, there are 2 fallbacks:\n      </Text>\n      <hope.ul ps=\"$6\" mb=\"$5\">\n        <hope.li mb=\"$2\">\n          If there's a <Code>name</Code> prop, we use it to generate the initials.\n        </hope.li>\n        <hope.li>\n          If there's no <Code>name</Code> prop, we use a default avatar.\n        </hope.li>\n      </hope.ul>\n      <Preview snippet={snippets.fallbacks} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Avatar name=\"Monkey D. Luffy\" src=\"broken-link\" />\n          <Avatar src=\"broken-link\" />\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"custom-fallback\">Customize the fallback avatar</SectionSubtitle>\n      <Text mb=\"$2\">\n        You can customize the background color and icon of the fallback avatar icon to match your\n        design requirements.\n      </Text>\n      <hope.ul ps=\"$6\" mb=\"$5\">\n        <hope.li mb=\"$2\">\n          To update the background, pass the usual <Code>bg</Code> prop.\n        </hope.li>\n        <hope.li>\n          To update the icon svg, pass the <Code>icon</Code> prop.\n        </hope.li>\n      </hope.ul>\n      <Preview snippet={snippets.customFallbacks} mb=\"$5\">\n        <HStack spacing=\"$4\">\n          <Avatar bg=\"$danger9\" icon={props => <IconUser fontSize=\"1.5rem\" {...props} />} />\n          <Avatar bg=\"$primary9\" />\n        </HStack>\n      </Preview>\n      <Alert status=\"warning\" mb=\"$10\">\n        <AlertDescription>\n          <Code>icon</Code> is a render prop that provides proper <Code>role</Code> and{\" \"}\n          <Code>aria-label</Code> attributes to use in your custom icon.\n        </AlertDescription>\n      </Alert>\n      <SectionSubtitle id=\"with-badge\">Avatar with badge</SectionSubtitle>\n      <Text mb=\"$5\">\n        In some products, you might need to show a badge on the right corner of the avatar. We call\n        this a <strong>badge</strong>. Here's an example that shows if the user is online:\n      </Text>\n      <Preview snippet={snippets.withBadge} mb=\"$5\">\n        <HStack spacing=\"$4\">\n          <Avatar>\n            <AvatarBadge boxSize=\"1.25em\" bg=\"$success9\" />\n          </Avatar>\n          <Avatar>\n            <AvatarBadge borderColor=\"papayawhip\" bg=\"tomato\" boxSize=\"1.25em\" />\n          </Avatar>\n        </HStack>\n      </Preview>\n      <Alert status=\"warning\" mb=\"$10\">\n        <AlertDescription>\n          Note the use of <Code>em</Code> for the size of the <Code>AvatarBadge</Code>. This is\n          useful to size the badge relative to the avatar font size.\n        </AlertDescription>\n      </Alert>\n      <SectionSubtitle id=\"avatar-group\">AvatarGroup</SectionSubtitle>\n      <Text mb=\"$2\">\n        In some cases, you might need to stack avatars as a group. Use the <Code>AvatarGroup</Code>{\" \"}\n        component.\n      </Text>\n      <hope.ul ps=\"$6\" mb=\"$5\">\n        <hope.li mb=\"$2\">\n          To size all the avatars equally, pass the <Code>size</Code> prop.\n        </hope.li>\n        <hope.li mb=\"$2\">\n          To adjust the spacing between the avatars, pass the <Code>spacing</Code> prop.\n        </hope.li>\n        <hope.li>\n          To set a remaining avatars number, use the <Code>AvatarExcess</Code> component.\n        </hope.li>\n      </hope.ul>\n      <Preview snippet={snippets.avatarGroup} mb=\"$10\">\n        <AvatarGroup>\n          <Avatar name=\"Hector Rhodes\" src=\"https://bit.ly/3pWHo72\" />\n          <Avatar name=\"Isabella Mckinney\" src=\"https://bit.ly/3tRVozX\" />\n          <AvatarExcess>+3</AvatarExcess>\n        </AvatarGroup>\n      </Preview>\n      <SectionSubtitle id=\"change-initials-logic\">Changing the initials logic</SectionSubtitle>\n      <Text mb=\"$12\">\n        Use the <Code>getInitials</Code> prop to manage how initials are generated from name. By\n        default Hope UI merge the first characters of each word in the <Code>name</Code> prop.\n      </Text>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Avatar</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"avatar-props\">Avatar props</SectionSubtitle>\n      <PropsTable items={avatarPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"avatar-group-props\">AvatarGroup props</SectionSubtitle>\n      <PropsTable items={avatarGroupPropItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/avatar/snippets.ts",
    "content": "const importComponent = `import { \n  Avatar, \n  AvatarBadge, \n  AvatarGroup,\n  AvatarExcess\n} from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<HStack wrap=\"wrap\" spacing=\"$4\">\n  <Avatar name=\"Hector Rhodes\" src=\"https://bit.ly/3pWHo72\" />\n  <Avatar name=\"Isabella Mckinney\" src=\"https://bit.ly/3tRVozX\" />\n  <Avatar name=\"Courtney Watson\" src=\"https://bit.ly/3w2rgom\" />\n  <Avatar name=\"Alberto Sanchez\" src=\"https://bit.ly/3q1WqrX\" />\n  <Avatar name=\"Nicole Steeves\" src=\"https://bit.ly/37dJ0m7\" />\n  <Avatar name=\"Micheal Dunn\" src=\"https://bit.ly/3t5O04P\" />\n  <Avatar name=\"Wanda Fisher\" src=\"https://bit.ly/35N1hXl\" />\n</HStack>`;\n\nconst sizes = `<HStack alignItems=\"flex-start\" wrap=\"wrap\" spacing=\"$4\">\n  <Avatar size=\"2xs\" name=\"Hector Rhodes\" src=\"https://bit.ly/3pWHo72\" />\n  <Avatar size=\"xs\" name=\"Isabella Mckinney\" src=\"https://bit.ly/3tRVozX\" />\n  <Avatar size=\"sm\" name=\"Courtney Watson\" src=\"https://bit.ly/3w2rgom\" />\n  <Avatar size=\"md\" name=\"Alberto Sanchez\" src=\"https://bit.ly/3q1WqrX\" />\n  <Avatar size=\"lg\" name=\"Nicole Steeves\" src=\"https://bit.ly/37dJ0m7\" />\n  <Avatar size=\"xl\" name=\"Micheal Dunn\" src=\"https://bit.ly/3t5O04P\" />\n  <Avatar size=\"2xl\" name=\"Wanda Fisher\" src=\"https://bit.ly/35N1hXl\" />\n</HStack>`;\n\nconst fallbacks = `<HStack spacing=\"$4\">\n  <Avatar name=\"Monkey D. Luffy\" src=\"broken-link\" />\n  <Avatar src=\"broken-link\" />\n</HStack>`;\n\nconst customFallbacks = `<HStack spacing=\"$4\">\n  <Avatar \n    bg=\"$danger9\" \n    icon={props => <IconUser fontSize=\"1.5rem\" {...props} />} \n  />\n  <Avatar bg=\"$primary9\" />\n</HStack>`;\n\nconst withBadge = `<HStack spacing=\"$4\">\n  <Avatar>\n    <AvatarBadge boxSize=\"1.25em\" bg=\"$success9\" />\n  </Avatar>\n\n  {/* You can also change the borderColor and bg of the badge */}\n  <Avatar>\n    <AvatarBadge borderColor=\"papayawhip\" bg=\"tomato\" boxSize=\"1.25em\" />\n  </Avatar>\n</HStack>`;\n\nconst avatarGroup = `<AvatarGroup>\n  <Avatar name=\"Hector Rhodes\" src=\"https://bit.ly/3pWHo72\" />\n  <Avatar name=\"Isabella Mckinney\" src=\"https://bit.ly/3tRVozX\" />\n  <AvatarExcess>+3</AvatarExcess>\n</AvatarGroup>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Avatar: {\n      baseStyle: {\n        root: SystemStyleObject,\n        group: SystemStyleObject,\n        image: SystemStyleObject,\n        initials: SystemStyleObject,\n        badge: SystemStyleObject,\n        excess: SystemStyleObject,\n      },\n      defaultProps: {\n        root: ThemeableAvatarOptions,\n        group: ThemeableAvatarGroupOptions,\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  sizes,\n  fallbacks,\n  customFallbacks,\n  withBadge,\n  avatarGroup,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/badge/index.tsx",
    "content": "import { Badge, HStack, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function BadgeDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/data-display/avatar\",\n    label: \"Avatar\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/data-display/icon\",\n    label: \"Icon\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#colors\", label: \"Badge colors\", indent: true },\n    { href: \"#variants\", label: \"Badge variants\", indent: true },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"variant\",\n      description: \"The visual style of the badge.\",\n      type: '\"solid\" | \"subtle\" | \"outline\"',\n      defaultValue: '\"subtle\"',\n    },\n    {\n      name: \"colorScheme\",\n      description: \"The color of the badge.\",\n      type: '\"primary\" | \"accent\" | \"neutral\" | \"success\" | \"info\" | \"warning\" | \"danger\"',\n      defaultValue: '\"neutral\"',\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Badge</PageTitle>\n      <Text mb=\"$5\">Badges are used to highlight an item's status for quick recognition.</Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$12\">\n        <Badge>Badge</Badge>\n      </Preview>\n      <SectionSubtitle id=\"colors\">Badge colors</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>colorScheme</Code> prop to change the color of the Badge. You can set the\n        value to <Code>primary</Code>, <Code>accent</Code>, <Code>neutral</Code>,{\" \"}\n        <Code>success</Code>, <Code>info</Code>, <Code>warning</Code> or <Code>danger</Code>.\n      </Text>\n      <Preview snippet={snippets.colors} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Badge colorScheme=\"primary\">Badge</Badge>\n          <Badge colorScheme=\"accent\">Badge</Badge>\n          <Badge colorScheme=\"neutral\">Badge</Badge>\n          <Badge colorScheme=\"success\">Badge</Badge>\n          <Badge colorScheme=\"info\">Badge</Badge>\n          <Badge colorScheme=\"warning\">Badge</Badge>\n          <Badge colorScheme=\"danger\">Badge</Badge>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"variants\">Badge variants</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>variant</Code> prop to change the visual style of the Badge. You can set the\n        value to <Code>solid</Code>, <Code>subtle</Code> or <Code>outline</Code>.\n      </Text>\n      <Preview snippet={snippets.variants} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Badge variant=\"solid\">Badge</Badge>\n          <Badge variant=\"subtle\">Badge</Badge>\n          <Badge variant=\"outline\">Badge</Badge>\n        </HStack>\n      </Preview>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Badge</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/badge/snippets.ts",
    "content": "const importComponent = `import { Badge } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Badge>Badge</Badge>`;\n\nconst colors = `<HStack spacing=\"$4\">\n  <Badge colorScheme=\"primary\">Badge</Badge>\n  <Badge colorScheme=\"accent\">Badge</Badge>\n  <Badge colorScheme=\"neutral\">Badge</Badge>\n  <Badge colorScheme=\"success\">Badge</Badge>\n  <Badge colorScheme=\"info\">Badge</Badge>\n  <Badge colorScheme=\"warning\">Badge</Badge>\n  <Badge colorScheme=\"danger\">Badge</Badge>\n</HStack>`;\n\nconst variants = `<HStack spacing=\"$4\">\n  <Badge variant=\"solid\">Badge</Badge>\n  <Badge variant=\"subtle\">Badge</Badge>\n  <Badge variant=\"outline\">Badge</Badge>\n</HStack>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Badge: {\n      baseStyle: SystemStyleObject,\n      defaultProps: ThemeableBadgeOptions\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  colors,\n  variants,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/icon/index.tsx",
    "content": "import { Anchor, createIcon, hope, HStack, Icon, IconProps, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nfunction CircleIcon(props: IconProps) {\n  return (\n    <Icon viewBox=\"0 0 200 200\" {...props}>\n      <path fill=\"currentColor\" d=\"M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0\" />\n    </Icon>\n  );\n}\n\nexport default function IconDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/data-display/badge\",\n    label: \"Badge\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/data-display/image\",\n    label: \"Image\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#using-third-party-icon-library\", label: \"Using a third-party icon library\" },\n    { href: \"#creating-custom-icons\", label: \"Creating your custom icons\" },\n    { href: \"#using-icon-component\", label: \"Using the `Icon` component\", indent: true },\n    { href: \"#using-create-icon-function\", label: \"Using the `createIcon` function\", indent: true },\n    { href: \"#tips\", label: \"Tips for generating your own icons\", indent: true },\n    { href: \"#fallback-icon\", label: \"Fallback icon\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#icon-props\", label: \"Icon props\", indent: true },\n    { href: \"#create-icon-options\", label: \"createIcon options\", indent: true },\n  ];\n\n  const iconPropItems: PropsTableItem[] = [\n    {\n      name: \"viewBox\",\n      description: \"The viewBox of the icon.\",\n      type: \"string\",\n      defaultValue: \"0 0 24 24\",\n    },\n    {\n      name: \"boxSize\",\n      description: \"The size (width and height) of the icon.\",\n      type: \"string\",\n      defaultValue: \"1em\",\n    },\n    {\n      name: \"color\",\n      description: \"The color of the icon.\",\n      type: \"string\",\n      defaultValue: \"currentColor\",\n    },\n  ];\n\n  const createIconPropItems: PropsTableItem[] = [\n    {\n      name: \"viewBox\",\n      description: \"The viewBox of the icon.\",\n      type: \"string\",\n      defaultValue: \"0 0 24 24\",\n    },\n    {\n      name: \"path\",\n      description: \"A function that return the `svg` path or group element.\",\n      type: \"() => JSX.Element | JSX.Element[]\",\n    },\n    {\n      name: \"defaultProps\",\n      description: \"Default props automatically passed to the component; overwriteable.\",\n      type: \"IconProps\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Icon</PageTitle>\n      <Text mb=\"$5\">\n        The <Code>Icon</Code> component is used to render <Code>svg</Code>.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"using-third-party-icon-library\">\n        Using a third-party icon library\n      </SectionTitle>\n      <Text mb=\"$3\">To use third-party icon libraries, here are the steps:</Text>\n      <hope.ul ps=\"$6\" mb=\"$5\">\n        <hope.li mb=\"$2\">\n          Import the <Code>Icon</Code> component from <Code>@hope-ui/solid</Code>.\n        </hope.li>\n        <hope.li>\n          Pass the desired third party icon into the <Code>as</Code> prop.\n        </hope.li>\n      </hope.ul>\n      <CodeSnippet snippet={snippets.usingThirdPartyIconLibrary} mb=\"$12\"></CodeSnippet>\n      <SectionTitle id=\"creating-custom-icons\">Creating your custom icons</SectionTitle>\n      <Text mb=\"$3\">Hope UI provides two methods for creating your custom icons:</Text>\n      <hope.ul ps=\"$6\" mb=\"$5\">\n        <hope.li mb=\"$2\">\n          Using the <Code>Icon</Code> component.\n        </hope.li>\n        <hope.li>\n          Using the <Code>createIcon</Code> function.\n        </hope.li>\n      </hope.ul>\n      <Text mb=\"$5\">\n        They can be imported from <Code>@hope-ui/solid</Code>:\n      </Text>\n      <CodeSnippet snippet={snippets.importIconAndCreateIcon} mb=\"$10\" />\n      <SectionSubtitle id=\"using-icon-component\">\n        Using the <Code>Icon</Code> component\n      </SectionSubtitle>\n      <Text mb=\"$5\">\n        The <Code>Icon</Code> component renders as an <Code>svg</Code> element.\n      </Text>\n      <Preview snippet={snippets.customIconWithIconComponent} mb=\"$8\">\n        <Icon viewBox=\"0 0 200 200\" color=\"$danger9\">\n          <path\n            fill=\"currentColor\"\n            d=\"M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0\"\n          />\n        </Icon>\n      </Preview>\n      <Text mb=\"$5\">This enables you to define your own custom icon components:</Text>\n      <CodeSnippet snippet={snippets.customIconAsComponent} mb=\"$8\" />\n      <Text mb=\"$5\">And style them with style props:</Text>\n      <Preview snippet={snippets.customIconAsComponentUsage} mb=\"$10\">\n        <HStack>\n          <CircleIcon />\n          <CircleIcon boxSize=\"$6\" />\n          <CircleIcon boxSize=\"$8\" color=\"$danger9\" />\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"using-create-icon-function\">\n        Using the <Code>createIcon</Code> function\n      </SectionSubtitle>\n      <Text mb=\"$5\">\n        The <Code>createIcon</Code> function is a convenience wrapper around the process of\n        generating icons with <Code>Icon</Code>, allowing you to achieve the same functionality with\n        less effort.\n      </Text>\n      <CodeSnippet snippet={snippets.createIconExample} mb=\"$10\" />\n      <SectionSubtitle id=\"tips\">Tips for generating your own icons</SectionSubtitle>\n      <hope.ul ps=\"$6\" mb=\"$12\">\n        <hope.li mb=\"$2\">\n          Export icons as <Code>svg</Code> from{\" \"}\n          <Anchor href=\"https://www.figma.com/\" external color=\"$primary11\" fontWeight=\"$semibold\">\n            Figma\n          </Anchor>\n          ,{\" \"}\n          <Anchor href=\"https://www.sketch.com/\" external color=\"$primary11\" fontWeight=\"$semibold\">\n            Sketch\n          </Anchor>\n          , etc.\n        </hope.li>\n        <hope.li mb=\"$2\">\n          Use a tool like{\" \"}\n          <Anchor\n            href=\"https://jakearchibald.github.io/svgomg/\"\n            external\n            color=\"$primary11\"\n            fontWeight=\"$semibold\"\n          >\n            SvgOmg\n          </Anchor>{\" \"}\n          to reduce the size and minify the markup.\n        </hope.li>\n        <hope.li>\n          To use the <Code>color</Code> style prop, set the <Code>fill</Code> or <Code>stroke</Code>{\" \"}\n          prop of your svg <Code>path</Code> to <Code>currentColor</Code>.\n        </hope.li>\n      </hope.ul>\n      <SectionTitle id=\"fallback-icon\">Fallback icon</SectionTitle>\n      <Text mb=\"$5\">\n        When <Code>children</Code> is not provided, the <Code>Icon</Code> component renders a\n        fallback icon.\n      </Text>\n      <Preview snippet={snippets.fallbackIcon} mb=\"$12\">\n        <Icon />\n      </Preview>\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Icon</Code> render an <Code>svg</Code>, you can use any <Code>svg</Code> attributes.\n      </Text>\n      <SectionSubtitle id=\"icon-props\">\n        <Code>Icon</Code> props\n      </SectionSubtitle>\n      <PropsTable items={iconPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"create-icon-options\">\n        <Code>createIcon</Code> options\n      </SectionSubtitle>\n      <PropsTable items={createIconPropItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/icon/snippets.ts",
    "content": "const importComponent = `import { Icon } from \"@hope-ui/solid\"`;\n\nconst usingThirdPartyIconLibrary = `// 1. Import\nimport { Icon } from \"@hope-ui/solid\"\nimport { SettingsIcon } from \"some-icon-library\"\n\n// 2. Use the \\`as\\` prop\nfunction Example() {\n  return <Icon as={SettingsIcon} />\n}`;\n\nconst importIconAndCreateIcon = `import { Icon, createIcon } from \"@hope-ui/solid\"`;\n\nconst customIconWithIconComponent = `<Icon viewBox=\"0 0 200 200\" color=\"$danger9\">\n  <path\n    fill=\"currentColor\"\n    d=\"M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0\"\n  />\n</Icon>`;\n\nconst customIconAsComponent = `function CircleIcon(props: IconProps) {\n  return (\n    <Icon viewBox=\"0 0 200 200\" {...props}>\n      <path \n        fill=\"currentColor\" \n        d=\"M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0\" \n      />\n    </Icon>\n  );\n}`;\n\nconst customIconAsComponentUsage = `<HStack>\n  {/* The default icon size is 1em (16px) */}\n  <CircleIcon />\n\n  {/* Use the \\`boxSize\\` prop to change the icon size */}\n  <CircleIcon boxSize=\"$6\" />\n\n  {/* Use the \\`color\\` prop to change the icon color */}\n  <CircleIcon boxSize=\"$8\" color=\"$danger9\" />\n</HStack>`;\n\nconst createIconExample = `import { createIcon } from \"@hope-ui/solid\"\n\nexport const CircleIcon = createIcon({\n  viewBox: \"0 0 200 200\",\n  // path is a function that returns JSX\n  path: () => (\n    <path\n      fill=\"currentColor\"\n      d=\"M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0\"\n    />\n  ),\n})\n`;\n\nconst fallbackIcon = `<Icon />`;\n\nexport const snippets = {\n  importComponent,\n  usingThirdPartyIconLibrary,\n  importIconAndCreateIcon,\n  customIconWithIconComponent,\n  customIconAsComponent,\n  customIconAsComponentUsage,\n  createIconExample,\n  fallbackIcon,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/image/index.tsx",
    "content": "import { hope, HStack, Image, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function ImageDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/data-display/icon\",\n    label: \"Icon\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/data-display/kbd\",\n    label: \"Kbd\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#image-size\", label: \"Image size\", indent: true },\n    { href: \"#image-with-border-radius\", label: \"Image with border radius\", indent: true },\n    { href: \"#image-fallback\", label: \"Image fallback\", indent: true },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"src\",\n      description: \"The image `src` attribute.\",\n      type: \"string\",\n    },\n    {\n      name: \"srcSet\",\n      description: \"The image `srcset` attribute.\",\n      type: \"string\",\n    },\n    {\n      name: \"sizes\",\n      description: \" The image `sizes` attribute.\",\n      type: \"string\",\n    },\n    {\n      name: \"crossOrigin\",\n      description:\n        \"The key used to set the crossOrigin on the HTMLImageElement into which the image will be loaded. This tells the browser to request cross-origin access when trying to download the image data.\",\n      type: '\"\" | \"anonymous\" | \"use-credentials\"',\n    },\n    {\n      name: \"loading\",\n      description: \"The image loading strategy.\",\n      type: '\"eager\" | \"lazy\"',\n    },\n    {\n      name: \"fallbackSrc\",\n      description:\n        \"Fallback image `src` to show if image is loading or image fails. Using a local image is recommended.\",\n      type: \"string\",\n    },\n    {\n      name: \"fallback\",\n      description: \"Fallback element to show if image is loading or image fails.\",\n      type: \"JSX.Element\",\n    },\n    {\n      name: \"ignoreFallback\",\n      description: \"If `true`, opt out of the `fallbackSrc` logic.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"align\",\n      description:\n        \"How to align the image within its bounds. It maps to css `object-position` property.\",\n      type: \"Property.ObjectPosition\",\n    },\n    {\n      name: \"fit\",\n      description: \"How the image to fit within its bounds. It maps to css `object-fit` property.\",\n      type: \"Property.ObjectFit\",\n    },\n    {\n      name: \"onLoad\",\n      description: \"A callback for when the image `src` has been loaded.\",\n      type: \"JSX.EventHandlerUnion<HTMLImageElement, Event>\",\n    },\n    {\n      name: \"onError\",\n      description: \"A callback for when there was an error loading the image `src`.\",\n      type: \"JSX.EventHandlerUnion<HTMLImageElement, Event>\",\n    },\n    {\n      name: \"htmlWidth\",\n      description: \"The native HTML `width` attribute to the passed to the `img`\",\n      type: \"string | number\",\n    },\n    {\n      name: \"htmlHeight\",\n      description: \"The native HTML `height` attribute to the passed to the `img`\",\n      type: \"string | number\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Image</PageTitle>\n      <Text mb=\"$5\">\n        The <Code>Image</Code> component is used to display images.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Image boxSize=\"$sm\" src=\"https://bit.ly/3pq0AcS\" alt=\"Monkey D. Luffy\" objectFit=\"cover\" />\n      </Preview>\n      <SectionSubtitle id=\"image-size\">Image size</SectionSubtitle>\n      <Text mb=\"$5\">\n        The size of the image can be adjusted using the <Code>boxSize</Code> prop.\n      </Text>\n      <Preview snippet={snippets.size} mb=\"$10\">\n        <HStack alignItems=\"flex-start\" spacing=\"$4\">\n          <Image\n            boxSize=\"100px\"\n            src=\"https://bit.ly/3pq0AcS\"\n            alt=\"Monkey D. Luffy\"\n            objectFit=\"cover\"\n          />\n          <Image\n            boxSize=\"150px\"\n            src=\"https://bit.ly/3pq0AcS\"\n            alt=\"Monkey D. Luffy\"\n            objectFit=\"cover\"\n          />\n          <Image\n            boxSize=\"200px\"\n            src=\"https://bit.ly/3pq0AcS\"\n            alt=\"Monkey D. Luffy\"\n            objectFit=\"cover\"\n          />\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"image-with-border-radius\">Image with border radius</SectionSubtitle>\n      <Text mb=\"$5\">\n        The radius of the image can be adjusted using the <Code>borderRadius</Code> prop.\n      </Text>\n      <Preview snippet={snippets.borderRadius} mb=\"$10\">\n        <Image\n          boxSize=\"150px\"\n          borderRadius=\"$full\"\n          src=\"https://bit.ly/3pq0AcS\"\n          alt=\"Monkey D. Luffy\"\n          objectFit=\"cover\"\n        />\n      </Preview>\n      <SectionSubtitle id=\"image-fallback\">Image fallback</SectionSubtitle>\n      <Text mb=\"$2\">\n        The <Code>Image</Code> component allows you provide a fallback placeholder. The placeholder\n        is displayed when:\n      </Text>\n      <hope.ul ps=\"$6\" mb=\"$5\">\n        <hope.li mb=\"$2\">\n          The <Code>fallback</Code> or <Code>fallbackSrc</Code> prop is provided.\n        </hope.li>\n        <hope.li mb=\"$2\">\n          The image provided in <Code>src</Code> is currently loading.\n        </hope.li>\n        <hope.li mb=\"$2\">\n          An error occurred while loading the image <Code>src</Code>.\n        </hope.li>\n        <hope.li>\n          No <Code>src</Code> prop was passed.\n        </hope.li>\n      </hope.ul>\n      <Text mb=\"$5\">\n        You can also opt out of this behavior by passing the <Code>ignoreFallback</Code> prop.\n      </Text>\n      <Preview snippet={snippets.fallbackSupport} mb=\"$12\">\n        <Image src=\"gibberish.png\" fallbackSrc=\"https://via.placeholder.com/150\" />\n      </Preview>\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/image/snippets.ts",
    "content": "const importComponent = `import { Image } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Image \n  boxSize=\"$sm\" \n  src=\"https://bit.ly/3pq0AcS\" \n  alt=\"Monkey D. Luffy\" \n  objectFit=\"cover\"\n/>`;\n\nconst size = `<HStack alignItems=\"flex-start\" spacing=\"$4\">\n  <Image\n    boxSize=\"100px\"\n    src=\"https://bit.ly/3pq0AcS\"\n    alt=\"Monkey D. Luffy\"\n    objectFit=\"cover\"\n  />\n  <Image\n    boxSize=\"150px\"\n    src=\"https://bit.ly/3pq0AcS\"\n    alt=\"Monkey D. Luffy\"\n    objectFit=\"cover\"\n  />\n  <Image\n    boxSize=\"200px\"\n    src=\"https://bit.ly/3pq0AcS\"\n    alt=\"Monkey D. Luffy\"\n    objectFit=\"cover\"\n  />\n</HStack>`;\n\nconst borderRadius = `<Image\n  boxSize=\"150px\"\n  borderRadius=\"$full\"\n  src=\"https://bit.ly/3pq0AcS\"\n  alt=\"Monkey D. Luffy\"\n  objectFit=\"cover\"\n/>`;\n\nconst fallbackSupport = `<Image src=\"gibberish.png\" fallbackSrc=\"https://via.placeholder.com/150\" />`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  size,\n  borderRadius,\n  fallbackSupport,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/kbd/index.tsx",
    "content": "import { Kbd, ListItem, Text, UnorderedList } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function KbdDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/data-display/image\",\n    label: \"Image\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/data-display/list\",\n    label: \"List\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#guideline\", label: \"Guideline\" },\n    { href: \"#modifier\", label: \"Modifier\" },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Kbd</PageTitle>\n      <Text mb=\"$5\">\n        The keyboard key component exists to show which key or combination of keys performs a given\n        action. The action itself should be further explained in accompanying content. It renders a{\" \"}\n        <Code>kbd</Code> element.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$12\">\n        <span>\n          <Kbd>shift</Kbd> + <Kbd>H</Kbd>\n        </span>\n      </Preview>\n      <SectionTitle id=\"guideline\">Guideline</SectionTitle>\n      <Text mb=\"$3\">\n        All shortcuts should do their best to match what appears on the user’s keyboard.\n      </Text>\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>All single letters A-Z are uppercase.</ListItem>\n        <ListItem>For non-letter keys such as enter, esc and shift, stick to lowercase.</ListItem>\n        <ListItem>Use the arrow symbol as opposed to spelling things out.</ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"modifier\">Modifier</SectionTitle>\n      <Text mb=\"$5\">\n        The only punctuation you should need is the <strong>+</strong> to indicate that a\n        combination of keys will activate the shortcut.\n      </Text>\n      <Preview snippet={snippets.modifierPlus} mb=\"$10\">\n        <span>\n          <Kbd>shift</Kbd> + <Kbd>H</Kbd>\n        </span>\n      </Preview>\n      <Text mb=\"$5\">\n        For a sequence of keys where one must follow the other, write <em>\"then\"</em> in between.\n        Stick to lowercase to match the non-letter keys.\n      </Text>\n      <Preview snippet={snippets.modifierThen} mb=\"$10\">\n        <span>\n          <Kbd>shift</Kbd> then <Kbd>H</Kbd>\n        </span>\n      </Preview>\n      <Text mb=\"$5\">\n        If two different keys can execute the same action or the shortcut itself may look different\n        on the user’s keyboard, write <em>\"or\"</em> in between.\n      </Text>\n      <Preview snippet={snippets.modifierOr}>\n        <span>\n          <Kbd>alt</Kbd> or <Kbd>option</Kbd>\n        </span>\n      </Preview>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/kbd/snippets.ts",
    "content": "const importComponent = `import { Kbd } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<span>\n  <Kbd>shift</Kbd> + <Kbd>H</Kbd>\n</span>`;\n\nconst modifierPlus = `<span>\n  <Kbd>shift</Kbd> + <Kbd>H</Kbd>\n</span>`;\n\nconst modifierThen = `<span>\n  <Kbd>shift</Kbd> then <Kbd>H</Kbd>\n</span>`;\n\nconst modifierOr = `<span>\n  <Kbd>alt</Kbd> or <Kbd>option</Kbd>\n</span>`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  modifierPlus,\n  modifierThen,\n  modifierOr,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/list/index.tsx",
    "content": "import { Anchor, List, ListIcon, ListItem, OrderedList, Text, UnorderedList } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Link } from \"solid-app-router\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { IconCheck } from \"@/icons/IconCheck\";\nimport { IconCircleDashed } from \"@/icons/IconCircleDashed\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function ListDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/data-display/kbd\",\n    label: \"Kbd\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/data-display/table\",\n    label: \"Table\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#unordered-list\", label: \"Unordered List\" },\n    { href: \"#ordered-list\", label: \"Ordered List\" },\n    { href: \"#unstyled-list\", label: \"Unstyled List with icon\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#list-props\", label: \"List props\", indent: true },\n    { href: \"#other-components-props\", label: \"Other components props\", indent: true },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"spacing\",\n      description: \"The space between each list item.\",\n      type: 'ResponsiveValue<MarginProps[\"margin\"]>',\n    },\n    {\n      name: \"styleType\",\n      description: \"Shorthand for the `list-style-type` css property.\",\n      type: \"Property.ListStyleType\",\n    },\n    {\n      name: \"stylePosition\",\n      description: \"Shorthand for the `list-style-position` css property.\",\n      type: \"Property.ListStylePosition\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>List</PageTitle>\n      <Text mb=\"$5\">\n        <Code>List</Code> component is used to display list items. It renders a <Code>ul</Code>{\" \"}\n        element by default.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"unordered-list\">Unordered List</SectionTitle>\n      <Preview snippet={snippets.unorderedList} mb=\"$12\">\n        <UnorderedList>\n          <ListItem>Clone or download repository from GitHub</ListItem>\n          <ListItem>Install dependencies with npm</ListItem>\n          <ListItem>To start development server run npm start command</ListItem>\n          <ListItem>Run tests to make sure your changes do not break the build</ListItem>\n          <ListItem>Submit a pull request once you are done</ListItem>\n        </UnorderedList>\n      </Preview>\n      <SectionTitle id=\"ordered-list\">Ordered List</SectionTitle>\n      <Preview snippet={snippets.orderedList} mb=\"$12\">\n        <OrderedList>\n          <ListItem>Clone or download repository from GitHub</ListItem>\n          <ListItem>Install dependencies with npm</ListItem>\n          <ListItem>To start development server run npm start command</ListItem>\n          <ListItem>Run tests to make sure your changes do not break the build</ListItem>\n          <ListItem>Submit a pull request once you are done</ListItem>\n        </OrderedList>\n      </Preview>\n      <SectionTitle id=\"unstyled-list\">Unstyled List with icon</SectionTitle>\n      <Text mb=\"$5\">\n        Add icons to the list items by using the <Code>ListIcon</Code> component. The size of the\n        icon is relative to the font size of the list item.\n      </Text>\n      <Preview snippet={snippets.unstyledListWithIcon} mb=\"$12\">\n        <List spacing=\"$3\">\n          <ListItem>\n            <ListIcon as={IconCheck} color=\"$success9\" />\n            Clone or download repository from GitHub\n          </ListItem>\n          <ListItem>\n            <ListIcon as={IconCheck} color=\"$success9\" />\n            Install dependencies with npm\n          </ListItem>\n          <ListItem>\n            <ListIcon as={IconCheck} color=\"$success9\" />\n            To start development server run npm start command\n          </ListItem>\n          <ListItem>\n            <ListIcon as={IconCheck} color=\"$success9\" />\n            Run tests to make sure your changes do not break the build\n          </ListItem>\n          <ListItem>\n            <ListIcon as={IconCircleDashed} color=\"$info9\" />\n            Submit a pull request once you are done\n          </ListItem>\n        </List>\n      </Preview>\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"list-props\">List props</SectionSubtitle>\n      <PropsTable items={propItems} mb=\"$10\" />\n      <SectionSubtitle id=\"other-components-props\">Other components props</SectionSubtitle>\n      <UnorderedList spacing=\"$2\">\n        <ListItem>\n          <Code>ListItem</Code> composes{\" \"}\n          <Anchor as={Link} href=\"/docs/layout/box\" color=\"$primary11\" fontWeight=\"$semibold\">\n            Box\n          </Anchor>{\" \"}\n          component.\n        </ListItem>\n        <ListItem>\n          <Code>ListIcon</Code> composes{\" \"}\n          <Anchor\n            as={Link}\n            href=\"/docs/data-display/icon\"\n            color=\"$primary11\"\n            fontWeight=\"$semibold\"\n          >\n            Icon\n          </Anchor>{\" \"}\n          component.\n        </ListItem>\n      </UnorderedList>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/list/snippets.ts",
    "content": "const importComponent = `import { \n  List,\n  ListItem,\n  ListIcon,\n  OrderedList,\n  UnorderedList,\n} from \"@hope-ui/solid\"`;\n\nconst unorderedList = `<UnorderedList>\n  <ListItem>Clone or download repository from GitHub</ListItem>\n  <ListItem>Install dependencies with npm</ListItem>\n  <ListItem>To start development server run npm start command</ListItem>\n  <ListItem>Run tests to make sure your changes do not break the build</ListItem>\n  <ListItem>Submit a pull request once you are done</ListItem>\n</UnorderedList>`;\n\nconst orderedList = `<OrderedList>\n  <ListItem>Clone or download repository from GitHub</ListItem>\n  <ListItem>Install dependencies with npm</ListItem>\n  <ListItem>To start development server run npm start command</ListItem>\n  <ListItem>Run tests to make sure your changes do not break the build</ListItem>\n  <ListItem>Submit a pull request once you are done</ListItem>\n</OrderedList>`;\n\nconst unstyledListWithIcon = `<List spacing=\"$3\">\n  <ListItem>\n    <ListIcon as={IconCheck} color=\"$success9\" />\n    Clone or download repository from GitHub\n  </ListItem>\n  <ListItem>\n    <ListIcon as={IconCheck} color=\"$success9\" />\n    Install dependencies with npm\n  </ListItem>\n  <ListItem>\n    <ListIcon as={IconCheck} color=\"$success9\" />\n    To start development server run npm start command\n  </ListItem>\n  <ListItem>\n    <ListIcon as={IconCheck} color=\"$success9\" />\n    Run tests to make sure your changes do not break the build\n  </ListItem>\n  <ListItem>\n    <ListIcon as={IconCircleDashed} color=\"$info9\" />\n    Submit a pull request once you are done\n  </ListItem>\n</List>`;\n\nexport const snippets = {\n  importComponent,\n  unorderedList,\n  orderedList,\n  unstyledListWithIcon,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/table/index.tsx",
    "content": "import { Table, TableCaption, Tbody, Td, Text, Tfoot, Th, Thead, Tr } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function TableDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/data-display/list\",\n    label: \"List\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/data-display/tag\",\n    label: \"Tag\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#striped\", label: \"Striped table\", indent: true },\n    { href: \"#dense\", label: \"Dense table\", indent: true },\n    { href: \"#row-highlight\", label: \"Row highlight\", indent: true },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#table-props\", label: \"Table props\", indent: true },\n    { href: \"#table-caption-props\", label: \"TableCaption props\", indent: true },\n    { href: \"#th-props\", label: \"Th props\", indent: true },\n    { href: \"#td-props\", label: \"Td props\", indent: true },\n  ];\n\n  const tablePropItems: PropsTableItem[] = [\n    {\n      name: \"striped\",\n      description: \"Set a neutral background color on odd or even row of table.\",\n      type: '\"odd\" | \"even\"',\n    },\n    {\n      name: \"dense\",\n      description: \"If `true`, row will have less padding and smaller font size.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"highlightOnHover\",\n      description: \"If `true`, row will have hover color.\",\n      type: \"boolean\",\n    },\n  ];\n\n  const tableCaptionPropItems: PropsTableItem[] = [\n    {\n      name: \"placement\",\n      description:\n        \"The placement of the table caption. This sets the `caption-side` CSS attribute.\",\n      type: '\"top\" | \"bottom\"',\n      defaultValue: '\"bottom\"',\n    },\n  ];\n\n  const thPropItems: PropsTableItem[] = [\n    {\n      name: \"numeric\",\n      description: \"Aligns the cell content to the right.\",\n      type: \"boolean\",\n    },\n  ];\n\n  const tdPropItems: PropsTableItem[] = [\n    {\n      name: \"numeric\",\n      description: \"Aligns the cell content to the right.\",\n      type: \"boolean\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Table</PageTitle>\n      <Text mb=\"$5\">\n        Tables are used to organize and display data efficiently. It renders a <Code>table</Code>{\" \"}\n        element by default.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$12\">\n        <Table>\n          <TableCaption>Imperial to metric conversion factors</TableCaption>\n          <Thead>\n            <Tr>\n              <Th>To convert</Th>\n              <Th>into</Th>\n              <Th numeric>multiply by</Th>\n            </Tr>\n          </Thead>\n          <Tbody>\n            <Tr>\n              <Td>inches</Td>\n              <Td>millimetres (mm)</Td>\n              <Td numeric>25.4</Td>\n            </Tr>\n            <Tr>\n              <Td>feet</Td>\n              <Td>centimetres (cm)</Td>\n              <Td numeric>30.48</Td>\n            </Tr>\n            <Tr>\n              <Td>yards</Td>\n              <Td>metres (m)</Td>\n              <Td numeric>0.91444</Td>\n            </Tr>\n          </Tbody>\n          <Tfoot>\n            <Tr>\n              <Th>To convert</Th>\n              <Th>into</Th>\n              <Th numeric>multiply by</Th>\n            </Tr>\n          </Tfoot>\n        </Table>\n      </Preview>\n      <SectionTitle id=\"striped\">Striped table</SectionTitle>\n      <Text mb=\"$5\">\n        Use the <Code>striped</Code> prop to render striped rows. You can set the value to{\" \"}\n        <Code>even</Code> or <Code>odd</Code>.\n      </Text>\n      <Preview snippet={snippets.striped} mb=\"$12\">\n        <Table striped=\"odd\">\n          <TableCaption>Imperial to metric conversion factors</TableCaption>\n          <Thead>\n            <Tr>\n              <Th>To convert</Th>\n              <Th>into</Th>\n              <Th numeric>multiply by</Th>\n            </Tr>\n          </Thead>\n          <Tbody>\n            <Tr>\n              <Td>inches</Td>\n              <Td>millimetres (mm)</Td>\n              <Td numeric>25.4</Td>\n            </Tr>\n            <Tr>\n              <Td>feet</Td>\n              <Td>centimetres (cm)</Td>\n              <Td numeric>30.48</Td>\n            </Tr>\n            <Tr>\n              <Td>yards</Td>\n              <Td>metres (m)</Td>\n              <Td numeric>0.91444</Td>\n            </Tr>\n          </Tbody>\n          <Tfoot>\n            <Tr>\n              <Th>To convert</Th>\n              <Th>into</Th>\n              <Th numeric>multiply by</Th>\n            </Tr>\n          </Tfoot>\n        </Table>\n      </Preview>\n      <SectionTitle id=\"dense\">Dense table</SectionTitle>\n      <Text mb=\"$5\">\n        Use the <Code>dense</Code> prop to reduce the table size.\n      </Text>\n      <Preview snippet={snippets.dense} mb=\"$12\">\n        <Table dense>\n          <TableCaption>Imperial to metric conversion factors</TableCaption>\n          <Thead>\n            <Tr>\n              <Th>To convert</Th>\n              <Th>into</Th>\n              <Th numeric>multiply by</Th>\n            </Tr>\n          </Thead>\n          <Tbody>\n            <Tr>\n              <Td>inches</Td>\n              <Td>millimetres (mm)</Td>\n              <Td numeric>25.4</Td>\n            </Tr>\n            <Tr>\n              <Td>feet</Td>\n              <Td>centimetres (cm)</Td>\n              <Td numeric>30.48</Td>\n            </Tr>\n            <Tr>\n              <Td>yards</Td>\n              <Td>metres (m)</Td>\n              <Td numeric>0.91444</Td>\n            </Tr>\n          </Tbody>\n          <Tfoot>\n            <Tr>\n              <Th>To convert</Th>\n              <Th>into</Th>\n              <Th numeric>multiply by</Th>\n            </Tr>\n          </Tfoot>\n        </Table>\n      </Preview>\n      <SectionTitle id=\"row-highlight\">Row highlight</SectionTitle>\n      <Text mb=\"$5\">\n        Use the <Code>highlightOnHover</Code> prop to highlight row on hover.\n      </Text>\n      <Preview snippet={snippets.highlightOnHover} mb=\"$12\">\n        <Table highlightOnHover>\n          <TableCaption>Imperial to metric conversion factors</TableCaption>\n          <Thead>\n            <Tr>\n              <Th>To convert</Th>\n              <Th>into</Th>\n              <Th numeric>multiply by</Th>\n            </Tr>\n          </Thead>\n          <Tbody>\n            <Tr>\n              <Td>inches</Td>\n              <Td>millimetres (mm)</Td>\n              <Td numeric>25.4</Td>\n            </Tr>\n            <Tr>\n              <Td>feet</Td>\n              <Td>centimetres (cm)</Td>\n              <Td numeric>30.48</Td>\n            </Tr>\n            <Tr>\n              <Td>yards</Td>\n              <Td>metres (m)</Td>\n              <Td numeric>0.91444</Td>\n            </Tr>\n          </Tbody>\n          <Tfoot>\n            <Tr>\n              <Th>To convert</Th>\n              <Th>into</Th>\n              <Th numeric>multiply by</Th>\n            </Tr>\n          </Tfoot>\n        </Table>\n      </Preview>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Table</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"table-props\">Table props</SectionSubtitle>\n      <PropsTable items={tablePropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"table-caption-props\">TableCaption props</SectionSubtitle>\n      <PropsTable items={tableCaptionPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"th-props\">Th props</SectionSubtitle>\n      <PropsTable items={thPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"td-props\">Td props</SectionSubtitle>\n      <PropsTable items={tdPropItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/table/snippets.ts",
    "content": "const importComponent = `import { \n  Table,\n  TableCaption,\n  Thead,\n  Tbody,\n  Tfoot,\n  Tr,\n  Th,\n  Td\n} from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Table>\n  <TableCaption>Imperial to metric conversion factors</TableCaption>\n  <Thead>\n    <Tr>\n      <Th>To convert</Th>\n      <Th>into</Th>\n      <Th numeric>multiply by</Th>\n    </Tr>\n  </Thead>\n  <Tbody>\n    <Tr>\n      <Td>inches</Td>\n      <Td>millimetres (mm)</Td>\n      <Td numeric>25.4</Td>\n    </Tr>\n    <Tr>\n      <Td>feet</Td>\n      <Td>centimetres (cm)</Td>\n      <Td numeric>30.48</Td>\n    </Tr>\n    <Tr>\n      <Td>yards</Td>\n      <Td>metres (m)</Td>\n      <Td numeric>0.91444</Td>\n    </Tr>\n  </Tbody>\n  <Tfoot>\n    <Tr>\n      <Th>To convert</Th>\n      <Th>into</Th>\n      <Th numeric>multiply by</Th>\n    </Tr>\n  </Tfoot>\n</Table>`;\n\nconst striped = `<Table striped=\"odd\">\n  <TableCaption>Imperial to metric conversion factors</TableCaption>\n  <Thead>\n    <Tr>\n      <Th>To convert</Th>\n      <Th>into</Th>\n      <Th numeric>multiply by</Th>\n    </Tr>\n  </Thead>\n  <Tbody>\n    <Tr>\n      <Td>inches</Td>\n      <Td>millimetres (mm)</Td>\n      <Td numeric>25.4</Td>\n    </Tr>\n    <Tr>\n      <Td>feet</Td>\n      <Td>centimetres (cm)</Td>\n      <Td numeric>30.48</Td>\n    </Tr>\n    <Tr>\n      <Td>yards</Td>\n      <Td>metres (m)</Td>\n      <Td numeric>0.91444</Td>\n    </Tr>\n  </Tbody>\n  <Tfoot>\n    <Tr>\n      <Th>To convert</Th>\n      <Th>into</Th>\n      <Th numeric>multiply by</Th>\n    </Tr>\n  </Tfoot>\n</Table>`;\n\nconst dense = `<Table dense>\n  <TableCaption>Imperial to metric conversion factors</TableCaption>\n  <Thead>\n    <Tr>\n      <Th>To convert</Th>\n      <Th>into</Th>\n      <Th numeric>multiply by</Th>\n    </Tr>\n  </Thead>\n  <Tbody>\n    <Tr>\n      <Td>inches</Td>\n      <Td>millimetres (mm)</Td>\n      <Td numeric>25.4</Td>\n    </Tr>\n    <Tr>\n      <Td>feet</Td>\n      <Td>centimetres (cm)</Td>\n      <Td numeric>30.48</Td>\n    </Tr>\n    <Tr>\n      <Td>yards</Td>\n      <Td>metres (m)</Td>\n      <Td numeric>0.91444</Td>\n    </Tr>\n  </Tbody>\n  <Tfoot>\n    <Tr>\n      <Th>To convert</Th>\n      <Th>into</Th>\n      <Th numeric>multiply by</Th>\n    </Tr>\n  </Tfoot>\n</Table>`;\n\nconst highlightOnHover = `<Table highlightOnHover>\n  <TableCaption>Imperial to metric conversion factors</TableCaption>\n  <Thead>\n    <Tr>\n      <Th>To convert</Th>\n      <Th>into</Th>\n      <Th numeric>multiply by</Th>\n    </Tr>\n  </Thead>\n  <Tbody>\n    <Tr>\n      <Td>inches</Td>\n      <Td>millimetres (mm)</Td>\n      <Td numeric>25.4</Td>\n    </Tr>\n    <Tr>\n      <Td>feet</Td>\n      <Td>centimetres (cm)</Td>\n      <Td numeric>30.48</Td>\n    </Tr>\n    <Tr>\n      <Td>yards</Td>\n      <Td>metres (m)</Td>\n      <Td numeric>0.91444</Td>\n    </Tr>\n  </Tbody>\n  <Tfoot>\n    <Tr>\n      <Th>To convert</Th>\n      <Th>into</Th>\n      <Th numeric>multiply by</Th>\n    </Tr>\n  </Tfoot>\n</Table>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Table: {\n      baseStyle: {\n        root: SystemStyleObject,\n        caption: SystemStyleObject,\n        thead: SystemStyleObject,\n        tbody: SystemStyleObject,\n        tfoot: SystemStyleObject,\n        tr: SystemStyleObject,\n        th: SystemStyleObject,\n        td: SystemStyleObject,\n      },\n      defaultProps: {\n        root: TableOptions,\n        caption: ThemeableTableCaptionOptions,\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  striped,\n  dense,\n  highlightOnHover,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/tag/index.tsx",
    "content": "import {\n  hope,\n  HStack,\n  Tag,\n  TagCloseButton,\n  TagLabel,\n  TagLeftIcon,\n  TagProps,\n  TagRightIcon,\n  Text,\n  VStack,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { For, onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { IconGear } from \"@/icons/IconGear\";\nimport { IconPlus } from \"@/icons/IconPlus\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function TagDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/data-display/table\",\n    label: \"Table\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/navigation/anchor\",\n    label: \"Anchor\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#colors\", label: \"Tag colors\", indent: true },\n    { href: \"#sizes\", label: \"Tag sizes\", indent: true },\n    { href: \"#variants\", label: \"Tag variants\", indent: true },\n    { href: \"#with-icon\", label: \"Tag with icon\", indent: true },\n    { href: \"#with-close-button\", label: \"Tag with close button\", indent: true },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"variant\",\n      description: \"The visual style of the tag.\",\n      type: '\"solid\" | \"subtle\" | \"outline\" | \"dot\"',\n      defaultValue: '\"subtle\"',\n    },\n    {\n      name: \"colorScheme\",\n      description: \"The color of the tag.\",\n      type: '\"primary\" | \"accent\" | \"neutral\" | \"success\" | \"info\" | \"warning\" | \"danger\"',\n      defaultValue: '\"neutral\"',\n    },\n    {\n      name: \"size\",\n      description: \"The size of the tag.\",\n      type: '\"sm\" | \"md\" | \"lg\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"dotPlacement\",\n      description: \"Determines the placement of the dot when `variant` is `dot`.\",\n      type: '\"start\" | \"end\"',\n      defaultValue: '\"start\"',\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Tag</PageTitle>\n      <Text mb=\"$5\">\n        <Code>Tag</Code> component is used for items that need to be labeled, categorized, or\n        organized using keywords that describe them.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <hope.ul ps=\"$6\" mb=\"$12\">\n        <hope.li mb=\"$2\">\n          <strong>Tag:</strong> The wrapper for all the tag elements.\n        </hope.li>\n        <hope.li mb=\"$2\">\n          <strong>TagLabel:</strong> The label for tag's text content.\n        </hope.li>\n        <hope.li mb=\"$2\">\n          <strong>TagLeftIcon:</strong> The icon placed on the left side of the tag.\n        </hope.li>\n        <hope.li mb=\"$2\">\n          <strong>TagRightIcon:</strong> The icon placed on the right side of the tag.\n        </hope.li>\n        <hope.li>\n          <strong>TagCloseButton:</strong> The close button for the tag.\n        </hope.li>\n      </hope.ul>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Tag>Sample Tag</Tag>\n      </Preview>\n      <SectionSubtitle id=\"colors\">Tag colors</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>colorScheme</Code> prop to change the color of the Tag You can set the value\n        to <Code>primary</Code>, <Code>accent</Code>, <Code>neutral</Code>, <Code>success</Code>,{\" \"}\n        <Code>info</Code>, <Code>warning</Code> or <Code>danger</Code>.\n      </Text>\n      <Preview snippet={snippets.colors} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Tag colorScheme=\"primary\">Tag</Tag>\n          <Tag colorScheme=\"accent\">Tag</Tag>\n          <Tag colorScheme=\"neutral\">Tag</Tag>\n          <Tag colorScheme=\"success\">Tag</Tag>\n          <Tag colorScheme=\"info\">Tag</Tag>\n          <Tag colorScheme=\"warning\">Tag</Tag>\n          <Tag colorScheme=\"danger\">Tag</Tag>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"sizes\">Tag sizes</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>size</Code> prop to change the size of the Tag You can set the value to{\" \"}\n        <Code>sm</Code>, <Code>md</Code> or <Code>lg</Code>.\n      </Text>\n      <Preview snippet={snippets.sizes} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Tag size=\"sm\">Tag</Tag>\n          <Tag size=\"md\">Tag</Tag>\n          <Tag size=\"lg\">Tag</Tag>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"variants\">Tag variants</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>variant</Code> prop to change the visual style of the Tag You can set the\n        value to <Code>solid</Code>, <Code>subtle</Code>, <Code>outline</Code> or <Code>dot</Code>.\n      </Text>\n      <Preview snippet={snippets.variants} mb=\"$8\">\n        <HStack spacing=\"$4\">\n          <Tag variant=\"solid\">Tag</Tag>\n          <Tag variant=\"subtle\">Tag</Tag>\n          <Tag variant=\"outline\">Tag</Tag>\n          <Tag variant=\"dot\" dotPlacement=\"start\">\n            Tag\n          </Tag>\n          <Tag variant=\"dot\" dotPlacement=\"end\">\n            Tag\n          </Tag>\n        </HStack>\n      </Preview>\n      <Text mb=\"$5\">Overview of all color and variant combination:</Text>\n      <Preview mb=\"$10\">\n        <VStack alignItems=\"flex-start\" spacing=\"$4\">\n          <For each={[\"solid\", \"subtle\", \"outline\", \"dot\"]}>\n            {variant => (\n              <HStack spacing=\"$4\">\n                <For\n                  each={[\"primary\", \"accent\", \"neutral\", \"success\", \"info\", \"warning\", \"danger\"]}\n                >\n                  {colorScheme => (\n                    <Tag\n                      variant={variant as TagProps[\"variant\"]}\n                      colorScheme={colorScheme as TagProps[\"colorScheme\"]}\n                    >\n                      Tag\n                    </Tag>\n                  )}\n                </For>\n              </HStack>\n            )}\n          </For>\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"with-icon\">Tag with icon</SectionSubtitle>\n      <Text mb=\"$5\">\n        You can add left and right icons to the Tag component using the <Code>TagLeftIcon</Code> and{\" \"}\n        <Code>TagRightIcon</Code> components respectively.\n      </Text>\n      <Preview snippet={snippets.withLeftIcon} mb=\"$6\">\n        <HStack spacing=\"$4\">\n          <Tag size=\"sm\">\n            <TagLeftIcon as={IconPlus} />\n            <TagLabel>Tag</TagLabel>\n          </Tag>\n          <Tag size=\"md\">\n            <TagLeftIcon as={IconPlus} />\n            <TagLabel>Tag</TagLabel>\n          </Tag>\n          <Tag size=\"lg\">\n            <TagLeftIcon as={IconPlus} />\n            <TagLabel>Tag</TagLabel>\n          </Tag>\n        </HStack>\n      </Preview>\n      <Preview snippet={snippets.withRightIcon} mb=\"$12\">\n        <HStack spacing=\"$4\">\n          <Tag size=\"sm\">\n            <TagLabel>Tag</TagLabel>\n            <TagRightIcon as={IconGear} />\n          </Tag>\n          <Tag size=\"md\">\n            <TagLabel>Tag</TagLabel>\n            <TagRightIcon as={IconGear} />\n          </Tag>\n          <Tag size=\"lg\">\n            <TagLabel>Tag</TagLabel>\n            <TagRightIcon as={IconGear} />\n          </Tag>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"with-close-button\">Tag with close button</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>TagCloseButton</Code> component to add a close button to the Tag\n      </Text>\n      <Preview snippet={snippets.withCloseButton} mb=\"$12\">\n        <HStack spacing=\"$4\">\n          <Tag size=\"sm\">\n            <TagLabel>Tag</TagLabel>\n            <TagCloseButton />\n          </Tag>\n          <Tag size=\"md\">\n            <TagLabel>Tag</TagLabel>\n            <TagCloseButton />\n          </Tag>\n          <Tag size=\"lg\">\n            <TagLabel>Tag</TagLabel>\n            <TagCloseButton />\n          </Tag>\n        </HStack>\n      </Preview>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Tag</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-display/tag/snippets.ts",
    "content": "const importComponent = `import {\n  Tag,\n  TagCloseButton,\n  TagLabel,\n  TagLeftIcon,\n  TagRightIcon,\n} from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Tag>Sample Tag</Tag>`;\n\nconst colors = `<HStack spacing=\"$4\">\n  <Tag colorScheme=\"primary\">Tag</Tag>\n  <Tag colorScheme=\"accent\">Tag</Tag>\n  <Tag colorScheme=\"neutral\">Tag</Tag>\n  <Tag colorScheme=\"success\">Tag</Tag>\n  <Tag colorScheme=\"info\">Tag</Tag>\n  <Tag colorScheme=\"warning\">Tag</Tag>\n  <Tag colorScheme=\"danger\">Tag</Tag>\n</HStack>`;\n\nconst sizes = `<HStack spacing=\"$4\">\n  <Tag size=\"sm\">Tag</Tag>\n  <Tag size=\"md\">Tag</Tag>\n  <Tag size=\"lg\">Tag</Tag>\n</HStack>`;\n\nconst variants = `<HStack spacing=\"$4\">\n  <Tag variant=\"solid\">Tag</Tag>\n  <Tag variant=\"subtle\">Tag</Tag>\n  <Tag variant=\"outline\">Tag</Tag>\n  <Tag variant=\"dot\" dotPlacement=\"start\">Tag</Tag>\n  <Tag variant=\"dot\" dotPlacement=\"end\">Tag</Tag>\n</HStack>`;\n\nconst withLeftIcon = `<HStack spacing=\"$4\">\n  <Tag size=\"sm\">\n    <TagLeftIcon as={IconPlus} />\n    <TagLabel>Tag</TagLabel>\n  </Tag>\n  <Tag size=\"md\">\n    <TagLeftIcon as={IconPlus} />\n    <TagLabel>Tag</TagLabel>\n  </Tag>\n  <Tag size=\"lg\">\n    <TagLeftIcon as={IconPlus} />\n    <TagLabel>Tag</TagLabel>\n  </Tag>\n</HStack>`;\n\nconst withRightIcon = `<HStack spacing=\"$4\">\n  <Tag size=\"sm\">\n    <TagLabel>Tag</TagLabel>\n    <TagRightIcon as={IconGear} />\n  </Tag>\n  <Tag size=\"md\">\n    <TagLabel>Tag</TagLabel>\n    <TagRightIcon as={IconGear} />\n  </Tag>\n  <Tag size=\"lg\">\n    <TagLabel>Tag</TagLabel>\n    <TagRightIcon as={IconGear} />\n  </Tag>\n</HStack>`;\n\nconst withCloseButton = `<HStack spacing=\"$4\">\n  <Tag size=\"sm\">\n    <TagLabel>Tag</TagLabel>\n    <TagCloseButton />\n  </Tag>\n  <Tag size=\"md\">\n    <TagLabel>Tag</TagLabel>\n    <TagCloseButton />\n  </Tag>\n  <Tag size=\"lg\">\n    <TagLabel>Tag</TagLabel>\n    <TagCloseButton />\n  </Tag>\n</HStack>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Tag: {\n      baseStyle: {\n        root: SystemStyleObject,\n        icon: SystemStyleObject,\n        label: SystemStyleObject,\n        closeButton: SystemStyleObject,\n      },\n      defaultProps: {\n        root: ThemeableTagOptions,\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  colors,\n  sizes,\n  variants,\n  withLeftIcon,\n  withRightIcon,\n  withCloseButton,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-entry/checkbox/index.tsx",
    "content": "import {\n  Center,\n  Checkbox,\n  CheckboxGroup,\n  CheckboxPrimitive,\n  CheckboxPrimitiveIndicator,\n  css,\n  HStack,\n  ListItem,\n  Text,\n  UnorderedList,\n  VStack,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { createSignal, For, onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { IconCheck } from \"@/icons/IconCheck\";\nimport { IconPlus } from \"@/icons/IconPlus\";\nimport { IconQuestionMark } from \"@/icons/IconQuestionMark\";\n\nimport { snippets } from \"./snippets\";\n\nconst checkboxRootStyles = css({\n  rounded: \"$md\",\n  border: \"1px solid $neutral7\",\n  shadow: \"$sm\",\n  bg: \"$loContrast\",\n  px: \"$4\",\n  py: \"$3\",\n  w: \"$full\",\n  cursor: \"pointer\",\n\n  _focus: {\n    borderColor: \"$info7\",\n    shadow: \"0 0 0 3px $colors$info5\",\n  },\n\n  _checked: {\n    borderColor: \"transparent\",\n    bg: \"#0c4a6e\",\n    color: \"white\",\n  },\n});\n\nconst checkboxIndicatorStyles = css({\n  rounded: \"$sm\",\n  border: \"1px solid $neutral7\",\n  bg: \"$whiteAlpha7\",\n  boxSize: \"$5\",\n\n  _groupChecked: {\n    borderColor: \"transparent\",\n  },\n});\n\nexport default function CheckboxDoc() {\n  const preferences = [\n    {\n      id: 1,\n      name: \"Comments\",\n      description: \"Get notified when someones posts a comment on a posting.\",\n    },\n    {\n      id: 2,\n      name: \"Candidates\",\n      description: \"Get notified when a candidate applies for a job.\",\n    },\n    {\n      id: 3,\n      name: \"Offers\",\n      description: \"Get notified when a candidate accepts or rejects an offer.\",\n    },\n  ];\n\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/typography/text\",\n    label: \"Text\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/data-entry/form-control\",\n    label: \"FormControl\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#colors\", label: \"Checkbox colors\", indent: true },\n    { href: \"#sizes\", label: \"Checkbox sizes\", indent: true },\n    { href: \"#variants\", label: \"Checkbox variants\", indent: true },\n    { href: \"#label-placement\", label: \"Checkbox label placement\", indent: true },\n    { href: \"#disabled\", label: \"Disabled state\", indent: true },\n    { href: \"#invalid\", label: \"Invalid state\", indent: true },\n    { href: \"#indeterminate\", label: \"Indeterminate state\", indent: true },\n    { href: \"#custom-icon\", label: \"Custom icon\", indent: true },\n    { href: \"#checkbox-group\", label: \"CheckboxGroup\", indent: true },\n    { href: \"#headless-api\", label: \"Headless API\" },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#checkbox-primitive-props\", label: \"CheckboxPrimitive props\", indent: true },\n    { href: \"#checkbox-props\", label: \"Checkbox props\", indent: true },\n    { href: \"#checkbox-group-props\", label: \"CheckboxGroup props\", indent: true },\n  ];\n\n  const checkboxPrimitivePropItems: PropsTableItem[] = [\n    {\n      name: \"id\",\n      description: \"The id to be passed to the internal <input> tag.\",\n      type: \"string\",\n    },\n    {\n      name: \"name\",\n      description: \"The name of the input field in a checkbox (Useful for form submission).\",\n      type: \"string\",\n    },\n    {\n      name: \"value\",\n      description:\n        \"The value to be used in the checkbox input. This is the value that will be returned on form submission.\",\n      type: \"string | number\",\n    },\n    {\n      name: \"checked\",\n      description:\n        \"If `true`, the checkbox will be checked. You'll need to pass `onChange` to update its value (since it is now controlled).\",\n      type: \"boolean\",\n    },\n    {\n      name: \"defaultChecked\",\n      description: \"If `true`, the checkbox will be initially checked.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"indeterminate\",\n      description:\n        \"If `true`, the checkbox will be indeterminate. This only affects the icon shown inside checkbox and does not modify the checked property.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"required\",\n      description:\n        \"If `true`, the checkbox is marked as required, and `required` attribute will be added\",\n      type: \"boolean\",\n    },\n    {\n      name: \"disabled\",\n      description: \"If `true`, the checkbox will be disabled.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"invalid\",\n      description: \"If `true`, the checkbox will have `aria-invalid` set to `true`.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"readOnly\",\n      description: \"If `true`, the checkbox will be readonly.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"children\",\n      description:\n        \"The children of the checkbox. If used as a render props, the internal state will be passed.\",\n      type: \"JSX.Element | (props: { state: Accessor<CheckboxState> }) => JSX.Element\",\n    },\n    {\n      name: \"onChange\",\n      description: \"The callback invoked when the checked state of the `Checkbox` changes.\",\n      type: \"JSX.EventHandlerUnion<HTMLInputElement, Event>\",\n    },\n    {\n      name: \"onFocus\",\n      description: \"The callback invoked when the checkbox is focused.\",\n      type: \"JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>\",\n    },\n    {\n      name: \"onBlur\",\n      description: \"The callback invoked when the checkbox is blurred (loses focus).\",\n      type: \"JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>\",\n    },\n  ];\n\n  const checkboxPropItems: PropsTableItem[] = [\n    {\n      name: \"variant\",\n      description: \"The visual style of the checkbox.\",\n      type: '\"outline\" | \"filled\"',\n      defaultValue: '\"outline\"',\n    },\n    {\n      name: \"colorScheme\",\n      description: \"The color of the checkbox.\",\n      type: '\"primary\" | \"accent\" | \"neutral\" | \"success\" | \"info\" | \"warning\" | \"danger\"',\n      defaultValue: '\"primary\"',\n    },\n    {\n      name: \"size\",\n      description: \"The size of the checkbox.\",\n      type: '\"sm\" | \"md\" | \"lg\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"labelPlacement\",\n      description: \"The placement of the checkbox label.\",\n      type: '\"start\" | \"end\"',\n      defaultValue: '\"end\"',\n    },\n    {\n      name: \"iconChecked\",\n      description: \"The icon to use when the checkbox is checked.\",\n      type: \"JSX.Element\",\n    },\n    {\n      name: \"iconIndeterminate\",\n      description: \"The icon to use when the checkbox is in indeterminate state.\",\n      type: \"JSX.Element\",\n    },\n    {\n      name: \"children\",\n      description: \"The children of the checkbox.\",\n      type: \"JSX.Element\",\n    },\n  ];\n\n  const checkboxGroupPropItems: PropsTableItem[] = [\n    {\n      name: \"variant\",\n      description: \"The visual style of the checkboxes.\",\n      type: '\"outline\" | \"filled\"',\n      defaultValue: '\"outline\"',\n    },\n    {\n      name: \"colorScheme\",\n      description: \"The color of the checkboxes.\",\n      type: '\"primary\" | \"accent\" | \"neutral\" | \"success\" | \"info\" | \"warning\" | \"danger\"',\n      defaultValue: '\"primary\"',\n    },\n    {\n      name: \"size\",\n      description: \"The size of the checkboxes.\",\n      type: '\"sm\" | \"md\" | \"lg\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"labelPlacement\",\n      description: \"The placement of the checkboxes labels.\",\n      type: '\"start\" | \"end\"',\n      defaultValue: '\"end\"',\n    },\n    {\n      name: \"name\",\n      description: \"The `name` attribute forwarded to each `checkbox` element.\",\n      type: \"string\",\n    },\n    {\n      name: \"value\",\n      description: \"The value of the checkbox group (in controlled mode).\",\n      type: \"(string | number)[]\",\n    },\n    {\n      name: \"defaultValue\",\n      description: \"The initial value of the checkbox group (in uncontrolled mode).\",\n      type: \"(string | number)[]\",\n    },\n    {\n      name: \"required\",\n      description:\n        \"If `true`, all wrapped checkbox inputs will be marked as required, and `required` attribute will be added.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"disabled\",\n      description: \"If `true`, all wrapped checkbox inputs will be disabled.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"invalid\",\n      description: \"If `true`, all wrapped checkbox inputs will have `aria-invalid` set to `true`.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"readOnly\",\n      description: \"If `true`, all wrapped checkbox inputs will be readonly.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"onChange\",\n      description: \"The callback invoked when a checkbox is checked.\",\n      type: \"(value: (string | number)[]) => void\",\n    },\n  ];\n\n  const [checkedItems, setCheckedItems] = createSignal([false, false]);\n\n  const allChecked = () => checkedItems().every(Boolean);\n  const isIndeterminate = () => checkedItems().some(Boolean) && !allChecked();\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Checkbox</PageTitle>\n      <Text mb=\"$5\">\n        The <Code>Checkbox</Code> component is used in forms when a user needs to select multiple\n        values from several options.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>CheckboxPrimitive:</strong> Unstyled component containing all the parts of a\n          checkbox. It renders a <Code>label</Code> and a visualy hidden <Code>input</Code> with\n          type set to <Code>checkbox</Code>.\n        </ListItem>\n        <ListItem>\n          <strong>CheckboxPrimitiveIndicator:</strong> Unstyled component rendered when the{\" \"}\n          <Code>CheckboxPrimitive</Code> is in a <Code>checked</Code> or <Code>indeterminate</Code>{\" \"}\n          state.\n        </ListItem>\n        <ListItem>\n          <strong>Checkbox:</strong> The Hope UI styled checkbox component based on{\" \"}\n          <Code>CheckboxPrimitive</Code>.\n        </ListItem>\n        <ListItem>\n          <strong>CheckboxGroup:</strong> Component to help manage the checked state of its children{\" \"}\n          <Code>Checkbox</Code> components and conveniently pass a few shared style props to each.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$5\"></Text>\n      <Preview snippet={snippets.basicUsage} mb=\"$12\">\n        <Checkbox defaultChecked>Checkbox</Checkbox>\n      </Preview>\n      <SectionSubtitle id=\"colors\">Checkbox colors</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>colorScheme</Code> prop to change the color of the Checkbox. You can set the\n        value to <Code>primary</Code>, <Code>accent</Code>, <Code>neutral</Code>,{\" \"}\n        <Code>success</Code>, <Code>info</Code>, <Code>warning</Code> or <Code>danger</Code>.\n      </Text>\n      <Preview snippet={snippets.checkboxColors} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Checkbox defaultChecked colorScheme=\"primary\" />\n          <Checkbox defaultChecked colorScheme=\"accent\" />\n          <Checkbox defaultChecked colorScheme=\"neutral\" />\n          <Checkbox defaultChecked colorScheme=\"success\" />\n          <Checkbox defaultChecked colorScheme=\"info\" />\n          <Checkbox defaultChecked colorScheme=\"warning\" />\n          <Checkbox defaultChecked colorScheme=\"danger\" />\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"sizes\">Checkbox sizes</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>size</Code> prop to change the size of the Checkbox. You can set the value to{\" \"}\n        <Code>sm</Code>, <Code>md</Code> or <Code>lg</Code>.\n      </Text>\n      <Preview snippet={snippets.checkboxSizes} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Checkbox defaultChecked size=\"sm\">\n            Checkbox\n          </Checkbox>\n          <Checkbox defaultChecked size=\"md\">\n            Checkbox\n          </Checkbox>\n          <Checkbox defaultChecked size=\"lg\">\n            Checkbox\n          </Checkbox>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"variants\">Checkbox variants</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>variant</Code> prop to change the visual style of the Checkbox. You can set\n        the value to <Code>outline</Code> or <Code>filled</Code>.\n      </Text>\n      <Preview snippet={snippets.checkboxVariants} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Checkbox variant=\"outline\">Checkbox</Checkbox>\n          <Checkbox variant=\"filled\">Checkbox</Checkbox>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"label-placement\">Checkbox label placement</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>labelPlacement</Code> prop to change the placement of the label. You can set\n        the value to <Code>start</Code> or <Code>end</Code>.\n      </Text>\n      <Preview snippet={snippets.checkboxLabelPlacement} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Checkbox labelPlacement=\"start\">Checkbox</Checkbox>\n          <Checkbox labelPlacement=\"end\">Checkbox</Checkbox>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"disabled\">Disabled state</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>disabled</Code> prop to disable the Checkbox.\n      </Text>\n      <Preview snippet={snippets.checkboxDisabled} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Checkbox disabled>Checkbox</Checkbox>\n          <Checkbox variant=\"filled\" disabled>\n            Checkbox\n          </Checkbox>\n          <Checkbox defaultChecked disabled>\n            Checkbox\n          </Checkbox>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"invalid\">Invalid state</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>invalid</Code> prop to mark the Checkbox as invalid.\n      </Text>\n      <Preview snippet={snippets.checkboxInvalid} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Checkbox invalid>Checkbox</Checkbox>\n          <Checkbox variant=\"filled\" invalid>\n            Checkbox\n          </Checkbox>\n          <Checkbox defaultChecked invalid>\n            Checkbox\n          </Checkbox>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"indeterminate\">Indeterminate state</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>indeterminate</Code> prop to mark the Checkbox as indeterminate.\n      </Text>\n      <Preview snippet={snippets.checkboxIndeterminate} mb=\"$10\">\n        <Checkbox\n          checked={allChecked()}\n          indeterminate={isIndeterminate()}\n          onChange={(e: Event) =>\n            setCheckedItems([\n              (e.target as HTMLInputElement).checked,\n              (e.target as HTMLInputElement).checked,\n            ])\n          }\n        >\n          Parent Checkbox\n        </Checkbox>\n        <VStack alignItems=\"flex-start\" pl=\"$6\" mt=\"$1\" spacing=\"$1\">\n          <Checkbox\n            checked={checkedItems()[0]}\n            onChange={(e: Event) =>\n              setCheckedItems([(e.target as HTMLInputElement).checked, checkedItems()[1]])\n            }\n          >\n            Child Checkbox 1\n          </Checkbox>\n          <Checkbox\n            checked={checkedItems()[1]}\n            onChange={(e: Event) =>\n              setCheckedItems([checkedItems()[0], (e.target as HTMLInputElement).checked])\n            }\n          >\n            Child Checkbox 2\n          </Checkbox>\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"custom-icon\">Custom icon</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>iconChecked</Code> and <Code>iconIndeterminate</Code> prop on{\" \"}\n        <Code>CheckboxControl</Code> to change the Checkbox icon.\n      </Text>\n      <Preview snippet={snippets.checkboxCustomIcon} mb=\"$12\">\n        <HStack spacing=\"$4\">\n          <Checkbox defaultChecked iconChecked={<IconPlus />}>\n            Checkbox\n          </Checkbox>\n          <Checkbox indeterminate iconIndeterminate={<IconQuestionMark />}>\n            Checkbox\n          </Checkbox>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"checkbox-group\">CheckboxGroup</SectionSubtitle>\n      <Text mb=\"$5\">\n        You can use the <Code>CheckboxGroup</Code> component to manage the checked state of related{\" \"}\n        <Code>Checkbox</Code> components and conveniently pass a few shared style props to each. See\n        the props table at the bottom of this page for a list of the shared styling props.\n      </Text>\n      <Preview snippet={snippets.checkboxGroup} mb=\"$12\">\n        <CheckboxGroup colorScheme=\"success\" defaultValue={[\"luffy\", \"sanji\"]}>\n          <HStack spacing=\"$5\">\n            <Checkbox value=\"luffy\">Luffy</Checkbox>\n            <Checkbox value=\"zoro\">Zoro</Checkbox>\n            <Checkbox value=\"sanji\">Sanji</Checkbox>\n          </HStack>\n        </CheckboxGroup>\n      </Preview>{\" \"}\n      <SectionTitle id=\"headless-api\">Headless API</SectionTitle>\n      <Text mb=\"$5\">\n        Use the unstyled <Code>CheckboxPrimitive</Code> component to achieve your desired design.\n        You can pair it with your styling solution of choice. The below example uses style props and\n        the <Code>css</Code> function.\n      </Text>\n      <Preview snippet={snippets.headless} mb=\"$12\">\n        <CheckboxGroup>\n          <VStack spacing=\"$4\">\n            <For each={preferences}>\n              {preference => (\n                <CheckboxPrimitive value={preference.id} class={checkboxRootStyles()}>\n                  <HStack justifyContent=\"space-between\" w=\"$full\">\n                    <VStack alignItems=\"flex-start\">\n                      <Text size=\"sm\" fontWeight=\"$semibold\">\n                        {preference.name}\n                      </Text>\n                      <Text\n                        size=\"sm\"\n                        color=\"$neutral11\"\n                        _groupChecked={{\n                          color: \"$whiteAlpha12\",\n                        }}\n                      >\n                        {preference.description}\n                      </Text>\n                    </VStack>\n                    <Center class={checkboxIndicatorStyles()}>\n                      <CheckboxPrimitiveIndicator>\n                        <IconCheck display=\"block\" boxSize=\"$4\" />\n                      </CheckboxPrimitiveIndicator>\n                    </Center>\n                  </HStack>\n                </CheckboxPrimitive>\n              )}\n            </For>\n          </VStack>\n        </CheckboxGroup>\n      </Preview>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Checkbox</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"checkbox-primitive-props\">CheckboxPrimitive props</SectionSubtitle>\n      <PropsTable items={checkboxPrimitivePropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"checkbox-props\">Checkbox props</SectionSubtitle>\n      <Text mb=\"$5\">\n        <Code>Checkbox</Code> composes the <Code>CheckboxPrimitive</Code> component, so you can pass\n        all its props. These are props specific to the <Code>Checkbox</Code> component:\n      </Text>\n      <PropsTable items={checkboxPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"checkbox-group-props\">CheckboxGroup props</SectionSubtitle>\n      <PropsTable items={checkboxGroupPropItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-entry/checkbox/snippets.ts",
    "content": "const importComponent = `import { \n  CheckboxPrimitive,\n  CheckboxPrimitiveIndicator,\n  Checkbox, \n  CheckboxGroup\n} from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Checkbox defaultChecked>Checkbox</Checkbox>`;\n\nconst checkboxColors = `<HStack spacing=\"$4\">\n  <Checkbox defaultChecked colorScheme=\"primary\" />\n  <Checkbox defaultChecked colorScheme=\"accent\" />\n  <Checkbox defaultChecked colorScheme=\"neutral\" />\n  <Checkbox defaultChecked colorScheme=\"success\" />\n  <Checkbox defaultChecked colorScheme=\"info\" />\n  <Checkbox defaultChecked colorScheme=\"warning\" />\n  <Checkbox defaultChecked colorScheme=\"danger\" />\n</HStack>`;\n\nconst checkboxSizes = `<HStack spacing=\"$4\">\n  <Checkbox defaultChecked size=\"sm\">Checkbox</Checkbox>\n  <Checkbox defaultChecked size=\"md\">Checkbox</Checkbox>\n  <Checkbox defaultChecked size=\"lg\">Checkbox</Checkbox>\n</HStack>`;\n\nconst checkboxVariants = `<HStack spacing=\"$4\">\n  <Checkbox variant=\"outline\">Checkbox</Checkbox>\n  <Checkbox variant=\"filled\">Checkbox</Checkbox>\n</HStack>`;\n\nconst checkboxLabelPlacement = `<HStack spacing=\"$4\">\n  <Checkbox LabelPlacement=\"start\">Checkbox</Checkbox>\n  <Checkbox LabelPlacement=\"end\">Checkbox</Checkbox>\n</HStack>`;\n\nconst checkboxDisabled = `<HStack spacing=\"$4\">\n  <Checkbox disabled>Checkbox</Checkbox>\n  <Checkbox variant=\"filled\" disabled>Checkbox</Checkbox>\n  <Checkbox defaultChecked disabled>Checkbox</Checkbox>\n</HStack>`;\n\nconst checkboxInvalid = `<HStack spacing=\"$4\">\n  <Checkbox invalid>Checkbox</Checkbox>\n  <Checkbox variant=\"filled\" invalid>Checkbox</Checkbox>\n  <Checkbox defaultChecked invalid>Checkbox</Checkbox>\n</HStack>`;\n\nconst checkboxIndeterminate = `function IndeterminateExample() {\n  const [checkedItems, setCheckedItems] = createSignal([false, false]);\n\n  const allChecked = () => checkedItems().every(Boolean);\n  const isIndeterminate = () => checkedItems().some(Boolean) && !allChecked();\n  \n  return (\n    <>\n      <Checkbox\n        checked={allChecked()}\n        indeterminate={isIndeterminate()}\n        onChange={e => setCheckedItems([e.target.checked, e.target.checked])}\n      >\n        Parent Checkbox\n      </Checkbox>\n      <VStack alignItems=\"flex-start\" pl=\"$6\" mt=\"$1\" spacing=\"$1\">\n        <Checkbox\n          checked={checkedItems()[0]}\n          onChange={e => setCheckedItems([e.target.checked, checkedItems()[1]])}\n        >\n          Child Checkbox 1\n        </Checkbox>\n        <Checkbox\n          checked={checkedItems()[1]}\n          onChange={e => setCheckedItems([checkedItems()[0], e.target.checked])}\n        >\n          Child Checkbox 2\n        </Checkbox>\n      </VStack>\n    </>\n  )\n}`;\n\nconst checkboxCustomIcon = `<HStack spacing=\"$4\">\n  <Checkbox defaultChecked iconChecked={<IconPlus />}>\n    Checkbox\n  </Checkbox>\n  <Checkbox indeterminate iconIndeterminate={<IconQuestionMark />}>\n    Checkbox\n  </Checkbox>\n</HStack>`;\n\nconst checkboxGroup = `<CheckboxGroup colorScheme=\"success\" defaultValue={[\"luffy\", \"sanji\"]}>\n  <HStack spacing=\"$5\">\n    <Checkbox value=\"luffy\">Luffy</Checkbox>\n    <Checkbox value=\"zoro\">Zoro</Checkbox>\n    <Checkbox value=\"sanji\">Sanji</Checkbox>\n  </HStack>\n</CheckboxGroup>`;\n\nconst headless = `import { css } from \"@hope-ui/solid\"\n\nconst checkboxRootStyles = css({\n  rounded: \"$md\",\n  border: \"1px solid $neutral7\",\n  shadow: \"$sm\",\n  bg: \"$loContrast\",\n  px: \"$4\",\n  py: \"$3\",\n  w: \"$full\",\n  cursor: \"pointer\",\n\n  _focus: {\n    borderColor: \"$info7\",\n    shadow: \"0 0 0 3px $colors$info5\",\n  },\n\n  _checked: {\n    borderColor: \"transparent\",\n    bg: \"#0c4a6e\",\n    color: \"white\",\n  },\n});\n\nconst checkboxIndicatorStyles = css({\n  rounded: \"$sm\",\n  border: \"1px solid $neutral7\",\n  bg: \"$whiteAlpha7\",\n  boxSize: \"$5\",\n\n  _groupChecked: {\n    borderColor: \"transparent\",\n  },\n});\n\nfunction HeadlessExample() {\n  const preferences = [\n    {\n      id: 1,\n      name: \"Comments\",\n      description: \"Get notified when someones posts a comment on a posting.\",\n    },\n    {\n      id: 2,\n      name: \"Candidates\",\n      description: \"Get notified when a candidate applies for a job.\",\n    },\n    {\n      id: 3,\n      name: \"Offers\",\n      description: \"Get notified when a candidate accepts or rejects an offer.\",\n    },\n  ];\n\n  return (\n    <CheckboxGroup>\n      <VStack spacing=\"$4\">\n        <For each={preferences}>\n          {preference => (\n            <CheckboxPrimitive \n              value={preference.id} \n              class={checkboxRootStyles()}\n            >\n              <HStack justifyContent=\"space-between\" w=\"$full\">\n                <VStack alignItems=\"flex-start\">\n                  <Text size=\"sm\" fontWeight=\"$semibold\">\n                    {preference.name}\n                  </Text>\n                  <Text\n                    size=\"sm\"\n                    color=\"$neutral11\"\n                    _groupChecked={{\n                      color: \"$whiteAlpha12\",\n                    }}\n                  >\n                    {preference.description}\n                  </Text>\n                </VStack>\n                <Center class={checkboxIndicatorStyles()}>\n                  <CheckboxPrimitiveIndicator>\n                    <IconCheck display=\"block\" boxSize=\"$4\" />\n                  </CheckboxPrimitiveIndicator>\n                </Center>\n              </HStack>\n            </CheckboxPrimitive>\n          )}\n        </For>\n      </VStack>\n    </CheckboxGroup>\n  );\n}`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Checkbox: {\n      baseStyle: {\n        root: SystemStyleObject,\n        group: SystemStyleObject,\n        control: SystemStyleObject,\n        label: SystemStyleObject,\n      },\n      defaultProps: {\n        root: ThemeableCheckboxOptions,\n        group: ThemeableCheckboxOptions,\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  checkboxColors,\n  checkboxSizes,\n  checkboxVariants,\n  checkboxLabelPlacement,\n  checkboxDisabled,\n  checkboxInvalid,\n  checkboxIndeterminate,\n  checkboxCustomIcon,\n  checkboxGroup,\n  headless,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-entry/form-control/felte-example.tsx",
    "content": "import { createForm } from \"@felte/solid\";\nimport { validator } from \"@felte/validator-yup\";\nimport {\n  Button,\n  Checkbox,\n  FormControl,\n  FormErrorMessage,\n  FormHelperText,\n  FormLabel,\n  HStack,\n  Input,\n  Radio,\n  RadioGroup,\n  SimpleOption,\n  SimpleSelect,\n  Textarea,\n  VStack,\n} from \"@hope-ui/solid\";\nimport { For, Show } from \"solid-js\";\nimport type { InferType } from \"yup\";\nimport { boolean, mixed, object, string } from \"yup\";\n\nconst schema = object({\n  email: string().email().required(),\n  jobTitle: string().required(),\n  gender: mixed().oneOf([\"male\", \"female\", \"other\"]).required(),\n  bio: string().max(30),\n  subscribe: boolean(),\n});\n\nexport function FelteExample() {\n  const { form, errors, data, isValid, setFields } = createForm<InferType<typeof schema>>({\n    extend: validator({ schema }),\n    onSubmit: values => {\n      console.log(values);\n    },\n  });\n\n  return (\n    <VStack as=\"form\" ref={form} spacing=\"$5\" alignItems=\"stretch\" maxW=\"$96\" mx=\"auto\">\n      <FormControl required invalid={!!errors(\"email\")}>\n        <FormLabel>Email</FormLabel>\n        <Input type=\"email\" name=\"email\" placeholder=\"contact@hope-ui.com\" />\n        <FormErrorMessage>{errors(\"email\")[0]}</FormErrorMessage>\n      </FormControl>\n      <FormControl required invalid={!!errors(\"jobTitle\")}>\n        <FormLabel>Job title</FormLabel>\n        <SimpleSelect\n          placeholder=\"Choose a job title\"\n          onChange={value => setFields(\"jobTitle\", value)}\n        >\n          <For each={[\"Designer\", \"Frontend developer\", \"Backend developer\", \"Devops\"]}>\n            {item => <SimpleOption value={item}>{item}</SimpleOption>}\n          </For>\n        </SimpleSelect>\n        <FormErrorMessage>{errors(\"jobTitle\")[0]}</FormErrorMessage>\n      </FormControl>\n      <FormControl as=\"fieldset\" required invalid={!!errors(\"gender\")}>\n        <FormLabel as=\"legend\">Gender</FormLabel>\n        <RadioGroup name=\"gender\">\n          <HStack spacing=\"$5\">\n            <Radio value=\"male\">Male</Radio>\n            <Radio value=\"female\">Female</Radio>\n            <Radio value=\"other\">Other</Radio>\n          </HStack>\n        </RadioGroup>\n        <FormErrorMessage>{errors(\"gender\")[0]}</FormErrorMessage>\n      </FormControl>\n      <FormControl invalid={!!errors(\"bio\")}>\n        <FormLabel>Bio</FormLabel>\n        <Textarea name=\"bio\" placeholder=\"Tell us something about yourself\" />\n        <Show\n          when={errors(\"bio\")}\n          fallback={\n            <FormHelperText w=\"$full\" textAlign=\"end\">\n              {data(\"bio\")?.length ?? 0}/30\n            </FormHelperText>\n          }\n        >\n          <FormErrorMessage>{errors(\"bio\")[0]}</FormErrorMessage>\n        </Show>\n      </FormControl>\n      <Checkbox name=\"subscribe\">Subscribe to the newsletter</Checkbox>\n      <HStack justifyContent=\"flex-end\">\n        <Button type=\"submit\" disabled={!isValid()}>\n          Submit\n        </Button>\n      </HStack>\n    </VStack>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-entry/form-control/index.tsx",
    "content": "import {\n  Alert,\n  AlertDescription,\n  Anchor,\n  FormControl,\n  FormErrorMessage,\n  FormHelperText,\n  FormLabel,\n  HStack,\n  Input,\n  ListItem,\n  Radio,\n  RadioGroup,\n  SimpleOption,\n  SimpleSelect,\n  Text,\n  UnorderedList,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { createSignal, JSX, onMount, Show } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { FelteExample } from \"./felte-example\";\nimport { snippets } from \"./snippets\";\n\nexport default function FormControlDoc() {\n  const [invalidInput, setInvalidInput] = createSignal(\"\");\n\n  const handleInvalidInput: JSX.EventHandlerUnion<HTMLInputElement, InputEvent> = event => {\n    setInvalidInput((event.target as HTMLInputElement).value);\n  };\n\n  const isInvalid = () => invalidInput() === \"\";\n\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/data-entry/checkbox\",\n    label: \"Checkbox\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/data-entry/input\",\n    label: \"Input\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#required-field\", label: \"Requied field\", indent: true },\n    { href: \"#disabled-field\", label: \"Disabled field\", indent: true },\n    { href: \"#invalid-field\", label: \"Invalid field\", indent: true },\n    {\n      href: \"#usage-with-radio-or-checkbox-group\",\n      label: \"Usage with radio or checkbox group\",\n      indent: true,\n    },\n    { href: \"#usage-with-select\", label: \"Usage with select\", indent: true },\n    { href: \"#usage-with-form-libraries\", label: \"Usage with form libraries\" },\n    { href: \"#accessibility\", label: \"Accessibility\" },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"id\",\n      description:\n        \"The custom `id` to use for the form control. This is passed directly to the form element (e.g, Input).\",\n      type: \"string\",\n    },\n    {\n      name: \"required\",\n      description:\n        \"If `true`, the form control will be required. The form element (e.g, Input) will have `aria-required` set to `true`.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"disabled\",\n      description:\n        \"If `true`, the form control will be disabled. The `FormLabel` will have `data-disabled` attribute. The form element (e.g, Input) will be disabled.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"invalid\",\n      description:\n        \"If `true`, the form control will be invalid. The `FormLabel` and `FormErrorMessage` will have `data-invalid` set to `true`. The form element (e.g, Input) will have `aria-invalid` set to `true`.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"readOnly\",\n      description: \"If `true`, the form control will be readonly.\",\n      type: \"boolean\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>FormControl</PageTitle>\n      <Text mb=\"$5\">\n        FormControl provides context such as <Code>required</Code>, <Code>disabled</Code> and{\" \"}\n        <Code>invalid</Code> to form elements. It follows the{\" \"}\n        <Anchor\n          href=\"https://www.w3.org/WAI/tutorials/forms/\"\n          external\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          WAI specifications\n        </Anchor>{\" \"}\n        for forms.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>FormControl:</strong> The wrapper that provides context and functionality for all\n          children.\n        </ListItem>\n        <ListItem>\n          <strong>FormLabel:</strong> The label of a form section. The usage is similar to html\n          label.\n        </ListItem>\n        <ListItem>\n          <strong>FormHelperText:</strong> The message that tells users more details about the form\n          section.\n        </ListItem>\n        <ListItem>\n          <strong>FormErrorMessage:</strong> The message that shows up when an error occurs.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <FormControl>\n          <FormLabel for=\"email\">Email address</FormLabel>\n          <Input id=\"email\" type=\"email\" />\n          <FormHelperText>We'll never share your email.</FormHelperText>\n        </FormControl>\n      </Preview>\n      <SectionSubtitle id=\"required-field\">Required field</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>required</Code> prop to make the form control required. The Input field will\n        have <Code>aria-required</Code> set to <Code>true</Code>, and the <Code>FormLabel</Code>{\" \"}\n        will show a red asterisk.\n      </Text>\n      <Preview snippet={snippets.required} mb=\"$10\">\n        <FormControl required>\n          <FormLabel for=\"email\">Email address</FormLabel>\n          <Input id=\"email\" type=\"email\" />\n          <FormHelperText>We'll never share your email.</FormHelperText>\n        </FormControl>\n      </Preview>\n      <SectionSubtitle id=\"disabled-field\">Disabled field</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>disabled</Code> prop to make the form control disabled.\n      </Text>\n      <Preview snippet={snippets.disabled} mb=\"$10\">\n        <FormControl disabled>\n          <FormLabel for=\"email\">Email address</FormLabel>\n          <Input id=\"email\" type=\"email\" />\n          <FormHelperText>We'll never share your email.</FormHelperText>\n        </FormControl>\n      </Preview>\n      <SectionSubtitle id=\"invalid-field\">Invalid field</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>invalid</Code> prop to make the form control invalid. the{\" \"}\n        <Code>FormErrorMessage</Code> will only show up when the <Code>invalid</Code> prop is true.\n      </Text>\n      <Preview snippet={snippets.invalid} mb=\"$10\">\n        <FormControl invalid={isInvalid()}>\n          <FormLabel for=\"email\">Email address</FormLabel>\n          <Input id=\"email\" type=\"email\" value={invalidInput()} onInput={handleInvalidInput} />\n          <Show\n            when={isInvalid()}\n            fallback={\n              <FormHelperText>\n                Enter the email you'd like to receive the newsletter on.\n              </FormHelperText>\n            }\n          >\n            <FormErrorMessage>Email is required.</FormErrorMessage>\n          </Show>\n        </FormControl>\n      </Preview>\n      <SectionSubtitle id=\"usage-with-radio-or-checkbox-group\">\n        Usage with radio or checkbox group\n      </SectionSubtitle>\n      <Preview snippet={snippets.withRadioGroup} mb=\"$10\">\n        <FormControl as=\"fieldset\">\n          <FormLabel as=\"legend\">Choose a framework</FormLabel>\n          <RadioGroup defaultValue=\"solid\">\n            <HStack spacing=\"$6\">\n              <Radio value=\"react\">React</Radio>\n              <Radio value=\"angular\" disabled>\n                Angular\n              </Radio>\n              <Radio value=\"vue\">Vue</Radio>\n              <Radio value=\"svelte\">Svelte</Radio>\n              <Radio value=\"solid\">Solid</Radio>\n            </HStack>\n          </RadioGroup>\n          <FormHelperText>You should choose Solid.</FormHelperText>\n        </FormControl>\n      </Preview>\n      <SectionSubtitle id=\"usage-with-select\">Usage with select</SectionSubtitle>\n      <Preview snippet={snippets.withSelect} mb=\"$6\">\n        <FormControl>\n          <FormLabel>Choose a framework</FormLabel>\n          <SimpleSelect placeholder=\"Choose a framework\">\n            <SimpleOption value=\"react\">React</SimpleOption>\n            <SimpleOption value=\"angular\" disabled>\n              Angular\n            </SimpleOption>\n            <SimpleOption value=\"vue\">Vue</SimpleOption>\n            <SimpleOption value=\"svelte\">Svelte</SimpleOption>\n            <SimpleOption value=\"solid\">Solid</SimpleOption>\n          </SimpleSelect>\n          <FormHelperText>You should choose Solid.</FormHelperText>\n        </FormControl>\n      </Preview>\n      <Alert status=\"warning\" mb=\"$12\">\n        <AlertDescription>\n          You can also use the more composable <Code>Select</Code> component instead of{\" \"}\n          <Code>SimpleSelect</Code>.\n        </AlertDescription>\n      </Alert>\n      <SectionTitle id=\"usage-with-form-libraries\">Usage with form libraries</SectionTitle>\n      <Text mb=\"$5\">\n        The below example demonstrate the use of <Code>FormControl</Code> and others Hope UI form\n        related components with the{\" \"}\n        <Anchor href=\"https://felte.dev\" external color=\"$primary11\" fontWeight=\"$semibold\">\n          @felte/solid\n        </Anchor>{\" \"}\n        form library paired with{\" \"}\n        <Anchor\n          href=\"https://github.com/jquense/yup\"\n          external\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          yup\n        </Anchor>{\" \"}\n        for object schema validation.\n      </Text>\n      <Preview snippet={snippets.usageWithFormLibraries} mb=\"$12\">\n        <FelteExample />\n      </Preview>\n      <SectionTitle id=\"accessibility\">Accessibility</SectionTitle>\n      <UnorderedList spacing=\"$2\" mb=\"$8\">\n        <ListItem>\n          <Code>id</Code> passed to the form control will be passed to the input directly.\n        </ListItem>\n        <ListItem>\n          <Code>FormLabel</Code> will have <Code>for</Code> pointing to the <Code>id</Code> of the\n          input.\n        </ListItem>\n        <ListItem>\n          The input will have <Code>aria-describedby</Code> pointing to the <Code>id</Code> of the{\" \"}\n          <Code>FormHelperText</Code>.\n        </ListItem>\n        <ListItem>\n          When the field is invalid, the input will have <Code>aria-invalid</Code> set to{\" \"}\n          <Code>true</Code> and <Code>aria-describedby</Code> pointing to the <Code>id</Code> of the{\" \"}\n          <Code>FormErrorMessage</Code> first.\n        </ListItem>\n        <ListItem>\n          <Code>required</Code>, <Code>disabled</Code>, <Code>invalid</Code> and{\" \"}\n          <Code>readOnly</Code> props passed to <Code>FormControl</Code> will cascade across all\n          related components.\n        </ListItem>\n      </UnorderedList>\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <Code>FormLabel</Code> is aware of the <Code>disabled</Code>, <Code>focused</Code> and{\" \"}\n          <Code>invalid</Code> state of the input. This helps you style the label accordingly using\n          the <Code>_disabled</Code>, <Code>_focus</Code>, and <Code>_invalid</Code> style props.\n        </ListItem>\n        <ListItem>\n          <Code>FormErrorMessage</Code> only renders if <Code>invalid</Code> is set to{\" \"}\n          <Code>true</Code>.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>FormControl</Code> base styles and default props can be overridden in the Hope UI\n        theme configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-entry/form-control/snippets.ts",
    "content": "const importComponent = `import { \n  FormControl,\n  FormLabel,\n  FormErrorMessage,\n  FormHelperText,\n} from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<FormControl>\n  <FormLabel for=\"email\">Email address</FormLabel>\n  <Input id=\"email\" type=\"email\" />\n  <FormHelperText>We'll never share your email.</FormHelperText>\n</FormControl>`;\n\nconst required = `<FormControl required>\n  <FormLabel for=\"email\">Email address</FormLabel>\n  <Input id=\"email\" type=\"email\" />\n  <FormHelperText>We'll never share your email.</FormHelperText>\n</FormControl>`;\n\nconst disabled = `<FormControl disabled>\n  <FormLabel for=\"email\">Email address</FormLabel>\n  <Input id=\"email\" type=\"email\" />\n  <FormHelperText>We'll never share your email.</FormHelperText>\n</FormControl>`;\n\nconst invalid = `function InvalidFieldExample() {\n  const [value, setValue] = createSignal(\"\")\n\n  const handleInput = (e) => setValue(e.target.value)\n\n  const isInvalid = () => value() === \"\"\n\n  return (\n    <FormControl invalid={isInvalid()}>\n      <FormLabel for=\"email\">Email address</FormLabel>\n      <Input \n        id=\"email\" \n        type=\"email\" \n        value={value()} \n        onInput={handleInput} />\n      <Show\n        when={isInvalid()}\n        fallback={\n          <FormHelperText>\n            Enter the email you'd like to receive the newsletter on.\n          </FormHelperText>\n        }\n      >\n        <FormErrorMessage>Email is required.</FormErrorMessage>\n      </Show>\n    </FormControl>\n  )\n}`;\n\nconst withRadioGroup = `<FormControl as=\"fieldset\">\n  <FormLabel as=\"legend\">Choose a framework</FormLabel>\n  <RadioGroup defaultValue=\"solid\">\n    <HStack spacing=\"$6\">\n      <Radio value=\"react\">React</Radio>\n      <Radio value=\"angular\" disabled>Angular</Radio>\n      <Radio value=\"vue\">Vue</Radio>\n      <Radio value=\"svelte\">Svelte</Radio>\n      <Radio value=\"solid\">Solid</Radio>\n    </HStack>\n  </RadioGroup>\n  <FormHelperText>You should choose Solid.</FormHelperText>\n</FormControl>`;\n\nconst withSelect = `<FormControl>\n  <FormLabel>Choose a framework</FormLabel>\n  <SimpleSelect placeholder=\"Choose a framework\">\n    <SimpleOption value=\"react\">React</SimpleOption>\n    <SimpleOption value=\"angular\" disabled>Angular</SimpleOption>\n    <SimpleOption value=\"vue\">Vue</SimpleOption>\n    <SimpleOption value=\"svelte\">Svelte</SimpleOption>\n    <SimpleOption value=\"solid\">Solid</SimpleOption>\n  </SimpleSelect>\n  <FormHelperText>You should choose Solid.</FormHelperText>\n</FormControl>`;\n\nconst usageWithFormLibraries = `import { createForm } from \"@felte/solid\";\nimport { validator } from \"@felte/validator-yup\";\nimport {\n  Button,\n  Checkbox,\n  FormControl,\n  FormErrorMessage,\n  FormHelperText,\n  FormLabel,\n  HStack,\n  Input,\n  Radio,\n  RadioGroup,\n  SimpleOption,\n  SimpleSelect,\n  Textarea,\n  VStack,\n} from \"@hope-ui/solid\";\nimport { For, Show } from \"solid-js\";\nimport type { InferType } from \"yup\";\nimport { boolean, mixed, object, string } from \"yup\";\n\nconst schema = object({\n  email: string().email().required(),\n  jobTitle: string().required(),\n  gender: mixed().oneOf([\"male\", \"female\", \"other\"]).required(),\n  bio: string().max(30),\n  subscribe: boolean(),\n});\n\nexport function FelteExample() {\n  const { \n    form, \n    errors, \n    data, \n    isValid, \n    setFields \n  } = createForm<InferType<typeof schema>>({\n    extend: validator({ schema }),\n    onSubmit: values => {\n      console.log(values);\n    },\n  });\n\n  return (\n    <VStack \n      as=\"form\" \n      ref={form} \n      spacing=\"$5\" \n      alignItems=\"stretch\" \n      maxW=\"$96\" \n      mx=\"auto\"\n    >\n      <FormControl required invalid={!!errors(\"email\")}>\n        <FormLabel>Email</FormLabel>\n        <Input type=\"email\" name=\"email\" placeholder=\"contact@hope-ui.com\" />\n        <FormErrorMessage>{errors(\"email\")[0]}</FormErrorMessage>\n      </FormControl>\n      <FormControl required invalid={!!errors(\"jobTitle\")}>\n        <FormLabel>Job title</FormLabel>\n        <SimpleSelect\n          placeholder=\"Choose a job title\"\n          onChange={value => setFields(\"jobTitle\", value)}\n        >\n          <For each={[\"Designer\", \"Frontend developer\", \"Backend developer\", \"Devops\"]}>\n            {item => <SimpleOption value={item}>{item}</SimpleOption>}\n          </For>\n        </SimpleSelect>\n        <FormErrorMessage>{errors(\"jobTitle\")[0]}</FormErrorMessage>\n      </FormControl>\n      <FormControl as=\"fieldset\" required invalid={!!errors(\"gender\")}>\n        <FormLabel as=\"legend\">Gender</FormLabel>\n        <RadioGroup name=\"gender\">\n          <HStack spacing=\"$5\">\n            <Radio value=\"male\">Male</Radio>\n            <Radio value=\"female\">Female</Radio>\n            <Radio value=\"other\">Other</Radio>\n          </HStack>\n        </RadioGroup>\n        <FormErrorMessage>{errors(\"gender\")[0]}</FormErrorMessage>\n      </FormControl>\n      <FormControl invalid={!!errors(\"bio\")}>\n        <FormLabel>Bio</FormLabel>\n        <Textarea name=\"bio\" placeholder=\"Tell us something about yourself\" />\n        <Show\n          when={errors(\"bio\")}\n          fallback={\n            <FormHelperText w=\"$full\" textAlign=\"end\">\n              {data(\"bio\")?.length ?? 0}/30\n            </FormHelperText>\n          }\n        >\n          <FormErrorMessage>{errors(\"bio\")[0]}</FormErrorMessage>\n        </Show>\n      </FormControl>\n      <Checkbox name=\"subscribe\">Subscribe to the newsletter</Checkbox>\n      <HStack justifyContent=\"flex-end\">\n        <Button type=\"submit\" disabled={!isValid()}>\n          Submit\n        </Button>\n      </HStack>\n    </VStack>\n  );\n}`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    FormControl: {\n      baseStyle: {\n        root: SystemStyleObject,\n        label: SystemStyleObject,\n        helperText: SystemStyleObject,\n        errorMessage: SystemStyleObject,\n      },\n      defaultProps: {\n        label: FormLabelOptions\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  required,\n  disabled,\n  invalid,\n  withRadioGroup,\n  withSelect,\n  usageWithFormLibraries,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-entry/input/index.tsx",
    "content": "import {\n  Input,\n  InputGroup,\n  InputLeftAddon,\n  InputLeftElement,\n  InputRightAddon,\n  InputRightElement,\n  Text,\n  VStack,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { createSignal, onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { IconCheck } from \"@/icons/IconCheck\";\nimport { IconPhone } from \"@/icons/IconPhone\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function InputDoc() {\n  const [value, setValue] = createSignal(\"\");\n  const handleInput = (event: Event) => setValue((event.target as HTMLInputElement).value);\n\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/data-entry/form-control\",\n    label: \"FormControl\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/data-entry/radio\",\n    label: \"Radio\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#sizes\", label: \"Input sizes\", indent: true },\n    { href: \"#variants\", label: \"Input variants\", indent: true },\n    { href: \"#addons\", label: \"Input addons\", indent: true },\n    { href: \"#elements\", label: \"Input elements\", indent: true },\n    { href: \"#disabled\", label: \"Disabled state\", indent: true },\n    { href: \"#invalid\", label: \"Invalid state\", indent: true },\n    { href: \"#controlled\", label: \"Controlled input\", indent: true },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#input-props\", label: \"Input props\", indent: true },\n    { href: \"#input-group-props\", label: \"InputGroup props\", indent: true },\n  ];\n\n  const inputPropItems: PropsTableItem[] = [\n    {\n      name: \"variant\",\n      description: \"The visual style of the input.\",\n      type: '\"outline\" | \"filled\" | \"unstyled\"',\n      defaultValue: '\"outline\"',\n    },\n    {\n      name: \"size\",\n      description: \"The size of the input.\",\n      type: '\"xs\" | \"sm\" | \"md\" | \"lg\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"required\",\n      description:\n        \"If `true`, the input is marked as required, and `required` attribute will be added\",\n      type: \"boolean\",\n    },\n    {\n      name: \"disabled\",\n      description: \"If `true`, the input will be disabled.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"invalid\",\n      description: \"If `true`, the input will have `aria-invalid` set to `true`.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"readOnly\",\n      description: \"If `true`, the input will be readonly.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"htmlSize\",\n      description: \"The native HTML `size` attribute to be passed to the `input`.\",\n      type: \"string | number\",\n    },\n  ];\n\n  const inputGroupPropItems: PropsTableItem[] = [\n    {\n      name: \"variant\",\n      description: \"The visual style of the input.\",\n      type: '\"outline\" | \"filled\" | \"unstyled\"',\n      defaultValue: '\"outline\"',\n    },\n    {\n      name: \"size\",\n      description: \"The size of the input.\",\n      type: '\"xs\" | \"sm\" | \"md\" | \"lg\"',\n      defaultValue: '\"md\"',\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Input</PageTitle>\n      <Text mb=\"$5\">\n        The <Code>Input</Code> component is a component that is used to get user input in a text\n        field.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$12\">\n        <Input placeholder=\"Basic usage\" />\n      </Preview>\n      <SectionSubtitle id=\"sizes\">Input sizes</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>size</Code> prop to change the size of the Input. You can set the value to{\" \"}\n        <Code>xs</Code>, <Code>sm</Code>, <Code>md</Code> or <Code>lg</Code>.\n      </Text>\n      <Preview snippet={snippets.inputSizes} mb=\"$8\">\n        <VStack spacing=\"$4\">\n          <Input placeholder=\"extra small size\" size=\"xs\" />\n          <Input placeholder=\"small size\" size=\"sm\" />\n          <Input placeholder=\"medium size\" size=\"md\" />\n          <Input placeholder=\"large size\" size=\"lg\" />\n        </VStack>\n      </Preview>\n      <Text mb=\"$5\">\n        If you want to use the native DOM <Code>size</Code> attribute you can use the{\" \"}\n        <Code>htmlSize</Code> prop. For it to work as expected you will also need to provide the{\" \"}\n        <Code>width</Code> prop set to <Code>auto</Code>.\n      </Text>\n      <Preview snippet={snippets.inputDomSize} mb=\"$10\">\n        <Input htmlSize={4} width=\"auto\" />\n      </Preview>\n      <SectionSubtitle id=\"variants\">Input variants</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>variant</Code> prop to change the visual style of the Input. You can set the\n        value to <Code>outline</Code>, <Code>filled</Code> or <Code>unstyled</Code>.\n      </Text>\n      <Preview snippet={snippets.inputVariants} mb=\"$10\">\n        <VStack spacing=\"$4\">\n          <Input placeholder=\"Outline\" variant=\"outline\" />\n          <Input placeholder=\"Filled\" variant=\"filled\" />\n          <Input placeholder=\"Unstyled\" variant=\"unstyled\" />\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"addons\">Input addons</SectionSubtitle>\n      <Text mb=\"$5\">\n        You can add addons to the left and right of the <Code>Input</Code> component. Hope UI\n        exports <Code>InputGroup</Code>, <Code>InputLeftAddon</Code> and{\" \"}\n        <Code>InputRightAddon</Code> to help with this use case.\n      </Text>\n      <Preview snippet={snippets.inputAddons} mb=\"$10\">\n        <VStack spacing=\"$4\">\n          <InputGroup>\n            <InputLeftAddon>+234</InputLeftAddon>\n            <Input type=\"tel\" placeholder=\"phone number\" />\n          </InputGroup>\n          <InputGroup size=\"sm\">\n            <InputLeftAddon>https://</InputLeftAddon>\n            <Input placeholder=\"mysite\" />\n            <InputRightAddon>.com</InputRightAddon>\n          </InputGroup>\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"elements\">Input elements</SectionSubtitle>\n      <Text mb=\"$5\">\n        In some scenarios, you might need to add an icon or button inside the input component. Hope\n        UI exports <Code>InputLeftElement</Code> and <Code>InputRightElement</Code> to help with\n        this use case.\n      </Text>\n      <Text mb=\"$5\">\n        If the left or right is an icon or text, you can pass <Code>pointerEvents=\"none\"</Code> to{\" \"}\n        <Code>InputLeftElement</Code> or <Code>InputRightElement</Code> to ensure that clicking on\n        them focused the input.\n      </Text>\n      <Preview snippet={snippets.inputElements} mb=\"$10\">\n        <VStack spacing=\"$4\">\n          <InputGroup>\n            <InputLeftElement pointerEvents=\"none\">\n              <IconPhone color=\"$neutral8\" />\n            </InputLeftElement>\n            <Input type=\"tel\" placeholder=\"Phone number\" />\n          </InputGroup>\n          <InputGroup>\n            <InputLeftElement pointerEvents=\"none\" color=\"$neutral8\" fontSize=\"1.2em\">\n              $\n            </InputLeftElement>\n            <Input placeholder=\"Enter amount\" />\n            <InputRightElement pointerEvents=\"none\">\n              <IconCheck boxSize=\"20px\" color=\"$success9\" />\n            </InputRightElement>\n          </InputGroup>\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"disabled\">Disabled state</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>disabled</Code> prop to disable the Input.\n      </Text>\n      <Preview snippet={snippets.inputDisabled} mb=\"$10\">\n        <Input disabled placeholder=\"Here is a sample placeholder\" />\n      </Preview>\n      <SectionSubtitle id=\"invalid\">Invalid state</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>invalid</Code> prop to mark the Input as invalid.\n      </Text>\n      <Preview snippet={snippets.inputInvalid} mb=\"$10\">\n        <Input invalid placeholder=\"Here is a sample placeholder\" />\n      </Preview>\n      <SectionSubtitle id=\"controlled\">Controlled input</SectionSubtitle>\n      <Preview snippet={snippets.controlledInput} mb=\"$12\">\n        <Text mb=\"$2\">Value: {value()}</Text>\n        <Input\n          value={value()}\n          onInput={handleInput}\n          placeholder=\"Here is a sample placeholder\"\n          size=\"sm\"\n        />\n      </Preview>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Input</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"input-props\">Input props</SectionSubtitle>\n      <PropsTable items={inputPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"input-group-props\">InputGroup props</SectionSubtitle>\n      <PropsTable items={inputGroupPropItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-entry/input/snippets.ts",
    "content": "const importComponent = `import { \n  Input,\n  InputGroup,\n  InputLeftAddon,\n  InputLeftElement,\n  InputRightAddon,\n  InputRightElement,\n} from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Input placeholder=\"Basic usage\" />`;\n\nconst inputSizes = `<VStack spacing=\"$4\">\n  <Input placeholder=\"extra small size\" size=\"xs\" />\n  <Input placeholder=\"small size\" size=\"sm\" />\n  <Input placeholder=\"medium size\" size=\"md\" />\n  <Input placeholder=\"large size\" size=\"lg\" />\n</VStack>`;\n\nconst inputDomSize = `<Input htmlSize={4} width=\"auto\" />`;\n\nconst inputVariants = `<VStack spacing=\"$4\">\n  <Input placeholder=\"Outline\" variant=\"outline\" />\n  <Input placeholder=\"Filled\" variant=\"filled\" />\n  <Input placeholder=\"Unstyled\" variant=\"unstyled\" />\n</VStack>`;\n\nconst inputAddons = `<VStack spacing=\"$4\">\n  <InputGroup>\n    <InputLeftAddon>+234</InputLeftAddon>\n    <Input type=\"tel\" placeholder=\"phone number\" />\n  </InputGroup>\n\n  {/* \n    * If you add the size prop to \\`InputGroup\\`,\n    * it'll pass it to all its children. \n    */}\n  <InputGroup size=\"sm\">\n    <InputLeftAddon>https://</InputLeftAddon>\n    <Input placeholder=\"mysite\" />\n    <InputRightAddon>.com</InputRightAddon>\n  </InputGroup>\n</VStack>`;\n\nconst inputElements = `<VStack spacing=\"$4\">\n  <InputGroup>\n    <InputLeftElement pointerEvents=\"none\">\n      <IconPhone color=\"$neutral8\" />\n    </InputLeftElement>\n    <Input type=\"tel\" placeholder=\"Phone number\" />\n  </InputGroup>\n\n  <InputGroup>\n    <InputLeftElement \n      pointerEvents=\"none\" \n      color=\"$neutral8\" \n      fontSize=\"1.2em\"\n    >\n      $\n    </InputLeftElement>\n    <Input placeholder=\"Enter amount\" />\n    <InputRightElement pointerEvents=\"none\">\n      <IconCheck boxSize=\"20px\" color=\"$success9\" />\n    </InputRightElement>\n  </InputGroup>\n</VStack>`;\n\nconst inputDisabled = `<Input disabled placeholder=\"Here is a sample placeholder\" />`;\n\nconst inputInvalid = `<Input invalid placeholder=\"Here is a sample placeholder\" />`;\n\nconst controlledInput = `function Example() {\n  const [value, setValue] = createSignal(\"\");\n  const handleInput = event => setValue(event.target.value);\n\n  return (\n    <>\n      <Text mb=\"$2\">Value: {value()}</Text>\n      <Input\n        value={value()}\n        onInput={handleInput}\n        placeholder=\"Here is a sample placeholder\"\n        size=\"sm\"\n      />\n    </>\n  )\n}`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Input: {\n      baseStyle: {\n        input: SystemStyleObject,\n        group: SystemStyleObject,\n        element: SystemStyleObject,\n        addon: SystemStyleObject,\n      },\n      defaultProps: {\n        input: ThemeableInputOptions,\n        group: ThemeableInputGroupOptions,\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  inputSizes,\n  inputDomSize,\n  inputVariants,\n  inputAddons,\n  inputElements,\n  inputDisabled,\n  inputInvalid,\n  controlledInput,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-entry/radio/index.tsx",
    "content": "import { HStack, ListItem, Radio, RadioGroup, Text, UnorderedList } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function RadioDoc() {\n  const plans = [\n    {\n      id: 1,\n      name: \"Startup\",\n      ram: \"12GB\",\n      cpus: \"6 CPUs\",\n      disk: \"160 GB SSD disk\",\n    },\n    {\n      id: 2,\n      name: \"Business\",\n      ram: \"16GB\",\n      cpus: \"8 CPUs\",\n      disk: \"512 GB SSD disk\",\n    },\n    {\n      id: 3,\n      name: \"Enterprise\",\n      ram: \"32GB\",\n      cpus: \"12 CPUs\",\n      disk: \"1024 GB SSD disk\",\n    },\n  ];\n\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/data-entry/form-control\",\n    label: \"FormControl\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/data-entry/select\",\n    label: \"Select\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#colors\", label: \"Radio colors\", indent: true },\n    { href: \"#sizes\", label: \"Radio sizes\", indent: true },\n    { href: \"#variants\", label: \"Radio variants\", indent: true },\n    { href: \"#label-placement\", label: \"Radio label placement\", indent: true },\n    { href: \"#disabled\", label: \"Disabled state\", indent: true },\n    { href: \"#invalid\", label: \"Invalid state\", indent: true },\n    { href: \"#name-prop\", label: \"Note about `name` prop\", indent: true },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#radio-props\", label: \"Radio props\", indent: true },\n    { href: \"#radio-group-props\", label: \"RadioGroup props\", indent: true },\n  ];\n\n  const radioPropItems: PropsTableItem[] = [\n    {\n      name: \"variant\",\n      description: \"The visual style of the radio.\",\n      type: '\"outline\" | \"filled\"',\n      defaultValue: '\"outline\"',\n    },\n    {\n      name: \"colorScheme\",\n      description: \"The color of the radio.\",\n      type: '\"primary\" | \"accent\" | \"neutral\" | \"success\" | \"info\" | \"warning\" | \"danger\"',\n      defaultValue: '\"primary\"',\n    },\n    {\n      name: \"size\",\n      description: \"The size of the radio.\",\n      type: '\"sm\" | \"md\" | \"lg\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"labelPlacement\",\n      description: \"The placement of the radio label.\",\n      type: '\"start\" | \"end\"',\n      defaultValue: '\"end\"',\n    },\n    {\n      name: \"name\",\n      description: \"The name of the input field in a radio (Useful for form submission).\",\n      type: \"string\",\n    },\n    {\n      name: \"value\",\n      description:\n        \"The value to be used in the radio input. This is the value that will be returned on form submission.\",\n      type: \"string | number\",\n    },\n    {\n      name: \"checked\",\n      description:\n        \"If `true`, the radio will be checked. You'll need to pass `onChange` to update its value (since it is now controlled).\",\n      type: \"boolean\",\n    },\n    {\n      name: \"defaultChecked\",\n      description: \"If `true`, the radio will be initially checked.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"required\",\n      description:\n        \"If `true`, the radio is marked as required, and `required` attribute will be added\",\n      type: \"boolean\",\n    },\n    {\n      name: \"disabled\",\n      description: \"If `true`, the radio will be disabled.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"invalid\",\n      description: \"If `true`, the radio will have `aria-invalid` set to `true`.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"readOnly\",\n      description: \"If `true`, the radio will be readonly.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"children\",\n      description:\n        \"The children of the radio. If used as a render props, the `checked` state will be passed.\",\n      type: \"JSX.Element | (props: { checked: boolean }) => JSX.Element\",\n    },\n    {\n      name: \"onChange\",\n      description: \"The callback invoked when the checked state of the `Radio` changes.\",\n      type: \"JSX.EventHandlerUnion<HTMLInputElement, Event>\",\n    },\n    {\n      name: \"onFocus\",\n      description: \"The callback invoked when the radio is focused.\",\n      type: \"JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>\",\n    },\n    {\n      name: \"onBlur\",\n      description: \"The callback invoked when the radio is blurred (loses focus).\",\n      type: \"JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>\",\n    },\n  ];\n\n  const radioGroupPropItems: PropsTableItem[] = [\n    {\n      name: \"variant\",\n      description: \"The visual style of the radios.\",\n      type: '\"outline\" | \"filled\"',\n      defaultValue: '\"outline\"',\n    },\n    {\n      name: \"colorScheme\",\n      description: \"The color of the radios.\",\n      type: '\"primary\" | \"accent\" | \"neutral\" | \"success\" | \"info\" | \"warning\" | \"danger\"',\n      defaultValue: '\"primary\"',\n    },\n    {\n      name: \"size\",\n      description: \"The size of the radios.\",\n      type: '\"sm\" | \"md\" | \"lg\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"labelPlacement\",\n      description: \"The placement of the radios labels.\",\n      type: '\"start\" | \"end\"',\n      defaultValue: '\"end\"',\n    },\n    {\n      name: \"name\",\n      description: \"The `name` attribute forwarded to each `radio` element.\",\n      type: \"string\",\n    },\n    {\n      name: \"value\",\n      description: \"The value of the radio to be `checked` (in controlled mode).\",\n      type: \"string | number\",\n    },\n    {\n      name: \"defaultValue\",\n      description: \"The value of the radio to be `checked` initially (in uncontrolled mode).\",\n      type: \"string | number\",\n    },\n    {\n      name: \"required\",\n      description:\n        \"If `true`, all wrapped radio inputs will be marked as required, and `required` attribute will be added.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"disabled\",\n      description: \"If `true`, all wrapped radio inputs will be disabled.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"invalid\",\n      description: \"If `true`, all wrapped radio inputs will have `aria-invalid` set to `true`.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"readOnly\",\n      description: \"If `true`, all wrapped radio inputs will be readonly.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"onChange\",\n      description: \"The callback invoked when a radio is checked.\",\n      type: \"(value: string | number) => void\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Radio</PageTitle>\n      <Text mb=\"$5\">\n        Radios are used when only one choice may be selected in a series of options.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>Radio:</strong> Provides context for all its children. It renders a{\" \"}\n          <Code>label</Code> and a visualy hidden <Code>input</Code> with type set to{\" \"}\n          <Code>radio</Code>.\n        </ListItem>\n        <ListItem>\n          <strong>RadioGroup:</strong> Component to help manage the checked state of its children{\" \"}\n          <Code>Radio</Code> components and conveniently pass a few shared style props to each.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$12\">\n        <RadioGroup defaultValue=\"1\">\n          <HStack spacing=\"$4\">\n            <Radio value=\"1\">First</Radio>\n            <Radio value=\"2\">Second</Radio>\n            <Radio value=\"3\">Third</Radio>\n          </HStack>\n        </RadioGroup>\n      </Preview>\n      <SectionSubtitle id=\"colors\">Radio colors</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>colorScheme</Code> prop to change the color of the Radio. You can set the\n        value to <Code>primary</Code>, <Code>accent</Code>, <Code>neutral</Code>,{\" \"}\n        <Code>success</Code>, <Code>info</Code>, <Code>warning</Code> or <Code>danger</Code>.\n      </Text>\n      <Preview snippet={snippets.radioColors} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Radio defaultChecked colorScheme=\"primary\" />\n          <Radio defaultChecked colorScheme=\"accent\" />\n          <Radio defaultChecked colorScheme=\"neutral\" />\n          <Radio defaultChecked colorScheme=\"success\" />\n          <Radio defaultChecked colorScheme=\"info\" />\n          <Radio defaultChecked colorScheme=\"warning\" />\n          <Radio defaultChecked colorScheme=\"danger\" />\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"sizes\">Radio sizes</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>size</Code> prop to change the size of the Radio. You can set the value to{\" \"}\n        <Code>sm</Code>, <Code>md</Code> or <Code>lg</Code>.\n      </Text>\n      <Preview snippet={snippets.radioSizes} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Radio defaultChecked size=\"sm\">\n            Radio\n          </Radio>\n          <Radio defaultChecked size=\"md\">\n            Radio\n          </Radio>\n          <Radio defaultChecked size=\"lg\">\n            Radio\n          </Radio>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"variants\">Radio variants</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>variant</Code> prop to change the visual style of the Radio. You can set the\n        value to <Code>outline</Code> or <Code>filled</Code>.\n      </Text>\n      <Preview snippet={snippets.radioVariants} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Radio variant=\"outline\">Radio</Radio>\n          <Radio variant=\"filled\">Radio</Radio>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"label-placement\">Radio label placement</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>labelPlacement</Code> prop to change the placement of the label. You can set\n        the value to <Code>start</Code> or <Code>end</Code>.\n      </Text>\n      <Preview snippet={snippets.radioLabelPlacement} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Radio labelPlacement=\"start\">Radio</Radio>\n          <Radio labelPlacement=\"end\">Radio</Radio>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"disabled\">Disabled state</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>disabled</Code> prop to disable the Radio.\n      </Text>\n      <Preview snippet={snippets.radioDisabled} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Radio disabled>Radio</Radio>\n          <Radio variant=\"filled\" disabled>\n            Radio\n          </Radio>\n          <Radio defaultChecked disabled>\n            Radio\n          </Radio>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"invalid\">Invalid state</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>invalid</Code> prop to mark the Radio as invalid.\n      </Text>\n      <Preview snippet={snippets.radioInvalid} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Radio invalid>Radio</Radio>\n          <Radio variant=\"filled\" invalid>\n            Radio\n          </Radio>\n          <Radio defaultChecked invalid>\n            Radio\n          </Radio>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"name-prop\">\n        Note about <Code>name</Code> prop\n      </SectionSubtitle>\n      <Text mb=\"$5\">\n        We recommend passing the <Code>name</Code> prop to the <Code>RadioGroup</Code> component,\n        instead of passing it to each <Code>Radio</Code> component. By default, the{\" \"}\n        <Code>name</Code> prop of the <Code>RadioGroup</Code> takes precedence.\n      </Text>\n      <CodeSnippet snippet={snippets.nameProp} mb=\"$12\" />\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Radio</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"radio-props\">Radio props</SectionSubtitle>\n      <PropsTable items={radioPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"radio-group-props\">RadioGroup props</SectionSubtitle>\n      <PropsTable items={radioGroupPropItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-entry/radio/snippets.ts",
    "content": "const importComponent = `import { Radio, RadioGroup } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<RadioGroup defaultValue=\"1\">\n  <HStack spacing=\"$4\">\n    <Radio value=\"1\">First</Radio>\n    <Radio value=\"2\">Second</Radio>\n    <Radio value=\"3\">Third</Radio>\n  </HStack>\n</RadioGroup>`;\n\nconst radioColors = `<HStack spacing=\"$4\">\n  <Radio defaultChecked colorScheme=\"primary\" />\n  <Radio defaultChecked colorScheme=\"accent\" />\n  <Radio defaultChecked colorScheme=\"neutral\" />\n  <Radio defaultChecked colorScheme=\"success\" />\n  <Radio defaultChecked colorScheme=\"info\" />\n  <Radio defaultChecked colorScheme=\"warning\" />\n  <Radio defaultChecked colorScheme=\"danger\" />\n</HStack>`;\n\nconst radioSizes = `<HStack spacing=\"$4\">\n  <Radio defaultChecked size=\"sm\">Radio</Radio>\n  <Radio defaultChecked size=\"md\">Radio</Radio>\n  <Radio defaultChecked size=\"lg\">Radio</Radio>\n</HStack>`;\n\nconst radioVariants = `<HStack spacing=\"$4\">\n  <Radio variant=\"outline\">Radio</Radio>\n  <Radio variant=\"filled\">Radio</Radio>\n</HStack>`;\n\nconst radioLabelPlacement = `<HStack spacing=\"$4\">\n  <Radio LabelPlacement=\"start\">Radio</Radio>\n  <Radio LabelPlacement=\"end\">Radio</Radio>\n</HStack>`;\n\nconst radioDisabled = `<HStack spacing=\"$4\">\n  <Radio disabled>Radio</Radio>\n  <Radio variant=\"filled\" disabled>Radio</Radio>\n  <Radio defaultChecked disabled>Radio</Radio>\n</HStack>`;\n\nconst radioInvalid = `<HStack spacing=\"$4\">\n  <Radio invalid>Radio</Radio>\n  <Radio variant=\"filled\" invalid>Radio</Radio>\n  <Radio defaultChecked invalid>Radio</Radio>\n</HStack>`;\n\nconst nameProp = `// Do this ✅\n<RadioGroup name=\"form-name\">\n  <Radio>Radio 1</Radio>\n  <Radio>Radio 2</Radio>\n</RadioGroup>\n\n// Don't do this ❌\n<RadioGroup>\n  <Radio name=\"form-name\">Radio 2</Radio>\n  <Radio name=\"form-name\">Radio 2</Radio>\n</RadioGroup>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Radio: {\n      baseStyle: {\n        root: SystemStyleObject,\n        group: SystemStyleObject,\n        control: SystemStyleObject,\n        label: SystemStyleObject,\n      },\n      defaultProps: {\n        root: ThemeableRadioOptions,\n        group: ThemeableRadioOptions,\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  radioColors,\n  radioSizes,\n  radioVariants,\n  radioLabelPlacement,\n  radioDisabled,\n  radioInvalid,\n  nameProp,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-entry/select/index.tsx",
    "content": "import {\n  Alert,\n  AlertDescription,\n  Anchor,\n  Box,\n  Divider,\n  hope,\n  Kbd,\n  ListItem,\n  Select,\n  SelectContent,\n  SelectIcon,\n  SelectLabel,\n  SelectListbox,\n  SelectOptGroup,\n  SelectOption,\n  SelectOptionIndicator,\n  SelectOptionText,\n  SelectPlaceholder,\n  SelectProps,\n  SelectTrigger,\n  SelectValue,\n  SimpleOption,\n  SimpleSelect,\n  Text,\n  UnorderedList,\n  VStack,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Link } from \"solid-app-router\";\nimport { createSignal, For, onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { IconCaretDown } from \"@/icons/IconCaretDown\";\n\nimport { snippets } from \"./snippets\";\n\nconst frameworksWithTagline = [\n  { id: 1, name: \"React\", tagLine: \"A JavaScript library for building user interfaces\" },\n  { id: 2, name: \"Angular\", tagLine: \"The modern web developer's platform\" },\n  { id: 3, name: \"Vue\", tagLine: \"The progressive javaScript framework\" },\n  { id: 4, name: \"Svelte\", tagLine: \"Cybernetically enhanced web apps\" },\n  {\n    id: 5,\n    name: \"Solid\",\n    tagLine: \"Simple and performant reactivity for building user interfaces\",\n  },\n];\n\nexport default function SelectDoc() {\n  const [controlledValue, setControlledValue] = createSignal(\"\");\n  const [controlledMultiValue, setControlledMultiValue] = createSignal<string[]>([]);\n\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/data-entry/radio\",\n    label: \"Radio\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/data-entry/switch\",\n    label: \"Switch\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#sizes\", label: \"Trigger sizes\", indent: true },\n    { href: \"#variants\", label: \"Trigger variants\", indent: true },\n    { href: \"#disabled\", label: \"Disabled state\", indent: true },\n    { href: \"#invalid\", label: \"Invalid state\", indent: true },\n    { href: \"#default-value\", label: \"Default value\", indent: true },\n    { href: \"#disabled-option\", label: \"Make an option disabled\", indent: true },\n    { href: \"#option-group\", label: \"Option group\", indent: true },\n    { href: \"#typeahead-complex-option\", label: \"Typeahead with complex option\", indent: true },\n    { href: \"#controlled\", label: \"Controlled select\", indent: true },\n    { href: \"#multi-select\", label: \"Multi select\" },\n    { href: \"#multi-default-value\", label: \"Default values\", indent: true },\n    { href: \"#multi-controlled\", label: \"Controlled multi-select\", indent: true },\n    { href: \"#composition\", label: \"Composition\" },\n    { href: \"#simple-select\", label: \"Simple select\" },\n    { href: \"#accessibility\", label: \"Accessibility\" },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#select-props\", label: \"Select props\", indent: true },\n    { href: \"#select-option-props\", label: \"SelectOption props\", indent: true },\n    { href: \"#select-value-props\", label: \"SelectValue props\", indent: true },\n    { href: \"#select-icon-props\", label: \"SelectIcon props\", indent: true },\n    { href: \"#other-components-props\", label: \"Other components props\", indent: true },\n  ];\n\n  const selectPropItems: PropsTableItem[] = [\n    {\n      name: \"variant\",\n      description: \"The visual style of the select trigger.\",\n      type: '\"outline\" | \"filled\" | \"unstyled\"',\n      defaultValue: '\"outline\"',\n    },\n    {\n      name: \"size\",\n      description: \"The size of the select trigger.\",\n      type: '\"xs\" | \"sm\" | \"md\" | \"lg\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"offset\",\n      description: \"Offset between the listbox and the reference (trigger) element.\",\n      type: \"number\",\n    },\n    {\n      name: \"id\",\n      description: \"The `id` of the select.\",\n      type: \"string\",\n    },\n    {\n      name: \"multiple\",\n      description: \"If `true`, allow multi-selection.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"value\",\n      description: \"The value of the select (in controlled mode).\",\n      type: \"string | number | (string | number)[]\",\n    },\n    {\n      name: \"defaultValue\",\n      description: \"The value of the select when initially rendered (in uncontrolled mode).\",\n      type: \"string | number | (string | number)[]\",\n    },\n    {\n      name: \"required\",\n      description: \"If `true`, the select will be required.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"disabled\",\n      description: \"If `true`, the select trigger will be disabled.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"invalid\",\n      description: \"If `true`, the select trigger will have `aria-invalid` set to `true`.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"readOnly\",\n      description: \"If `true`, the select will be readonly.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"onChange\",\n      description: \"Callback invoked when the selected value changes (in controlled mode).\",\n      type: \"(value: string | number | (string | number)[]) => void\",\n    },\n    {\n      name: \"onFocus\",\n      description: \"Callback invoked when the select trigger gain focus.\",\n      type: \"JSX.EventHandlerUnion<HTMLButtonElement, FocusEvent>\",\n    },\n    {\n      name: \"onBlur\",\n      description: \"Callback invoked when the select trigger loose focus.\",\n      type: \"JSX.EventHandlerUnion<HTMLButtonElement, FocusEvent>\",\n    },\n  ];\n\n  const selectOptionPropItems: PropsTableItem[] = [\n    {\n      required: true,\n      name: \"value\",\n      description: \"The value of the option.\",\n      type: \"string | number\",\n    },\n    {\n      name: \"textValue\",\n      description:\n        \"Optional text used for typeahead purposes. By default the typeahead behavior will use the `.textContent` of the `SelectOption`. Use this when the content is complex, or you have non-textual content inside.\",\n      type: \"string\",\n    },\n    {\n      name: \"disabled\",\n      description: \"If `true`, the option will be disabled.\",\n      type: \"boolean\",\n    },\n  ];\n\n  const selectValuePropItems: PropsTableItem[] = [\n    {\n      name: \"children\",\n      description:\n        \"A custom content to use in place of the select value. The array of selected options will be passed to the render prop.\",\n      type: \"JSX.Element | (props: { selectedOptions: SelectOptionData[] }) => JSX.Element\",\n    },\n  ];\n\n  const selectIconPropItems: PropsTableItem[] = [\n    {\n      name: \"rotateOnOpen\",\n      description: \"If `true`, the icon will perform a 180deg rotation when the select is open\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Select</PageTitle>\n      <Text mb=\"$5\">\n        <Code>Select</Code> component is a component that allows users pick a value from predefined\n        options. Ideally, it should be used when there are more than 5 options, otherwise you might\n        consider using a radio group instead.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>Select:</strong> The wrapper component that provides context for all its children.\n        </ListItem>\n        <ListItem>\n          <strong>SelectTrigger:</strong> The trigger that toggles the select.\n        </ListItem>\n        <ListItem>\n          <strong>SelectPlaceholder:</strong> The component used to display a placeholder when no\n          option is selected.\n        </ListItem>\n        <ListItem>\n          <strong>SelectValue:</strong> The part that reflects the selected value in the trigger.\n        </ListItem>\n        <ListItem>\n          <strong>SelectTag:</strong> The component used to display a selected value in a\n          multi-select.\n        </ListItem>\n        <ListItem>\n          <strong>SelectTagCloseButton:</strong> The button used to remove a selected option in a\n          multi-select.\n        </ListItem>\n        <ListItem>\n          <strong>SelectIcon:</strong> The container for the select dropdown icon.\n        </ListItem>\n        <ListItem>\n          <strong>SelectContent:</strong> The component that pops out when the select is open.\n        </ListItem>\n        <ListItem>\n          <strong>SelectListbox:</strong> The scrolling viewport that contains all of the options.\n        </ListItem>\n        <ListItem>\n          <strong>SelectOptGroup:</strong> The component used to group multiple options.\n        </ListItem>\n        <ListItem>\n          <strong>SelectLabel:</strong> The label of an options group.\n        </ListItem>\n        <ListItem>\n          <strong>SelectOption:</strong> The component that contains a selectable option.\n        </ListItem>\n        <ListItem>\n          <strong>SelectOptionText:</strong> The textual part of the option.\n        </ListItem>\n        <ListItem>\n          <strong>SelectOptionIndicator:</strong> A visual indicator rendered when the option is\n          selected.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Select>\n          <SelectTrigger>\n            <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n            <SelectValue />\n            <SelectIcon />\n          </SelectTrigger>\n          <SelectContent>\n            <SelectListbox>\n              <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n                {item => (\n                  <SelectOption value={item}>\n                    <SelectOptionText>{item}</SelectOptionText>\n                    <SelectOptionIndicator />\n                  </SelectOption>\n                )}\n              </For>\n            </SelectListbox>\n          </SelectContent>\n        </Select>\n      </Preview>\n      <SectionSubtitle id=\"sizes\">Trigger sizes</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>size</Code> prop to change the size of the <Code>SelectTrigger</Code>. You can\n        set the value to <Code>xs</Code>, <Code>sm</Code>, <Code>md</Code> or <Code>lg</Code>.\n      </Text>\n      <Preview snippet={snippets.triggerSizes} mb=\"$10\">\n        <VStack spacing=\"$4\">\n          <For each={[\"xs\", \"sm\", \"md\", \"lg\"]}>\n            {(size: SelectProps[\"size\"]) => (\n              <Select size={size}>\n                <SelectTrigger>\n                  <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n                  <SelectValue />\n                  <SelectIcon />\n                </SelectTrigger>\n                <SelectContent>\n                  <SelectListbox>\n                    <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n                      {item => (\n                        <SelectOption value={item}>\n                          <SelectOptionText>{item}</SelectOptionText>\n                          <SelectOptionIndicator />\n                        </SelectOption>\n                      )}\n                    </For>\n                  </SelectListbox>\n                </SelectContent>\n              </Select>\n            )}\n          </For>\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"variants\">Trigger variants</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>variant</Code> prop to change the visual style of the{\" \"}\n        <Code>SelectTrigger</Code>. You can set the value to <Code>outline</Code>,{\" \"}\n        <Code>filled</Code> or <Code>unstyled</Code>.\n      </Text>\n      <Preview snippet={snippets.triggerVariants} mb=\"$10\">\n        <VStack spacing=\"$4\">\n          <For each={[\"outline\", \"filled\", \"unstyled\"]}>\n            {(variant: SelectProps[\"variant\"]) => (\n              <Select variant={variant}>\n                <SelectTrigger>\n                  <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n                  <SelectValue />\n                  <SelectIcon />\n                </SelectTrigger>\n                <SelectContent>\n                  <SelectListbox>\n                    <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n                      {item => (\n                        <SelectOption value={item}>\n                          <SelectOptionText>{item}</SelectOptionText>\n                          <SelectOptionIndicator />\n                        </SelectOption>\n                      )}\n                    </For>\n                  </SelectListbox>\n                </SelectContent>\n              </Select>\n            )}\n          </For>\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"disabled\">Disabled state</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>disabled</Code> prop to disable the Select.\n      </Text>\n      <Preview snippet={snippets.disabledState} mb=\"$10\">\n        <Select disabled>\n          <SelectTrigger>\n            <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n            <SelectValue />\n            <SelectIcon />\n          </SelectTrigger>\n          <SelectContent>\n            <SelectListbox>\n              <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n                {item => (\n                  <SelectOption value={item}>\n                    <SelectOptionText>{item}</SelectOptionText>\n                    <SelectOptionIndicator />\n                  </SelectOption>\n                )}\n              </For>\n            </SelectListbox>\n          </SelectContent>\n        </Select>\n      </Preview>\n      <SectionSubtitle id=\"invalid\">Invalid state</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>invalid</Code> prop to mark the Select as invalid.\n      </Text>\n      <Preview snippet={snippets.invalidState} mb=\"$10\">\n        <Select invalid>\n          <SelectTrigger>\n            <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n            <SelectValue />\n            <SelectIcon />\n          </SelectTrigger>\n          <SelectContent>\n            <SelectListbox>\n              <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n                {item => (\n                  <SelectOption value={item}>\n                    <SelectOptionText>{item}</SelectOptionText>\n                    <SelectOptionIndicator />\n                  </SelectOption>\n                )}\n              </For>\n            </SelectListbox>\n          </SelectContent>\n        </Select>\n      </Preview>\n      <SectionSubtitle id=\"default-value\">Default value</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>defaultValue</Code> prop to make an option selected by default.\n      </Text>\n      <Preview snippet={snippets.defaultValue} mb=\"$10\">\n        <Select defaultValue=\"Solid\">\n          <SelectTrigger>\n            <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n            <SelectValue />\n            <SelectIcon />\n          </SelectTrigger>\n          <SelectContent>\n            <SelectListbox>\n              <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n                {item => (\n                  <SelectOption value={item}>\n                    <SelectOptionText>{item}</SelectOptionText>\n                    <SelectOptionIndicator />\n                  </SelectOption>\n                )}\n              </For>\n            </SelectListbox>\n          </SelectContent>\n        </Select>\n      </Preview>\n      <SectionSubtitle id=\"disabled-option\">Make an option disabled</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>disabled</Code> prop on <Code>SelectOption</Code> to make an option disabled.\n      </Text>\n      <Preview snippet={snippets.disabledOption} mb=\"$10\">\n        <Select>\n          <SelectTrigger>\n            <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n            <SelectValue />\n            <SelectIcon />\n          </SelectTrigger>\n          <SelectContent>\n            <SelectListbox>\n              <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n                {item => (\n                  <SelectOption value={item} disabled={item === \"Angular\"}>\n                    <SelectOptionText>{item}</SelectOptionText>\n                    <SelectOptionIndicator />\n                  </SelectOption>\n                )}\n              </For>\n            </SelectListbox>\n          </SelectContent>\n        </Select>\n      </Preview>\n      <SectionSubtitle id=\"option-group\">Option group</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>SelectOptGroup</Code> and <Code>SelectLabel</Code> to visualy group options.\n      </Text>\n      <Preview snippet={snippets.optionGroup} mb=\"$10\">\n        <Select>\n          <SelectTrigger>\n            <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n            <SelectValue />\n            <SelectIcon />\n          </SelectTrigger>\n          <SelectContent>\n            <SelectListbox maxH=\"$96\">\n              <SelectOptGroup>\n                <SelectLabel>Old school</SelectLabel>\n                <For each={[\"React\", \"Angular\", \"Vue\"]}>\n                  {item => (\n                    <SelectOption value={item}>\n                      <SelectOptionText>{item}</SelectOptionText>\n                      <SelectOptionIndicator />\n                    </SelectOption>\n                  )}\n                </For>\n              </SelectOptGroup>\n              <SelectOptGroup>\n                <SelectLabel>New school</SelectLabel>\n                <For each={[\"Svelte\", \"Solid\"]}>\n                  {item => (\n                    <SelectOption value={item}>\n                      <SelectOptionText>{item}</SelectOptionText>\n                      <SelectOptionIndicator />\n                    </SelectOption>\n                  )}\n                </For>\n              </SelectOptGroup>\n            </SelectListbox>\n          </SelectContent>\n        </Select>\n      </Preview>\n      <SectionSubtitle id=\"typeahead-complex-option\">Typeahead with complex option</SectionSubtitle>\n      <Text mb=\"$3\">\n        By default the typeahead behavior will use the <Code>.textContent</Code> of the{\" \"}\n        <Code>SelectOption</Code>.\n      </Text>\n      <Text mb=\"$5\">\n        However, when the content is more complex than just a text, Use the <Code>textValue</Code>{\" \"}\n        prop on <Code>SelectOption</Code> to define which text should be used for typeahead\n        purposes.\n      </Text>\n      <Preview snippet={snippets.typeaheadComplexOption} mb=\"$10\">\n        <Select>\n          <SelectTrigger>\n            <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n            <SelectValue />\n            <SelectIcon />\n          </SelectTrigger>\n          <SelectContent>\n            <SelectListbox maxH=\"$xs\">\n              <For each={frameworksWithTagline}>\n                {item => (\n                  <SelectOption value={item.id} textValue={item.name} px=\"$3\" py=\"$1\">\n                    <VStack alignItems=\"flex-start\">\n                      <Text>{item.name}</Text>\n                      <Text size=\"sm\" color=\"$neutral11\">\n                        {item.tagLine}\n                      </Text>\n                    </VStack>\n                    <SelectOptionIndicator />\n                  </SelectOption>\n                )}\n              </For>\n            </SelectListbox>\n          </SelectContent>\n        </Select>\n      </Preview>\n      <SectionSubtitle id=\"controlled\">Controlled select</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>value</Code> and <Code>onChange</Code> props to control the select.\n      </Text>\n      <Preview snippet={snippets.controlled} mb=\"$12\">\n        <Text mb=\"$2\">Value: {controlledValue()}</Text>\n        <Select value={controlledValue()} onChange={setControlledValue}>\n          <SelectTrigger>\n            <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n            <SelectValue />\n            <SelectIcon />\n          </SelectTrigger>\n          <SelectContent>\n            <SelectListbox>\n              <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n                {item => (\n                  <SelectOption value={item}>\n                    <SelectOptionText>{item}</SelectOptionText>\n                    <SelectOptionIndicator />\n                  </SelectOption>\n                )}\n              </For>\n            </SelectListbox>\n          </SelectContent>\n        </Select>\n      </Preview>\n      <SectionTitle id=\"multi-select\">Multi select</SectionTitle>\n      <Text mb=\"$5\">\n        Use the <Code>multiple</Code> prop to allow multi-selection.\n      </Text>\n      <Preview snippet={snippets.multiSelectBasicUsage} mb=\"$10\">\n        <Select multiple>\n          <SelectTrigger>\n            <SelectPlaceholder>Choose some frameworks</SelectPlaceholder>\n            <SelectValue />\n            <SelectIcon />\n          </SelectTrigger>\n          <SelectContent>\n            <SelectListbox>\n              <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n                {item => (\n                  <SelectOption value={item}>\n                    <SelectOptionText>{item}</SelectOptionText>\n                    <SelectOptionIndicator />\n                  </SelectOption>\n                )}\n              </For>\n            </SelectListbox>\n          </SelectContent>\n        </Select>\n      </Preview>\n      <SectionSubtitle id=\"multi-default-value\">Default values</SectionSubtitle>\n      <Text mb=\"$5\">\n        In a multi-select pass an array to the <Code>defaultValue</Code> prop to make some options\n        selected by default.\n      </Text>\n      <Preview snippet={snippets.multiSelectDefaultValues} mb=\"$10\">\n        <Select multiple defaultValue={[\"React\", \"Solid\"]}>\n          <SelectTrigger>\n            <SelectPlaceholder>Choose some frameworks</SelectPlaceholder>\n            <SelectValue />\n            <SelectIcon />\n          </SelectTrigger>\n          <SelectContent>\n            <SelectListbox>\n              <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n                {item => (\n                  <SelectOption value={item}>\n                    <SelectOptionText>{item}</SelectOptionText>\n                    <SelectOptionIndicator />\n                  </SelectOption>\n                )}\n              </For>\n            </SelectListbox>\n          </SelectContent>\n        </Select>\n      </Preview>\n      <SectionSubtitle id=\"multi-controlled\">Controlled multi-select</SectionSubtitle>\n      <Text mb=\"$5\">\n        In a multi-select <Code>value</Code> and <Code>onChange</Code> props uses arrays.\n      </Text>\n      <Preview snippet={snippets.multiSelectControlled} mb=\"$12\">\n        <Text mb=\"$2\">Value: {JSON.stringify(controlledMultiValue())}</Text>\n        <Select multiple value={controlledMultiValue()} onChange={setControlledMultiValue}>\n          <SelectTrigger>\n            <SelectPlaceholder>Choose some frameworks</SelectPlaceholder>\n            <SelectValue />\n            <SelectIcon />\n          </SelectTrigger>\n          <SelectContent>\n            <SelectListbox>\n              <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n                {item => (\n                  <SelectOption value={item}>\n                    <SelectOptionText>{item}</SelectOptionText>\n                    <SelectOptionIndicator />\n                  </SelectOption>\n                )}\n              </For>\n            </SelectListbox>\n          </SelectContent>\n        </Select>\n      </Preview>\n      <SectionTitle id=\"composition\">Composition</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Select</Code> is made up of several components that you can customize to achieve your\n        desired design.\n      </Text>\n      <Preview snippet={snippets.composition} mb=\"$6\">\n        <Select multiple offset={-1}>\n          <SelectTrigger rounded=\"$none\" _focus={{ shadow: \"$none\", borderColor: \"$warning7\" }}>\n            <SelectPlaceholder color=\"$neutral12\" fontSize=\"$sm\">\n              Choose some frameworks\n            </SelectPlaceholder>\n            <SelectValue>\n              {({ selectedOptions }) => (\n                <hope.span fontSize=\"$sm\">\n                  {selectedOptions\n                    .map(option => option.textValue)\n                    .join(\", \")\n                    .trim()}\n                </hope.span>\n              )}\n            </SelectValue>\n            <SelectIcon as={IconCaretDown} rotateOnOpen boxSize=\"$6\" color=\"$warning10\" />\n          </SelectTrigger>\n          <SelectContent rounded=\"$none\" shadow=\"$xl\" borderColor=\"$warning7\">\n            <Box px=\"$3\" py=\"$2\">\n              You can put a header here\n            </Box>\n            <Divider />\n            <SelectListbox px=\"0\" py=\"$1\" maxH=\"$96\">\n              <SelectOptGroup>\n                <SelectLabel>Old school</SelectLabel>\n                <For each={[\"React\", \"Angular\", \"Vue\"]}>\n                  {option => (\n                    <SelectOption\n                      value={option}\n                      rounded=\"$none\"\n                      fontSize=\"$sm\"\n                      _active={{ bg: \"$warning3\", color: \"$warning11\" }}\n                      _selected={{ bg: \"$warning9\", color: \"white\" }}\n                    >\n                      <SelectOptionText _groupSelected={{ fontWeight: \"$medium\" }}>\n                        {option}\n                      </SelectOptionText>\n                    </SelectOption>\n                  )}\n                </For>\n              </SelectOptGroup>\n              <SelectOptGroup>\n                <SelectLabel>New school</SelectLabel>\n                <For each={[\"Svelte\", \"Solid\"]}>\n                  {option => (\n                    <SelectOption\n                      value={option}\n                      rounded=\"$none\"\n                      fontSize=\"$sm\"\n                      _active={{ bg: \"$warning3\", color: \"$warning11\" }}\n                      _selected={{ bg: \"$warning9\", color: \"white\" }}\n                    >\n                      <SelectOptionText _groupSelected={{ fontWeight: \"$medium\" }}>\n                        {option}\n                      </SelectOptionText>\n                    </SelectOption>\n                  )}\n                </For>\n              </SelectOptGroup>\n            </SelectListbox>\n            <Divider />\n            <Box px=\"$3\" py=\"$2\">\n              Or put a footer here\n            </Box>\n          </SelectContent>\n        </Select>\n      </Preview>\n      <Alert status=\"warning\" mb=\"$12\">\n        <AlertDescription>\n          Obviously, don't make ugly design like the above example 😅.\n        </AlertDescription>\n      </Alert>\n      <SectionTitle id=\"simple-select\">Simple select</SectionTitle>\n      <Text mb=\"$5\">\n        If you don't need to customize every parts of <Code>Select</Code> and want a simpler API,\n        Hope UI exposes the <Code>SimpleSelect</Code> and <Code>SimpleOption</Code> components.\n        Those are just abstraction over the base <Code>Select</Code> component.\n      </Text>\n      <Preview snippet={snippets.simpleSelect} mb=\"$5\">\n        <SimpleSelect placeholder=\"Choose a framework\">\n          <SimpleOption value=\"react\">React</SimpleOption>\n          <SimpleOption value=\"angular\" disabled>\n            Angular\n          </SimpleOption>\n          <SimpleOption value=\"vue\">Vue</SimpleOption>\n          <SimpleOption value=\"svelte\">Svelte</SimpleOption>\n          <SimpleOption value=\"solid\">Solid</SimpleOption>\n        </SimpleSelect>\n      </Preview>\n      <Alert status=\"warning\" mb=\"$12\">\n        <AlertDescription>\n          If you want to build your own abstraction you can look at the{\" \"}\n          <Anchor\n            href=\"https://github.com/fabien-ml/hope-ui/tree/main/src/components/simple-select\"\n            external\n            color=\"$primary11\"\n            fontWeight=\"$semibold\"\n          >\n            SimpleSelect implementation\n          </Anchor>\n          .\n        </AlertDescription>\n      </Alert>\n      <SectionTitle id=\"accessibility\">Accessibility</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Select</Code> follow the{\" \"}\n        <Anchor\n          href=\"https://www.w3.org/TR/wai-aria-practices-1.2/examples/combobox/combobox-select-only.html\"\n          external\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          WAI ARIA Select-Only Combobox\n        </Anchor>{\" \"}\n        design pattern.\n      </Text>\n      <SectionSubtitle>ARIA roles and attributes</SectionSubtitle>\n      <UnorderedList spacing=\"$2\" mb=\"$8\">\n        <ListItem>\n          <Code>SelectTrigger</Code> has <Code>role</Code> of <Code>combobox</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>SelectTrigger</Code> has <Code>aria-haspopup</Code> set to <Code>listbox</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>SelectTrigger</Code> has <Code>aria-controls</Code> set to the <Code>id</Code> of{\" \"}\n          <Code>SelectListbox</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>SelectTrigger</Code> has <Code>aria-expanded</Code> set to <Code>true</Code> when\n          the listbox is displayed and <Code>false</Code> otherwise.\n        </ListItem>\n        <ListItem>\n          When the select is open, <Code>SelectTrigger</Code> has <Code>aria-activedescendant</Code>{\" \"}\n          set to the <Code>id</Code> of the active <Code>SelectOption</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>SelectListbox</Code> has <Code>role</Code> of <Code>listbox</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>SelectOption</Code> has <Code>role</Code> of <Code>option</Code>.\n        </ListItem>\n        <ListItem>\n          The selected <Code>SelectOption</Code> has <Code>aria-selected</Code> set to{\" \"}\n          <Code>true</Code>.\n        </ListItem>\n      </UnorderedList>\n      <SectionSubtitle>Keyboard support (closed select)</SectionSubtitle>\n      <UnorderedList spacing=\"$2\" mb=\"$8\">\n        <ListItem>\n          <Kbd>enter</Kbd>, <Kbd>space</Kbd> , <Kbd>↓</Kbd> and <Kbd>↑</Kbd> opens the select and\n          move visual focus to the first option or the selected one.\n        </ListItem>\n        <ListItem>\n          <Kbd>home</Kbd> open the select and move visual focus to the first option.\n        </ListItem>\n        <ListItem>\n          <Kbd>end</Kbd> open the select and move visual focus to the last option.\n        </ListItem>\n        <ListItem>\n          In multi-select, <Kbd>backspace</Kbd> remove the last selected option.\n        </ListItem>\n      </UnorderedList>\n      <SectionSubtitle>Keyboard support (opened select)</SectionSubtitle>\n      <UnorderedList spacing=\"$2\" mb=\"$8\">\n        <ListItem>\n          <Kbd>enter</Kbd>, <Kbd>space</Kbd> or <Kbd>alt</Kbd> + <Kbd>↑</Kbd> select the option and\n          close the select.\n        </ListItem>\n        <ListItem>\n          <Kbd>↓</Kbd> move visual focus to the next option.\n        </ListItem>\n        <ListItem>\n          <Kbd>↑</Kbd> move visual focus to the previous option.\n        </ListItem>\n        <ListItem>\n          <Kbd>home</Kbd> and <Kbd>pageup</Kbd> move visual focus to the first option.\n        </ListItem>\n        <ListItem>\n          <Kbd>end</Kbd> and <Kbd>pagedown</Kbd> move visual focus to the last option.\n        </ListItem>\n        <ListItem>\n          <Kbd>tab</Kbd> closes the select and moves focus to the next focusable element.\n        </ListItem>\n        <ListItem>\n          <Kbd>esc</Kbd> closes the select.\n        </ListItem>\n        <ListItem>\n          In multi-select, <Kbd>backspace</Kbd> remove the last selected option.\n        </ListItem>\n      </UnorderedList>\n      <SectionSubtitle>Typeahead behavior</SectionSubtitle>\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          Any printable characters move visual focus to the first option that matches the typed\n          character.\n        </ListItem>\n        <ListItem>\n          If multiple keys are typed in quick succession, visual focus moves to the first option\n          that matches the full string.\n        </ListItem>\n        <ListItem>\n          If the same character is typed in succession, visual focus cycles among the options\n          starting with that character.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Select</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"select-props\">Select props</SectionSubtitle>\n      <PropsTable items={selectPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"select-option-props\">SelectOption props</SectionSubtitle>\n      <PropsTable items={selectOptionPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"select-value-props\">SelectValue props</SectionSubtitle>\n      <PropsTable items={selectValuePropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"select-icon-props\">SelectIcon props</SectionSubtitle>\n      <PropsTable items={selectIconPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"other-components-props\">Other components props</SectionSubtitle>\n      <Text>\n        All other components composes{\" \"}\n        <Anchor as={Link} href=\"/docs/layout/box\" color=\"$primary11\" fontWeight=\"$semibold\">\n          Box\n        </Anchor>\n        .\n      </Text>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-entry/select/snippets.ts",
    "content": "const importComponent = `import { \n  Select,\n  SelectTrigger,\n  SelectPlaceholder,\n  SelectValue,\n  SelectTag,\n  SelectTagCloseButton,\n  SelectIcon,\n  SelectContent,\n  SelectListbox,\n  SelectOptGroup,\n  SelectLabel,\n  SelectOption,\n  SelectOptionText,\n  SelectOptionIndicator,\n} from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Select>\n  <SelectTrigger>\n    <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n    <SelectValue />\n    <SelectIcon />\n  </SelectTrigger>\n  <SelectContent>\n    <SelectListbox>\n      <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n        {item => (\n          <SelectOption value={item}>\n            <SelectOptionText>{item}</SelectOptionText>\n            <SelectOptionIndicator />\n          </SelectOption>\n        )}\n      </For>\n    </SelectListbox>\n  </SelectContent>\n</Select>`;\n\nconst triggerSizes = `<VStack spacing=\"$4\">\n  <Select size=\"xs\">...</Select>\n  <Select size=\"sm\">...</Select>\n  <Select size=\"md\">...</Select>\n  <Select size=\"lg\">...</Select>\n</VStack>`;\n\nconst triggerVariants = `<VStack spacing=\"$4\">\n  <Select variant=\"outline\">...</Select>\n  <Select variant=\"filled\">...</Select>\n  <Select variant=\"unstyled\">...</Select>\n</VStack>`;\n\nconst disabledState = `<Select disabled>\n  <SelectTrigger>\n    <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n    <SelectValue />\n    <SelectIcon />\n  </SelectTrigger>\n  <SelectContent>\n    <SelectListbox>\n      <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n        {item => (\n          <SelectOption value={item}>\n            <SelectOptionText>{item}</SelectOptionText>\n            <SelectOptionIndicator />\n          </SelectOption>\n        )}\n      </For>\n    </SelectListbox>\n  </SelectContent>\n</Select>`;\n\nconst invalidState = `<Select invalid>\n  <SelectTrigger>\n    <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n    <SelectValue />\n    <SelectIcon />\n  </SelectTrigger>\n  <SelectContent>\n    <SelectListbox>\n      <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n        {item => (\n          <SelectOption value={item}>\n            <SelectOptionText>{item}</SelectOptionText>\n            <SelectOptionIndicator />\n          </SelectOption>\n        )}\n      </For>\n    </SelectListbox>\n  </SelectContent>\n</Select>`;\n\nconst defaultValue = `<Select defaultValue=\"Solid\">\n  <SelectTrigger>\n    <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n    <SelectValue />\n    <SelectIcon />\n  </SelectTrigger>\n  <SelectContent>\n    <SelectListbox>\n      <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n        {item => (\n          <SelectOption value={item}>\n            <SelectOptionText>{item}</SelectOptionText>\n            <SelectOptionIndicator />\n          </SelectOption>\n        )}\n      </For>\n    </SelectListbox>\n  </SelectContent>\n</Select>`;\n\nconst disabledOption = `<Select>\n  <SelectTrigger>\n    <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n    <SelectValue />\n    <SelectIcon />\n  </SelectTrigger>\n  <SelectContent>\n    <SelectListbox>\n      <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n        {item => (\n          <SelectOption value={item} disabled={item === \"Angular\"}>\n            <SelectOptionText>{item}</SelectOptionText>\n            <SelectOptionIndicator />\n          </SelectOption>\n        )}\n      </For>\n    </SelectListbox>\n  </SelectContent>\n</Select>`;\n\nconst optionGroup = `<Select>\n  <SelectTrigger>\n    <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n    <SelectValue />\n    <SelectIcon />\n  </SelectTrigger>\n  <SelectContent>\n    <SelectListbox maxH=\"$96\">\n      <SelectOptGroup>\n        <SelectLabel>Old school</SelectLabel>\n        <For each={[\"React\", \"Angular\", \"Vue\"]}>\n          {item => (\n            <SelectOption value={item}>\n              <SelectOptionText>{item}</SelectOptionText>\n              <SelectOptionIndicator />\n            </SelectOption>\n          )}\n        </For>\n      </SelectOptGroup>\n      <SelectOptGroup>\n        <SelectLabel>New school</SelectLabel>\n        <For each={[\"Svelte\", \"Solid\"]}>\n          {item => (\n            <SelectOption value={item}>\n              <SelectOptionText>{item}</SelectOptionText>\n              <SelectOptionIndicator />\n            </SelectOption>\n          )}\n        </For>\n      </SelectOptGroup>\n    </SelectListbox>\n  </SelectContent>\n</Select>`;\n\nconst typeaheadComplexOption = `const frameworks = [\n  { \n    id: 1,\n    name: \"React\", \n    tagLine: \"A JavaScript library for building user interfaces\" \n  },\n  { \n    id: 2, \n    name: \"Angular\", \n    tagLine: \"The modern web developer's platform\" \n  },\n  { \n    id: 3, \n    name: \"Vue\", \n    tagLine: \"The progressive javaScript framework\" \n  },\n  { \n    id: 4, \n    name: \"Svelte\",\n     tagLine: \"Cybernetically enhanced web apps\"\n  },\n  {\n    id: 5,\n    name: \"Solid\",\n    tagLine: \"Simple and performant reactivity for building user interfaces\",\n  },\n];\n\nfunction ComplexTypeaheadExample() {\n  return (\n    <Select>\n      <SelectTrigger>\n        <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n        <SelectValue />\n        <SelectIcon />\n      </SelectTrigger>\n      <SelectContent>\n        <SelectListbox maxH=\"$xs\">\n          <For each={frameworks}>\n            {item => (\n              <SelectOption value={item.id} textValue={item.name} px=\"$3\" py=\"$1\">\n                <VStack alignItems=\"flex-start\">\n                  <Text>{item.name}</Text>\n                  <Text size=\"sm\" color=\"$neutral11\">\n                    {item.tagLine}\n                  </Text>\n                </VStack>\n                <SelectOptionIndicator />\n              </SelectOption>\n            )}\n          </For>\n        </SelectListbox>\n      </SelectContent>\n    </Select>\n  )\n}`;\n\nconst controlled = `function Example() {\n  const [value, setValue] = createSignal(\"\");\n\n  return (\n    <>\n      <Text mb=\"$2\">Value: {value()}</Text>\n      <Select value={value()} onChange={setValue}>\n        <SelectTrigger>\n          <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n          <SelectValue />\n          <SelectIcon />\n        </SelectTrigger>\n        <SelectContent>\n          <SelectListbox>\n            <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n              {item => (\n                <SelectOption value={item}>\n                  <SelectOptionText>{item}</SelectOptionText>\n                  <SelectOptionIndicator />\n                </SelectOption>\n              )}\n            </For>\n          </SelectListbox>\n        </SelectContent>\n      </Select>\n    </>\n  )\n}`;\n\nconst multiSelectBasicUsage = `<Select multiple>\n  <SelectTrigger>\n    <SelectPlaceholder>Choose some frameworks</SelectPlaceholder>\n    <SelectValue />\n    <SelectIcon />\n  </SelectTrigger>\n  <SelectContent>\n    <SelectListbox>\n      <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n        {item => (\n          <SelectOption value={item}>\n            <SelectOptionText>{item}</SelectOptionText>\n            <SelectOptionIndicator />\n          </SelectOption>\n        )}\n      </For>\n    </SelectListbox>\n  </SelectContent>\n</Select>`;\n\nconst multiSelectDefaultValues = `<Select multiple defaultValue={[\"React\", \"Solid\"]}>\n  <SelectTrigger>\n    <SelectPlaceholder>Choose some frameworks</SelectPlaceholder>\n    <SelectValue />\n    <SelectIcon />\n  </SelectTrigger>\n  <SelectContent>\n    <SelectListbox>\n      <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n        {item => (\n          <SelectOption value={item}>\n            <SelectOptionText>{item}</SelectOptionText>\n            <SelectOptionIndicator />\n          </SelectOption>\n        )}\n      </For>\n    </SelectListbox>\n  </SelectContent>\n</Select>`;\n\nconst multiSelectControlled = `function Example() {\n  const [value, setValue] = createSignal([]);\n\n  return (\n    <>\n      <Text mb=\"$2\">Value: {JSON.stringify(value())}</Text>\n      <Select multiple value={value()} onChange={setValue}>\n        <SelectTrigger>\n          <SelectPlaceholder>Choose some frameworks</SelectPlaceholder>\n          <SelectValue />\n          <SelectIcon />\n        </SelectTrigger>\n        <SelectContent>\n          <SelectListbox>\n            <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n              {item => (\n                <SelectOption value={item}>\n                  <SelectOptionText>{item}</SelectOptionText>\n                  <SelectOptionIndicator />\n                </SelectOption>\n              )}\n            </For>\n          </SelectListbox>\n        </SelectContent>\n      </Select>\n    </>\n  )\n}`;\n\nconst simpleSelect = `<SimpleSelect placeholder=\"Choose a framework\">\n  <SimpleOption value=\"react\">React</SimpleOption>\n  <SimpleOption value=\"angular\" disabled>Angular</SimpleOption>\n  <SimpleOption value=\"vue\">Vue</SimpleOption>\n  <SimpleOption value=\"svelte\">Svelte</SimpleOption>\n  <SimpleOption value=\"solid\">Solid</SimpleOption>\n</SimpleSelect>`;\n\nconst composition = `<Select multiple offset={-1}>\n  <SelectTrigger \n    rounded=\"$none\" \n    _focus={{ \n      shadow: \"$none\", \n      borderColor: \"$warning7\" \n    }}\n  >\n    <SelectPlaceholder color=\"$neutral12\" fontSize=\"$sm\">\n      Choose some frameworks\n    </SelectPlaceholder>\n    <SelectValue>\n      {({ selectedOptions }) => (\n        <hope.span fontSize=\"$sm\">\n          {selectedOptions\n            .map(option => option.textValue)\n            .join(\", \")\n            .trim()}\n        </hope.span>\n      )}\n    </SelectValue>\n    <SelectIcon \n      as={IconCaretDown} \n      rotateOnOpen \n      boxSize=\"$6\" \n      color=\"$warning10\" \n    />\n  </SelectTrigger>\n  <SelectContent rounded=\"$none\" shadow=\"$xl\" borderColor=\"$warning7\">\n    <Box px=\"$3\" py=\"$2\">\n      You can put a header here\n    </Box>\n    <Divider />\n    <SelectListbox px=\"0\" py=\"$1\" maxH=\"$96\">\n      <SelectOptGroup>\n        <SelectLabel>Old school</SelectLabel>\n        <For each={[\"React\", \"Angular\", \"Vue\"]}>\n          {option => (\n            <SelectOption\n              value={option}\n              rounded=\"$none\"\n              fontSize=\"$sm\"\n              _active={{ bg: \"$warning3\", color: \"$warning11\" }}\n              _selected={{ bg: \"$warning9\", color: \"white\" }}\n            >\n              <SelectOptionText _groupSelected={{ fontWeight: \"$medium\" }}>\n                {option}\n              </SelectOptionText>\n            </SelectOption>\n          )}\n        </For>\n      </SelectOptGroup>\n      <SelectOptGroup>\n        <SelectLabel>New school</SelectLabel>\n        <For each={[\"Svelte\", \"Solid\"]}>\n          {option => (\n            <SelectOption\n              value={option}\n              rounded=\"$none\"\n              fontSize=\"$sm\"\n              _active={{ bg: \"$warning3\", color: \"$warning11\" }}\n              _selected={{ bg: \"$warning9\", color: \"white\" }}\n            >\n              <SelectOptionText _groupSelected={{ fontWeight: \"$medium\" }}>\n                {option}\n              </SelectOptionText>\n            </SelectOption>\n          )}\n        </For>\n      </SelectOptGroup>\n    </SelectListbox>\n    <Divider />\n    <Box px=\"$3\" py=\"$2\">\n      Or put a footer here\n    </Box>\n  </SelectContent>\n</Select>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Select: {\n      baseStyle: {\n        trigger: SystemStyleObject\n        placeholder: SystemStyleObject\n        singleValue: SystemStyleObject\n        multiValue: SystemStyleObject\n        tag: SystemStyleObject\n        tagCloseButton: SystemStyleObject\n        icon: SystemStyleObject\n        content: SystemStyleObject\n        listbox: SystemStyleObject\n        optgroup: SystemStyleObject\n        label: SystemStyleObject\n        option: SystemStyleObject\n        optionText: SystemStyleObject\n        optionIndicator: SystemStyleObject\n      },\n      defaultProps: {\n        root: ThemeableSelectOptions\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  triggerSizes,\n  triggerVariants,\n  disabledState,\n  invalidState,\n  defaultValue,\n  disabledOption,\n  optionGroup,\n  typeaheadComplexOption,\n  controlled,\n  multiSelectBasicUsage,\n  multiSelectDefaultValues,\n  multiSelectControlled,\n  simpleSelect,\n  composition,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-entry/switch/index.tsx",
    "content": "import {\n  Anchor,\n  Box,\n  css,\n  HStack,\n  ListItem,\n  Switch,\n  SwitchPrimitive,\n  SwitchPrimitiveThumb,\n  Text,\n  UnorderedList,\n  VStack,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Link } from \"solid-app-router\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nconst switchRootClass = css({\n  display: \"inline-flex\",\n  alignItems: \"center\",\n  border: \"1px solid $neutral7\",\n  rounded: \"$sm\",\n  px: \"$5\",\n  py: \"$3\",\n  w: \"$full\",\n  cursor: \"pointer\",\n  userSelect: \"none\",\n  transition: \"box-shadow 250ms\",\n\n  _focus: {\n    borderColor: \"$primary7\",\n    shadow: \"0 0 0 3px $colors$primary5\",\n  },\n});\n\nconst switchControlClass = css({\n  all: \"unset\",\n  width: 34,\n  height: 12,\n  backgroundColor: \"$blackAlpha9\",\n  borderRadius: \"9999px\",\n  position: \"relative\",\n  boxShadow: \"0 2px 10px $colors$blackAlpha7\",\n  transition: \"background-color 250ms\",\n\n  _groupChecked: {\n    backgroundColor: \"$primary9\",\n  },\n});\n\nconst switchThumbClass = css({\n  display: \"block\",\n  width: 20,\n  height: 20,\n  backgroundColor: \"white\",\n  borderRadius: \"9999px\",\n  boxShadow: \"0 0 2px $colors$blackAlpha7\",\n  transition: \"transform 250ms\",\n  transform: \"translate(-4px, -4px)\",\n  willChange: \"transform\",\n\n  _checked: {\n    transform: \"translate(16px, -4px)\",\n  },\n});\n\nexport default function SwitchDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/data-entry/select\",\n    label: \"Select\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/data-entry/textarea\",\n    label: \"Textarea\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#colors\", label: \"Switch colors\", indent: true },\n    { href: \"#sizes\", label: \"Switch sizes\", indent: true },\n    { href: \"#variants\", label: \"Switch variants\", indent: true },\n    { href: \"#label-placement\", label: \"Switch label placement\", indent: true },\n    { href: \"#disabled\", label: \"Disabled state\", indent: true },\n    { href: \"#invalid\", label: \"Invalid state\", indent: true },\n    { href: \"#headless-api\", label: \"Headless API\" },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#switch-primitive-props\", label: \"SwitchPrimitive props\", indent: true },\n    { href: \"#switch-props\", label: \"Switch props\", indent: true },\n  ];\n\n  const switchPrimitivePropItems: PropsTableItem[] = [\n    {\n      name: \"id\",\n      description: \"The id to be passed to the internal <input> tag.\",\n      type: \"string\",\n    },\n    {\n      name: \"name\",\n      description: \"The name to be passed to the internal <input> tag.\",\n      type: \"string\",\n    },\n    {\n      name: \"value\",\n      description:\n        \"The value to be used in the switch input. This is the value that will be returned on form submission.\",\n      type: \"string | number\",\n    },\n    {\n      name: \"checked\",\n      description:\n        \"If `true`, the switch will be checked. You'll need to pass `onChange` to update its value (since it is now controlled).\",\n      type: \"boolean\",\n    },\n    {\n      name: \"defaultChecked\",\n      description: \"If `true`, the switch will be initially checked.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"required\",\n      description:\n        \"If `true`, the switch is marked as required, and `required` attribute will be added\",\n      type: \"boolean\",\n    },\n    {\n      name: \"disabled\",\n      description: \"If `true`, the switch will be disabled.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"invalid\",\n      description: \"If `true`, the switch will have `aria-invalid` set to `true`.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"readOnly\",\n      description: \"If `true`, the switch will be readonly.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"children\",\n      description:\n        \"The children of the switch. If used as a render props, the internal state will be passed.\",\n      type: \"JSX.Element | (props: { state: Accessor<SwitchState> }) => JSX.Element\",\n    },\n    {\n      name: \"onChange\",\n      description: \"The callback invoked when the checked state of the `Switch` changes.\",\n      type: \"JSX.EventHandlerUnion<HTMLInputElement, Event>\",\n    },\n    {\n      name: \"onFocus\",\n      description: \"The callback invoked when the switch is focused.\",\n      type: \"JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>\",\n    },\n    {\n      name: \"onBlur\",\n      description: \"The callback invoked when the switch is blurred (loses focus).\",\n      type: \"JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>\",\n    },\n  ];\n\n  const switchPropItems: PropsTableItem[] = [\n    {\n      name: \"variant\",\n      description: \"The visual style of the switch.\",\n      type: '\"outline\" | \"filled\"',\n      defaultValue: '\"filled\"',\n    },\n    {\n      name: \"colorScheme\",\n      description: \"The color of the switch.\",\n      type: '\"primary\" | \"accent\" | \"neutral\" | \"success\" | \"info\" | \"warning\" | \"danger\"',\n      defaultValue: '\"primary\"',\n    },\n    {\n      name: \"size\",\n      description: \"The size of the switch.\",\n      type: '\"sm\" | \"md\" | \"lg\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"labelPlacement\",\n      description: \"The placement of the switch label.\",\n      type: '\"start\" | \"end\"',\n      defaultValue: '\"start\"',\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Switch</PageTitle>\n      <Text mb=\"$5\">\n        The <Code>Switch</Code> component is used as an alternative for the{\" \"}\n        <Anchor\n          as={Link}\n          href=\"/docs/data-entry/checkbox\"\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          Checkbox\n        </Anchor>{\" \"}\n        component. You can switch between enabled or disabled states.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>SwitchPrimitive:</strong> Unstyled component containing all the parts of a switch.\n          It renders a <Code>label</Code> and a visualy hidden <Code>input</Code> with type set to{\" \"}\n          <Code>checkbox</Code> and role set to <Code>switch</Code>.\n        </ListItem>\n        <ListItem>\n          <strong>SwitchPrimitiveThumb:</strong> The thumb that is used to visually indicate whether\n          the switch is on or off.\n        </ListItem>\n        <ListItem>\n          <strong>Switch:</strong> The Hope UI styled switch component based on{\" \"}\n          <Code>SwitchPrimitive</Code>.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$5\"></Text>\n      <Preview snippet={snippets.basicUsage} mb=\"$12\">\n        <Switch defaultChecked>Switch</Switch>\n      </Preview>\n      <SectionSubtitle id=\"colors\">Switch colors</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>colorScheme</Code> prop to change the color of the Switch. You can set the\n        value to <Code>primary</Code>, <Code>accent</Code>, <Code>neutral</Code>,{\" \"}\n        <Code>success</Code>, <Code>info</Code>, <Code>warning</Code> or <Code>danger</Code>.\n      </Text>\n      <Preview snippet={snippets.switchColors} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Switch defaultChecked colorScheme=\"primary\" />\n          <Switch defaultChecked colorScheme=\"accent\" />\n          <Switch defaultChecked colorScheme=\"neutral\" />\n          <Switch defaultChecked colorScheme=\"success\" />\n          <Switch defaultChecked colorScheme=\"info\" />\n          <Switch defaultChecked colorScheme=\"warning\" />\n          <Switch defaultChecked colorScheme=\"danger\" />\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"sizes\">Switch sizes</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>size</Code> prop to change the size of the Switch. You can set the value to{\" \"}\n        <Code>sm</Code>, <Code>md</Code> or <Code>lg</Code>.\n      </Text>\n      <Preview snippet={snippets.switchSizes} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Switch defaultChecked size=\"sm\">\n            Switch\n          </Switch>\n          <Switch defaultChecked size=\"md\">\n            Switch\n          </Switch>\n          <Switch defaultChecked size=\"lg\">\n            Switch\n          </Switch>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"variants\">Switch variants</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>variant</Code> prop to change the visual style of the Switch. You can set the\n        value to <Code>outline</Code> or <Code>filled</Code>.\n      </Text>\n      <Preview snippet={snippets.switchVariants} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Switch variant=\"filled\">Switch</Switch>\n          <Switch variant=\"outline\">Switch</Switch>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"label-placement\">Switch label placement</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>labelPlacement</Code> prop to change the placement of the label. You can set\n        the value to <Code>start</Code> or <Code>end</Code>.\n      </Text>\n      <Preview snippet={snippets.switchLabelPlacement} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Switch labelPlacement=\"start\">Switch</Switch>\n          <Switch labelPlacement=\"end\">Switch</Switch>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"disabled\">Disabled state</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>disabled</Code> prop to disable the Switch.\n      </Text>\n      <Preview snippet={snippets.switchDisabled} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Switch disabled>Switch</Switch>\n          <Switch variant=\"outline\" disabled>\n            Switch\n          </Switch>\n          <Switch defaultChecked disabled>\n            Switch\n          </Switch>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"invalid\">Invalid state</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>invalid</Code> prop to mark the Switch as invalid.\n      </Text>\n      <Preview snippet={snippets.switchInvalid} mb=\"$12\">\n        <HStack spacing=\"$4\">\n          <Switch invalid>Switch</Switch>\n          <Switch variant=\"outline\" invalid>\n            Switch\n          </Switch>\n          <Switch defaultChecked invalid>\n            Switch\n          </Switch>\n        </HStack>\n      </Preview>\n      <SectionTitle id=\"headless-api\">Headless API</SectionTitle>\n      <Text mb=\"$5\">\n        Use the unstyled <Code>SwitchPrimitive</Code> component to achieve your desired design. You\n        can pair it with your styling solution of choice. The below example uses style props and the{\" \"}\n        <Code>css</Code> function.\n      </Text>\n      <Preview snippet={snippets.headless} mb=\"$12\">\n        <SwitchPrimitive class={switchRootClass()}>\n          <VStack w=\"$full\" alignItems=\"flex-start\">\n            <Text size=\"sm\" fontWeight=\"$semibold\">\n              Annual billing\n            </Text>\n            <Text size=\"xs\" color=\"$neutral11\">\n              Save 10%\n            </Text>\n          </VStack>\n          <Box class={switchControlClass()}>\n            <SwitchPrimitiveThumb class={switchThumbClass()} />\n          </Box>\n        </SwitchPrimitive>\n      </Preview>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Switch</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"switch-primitive-props\">SwitchPrimitive props</SectionSubtitle>\n      <PropsTable items={switchPrimitivePropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"switch-props\">Switch props</SectionSubtitle>\n      <Text mb=\"$5\">\n        <Code>Switch</Code> composes the <Code>SwitchPrimitive</Code> component, so you can pass all\n        its props. These are props specific to the <Code>Switch</Code> component:\n      </Text>\n      <PropsTable items={switchPropItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-entry/switch/snippets.ts",
    "content": "const importComponent = `import { \n  SwitchPrimitive,\n  SwitchPrimitiveThumb,\n  Switch \n} from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Switch defaultChecked>Switch</Switch>`;\n\nconst switchColors = `<HStack spacing=\"$4\">\n  <Switch defaultChecked colorScheme=\"primary\" />\n  <Switch defaultChecked colorScheme=\"accent\" />\n  <Switch defaultChecked colorScheme=\"neutral\" />\n  <Switch defaultChecked colorScheme=\"success\" />\n  <Switch defaultChecked colorScheme=\"info\" />\n  <Switch defaultChecked colorScheme=\"warning\" />\n  <Switch defaultChecked colorScheme=\"danger\" />\n</HStack>`;\n\nconst switchSizes = `<HStack spacing=\"$4\">\n  <Switch defaultChecked size=\"sm\">Switch</Switch>\n  <Switch defaultChecked size=\"md\">Switch</Switch>\n  <Switch defaultChecked size=\"lg\">Switch</Switch>\n</HStack>`;\n\nconst switchVariants = `<HStack spacing=\"$4\">\n  <Switch variant=\"filled\">Switch</Switch>\n  <Switch variant=\"outline\">Switch</Switch>\n</HStack>`;\n\nconst switchLabelPlacement = `<HStack spacing=\"$4\">\n  <Switch LabelPlacement=\"start\">Switch</Switch>\n  <Switch LabelPlacement=\"end\">Switch</Switch>\n</HStack>`;\n\nconst switchDisabled = `<HStack spacing=\"$4\">\n  <Switch disabled>Switch</Switch>\n  <Switch variant=\"outline\" disabled>Switch</Switch>\n  <Switch defaultChecked disabled>Switch</Switch>\n</HStack>`;\n\nconst switchInvalid = `<HStack spacing=\"$4\">\n  <Switch invalid>Switch</Switch>\n  <Switch variant=\"outline\" invalid>Switch</Switch>\n  <Switch defaultChecked invalid>Switch</Switch>\n</HStack>`;\n\nconst headless = `import { css } from \"@hope-ui/solid\"\n\nconst switchRootClass = css({\n  display: \"inline-flex\",\n  alignItems: \"center\",\n  border: \"1px solid $neutral7\",\n  rounded: \"$sm\",\n  px: \"$5\",\n  py: \"$3\",\n  w: \"$full\",\n  cursor: \"pointer\",\n  userSelect: \"none\",\n  transition: \"box-shadow 250ms\",\n\n  _focus: {\n    borderColor: \"$primary7\",\n    shadow: \"0 0 0 3px $colors$primary5\",\n  },\n});\n\nconst switchControlClass = css({\n  all: \"unset\",\n  width: 34,\n  height: 12,\n  backgroundColor: \"$blackAlpha9\",\n  borderRadius: \"9999px\",\n  position: \"relative\",\n  boxShadow: \"0 2px 10px $colors$blackAlpha7\",\n  transition: \"background-color 250ms\",\n\n  _groupChecked: {\n    backgroundColor: \"$primary9\",\n  },\n});\n\nconst switchThumbClass = css({\n  display: \"block\",\n  width: 20,\n  height: 20,\n  backgroundColor: \"white\",\n  borderRadius: \"9999px\",\n  boxShadow: \"0 0 2px $colors$blackAlpha7\",\n  transition: \"transform 250ms\",\n  transform: \"translate(-4px, -4px)\",\n  willChange: \"transform\",\n\n  _checked: {\n    transform: \"translate(16px, -4px)\",\n  },\n});\n\nfunction HeadlessExample() {\n  return (\n    <SwitchPrimitive class={switchRootClass()}>\n      <VStack w=\"$full\" alignItems=\"flex-start\">\n        <Text size=\"sm\" fontWeight=\"$semibold\">\n          Annual billing\n        </Text>\n        <Text size=\"xs\" color=\"$neutral11\">\n          Save 10%\n        </Text>\n      </VStack>\n      <Box class={switchControlClass()}>\n        <SwitchPrimitiveThumb class={switchThumbClass()} />\n      </Box>\n    </SwitchPrimitive>\n  );\n}\n`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Switch: {\n      baseStyle: {\n        root: SystemStyleObject,\n        control: SystemStyleObject,\n        label: SystemStyleObject,\n      },\n      defaultProps: {\n        root: ThemeableSwitchOptions,\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  switchColors,\n  switchSizes,\n  switchVariants,\n  switchLabelPlacement,\n  switchDisabled,\n  switchInvalid,\n  headless,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-entry/textarea/index.tsx",
    "content": "import { Text, Textarea, VStack } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { createSignal, onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function TextareaDoc() {\n  const [value, setValue] = createSignal(\"\");\n  const handleInput = (event: Event) => setValue((event.target as HTMLTextAreaElement).value);\n\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/data-entry/switch\",\n    label: \"Switch\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/data-display/accordion\",\n    label: \"Accordion\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#sizes\", label: \"Textarea sizes\", indent: true },\n    { href: \"#variants\", label: \"Textarea variants\", indent: true },\n    { href: \"#disabled\", label: \"Disabled state\", indent: true },\n    { href: \"#invalid\", label: \"Invalid state\", indent: true },\n    { href: \"#controlled\", label: \"Controlled textarea\", indent: true },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"variant\",\n      description: \"The visual style of the textarea.\",\n      type: '\"outline\" | \"filled\" | \"unstyled\"',\n      defaultValue: '\"outline\"',\n    },\n    {\n      name: \"size\",\n      description: \"The size of the textarea's text.\",\n      type: '\"xs\" | \"sm\" | \"md\" | \"lg\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"required\",\n      description:\n        \"If `true`, the textarea is marked as required, and `required` attribute will be added\",\n      type: \"boolean\",\n    },\n    {\n      name: \"disabled\",\n      description: \"If `true`, the textarea will be disabled.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"invalid\",\n      description: \"If `true`, the textarea will have `aria-invalid` set to `true`.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"readOnly\",\n      description: \"If `true`, the textarea will be readonly.\",\n      type: \"boolean\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Textarea</PageTitle>\n      <Text mb=\"$5\">\n        The <Code>Textarea</Code> component allows you to easily create multi-line text textareas.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$12\">\n        <Textarea placeholder=\"Basic usage\" />\n      </Preview>\n      <SectionSubtitle id=\"sizes\">Textarea sizes</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>size</Code> prop to change the size of the Textarea's text. You can set the\n        value to <Code>xs</Code>, <Code>sm</Code>, <Code>md</Code> or <Code>lg</Code>.\n      </Text>\n      <Preview snippet={snippets.textareaSizes} mb=\"$10\">\n        <VStack spacing=\"$4\">\n          <Textarea placeholder=\"extra small size\" size=\"xs\" />\n          <Textarea placeholder=\"small size\" size=\"sm\" />\n          <Textarea placeholder=\"medium size\" size=\"md\" />\n          <Textarea placeholder=\"large size\" size=\"lg\" />\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"variants\">Textarea variants</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>variant</Code> prop to change the visual style of the Textarea. You can set\n        the value to <Code>outline</Code>, <Code>filled</Code> or <Code>unstyled</Code>.\n      </Text>\n      <Preview snippet={snippets.textareaVariants} mb=\"$10\">\n        <VStack spacing=\"$4\">\n          <Textarea placeholder=\"Outline\" variant=\"outline\" />\n          <Textarea placeholder=\"Filled\" variant=\"filled\" />\n          <Textarea placeholder=\"Unstyled\" variant=\"unstyled\" />\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"disabled\">Disabled state</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>disabled</Code> prop to disable the Textarea.\n      </Text>\n      <Preview snippet={snippets.textareaDisabled} mb=\"$10\">\n        <Textarea disabled placeholder=\"Here is a sample placeholder\" />\n      </Preview>\n      <SectionSubtitle id=\"invalid\">Invalid state</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>invalid</Code> prop to mark the Textarea as invalid.\n      </Text>\n      <Preview snippet={snippets.textareaInvalid} mb=\"$10\">\n        <Textarea invalid placeholder=\"Here is a sample placeholder\" />\n      </Preview>\n      <SectionSubtitle id=\"controlled\">Controlled textarea</SectionSubtitle>\n      <Preview snippet={snippets.controlledTextarea} mb=\"$12\">\n        <Text mb=\"$2\">Value: {value()}</Text>\n        <Textarea\n          value={value()}\n          onInput={handleInput}\n          placeholder=\"Here is a sample placeholder\"\n          size=\"sm\"\n        />\n      </Preview>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Textarea</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/data-entry/textarea/snippets.ts",
    "content": "const importComponent = `import { Textarea } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Textarea placeholder=\"Basic usage\" />`;\n\nconst textareaSizes = `<VStack spacing=\"$4\">\n  <Textarea placeholder=\"extra small size\" size=\"xs\" />\n  <Textarea placeholder=\"small size\" size=\"sm\" />\n  <Textarea placeholder=\"medium size\" size=\"md\" />\n  <Textarea placeholder=\"large size\" size=\"lg\" />\n</VStack>`;\n\nconst textareaVariants = `<VStack spacing=\"$4\">\n  <Textarea placeholder=\"Outline\" variant=\"outline\" />\n  <Textarea placeholder=\"Filled\" variant=\"filled\" />\n  <Textarea placeholder=\"Unstyled\" variant=\"unstyled\" />\n</VStack>`;\n\nconst textareaDisabled = `<Textarea disabled placeholder=\"Here is a sample placeholder\" />`;\n\nconst textareaInvalid = `<Textarea invalid placeholder=\"Here is a sample placeholder\" />`;\n\nconst controlledTextarea = `function Example() {\n  const [value, setValue] = createSignal(\"\");\n  const handleInput = event => setValue(event.target.value);\n\n  return (\n    <>\n      <Text mb=\"$2\">Value: {value()}</Text>\n      <Textarea\n        value={value()}\n        onInput={handleInput}\n        placeholder=\"Here is a sample placeholder\"\n        size=\"sm\"\n      />\n    </>\n  )\n}`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Textarea: {\n      baseStyle: SystemStyleObject,\n      defaultProps: ThemeableTextareaOptions\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  textareaSizes,\n  textareaVariants,\n  textareaDisabled,\n  textareaInvalid,\n  controlledTextarea,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/feedback/alert/index.tsx",
    "content": "import {\n  Alert,\n  AlertDescription,\n  AlertIcon,\n  AlertTitle,\n  Box,\n  CloseButton,\n  ListItem,\n  Text,\n  UnorderedList,\n  VStack,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function AlertDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/navigation/tabs\",\n    label: \"Tabs\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/feedback/circular-progress\",\n    label: \"CircularProgress\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#statuses\", label: \"Alert statuses\", indent: true },\n    { href: \"#variants\", label: \"Alert variants\", indent: true },\n    { href: \"#composition\", label: \"Composition\", indent: true },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#alert-props\", label: \"Alert props\", indent: true },\n    { href: \"#alert-icon-props\", label: \"AlertIcon props\", indent: true },\n    { href: \"#alert-title-props\", label: \"AlertTitle props\", indent: true },\n    { href: \"#alert-description-props\", label: \"AlertDescription props\", indent: true },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"variant\",\n      description: \"The visual style of the alert.\",\n      type: '\"solid\" | \"subtle\" | \"left-accent\" | \"top-accent\"',\n      defaultValue: '\"subtle\"',\n    },\n    {\n      name: \"status\",\n      description: \"The status of the alert. This affects the color scheme and icon used.\",\n      type: '\"success\" | \"info\" | \"warning\" | \"danger\"',\n      defaultValue: '\"info\"',\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Alert</PageTitle>\n      <Text mb=\"$5\">\n        Alerts are used to communicate a state that affects a system, feature or page.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>Alert:</strong> The wrapper for alert components.\n        </ListItem>\n        <ListItem>\n          <strong>AlertIcon:</strong> The visual icon for the alert that changes based on the{\" \"}\n          <Code>status</Code> prop.\n        </ListItem>\n        <ListItem>\n          <strong>AlertTitle:</strong> The title of the alert to be announced by screen readers.\n        </ListItem>\n        <ListItem>\n          <strong>AlertDescription:</strong> The description of the alert to be announced by screen\n          readers.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$5\"></Text>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Alert status=\"danger\">\n          <AlertIcon mr=\"$2_5\" />\n          <AlertTitle mr=\"$2_5\">Your browser is outdated!</AlertTitle>\n          <AlertDescription>Your Hope UI experience may be degraded.</AlertDescription>\n          <CloseButton position=\"absolute\" right=\"8px\" top=\"8px\" />\n        </Alert>\n      </Preview>\n      <SectionSubtitle id=\"statuses\">Alert statuses</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>status</Code> prop to change the status of the alert. This affects the color\n        scheme and icon used. You can set the value to <Code>success</Code>, <Code>info</Code>,{\" \"}\n        <Code>warning</Code> or <Code>danger</Code>.\n      </Text>\n      <Preview snippet={snippets.status} mb=\"$10\">\n        <VStack alignItems=\"stretch\" spacing=\"$4\">\n          <Alert status=\"info\">\n            <AlertIcon mr=\"$2_5\" />\n            Hope UI is going live on April 7th. Get ready!\n          </Alert>\n          <Alert status=\"success\">\n            <AlertIcon mr=\"$2_5\" />\n            Data uploaded to the server. Fire on!\n          </Alert>\n          <Alert status=\"warning\">\n            <AlertIcon mr=\"$2_5\" />\n            Seems your account is about expire, upgrade now\n          </Alert>\n          <Alert status=\"danger\">\n            <AlertIcon mr=\"$2_5\" />\n            There was an error processing your request\n          </Alert>\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"variants\">Alert variants</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>variant</Code> prop to change the visual style of the Alert You can set the\n        value to <Code>solid</Code>, <Code>subtle</Code>, <Code>left-accent</Code> or{\" \"}\n        <Code>top-accent</Code>.\n      </Text>\n      <Preview snippet={snippets.variants} mb=\"$10\">\n        <VStack alignItems=\"stretch\" spacing=\"$4\">\n          <Alert status=\"success\" variant=\"solid\">\n            <AlertIcon mr=\"$2_5\" />\n            Data uploaded to the server. Fire on!\n          </Alert>\n          <Alert status=\"success\" variant=\"subtle\">\n            <AlertIcon mr=\"$2_5\" />\n            Data uploaded to the server. Fire on!\n          </Alert>\n          <Alert status=\"success\" variant=\"left-accent\">\n            <AlertIcon mr=\"$2_5\" />\n            Data uploaded to the server. Fire on!\n          </Alert>\n          <Alert status=\"success\" variant=\"top-accent\">\n            <AlertIcon mr=\"$2_5\" />\n            Data uploaded to the server. Fire on!\n          </Alert>\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"composition\">Composition</SectionSubtitle>\n      <Text mb=\"$5\">\n        <Code>Alert</Code> ships with smaller components to allow for flexibility in creating all\n        kinds of layouts. Here's an example of a custom alert style and layout:\n      </Text>\n      <Preview snippet={snippets.composition} mb=\"$8\">\n        <Alert\n          status=\"success\"\n          variant=\"subtle\"\n          flexDirection=\"column\"\n          justifyContent=\"center\"\n          textAlign=\"center\"\n          height=\"200px\"\n        >\n          <AlertIcon boxSize=\"40px\" mr=\"0\" />\n          <AlertTitle mt=\"$4\" mb=\"$1\" fontSize=\"$lg\">\n            Application submitted!\n          </AlertTitle>\n          <AlertDescription maxWidth=\"$sm\">\n            Thanks for submitting your application. Our team will get back to you soon.\n          </AlertDescription>\n        </Alert>\n      </Preview>\n      <Text mb=\"$5\">\n        <Code>Alert</Code> can also incorporate other Hope UI components. Here's an example of an\n        alert with wrapping description text:\n      </Text>\n      <Preview snippet={snippets.compositionTwo} mb=\"$12\">\n        <Alert status=\"success\">\n          <AlertIcon mr=\"$2_5\" />\n          <Box flex=\"1\">\n            <AlertTitle>Success!</AlertTitle>\n            <AlertDescription display=\"block\">\n              Your application has been received. We will review your application and respond within\n              the next 48 hours.\n            </AlertDescription>\n          </Box>\n          <CloseButton position=\"absolute\" right=\"8px\" top=\"8px\" />\n        </Alert>\n      </Preview>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Alert</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"alert-props\">Alert props</SectionSubtitle>\n      <PropsTable items={propItems} mb=\"$10\" />\n      <SectionSubtitle id=\"alert-icon-props\">AlertIcon props</SectionSubtitle>\n      <Text mb=\"$10\">\n        <Code>AlertIcon</Code> composes <Code>Icon</Code> and changes the icon based on the{\" \"}\n        <Code>status</Code> prop. You can use the <Code>as</Code> prop to render a custom icon.\n      </Text>\n      <SectionSubtitle id=\"alert-title-props\">AlertTitle props</SectionSubtitle>\n      <Text mb=\"$10\">\n        <Code>AlertTitle</Code> composes the <Code>Box</Code> component.\n      </Text>\n      <SectionSubtitle id=\"alert-description-props\">AlertDescription props</SectionSubtitle>\n      <Text mb=\"$10\">\n        <Code>AlertDescription</Code> composes the <Code>Box</Code> component.\n      </Text>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/feedback/alert/snippets.ts",
    "content": "const importComponent = `import { \n  Alert,\n  AlertDescription,\n  AlertIcon,\n  AlertTitle,\n} from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Alert status=\"danger\">\n  <AlertIcon mr=\"$2_5\" />\n  <AlertTitle mr=\"$2_5\">Your browser is outdated!</AlertTitle>\n  <AlertDescription>Your Hope UI experience may be degraded.</AlertDescription>\n  <CloseButton position=\"absolute\" right=\"8px\" top=\"8px\" />\n</Alert>`;\n\nconst status = `<VStack alignItems=\"stretch\" spacing=\"$4\">\n  <Alert status=\"info\">\n    <AlertIcon mr=\"$2_5\" />\n    Hope UI is going live on April 7th. Get ready!\n  </Alert>\n\n  <Alert status=\"success\">\n    <AlertIcon mr=\"$2_5\" />\n    Data uploaded to the server. Fire on!\n  </Alert>\n\n  <Alert status=\"warning\">\n    <AlertIcon mr=\"$2_5\" />\n    Seems your account is about expire, upgrade now\n  </Alert>\n\n  <Alert status=\"danger\">\n    <AlertIcon mr=\"$2_5\" />\n    There was an error processing your request\n  </Alert>\n</VStack>`;\n\nconst variants = `<VStack alignItems=\"stretch\" spacing=\"$4\">\n  <Alert status=\"success\" variant=\"solid\">\n    <AlertIcon mr=\"$2_5\" />\n    Data uploaded to the server. Fire on!\n  </Alert>\n\n  <Alert status=\"success\" variant=\"subtle\">\n    <AlertIcon mr=\"$2_5\" />\n    Data uploaded to the server. Fire on!\n  </Alert>\n\n  <Alert status=\"success\" variant=\"left-accent\">\n    <AlertIcon mr=\"$2_5\" />\n    Data uploaded to the server. Fire on!\n  </Alert>\n\n  <Alert status=\"success\" variant=\"top-accent\">\n    <AlertIcon mr=\"$2_5\" />\n    Data uploaded to the server. Fire on!\n  </Alert>\n</VStack>`;\n\nconst composition = `<Alert\n  status=\"success\"\n  variant=\"subtle\"\n  flexDirection=\"column\"\n  justifyContent=\"center\"\n  textAlign=\"center\"\n  height=\"200px\"\n>\n  <AlertIcon boxSize=\"40px\" mr=\"0\" />\n  <AlertTitle mt=\"$4\" mb=\"$1\" fontSize=\"$lg\">\n    Application submitted!\n  </AlertTitle>\n  <AlertDescription maxWidth=\"$sm\">\n    Thanks for submitting your application. Our team will get back to you soon.\n  </AlertDescription>\n</Alert>`;\n\nconst compositionTwo = `<Alert status=\"success\">\n  <AlertIcon mr=\"$2_5\" />\n  <Box flex=\"1\">\n    <AlertTitle>Success!</AlertTitle>\n    <AlertDescription display=\"block\">\n      Your application has been received. \n      We will review your application and respond within the next 48 hours.\n    </AlertDescription>\n  </Box>\n  <CloseButton position=\"absolute\" right=\"8px\" top=\"8px\" />\n</Alert>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Alert: {\n      baseStyle: {\n        root: SystemStyleConfig,\n        icon: SystemStyleConfig,\n        title: SystemStyleConfig,\n        description: SystemStyleConfig,\n      },\n      defaultProps: {\n        root: ThemeableAlertOptions,\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  status,\n  variants,\n  composition,\n  compositionTwo,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/feedback/circular-progress/index.tsx",
    "content": "import {\n  CircularProgress,\n  CircularProgressIndicator,\n  CircularProgressLabel,\n  ListItem,\n  Text,\n  UnorderedList,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function CircularProgressDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/feedback/alert\",\n    label: \"Alert\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/feedback/progress\",\n    label: \"Progress\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#color\", label: \"CircularProgress color\", indent: true },\n    { href: \"#size\", label: \"CircularProgress size\", indent: true },\n    { href: \"#thickness\", label: \"CircularProgress thickness\", indent: true },\n    { href: \"#with-round-cap\", label: \"CircularProgress with round cap\", indent: true },\n    { href: \"#with-label\", label: \"CircularProgress with label\", indent: true },\n    { href: \"#indeterminate\", label: \"Indeterminate progress\", indent: true },\n    { href: \"#accessibility\", label: \"Accessibility\" },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#circular-progress-props\", label: \"CircularProgress props\", indent: true },\n    {\n      href: \"#circular-progress-indicator-props\",\n      label: \"CircularProgressIndicator props\",\n      indent: true,\n    },\n  ];\n\n  const circularProgressPropItems: PropsTableItem[] = [\n    {\n      name: \"trackColor\",\n      description: \"The color of the progress track.\",\n      type: 'ColorProps[\"color\"]',\n      defaultValue: \"$neutral4\",\n    },\n    {\n      name: \"size\",\n      description: \"The size of the progress.\",\n      type: 'SizeProps[\"boxSize\"]',\n      defaultValue: \"$12\",\n    },\n    {\n      name: \"thickness\",\n      description: \"The thickness of the progress.\",\n      type: \"Property.StrokeWidth<SizeScaleValue> | number\",\n      defaultValue: \"$2_5\",\n    },\n    {\n      name: \"value\",\n      description: \"The `value` of the progress indicator.\",\n      type: \"number\",\n    },\n    {\n      name: \"indeterminate\",\n      description:\n        \"If `true`, the progress will be indeterminate and the `value` prop will be ignored.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"min\",\n      description: \"The minimum value of the progress.\",\n      type: \"number\",\n      defaultValue: \"0\",\n    },\n    {\n      name: \"max\",\n      description: \"The maximum value of the progress.\",\n      type: \"number\",\n      defaultValue: \"100\",\n    },\n    {\n      name: \"valueText\",\n      description: \"The desired `aria-valuetext` to use in place of the value.\",\n      type: \"string\",\n    },\n    {\n      name: \"getValueText\",\n      description:\n        \"A function that returns the desired `aria-valuetext` to use in place of the value.\",\n      type: \"(value: number, percent: number) => string\",\n    },\n  ];\n\n  const circularProgressIndicatorPropItems: PropsTableItem[] = [\n    {\n      name: \"color\",\n      description: \"The color of the progress indicator.\",\n      type: 'ColorProps[\"color\"]',\n      defaultValue: \"$primary9\",\n    },\n    {\n      name: \"withRoundCaps\",\n      description: \"If `true`, the caps of the progress indicator will be rounded.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>CircularProgress</PageTitle>\n      <Text mb=\"$5\">\n        The <Code>CircularProgress</Code> component is used to indicate the progress for determinate\n        and indeterminate processes.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>CircularProgress:</strong> The wrapper that provides context for its children.\n        </ListItem>\n        <ListItem>\n          <strong>CircularProgressIndicator:</strong> The visual indicator of the progress.\n        </ListItem>\n        <ListItem>\n          <strong>CircularProgressLabel:</strong> The textual representation of the progress.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <CircularProgress value={80}>\n          <CircularProgressIndicator />\n        </CircularProgress>\n      </Preview>\n      <SectionSubtitle id=\"color\">CircularProgress color</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>color</Code> prop to change the color of the{\" \"}\n        <Code>CircularProgressIndicator</Code> and the <Code>trackColor</Code> prop to change the\n        color of the progress track (background).\n      </Text>\n      <Preview snippet={snippets.color} mb=\"$10\">\n        <CircularProgress trackColor=\"$info3\" value={64}>\n          <CircularProgressIndicator color=\"$info9\" />\n        </CircularProgress>\n      </Preview>\n      <SectionSubtitle id=\"size\">CircularProgress size</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>size</Code> prop to change the size of the progress.\n      </Text>\n      <Preview snippet={snippets.size} mb=\"$10\">\n        <CircularProgress value={30} size=\"120px\">\n          <CircularProgressIndicator />\n        </CircularProgress>\n      </Preview>\n      <SectionSubtitle id=\"thickness\">CircularProgress thickness</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>thickness</Code> prop to change the thickness of the progress.\n      </Text>\n      <Preview snippet={snippets.thickness} mb=\"$10\">\n        <CircularProgress value={59} size=\"100px\" thickness=\"4px\">\n          <CircularProgressIndicator />\n        </CircularProgress>\n      </Preview>\n      <SectionSubtitle id=\"with-round-cap\">CircularProgress with round cap</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>withRoundCaps</Code> prop to set the <Code>CircularProgressIndicator</Code>{\" \"}\n        caps rounded.\n      </Text>\n      <Preview snippet={snippets.withRoundCaps} mb=\"$10\">\n        <CircularProgress value={80}>\n          <CircularProgressIndicator withRoundCaps />\n        </CircularProgress>\n      </Preview>\n      <SectionSubtitle id=\"with-label\">CircularProgress with label</SectionSubtitle>\n      <Text mb=\"$5\">\n        You can set a label inside the propgress by using the <Code>CircularProgressLabel</Code>{\" \"}\n        component. By default it will display the progress percentage.\n      </Text>\n      <Preview snippet={snippets.withLabel} mb=\"$10\">\n        <CircularProgress value={40}>\n          <CircularProgressIndicator color=\"$success9\" />\n          <CircularProgressLabel />\n        </CircularProgress>\n      </Preview>\n      <SectionSubtitle id=\"indeterminate\">Indeterminate progress</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>indeterminate</Code> prop to set the progress in an indeterminate state.\n      </Text>\n      <Preview snippet={snippets.indeterminate} mb=\"$12\">\n        <CircularProgress indeterminate>\n          <CircularProgressIndicator color=\"$success9\" />\n        </CircularProgress>\n      </Preview>\n      <SectionTitle id=\"accessibility\">Accessibility</SectionTitle>\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <Code>CircularProgress</Code> has a <Code>role</Code> set to <Code>progressbar</Code> to\n          denote that it is a progress.\n        </ListItem>\n        <ListItem>\n          <Code>CircularProgress</Code> has <Code>aria-valuenow</Code> set to the percentage\n          completion value passed to the component, to ensure the progress percent is visible to\n          screen readers.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>CircularProgress</Code> base styles and default props can be overridden in the Hope UI\n        theme configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"circular-progress-props\">CircularProgress props</SectionSubtitle>\n      <PropsTable items={circularProgressPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"circular-progress-indicator-props\">\n        CircularProgressIndicator props\n      </SectionSubtitle>\n      <PropsTable items={circularProgressIndicatorPropItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/feedback/circular-progress/snippets.ts",
    "content": "const importComponent = `import { \n  CircularProgress, \n  CircularProgressIndicator,\n  CircularProgressLabel \n} from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<CircularProgress value={80}>\n  <CircularProgressIndicator />\n</CircularProgress>`;\n\nconst color = `<CircularProgress trackColor=\"$info3\" value={64}>\n  <CircularProgressIndicator color=\"$info9\" />\n</CircularProgress>`;\n\nconst size = `<CircularProgress value={30} size=\"120px\">\n  <CircularProgressIndicator />\n</CircularProgress>`;\n\nconst thickness = `<CircularProgress value={59} size=\"100px\" thickness=\"4px\">\n  <CircularProgressIndicator />\n</CircularProgress>`;\n\nconst withRoundCaps = `<CircularProgress value={80}>\n  <CircularProgressIndicator withRoundCaps />\n</CircularProgress>`;\n\nconst withLabel = `<CircularProgress value={40}>\n  <CircularProgressIndicator color=\"$success9\" />\n  <CircularProgressLabel />\n</CircularProgress>`;\n\nconst indeterminate = `<CircularProgress indeterminate>\n  <CircularProgressIndicator color=\"$success9\" />\n</CircularProgress>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    CircularProgress: {\n      baseStyle: {\n        root: SystemStyleObject,\n        track: SystemStyleObject,\n        indicator: SystemStyleObject,\n        label: SystemStyleObject\n      },\n      defaultProps: {\n        root: ThemeableCircularProgressOptions\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  color,\n  size,\n  thickness,\n  withRoundCaps,\n  withLabel,\n  indeterminate,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/feedback/notification/index.tsx",
    "content": "import {\n  Avatar,\n  Button,\n  HStack,\n  ListItem,\n  NotificationProps,\n  notificationService,\n  Text,\n  UnorderedList,\n  VStack,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function SpinnerDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/feedback/spinner\",\n    label: \"Spinner\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/overlay/drawer\",\n    label: \"Drawer\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    {\n      href: \"#notification-service-api\",\n      label: \"The `notificationService` API\",\n      indent: true,\n    },\n    { href: \"#notification-status\", label: \"Notification status\", indent: true },\n    { href: \"#notification-placement\", label: \"Notification placement\", indent: true },\n    { href: \"#notification-duration\", label: \"Notification duration\", indent: true },\n    { href: \"#persistent-notification\", label: \"Persistent notification\", indent: true },\n    { href: \"#using-custom-component\", label: \"Using custom component\", indent: true },\n    { href: \"#updating-notification\", label: \"Updating notification\", indent: true },\n    { href: \"#hidding-notification\", label: \"Hidding notification\", indent: true },\n    { href: \"#limit-and-queue\", label: \"Limit and queue\", indent: true },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#notifications-provider-props\", label: \"NotificationsProvider props\", indent: true },\n    { href: \"#notification-props\", label: \"Notification props\", indent: true },\n    {\n      href: \"#notification-service-show\",\n      label: \"notificationService.show\",\n      indent: true,\n    },\n    {\n      href: \"#notification-service-update\",\n      label: \"notificationService.update\",\n      indent: true,\n    },\n    {\n      href: \"#notification-service-hide\",\n      label: \"notificationService.hide\",\n      indent: true,\n    },\n  ];\n\n  const notificationsProviderPropItems: PropsTableItem[] = [\n    {\n      name: \"placement\",\n      description: \"The placement of all notifications\",\n      type: '\"top-start\" | \"top\" | \"top-end\" | \"bottom-start\" | \"bottom\" | \"bottom-end\"',\n      defaultValue: '\"top-end\"',\n    },\n    {\n      name: \"limit\",\n      description:\n        \"Maximum amount of notifications displayed at a time, other new notifications will be added to queue.\",\n      type: \"number\",\n      defaultValue: \"10\",\n    },\n    {\n      name: \"duration\",\n      description: \"The delay (in ms) before notifications hides.\",\n      type: \"number\",\n      defaultValue: \"5000\",\n    },\n    {\n      name: \"persistent\",\n      description: \"If `true`, duration will be ignored and notifications will never dismiss.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"closable\",\n      description: \"If `true`, notifications will show a close button.\",\n      type: \"boolean\",\n      defaultValue: \"true\",\n    },\n    {\n      name: \"zIndex\",\n      description: \"The `z-index` css property of the notifications container.\",\n      type: 'PositionProps[\"zIndex\"]',\n      defaultValue: \"$notification\",\n    },\n  ];\n\n  const notificationPropItems: PropsTableItem[] = [\n    {\n      name: \"status\",\n      description: \"The status of the notification. This affects the color scheme and icon used.\",\n      type: '\"success\" | \"info\" | \"warning\" | \"danger\"',\n    },\n  ];\n\n  const notificationServiceShowPropItems: PropsTableItem[] = [\n    {\n      name: \"id\",\n      description:\n        \"The id of the notification, used to update and remove notification. By default, a unique id is generated for each notification.\",\n      type: \"string\",\n    },\n    {\n      name: \"status\",\n      description: \"The status of the notification.\",\n      type: '\"success\" | \"info\" | \"warning\" | \"danger\"',\n    },\n    {\n      name: \"title\",\n      description: \"The title of the notification.\",\n      type: \"string\",\n    },\n    {\n      name: \"description\",\n      description: \"The description of the notification.\",\n      type: \"string\",\n    },\n    {\n      name: \"duration\",\n      description: \"The delay (in ms) before the notification hides.\",\n      type: \"number\",\n      defaultValue: \"5000\",\n    },\n    {\n      name: \"persistent\",\n      description: \"If `true`, duration will be ignored and the notification will never dismiss.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"closable\",\n      description: \"If `true`, the notification will show a close button.\",\n      type: \"boolean\",\n      defaultValue: \"true\",\n    },\n    {\n      name: \"loading\",\n      description: \"If `true`, the notification will show a loader.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"onClose\",\n      description: \"Callback function to run side effects after the notification has closed.\",\n      type: \"(id: string) => void\",\n    },\n    {\n      name: \"render\",\n      description:\n        \"Render a custom component. It will receive the notification `id` and a `close` function as render props.\",\n      type: \"(props: NotificationConfigRenderProps) => JSX.Element\",\n    },\n  ];\n\n  const notificationServiceHidePropItems: PropsTableItem[] = [\n    {\n      required: true,\n      name: \"id\",\n      description: \"The `id` of the notification.\",\n      type: \"string\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Notification</PageTitle>\n      <Text mb=\"$5\">Notification give feedback to users after an action has taken place.</Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>NotificationsProvider:</strong> The component that provides the notification\n          system.\n        </ListItem>\n        <ListItem>\n          <strong>Notification:</strong> The wrapper for notification components.\n        </ListItem>\n        <ListItem>\n          <strong>NotificationIcon:</strong> The visual icon for the notification that changes based\n          on the <Code>status</Code> prop.\n        </ListItem>\n        <ListItem>\n          <strong>NotificationTitle:</strong> The title of the notification.\n        </ListItem>\n        <ListItem>\n          <strong>NotificationDescription:</strong> The description of the notification.\n        </ListItem>\n        <ListItem>\n          <strong>notificationService:</strong> An utility object used to show/hide notifications.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$5\">\n        Wrap your application with the <Code>NotificationsProvider</Code>:\n      </Text>\n      <CodeSnippet snippet={snippets.setup} mb=\"$6\" />\n      <Text mb=\"$5\">\n        Then use the <Code>notificationService</Code> anywhere in your application:\n      </Text>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Button\n          onClick={() =>\n            notificationService.show({\n              title: \"Default notification\",\n              description: \"Hey there, your code is awesome! 🤥\",\n            })\n          }\n        >\n          Show notification\n        </Button>\n      </Preview>\n      <SectionSubtitle id=\"notification-service-api\">\n        The <Code>notificationService</Code> API\n      </SectionSubtitle>\n      <Text mb=\"$3\">\n        The notification system is based on custom events, Hope UI exports the following methods\n        through the <Code>notificationService</Code> object:\n      </Text>\n      <UnorderedList spacing=\"$2\" mb=\"$10\">\n        <ListItem>\n          <strong>show:</strong> adds given notification to notifications list or queue depending on\n          current state and limit.\n        </ListItem>\n        <ListItem>\n          <strong>update:</strong> updates notification that was previously added to the state or\n          queue.\n        </ListItem>\n        <ListItem>\n          <strong>hide:</strong> removes notification with given id from notifications state and\n          queue.\n        </ListItem>\n        <ListItem>\n          <strong>clear:</strong> removes all notifications from notifications state and queue.\n        </ListItem>\n        <ListItem>\n          <strong>clearQueue:</strong> removes all notifications from queue.\n        </ListItem>\n      </UnorderedList>\n      <SectionSubtitle id=\"notification-status\">Notification status</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>status</Code> parameter to change the status of the notification, this affects\n        the icon used. You can set the value to <Code>success</Code>, <Code>info</Code>,{\" \"}\n        <Code>warning</Code> or <Code>danger</Code>.\n      </Text>\n      <Preview snippet={snippets.status} mb=\"$10\">\n        <Button\n          onClick={() =>\n            [\"success\", \"info\", \"warning\", \"danger\"].forEach(status => {\n              notificationService.show({\n                status: status as NotificationProps[\"status\"],\n                title: `${status} notification`,\n                description: \"Hey there, your code is awesome! 🤥\",\n              });\n            })\n          }\n        >\n          Show all notification statuses\n        </Button>\n      </Preview>\n      <SectionSubtitle id=\"notification-placement\">Notification placement</SectionSubtitle>\n      <Text mb=\"$5\">\n        <Code>NotificationsProvider</Code> renders notifications with fixed position inside a\n        Portal. Position cannot be changed per notification. Use the <Code>placement</Code> prop to\n        define the placement. You can set the value to <Code>top-start</Code>, <Code>top</Code>,{\" \"}\n        <Code>top-end</Code>, <Code>bottom-start</Code>, <Code>bottom</Code> or{\" \"}\n        <Code>bottom-end</Code>.\n      </Text>\n      <CodeSnippet snippet={snippets.placement} mb=\"$10\" />\n      <SectionSubtitle id=\"notification-duration\">Notification duration</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>duration</Code> parameter to change the duration of the notification. By\n        default, notitification will dismiss after 5 seconds.\n      </Text>\n      <Preview snippet={snippets.duration} mb=\"$10\">\n        <Button\n          onClick={() =>\n            notificationService.show({\n              title: \"Custom duration\",\n              description: \"notification will be closed in 10 seconds\",\n              duration: 10_000,\n            })\n          }\n        >\n          Show 10 seconds notification\n        </Button>\n      </Preview>\n      <SectionSubtitle id=\"persistent-notification\">Persistent notification</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>persistent</Code> parameter to make the notification persistent. the duration\n        will be ignored.\n      </Text>\n      <Preview snippet={snippets.persistent} mb=\"$10\">\n        <Button\n          onClick={() =>\n            notificationService.show({\n              title: \"I will never close\",\n              description: \"unless you click X\",\n              persistent: true,\n            })\n          }\n        >\n          Show persistent notification\n        </Button>\n      </Preview>\n      <SectionSubtitle id=\"using-custom-component\">Using custom component</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>render</Code> parameter to display a custom component instead of the default\n        Hope UI <Code>Notification</Code>.\n      </Text>\n      <Preview snippet={snippets.customComponent} mb=\"$10\">\n        <Button\n          onClick={() =>\n            notificationService.show({\n              render: props => (\n                <HStack\n                  bg=\"$loContrast\"\n                  rounded=\"$md\"\n                  border=\"1px solid $neutral7\"\n                  shadow=\"$lg\"\n                  p=\"$4\"\n                  w=\"$full\"\n                >\n                  <Avatar name=\"Courtney Watson\" src=\"https://bit.ly/3w2rgom\" mr=\"$3\" />\n                  <VStack alignItems=\"flex-start\">\n                    <Text size=\"sm\" fontWeight=\"$medium\">\n                      Courtney Watson\n                    </Text>\n                    <Text size=\"sm\" color=\"$neutral11\">\n                      Sure! 8:30pm works great!\n                    </Text>\n                  </VStack>\n                  <Button\n                    variant=\"ghost\"\n                    colorScheme=\"accent\"\n                    size=\"sm\"\n                    ml=\"auto\"\n                    onClick={() => props.close()}\n                  >\n                    Reply\n                  </Button>\n                </HStack>\n              ),\n            })\n          }\n        >\n          Show custom notification\n        </Button>\n      </Preview>\n      <SectionSubtitle id=\"updating-notification\">Updating notification</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>update</Code> method to update a specific notification. This method takes the\n        same parameters as the <Code>show</Code> method except that <Code>id</Code> is required.\n      </Text>\n      <Preview snippet={snippets.updating} mb=\"$10\">\n        <Button\n          onClick={() => {\n            notificationService.show({\n              id: \"notification-id\",\n              title: \"Loading your data\",\n              description: \"Data will be loaded in 3 seconds, you cannot close this yet\",\n              persistent: true,\n              closable: false,\n              loading: true,\n            });\n\n            setTimeout(() => {\n              notificationService.update({\n                id: \"notification-id\",\n                status: \"success\",\n                title: \"Data was loaded\",\n                description: \"Notification will close in 2 seconds\",\n                duration: 2_000,\n              });\n            }, 3_000);\n          }}\n        >\n          Show update notification\n        </Button>\n      </Preview>\n      <SectionSubtitle id=\"hidding-notification\">Hidding notification</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>hide</Code> method to dismiss a specific notification by passing its\n        notification id.\n      </Text>\n      <Preview snippet={snippets.hidding} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Button\n            onClick={() =>\n              notificationService.show({\n                id: \"notification-id\",\n                title: \"Hidding notification\",\n                description: \"Hey, you can't hide me...unless using the 'Hide' button\",\n                persistent: true,\n                closable: false,\n              })\n            }\n          >\n            Show notification\n          </Button>\n          <Button\n            variant=\"subtle\"\n            colorScheme=\"neutral\"\n            onClick={() => notificationService.hide(\"notification-id\")}\n          >\n            Hide notification\n          </Button>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"limit-and-queue\"> Limit and queue</SectionSubtitle>\n      <Text mb=\"$5\">\n        <Code>NotificationsProvider</Code> uses a queue to manage its state. You can limit maximum\n        amount of notifications that can be displayed by setting the <Code>limit</Code> prop.\n      </Text>\n      <CodeSnippet snippet={snippets.limitAndQueueSetup} mb=\"$6\" />\n      <Text mb=\"$3\">\n        All notifications added after limit was reached will be added into queue and displayed when\n        notification from current state is closed.\n      </Text>\n      <Text mb=\"$5\">\n        You can use the <Code>clearQueue</Code> method to remove all notifications that are not\n        currently displayed and the <Code>clear</Code> method to remove all notifications from state\n        and queue.\n      </Text>\n      <Preview snippet={snippets.limitAndQueue} mb=\"$12\">\n        <HStack spacing=\"$4\">\n          <Button\n            onClick={() => {\n              Array(20)\n                .fill(0)\n                .forEach((_, index) => {\n                  notificationService.show({\n                    title: `Notification ${index + 1}`,\n                    description: \"Most notifications are added to queue\",\n                  });\n                });\n            }}\n          >\n            Show 20 notifications\n          </Button>\n          <Button\n            colorScheme=\"neutral\"\n            variant=\"subtle\"\n            onClick={() => notificationService.clearQueue()}\n          >\n            Clear queue\n          </Button>\n          <Button colorScheme=\"danger\" variant=\"subtle\" onClick={() => notificationService.clear()}>\n            Clear all\n          </Button>\n        </HStack>\n      </Preview>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Notification</Code> base styles and default props can be overridden in the Hope UI\n        theme configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"notifications-provider-props\">\n        NotificationsProvider props\n      </SectionSubtitle>\n      <PropsTable items={notificationsProviderPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"notification-props\">Notification props</SectionSubtitle>\n      <PropsTable items={notificationPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"notification-service-show\">\n        notificationService.<Code>show</Code>\n      </SectionSubtitle>\n      <PropsTable items={notificationServiceShowPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"notification-service-update\">\n        notificationService.<Code>update</Code>\n      </SectionSubtitle>\n      <Text mb=\"$10\">\n        The <Code>update</Code> method takes the same parameters as the <Code>show</Code> method\n        except that <Code>id</Code> is required.\n      </Text>\n      <SectionSubtitle id=\"notification-service-hide\">\n        notificationService.<Code>hide</Code>\n      </SectionSubtitle>\n      <PropsTable items={notificationServiceHidePropItems} mb=\"$10\" />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/feedback/notification/snippets.ts",
    "content": "const importComponent = `import { \n  NotificationsProvider, \n  Notification,\n  NotificationIcon,\n  NotificationTitle,\n  NotificationDescription,\n  notificationService,\n} from \"@hope-ui/solid\"`;\n\nconst setup = `// 1. import \\`NotificationsProvider\\` component\nimport { HopeProvider, NotificationsProvider } from '@hope-ui/solid'\n\n// 2. Wrap NotificationsProvider at the root of your app\nfunction App() {\n  return (\n    <HopeProvider>\n      <NotificationsProvider>\n        <MyApp />\n      </NotificationsProvider>\n    </HopeProvider>\n  )\n}`;\n\nconst basicUsage = `import { notificationService } from '@hope-ui/solid'\n\nfunction NotificationExample() {\n  const showNotification = () => {\n    notificationService.show({\n      title: \"Default notification\",\n      description: \"Hey there, your code is awesome! 🤥\",\n    })\n  }\n\n  return (\n    <Button onClick={showNotification}>\n      Show notification\n    </Button>\n  );\n}`;\n\nconst status = `<Button\n  onClick={() =>\n      notificationService.show({\n        status: \"info\", /* or success, warning, danger */\n        title: \"Info notification\",\n        description: \"Hey there, your code is awesome! 🤥\",\n      });\n  }\n>\n  Show notification\n</Button>`;\n\nconst placement = `import { HopeProvider, NotificationsProvider } from '@hope-ui/solid'\n\nfunction App() {\n  return (\n    <HopeProvider>\n      <NotificationsProvider placement=\"bottom-end\">\n        <MyApp />\n      </NotificationsProvider>\n    </HopeProvider>\n  )\n}`;\n\nconst duration = `<Button\n  onClick={() =>\n    notificationService.show({\n      title: \"Custom duration\",\n      description: \"notification will be closed in 10 seconds\",\n      duration: 10_000, /* duration in ms */\n    })\n  }\n>\n  Show 10 seconds notification\n</Button>`;\n\nconst persistent = `<Button\n  onClick={() =>\n    notificationService.show({\n      title: \"I will never close\",\n      description: \"unless you click X\",\n      persistent: true,\n    })\n  }\n>\n  Show persistent notification\n</Button>`;\n\nconst customComponent = `<Button\n  onClick={() =>\n    notificationService.show({\n      render: props => (\n        <HStack\n          bg=\"$loContrast\"\n          rounded=\"$md\"\n          border=\"1px solid $neutral7\"\n          shadow=\"$lg\"\n          p=\"$4\"\n          w=\"$full\"\n        >\n          <Avatar name=\"Courtney Watson\" src=\"https://bit.ly/3w2rgom\" mr=\"$3\" />\n          <VStack alignItems=\"flex-start\">\n            <Text size=\"sm\" fontWeight=\"$medium\">\n              Courtney Watson\n            </Text>\n            <Text size=\"sm\" color=\"$neutral11\">\n              Sure! 8:30pm works great!\n            </Text>\n          </VStack>\n          <Button\n            variant=\"ghost\"\n            colorScheme=\"accent\"\n            size=\"sm\"\n            ml=\"auto\"\n            onClick={() => props.close()}\n          >\n            Reply\n          </Button>\n        </HStack>\n      ),\n    })\n  }\n>\n  Show custom notification\n</Button>`;\n\nconst hidding = `<HStack spacing=\"$4\">\n  <Button\n    onClick={() =>\n      notificationService.show({\n        id: \"notification-id\", /* set a custom id */\n        title: \"Hidding notification\",\n        description: \"Hey, you can't hide me...unless using the 'Hide' button\",\n        persistent: true,\n        closable: false,\n      })\n    }\n  >\n    Show notification\n  </Button>\n  <Button\n    variant=\"subtle\"\n    colorScheme=\"neutral\"\n    onClick={() => notificationService.hide(\"notification-id\")} // use the same id\n  >\n    Hide notification\n  </Button>\n</HStack>`;\n\nconst updating = `<Button\n  onClick={() => {\n    notificationService.show({\n      id: \"notification-id\",\n      title: \"Loading your data\",\n      description: \"Data will be loaded in 3 seconds, you cannot close this yet\",\n      persistent: true,\n      closable: false,\n      loading: true,\n    });\n\n    setTimeout(() => {\n      notificationService.update({\n        id: \"notification-id\",\n        status: \"success\",\n        title: \"Data was loaded\",\n        description: \"Notification will close in 2 seconds\",\n        duration: 2_000,\n      });\n    }, 3_000);\n  }}\n>\n  Show upadate notification\n</Button>`;\n\nconst limitAndQueueSetup = `import { HopeProvider, NotificationsProvider } from '@hope-ui/solid'\n\nfunction App() {\n  return (\n    <HopeProvider>\n      <NotificationsProvider limit={10}>\n        <MyApp />\n      </NotificationsProvider>\n    </HopeProvider>\n  )\n}`;\n\nconst limitAndQueue = `<HStack spacing=\"$4\">\n  <Button\n    onClick={() => {\n      Array(20).fill(0).forEach((_, index) => {\n        notificationService.show({\n          title: \\`Notification \\${index + 1}\\`,\n          description: \"Most notifications are added to queue\",\n        });\n      });\n    }}\n  >\n    Show 20 notifications\n  </Button>\n  <Button\n    colorScheme=\"neutral\"\n    variant=\"subtle\"\n    onClick={() => notificationService.clearQueue()}\n  >\n    Clear queue\n  </Button>\n  <Button \n    colorScheme=\"danger\" \n    variant=\"subtle\" \n    onClick={() => notificationService.clear()}\n  >\n    Clear all\n  </Button>\n</HStack>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Notification: {\n      baseStyle: {\n        root: SystemStyleConfig,\n        icon: SystemStyleConfig,\n        title: SystemStyleConfig,\n        description: SystemStyleConfig,\n      },\n      defaultProps: {\n        root: ThemeableNotificationOptions,\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  setup,\n  basicUsage,\n  status,\n  placement,\n  duration,\n  persistent,\n  customComponent,\n  hidding,\n  updating,\n  limitAndQueueSetup,\n  limitAndQueue,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/feedback/progress/index.tsx",
    "content": "import {\n  ListItem,\n  Progress,\n  ProgressIndicator,\n  ProgressLabel,\n  Text,\n  UnorderedList,\n  VStack,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function ProgressDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/feedback/circular-progress\",\n    label: \"CircularProgress\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/feedback/skeleton\",\n    label: \"Skeleton\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#colors\", label: \"Progress color\", indent: true },\n    { href: \"#sizes\", label: \"Progress sizes\", indent: true },\n    { href: \"#with-label\", label: \"Progress with label\", indent: true },\n    { href: \"#striped\", label: \"Progress with stripes\", indent: true },\n    { href: \"#animated\", label: \"Animated progress\", indent: true },\n    { href: \"#indeterminate\", label: \"Indeterminate progress\", indent: true },\n    { href: \"#accessibility\", label: \"Accessibility\" },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#progress-props\", label: \"Progress props\", indent: true },\n    { href: \"#progress-indicator-props\", label: \"ProgressIndicator props\", indent: true },\n  ];\n\n  const progressPropItems: PropsTableItem[] = [\n    {\n      name: \"trackColor\",\n      description: \"The color of the progress track.\",\n      type: 'ColorProps[\"color\"]',\n      defaultValue: \"$neutral4\",\n    },\n    {\n      name: \"size\",\n      description: \"The size of the progress.\",\n      type: '\"xs\" | \"sm\" | \"md\" | \"lg\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"value\",\n      description: \"The `value` of the progress indicator.\",\n      type: \"number\",\n    },\n    {\n      name: \"indeterminate\",\n      description:\n        \"If `true`, the progress will be indeterminate and the `value` prop will be ignored.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"min\",\n      description: \"The minimum value of the progress.\",\n      type: \"number\",\n      defaultValue: \"0\",\n    },\n    {\n      name: \"max\",\n      description: \"The maximum value of the progress.\",\n      type: \"number\",\n      defaultValue: \"100\",\n    },\n    {\n      name: \"valueText\",\n      description: \"The desired `aria-valuetext` to use in place of the value.\",\n      type: \"string\",\n    },\n    {\n      name: \"getValueText\",\n      description:\n        \"A function that returns the desired `aria-valuetext` to use in place of the value.\",\n      type: \"(value: number, percent: number) => string\",\n    },\n  ];\n\n  const progressIndicatorPropItems: PropsTableItem[] = [\n    {\n      name: \"color\",\n      description: \"The color of the progress indicator.\",\n      type: 'ColorProps[\"color\"]',\n      defaultValue: \"$primary9\",\n    },\n    {\n      name: \"striped\",\n      description: \"If `true`, the progress indicator will show stripes.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"animated\",\n      description: \"If `true`, and striped is `true`, the stripes will be animated.\",\n      type: \"boolean\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Progress</PageTitle>\n      <Text mb=\"$5\">\n        <Code>Progress</Code> is used to display the progress status for a task that takes a long\n        time or consists of several steps.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>Progress:</strong> The wrapper that provides context for its children.\n        </ListItem>\n        <ListItem>\n          <strong>ProgressIndicator:</strong> The visual indicator of the progress.\n        </ListItem>\n        <ListItem>\n          <strong>ProgressLabel:</strong> The textual representation of the progress.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Progress value={80}>\n          <ProgressIndicator />\n        </Progress>\n      </Preview>\n      <SectionSubtitle id=\"colors\">Progress color</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>color</Code> prop to change the color of the <Code>ProgressIndicator</Code>{\" \"}\n        and the <Code>trackColor</Code> prop to change the color of the progress track (background).\n      </Text>\n      <Preview snippet={snippets.colors} mb=\"$10\">\n        <Progress trackColor=\"$info3\" value={64}>\n          <ProgressIndicator color=\"$info9\" />\n        </Progress>\n      </Preview>\n      <SectionSubtitle id=\"sizes\">Progress sizes</SectionSubtitle>\n      <Text mb=\"$2\">\n        Use the <Code>size</Code> prop to change the size of the Progress. You can set the value to{\" \"}\n        <Code>xs</Code>, <Code>sm</Code>, <Code>md</Code> or <Code>lg</Code>.\n      </Text>\n      <Text mb=\"$5\">\n        You can also use the <Code>height</Code> prop to manually set a height.\n      </Text>\n      <Preview snippet={snippets.sizes} mb=\"$10\">\n        <VStack alignItems=\"stretch\" spacing=\"$5\">\n          <Progress size=\"xs\" value={20}>\n            <ProgressIndicator />\n          </Progress>\n          <Progress size=\"sm\" value={20}>\n            <ProgressIndicator />\n          </Progress>\n          <Progress size=\"md\" value={20}>\n            <ProgressIndicator />\n          </Progress>\n          <Progress size=\"lg\" value={20}>\n            <ProgressIndicator />\n          </Progress>\n          <Progress height=\"32px\" value={20}>\n            <ProgressIndicator />\n          </Progress>\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"with-label\">Progress with label</SectionSubtitle>\n      <Text mb=\"$5\">\n        You can set a label inside the propgress by using the <Code>ProgressLabel</Code> component.\n        By default it will display the progress percentage.\n      </Text>\n      <Preview snippet={snippets.withLabel} mb=\"$12\">\n        <Progress size=\"lg\" value={80}>\n          <ProgressIndicator />\n          <ProgressLabel />\n        </Progress>\n      </Preview>\n      <SectionSubtitle id=\"striped\">Progress with stripes</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>striped</Code> prop to apply stripes on the <Code>ProgressIndicator</Code>.\n      </Text>\n      <Preview snippet={snippets.striped} mb=\"$10\">\n        <Progress value={64}>\n          <ProgressIndicator striped />\n        </Progress>\n      </Preview>\n      <SectionSubtitle id=\"animated\">Animated progress</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>animated</Code> prop to animate the progress stripes.\n      </Text>\n      <Preview snippet={snippets.animated} mb=\"$10\">\n        <Progress value={64}>\n          <ProgressIndicator striped animated />\n        </Progress>\n      </Preview>\n      <SectionSubtitle id=\"indeterminate\">Indeterminate progress</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>indeterminate</Code> prop to set the progress in an indeterminate state.\n      </Text>\n      <Preview snippet={snippets.indeterminate} mb=\"$10\">\n        <Progress size=\"xs\" indeterminate>\n          <ProgressIndicator />\n        </Progress>\n      </Preview>\n      <SectionTitle id=\"accessibility\">Accessibility</SectionTitle>\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <Code>Progress</Code> has a <Code>role</Code> set to <Code>progressbar</Code> to denote\n          that it is a progress.\n        </ListItem>\n        <ListItem>\n          <Code>Progress</Code> has <Code>aria-valuenow</Code> set to the percentage completion\n          value passed to the component, to ensure the progress percent is visible to screen\n          readers.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Progress</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"progress-props\">Progress props</SectionSubtitle>\n      <PropsTable items={progressPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"progress-indicator-props\">ProgressIndicator props</SectionSubtitle>\n      <PropsTable items={progressIndicatorPropItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/feedback/progress/snippets.ts",
    "content": "const importComponent = `import { Progress, ProgressIndicator, ProgressLabel } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Progress value={80}>\n  <ProgressIndicator />\n</Progress>`;\n\nconst colors = `<Progress trackColor=\"$info3\" value={64}>\n  <ProgressIndicator color=\"$info9\" />\n</Progress>`;\n\nconst sizes = `<VStack alignItems=\"stretch\" spacing=\"$5\">\n  <Progress size=\"xs\" value={20}>\n    <ProgressIndicator />\n  </Progress>\n  <Progress size=\"sm\" value={20}>\n    <ProgressIndicator />\n  </Progress>\n  <Progress size=\"md\" value={20}>\n    <ProgressIndicator />\n  </Progress>\n  <Progress size=\"lg\" value={20}>\n    <ProgressIndicator />\n  </Progress>\n  <Progress height=\"32px\" value={20}>\n    <ProgressIndicator />\n  </Progress>\n</VStack>`;\n\nconst withLabel = `<Progress size=\"lg\" value={80}>\n  <ProgressIndicator />\n  <ProgressLabel />\n</Progress>`;\n\nconst striped = `<Progress value={64}>\n  <ProgressIndicator striped />\n</Progress>`;\n\nconst animated = `<Progress value={64}>\n  <ProgressIndicator striped animated />\n</Progress>`;\n\nconst indeterminate = `<Progress size=\"xs\" indeterminate>\n  <ProgressIndicator />\n</Progress>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Progress: {\n      baseStyle: {\n        track: SystemStyleObject,\n        indicator: SystemStyleObject,\n        label: SystemStyleObject\n      },\n      defaultProps: {\n        root: ThemeableProgressOptions\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  colors,\n  sizes,\n  withLabel,\n  striped,\n  animated,\n  indeterminate,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/feedback/skeleton/index.tsx",
    "content": "import {\n  Box,\n  ListItem,\n  Skeleton,\n  SkeletonCircle,\n  SkeletonText,\n  Text,\n  UnorderedList,\n  VStack,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function SkeletonDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/feedback/progress\",\n    label: \"Progress\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/feedback/spinner\",\n    label: \"Spinner\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#circle-and-text\", label: \"Circle and text Skeleton\", indent: true },\n    { href: \"#color\", label: \"Skeleton color\", indent: true },\n    {\n      href: \"#skip-when-content-is-loaded\",\n      label: \"Skipping the skeleton when content is loaded\",\n      indent: true,\n    },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#skeleton-props\", label: \"Skeleton props\", indent: true },\n    { href: \"#skeleton-circle-props\", label: \"SkeletonCircle props\", indent: true },\n    { href: \"#skeleton-text-props\", label: \"SkeletonText props\", indent: true },\n  ];\n\n  const skeletonPropItems: PropsTableItem[] = [\n    {\n      name: \"startColor\",\n      description: \"The color at the animation start.\",\n      type: 'ColorProps[\"backgroundColor\"]',\n    },\n    {\n      name: \"endColor\",\n      description: \"The color at the animation end.\",\n      type: 'ColorProps[\"backgroundColor\"]',\n    },\n    {\n      name: \"loaded\",\n      description: \"If `true`, it'll render its children with a nice fade animation.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"speed\",\n      description: \"The animation speed in CSS unit.\",\n      type: \"Property.AnimationDuration\",\n      defaultValue: \"800ms\",\n    },\n    {\n      name: \"fadeDuration\",\n      description: \"The loaded children fadeIn animation duration in CSS unit.\",\n      type: \"Property.AnimationDuration\",\n      defaultValue: \"400ms\",\n    },\n  ];\n\n  const skeletonCirclePropItems: PropsTableItem[] = [\n    {\n      name: \"size\",\n      description: \"The size of the circle.\",\n      type: 'SizeProps[\"boxSize\"]',\n      defaultValue: \"2rem\",\n    },\n  ];\n\n  const skeletonTextPropItems: PropsTableItem[] = [\n    {\n      name: \"noOfLines\",\n      description: \"The number of skeleton text lines.\",\n      type: \"number\",\n      defaultValue: \"3\",\n    },\n    {\n      name: \"spacing\",\n      description: \"The space between each skeleton text line.\",\n      type: 'GridLayoutProps[\"gap\"]',\n      defaultValue: \"0.5rem\",\n    },\n    {\n      name: \"skeletonHeight\",\n      description: \"The height of each skeleton text line.\",\n      type: 'SizeProps[\"height\"]',\n      defaultValue: \"0.5rem\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Skeleton</PageTitle>\n      <Text mb=\"$5\">\n        <Code>Skeleton</Code> is used to display the loading state of some components.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>Skeleton:</strong> The base component that show the loading state.\n        </ListItem>\n        <ListItem>\n          <strong>SkeletonCircle:</strong> A circular skeleton.\n        </ListItem>\n        <ListItem>\n          <strong>SkeletonText:</strong> A skeleton that represents one or more lines of text.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$5\">You can use it as a standalone component.</Text>\n      <Preview snippet={snippets.basicUsageStandalone} mb=\"$8\">\n        <VStack alignItems=\"stretch\" spacing=\"$2\">\n          <Skeleton height=\"20px\" />\n          <Skeleton height=\"20px\" />\n          <Skeleton height=\"20px\" />\n        </VStack>\n      </Preview>\n      <Text mb=\"$5\">Or to wrap another component to take the same height and width.</Text>\n      <Preview snippet={snippets.basicUsageWrapper} mb=\"$10\">\n        <Skeleton>\n          <div>contents wrapped</div>\n          <div>won't be visible</div>\n        </Skeleton>\n      </Preview>\n      <SectionSubtitle id=\"circle-and-text\">Circle and text Skeleton</SectionSubtitle>\n      <Preview snippet={snippets.circleAndText} mb=\"$10\">\n        <Box p=\"$6\" boxShadow=\"$lg\" rounded=\"$sm\" bg=\"$loContrast\">\n          <SkeletonCircle size=\"$10\" />\n          <SkeletonText mt=\"$4\" noOfLines={4} spacing=\"$4\" />\n        </Box>\n      </Preview>\n      <SectionSubtitle id=\"color\">Skeleton color</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>startColor</Code> and <Code>endColor</Code> props to change the animation\n        color.\n      </Text>\n      <Preview snippet={snippets.color} mb=\"$10\">\n        <Skeleton startColor=\"tomato\" endColor=\"orange\" height=\"20px\" />\n      </Preview>\n      <SectionSubtitle id=\"skip-when-content-is-loaded\">\n        Skipping the skeleton when content is loaded\n      </SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>loaded</Code> prop to prevent the skeleton from rendering.\n      </Text>\n      <Preview snippet={snippets.skipping} mb=\"$12\">\n        <Skeleton loaded>\n          <span>Hope UI is cool</span>\n        </Skeleton>\n      </Preview>\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"skeleton-props\">Skeleton props</SectionSubtitle>\n      <PropsTable items={skeletonPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"skeleton-circle-props\">SkeletonCircle props</SectionSubtitle>\n      <PropsTable items={skeletonCirclePropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"skeleton-text-props\">SkeletonText props</SectionSubtitle>\n      <PropsTable items={skeletonTextPropItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/feedback/skeleton/snippets.ts",
    "content": "const importComponent = `import { Skeleton, SkeletonCircle, SkeletonText } from \"@hope-ui/solid\"`;\n\nconst basicUsageStandalone = `<VStack alignItems=\"stretch\" spacing=\"$2\">\n  <Skeleton height=\"20px\" />\n  <Skeleton height=\"20px\" />\n  <Skeleton height=\"20px\" />\n</VStack>`;\n\nconst basicUsageWrapper = `<Skeleton>\n  <div>contents wrapped</div>\n  <div>won't be visible</div>\n</Skeleton>`;\n\nconst circleAndText = `<Box p=\"$6\" boxShadow=\"$lg\" rounded=\"$sm\" bg=\"$loContrast\">\n  <SkeletonCircle size=\"$10\" />\n  <SkeletonText mt=\"$4\" noOfLines={4} spacing=\"$4\" />\n</Box>`;\n\nconst color = `<Skeleton startColor=\"tomato\" endColor=\"orange\" height=\"20px\" />`;\n\nconst skipping = `<Skeleton loaded>\n  <span>Hope UI is cool</span>\n</Skeleton>`;\n\nexport const snippets = {\n  importComponent,\n  basicUsageStandalone,\n  basicUsageWrapper,\n  circleAndText,\n  color,\n  skipping,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/feedback/spinner/index.tsx",
    "content": "import { HStack, Spinner, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function SpinnerDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/feedback/skeleton\",\n    label: \"Skeleton\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/feedback/notification\",\n    label: \"Notification\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#color\", label: \"Spinner color\", indent: true },\n    { href: \"#empty-area-color\", label: \"Spinner empty area color\", indent: true },\n    { href: \"#sizes\", label: \"Spinner sizes\", indent: true },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"size\",\n      description: \"The size of the spinner.\",\n      type: '\"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"emptyColor\",\n      description: \"The color of the empty area in the spinner.\",\n      type: \"Property.Color | ColorScaleValue\",\n    },\n    {\n      name: \"color\",\n      description: \"The color of the spinner.\",\n      type: \"Property.Color | ColorScaleValue\",\n    },\n    {\n      name: \"thickness\",\n      description: \"The thickness of the spinner.\",\n      type: \"Property.BorderWidth<SizeScaleValue>\",\n    },\n    {\n      name: \"speed\",\n      description: \"The speed of the spinner.\",\n      type: \"Property.TransitionDuration\",\n    },\n    {\n      name: \"label\",\n      description:\n        \"For accessibility, the fallback loading text. This text will be visible to screen readers.\",\n      type: \"string\",\n      defaultValue: \"Loading...\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Spinner</PageTitle>\n      <Text mb=\"$5\">\n        Spinners provide a visual cue that an action is either processing, awaiting a course of\n        change or a result.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Spinner />\n      </Preview>\n      <SectionSubtitle id=\"color\">Spinner color</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>color</Code> prop to change the color of the Spinner.\n      </Text>\n      <Preview snippet={snippets.color} mb=\"$10\">\n        <Spinner color=\"tomato\" />\n      </Preview>\n      <SectionSubtitle id=\"empty-area-color\">Spinner empty area color</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>emptyColor</Code> prop to change the background color of the Spinner.\n      </Text>\n      <Preview snippet={snippets.emptyAreaColor} mb=\"$10\">\n        <Spinner thickness=\"4px\" speed=\"0.65s\" emptyColor=\"$neutral4\" color=\"$info10\" size=\"xl\" />\n      </Preview>\n      <SectionSubtitle id=\"sizes\">Spinner sizes</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>size</Code> prop to change the size of the Button. You can set the value to{\" \"}\n        <Code>xs</Code>, <Code>sm</Code>, <Code>md</Code>, <Code>lg</Code> or <Code>xl</Code>.\n      </Text>\n      <Preview snippet={snippets.sizes} mb=\"$12\">\n        <HStack spacing=\"$4\">\n          <Spinner size=\"xs\" />\n          <Spinner size=\"sm\" />\n          <Spinner size=\"md\" />\n          <Spinner size=\"lg\" />\n          <Spinner size=\"xl\" />\n        </HStack>\n      </Preview>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Spinner</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/feedback/spinner/snippets.ts",
    "content": "const importComponent = `import { Spinner } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Spinner />`;\n\nconst color = `<Spinner color=\"tomato\" />`;\n\nconst emptyAreaColor = `<Spinner \n  thickness=\"4px\" \n  speed=\"0.65s\" \n  emptyColor=\"$neutral4\" \n  color=\"$info10\" \n  size=\"xl\" \n/>`;\n\nconst sizes = `<HStack spacing=\"$4\">\n  <Spinner size=\"xs\" />\n  <Spinner size=\"sm\" />\n  <Spinner size=\"md\" />\n  <Spinner size=\"lg\" />\n  <Spinner size=\"xl\" />\n</HStack>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Spinner: {\n      baseStyle: SystemStyleObject,\n      defaultProps: ThemeableSpinnerOptions\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  color,\n  emptyAreaColor,\n  sizes,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/general/button/index.tsx",
    "content": "import {\n  Alert,\n  AlertDescription,\n  Anchor,\n  Button,\n  ButtonGroup,\n  hope,\n  HStack,\n  IconButton,\n  ListItem,\n  Text,\n  UnorderedList,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Link } from \"solid-app-router\";\nimport { onMount } from \"solid-js\";\n\nimport { BeatLoader } from \"@/components/BeatLoader\";\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { IconArrowRight } from \"@/icons/IconArrowRight\";\nimport { IconEmail } from \"@/icons/IconEmail\";\nimport { IconPlus } from \"@/icons/IconPlus\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function ButtonDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/theming/color-mode\",\n    label: \"Color mode\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/general/icon-button\",\n    label: \"IconButton\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#button-colors\", label: \"Button colors\", indent: true },\n    { href: \"#button-sizes\", label: \"Button sizes\", indent: true },\n    { href: \"#button-variants\", label: \"Button variants\", indent: true },\n    { href: \"#button-with-icon\", label: \"Button with icon\", indent: true },\n    { href: \"#button-loading-state\", label: \"Button loading state\", indent: true },\n    { href: \"#button-group\", label: \"Grouping buttons\", indent: true },\n    { href: \"#accessibility\", label: \"Accessibility\" },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#button-props\", label: \"Button props\", indent: true },\n    { href: \"#button-group-props\", label: \"ButtonGroup props\", indent: true },\n  ];\n\n  const buttonPropItems: PropsTableItem[] = [\n    {\n      name: \"variant\",\n      description: \"The visual style of the button.\",\n      type: '\"solid\" | \"subtle\" | \"outline\" | \"dashed\" | \"ghost\"',\n      defaultValue: '\"solid\"',\n    },\n    {\n      name: \"colorScheme\",\n      description: \"The color of the button.\",\n      type: '\"primary\" | \"accent\" | \"neutral\" | \"success\" | \"info\" | \"warning\" | \"danger\"',\n      defaultValue: '\"primary\"',\n    },\n    {\n      name: \"size\",\n      description: \"The size of the button.\",\n      type: '\"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"compact\",\n      description: \"If `true`, Reduces the button padding.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"fullWidth\",\n      description: \"If `true`, the button will take up the full width of its container.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"disabled\",\n      description: \"If `true`, the button will be disabled.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"loading\",\n      description: \"If `true`, the button will show a loader.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"loadingText\",\n      description: \"The label to show in the button when `loading` is true.\",\n      type: \"string\",\n      defaultValue: \"\",\n    },\n    {\n      name: \"loader\",\n      description: \"Replace the loader component when `loading` is `true`.\",\n      type: \"JSX.Element\",\n      defaultValue: \"\",\n    },\n    {\n      name: \"loaderPlacement\",\n      description: \"Determines the placement of the loader when `loading` is `true`.\",\n      type: '\"start\" | \"end\"',\n      defaultValue: '\"start\"',\n    },\n    {\n      name: \"iconSpacing\",\n      description: \"The space between the button icon and label.\",\n      type: \"Property.MarginRight<SpaceScaleValue>\",\n      defaultValue: \"0.5rem\",\n    },\n    {\n      name: \"leftIcon\",\n      description: \"If added, the button will show an icon before the button's label.\",\n      type: \"JSX.Element\",\n      defaultValue: \"\",\n    },\n    {\n      name: \"rightIcon\",\n      description: \"If added, the button will show an icon after the button's label.\",\n      type: \"JSX.Element\",\n      defaultValue: \"\",\n    },\n  ];\n\n  const buttonGroupPropItems: PropsTableItem[] = [\n    {\n      name: \"spacing\",\n      description: \"The spacing between each buttons.\",\n      type: 'MarginProps[\"marginRight\"]',\n      defaultValue: \"0.5rem\",\n    },\n    {\n      name: \"attached\",\n      description:\n        \"If `true`, the borderRadius of button that are direct children will be altered to look flushed together.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"variant\",\n      description: \"The visual style of all wrapped buttons.\",\n      type: '\"solid\" | \"subtle\" | \"outline\" | \"dashed\" | \"ghost\"',\n    },\n    {\n      name: \"colorScheme\",\n      description: \"The color of all wrapped buttons.\",\n      type: '\"primary\" | \"accent\" | \"neutral\" | \"success\" | \"info\" | \"warning\" | \"danger\"',\n    },\n    {\n      name: \"size\",\n      description: \"The size of all wrapped buttons.\",\n      type: '\"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"',\n    },\n    {\n      name: \"disabled\",\n      description: \"If `true`, all wrapped buttons will be disabled.\",\n      type: \"boolean\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Button</PageTitle>\n      <Text mb=\"$8\">\n        The Button component is used to trigger an action or event, such as submitting a form,\n        opening a dialog, canceling an action, or performing a delete operation.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Button>Button</Button>\n      </Preview>\n      <SectionSubtitle id=\"button-colors\">Button colors</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>colorScheme</Code> prop to change the color of the Button. You can set the\n        value to <Code>primary</Code>, <Code>accent</Code>, <Code>neutral</Code>,{\" \"}\n        <Code>success</Code>, <Code>info</Code>, <Code>warning</Code> or <Code>danger</Code>.\n      </Text>\n      <Preview snippet={snippets.buttonColors} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Button colorScheme=\"primary\">Button</Button>\n          <Button colorScheme=\"accent\">Button</Button>\n          <Button colorScheme=\"neutral\">Button</Button>\n          <Button colorScheme=\"success\">Button</Button>\n          <Button colorScheme=\"info\">Button</Button>\n          <Button colorScheme=\"warning\">Button</Button>\n          <Button colorScheme=\"danger\">Button</Button>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"button-sizes\">Button sizes</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>size</Code> prop to change the size of the Button. You can set the value to{\" \"}\n        <Code>xs</Code>, <Code>sm</Code>, <Code>md</Code>, <Code>lg</Code> or <Code>xl</Code>.\n      </Text>\n      <Preview snippet={snippets.buttonSizes} mb=\"$8\">\n        <HStack spacing=\"$4\">\n          <Button size=\"xs\">Button</Button>\n          <Button size=\"sm\">Button</Button>\n          <Button size=\"md\">Button</Button>\n          <Button size=\"lg\">Button</Button>\n          <Button size=\"xl\">Button</Button>\n        </HStack>\n      </Preview>\n      <Text mb=\"$5\">\n        Use the <Code>compact</Code> prop to reduces the Button padding.\n      </Text>\n      <Preview snippet={snippets.buttonSizesCompact} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Button size=\"xs\" compact>\n            Button\n          </Button>\n          <Button size=\"sm\" compact>\n            Button\n          </Button>\n          <Button size=\"md\" compact>\n            Button\n          </Button>\n          <Button size=\"lg\" compact>\n            Button\n          </Button>\n          <Button size=\"xl\" compact>\n            Button\n          </Button>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"button-variants\">Button variants</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>variant</Code> prop to change the visual style of the Button. You can set the\n        value to <Code>solid</Code>, <Code>subtle</Code>, <Code>outline</Code>, <Code>dashed</Code>{\" \"}\n        or <Code>ghost</Code>.\n      </Text>\n      <Preview snippet={snippets.buttonVariants} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Button variant=\"solid\">Button</Button>\n          <Button variant=\"subtle\">Button</Button>\n          <Button variant=\"outline\">Button</Button>\n          <Button variant=\"dashed\">Button</Button>\n          <Button variant=\"ghost\">Button</Button>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"button-with-icon\">Button with icon</SectionSubtitle>\n      <Text mb=\"$5\">\n        You can add left and right icons to the Button component using the <Code>leftIcon</Code> and{\" \"}\n        <Code>rightIcon</Code> props respectively.\n      </Text>\n      <Alert status=\"warning\" mb=\"$5\">\n        <AlertDescription>\n          The <Code>leftIcon</Code> and <Code>rightIcon</Code> prop values should be jsx elements\n          not strings.\n        </AlertDescription>\n      </Alert>\n      <Preview snippet={snippets.buttonWithIcon} mb=\"$5\">\n        <HStack spacing=\"$4\">\n          <Button leftIcon={<IconEmail boxSize={18} />}>Email</Button>\n          <Button rightIcon={<IconArrowRight />} variant=\"outline\">\n            Call us\n          </Button>\n        </HStack>\n      </Preview>\n      <Text mb=\"$10\">\n        If you want to create your own icon components check out Hope UI{\" \"}\n        <Anchor as={Link} href=\"/docs/data-display/icon\" color=\"$primary11\" fontWeight=\"$semibold\">\n          Icon\n        </Anchor>{\" \"}\n        documentation.\n      </Text>\n      <SectionSubtitle id=\"button-loading-state\">Button loading state</SectionSubtitle>\n      <Text mb=\"$5\">\n        Pass the <Code>loading</Code> prop to show its loading state. By default, the button will\n        show a spinner and leave the button's width unchanged. You can also pass the{\" \"}\n        <Code>loadingText</Code> prop to show a spinner and the loading text.\n      </Text>\n      <Preview snippet={snippets.buttonLoadingState} mb=\"$8\">\n        <HStack spacing=\"$4\">\n          <Button loading>Loading</Button>\n          <Button variant=\"outline\" loading loadingText=\"Submitting\">\n            Submit\n          </Button>\n        </HStack>\n      </Preview>\n      <Text mb=\"$5\">\n        You can change the loader element to use custom loaders as per your design requirements.\n        Pass the <Code>loader</Code> prop and set it to a custom jsx element.\n      </Text>\n      <Preview snippet={snippets.buttonCustomLoader} mb=\"$8\">\n        <Button loading loader={<BeatLoader boxSize=\"$8\" />}>\n          Button\n        </Button>\n      </Preview>\n      <Text mb=\"$5\">\n        When a <Code>loaderText</Code> is present, you can change the placement of the loader\n        element to either <Code>start</Code> or <Code>end</Code>.\n      </Text>\n      <Preview snippet={snippets.buttonLoaderPlacement} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <Button variant=\"outline\" loading loadingText=\"Loading\" loaderPlacement=\"start\">\n            Submit\n          </Button>\n          <Button variant=\"outline\" loading loadingText=\"Loading\" loaderPlacement=\"end\">\n            Continue\n          </Button>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"button-group\">Grouping buttons</SectionSubtitle>\n      <Text mb=\"$3\">\n        You can use the <Code>Stack</Code> or <Code>ButtonGroup</Code> component to group buttons.\n        When you use the <Code>ButtonGroup</Code> component, it allows you to:\n      </Text>\n      <UnorderedList spacing=\"$2\" mb=\"$5\">\n        <ListItem>\n          Set the <Code>variant</Code>, <Code>colorScheme</Code>, <Code>size</Code> and{\" \"}\n          <Code>disabled</Code> state of all buttons within it.\n        </ListItem>\n        <ListItem>\n          Add <Code>spacing</Code> between the buttons.\n        </ListItem>\n        <ListItem>\n          Flush the buttons together by removing the border radius of its children as needed.\n        </ListItem>\n      </UnorderedList>\n      <Preview snippet={snippets.buttonGroup} mb=\"$6\">\n        <ButtonGroup variant=\"outline\" spacing=\"$6\">\n          <Button colorScheme=\"info\">Save</Button>\n          <Button>Cancel</Button>\n        </ButtonGroup>\n      </Preview>\n      <Text mb=\"$5\">\n        To flush the buttons, pass the <Code>attached</Code> prop.\n      </Text>\n      <Preview snippet={snippets.buttonGroupAttached} mb=\"$12\">\n        <ButtonGroup size=\"sm\" variant=\"outline\" attached>\n          <Button mr=\"-1px\">Save</Button>\n          <IconButton aria-label=\"Add to friends\" icon={<IconPlus />} />\n        </ButtonGroup>\n      </Preview>\n      <SectionTitle id=\"accessibility\">Accessibility</SectionTitle>\n      <hope.ul ps=\"$5\" mb=\"$12\">\n        <hope.li mb=\"$2\">\n          Button has <Code>role</Code> of <Code>button</Code>.\n        </hope.li>\n        <hope.li>When Button has focus, Space or Enter activates it.</hope.li>\n      </hope.ul>\n      <SectionTitle id=\"composition\">Composition</SectionTitle>\n      <Text mb=\"$5\">You can override any style of the Button via style props.</Text>\n      <Preview snippet={snippets.composition} mb=\"$12\">\n        <Button\n          variant=\"ghost\"\n          colorScheme=\"neutral\"\n          size=\"md\"\n          height=\"48px\"\n          width=\"200px\"\n          borderWidth=\"2px\"\n          borderColor=\"$success8\"\n        >\n          Button\n        </Button>\n      </Preview>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Button</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"button-props\">Button props</SectionSubtitle>\n      <PropsTable items={buttonPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"button-group-props\">ButtonGroup props</SectionSubtitle>\n      <PropsTable items={buttonGroupPropItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/general/button/snippets.ts",
    "content": "const importComponent = `import { Button } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Button>Button</Button>`;\n\nconst buttonColors = `<HStack spacing=\"$4\">\n  <Button colorScheme=\"primary\">Button</Button>\n  <Button colorScheme=\"accent\">Button</Button>\n  <Button colorScheme=\"neutral\">Button</Button>\n  <Button colorScheme=\"success\">Button</Button>\n  <Button colorScheme=\"info\">Button</Button>\n  <Button colorScheme=\"warning\">Button</Button>\n  <Button colorScheme=\"danger\">Button</Button>\n</HStack>`;\n\nconst buttonSizes = `<HStack spacing=\"$4\">\n  <Button size=\"xs\">Button</Button>\n  <Button size=\"sm\">Button</Button>\n  <Button size=\"md\">Button</Button>\n  <Button size=\"lg\">Button</Button>\n  <Button size=\"xl\">Button</Button>\n</HStack>`;\n\nconst buttonSizesCompact = `<HStack spacing=\"$4\">\n  <Button size=\"xs\" compact>Button</Button>\n  <Button size=\"sm\" compact>Button</Button>\n  <Button size=\"md\" compact>Button</Button>\n  <Button size=\"lg\" compact>Button</Button>\n  <Button size=\"xl\" compact>Button</Button>\n</HStack>`;\n\nconst buttonVariants = `<HStack spacing=\"$4\">\n  <Button variant=\"solid\">Button</Button>\n  <Button variant=\"subtle\">Button</Button>\n  <Button variant=\"outline\">Button</Button>\n  <Button variant=\"dashed\">Button</Button>\n  <Button variant=\"ghost\">Button</Button>\n</HStack>`;\n\nconst buttonWithIcon = `<HStack spacing=\"$4\">\n  <Button leftIcon={<IconEmail boxSize={18} />}>Email</Button>\n  <Button rightIcon={<IconArrowRight />} variant=\"outline\">\n    Call us\n  </Button>\n</HStack>`;\n\nconst buttonLoadingState = `<HStack spacing=\"$4\">\n  <Button loading>Loading</Button>\n  <Button variant=\"outline\" loading loadingText=\"Submitting\">\n    Submit\n  </Button>\n</HStack>`;\n\nconst buttonCustomLoader = `<Button loading loader={<BeatLoader boxSize=\"$8\" />}>\n  Button\n</Button>`;\n\nconst buttonLoaderPlacement = `<HStack spacing=\"$4\">\n  <Button variant=\"outline\" loading loadingText=\"Loading\" loaderPlacement=\"start\">\n    Submit\n  </Button>\n  <Button variant=\"outline\" loading loadingText=\"Loading\" loaderPlacement=\"end\">\n    Continue\n  </Button>\n</HStack>`;\n\nconst buttonGroup = `<ButtonGroup variant=\"outline\" spacing=\"$6\">\n  <Button colorScheme=\"info\">Save</Button>\n  <Button>Cancel</Button>\n</ButtonGroup>`;\n\nconst buttonGroupAttached = `<ButtonGroup size=\"sm\" variant=\"outline\" attached>\n  <Button mr=\"-1px\">Save</Button>\n  <IconButton aria-label=\"Add to friends\" icon={<IconPlus />} />\n</ButtonGroup>`;\n\nconst composition = `// The size prop affects the height of the button\n// It can still be overridden by passing a custom height\n<Button\n  variant=\"default\"\n  size=\"md\"\n  height=\"48px\"\n  width=\"200px\"\n  borderWidth=\"2px\"\n  borderColor=\"$success8\"\n>\n  Button\n</Button>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Button: {\n      baseStyle: {\n        root: SystemStyleObject,\n        group: SystemStyleObject,\n      },\n      defaultProps: {\n        root: ThemeableButtonOptions,\n        group: ThemeableButtonGroupOptions,\n      };\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  buttonColors,\n  buttonSizes,\n  buttonSizesCompact,\n  buttonVariants,\n  buttonWithIcon,\n  buttonLoadingState,\n  buttonCustomLoader,\n  buttonLoaderPlacement,\n  buttonGroup,\n  buttonGroupAttached,\n  composition,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/general/icon-button/index.tsx",
    "content": "import { hope, HStack, IconButton, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport { BeatLoader } from \"@/components/BeatLoader\";\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { IconSearch } from \"@/icons/IconSearch\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function IconButtonDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/general/button\",\n    label: \"Button\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/layout/aspect-ratio\",\n    label: \"AspectRatio\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#button-colors\", label: \"Button colors\", indent: true },\n    { href: \"#button-sizes\", label: \"Button sizes\", indent: true },\n    { href: \"#button-variants\", label: \"Button variants\", indent: true },\n    { href: \"#button-loading-state\", label: \"Button loading state\", indent: true },\n    { href: \"#accessibility\", label: \"Accessibility\" },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      required: true,\n      name: \"aria-label\",\n      description: \"A label that describes the button.\",\n      type: \"string\",\n      defaultValue: \"\",\n    },\n    {\n      name: \"icon\",\n      description: \"The icon to be used in the button.\",\n      type: \"JSX.Element\",\n      defaultValue: \"\",\n    },\n    {\n      name: \"variant\",\n      description: \"The visual style of the button.\",\n      type: '\"solid\" | \"subtle\" | \"outline\" | \"dashed\" | \"ghost\"',\n      defaultValue: '\"solid\"',\n    },\n    {\n      name: \"colorScheme\",\n      description: \"The color of the button.\",\n      type: '\"primary\" | \"accent\" | \"neutral\" | \"success\" | \"info\" | \"warning\" | \"danger\"',\n      defaultValue: '\"primary\"',\n    },\n    {\n      name: \"size\",\n      description: \"The size of the button.\",\n      type: '\"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"compact\",\n      description: \"If `true`, Reduces the button padding.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"disabled\",\n      description: \"If `true`, the button will be disabled.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"loading\",\n      description: \"If `true`, the button will show a loader.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"loader\",\n      description: \"Replace the loader component when `loading` is `true`.\",\n      type: \"JSX.Element\",\n      defaultValue: \"\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>IconButton</PageTitle>\n      <Text mb=\"$8\">\n        IconButton composes the <Code>Button</Code> component except that it renders only an icon.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <IconButton aria-label=\"Search\" icon={<IconSearch />} />\n      </Preview>\n      <SectionSubtitle id=\"button-colors\">Button colors</SectionSubtitle>\n      <Text mb=\"$5\">\n        The <Code>IconButton</Code> component accepts most of the props from the <Code>Button</Code>{\" \"}\n        component, so we can use <Code>colorScheme</Code> prop to change the color of the button.\n      </Text>\n      <Preview snippet={snippets.buttonColors} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <IconButton colorScheme=\"primary\" aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton colorScheme=\"accent\" aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton colorScheme=\"neutral\" aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton colorScheme=\"success\" aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton colorScheme=\"info\" aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton colorScheme=\"warning\" aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton colorScheme=\"danger\" aria-label=\"Search\" icon={<IconSearch />} />\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"button-sizes\">Button sizes</SectionSubtitle>\n      <Text mb=\"$5\">\n        Like the <Code>Button</Code> component, pass the <Code>size</Code> prop to change the size\n        of the button.\n      </Text>\n      <Preview snippet={snippets.buttonSizes} mb=\"$8\">\n        <HStack spacing=\"$4\">\n          <IconButton size=\"xs\" aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton size=\"sm\" aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton size=\"md\" aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton size=\"lg\" aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton size=\"xl\" aria-label=\"Search\" icon={<IconSearch />} />\n        </HStack>\n      </Preview>\n      <Text mb=\"$5\">\n        Use the <Code>compact</Code> prop to reduces the button padding.\n      </Text>\n      <Preview snippet={snippets.buttonSizesCompact} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <IconButton size=\"xs\" compact aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton size=\"sm\" compact aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton size=\"md\" compact aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton size=\"lg\" compact aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton size=\"xl\" compact aria-label=\"Search\" icon={<IconSearch />} />\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"button-variants\">Button variants</SectionSubtitle>\n      <Text mb=\"$5\">\n        Like the <Code>Button</Code> component, pass the <Code>variant</Code> prop to change the\n        style of the button.\n      </Text>\n      <Preview snippet={snippets.buttonVariants} mb=\"$10\">\n        <HStack spacing=\"$4\">\n          <IconButton variant=\"solid\" aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton variant=\"subtle\" aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton variant=\"outline\" aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton variant=\"dashed\" aria-label=\"Search\" icon={<IconSearch />} />\n          <IconButton variant=\"ghost\" aria-label=\"Search\" icon={<IconSearch />} />\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"button-loading-state\">Button loading state</SectionSubtitle>\n      <Text mb=\"$5\">\n        Pass the <Code>loading</Code> prop to show its loading state.\n      </Text>\n      <Preview snippet={snippets.buttonLoadingState} mb=\"$8\">\n        <IconButton loading aria-label=\"Search\" icon={<IconSearch />} />\n      </Preview>\n      <Text mb=\"$5\">\n        You can change the loader element to use custom loaders as per your design requirements.\n        Pass the <Code>loader</Code> prop and set it to a custom jsx element.\n      </Text>\n      <Preview snippet={snippets.buttonCustomLoader} mb=\"$12\">\n        <IconButton\n          loading\n          loader={<BeatLoader boxSize=\"$6\" />}\n          aria-label=\"Search\"\n          icon={<IconSearch />}\n        />\n      </Preview>\n      <SectionTitle id=\"accessibility\">Accessibility</SectionTitle>\n      <hope.ul ps=\"$5\" mb=\"$12\">\n        <hope.li mb=\"$2\">\n          IconButton has <Code>role</Code> of <Code>button</Code>.\n        </hope.li>\n        <hope.li mb=\"$2\">\n          Since the button is only an icon <Code>aria-label</Code> is required.\n        </hope.li>\n        <hope.li>When IconButton has focus, Space or Enter activates it.</hope.li>\n      </hope.ul>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>IconButton</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/general/icon-button/snippets.ts",
    "content": "const importComponent = `import { IconButton } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<IconButton aria-label=\"Search\" icon={<IconSearch />} />`;\n\nconst buttonColors = `<HStack spacing=\"$4\">\n  <IconButton colorScheme=\"primary\" aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton colorScheme=\"accent\" aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton colorScheme=\"neutral\" aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton colorScheme=\"success\" aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton colorScheme=\"info\" aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton colorScheme=\"warning\" aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton colorScheme=\"danger\" aria-label=\"Search\" icon={<IconSearch />} />\n</HStack>`;\n\nconst buttonSizes = `<HStack spacing=\"$4\">\n  <IconButton size=\"xs\" aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton size=\"sm\" aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton size=\"md\" aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton size=\"lg\" aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton size=\"xl\" aria-label=\"Search\" icon={<IconSearch />} />\n</HStack>`;\n\nconst buttonSizesCompact = `<HStack spacing=\"$4\">\n  <IconButton size=\"xs\" compact aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton size=\"sm\" compact aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton size=\"md\" compact aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton size=\"lg\" compact aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton size=\"xl\" compact aria-label=\"Search\" icon={<IconSearch />} />\n</HStack>`;\n\nconst buttonVariants = `<HStack spacing=\"$4\">\n  <IconButton variant=\"solid\" aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton variant=\"subtle\" aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton variant=\"outline\" aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton variant=\"dashed\" aria-label=\"Search\" icon={<IconSearch />} />\n  <IconButton variant=\"ghost\" aria-label=\"Search\" icon={<IconSearch />} />\n</HStack>`;\n\nconst buttonLoadingState = `<IconButton loading aria-label=\"Search\" icon={<IconSearch />} />`;\n\nconst buttonCustomLoader = `<IconButton\n  loading\n  loader={<BeatLoader boxSize=\"$6\" />}\n  aria-label=\"Search\"\n  icon={<IconSearch />}\n/>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    IconButton: {\n      baseStyle: SystemStyleObject,\n      defaultProps: ThemeableIconButtonOptions\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  buttonColors,\n  buttonSizes,\n  buttonSizesCompact,\n  buttonVariants,\n  buttonLoadingState,\n  buttonCustomLoader,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/aspect-ratio/index.tsx",
    "content": "import { Anchor, AspectRatio, hope, Image, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function AspectRatioDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/general/icon-button\",\n    label: \"IconButton\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/layout/box\",\n    label: \"Box\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#embed-video\", label: \"Embed video\", indent: true },\n    { href: \"#embed-image\", label: \"Embed image\", indent: true },\n    { href: \"#embed-map\", label: \"Embed a map\", indent: true },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"ratio\",\n      description: \"The aspect ratio of the Box (ex: 16/9, 4/3, etc).\",\n      type: \"ResponsiveValue<number>\",\n      defaultValue: \"4/3\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>AspectRatio</PageTitle>\n      <Text mb=\"$5\">\n        AspectRatio component is used to embed responsive videos and maps, etc. It uses a very\n        common{\" \"}\n        <Anchor\n          href=\"https://css-tricks.com/aspect-ratio-boxes/\"\n          external\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          padding hack\n        </Anchor>{\" \"}\n        to achieve this.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <SectionSubtitle id=\"embed-video\">Embed video</SectionSubtitle>\n      <Text mb=\"$5\">\n        To embed a video with a specific aspect ratio, use an iframe with <Code>src</Code> pointing\n        to the link of the video.\n      </Text>\n      <Text mb=\"$5\">\n        Pass the <Code>maxWidth</Code> prop to <Code>AspectRatio</Code> to control the width of the\n        content.\n      </Text>\n      <Preview snippet={snippets.embedVideo} mb=\"$10\">\n        <AspectRatio maxW=\"560px\" ratio={1}>\n          <iframe\n            title=\"one piece opening 1\"\n            src=\"https://www.youtube.com/embed/HRaoYuRKBaA\"\n            allowfullscreen\n          />\n        </AspectRatio>\n      </Preview>\n      <SectionSubtitle id=\"embed-image\">Embed image</SectionSubtitle>\n      <Text mb=\"$5\">Here's how to embed an image that has a 4 by 3 aspect ratio.</Text>\n      <Preview snippet={snippets.embedImage} mb=\"$10\">\n        <AspectRatio maxW=\"400px\" ratio={4 / 3}>\n          <Image src=\"https://bit.ly/3pq0AcS\" alt=\"Monkey D. Luffy\" objectFit=\"cover\" />\n        </AspectRatio>\n      </Preview>\n      <SectionSubtitle id=\"embed-map\">Embed a map</SectionSubtitle>\n      <Text mb=\"$5\">\n        Here's how to embed a responsive Google map using <Code>AspectRatio</Code>. To make the map\n        take up the entire width, we can ignore the <Code>maxWidth</Code> prop.\n      </Text>\n      <Preview snippet={snippets.embedMap} mb=\"$12\">\n        <AspectRatio ratio={16 / 9}>\n          <iframe\n            title=\"reunion island\"\n            src=\"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d10240.720471033459!2d55.27333136315537!3d-21.009371764170627!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x218288b199fec3e9%3A0xcd75253c6f21188d!2sSt%20Paul%2097460%2C%20La%20R%C3%A9union!5e0!3m2!1sfr!2sfr!4v1646123686380!5m2!1sfr!2sfr\"\n          />\n        </AspectRatio>\n      </Preview>\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/aspect-ratio/snippets.ts",
    "content": "const importComponent = `import { AspectRatio } from \"@hope-ui/solid\"`;\n\nconst embedVideo = `// This video will have equal sides\n<AspectRatio maxW=\"560px\" ratio={1}>\n  <iframe\n    title=\"one piece opening 1\"\n    src=\"https://www.youtube.com/embed/HRaoYuRKBaA\"\n    allowfullscreen\n  />\n</AspectRatio>`;\n\nconst embedImage = `<AspectRatio maxW=\"400px\" ratio={4 / 3}>\n  <Image src=\"https://bit.ly/3pq0AcS\" alt=\"Monkey D. Luffy\" objectFit=\"cover\" />\n</AspectRatio>`;\n\nconst embedMap = `<AspectRatio ratio={16 / 9}>\n  <iframe\n    title=\"reunion island\"\n    src=\"https://www.google.com/maps/embed?\npb=!1m18!1m12!1m3!1d10240.720471033459!2d55.27333136315537!3d-21.009371764170627!2m3!1\nf0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x218288b199fec3e9%3A0xcd75253c6f21188d!2\nsSt%20Paul%2097460%2C%20La%20R%C3%A9union!5e0!3m2!1sfr!2sfr!4v1646123686380!5m2!1sfr!2sfr\"\n  />\n</AspectRatio>`;\n\nexport const snippets = {\n  importComponent,\n  embedVideo,\n  embedImage,\n  embedMap,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/box/index.tsx",
    "content": "import { Badge, Box, hope, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { For, onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { IconStar } from \"@/icons/IconStar\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function BoxDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/layout/aspect-ratio\",\n    label: \"AspectRatio\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/layout/center\",\n    label: \"Center\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#as-prop\", label: \"The `as` prop\" },\n  ];\n\n  const property = {\n    imageUrl: \"https://bit.ly/2Z4KKcF\",\n    imageAlt: \"Rear view of modern home with pool\",\n    beds: 3,\n    baths: 2,\n    title: \"Modern home in city center in the heart of historic Los Angeles\",\n    formattedPrice: \"$1,900.00\",\n    reviewCount: 34,\n    rating: 4,\n  };\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Box</PageTitle>\n      <Text mb=\"$5\">\n        Box is the most abstract component on top of which all other Hope UI components are built.\n        By default, it renders a <Code>div</Code> element.\n      </Text>\n      <Text mb=\"$2\">The Box component is useful because it helps with 3 common use cases:</Text>\n      <hope.ul ps=\"$6\" mb=\"$8\">\n        <hope.li mb=\"$2\">Create responsive layouts with ease.</hope.li>\n        <hope.li mb=\"$2\">Provide a shorthand way to pass styles via props.</hope.li>\n        <hope.li>\n          Compose new component and allow for override using the <Code>as</Code> prop.\n        </hope.li>\n      </hope.ul>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$8\">\n        <Box bg=\"tomato\" w=\"100%\" p=\"$4\" color=\"white\">\n          This is the Box\n        </Box>\n      </Preview>\n      <Text mb=\"$5\">\n        A more complexe example of composing with <Code>Box</Code>:\n      </Text>\n      <Preview snippet={snippets.complexeExample} mb=\"$12\">\n        <Box\n          maxW=\"$sm\"\n          borderWidth=\"1px\"\n          borderColor=\"$neutral6\"\n          borderRadius=\"$lg\"\n          overflow=\"hidden\"\n        >\n          <Box as=\"img\" src={property.imageUrl} alt={property.imageAlt} />\n          <Box p=\"$6\">\n            <Box display=\"flex\" alignItems=\"baseline\">\n              <Badge px=\"$2\" colorScheme=\"primary\" rounded=\"$full\">\n                New\n              </Badge>\n              <Box\n                color=\"$neutral9\"\n                fontWeight=\"$bold\"\n                letterSpacing=\"$wide\"\n                fontSize=\"$xs\"\n                textTransform=\"uppercase\"\n                ml=\"$2\"\n              >\n                {property.beds} beds &bull; {property.baths} baths\n              </Box>\n            </Box>\n\n            <Box mt=\"$1\" fontWeight=\"$semibold\" as=\"h4\" lineHeight=\"$tight\" noOfLines={1}>\n              {property.title}\n            </Box>\n\n            <Box>\n              {property.formattedPrice}\n              <Box as=\"span\" color=\"$neutral11\" fontSize=\"$sm\">\n                / wk\n              </Box>\n            </Box>\n\n            <Box display=\"flex\" mt=\"$2\" alignItems=\"center\">\n              <For each={Array(5).fill(\"\")}>\n                {(_, i) => <IconStar color={i() < property.rating ? \"$warning9\" : \"$neutral3\"} />}\n              </For>\n              <Box as=\"span\" ml=\"$2\" color=\"$neutral11\" fontSize=\"$sm\">\n                {property.reviewCount} reviews\n              </Box>\n            </Box>\n          </Box>\n        </Box>\n      </Preview>\n      <SectionTitle id=\"as-prop\">\n        The <Code>as</Code> prop\n      </SectionTitle>\n      <Text mb=\"$5\">\n        You can use the <Code>as</Code> prop to change the element render, just like\n        styled-components.\n      </Text>\n      <Preview snippet={snippets.asProp}>\n        <Box as=\"button\" borderRadius=\"$md\" bg=\"tomato\" color=\"white\" px=\"$4\" h=\"$8\">\n          Button\n        </Box>\n      </Preview>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/box/snippets.ts",
    "content": "const importComponent = `import { Box } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Box bg=\"tomato\" w=\"100%\" p=\"$4\" color=\"white\">\n  This is the Box\n</Box>`;\n\nconst complexeExample = `// Sample card from Airbnb\n\nfunction AirbnbExample() {\n  const property = {\n    imageUrl: \"https://bit.ly/2Z4KKcF\",\n    imageAlt: \"Rear view of modern home with pool\",\n    beds: 3,\n    baths: 2,\n    title: \"Modern home in city center in the heart of historic Los Angeles\",\n    formattedPrice: \"$1,900.00\",\n    reviewCount: 34,\n    rating: 4,\n  }\n\n  return (\n    <Box\n      maxW=\"$sm\"\n      borderWidth=\"1px\"\n      borderColor=\"$neutral6\"\n      borderRadius=\"$lg\"\n      overflow=\"hidden\"\n    >\n      <Box as=\"img\" src={property.imageUrl} alt={property.imageAlt} />\n      <Box p=\"$6\">\n        <Box display=\"flex\" alignItems=\"baseline\">\n          <Badge px=\"$2\" colorScheme=\"primary\" rounded=\"$full\">\n            New\n          </Badge>\n          <Box\n            color=\"$neutral9\"\n            fontWeight=\"$bold\"\n            letterSpacing=\"$wide\"\n            fontSize=\"$xs\"\n            textTransform=\"uppercase\"\n            ml=\"$2\"\n          >\n            {property.beds} beds &bull; {property.baths} baths\n          </Box>\n        </Box>\n\n        <Box mt=\"$1\" fontWeight=\"$semibold\" as=\"h4\" lineHeight=\"$tight\" noOfLines={1}>\n          {property.title}\n        </Box>\n\n        <Box>\n          {property.formattedPrice}\n          <Box as=\"span\" color=\"$neutral11\" fontSize=\"$sm\">\n            / wk\n          </Box>\n        </Box>\n\n        <Box display=\"flex\" mt=\"$2\" alignItems=\"center\">\n          <For each={Array(5).fill(\"\")}>\n            {(_, i) => <IconStar color={i() < property.rating ? \"$warning9\" : \"$neutral3\"} />}\n          </For>\n          <Box as=\"span\" ml=\"$2\" color=\"$neutral11\" fontSize=\"$sm\">\n            {property.reviewCount} reviews\n          </Box>\n        </Box>\n      </Box>\n    </Box>\n  )\n}`;\n\nconst asProp = `<Box as=\"button\" borderRadius=\"$md\" bg=\"tomato\" color=\"white\" px=\"$4\" h=\"$8\">\n  Button\n</Box>`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  complexeExample,\n  asProp,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/center/index.tsx",
    "content": "import { Anchor, AspectRatio, Box, Center, hope, HStack, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { IconPhone } from \"@/icons/IconPhone\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function CenterDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/layout/box\",\n    label: \"Box\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/layout/container\",\n    label: \"Container\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#with-icons\", label: \"With icons\", indent: true },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Center</PageTitle>\n      <Text mb=\"$5\">Center is a layout component that centers its child within itself.</Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$5\">\n        Put any child element inside it, give it any <Code>width</Code> or/and <Code>height</Code>,\n        it'll ensure the child is centered.\n      </Text>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Center bg=\"tomato\" h=\"100px\" color=\"white\">\n          This is the Center\n        </Center>\n      </Preview>\n      <SectionSubtitle id=\"with-icons\">With icons</SectionSubtitle>{\" \"}\n      <Text mb=\"$5\">Center can be used to create frames around icons or numbers.</Text>\n      <Preview snippet={snippets.withIcons}>\n        <HStack spacing=\"$2\">\n          <Center w=\"40px\" h=\"40px\" bg=\"tomato\" color=\"white\">\n            <IconPhone />\n          </Center>\n          <Center w=\"40px\" h=\"40px\" bg=\"tomato\" color=\"white\">\n            <Box as=\"span\" fontWeight=\"$bold\" fontSize=\"$lg\">\n              1\n            </Box>\n          </Center>\n        </HStack>\n      </Preview>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/center/snippets.ts",
    "content": "const importComponent = `import { Center } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Center bg=\"tomato\" h=\"100px\" color=\"white\">\n  This is the Center\n</Center>`;\n\nconst withIcons = `<HStack spacing=\"$2\">\n  <Center w=\"40px\" h=\"40px\" bg=\"tomato\" color=\"white\">\n    <IconPhone />\n  </Center>\n  <Center w=\"40px\" h=\"40px\" bg=\"tomato\" color=\"white\">\n    <Box as=\"span\" fontWeight=\"$bold\" fontSize=\"$lg\">\n      1\n    </Box>\n  </Center>\n</HStack>`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  withIcons,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/container/index.tsx",
    "content": "import { Alert, AlertDescription, Box, Container, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function ContainerDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/layout/center\",\n    label: \"Center\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/layout/divider\",\n    label: \"Divider\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#centering-the-container\", label: \"Centering the container\", indent: true },\n    { href: \"#centering-the-children\", label: \"Centering the children\", indent: true },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"centered\",\n      description: \"If `true`, container itself will be centered on the page.\",\n      type: \"ResponsiveValue<boolean>\",\n      defaultValue: \"true\",\n    },\n    {\n      name: \"centerContent\",\n      description: \"If `true`, container will center its children regardless of their width.\",\n      type: \"ResponsiveValue<boolean>\",\n      defaultValue: \"false\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Container</PageTitle>\n      <Text mb=\"$5\">\n        Containers are used to constrain a content's width to the current breakpoint, while keeping\n        it fluid.\n      </Text>\n      <Text mb=\"$5\">\n        By default, it sets the <Code>max-width</Code> of the content to match the{\" \"}\n        <Code>min-width</Code> of the current breakpoint. This is useful if you’d prefer to design\n        for a fixed set of screen sizes instead of trying to accommodate a fully fluid viewport.\n      </Text>\n      <Text mb=\"$5\">\n        You can customize this behavior by passing custom <Code>maxWidth</Code> values.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$5\">\n        To contain any piece of content, wrap it in the <Code>Container</Code> component.\n      </Text>\n      <Preview snippet={snippets.basicUsage} mb=\"$5\">\n        <Container>\n          There are many benefits to a joint design and development system. Not only does it bring\n          benefits to the design team, but it also brings benefits to engineering teams. It makes\n          sure that our experiences have a consistent look and feel, not just in our design specs,\n          but in production\n        </Container>\n      </Preview>\n      <Alert status=\"info\" mb=\"$12\">\n        <AlertDescription>\n          The whole Hope UI docs is inside a <Code>Container</Code>, try resize your browser to see\n          it in action.\n        </AlertDescription>\n      </Alert>\n      <SectionSubtitle id=\"centering-the-container\">Centering the container</SectionSubtitle>\n      <Text mb=\"$5\">\n        By default the container is centered within its parent with a margin <Code>auto</Code> on\n        left and right, you can disabled this behavior by setting the <Code>centered</Code> prop to{\" \"}\n        <Code>false</Code>.\n      </Text>\n      <Preview snippet={snippets.centerContainer} mb=\"$12\">\n        <Container p=\"$4\" bg=\"tomato\" color=\"white\" maxW=\"$xl\" centered={false}>\n          There are many benefits to a joint design and development system. Not only does it bring\n          benefits to the design team.\n        </Container>\n      </Preview>\n      <SectionSubtitle id=\"centering-the-children\">Centering the children</SectionSubtitle>\n      <Text mb=\"$5\">\n        In some cases, the width of the content can be smaller than the container's width, you can\n        use the <Code>centerContent</Code> prop to center the content.\n      </Text>\n      <Preview snippet={snippets.centerContent} mb=\"$12\">\n        <Container bg=\"salmon\" centerContent>\n          <Box p=\"$4\" bg=\"tomato\" color=\"white\" maxW=\"$xl\">\n            There are many benefits to a joint design and development system. Not only does it bring\n            benefits to the design team.\n          </Box>\n        </Container>\n      </Preview>\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/container/snippets.ts",
    "content": "const importComponent = `import { Container } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Container>\n  There are many benefits to a joint design and development system. Not only does it bring\n  benefits to the design team, but it also brings benefits to engineering teams. It makes\n  sure that our experiences have a consistent look and feel, not just in our design specs,\n  but in production\n</Container>`;\n\nconst centerContainer = `<Container p=\"$4\" bg=\"tomato\" color=\"white\" maxW=\"$xl\" centered={false}>\n  There are many benefits to a joint design and development system. Not only does it bring\n  benefits to the design team.\n</Container>`;\n\nconst centerContent = `<Container bg=\"salmon\" centerContent>\n  <Box p=\"$4\" bg=\"tomato\" color=\"white\" maxW=\"$xl\">\n    There are many benefits to a joint design and development system. Not only does it bring\n    benefits to the design team.\n  </Box>\n</Container>`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  centerContainer,\n  centerContent,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/divider/index.tsx",
    "content": "import { Center, Divider, Text, VStack } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function DividerDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/layout/container\",\n    label: \"Container\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/layout/flex\",\n    label: \"Flex\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#orientation\", label: \"Orientation\", indent: true },\n    { href: \"#variants\", label: \"Variants\", indent: true },\n    { href: \"#thickness\", label: \"Thickness\", indent: true },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"orientation\",\n      description: \"The orientation of the Divider.\",\n      type: '\"horizontal\" | \"vertical\"',\n      defaultValue: '\"horizontal\"',\n    },\n    {\n      name: \"variant\",\n      description: \"The visual style of the Divider.\",\n      type: '\"solid\" | \"dashed\" | \"dotted\"',\n      defaultValue: '\"solid\"',\n    },\n    {\n      name: \"thickness\",\n      description: \"The thickness of the Divider.\",\n      type: \"Property.BorderWidth<SizeScaleValue>\",\n      defaultValue: '\"1px\"',\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Divider</PageTitle>\n      <Text mb=\"$5\">Dividers are used to visually separate content in a list or group.</Text>\n\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$5\">\n        The <Code>Divider</Code> displays a thin horizontal or vertical line, and renders a{\" \"}\n        <Code>div</Code> tag.\n      </Text>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Divider />\n      </Preview>\n      <SectionSubtitle id=\"orientation\">Orientation</SectionSubtitle>\n      <Text mb=\"$5\">\n        Pass the <Code>orientation</Code> prop and set it to either <Code>horizontal</Code> or{\" \"}\n        <Code>vertical</Code>.\n      </Text>\n      <Preview snippet={snippets.horizontal} mb=\"$8\">\n        <Divider orientation=\"horizontal\" />\n      </Preview>\n      <Text mb=\"$5\">\n        If the vertical orientation is used, make sure that the parent element is assigned a height.\n      </Text>\n      <Preview snippet={snippets.vertical} mb=\"$10\">\n        <Center height=\"50px\">\n          <Divider orientation=\"vertical\" />\n        </Center>\n      </Preview>\n      <SectionSubtitle id=\"variants\">Variants</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>variant</Code> prop to change the visual style of the divider.\n      </Text>\n      <Preview snippet={snippets.variants} mb=\"$10\">\n        <VStack spacing=\"$4\">\n          <Divider variant=\"solid\" />\n          <Divider variant=\"dashed\" />\n          <Divider variant=\"dotted\" />\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"thickness\">Thickness</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>thickness</Code> prop to change the thickness of the divider.\n      </Text>\n      <Preview snippet={snippets.thickness} mb=\"$12\">\n        <Divider thickness=\"3px\" />\n      </Preview>\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/divider/snippets.ts",
    "content": "const importComponent = `import { Divider } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Divider />`;\n\nconst horizontal = `<Divider orientation=\"horizontal\" />`;\n\nconst vertical = `<Center height=\"50px\">\n  <Divider orientation=\"vertical\" />\n</Center>`;\n\nconst variants = `<VStack spacing=\"$4\">\n  <Divider variant=\"solid\" />\n  <Divider variant=\"dashed\" />\n  <Divider variant=\"dotted\" />\n</VStack>`;\n\nconst thickness = `<Divider thickness=\"3px\" />`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  horizontal,\n  vertical,\n  variants,\n  thickness,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/flex/index.tsx",
    "content": "import {\n  Anchor,\n  Box,\n  Button,\n  Center,\n  Flex,\n  Grid,\n  Heading,\n  hope,\n  HStack,\n  Spacer,\n  Text,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Link } from \"solid-app-router\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function FlexDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/layout/divider\",\n    label: \"Divider\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/layout/grid\",\n    label: \"Grid\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#using-the-spacer\", label: \"Using the Spacer\", indent: true },\n    { href: \"#vs\", label: \"Flex and Spacer vs Grid vs Stack\" },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"direction\",\n      description: \"Shorthand for flexDirection style prop.\",\n      type: \"Property.FlexDirection\",\n    },\n    {\n      name: \"wrap\",\n      description: \"Shorthand for flexWrap style prop.\",\n      type: \"Property.FlexWrap\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Flex</PageTitle>\n      <Text mb=\"$5\">\n        Flex is{\" \"}\n        <Anchor as={Link} href=\"/docs/layout/box\" color=\"$primary11\" fontWeight=\"$semibold\">\n          Box\n        </Anchor>{\" \"}\n        with <Code>display: flex</Code> and comes with helpful style shorthand. It renders a{\" \"}\n        <Code>div</Code> element.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <hope.ul ps=\"$6\" mb=\"$12\">\n        <hope.li mb=\"$2\">\n          <strong>Flex:</strong> A <Code>Box</Code> with <Code>display: flex</Code>.\n        </hope.li>\n        <hope.li>\n          <strong>Spacer:</strong> Creates an adjustable, empty space that can be used to tune the\n          spacing between child elements within <Code>Flex</Code>.\n        </hope.li>\n      </hope.ul>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$3\">Using the Flex components, here are some helpful shorthand props:</Text>\n      <hope.ul ps=\"$6\" mb=\"$5\">\n        <hope.li mb=\"$2\">\n          <Code>flexDirection</Code> is <Code>direction</Code>.\n        </hope.li>\n        <hope.li>\n          <Code>flexWrap</Code> is <Code>wrap</Code>.\n        </hope.li>\n      </hope.ul>\n      <Text mb=\"$5\">\n        While you can pass the verbose props, using the shorthand can save you some time.\n      </Text>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Flex color=\"white\">\n          <Center w=\"100px\" bg=\"$success10\">\n            <Text>Box 1</Text>\n          </Center>\n          <Center boxSize=\"150px\" bg=\"$info10\">\n            <Text>Box 2</Text>\n          </Center>\n          <Box flex=\"1\" bg=\"tomato\">\n            <Text>Box 3</Text>\n          </Box>\n        </Flex>\n      </Preview>\n      <SectionSubtitle id=\"using-the-spacer\">Using the Spacer</SectionSubtitle>\n      <Text mb=\"$5\">\n        As an alternative to <Code>Stack</Code>, you can combine <Code>Flex</Code> and{\" \"}\n        <Code>Spacer</Code> to create stackable and responsive layouts.\n      </Text>\n      <Preview snippet={snippets.usingSpacer} mb=\"$12\">\n        <Flex>\n          <Box p=\"$4\" bg=\"$danger9\">\n            Box 1\n          </Box>\n          <Spacer />\n          <Box p=\"$4\" bg=\"$success9\">\n            Box 2\n          </Box>\n        </Flex>\n      </Preview>\n      <SectionTitle id=\"vs\">Flex and Spacer vs Grid vs Stack</SectionTitle>\n      <Text mb=\"$4\">\n        The <Code>Flex</Code> and <Code>Spacer</Code> components, <Code>Grid</Code> and{\" \"}\n        <Code>HStack</Code> treat children of different widths differently.\n      </Text>\n      <hope.ul ps=\"$6\" mb=\"$6\">\n        <hope.li mb=\"$2\">\n          With <Code>Flex</Code> and <Code>Spacer</Code>, the children will span the entire width of\n          the container and also have equal spacing between them.\n        </hope.li>\n        <hope.li mb=\"$2\">\n          In <Code>Grid</Code>, the starting points of the children will be equally spaced but the\n          gaps between them will not be equal.\n        </hope.li>\n        <hope.li>\n          In <Code>HStack</Code>, the children will have equal spacing between them but they won't\n          span the entire width of the container.\n        </hope.li>\n      </hope.ul>\n      <Preview snippet={snippets.vs} mb=\"$8\">\n        <Box>\n          <Text>Flex and Spacer: Full width, equal spacing</Text>\n          <Flex>\n            <Box w=\"70px\" h=\"$10\" bg=\"$danger9\" />\n            <Spacer />\n            <Box w=\"170px\" h=\"$10\" bg=\"$danger9\" />\n            <Spacer />\n            <Box w=\"180px\" h=\"$10\" bg=\"$danger9\" />\n          </Flex>\n\n          <Text mt=\"$4\">Grid: The children start at the beginning, the 1/3 mark and 2/3 mark</Text>\n          <Grid templateColumns=\"repeat(3, 1fr)\" gap=\"$6\">\n            <Box w=\"70px\" h=\"$10\" bg=\"$info9\" />\n            <Box w=\"170px\" h=\"$10\" bg=\"$info9\" />\n            <Box w=\"180px\" h=\"$10\" bg=\"$info9\" />\n          </Grid>\n\n          <Text mt=\"$4\">\n            HStack: The children have equal spacing but don't span the whole container\n          </Text>\n          <HStack spacing=\"24px\">\n            <Box w=\"70px\" h=\"$10\" bg=\"$success9\" />\n            <Box w=\"170px\" h=\"$10\" bg=\"$success9\" />\n            <Box w=\"180px\" h=\"$10\" bg=\"$success9\" />\n          </HStack>\n        </Box>\n      </Preview>\n      <Text mb=\"$5\">\n        A good use case for <Code>Spacer</Code> is to create a navbar with a signup/login button\n        aligned to the right.\n      </Text>\n      <Preview snippet={snippets.spacerUseCase} mb=\"$12\">\n        <Flex>\n          <Box p=\"$2\">\n            <Heading size=\"xl\" fontWeight=\"$bold\">\n              Hope App\n            </Heading>\n          </Box>\n          <Spacer />\n          <Box>\n            <Button mr=\"$4\">Sign Up</Button>\n            <Button>Log in</Button>\n          </Box>\n        </Flex>\n      </Preview>\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/flex/snippets.ts",
    "content": "const importComponent = `import { Flex, Spacer } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Flex color=\"white\">\n  <Center w=\"100px\" bg=\"$success10\">\n    <Text>Box 1</Text>\n  </Center>\n  <Center boxSize=\"150px\" bg=\"$info10\">\n    <Text>Box 2</Text>\n  </Center>\n  <Box flex=\"1\" bg=\"tomato\">\n    <Text>Box 3</Text>\n  </Box>\n</Flex>`;\n\nconst usingSpacer = `<Flex>\n  <Box p=\"$4\" bg=\"$danger9\">\n    Box 1\n  </Box>\n  <Spacer />\n  <Box p=\"$4\" bg=\"$success9\">\n    Box 2\n  </Box>\n</Flex>`;\n\nconst vs = `<Box>\n  <Text>Flex and Spacer: Full width, equal spacing</Text>\n  <Flex>\n    <Box w=\"70px\" h=\"$10\" bg=\"$danger9\" />\n    <Spacer />\n    <Box w=\"170px\" h=\"$10\" bg=\"$danger9\" />\n    <Spacer />\n    <Box w=\"180px\" h=\"$10\" bg=\"$danger9\" />\n  </Flex>\n\n  <Text>Grid: The children start at the beginning, the 1/3 mark and 2/3 mark</Text>\n  <Grid templateColumns=\"repeat(3, 1fr)\" gap=\"$6\">\n    <Box w=\"70px\" h=\"$10\" bg=\"$info9\" />\n    <Box w=\"170px\" h=\"$10\" bg=\"$info9\" />\n    <Box w=\"180px\" h=\"$10\" bg=\"$info9\" />\n  </Grid>\n\n  <Text>HStack: The children have equal spacing but don't span the whole container</Text>\n  <HStack spacing=\"24px\">\n    <Box w=\"70px\" h=\"$10\" bg=\"$success9\" />\n    <Box w=\"170px\" h=\"$10\" bg=\"$success9\" />\n    <Box w=\"180px\" h=\"$10\" bg=\"$success9\" />\n  </HStack>\n</Box>`;\n\nconst spacerUseCase = `<Flex>\n  <Box p=\"$2\">\n    <Heading size=\"xl\" fontWeight=\"$bold\">\n      Hope App\n    </Heading>\n  </Box>\n  <Spacer />\n  <Box>\n    <Button mr=\"$4\">Sign Up</Button>\n    <Button>Log in</Button>\n  </Box>\n</Flex>`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  usingSpacer,\n  vs,\n  spacerUseCase,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/grid/index.tsx",
    "content": "import { Anchor, Grid, GridItem, hope, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Link } from \"solid-app-router\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function GridDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/layout/flex\",\n    label: \"Flex\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/layout/simple-grid\",\n    label: \"SimpleGrid\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#template-columns\", label: \"Template columns\" },\n    { href: \"#spanning-columns\", label: \"Spanning columns\" },\n    { href: \"#starting-and-ending-lines\", label: \"Starting and ending lines\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#grid-props\", label: \"Grid props\", indent: true },\n    { href: \"#grid-item-props\", label: \"GridItem props\", indent: true },\n  ];\n\n  const gridPropItems: PropsTableItem[] = [\n    {\n      name: \"autoColumns\",\n      description: \"Short hand prop for gridAutoColumns.\",\n      type: \"Property.GridAutoColumns\",\n    },\n    {\n      name: \"autoRows\",\n      description: \"Short hand prop for gridAutoRows.\",\n      type: \"Property.GridAutoRows\",\n    },\n    {\n      name: \"autoFlow\",\n      description: \"Short hand prop for gridAutoFlow.\",\n      type: \"Property.GridAutoFlow\",\n    },\n    {\n      name: \"templateAreas\",\n      description: \"Short hand prop for gridTemplateAreas.\",\n      type: \"Property.GridTemplateAreas\",\n    },\n    {\n      name: \"templateColumns\",\n      description: \"Short hand prop for gridTemplateColumns.\",\n      type: \"Property.GridTemplateColumns\",\n    },\n    {\n      name: \"templateRows\",\n      description: \"Short hand prop for gridTemplateRows.\",\n      type: \"Property.GridTemplateRows\",\n    },\n  ];\n\n  const gridItemPropItems: PropsTableItem[] = [\n    {\n      name: \"area\",\n      description: \"Short hand prop for gridArea.\",\n      type: \"Property.GridArea\",\n    },\n    {\n      name: \"colStart\",\n      description: \"The column number the grid item should start.\",\n      type: \"Property.GridColumnStart\",\n    },\n    {\n      name: \"colEnd\",\n      description: \"The column number the grid item should end.\",\n      type: \"Property.GridColumnEnd\",\n    },\n    {\n      name: \"colSpan\",\n      description: \"The number of columns the grid item should span.\",\n      type: 'string | number | \"auto\" | \"full\"',\n    },\n    {\n      name: \"rowStart\",\n      description: \"The row number the grid item should start.\",\n      type: \"Property.GridRowStart\",\n    },\n    {\n      name: \"rowEnd\",\n      description: \"The row number the grid item should end.\",\n      type: \"Property.GridRowEnd\",\n    },\n    {\n      name: \"rowSpan\",\n      description: \"The number of rows the grid item should span.\",\n      type: 'string | number | \"auto\" | \"full\"',\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Grid</PageTitle>\n      <Text mb=\"$5\">\n        A primitive useful for grid layouts. Grid is{\" \"}\n        <Anchor as={Link} href=\"/docs/layout/box\" color=\"$primary11\" fontWeight=\"$semibold\">\n          Box\n        </Anchor>{\" \"}\n        with <Code>display: grid</Code> and it comes with helpful style shorthand. It renders a{\" \"}\n        <Code>div</Code> element.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <hope.ul ps=\"$6\" mb=\"$12\">\n        <hope.li mb=\"$2\">\n          <strong>Grid:</strong> The main wrapper with <Code>display: grid</Code>.\n        </hope.li>\n        <hope.li>\n          <strong>GridItem:</strong> Used as a child of <Code>Grid</Code> to control the span, and\n          start positions within the grid.\n        </hope.li>\n      </hope.ul>\n      <SectionTitle id=\"template-columns\">Template columns</SectionTitle>\n      <Text mb=\"$5\">\n        Here's an example of using grid template columns with the <Code>Grid</Code> component, and\n        applying a <Code>gap</Code> (space) between the grid items.\n      </Text>\n      <Preview snippet={snippets.templateColumns} mb=\"$12\">\n        <Grid templateColumns=\"repeat(5, 1fr)\" gap=\"$6\">\n          <GridItem w=\"100%\" h=\"$10\" bg=\"$info9\" />\n          <GridItem w=\"100%\" h=\"$10\" bg=\"$info9\" />\n          <GridItem w=\"100%\" h=\"$10\" bg=\"$info9\" />\n          <GridItem w=\"100%\" h=\"$10\" bg=\"$info9\" />\n          <GridItem w=\"100%\" h=\"$10\" bg=\"$info9\" />\n        </Grid>\n      </Preview>\n      <SectionTitle id=\"spanning-columns\">Spanning columns</SectionTitle>\n      <Text mb=\"$5\">\n        In some layouts, you may need certain grid items to span specific amount of columns or rows\n        instead of an even distribution.\n      </Text>\n      <Text mb=\"$5\">\n        To achieve this, you need to pass the <Code>colSpan</Code> prop to the <Code>GridItem</Code>{\" \"}\n        component to span across columns and also pass the <Code>rowSpan</Code> component to span\n        across rows. You also need to specify the <Code>templateColumns</Code> and\n        <Code>templateRows</Code>.\n      </Text>\n      <Preview snippet={snippets.spanningColumns} mb=\"$12\">\n        <Grid h=\"200px\" templateRows=\"repeat(2, 1fr)\" templateColumns=\"repeat(5, 1fr)\" gap=\"$4\">\n          <GridItem rowSpan={2} colSpan={1} bg=\"tomato\" />\n          <GridItem colSpan={2} bg=\"papayawhip\" />\n          <GridItem colSpan={2} bg=\"papayawhip\" />\n          <GridItem colSpan={4} bg=\"tomato\" />\n        </Grid>\n      </Preview>\n      <SectionTitle id=\"starting-and-ending-lines\">Starting and ending lines</SectionTitle>\n      <Text mb=\"$5\">\n        Pass the <Code>colStart</Code> and <Code>colEnd</Code> prop to <Code>GridItem</Code>{\" \"}\n        component to make an element start or end at the <Code>nth</Code> grid position.\n      </Text>\n      <Preview snippet={snippets.startingAndEndingLines} mb=\"$12\">\n        <Grid templateColumns=\"repeat(5, 1fr)\" gap=\"$4\">\n          <GridItem colSpan={2} h=\"$10\" bg=\"tomato\" />\n          <GridItem colStart={4} colEnd={6} h=\"$10\" bg=\"papayawhip\" />\n        </Grid>\n      </Preview>\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"grid-props\">Grid props</SectionSubtitle>\n      <Text mb=\"$5\">\n        Grid composes <Code>Box</Code> so you can pass all the <Code>Box</Code> prop, css grid\n        props, and these shorthand prop to save you some time:\n      </Text>\n      <PropsTable items={gridPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"grid-item-props\">GridItem props</SectionSubtitle>\n      <PropsTable items={gridItemPropItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/grid/snippets.ts",
    "content": "const importComponent = `import { Grid, GridItem } from \"@hope-ui/solid\"`;\n\nconst templateColumns = `<Grid templateColumns=\"repeat(5, 1fr)\" gap=\"$6\">\n  <GridItem w=\"100%\" h=\"$10\" bg=\"$info9\" />\n  <GridItem w=\"100%\" h=\"$10\" bg=\"$info9\" />\n  <GridItem w=\"100%\" h=\"$10\" bg=\"$info9\" />\n  <GridItem w=\"100%\" h=\"$10\" bg=\"$info9\" />\n  <GridItem w=\"100%\" h=\"$10\" bg=\"$info9\" />\n</Grid>`;\n\nconst spanningColumns = `<Grid \n  h=\"200px\" \n  templateRows=\"repeat(2, 1fr)\" \n  templateColumns=\"repeat(5, 1fr)\" \n  gap=\"$4\"\n>\n  <GridItem rowSpan={2} colSpan={1} bg=\"tomato\" />\n  <GridItem colSpan={2} bg=\"papayawhip\" />\n  <GridItem colSpan={2} bg=\"papayawhip\" />\n  <GridItem colSpan={4} bg=\"tomato\" />\n</Grid>`;\n\nconst startingAndEndingLines = `<Grid templateColumns=\"repeat(5, 1fr)\" gap=\"$4\">\n  <GridItem colSpan={2} h=\"$10\" bg=\"tomato\" />\n  <GridItem colStart={4} colEnd={6} h=\"$10\" bg=\"papayawhip\" />\n</Grid>`;\n\nexport const snippets = {\n  importComponent,\n  templateColumns,\n  spanningColumns,\n  startingAndEndingLines,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/simple-grid/index.tsx",
    "content": "import { Alert, AlertDescription, Box, SimpleGrid, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function SimpleGridDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/layout/grid\",\n    label: \"Grid\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/layout/stack\",\n    label: \"Stack\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#auto-responsive-grid\", label: \"Auto-responsive grid\", indent: true },\n    { href: \"#spacing\", label: \"Changing the spacing for columns and rows\", indent: true },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"minChildWidth\",\n      description:\n        \"The width at which child elements will break into columns. Pass a number for pixel values or a string for any other valid CSS length.\",\n      type: \"ResponsiveValue<Property.MinWidth>\",\n    },\n    {\n      name: \"columns\",\n      description: \"The number of columns.\",\n      type: \"ResponsiveValue<number>\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>SimpleGrid</PageTitle>\n      <Text mb=\"$8\">\n        SimpleGrid provides a friendly interface to create responsive grid layouts with ease. It\n        renders a <Code>div</Code> element with <Code>display: grid</Code>.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$5\">Specifying the number of columns for the grid layout.</Text>\n      <Preview snippet={snippets.basicUsage} mb=\"$8\">\n        <SimpleGrid columns={2} gap=\"$10\">\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n        </SimpleGrid>\n      </Preview>\n      <Text mb=\"$5\">\n        You can also make it responsive by passing an object value into the <Code>columns</Code>{\" \"}\n        prop.\n      </Text>\n      <Preview snippet={snippets.responsiveColumns} mb=\"$10\">\n        <SimpleGrid columns={{ \"@initial\": 2, \"@md\": 3 }} gap=\"40px\">\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n        </SimpleGrid>\n      </Preview>\n      <SectionSubtitle id=\"auto-responsive-grid\">Auto-responsive grid</SectionSubtitle>\n      <Text mb=\"$5\">\n        To make the grid responsive and adjust automatically without passing <Code>columns</Code>,\n        simply pass the <Code>minChildWidth</Code> prop to specify the <Code>min-width</Code> a\n        child should have before adjusting the layout.\n      </Text>\n      <Text mb=\"$5\">\n        This uses css grid <Code>auto-fit</Code> and <Code>minmax()</Code> internally.\n      </Text>\n      <Preview snippet={snippets.autoResponsive} mb=\"$10\">\n        <SimpleGrid minChildWidth=\"120px\" gap=\"40px\">\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n        </SimpleGrid>\n      </Preview>\n      <SectionSubtitle id=\"spacing\">Changing the spacing for columns and rows</SectionSubtitle>\n      <Text mb=\"$5\">\n        Simply pass the <Code>gap</Code> prop to change the row and column spacing between the grid\n        items. <Code>SimpleGrid</Code> also allows you pass <Code>columnGap</Code> and{\" \"}\n        <Code>rowGap</Code> to define the space between columns and rows respectively.\n      </Text>\n      <Preview snippet={snippets.spacing} mb=\"$6\">\n        <SimpleGrid columns={2} columnGap=\"40px\" rowGap=\"20px\">\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n          <Box bg=\"tomato\" height=\"80px\"></Box>\n        </SimpleGrid>\n      </Preview>\n      <Alert status=\"warning\" mb=\"$12\">\n        <AlertDescription>\n          CSS gap properties can be confusing, <Code>columnGap</Code> add space on the X axis\n          whereas <Code>rowGap</Code> add space on the Y axis.\n        </AlertDescription>\n      </Alert>\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <Text mb=\"$5\">\n        SimpleGrid composes <Code>Grid</Code> so you can pass all the <Code>Grid</Code> props and\n        css grid props with addition of these:\n      </Text>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/simple-grid/snippets.ts",
    "content": "const importComponent = `import { SimpleGrid } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<SimpleGrid columns={2} gap=\"$10\">\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n</SimpleGrid>`;\n\nconst responsiveColumns = `<SimpleGrid columns={{ \"@initial\": 2, \"@md\": 3 }} gap=\"40px\">\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n</SimpleGrid>`;\n\nconst autoResponsive = `<SimpleGrid minChildWidth=\"120px\" gap=\"40px\">\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n</SimpleGrid>`;\n\nconst spacing = `<SimpleGrid columns={2} columnGap=\"40px\" rowGap=\"20px\">\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n  <Box bg=\"tomato\" height=\"80px\"></Box>\n</SimpleGrid>`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  responsiveColumns,\n  autoResponsive,\n  spacing,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/stack/index.tsx",
    "content": "import { Alert, AlertDescription, Anchor, Box, hope, HStack, Stack, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function StackDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/layout/simple-grid\",\n    label: \"SimpleGrid\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/typography/heading\",\n    label: \"Heading\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#responsive-direction\", label: \"Responsive direction\", indent: true },\n    { href: \"#notes-on-stack-vs-flex\", label: \"Notes on Stack vs Flex\", indent: true },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"direction\",\n      description: \"The direction to stack the items. Shorthand for flexDirection style prop.\",\n      type: \"Property.FlexDirection\",\n    },\n    {\n      name: \"wrap\",\n      description: \"Shorthand for flexWrap style prop.\",\n      type: \"Property.FlexWrap\",\n    },\n    {\n      name: \"spacing\",\n      description: \"The space between each stack item.\",\n      type: \"Property.Gap\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Stack</PageTitle>\n      <Text mb=\"$5\">\n        Stack is a layout component that makes it easy to stack elements together and apply a space\n        between them. It uses CSS <Code>gap</Code> properties to add spacing between its children\n      </Text>\n      <Alert status=\"warning\" mb=\"$12\">\n        <AlertDescription>\n          You can check if your browser support CSS gap property in Flex layout on{\" \"}\n          <Anchor\n            href=\"https://caniuse.com/?search=gap%20flex%20layout\"\n            external\n            color=\"$primary11\"\n            fontWeight=\"$semibold\"\n          >\n            caniuse.com\n          </Anchor>\n        </AlertDescription>\n      </Alert>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <hope.ul ps=\"$6\" mb=\"$12\">\n        <hope.li mb=\"$2\">\n          <strong>Stack:</strong> Used to add spacing between elements in the horizontal or vertical\n          direction. It supports responsive values.\n        </hope.li>\n        <hope.li mb=\"$2\">\n          <strong>HStack:</strong> Used to add spacing between elements in horizontal direction, and\n          centers them.\n        </hope.li>\n        <hope.li>\n          <strong>VStack:</strong> Used to add spacing between elements in vertical direction only,\n          and centers them.\n        </hope.li>\n      </hope.ul>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$5\">\n        To stack elements in horizontal or vertical direction only, use the <Code>HStack</Code> or{\" \"}\n        <Code>VStack</Code> components. You can also use the <Code>Stack</Code> component as well\n        and pass the <Code>direction</Code> prop.\n      </Text>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <HStack spacing=\"24px\">\n          <Box w=\"40px\" h=\"40px\" bg=\"$warning9\">\n            1\n          </Box>\n          <Box w=\"40px\" h=\"40px\" bg=\"tomato\">\n            2\n          </Box>\n          <Box w=\"40px\" h=\"40px\" bg=\"pink\">\n            3\n          </Box>\n        </HStack>\n      </Preview>\n      <SectionSubtitle id=\"responsive-direction\">Responsive direction</SectionSubtitle>\n      <Text mb=\"$5\">\n        You can pass responsive values to the <Code>Stack</Code> component to change stack direction\n        and/or spacing between elements.\n      </Text>\n      <Preview snippet={snippets.responsiveDirection} mb=\"$10\">\n        <Stack direction={{ \"@initial\": \"column\", \"@md\": \"row\" }} spacing=\"24px\">\n          <Box w=\"40px\" h=\"40px\" bg=\"$warning9\">\n            1\n          </Box>\n          <Box w=\"40px\" h=\"40px\" bg=\"tomato\">\n            2\n          </Box>\n          <Box w=\"40px\" h=\"40px\" bg=\"pink\">\n            3\n          </Box>\n        </Stack>\n      </Preview>\n      <SectionSubtitle id=\"notes-on-stack-vs-flex\">Notes on Stack vs Flex</SectionSubtitle>\n      <Text mb=\"$12\">\n        Stack's primary use case is to lay items out and control the spacing between each item. If\n        you have a more complicated use case, such as changing the margin on the last child, you can\n        combine <Code>Stack</Code> and <Code>Flex</Code> and use{\" \"}\n        <Code>justify-content: space-between</Code> for more control of the layout.\n      </Text>\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/layout/stack/snippets.ts",
    "content": "const importComponent = `import { Stack, HStack, VStack } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<HStack spacing=\"24px\">\n  <Box w=\"40px\" h=\"40px\" bg=\"$warning9\">\n    1\n  </Box>\n  <Box w=\"40px\" h=\"40px\" bg=\"tomato\">\n    2\n  </Box>\n  <Box w=\"40px\" h=\"40px\" bg=\"pink\">\n    3\n  </Box>\n</HStack>`;\n\nconst responsiveDirection = `<Stack direction={{ \"@initial\": \"column\", \"@md\": \"row\" }} spacing=\"24px\">\n  <Box w=\"40px\" h=\"40px\" bg=\"$warning9\">\n    1\n  </Box>\n  <Box w=\"40px\" h=\"40px\" bg=\"tomato\">\n    2\n  </Box>\n  <Box w=\"40px\" h=\"40px\" bg=\"pink\">\n    3\n  </Box>\n</Stack>`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  responsiveDirection,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/navigation/anchor/index.tsx",
    "content": "import { Anchor, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { IconExternalLink } from \"@/icons/IconExternalLink\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function AnchorDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/data-display/tag\",\n    label: \"Tag\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/navigation/breadcrumb\",\n    label: \"Breadcrumb\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#external-link\", label: \"External link\", indent: true },\n    { href: \"#anchor-inline-with-text\", label: \"Anchor inline with text\", indent: true },\n    { href: \"#usage-with-routing-library\", label: \"Usage with routing library\" },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"external\",\n      description: \"If `true`, the link will open in a new tab.\",\n      type: \"boolean\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Anchor</PageTitle>\n      <Text mb=\"$5\">\n        Anchors are accessible elements used primarily for navigation. This component is styled to\n        resemble a hyperlink and semantically renders an <Code>a</Code>.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Anchor>Hope UI</Anchor>\n      </Preview>\n      <SectionSubtitle id=\"external-link\">External link</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>external</Code> prop to open the link in a new tab.\n      </Text>\n      <Preview snippet={snippets.externalLink} mb=\"$10\">\n        <Anchor href=\"https://hope-ui.com\" external>\n          Hope UI <IconExternalLink ml=\"2px\" verticalAlign=\"text-bottom\" />\n        </Anchor>\n      </Preview>\n      <SectionSubtitle id=\"anchor-inline-with-text\">Anchor inline with text</SectionSubtitle>\n      <Preview snippet={snippets.anchorWithInlineText} mb=\"$12\">\n        <Text>\n          Did you know that{\" \"}\n          <Anchor color=\"$primary10\" href=\"#\">\n            Anchors can live inline with text\n          </Anchor>\n        </Text>\n      </Preview>\n      <SectionTitle id=\"usage-with-routing-library\">Usage with routing library</SectionTitle>\n      <Text mb=\"$5\">\n        To use the <Code>Anchor</Code> with a routing library like <Code>solid-app-router</Code>,\n        all you need to do is pass the <Code>as</Code> prop. It'll replace the rendered{\" \"}\n        <Code>a</Code> tag with the router's <Code>Link</Code>.\n      </Text>\n      <CodeSnippet snippet={snippets.usageWithRoutingLibrary} mb=\"$12\" />\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Anchor</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/navigation/anchor/snippets.ts",
    "content": "const importComponent = `import { Anchor } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Anchor>Hope UI</Anchor>`;\n\nconst externalLink = `<Anchor href=\"https://hope-ui.com\" external>\n  Hope UI <IconExternalLink ml=\"2px\" verticalAlign=\"text-bottom\" />\n</Anchor>`;\n\nconst anchorWithInlineText = `<Text>\n  Did you know that{\" \"}\n  <Anchor color=\"$primary10\" href=\"#\">\n    Anchors can live inline with text\n  </Anchor>\n</Text>`;\n\nconst usageWithRoutingLibrary = `// 1. import the \\`Link\\` component\nimport { Link } from \"solid-app-router\"\n\n// 2. Then use it like this\n<Anchor as={Link} href=\"/home\">Home</Anchor>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Anchor: {\n      baseStyle: SystemStyleObject,\n      defaultProps: ThemeableAnchorOptions\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  externalLink,\n  anchorWithInlineText,\n  usageWithRoutingLibrary,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/navigation/breadcrumb/index.tsx",
    "content": "import {\n  Anchor,\n  Breadcrumb,\n  BreadcrumbItem,\n  BreadcrumbLink,\n  BreadcrumbSeparator,\n  ListItem,\n  Text,\n  UnorderedList,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Link } from \"solid-app-router\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { IconChevronRight } from \"@/icons/IconChevronRight\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function BreadcrumbDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/navigation/anchor\",\n    label: \"Anchor\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/navigation/tabs\",\n    label: \"Tabs\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#separator\", label: \"Breadcrumb separator\", indent: true },\n    { href: \"#icon-as-separator\", label: \"Using icon as separator\", indent: true },\n    { href: \"#with-end-separator\", label: \"Using end separator\", indent: true },\n    { href: \"#spacing\", label: \"Separator spacing\", indent: true },\n    { href: \"#composition\", label: \"Composition\" },\n    { href: \"#with-routing-library\", label: \"Usage with routing library\" },\n    { href: \"#accessibility\", label: \"Accessibility\" },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#breadcrumb-props\", label: \"Breadcrumb props\", indent: true },\n    { href: \"#breadcrumb-link-props\", label: \"BreadcrumbLink props\", indent: true },\n    { href: \"#other-components-props\", label: \"Other components props\", indent: true },\n  ];\n\n  const breadcrumbPropItems: PropsTableItem[] = [\n    {\n      name: \"spacing\",\n      description: \"The left and right space applied to each separator.\",\n      type: 'ResponsiveValue<GridLayoutProps[\"gap\"]>',\n      defaultValue: \"0.5rem\",\n    },\n    {\n      name: \"separator\",\n      description: \"The visual separator between each breadcrumb item.\",\n      type: \"string | JSX.Element\",\n      defaultValue: \"/\",\n    },\n  ];\n\n  const breadcrumbLinkPropItems: PropsTableItem[] = [\n    {\n      name: \"currentPage\",\n      description:\n        \"If `true`, renders a span with `aria-current` set to `page` instead of an anchor element.\",\n      type: \"boolean\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Breadcrumb</PageTitle>\n      <Text mb=\"$5\">\n        Breadcrumbs, or a breadcrumb navigation, can help enhance how users navigate to previous\n        page levels of a website, especially if that website has many pages or products.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>Breadcrumb:</strong> The parent container for breadcrumbs.\n        </ListItem>\n        <ListItem>\n          <strong>BreadcrumbItem:</strong> Individual breadcrumb element containing a link and\n          separator.\n        </ListItem>\n        <ListItem>\n          <strong>BreadcrumbLink:</strong> The breadcrumb link.\n        </ListItem>\n        <ListItem>\n          <strong>BreadcrumbSeparator:</strong> The visual separator between each breadcrumb.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$5\">\n        Add the <Code>currentPage</Code> prop to the <Code>BreadcrumbLink</Code> that matches the\n        current path. When this prop is present, the <Code>BreadcrumbLink</Code> renders a{\" \"}\n        <Code>span</Code> with <Code>aria-current</Code> set to <Code>page</Code> instead of an\n        anchor element.\n      </Text>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Breadcrumb>\n          <BreadcrumbItem>\n            <BreadcrumbLink href=\"#\">Home</BreadcrumbLink>\n            <BreadcrumbSeparator />\n          </BreadcrumbItem>\n          <BreadcrumbItem>\n            <BreadcrumbLink href=\"#\">Docs</BreadcrumbLink>\n            <BreadcrumbSeparator />\n          </BreadcrumbItem>\n          <BreadcrumbItem>\n            <BreadcrumbLink currentPage>Breadcrumb</BreadcrumbLink>\n          </BreadcrumbItem>\n        </Breadcrumb>\n      </Preview>\n      <SectionSubtitle id=\"separator\">Breadcrumb separator</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>separator</Code> prop to change the separator used in the breadcrumb.\n      </Text>\n      <Preview snippet={snippets.separator} mb=\"$10\">\n        <Breadcrumb separator=\"-\">\n          <BreadcrumbItem>\n            <BreadcrumbLink href=\"#\">Home</BreadcrumbLink>\n            <BreadcrumbSeparator />\n          </BreadcrumbItem>\n          <BreadcrumbItem>\n            <BreadcrumbLink href=\"#\">Docs</BreadcrumbLink>\n            <BreadcrumbSeparator />\n          </BreadcrumbItem>\n          <BreadcrumbItem>\n            <BreadcrumbLink currentPage>Breadcrumb</BreadcrumbLink>\n          </BreadcrumbItem>\n        </Breadcrumb>\n      </Preview>\n      <SectionSubtitle id=\"icon-as-separator\">Using icon as separator</SectionSubtitle>\n      <Text mb=\"$5\">\n        You can pass any <Code>JSX.Element</Code> to the <Code>separator</Code> prop.\n      </Text>\n      <Preview snippet={snippets.iconSeparator} mb=\"$10\">\n        <Breadcrumb separator={<IconChevronRight color=\"$neutral11\" />}>\n          <BreadcrumbItem>\n            <BreadcrumbLink href=\"#\">Home</BreadcrumbLink>\n            <BreadcrumbSeparator />\n          </BreadcrumbItem>\n          <BreadcrumbItem>\n            <BreadcrumbLink href=\"#\">Docs</BreadcrumbLink>\n            <BreadcrumbSeparator />\n          </BreadcrumbItem>\n          <BreadcrumbItem>\n            <BreadcrumbLink currentPage>Breadcrumb</BreadcrumbLink>\n          </BreadcrumbItem>\n        </Breadcrumb>\n      </Preview>\n      <SectionSubtitle id=\"with-end-separator\">Using end separator</SectionSubtitle>\n      <Text mb=\"$5\">\n        To append a separator to the last breadcrumb item, just add a{\" \"}\n        <Code>BreadcrumbSeparator</Code> component.\n      </Text>\n      <Preview snippet={snippets.withEndSeparator} mb=\"$10\">\n        <Breadcrumb>\n          <BreadcrumbItem>\n            <BreadcrumbLink href=\"#\">Home</BreadcrumbLink>\n            <BreadcrumbSeparator />\n          </BreadcrumbItem>\n          <BreadcrumbItem>\n            <BreadcrumbLink href=\"#\">Docs</BreadcrumbLink>\n            <BreadcrumbSeparator />\n          </BreadcrumbItem>\n          <BreadcrumbItem>\n            <BreadcrumbLink currentPage>Breadcrumb</BreadcrumbLink>\n            <BreadcrumbSeparator />\n          </BreadcrumbItem>\n        </Breadcrumb>\n      </Preview>\n      <SectionSubtitle id=\"spacing\">Separator spacing</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>spacing</Code> prop to apply left and right margin to each separator.\n      </Text>\n      <Preview snippet={snippets.spacing} mb=\"$12\">\n        <Breadcrumb spacing=\"$4\">\n          <BreadcrumbItem>\n            <BreadcrumbLink href=\"#\">Home</BreadcrumbLink>\n            <BreadcrumbSeparator />\n          </BreadcrumbItem>\n          <BreadcrumbItem>\n            <BreadcrumbLink href=\"#\">Docs</BreadcrumbLink>\n            <BreadcrumbSeparator />\n          </BreadcrumbItem>\n          <BreadcrumbItem>\n            <BreadcrumbLink currentPage>Breadcrumb</BreadcrumbLink>\n          </BreadcrumbItem>\n        </Breadcrumb>\n      </Preview>\n      <SectionTitle id=\"composition\">Composition</SectionTitle>\n      <Text mb=\"$5\">\n        Breadcrumb composes{\" \"}\n        <Anchor as={Link} href=\"/docs/layout/box\" color=\"$primary11\" fontWeight=\"$semibold\">\n          Box\n        </Anchor>{\" \"}\n        so you can pass all <Code>Box</Code> props to change the style of the breadcrumbs.\n      </Text>\n      <Preview snippet={snippets.composition} mb=\"$12\">\n        <Breadcrumb fontWeight=\"$medium\" fontSize=\"$sm\" spacing=\"$4\">\n          <BreadcrumbItem>\n            <BreadcrumbLink href=\"#\" _hover={{ color: \"tomato\" }}>\n              Home\n            </BreadcrumbLink>\n            <BreadcrumbSeparator />\n          </BreadcrumbItem>\n          <BreadcrumbItem>\n            <BreadcrumbLink href=\"#\" _hover={{ color: \"tomato\" }}>\n              Docs\n            </BreadcrumbLink>\n            <BreadcrumbSeparator />\n          </BreadcrumbItem>\n          <BreadcrumbItem>\n            <BreadcrumbLink currentPage _hover={{ color: \"$success10\" }}>\n              Breadcrumb\n            </BreadcrumbLink>\n          </BreadcrumbItem>\n        </Breadcrumb>\n      </Preview>\n      <SectionTitle id=\"with-routing-library\">Usage with routing library</SectionTitle>\n      <Text mb=\"$5\">\n        To use the Breadcrumb with a routing Library like <Code>solid-app-router</Code>, all you\n        need to do is to pass the <Code>as</Code> prop to the <Code>BreadcrumbLink</Code> component.\n      </Text>\n      <Preview snippet={snippets.withRoutingLibrary} mb=\"$12\">\n        <Breadcrumb>\n          <BreadcrumbItem>\n            <BreadcrumbLink as={Link} href=\"#\">\n              Home\n            </BreadcrumbLink>\n            <BreadcrumbSeparator />\n          </BreadcrumbItem>\n          <BreadcrumbItem>\n            <BreadcrumbLink as={Link} href=\"#\">\n              Docs\n            </BreadcrumbLink>\n            <BreadcrumbSeparator />\n          </BreadcrumbItem>\n          <BreadcrumbItem>\n            <BreadcrumbLink currentPage>Breadcrumb</BreadcrumbLink>\n          </BreadcrumbItem>\n        </Breadcrumb>\n      </Preview>\n      <SectionTitle id=\"accessibility\">Accessibility</SectionTitle>\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          The Breadcrumbs are rendered in a <Code>nav</Code> to denote that it is a navigation\n          landmark.\n        </ListItem>\n        <ListItem>\n          The Breadcrumb <Code>nav</Code> has <Code>aria-label</Code> set to <Code>breadcrumb</Code>\n          .\n        </ListItem>\n        <ListItem>\n          The <Code>BreadcrumbLink</Code> with <Code>currentPage</Code> prop has{\" \"}\n          <Code>aria-current</Code> set to <Code>page</Code>.\n        </ListItem>\n        <ListItem>\n          The separator has <Code>role</Code> set to <Code>presentation</Code> to denote that its\n          for presentation purposes.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Breadcrumb</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"breadcrumb-props\">Breadcrumb props</SectionSubtitle>\n      <PropsTable items={breadcrumbPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"breadcrumb-link-props\">BreadcrumbLink props</SectionSubtitle>\n      <PropsTable items={breadcrumbLinkPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"other-components-props\">Other components props</SectionSubtitle>\n\n      <Text>\n        <Code>BreadcrumbItem</Code> and <Code>BreadcrumbSeparator</Code> composes{\" \"}\n        <Anchor as={Link} href=\"/docs/layout/box\" color=\"$primary11\" fontWeight=\"$semibold\">\n          Box\n        </Anchor>{\" \"}\n        component.\n      </Text>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/navigation/breadcrumb/snippets.ts",
    "content": "const importComponent = `import { \n  Breadcrumb, \n  BreadcrumbItem,\n  BreadcrumbLink,\n  BreadcrumbSeparator\n} from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Breadcrumb>\n  <BreadcrumbItem>\n    <BreadcrumbLink href=\"#\">Home</BreadcrumbLink>\n    <BreadcrumbSeparator />\n  </BreadcrumbItem>\n  <BreadcrumbItem>\n    <BreadcrumbLink href=\"#\">Docs</BreadcrumbLink>\n    <BreadcrumbSeparator />\n  </BreadcrumbItem>\n  <BreadcrumbItem>\n    <BreadcrumbLink currentPage>Breadcrumb</BreadcrumbLink>\n  </BreadcrumbItem>\n</Breadcrumb>`;\n\nconst separator = `<Breadcrumb separator=\"-\">\n  <BreadcrumbItem>\n    <BreadcrumbLink href=\"#\">Home</BreadcrumbLink>\n    <BreadcrumbSeparator />\n  </BreadcrumbItem>\n  <BreadcrumbItem>\n    <BreadcrumbLink href=\"#\">Docs</BreadcrumbLink>\n    <BreadcrumbSeparator />\n  </BreadcrumbItem>\n  <BreadcrumbItem>\n    <BreadcrumbLink currentPage>Breadcrumb</BreadcrumbLink>\n  </BreadcrumbItem>\n</Breadcrumb>`;\n\nconst iconSeparator = `<Breadcrumb separator={<IconChevronRight color=\"$neutral11\" />}>\n  <BreadcrumbItem>\n    <BreadcrumbLink href=\"#\">Home</BreadcrumbLink>\n    <BreadcrumbSeparator />\n  </BreadcrumbItem>\n  <BreadcrumbItem>\n    <BreadcrumbLink href=\"#\">Docs</BreadcrumbLink>\n    <BreadcrumbSeparator />\n  </BreadcrumbItem>\n  <BreadcrumbItem>\n    <BreadcrumbLink currentPage>Breadcrumb</BreadcrumbLink>\n  </BreadcrumbItem>\n</Breadcrumb>`;\n\nconst withEndSeparator = `<Breadcrumb>\n  <BreadcrumbItem>\n    <BreadcrumbLink href=\"#\">Home</BreadcrumbLink>\n    <BreadcrumbSeparator />\n  </BreadcrumbItem>\n  <BreadcrumbItem>\n    <BreadcrumbLink href=\"#\">Docs</BreadcrumbLink>\n    <BreadcrumbSeparator />\n  </BreadcrumbItem>\n  <BreadcrumbItem>\n    <BreadcrumbLink currentPage>Breadcrumb</BreadcrumbLink>\n    <BreadcrumbSeparator />\n  </BreadcrumbItem>\n</Breadcrumb>`;\n\nconst spacing = `<Breadcrumb spacing=\"$4\">\n  <BreadcrumbItem>\n    <BreadcrumbLink href=\"#\">Home</BreadcrumbLink>\n    <BreadcrumbSeparator />\n  </BreadcrumbItem>\n  <BreadcrumbItem>\n    <BreadcrumbLink href=\"#\">Docs</BreadcrumbLink>\n    <BreadcrumbSeparator />\n  </BreadcrumbItem>\n  <BreadcrumbItem>\n    <BreadcrumbLink currentPage>Breadcrumb</BreadcrumbLink>\n  </BreadcrumbItem>\n</Breadcrumb>`;\n\nconst composition = `<Breadcrumb fontWeight=\"$medium\" fontSize=\"$sm\" spacing=\"$4\">\n  <BreadcrumbItem>\n    <BreadcrumbLink href=\"#\" _hover={{ color: \"tomato\" }}>\n      Home\n    </BreadcrumbLink>\n    <BreadcrumbSeparator />\n  </BreadcrumbItem>\n  <BreadcrumbItem>\n    <BreadcrumbLink href=\"#\" _hover={{ color: \"tomato\" }}>\n      Docs\n    </BreadcrumbLink>\n    <BreadcrumbSeparator />\n  </BreadcrumbItem>\n  <BreadcrumbItem>\n    <BreadcrumbLink currentPage _hover={{ color: \"$success10\" }}>\n      Breadcrumb\n    </BreadcrumbLink>\n  </BreadcrumbItem>\n</Breadcrumb>`;\n\nconst withRoutingLibrary = `import { Link } from \"solid-app-router\"\n\n<Breadcrumb>\n  <BreadcrumbItem>\n    <BreadcrumbLink as={Link} href=\"#\">Home</BreadcrumbLink>\n    <BreadcrumbSeparator />\n  </BreadcrumbItem>\n  <BreadcrumbItem>\n    <BreadcrumbLink as={Link} href=\"#\">Docs</BreadcrumbLink>\n    <BreadcrumbSeparator />\n  </BreadcrumbItem>\n  <BreadcrumbItem>\n    <BreadcrumbLink currentPage>Breadcrumb</BreadcrumbLink>\n  </BreadcrumbItem>\n</Breadcrumb>\n`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Breadcrumb: {\n      baseStyle: {\n        root: SystemStyleObject,\n        item: SystemStyleObject,\n        link: SystemStyleObject,\n        separator: SystemStyleObject,\n      },\n      defaultProps: {\n        root: ThemeableBreadcrumbOptions\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  separator,\n  iconSeparator,\n  withEndSeparator,\n  spacing,\n  composition,\n  withRoutingLibrary,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/navigation/tabs/index.tsx",
    "content": "import {\n  Anchor,\n  Input,\n  Kbd,\n  ListItem,\n  Tab,\n  TabList,\n  TabPanel,\n  Tabs,\n  TabsProps,\n  Text,\n  UnorderedList,\n  VStack,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Link } from \"solid-app-router\";\nimport { createSignal, For, JSX, onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function TabsDoc() {\n  const [tabIndex, setTabIndex] = createSignal(0);\n\n  const handleSliderChange: JSX.EventHandlerUnion<HTMLInputElement, Event> = event => {\n    setTabIndex(parseInt((event.target as HTMLInputElement).value, 10));\n  };\n\n  const handleTabsChange = (index: number) => {\n    setTabIndex(index);\n  };\n\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/navigation/breadcrumb\",\n    label: \"Breadcrumb\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/feedback/alert\",\n    label: \"Alert\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#colors\", label: \"Tabs colors\", indent: true },\n    { href: \"#sizes\", label: \"Tabs sizes\", indent: true },\n    { href: \"#variants\", label: \"Tabs variants\", indent: true },\n    { href: \"#aligments\", label: \"Tabs aligments\", indent: true },\n    { href: \"#orientation\", label: \"Tabs orientation\", indent: true },\n    { href: \"#fitted-tabs\", label: \"Fitted tabs\", indent: true },\n    { href: \"#disabled-tab\", label: \"Disabled tab\", indent: true },\n    { href: \"#initial-active-tab\", label: \"Make a tab initially active\", indent: true },\n    { href: \"#keep-alive\", label: \"Keeping tab panels alive\", indent: true },\n    { href: \"#controlled-tabs\", label: \"Controlled tabs\", indent: true },\n    { href: \"#accessibility\", label: \"Accessibility\" },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#tabs-props\", label: \"Tabs props\", indent: true },\n    { href: \"#tab-props\", label: \"Tab props\", indent: true },\n    { href: \"#other-components-props\", label: \"Other components props\", indent: true },\n  ];\n\n  const tabsPropItems: PropsTableItem[] = [\n    {\n      name: \"variant\",\n      description: \"The visual style of the tabs.\",\n      type: '\"underline\" | \"outline\" | \"cards\" | \"pills\"',\n      defaultValue: '\"underline\"',\n    },\n    {\n      name: \"colorScheme\",\n      description: \"The color of the tabs.\",\n      type: '\"primary\" | \"accent\" | \"neutral\" | \"success\" | \"info\" | \"warning\" | \"danger\"',\n      defaultValue: '\"primary\"',\n    },\n    {\n      name: \"size\",\n      description: \"The size of the tabs.\",\n      type: '\"sm\" | \"md\" | \"lg\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"alignment\",\n      description: \"The alignment of the tabs.\",\n      type: '\"start\" | \"center\" | \"apart\" | \"end\"',\n      defaultValue: '\"start\"',\n    },\n    {\n      name: \"orientation\",\n      description: \"The orientation of the tabs.\",\n      type: '\"horizontal\" | \"vertical\"',\n      defaultValue: '\"horizontal\"',\n    },\n    {\n      name: \"fitted\",\n      description: \"If `true`, the tabs will stretch to fit the container.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"keepAlive\",\n      description: \"If `true`, the content of inactive tab panels stays mounted when unselected.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"index\",\n      description: \"The index of the selected tab (in controlled mode).\",\n      type: \"number\",\n    },\n    {\n      name: \"defaultIndex\",\n      description: \"The initial index of the selected tab (in uncontrolled mode).\",\n      type: \"number\",\n      defaultValue: \"0\",\n    },\n    {\n      name: \"id\",\n      description: \"The id of the tabs component.\",\n      type: \"string\",\n    },\n    {\n      name: \"onChange\",\n      description:\n        \"Callback invoked when the tabs index changes (in controlled or un-controlled modes).\",\n      type: \"(index: number) => void\",\n    },\n  ];\n\n  const tabPropItems: PropsTableItem[] = [\n    {\n      name: \"id\",\n      description: \"The `id` of the tab.\",\n      type: \"string\",\n    },\n    {\n      name: \"panelId\",\n      description: \"The `id` of the tab panel associated to this tab.\",\n      type: \"string\",\n    },\n    {\n      name: \"disabled\",\n      description: \"If `true`, the tab will be disabled.\",\n      type: \"boolean\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Tabs</PageTitle>\n      <Text mb=\"$5\">\n        An accessible tabs component that provides keyboard interactions and ARIA attributes\n        described in the{\" \"}\n        <Anchor\n          href=\"https://www.w3.org/TR/wai-aria-practices-1.2/#tabpanel\"\n          external\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          WAI-ARIA Tabs\n        </Anchor>{\" \"}\n        design pattern.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>Tabs:</strong> Provides context for all its children.\n        </ListItem>\n        <ListItem>\n          <strong>TabList:</strong> Wrapper for the <Code>Tab</Code> components.\n        </ListItem>\n        <ListItem>\n          <strong>Tab:</strong> Element that serves as a label for one of the tab panels and can be\n          activated to display that panel.\n        </ListItem>\n        <ListItem>\n          <strong>TabPanel:</strong> Element that contains the content associated with a tab.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$5\"></Text>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Tabs>\n          <TabList>\n            <Tab>One</Tab>\n            <Tab>Two</Tab>\n            <Tab>Three</Tab>\n          </TabList>\n          <TabPanel>1</TabPanel>\n          <TabPanel>2</TabPanel>\n          <TabPanel>3</TabPanel>\n        </Tabs>\n      </Preview>\n      <SectionSubtitle id=\"colors\">Tabs colors</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>colorScheme</Code> prop to change the color of the Tabs. You can set the value\n        to <Code>primary</Code>, <Code>accent</Code>, <Code>neutral</Code>, <Code>success</Code>,{\" \"}\n        <Code>info</Code>, <Code>warning</Code> or <Code>danger</Code>.\n      </Text>\n      <Preview snippet={snippets.colors} mb=\"$10\">\n        <VStack alignItems=\"stretch\" spacing=\"$4\">\n          <For each={[\"primary\", \"accent\", \"neutral\", \"success\", \"info\", \"warning\", \"danger\"]}>\n            {colorScheme => (\n              <Tabs colorScheme={colorScheme as TabsProps[\"colorScheme\"]}>\n                <TabList>\n                  <Tab>One</Tab>\n                  <Tab>Two</Tab>\n                  <Tab>Three</Tab>\n                </TabList>\n                <TabPanel>1</TabPanel>\n                <TabPanel>2</TabPanel>\n                <TabPanel>3</TabPanel>\n              </Tabs>\n            )}\n          </For>\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"sizes\">Tabs sizes</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>size</Code> prop to change the size of the Tabs. You can set the value to{\" \"}\n        <Code>sm</Code>, <Code>md</Code> or <Code>lg</Code>.\n      </Text>\n      <Preview snippet={snippets.sizes} mb=\"$10\">\n        <VStack alignItems=\"stretch\" spacing=\"$4\">\n          <For each={[\"sm\", \"md\", \"lg\"]}>\n            {size => (\n              <Tabs size={size as TabsProps[\"size\"]}>\n                <TabList>\n                  <Tab>One</Tab>\n                  <Tab>Two</Tab>\n                  <Tab>Three</Tab>\n                </TabList>\n                <TabPanel>1</TabPanel>\n                <TabPanel>2</TabPanel>\n                <TabPanel>3</TabPanel>\n              </Tabs>\n            )}\n          </For>\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"variants\">Tabs variants</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>variant</Code> prop to change the visual style of the Tabs. You can set the\n        value to <Code>underline</Code>, <Code>outline</Code>, <Code>cards</Code> or{\" \"}\n        <Code>pills</Code>.\n      </Text>\n      <Preview snippet={snippets.variants} mb=\"$10\">\n        <VStack alignItems=\"stretch\" spacing=\"$4\">\n          <For each={[\"underline\", \"outline\", \"cards\", \"pills\"]}>\n            {variant => (\n              <Tabs variant={variant as TabsProps[\"variant\"]}>\n                <TabList>\n                  <Tab>One</Tab>\n                  <Tab>Two</Tab>\n                  <Tab>Three</Tab>\n                </TabList>\n                <TabPanel>1</TabPanel>\n                <TabPanel>2</TabPanel>\n                <TabPanel>3</TabPanel>\n              </Tabs>\n            )}\n          </For>\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"aligments\">Tabs aligments</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>aligment</Code> prop to change the alignment of the <Code>TabList</Code>. You\n        can set the value to <Code>start</Code>, <Code>center</Code>, <Code>apart</Code> or{\" \"}\n        <Code>end</Code>.\n      </Text>\n      <Preview snippet={snippets.aligments} mb=\"$10\">\n        <VStack alignItems=\"stretch\" spacing=\"$4\">\n          <For each={[\"start\", \"center\", \"apart\", \"end\"]}>\n            {alignment => (\n              <Tabs alignment={alignment as TabsProps[\"alignment\"]}>\n                <TabList>\n                  <Tab>One</Tab>\n                  <Tab>Two</Tab>\n                  <Tab>Three</Tab>\n                </TabList>\n                <TabPanel>1</TabPanel>\n                <TabPanel>2</TabPanel>\n                <TabPanel>3</TabPanel>\n              </Tabs>\n            )}\n          </For>\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"orientation\">Tabs orientation</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>orientation</Code> prop to change the orientation of the Tabs. You can set the\n        value to <Code>horizontal</Code> or <Code>vertical</Code>.\n      </Text>\n      <Preview snippet={snippets.orientation} mb=\"$10\">\n        <Tabs orientation=\"vertical\">\n          <TabList>\n            <Tab>One</Tab>\n            <Tab>Two</Tab>\n            <Tab>Three</Tab>\n          </TabList>\n          <TabPanel>1</TabPanel>\n          <TabPanel>2</TabPanel>\n          <TabPanel>3</TabPanel>\n        </Tabs>\n      </Preview>\n      <SectionSubtitle id=\"fitted-tabs\">Fitted tabs</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>fitted</Code> prop to stretch the tab list to fit the container.\n      </Text>\n      <Preview snippet={snippets.fitted} mb=\"$10\">\n        <Tabs fitted>\n          <TabList>\n            <Tab>One</Tab>\n            <Tab>Two</Tab>\n            <Tab>Three</Tab>\n          </TabList>\n          <TabPanel>1</TabPanel>\n          <TabPanel>2</TabPanel>\n          <TabPanel>3</TabPanel>\n        </Tabs>\n      </Preview>\n      <SectionSubtitle id=\"disabled-tab\">Disabled tab</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>disabled</Code> prop to disabled a <Code>Tab</Code>. When a <Code>Tab</Code>{\" \"}\n        is disabled, it is skipped during keyboard navigation and it is not clickable.\n      </Text>\n      <Preview snippet={snippets.disabled} mb=\"$10\">\n        <Tabs>\n          <TabList>\n            <Tab>One</Tab>\n            <Tab disabled>Two</Tab>\n            <Tab>Three</Tab>\n          </TabList>\n          <TabPanel>1</TabPanel>\n          <TabPanel>2</TabPanel>\n          <TabPanel>3</TabPanel>\n        </Tabs>\n      </Preview>\n      <SectionSubtitle id=\"initial-active-tab\">Make a tab initially active</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>defaultIndex</Code> prop to set a <Code>Tab</Code> initially active. Indexes\n        start at 0.\n      </Text>\n      <Preview snippet={snippets.initialActive} mb=\"$10\">\n        <Tabs defaultIndex={1}>\n          <TabList>\n            <Tab>One</Tab>\n            <Tab>Two</Tab>\n            <Tab>Three</Tab>\n          </TabList>\n          <TabPanel>1</TabPanel>\n          <TabPanel>2</TabPanel>\n          <TabPanel>3</TabPanel>\n        </Tabs>\n      </Preview>\n      <SectionSubtitle id=\"keep-alive\">Keeping tab panels alive</SectionSubtitle>\n      <Text mb=\"$5\">\n        By default, when you switch between tabs the state of the tab panels are lost, use the{\" \"}\n        <Code>keepAlive</Code> prop to keep tab panels alive even when there's not visible.\n      </Text>\n      <Preview snippet={snippets.keepAlive} mb=\"$10\">\n        <VStack alignItems=\"stretch\" spacing=\"$4\">\n          <Tabs>\n            <TabList>\n              <Tab>One</Tab>\n              <Tab>Two</Tab>\n              <Tab>Three</Tab>\n            </TabList>\n            <TabPanel>\n              <Input placeholder=\"Try typing, I lose my value when switching tabs\" />\n            </TabPanel>\n            <TabPanel>2</TabPanel>\n            <TabPanel>3</TabPanel>\n          </Tabs>\n          <Tabs keepAlive>\n            <TabList>\n              <Tab>One</Tab>\n              <Tab>Two</Tab>\n              <Tab>Three</Tab>\n            </TabList>\n            <TabPanel>\n              <Input placeholder=\"Try typing, I stay alive when switching tabs\" />\n            </TabPanel>\n            <TabPanel>2</TabPanel>\n            <TabPanel>3</TabPanel>\n          </Tabs>\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"controlled-tabs\">Controlled tabs</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>index</Code> and <Code>onChange</Code> props to control the <Code>Tabs</Code>{\" \"}\n        like form inputs.\n      </Text>\n      <Preview snippet={snippets.controlled} mb=\"$12\">\n        <input type=\"range\" min=\"0\" max=\"2\" value={tabIndex()} onInput={handleSliderChange} />\n        <Tabs index={tabIndex()} onChange={handleTabsChange}>\n          <TabList>\n            <Tab>One</Tab>\n            <Tab>Two</Tab>\n            <Tab>Three</Tab>\n          </TabList>\n          <TabPanel>\n            <p>Click the tabs or pull the slider around</p>\n          </TabPanel>\n          <TabPanel>\n            <p>Yeah yeah. What's up?</p>\n          </TabPanel>\n          <TabPanel>\n            <p>Oh, hello there.</p>\n          </TabPanel>\n        </Tabs>\n      </Preview>\n      <SectionTitle id=\"accessibility\">Accessibility</SectionTitle>\n      <SectionSubtitle>ARIA roles and attributes</SectionSubtitle>\n      <UnorderedList spacing=\"$2\" mb=\"$8\">\n        <ListItem>\n          <Code>TabList</Code> as <Code>role</Code> set to <Code>tablist</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>TabList</Code> as <Code>aria-orientation</Code> set to <Code>horizontal</Code> or{\" \"}\n          <Code>vertical</Code> based on the value of the <Code>orientation</Code> prop.\n        </ListItem>\n        <ListItem>\n          <Code>Tab</Code> as <Code>role</Code> set to <Code>tab</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>Tab</Code> as <Code>aria-selected</Code> set to <Code>true</Code> when its selected.\n        </ListItem>\n        <ListItem>\n          <Code>Tab</Code> as <Code>aria-controls</Code> set to the <Code>id</Code> of its\n          associated <Code>TabPanel</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>TabPanel</Code> as <Code>role</Code> set to <Code>tabpanel</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>TabPanel</Code> as <Code>aria-labelledby</Code> set to the <Code>id</Code> of the{\" \"}\n          <Code>Tab</Code> that labels it.\n        </ListItem>\n      </UnorderedList>\n      <SectionSubtitle>Keyboard support</SectionSubtitle>\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <Kbd>←</Kbd> moves focus to the previous tab (in horizontal orientation).\n        </ListItem>\n        <ListItem>\n          <Kbd>→</Kbd> moves focus to the next tab (in horizontal orientation).\n        </ListItem>\n        <ListItem>\n          <Kbd>↑</Kbd> moves focus to the previous tab (in vertical orientation).\n        </ListItem>\n        <ListItem>\n          <Kbd>↓</Kbd> moves focus to the next tab (in vertical orientation).\n        </ListItem>\n        <ListItem>\n          <Kbd>home</Kbd> moves focus to the first tab.\n        </ListItem>\n        <ListItem>\n          <Kbd>end</Kbd> moves focus to the last tab.\n        </ListItem>\n        <ListItem>\n          <Kbd>tab</Kbd> when focus moves into the tab list, places focus on the active tab element.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Tabs</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"tabs-props\">Tabs props</SectionSubtitle>\n      <PropsTable items={tabsPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"tab-props\">Tab props</SectionSubtitle>\n      <PropsTable items={tabPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"other-components-props\">Other components props</SectionSubtitle>\n      <Text>\n        <Code>TabList</Code>, <Code>TabPanels</Code> and <Code>TabPanel</Code> composes{\" \"}\n        <Anchor\n          as={Link}\n          href=\"/docs/layout/box\"\n          external\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          Box\n        </Anchor>\n        .\n      </Text>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/navigation/tabs/snippets.ts",
    "content": "const importComponent = `import { \n  Tabs, \n  TabList, \n  Tab,\n  TabPanel\n} from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Tabs>\n  <TabList>\n    <Tab>One</Tab>\n    <Tab>Two</Tab>\n    <Tab>Three</Tab>\n  </TabList>\n  <TabPanel>1</TabPanel>\n  <TabPanel>2</TabPanel>\n  <TabPanel>3</TabPanel>\n</Tabs>`;\n\nconst colors = `<VStack alignItems=\"stretch\" spacing=\"$4\">\n  <For each={\n    [\"primary\", \"accent\", \"neutral\", \"success\", \"info\", \"warning\", \"danger\"]\n  }>\n    {colorScheme => (\n      <Tabs colorScheme={colorScheme}>\n        <TabList>\n          <Tab>One</Tab>\n          <Tab>Two</Tab>\n          <Tab>Three</Tab>\n        </TabList>\n        <TabPanel>1</TabPanel>\n        <TabPanel>2</TabPanel>\n        <TabPanel>3</TabPanel>\n      </Tabs>\n    )}\n  </For>\n</VStack>`;\n\nconst sizes = `<VStack alignItems=\"stretch\" spacing=\"$4\">\n  <For each={[\"sm\", \"md\", \"lg\"]}>\n    {size => (\n      <Tabs size={size}>\n        <TabList>\n          <Tab>One</Tab>\n          <Tab>Two</Tab>\n          <Tab>Three</Tab>\n        </TabList>\n        <TabPanel>1</TabPanel>\n        <TabPanel>2</TabPanel>\n        <TabPanel>3</TabPanel>\n      </Tabs>\n    )}\n  </For>\n</VStack>`;\n\nconst variants = `<VStack alignItems=\"stretch\" spacing=\"$4\">\n  <For each={[\"underline\", \"outline\", \"cards\", \"pills\"]}>\n    {variant => (\n      <Tabs variant={variant}>\n        <TabList>\n          <Tab>One</Tab>\n          <Tab>Two</Tab>\n          <Tab>Three</Tab>\n        </TabList>\n        <TabPanel>1</TabPanel>\n        <TabPanel>2</TabPanel>\n        <TabPanel>3</TabPanel>\n      </Tabs>\n    )}\n  </For>\n</VStack>`;\n\nconst aligments = `<VStack alignItems=\"stretch\" spacing=\"$4\">\n  <For each={[\"start\", \"center\", \"apart\", \"end\"]}>\n    {alignment => (\n      <Tabs alignment={alignment}>\n        <TabList>\n          <Tab>One</Tab>\n          <Tab>Two</Tab>\n          <Tab>Three</Tab>\n        </TabList>\n        <TabPanel>1</TabPanel>\n        <TabPanel>2</TabPanel>\n        <TabPanel>3</TabPanel>\n      </Tabs>\n    )}\n  </For>\n</VStack>`;\n\nconst orientation = `<Tabs orientation=\"vertical\">\n  <TabList>\n    <Tab>One</Tab>\n    <Tab>Two</Tab>\n    <Tab>Three</Tab>\n  </TabList>\n  <TabPanel>1</TabPanel>\n  <TabPanel>2</TabPanel>\n  <TabPanel>3</TabPanel>\n</Tabs>`;\n\nconst fitted = `<Tabs fitted>\n  <TabList>\n    <Tab>One</Tab>\n    <Tab>Two</Tab>\n    <Tab>Three</Tab>\n  </TabList>\n  <TabPanel>1</TabPanel>\n  <TabPanel>2</TabPanel>\n  <TabPanel>3</TabPanel>\n</Tabs>`;\n\nconst disabled = `<Tabs>\n  <TabList>\n    <Tab>One</Tab>\n    <Tab disabled>Two</Tab>\n    <Tab>Three</Tab>\n  </TabList>\n  <TabPanel>1</TabPanel>\n  <TabPanel>2</TabPanel>\n  <TabPanel>3</TabPanel>\n</Tabs>`;\n\nconst initialActive = `<Tabs defaultIndex={1}>\n  <TabList>\n    <Tab>One</Tab>\n    <Tab>Two</Tab>\n    <Tab>Three</Tab>\n  </TabList>\n  <TabPanel>1</TabPanel>\n  <TabPanel>2</TabPanel>\n  <TabPanel>3</TabPanel>\n</Tabs>`;\n\nconst keepAlive = `<VStack alignItems=\"stretch\" spacing=\"$4\">\n  <Tabs>\n    <TabList>\n      <Tab>One</Tab>\n      <Tab>Two</Tab>\n      <Tab>Three</Tab>\n    </TabList>\n    <TabPanel>\n      <Input placeholder=\"Try typing, I lose my value when switching tabs\" />\n    </TabPanel>\n    <TabPanel>2</TabPanel>\n    <TabPanel>3</TabPanel>\n  </Tabs>\n  <Tabs keepAlive>\n    <TabList>\n      <Tab>One</Tab>\n      <Tab>Two</Tab>\n      <Tab>Three</Tab>\n    </TabList>\n    <TabPanel>\n      <Input placeholder=\"Try typing, I stay alive when switching tabs\" />\n    </TabPanel>\n    <TabPanel>2</TabPanel>\n    <TabPanel>3</TabPanel>\n  </Tabs>\n</VStack>`;\n\nconst controlled = `function ControlledExample() {\n  const [tabIndex, setTabIndex] = createSignal(0);\n\n  const handleSliderChange = (event) => {\n    setTabIndex(parseInt(event.target.value, 10));\n  };\n\n  const handleTabsChange = (index) => {\n    setTabIndex(index);\n  };\n\n  return (\n    <>\n      <input \n        type=\"range\" \n        min=\"0\" \n        max=\"2\" \n        value={tabIndex()} \n        onInput={handleSliderChange} \n      />\n      <Tabs index={tabIndex()} onChange={handleTabsChange}>\n        <TabList>\n          <Tab>One</Tab>\n          <Tab>Two</Tab>\n          <Tab>Three</Tab>\n        </TabList>\n        <TabPanel>\n          <p>Click the tabs or pull the slider around</p>\n        </TabPanel>\n        <TabPanel>\n          <p>Yeah yeah. What's up?</p>\n        </TabPanel>\n        <TabPanel>\n          <p>Oh, hello there.</p>\n        </TabPanel>\n      </Tabs>\n    </>\n  )\n}`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Tabs: {\n      baseStyle: {\n        root: SystemStyleObject,\n        tabList: SystemStyleObject,\n        tab: SystemStyleObject,\n        tabPanel: SystemStyleObject,\n      },\n      defaultProps: {\n        root: ThemeableTabsOptions\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  colors,\n  sizes,\n  variants,\n  aligments,\n  orientation,\n  fitted,\n  disabled,\n  initialActive,\n  keepAlive,\n  controlled,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/others/close-button/index.tsx",
    "content": "import { CloseButton, HStack, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function CloseButtonDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/overlay/tooltip\",\n    label: \"Toolitp\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#sizes\", label: \"Button sizes\", indent: true },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"size\",\n      description: \"The size of the button.\",\n      type: '\"sm\" | \"md\" | \"lg\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"aria-label\",\n      description: \"A label that describes the button.\",\n      type: \"string\",\n    },\n    {\n      name: \"icon\",\n      description: \"The icon to be used in the button.\",\n      type: \"JSX.Element\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout previousLink={previousLink} contextualNavLinks={contextualNavLinks}>\n      <PageTitle>CloseButton</PageTitle>\n      <Text mb=\"$5\">\n        <Code>CloseButton</Code> is essentially a button with a close icon. It is used to handle the\n        close functionality in feedback and overlay components like Alerts, Notifications, Drawers\n        and Modals.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$12\">\n        <CloseButton />\n      </Preview>\n      <SectionSubtitle id=\"sizes\">Button sizes</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>size</Code> prop to change the size of the CloseButton. You can set the value\n        to <Code>sm</Code>, <Code>md</Code> or <Code>lg</Code>.\n      </Text>\n      <Preview snippet={snippets.closeButtonSizes} mb=\"$12\">\n        <HStack spacing=\"$4\">\n          <CloseButton size=\"sm\" />\n          <CloseButton size=\"md\" />\n          <CloseButton size=\"lg\" />\n        </HStack>\n      </Preview>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>CloseButton</Code> base styles and default props can be overridden in the Hope UI\n        theme configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/others/close-button/snippets.ts",
    "content": "const importComponent = `import { CloseButton } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<CloseButton />`;\n\nconst closeButtonSizes = `<HStack spacing=\"$4\">\n  <CloseButton size=\"sm\" />\n  <CloseButton size=\"md\" />\n  <CloseButton size=\"lg\" />\n</HStack>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    CloseButton: {\n      baseStyle: SystemStyleObject,\n      defaultProps: ThemeableCloseButtonOptions\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  closeButtonSizes,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/overlay/drawer/index.tsx",
    "content": "import {\n  Alert,\n  AlertDescription,\n  Anchor,\n  Button,\n  createDisclosure,\n  Drawer,\n  DrawerBody,\n  DrawerCloseButton,\n  DrawerContent,\n  DrawerFooter,\n  DrawerHeader,\n  DrawerOverlay,\n  DrawerPlacement,\n  DrawerProps,\n  FormControl,\n  FormLabel,\n  HStack,\n  Input,\n  ListItem,\n  Radio,\n  RadioGroup,\n  Text,\n  UnorderedList,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Link } from \"solid-app-router\";\nimport { createSignal, For, onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { IconPlus } from \"@/icons/IconPlus\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function DrawerDoc() {\n  const [placement, setPlacement] = createSignal<DrawerPlacement>(\"right\");\n  const [size, setSize] = createSignal<DrawerProps[\"size\"]>(\"md\");\n\n  const sizes = [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"full\"];\n\n  const basicUsageDisclosure = createDisclosure();\n  const placementDisclosure = createDisclosure();\n  const initialFocusDisclosure = createDisclosure();\n  const sizeDisclosure = createDisclosure();\n\n  const handleSizeClick = (newSize: DrawerProps[\"size\"]) => {\n    setSize(() => newSize);\n    sizeDisclosure.onOpen();\n  };\n\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/feedback/notification\",\n    label: \"Notification\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/overlay/menu\",\n    label: \"Menu\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#drawer-placement\", label: \"Drawer placement\", indent: true },\n    { href: \"#focus-on-specific-element\", label: \"Focus on specific element\", indent: true },\n    { href: \"#drawer-sizes\", label: \"Drawer sizes\", indent: true },\n    { href: \"#using-form-in-drawer\", label: \"Using a form in a Drawer\", indent: true },\n    { href: \"#accessibility\", label: \"Accessibility\" },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#drawer-props\", label: \"Drawer props\", indent: true },\n    { href: \"#other-components-props\", label: \"Other components props\", indent: true },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"size\",\n      description: \"The size of the drawer.\",\n      type: '\"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\"',\n      defaultValue: '\"xs\"',\n    },\n    {\n      name: \"placement\",\n      description: \"The placement of the drawer.\",\n      type: '\"top\" | \"right\" | \"bottom\" | \"left\"',\n      defaultValue: '\"right\"',\n    },\n    {\n      name: \"fullHeight\",\n      description:\n        \"If `true` and drawer's placement is top or bottom, the drawer will occupy the viewport height (100vh).\",\n      type: \"boolean\",\n    },\n    {\n      name: \"disableMotion\",\n      description: \"If `true`, the drawer will appear without any transition.\",\n      type: \"boolean\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Drawer</PageTitle>\n      <Text mb=\"$5\">\n        The <Code>Drawer</Code> component is a panel that slides out from the edge of the screen. It\n        can be useful when you need users to complete a task or view some details without leaving\n        the current page.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>Drawer:</strong> The wrapper that provides context for its children.\n        </ListItem>\n        <ListItem>\n          <strong>DrawerOverlay:</strong> The dimmed overlay behind the drawer content.\n        </ListItem>\n        <ListItem>\n          <strong>DrawerContent:</strong> The container for the drawer's content.\n        </ListItem>\n        <ListItem>\n          <strong>DrawerHeader:</strong> The header that labels the drawer.\n        </ListItem>\n        <ListItem>\n          <strong>DrawerBody:</strong> The wrapper that houses the drawer's main content.\n        </ListItem>\n        <ListItem>\n          <strong>DrawerFooter:</strong> The footer that houses the drawer actions.\n        </ListItem>\n        <ListItem>\n          <strong>DrawerCloseButton:</strong> The button that closes the drawer.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Button onClick={basicUsageDisclosure.onOpen}>Open</Button>\n        <Drawer\n          opened={basicUsageDisclosure.isOpen()}\n          placement=\"right\"\n          onClose={basicUsageDisclosure.onClose}\n        >\n          <DrawerOverlay />\n          <DrawerContent>\n            <DrawerCloseButton />\n            <DrawerHeader>Create your account</DrawerHeader>\n            <DrawerBody>\n              <Input placeholder=\"Type here...\" />\n            </DrawerBody>\n            <DrawerFooter>\n              <Button variant=\"outline\" mr=\"$3\" onClick={basicUsageDisclosure.onClose}>\n                Cancel\n              </Button>\n              <Button>Save</Button>\n            </DrawerFooter>\n          </DrawerContent>\n        </Drawer>\n      </Preview>\n      <SectionSubtitle id=\"drawer-placement\">Drawer placement</SectionSubtitle>\n      <Text mb=\"$5\">\n        The Drawer can appear from any edge of the screen. Pass the <Code>placement</Code> prop and\n        set it to <Code>top</Code>, <Code>right</Code>, <Code>bottom</Code>, or <Code>left</Code>.\n      </Text>\n      <Preview snippet={snippets.placement} mb=\"$10\">\n        <RadioGroup value={placement()} onChange={value => setPlacement(value as DrawerPlacement)}>\n          <HStack spacing=\"$4\" mb=\"$4\">\n            <Radio value=\"top\">Top</Radio>\n            <Radio value=\"right\">Right</Radio>\n            <Radio value=\"bottom\">Bottom</Radio>\n            <Radio value=\"left\">Left</Radio>\n          </HStack>\n        </RadioGroup>\n        <Button onClick={placementDisclosure.onOpen}>Open</Button>\n        <Drawer\n          opened={placementDisclosure.isOpen()}\n          placement={placement()}\n          onClose={placementDisclosure.onClose}\n        >\n          <DrawerOverlay />\n          <DrawerContent>\n            <DrawerHeader>Basic Drawer</DrawerHeader>\n            <DrawerBody>\n              <p>Some contents...</p>\n              <p>Some contents...</p>\n              <p>Some contents...</p>\n            </DrawerBody>\n          </DrawerContent>\n        </Drawer>\n      </Preview>\n      <SectionSubtitle id=\"focus-on-specific-element\">Focus on specific element</SectionSubtitle>\n      <Text mb=\"$5\">\n        Hope UI automatically sets focus on the first tabbable element in the drawer. However, there\n        might be scenarios where you need to manually control where focus goes. To do this, pass a\n        CSS query selector to the <Code>initialFocus</Code> prop.\n      </Text>\n      <Preview snippet={snippets.initialFocus} mb=\"$6\">\n        <Button leftIcon={<IconPlus />} onClick={initialFocusDisclosure.onOpen}>\n          Create user\n        </Button>\n        <Drawer\n          opened={initialFocusDisclosure.isOpen()}\n          initialFocus=\"#firstname\"\n          onClose={initialFocusDisclosure.onClose}\n        >\n          <DrawerOverlay />\n          <DrawerContent>\n            <DrawerCloseButton />\n            <DrawerHeader>Create user</DrawerHeader>\n\n            <DrawerBody>\n              <FormControl id=\"firstname\" mb=\"$4\">\n                <FormLabel>First name</FormLabel>\n                <Input placeholder=\"First name\" />\n              </FormControl>\n              <FormControl id=\"lastname\">\n                <FormLabel>Last name</FormLabel>\n                <Input placeholder=\"Last name\" />\n              </FormControl>\n            </DrawerBody>\n\n            <DrawerFooter>\n              <Button variant=\"outline\" mr=\"$3\" onClick={initialFocusDisclosure.onClose}>\n                Cancel\n              </Button>\n              <Button>Save</Button>\n            </DrawerFooter>\n          </DrawerContent>\n        </Drawer>\n      </Preview>\n      <Alert status=\"warning\" mb=\"$10\">\n        <AlertDescription>\n          Without the <Code>initialFocus</Code> prop, the drawer will set focus on the{\" \"}\n          <strong>first focusable element</strong> when it opens.\n        </AlertDescription>\n      </Alert>\n      <SectionSubtitle id=\"drawer-sizes\">Drawer sizes</SectionSubtitle>\n      <Text mb=\"$5\">\n        Pass the <Code>size</Code> prop if you need to adjust the size of the drawer. Values can be{\" \"}\n        <Code>xs</Code>, <Code>sm</Code>, <Code>md</Code>, <Code>lg</Code>, <Code>xl</Code>, or{\" \"}\n        <Code>full</Code>.\n      </Text>\n      <Preview snippet={snippets.drawerSizes} mb=\"$10\">\n        <For each={sizes}>\n          {size => (\n            <Button\n              onClick={() => handleSizeClick(size as DrawerProps[\"size\"])}\n              m=\"$4\"\n            >{`Open ${size} Drawer`}</Button>\n          )}\n        </For>\n\n        <Drawer opened={sizeDisclosure.isOpen()} size={size()} onClose={sizeDisclosure.onClose}>\n          <DrawerOverlay />\n          <DrawerContent>\n            <DrawerHeader>{`${size()} drawer contents`}</DrawerHeader>\n            <DrawerBody>\n              {size() === \"full\"\n                ? `You're trapped 😆 , refresh the page to leave or press 'Esc' key.`\n                : null}\n            </DrawerBody>\n          </DrawerContent>\n        </Drawer>\n      </Preview>\n      <SectionSubtitle id=\"using-form-in-drawer\">Using a form in a Drawer</SectionSubtitle>\n      <Text mb=\"$5\">\n        If you need to but a form within the Drawer and place the sumit button in the drawer's\n        footer, here's the recommended way to do it:\n      </Text>\n      <CodeSnippet snippet={snippets.usingForm} mb=\"$6\" />\n      <Alert status=\"warning\" mb=\"$12\">\n        <AlertDescription>\n          Because the button is located outside the form, you have to leverage its native HTML{\" \"}\n          <Code>form</Code> attribute and refer to the <Code>id</Code> of the <Code>form</Code>.\n        </AlertDescription>\n      </Alert>\n      <SectionTitle id=\"accessibility\">Accessibility</SectionTitle>\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>When opening the Drawer, focus is trapped inside the Drawer.</ListItem>\n        <ListItem>\n          By default, the drawer sets focus on the first focusable element. If the{\" \"}\n          <Code>initialFocus</Code> prop is passed, the drawer sets focus on the element that\n          matches the CSS query selector.\n        </ListItem>\n        <ListItem>\n          After the drawer closes, it'll return focus to the element that triggered it.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Drawer</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"drawer-props\">Drawer props</SectionSubtitle>\n      <Text mb=\"$5\">\n        <Code>Drawer</Code> composes the{\" \"}\n        <Anchor as={Link} href=\"/docs/overlay/modal\" color=\"$primary11\" fontWeight=\"$semibold\">\n          Modal\n        </Anchor>{\" \"}\n        component with these extra props:\n      </Text>\n      <PropsTable items={propItems} mb=\"$10\" />\n      <SectionSubtitle id=\"other-components-props\">Other components props</SectionSubtitle>\n      <UnorderedList spacing=\"$2\">\n        <ListItem>\n          <Code>DrawerOverlay</Code>, <Code>DrawerContent</Code>, <Code>DrawerHeader</Code>,{\" \"}\n          <Code>DrawerBody</Code> and <Code>DrawerFooter</Code> composes{\" \"}\n          <Anchor as={Link} href=\"/docs/layout/box\" color=\"$primary11\" fontWeight=\"$semibold\">\n            Box\n          </Anchor>{\" \"}\n          component.\n        </ListItem>\n        <ListItem>\n          <Code>DrawerCloseButton</Code> composes{\" \"}\n          <Anchor\n            as={Link}\n            href=\"/docs/others/close-button\"\n            color=\"$primary11\"\n            fontWeight=\"$semibold\"\n          >\n            CloseButton\n          </Anchor>\n          .\n        </ListItem>\n      </UnorderedList>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/overlay/drawer/snippets.ts",
    "content": "const importComponent = `import { \n  Drawer,\n  DrawerBody,\n  DrawerCloseButton,\n  DrawerContent,\n  DrawerFooter,\n  DrawerHeader,\n  DrawerOverlay,\n} from \"@hope-ui/solid\"`;\n\nconst basicUsage = `function DrawerExample() {\n  const { isOpen, onOpen, onClose } = createDisclosure()\n\n  return (\n    <>\n      <Button onClick={onOpen}>Open</Button>\n      <Drawer\n        opened={isOpen()}\n        placement=\"right\"\n        onClose={onClose}\n      >\n        <DrawerOverlay />\n        <DrawerContent>\n          <DrawerCloseButton />\n          <DrawerHeader>Create your account</DrawerHeader>\n\n          <DrawerBody>\n            <Input placeholder=\"Type here...\" />\n          </DrawerBody>\n\n          <DrawerFooter>\n            <Button variant=\"outline\" mr=\"$3\" onClick={onClose}>\n              Cancel\n            </Button>\n            <Button>Save</Button>\n          </DrawerFooter>\n        </DrawerContent>\n      </Drawer>\n    </>\n  )\n}`;\n\nconst placement = `function PlacementExample() {\n  const [placement, setPlacement] = createSignal<DrawerPlacement>(\"right\");\n  const { isOpen, onOpen, onClose } = createDisclosure()\n\n  return (\n    <>\n      <RadioGroup\n        defaultValue={placement()}\n        onChange={value => setPlacement(value as DrawerPlacement)}\n      >\n        <HStack spacing=\"$4\" mb=\"$4\">\n          <Radio value=\"top\">Top</Radio>\n          <Radio value=\"right\">Right</Radio>\n          <Radio value=\"bottom\">Bottom</Radio>\n          <Radio value=\"left\">Left</Radio>\n        </HStack>\n      </RadioGroup>\n      <Button onClick={onOpen}>Open</Button>\n      <Drawer\n        opened={isOpen()}\n        placement={placement()}\n        onClose={onClose}\n      >\n        <DrawerOverlay />\n        <DrawerContent>\n          <DrawerHeader>Basic Drawer</DrawerHeader>\n          <DrawerBody>\n            <p>Some contents...</p>\n            <p>Some contents...</p>\n            <p>Some contents...</p>\n          </DrawerBody>\n        </DrawerContent>\n      </Drawer>\n    </>\n  )\n}`;\n\nconst initialFocus = `function InitialFocusExample() {\n  const { isOpen, onOpen, onClose } = createDisclosure()\n\n  return (\n    <>\n      <Button leftIcon={<IconPlus />} onClick={onOpen}>\n        Create user\n      </Button>\n      <Drawer\n        opened={isOpen()}\n        initialFocus=\"#firstname\" // Focus on the element with id \\`firstname\\`\n        onClose={onClose}\n      >\n        <DrawerOverlay />\n        <DrawerContent>\n          <DrawerCloseButton />\n          <DrawerHeader>Create user</DrawerHeader>\n\n          <DrawerBody>\n            <FormControl id=\"firstname\" mb=\"$4\">\n              <FormLabel>First name</FormLabel>\n              <Input placeholder=\"First name\" />\n            </FormControl>\n            <FormControl id=\"lastname\">\n              <FormLabel>Last name</FormLabel>\n              <Input placeholder=\"Last name\" />\n            </FormControl>\n          </DrawerBody>\n\n          <DrawerFooter>\n            <Button variant=\"outline\" mr=\"$3\" onClick={onClose}>\n              Cancel\n            </Button>\n            <Button>Save</Button>\n          </DrawerFooter>\n        </DrawerContent>\n      </Drawer>\n    </>\n  )\n}`;\n\nconst drawerSizes = `function SizeExample() {\n  const [size, setSize] = createSignal<DrawerProps[\"size\"]>(\"md\");\n  const { isOpen, onOpen, onClose } = createDisclosure()\n\n  const handleClick = (newSize) => {\n    setSize(newSize)\n    onOpen()\n  }\n\n  const sizes = ['xs', 'sm', 'md', 'lg', 'xl', 'full']\n\n  return (\n    <>\n      <For each={sizes}>\n        {size => (\n          <Button \n            onClick={() => handleClick(size)} \n            m=\"$4\"\n          >\n            {\\`Open \\${size} Drawer\\`}\n          </Button>\n        )}\n      </For>\n\n      <Drawer isOpen={isOpen()} size={size()} onClose={onClose}>\n        <DrawerOverlay />\n        <DrawerContent>\n          <DrawerHeader>{\\`\\${size()} drawer contents\\`}</DrawerHeader>\n          <DrawerBody>\n            {size === 'full'\n              ? \\`You're trapped 😆 , refresh the page to leave or press 'Esc' key.\\`\n              : null}\n          </DrawerBody>\n        </DrawerContent>\n      </Drawer>\n    </>\n  )\n}`;\n\nconst usingForm = `function FormExample() {\n  const { isOpen, onOpen, onClose } = createDisclosure()\n\n  return (\n    <>\n      <Button onClick={onOpen}>Open</Button>\n      <Drawer isOpen={isOpen()} onClose={onClose}>\n        <DrawerOverlay />\n        <DrawerContent>\n          <DrawerCloseButton />\n          <DrawerHeader>Create your account</DrawerHeader>\n\n          <DrawerBody>\n            <form\n              id='my-form'\n              onSubmit={(e) => {\n                e.preventDefault()\n                console.log('submitted')\n              }}\n            >\n              <Input name='username' placeholder='Type here...' />\n            </form>\n          </DrawerBody>\n\n          <DrawerFooter>\n            <Button type='submit' form='my-form'>\n              Save\n            </Button>\n          </DrawerFooter>\n        </DrawerContent>\n      </Drawer>\n    </>\n  )\n}`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Drawer: {\n      baseStyle: {\n        overlay: SystemStyleObject,\n        content: SystemStyleObject,\n        closeButton: SystemStyleObject,\n        header: SystemStyleObject,\n        body: SystemStyleObject,\n        footer: SystemStyleObject\n      },\n      defaultProps: {\n        root: ThemeableDrawerOptions,\n        closeButton: ThemeableCloseButtonOptions\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  placement,\n  initialFocus,\n  drawerSizes,\n  usingForm,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/overlay/menu/index.tsx",
    "content": "import {\n  Alert,\n  AlertDescription,\n  Anchor,\n  Button,\n  Divider,\n  IconButton,\n  Kbd,\n  ListItem,\n  Menu,\n  MenuContent,\n  MenuGroup,\n  MenuItem,\n  MenuLabel,\n  MenuTrigger,\n  Text,\n  UnorderedList,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Link } from \"solid-app-router\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { IconCaretDown } from \"@/icons/IconCaretDown\";\nimport { IconEdit } from \"@/icons/IconEdit\";\nimport { IconExternalLink } from \"@/icons/IconExternalLink\";\nimport { IconHamburgerMenu } from \"@/icons/IconHamburgerMenu\";\nimport { IconPlus } from \"@/icons/IconPlus\";\nimport { IconRepeat } from \"@/icons/IconRepeat\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function MenuDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/overlay/drawer\",\n    label: \"Drawer\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/overlay/modal\",\n    label: \"Modal\",\n  };\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#accessing-internal-state\", label: \"Accessing the internal state\", indent: true },\n    { href: \"#custom-menu-trigger\", label: \"Custom menu trigger\", indent: true },\n    { href: \"#icons-and-commands\", label: \"Icons and commands\", indent: true },\n    { href: \"#typeahead-behavior\", label: \"Typeahead behavior\", indent: true },\n    { href: \"#menu-item-colors\", label: \"MenuItem colors\", indent: true },\n    { href: \"#disabled-menu-item\", label: \"Disabled MenuItem\", indent: true },\n    {\n      href: \"#trigger-action\",\n      label: \"Trigger an action when a MenuItem is selected\",\n      indent: true,\n    },\n    { href: \"#menu-group\", label: \"MenuGroup\", indent: true },\n    { href: \"#accessibility\", label: \"Accessibility\" },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#menu-props\", label: \"Menu props\", indent: true },\n    { href: \"#menu-item-props\", label: \"MenuItem props\", indent: true },\n    { href: \"#other-components-props\", label: \"Other components props\", indent: true },\n  ];\n\n  const menuPropItems: PropsTableItem[] = [\n    {\n      name: \"id\",\n      description: \"The `id` of the menu trigger.\",\n      type: \"string\",\n    },\n    {\n      name: \"children\",\n      description:\n        \"The children of the menu. Using a render prop gives access to the `opened` state.\",\n      type: \"JSX.Element | (props: { opened: Accessor<boolean> }) => JSX.Element\",\n    },\n    {\n      name: \"closeOnSelect\",\n      description: \"If `true`, the menu will close when a menu item is selected.\",\n      type: \"boolean\",\n      defaultValue: \"true\",\n    },\n    {\n      name: \"offset\",\n      description:\n        \"Offset between the menu content (dropdown panel) and the reference (trigger) element.\",\n      type: \"number\",\n    },\n    {\n      name: \"placement\",\n      description: \"The placement of the menu content (dropdown panel).\",\n      type: \"Placement\",\n      defaultValue: '\"bottom-start\"',\n    },\n    {\n      name: \"motionPreset\",\n      description: \"The transition that should be used for the menu.\",\n      type: '\"scale-top-left\" | \"scale-top-right\" | \"none\"',\n      defaultValue: '\"scale-top-left\"',\n    },\n  ];\n\n  const menuItemPropItems: PropsTableItem[] = [\n    {\n      name: \"colorScheme\",\n      description: \"The color of the menu item.\",\n      type: '\"primary\" | \"accent\" | \"neutral\" | \"success\" | \"info\" | \"warning\" | \"danger\"',\n      defaultValue: '\"neutral\"',\n    },\n    {\n      name: \"disabled\",\n      description: \"If `true`, the menu item will be disabled.\",\n      type: \"boolean\",\n      defaultValue: \"true\",\n    },\n    {\n      name: \"closeOnSelect\",\n      description: \"If `true`, the menu will close when the menu item is selected.\",\n      type: \"boolean\",\n      defaultValue: \"true\",\n    },\n    {\n      name: \"textValue\",\n      description:\n        \"Optional text used for typeahead purposes. By default the typeahead behavior will use the `.textContent` of the `MenuItem`. Use this when the content is complex, or you have non-textual content inside.\",\n      type: \"string\",\n    },\n    {\n      name: \"icon\",\n      description: \"The icon to display next to the menu item text.\",\n      type: \"JSX.Element\",\n    },\n    {\n      name: \"iconSpacing\",\n      description: \"The space between the icon and the menu item text.\",\n      type: 'MarginProps[\"marginRight\"]',\n      defaultValue: \"0.5rem\",\n    },\n    {\n      name: \"command\",\n      description: \"Right-aligned label text content, useful for displaying hotkeys.\",\n      type: \"string\",\n    },\n    {\n      name: \"commandSpacing\",\n      description: \"The space between the command and the menu item text.\",\n      type: 'MarginProps[\"marginLeft\"]',\n      defaultValue: \"0.5rem\",\n    },\n    {\n      name: \"onSelect\",\n      description:\n        \"Event handler called when the user selects a menu item (via mouse or keyboard).\",\n      type: \"() => void\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Menu</PageTitle>\n      <Text mb=\"$5\">\n        An accessible dropdown menu for the common dropdown menu button design pattern.{\" \"}\n        <Code>Menu</Code> implement the{\" \"}\n        <Anchor\n          href=\"https://www.w3.org/TR/wai-aria-practices-1.2/examples/menu-button/menu-button-actions-active-descendant.html\"\n          external\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          WAI ARIA Actions Menu Button\n        </Anchor>{\" \"}\n        design pattern.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>Menu:</strong> The wrapper component that provides context for all its children.\n        </ListItem>\n        <ListItem>\n          <strong>MenuTrigger:</strong> The trigger that toggles the menu.\n        </ListItem>\n        <ListItem>\n          <strong>MenuContent:</strong> The component that pops out when the menu is open.\n        </ListItem>\n        <ListItem>\n          <strong>MenuGroup:</strong> The component used to group multiple menu item.\n        </ListItem>\n        <ListItem>\n          <strong>MenuLabel:</strong> The component used to render the label of a group.\n        </ListItem>\n        <ListItem>\n          <strong>MenuItem:</strong> An item of the menu.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Menu>\n          <MenuTrigger\n            as={Button}\n            variant=\"subtle\"\n            colorScheme=\"neutral\"\n            rightIcon={<IconCaretDown boxSize=\"$6\" />}\n          >\n            Actions\n          </MenuTrigger>\n          <MenuContent>\n            <MenuItem>Download</MenuItem>\n            <MenuItem>Create a Copy</MenuItem>\n            <MenuItem>Mark as Draft</MenuItem>\n            <MenuItem>Delete</MenuItem>\n            <MenuItem>Attend a Workshop</MenuItem>\n          </MenuContent>\n        </Menu>\n      </Preview>\n      <SectionSubtitle id=\"accessing-internal-state\">Accessing the internal state</SectionSubtitle>\n      <Text mb=\"$5\">\n        To access the internal state of the <Code>Menu</Code>, use a function as children (commonly\n        known as a render prop). You'll get access to the internal <Code>opened</Code> state.\n      </Text>\n      <Preview snippet={snippets.accessingInternalState} mb=\"$10\">\n        <Menu>\n          {({ opened }) => (\n            <>\n              <MenuTrigger\n                as={Button}\n                variant=\"subtle\"\n                colorScheme=\"neutral\"\n                rightIcon={<IconCaretDown boxSize=\"$6\" />}\n              >\n                {opened() ? \"Close\" : \"Open\"}\n              </MenuTrigger>\n              <MenuContent>\n                <MenuItem>Download</MenuItem>\n                <MenuItem>Create a Copy</MenuItem>\n                <MenuItem>Mark as Draft</MenuItem>\n                <MenuItem>Delete</MenuItem>\n                <MenuItem>Attend a Workshop</MenuItem>\n              </MenuContent>\n            </>\n          )}\n        </Menu>\n      </Preview>\n      <SectionSubtitle id=\"custom-menu-trigger\">Custom menu trigger</SectionSubtitle>\n      <Text mb=\"$3\">\n        The default <Code>MenuTrigger</Code> can be styled using the usual styled-system props, but\n        it starts off plainly styled.\n      </Text>\n      <Text mb=\"$12\">\n        You can use the <Code>as</Code> prop to render a custom component instead of the default{\" \"}\n        <Code>MenuTrigger</Code>. For instance, you can use Hope UI's <Code>Button</Code> component,\n        or your own custom component.\n      </Text>\n      <SectionSubtitle id=\"icons-and-commands\">Icons and commands</SectionSubtitle>\n      <Text mb=\"$5\">\n        You can add icon to each <Code>MenuItem</Code> by passing the <Code>icon</Code> prop. To add\n        a commands (or hotkeys) to menu items, you can use the <Code>command</Code> prop.\n      </Text>\n      <Preview snippet={snippets.iconsAndCommands} mb=\"$10\">\n        <Menu>\n          <MenuTrigger\n            as={IconButton}\n            variant=\"outline\"\n            colorScheme=\"neutral\"\n            icon={<IconHamburgerMenu />}\n          />\n          <MenuContent minW=\"$60\">\n            <MenuItem icon={<IconPlus />} command=\"⌘T\">\n              New Tab\n            </MenuItem>\n            <MenuItem icon={<IconExternalLink />} command=\"⌘N\">\n              New Window\n            </MenuItem>\n            <MenuItem icon={<IconRepeat />} command=\"⌘⇧N\">\n              Open Closed Tab\n            </MenuItem>\n            <MenuItem icon={<IconEdit />} command=\"⌘O\">\n              Open File...\n            </MenuItem>\n          </MenuContent>\n        </Menu>\n      </Preview>\n      <SectionSubtitle id=\"typeahead-behavior\">Typeahead behavior</SectionSubtitle>\n      <Text mb=\"$5\">\n        When focus is on the <Code>MenuTrigger</Code> or within the <Code>MenuContent</Code> and you\n        type a letter key, a search begins. Focus will move to the first <Code>MenuItem</Code> that\n        starts with the letter you typed.\n      </Text>\n      <Preview snippet={snippets.basicUsage} mb=\"$6\">\n        <Menu>\n          <MenuTrigger\n            as={Button}\n            variant=\"subtle\"\n            colorScheme=\"neutral\"\n            rightIcon={<IconCaretDown boxSize=\"$6\" />}\n          >\n            Actions\n          </MenuTrigger>\n          <MenuContent>\n            <MenuItem>Download</MenuItem>\n            <MenuItem>Create a Copy</MenuItem>\n            <MenuItem>Mark as Draft</MenuItem>\n            <MenuItem>Delete</MenuItem>\n            <MenuItem>Attend a Workshop</MenuItem>\n          </MenuContent>\n        </Menu>\n      </Preview>\n      <Alert status=\"warning\" mb=\"$10\">\n        <AlertDescription>\n          If the content of <Code>MenuItem</Code> is too complex or non-textual you can pass the{\" \"}\n          <Code>textValue</Code> prop to <Code>MenuItem</Code> to indicate the text that will be\n          used for typeahead purposes.\n        </AlertDescription>\n      </Alert>\n      <SectionSubtitle id=\"menu-item-colors\">MenuItem colors</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>colorScheme</Code> prop to change the color of the <Code>MenuItem</Code>. You\n        can set the value to <Code>primary</Code>, <Code>accent</Code>, <Code>neutral</Code>,{\" \"}\n        <Code>success</Code>, <Code>info</Code>, <Code>warning</Code> or <Code>danger</Code>.\n      </Text>\n      <Preview snippet={snippets.menuItemColors} mb=\"$10\">\n        <Menu>\n          <MenuTrigger\n            as={Button}\n            variant=\"subtle\"\n            colorScheme=\"neutral\"\n            rightIcon={<IconCaretDown boxSize=\"$6\" />}\n          >\n            Actions\n          </MenuTrigger>\n          <MenuContent>\n            <MenuItem colorScheme=\"primary\">New File</MenuItem>\n            <MenuItem colorScheme=\"accent\">New Folder</MenuItem>\n            <MenuItem colorScheme=\"neutral\">Download</MenuItem>\n            <MenuItem colorScheme=\"success\">Create a Copy</MenuItem>\n            <MenuItem colorScheme=\"info\">Attend a Workshop</MenuItem>\n            <MenuItem colorScheme=\"warning\">Mark as Draft</MenuItem>\n            <MenuItem colorScheme=\"danger\">Delete</MenuItem>\n          </MenuContent>\n        </Menu>\n      </Preview>\n      <SectionSubtitle id=\"disabled-menu-item\">Disabled MenuItem</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>disabled</Code> prop to disable a <Code>MenuItem</Code>.\n      </Text>\n      <Preview snippet={snippets.disabledMenuItem} mb=\"$10\">\n        <Menu>\n          <MenuTrigger\n            as={Button}\n            variant=\"subtle\"\n            colorScheme=\"neutral\"\n            rightIcon={<IconCaretDown boxSize=\"$6\" />}\n          >\n            Actions\n          </MenuTrigger>\n          <MenuContent>\n            <MenuItem>Download</MenuItem>\n            <MenuItem>Create a Copy</MenuItem>\n            <MenuItem>Mark as Draft</MenuItem>\n            <MenuItem disabled>Delete</MenuItem>\n            <MenuItem>Attend a Workshop</MenuItem>\n          </MenuContent>\n        </Menu>\n      </Preview>\n      <SectionSubtitle id=\"trigger-action\">\n        Trigger an action when a MenuItem is selected\n      </SectionSubtitle>\n      <Text mb=\"$5\">\n        Pass a callback to the <Code>onSelect</Code> prop to trigger an action when the{\" \"}\n        <Code>MenuItem</Code> is selected.\n      </Text>\n      <Preview snippet={snippets.triggerAction} mb=\"$10\">\n        <Menu>\n          <MenuTrigger\n            as={Button}\n            variant=\"subtle\"\n            colorScheme=\"neutral\"\n            rightIcon={<IconCaretDown boxSize=\"$6\" />}\n          >\n            Actions\n          </MenuTrigger>\n          <MenuContent>\n            <MenuItem onSelect={() => alert(\"Downloading...\")}>Download</MenuItem>\n            <MenuItem onSelect={() => alert(\"Copying...\")}>Create a Copy</MenuItem>\n          </MenuContent>\n        </Menu>\n      </Preview>\n      <SectionSubtitle id=\"menu-group\">MenuGroup</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>MenuGroup</Code> and <Code>MenuLabel</Code> components to group related menu\n        items.\n      </Text>\n      <Preview snippet={snippets.menuGroup} mb=\"$12\">\n        <Menu>\n          <MenuTrigger as={Button} colorScheme=\"info\">\n            Profile\n          </MenuTrigger>\n          <MenuContent>\n            <MenuGroup>\n              <MenuLabel>Profile</MenuLabel>\n              <MenuItem>My Account</MenuItem>\n              <MenuItem>Payments </MenuItem>\n            </MenuGroup>\n            <Divider role=\"presentation\" my=\"$1\" />\n            <MenuGroup>\n              <MenuLabel>Help</MenuLabel>\n              <MenuItem>Docs</MenuItem>\n              <MenuItem>FAQ</MenuItem>\n            </MenuGroup>\n          </MenuContent>\n        </Menu>\n      </Preview>\n      <SectionTitle id=\"accessibility\">Accessibility</SectionTitle>\n      <SectionSubtitle>ARIA roles and attributes</SectionSubtitle>\n      <UnorderedList spacing=\"$2\" mb=\"$8\">\n        <ListItem>\n          <Code>MenuTrigger</Code> as <Code>role</Code> set to <Code>button</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>MenuTrigger</Code> as <Code>aria-haspopup</Code> set to <Code>menu</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>MenuTrigger</Code> as <Code>aria-expanded</Code> set to <Code>true</Code> when the\n          menu is displayed.\n        </ListItem>\n        <ListItem>\n          <Code>MenuTrigger</Code> as <Code>aria-controls</Code> set to the id of{\" \"}\n          <Code>MenuContent</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>MenuContent</Code> as <Code>role</Code> set to <Code>menu</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>MenuContent</Code> as <Code>aria-orientation</Code> set to <Code>vertical</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>MenuItem</Code> as <Code>role</Code> set to <Code>menuitem</Code>.\n        </ListItem>\n      </UnorderedList>\n      <SectionSubtitle>Keyboard support (closed menu)</SectionSubtitle>\n      <UnorderedList spacing=\"$2\" mb=\"$8\">\n        <ListItem>\n          <Kbd>enter</Kbd>, <Kbd>space</Kbd> or <Kbd>↓</Kbd> opens the menu and moves focus on the\n          first menu item.\n        </ListItem>\n        <ListItem>\n          <Kbd>↑</Kbd> opens the menu and moves focus to the last menu item.\n        </ListItem>\n      </UnorderedList>\n      <SectionSubtitle>Keyboard support (opened menu)</SectionSubtitle>\n      <UnorderedList spacing=\"$2\" mb=\"$8\">\n        <ListItem>\n          <Kbd>enter</Kbd> or <Kbd>space</Kbd> activates the menu item, close the menu and sets\n          focus to the menu trigger.\n        </ListItem>\n        <ListItem>\n          <Kbd>esc</Kbd> close the menu and sets focus to the menu trigger.\n        </ListItem>\n        <ListItem>\n          <Kbd>↑</Kbd> moves focus to the previous menu item. If focus is on the first menu item,\n          moves focus to the last menu item.\n        </ListItem>\n        <ListItem>\n          <Kbd>↓</Kbd> moves focus to the next menu item. If focus is on the last menu item, moves\n          focus to the first menu item.\n        </ListItem>\n        <ListItem>\n          <Kbd>home</Kbd> moves focus to the first menu item.\n        </ListItem>\n        <ListItem>\n          <Kbd>end</Kbd> moves focus to the last menu item.\n        </ListItem>\n      </UnorderedList>\n      <SectionSubtitle>Typeahead behavior</SectionSubtitle>\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          Any printable characters move visual focus to the first menu item that matches the typed\n          character.\n        </ListItem>\n        <ListItem>\n          If multiple keys are typed in quick succession, visual focus moves to the first menu item\n          that matches the full string.\n        </ListItem>\n        <ListItem>\n          If the same character is typed in succession, visual focus cycles among the menu items\n          starting with that character.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Menu</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"menu-props\">Menu props</SectionSubtitle>\n      <PropsTable items={menuPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"menu-item-props\">MenuItem props</SectionSubtitle>\n      <PropsTable items={menuItemPropItems} mb=\"$10\" />\n      <SectionSubtitle id=\"other-components-props\">Other components props</SectionSubtitle>\n      <Text>\n        <Code>MenuTrigger</Code>, <Code>MenuContent</Code>, <Code>MenuGroup</Code> and{\" \"}\n        <Code>MenuLabel</Code> composes{\" \"}\n        <Anchor\n          as={Link}\n          href=\"/docs/layout/box\"\n          external\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          Box\n        </Anchor>\n        .\n      </Text>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/overlay/menu/snippets.ts",
    "content": "const importComponent = `import { \n  Menu,\n  MenuTrigger,\n  MenuContent,\n  MenuGroup,\n  MenuLabel,\n  MenuItem\n} from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Menu>\n  <MenuTrigger\n    as={Button}\n    variant=\"subtle\"\n    colorScheme=\"neutral\"\n    rightIcon={<IconCaretDown boxSize=\"$6\" />}\n  >\n    Actions\n  </MenuTrigger>\n  <MenuContent>\n    <MenuItem>Download</MenuItem>\n    <MenuItem>Create a Copy</MenuItem>\n    <MenuItem>Mark as Draft</MenuItem>\n    <MenuItem>Delete</MenuItem>\n    <MenuItem>Attend a Workshop</MenuItem>\n  </MenuContent>\n</Menu>`;\n\nconst accessingInternalState = `<Menu>\n  {({ opened }) => (\n    <>\n      <MenuTrigger\n        as={Button}\n        variant=\"subtle\"\n        colorScheme=\"neutral\"\n        rightIcon={<IconCaretDown boxSize=\"$6\" />}\n      >\n        {opened() ? \"Close\" : \"Open\"}\n      </MenuTrigger>\n      <MenuContent>\n        <MenuItem>Download</MenuItem>\n        <MenuItem>Create a Copy</MenuItem>\n        <MenuItem>Mark as Draft</MenuItem>\n        <MenuItem>Delete</MenuItem>\n        <MenuItem>Attend a Workshop</MenuItem>\n      </MenuContent>\n    </>\n  )}\n</Menu>`;\n\nconst iconsAndCommands = `<Menu>\n  <MenuTrigger\n    as={IconButton}\n    variant=\"outline\"\n    colorScheme=\"neutral\"\n    icon={<IconHamburgerMenu />}\n  />\n  <MenuContent minW=\"$60\">\n    <MenuItem icon={<IconPlus />} command=\"⌘T\">\n      New Tab\n    </MenuItem>\n    <MenuItem icon={<IconExternalLink />} command=\"⌘N\">\n      New Window\n    </MenuItem>\n    <MenuItem icon={<IconRepeat />} command=\"⌘⇧N\">\n      Open Closed Tab\n    </MenuItem>\n    <MenuItem icon={<IconEdit />} command=\"⌘O\">\n      Open File...\n    </MenuItem>\n  </MenuContent>\n</Menu>`;\n\nconst menuItemColors = `<Menu>\n  <MenuTrigger\n    as={Button}\n    variant=\"subtle\"\n    colorScheme=\"neutral\"\n    rightIcon={<IconCaretDown boxSize=\"$6\" />}\n  >\n    Actions\n  </MenuTrigger>\n  <MenuContent>\n    <MenuItem colorScheme=\"primary\">New File</MenuItem>\n    <MenuItem colorScheme=\"accent\">New Folder</MenuItem>\n    <MenuItem colorScheme=\"neutral\">Download</MenuItem>\n    <MenuItem colorScheme=\"success\">Create a Copy</MenuItem>\n    <MenuItem colorScheme=\"info\">Attend a Workshop</MenuItem>\n    <MenuItem colorScheme=\"warning\">Mark as Draft</MenuItem>\n    <MenuItem colorScheme=\"danger\">Delete</MenuItem>\n  </MenuContent>\n</Menu>`;\n\nconst disabledMenuItem = `<Menu>\n  <MenuTrigger\n    as={Button}\n    variant=\"subtle\"\n    colorScheme=\"neutral\"\n    rightIcon={<IconCaretDown boxSize=\"$6\" />}\n  >\n    Actions\n  </MenuTrigger>\n  <MenuContent>\n    <MenuItem>Download</MenuItem>\n    <MenuItem>Create a Copy</MenuItem>\n    <MenuItem>Mark as Draft</MenuItem>\n    <MenuItem disabled>Delete</MenuItem>\n    <MenuItem>Attend a Workshop</MenuItem>\n  </MenuContent>\n</Menu>`;\n\nconst triggerAction = `<Menu>\n  <MenuTrigger\n    as={Button}\n    variant=\"subtle\"\n    colorScheme=\"neutral\"\n    rightIcon={<IconCaretDown boxSize=\"$6\" />}\n  >\n    Actions\n  </MenuTrigger>\n  <MenuContent>\n    <MenuItem onSelect={() => alert(\"Downloading...\")}>Download</MenuItem>\n    <MenuItem onSelect={() => alert(\"Copying...\")}>Create a Copy</MenuItem>\n  </MenuContent>\n</Menu>`;\n\nconst menuGroup = `<Menu>\n  <MenuTrigger as={Button} colorScheme=\"info\">\n    Profile\n  </MenuTrigger>\n  <MenuContent>\n    <MenuGroup>\n      <MenuLabel>Profile</MenuLabel>\n      <MenuItem>My Account</MenuItem>\n      <MenuItem>Payments </MenuItem>\n    </MenuGroup>\n    <Divider role=\"presentation\" my=\"$1\" />\n    <MenuGroup>\n      <MenuLabel>Help</MenuLabel>\n      <MenuItem>Docs</MenuItem>\n      <MenuItem>FAQ</MenuItem>\n    </MenuGroup>\n  </MenuContent>\n</Menu>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Menu: {\n      baseStyle: {\n        trigger: SystemStyleObject,\n        content: SystemStyleObject,\n        group: SystemStyleObject,\n        label: SystemStyleObject,\n        item: SystemStyleObject,\n        itemText: SystemStyleObject,\n        itemIconWrapper: SystemStyleObject,\n        itemCommand: SystemStyleObject,\n      },\n      defaultProps: {\n        root: ThemeableMenuOptions\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  accessingInternalState,\n  iconsAndCommands,\n  menuItemColors,\n  disabledMenuItem,\n  triggerAction,\n  menuGroup,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/overlay/modal/index.tsx",
    "content": "import {\n  Alert,\n  AlertDescription,\n  Anchor,\n  Button,\n  createDisclosure,\n  FormControl,\n  FormLabel,\n  HStack,\n  Input,\n  Kbd,\n  ListItem,\n  Modal,\n  ModalBody,\n  ModalCloseButton,\n  ModalContent,\n  ModalFooter,\n  ModalHeader,\n  ModalOverlay,\n  ModalProps,\n  Radio,\n  RadioGroup,\n  Text,\n  UnorderedList,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Link } from \"solid-app-router\";\nimport { createSignal, For, onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function ModalDoc() {\n  const basicUsageDisclosure = createDisclosure();\n  const blockScrollDisclosure = createDisclosure();\n  const initialFocusDisclosure = createDisclosure();\n  const closeOnOverlayClickDisclosure = createDisclosure();\n  const centeredDisclosure = createDisclosure();\n  const transitionDisclosure = createDisclosure();\n  const overflowDisclosure = createDisclosure();\n  const sizeDisclosure = createDisclosure();\n  const trapFocusDisclosure = createDisclosure();\n  const backdropStyleDisclosure = createDisclosure();\n\n  const [scrollBehavior, setScrollBehavior] = createSignal(\"inside\");\n\n  const [size, setSize] = createSignal<ModalProps[\"size\"]>(\"md\");\n\n  const handleSizeClick = (newSize: ModalProps[\"size\"]) => {\n    setSize(() => newSize);\n    sizeDisclosure.onOpen();\n  };\n\n  const sizes = [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"full\"];\n\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/overlay/menu\",\n    label: \"Menu\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/overlay/popover\",\n    label: \"Popover\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#block-scrolling\", label: \"Block scrolling when modal opens\", indent: true },\n    { href: \"#focus-on-specific-element\", label: \"Focus on specific element\", indent: true },\n    { href: \"#close-on-overlay-click\", label: \"Close modal on overlay click\", indent: true },\n    { href: \"#modal-vertically-centered\", label: \"Make modal vertically centered\", indent: true },\n    { href: \"#changing-transition\", label: \"Changing the transition\", indent: true },\n    { href: \"#overflow-behavior\", label: \"Modal overflow behavior\", indent: true },\n    { href: \"#modal-sizes\", label: \"Modal sizes\", indent: true },\n    { href: \"#prevent-focus-trapping\", label: \"Prevent focus trapping\", indent: true },\n    { href: \"#styling-backdrop\", label: \"Styling the backdrop\", indent: true },\n    { href: \"#accessibility\", label: \"Accessibility\" },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#modal-props\", label: \"Modal props\", indent: true },\n    { href: \"#other-components-props\", label: \"Other components props\", indent: true },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      required: true,\n      name: \"opened\",\n      description: \"If `true`, the modal will be open.\",\n      type: \"boolean\",\n    },\n    {\n      required: true,\n      name: \"onClose\",\n      description: \"Callback invoked to close the modal.\",\n      type: \"() => void\",\n    },\n    {\n      name: \"size\",\n      description: \"The size of the modal.\",\n      type: '\"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\" | \"4xl\" | \"5xl\" | \"6xl\" | \"7xl\" | \"8xl\" | \"full\"',\n      defaultValue: '\"md\"',\n    },\n    {\n      name: \"scrollBehavior\",\n      description:\n        \"Defines how scrolling should happen when content overflows beyond the viewport.\",\n      type: '\"inside\" | \"outside\"',\n      defaultValue: '\"outside\"',\n    },\n    {\n      name: \"centered\",\n      description: \"If `true`, the modal will be centered on screen.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"closeOnOverlayClick\",\n      description: \"If `true`, the modal will close when the overlay is clicked.\",\n      type: \"boolean\",\n      defaultValue: \"true\",\n    },\n    {\n      name: \"closeOnEsc\",\n      description: \"If `true`, the modal will close when the `Esc` key is pressed.\",\n      type: \"boolean\",\n      defaultValue: \"true\",\n    },\n    {\n      name: \"trapFocus\",\n      description:\n        \"If `false`, focus lock will be disabled completely. This is useful in situations where you still need to interact with other surrounding elements. Warning: We don't recommend doing this because it hurts the accessibility of the modal, based on WAI-ARIA specifications.\",\n      type: \"boolean\",\n      defaultValue: \"true\",\n    },\n    {\n      name: \"blockScrollOnMount\",\n      description: \"If `true`, scrolling will be disabled on the `body` when the modal opens.\",\n      type: \"boolean\",\n      defaultValue: \"true\",\n    },\n    {\n      name: \"motionPreset\",\n      description: \"The transition that should be used for the modal.\",\n      type: '\"fade-in-bottom\" | \"scale\" | \"none\"',\n      defaultValue: '\"scale\"',\n    },\n    {\n      name: \"initialFocus\",\n      description:\n        \"A query selector string targeting the element to receive focus when the modal opens.\",\n      type: \"string\",\n    },\n    {\n      name: \"id\",\n      description: \"The `id` of the modal dialog.\",\n      type: \"string\",\n    },\n    {\n      name: \"onOverlayClick\",\n      description: \"Callback fired when the overlay is clicked.\",\n      type: \"() => void\",\n    },\n    {\n      name: \"onEsc\",\n      description: \"Callback fired when the escape key is pressed and focus is within modal.\",\n      type: \"() => void\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Modal</PageTitle>\n      <Text mb=\"$5\">\n        A modal dialog is a window overlaid on either the primary window or another dialog window.\n        Content behind a modal dialog is inert, meaning that users cannot interact with it.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>Modal:</strong> The wrapper that provides context for its children.\n        </ListItem>\n        <ListItem>\n          <strong>ModalOverlay:</strong> The dimmed overlay behind the modal dialog.\n        </ListItem>\n        <ListItem>\n          <strong>ModalContent:</strong> The container for the modal dialog's content.\n        </ListItem>\n        <ListItem>\n          <strong>ModalHeader:</strong> The header that labels the modal dialog.\n        </ListItem>\n        <ListItem>\n          <strong>ModalBody:</strong> The wrapper that houses the modal's main content.\n        </ListItem>\n        <ListItem>\n          <strong>ModalFooter:</strong> The footer that houses the modal actions.\n        </ListItem>\n        <ListItem>\n          <strong>ModalCloseButton:</strong> The button that closes the modal.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$5\">\n        When the modal opens, focus is sent into the modal and set to the first tabbable element. If\n        there are no tabbled elements, focus is set on <Code>ModalContent</Code>.\n      </Text>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Button onClick={basicUsageDisclosure.onOpen}>Open Modal</Button>\n        <Modal opened={basicUsageDisclosure.isOpen()} onClose={basicUsageDisclosure.onClose}>\n          <ModalOverlay />\n          <ModalContent>\n            <ModalCloseButton />\n            <ModalHeader>Modal Title</ModalHeader>\n            <ModalBody>\n              <p>Some contents...</p>\n            </ModalBody>\n\n            <ModalFooter>\n              <Button onClick={basicUsageDisclosure.onClose}>Close</Button>\n            </ModalFooter>\n          </ModalContent>\n        </Modal>\n      </Preview>\n      <SectionSubtitle id=\"block-scrolling\">Block scrolling when modal opens</SectionSubtitle>\n      <Text mb=\"$5\">\n        For accessibility, it is recommended to block scrolling on the main document behind the\n        modal. Hope UI does this by default but you can set <Code>blockScrollOnMount</Code> to{\" \"}\n        <Code>false</Code> to allow scrolling behind the modal.\n      </Text>\n      <Preview snippet={snippets.blockScroll} mb=\"$10\">\n        <Button onClick={blockScrollDisclosure.onOpen}>Open Modal</Button>\n        <Modal\n          blockScrollOnMount={false}\n          opened={blockScrollDisclosure.isOpen()}\n          onClose={blockScrollDisclosure.onClose}\n        >\n          <ModalOverlay />\n          <ModalContent>\n            <ModalCloseButton />\n            <ModalHeader>Modal Title</ModalHeader>\n            <ModalBody>\n              <Text fontWeight=\"$bold\">You can scroll the content behind the modal</Text>\n            </ModalBody>\n\n            <ModalFooter>\n              <Button onClick={blockScrollDisclosure.onClose}>Close</Button>\n            </ModalFooter>\n          </ModalContent>\n        </Modal>\n      </Preview>\n      <SectionSubtitle id=\"focus-on-specific-element\">Focus on specific element</SectionSubtitle>\n      <Text mb=\"$5\">\n        Hope UI automatically sets focus on the first tabbable element in the modal. However, there\n        might be scenarios where you need to manually control where focus goes. To do this, pass a\n        CSS query selector to the <Code>initialFocus</Code> prop.\n      </Text>\n      <Preview snippet={snippets.initialFocus} mb=\"$10\">\n        <Button onClick={initialFocusDisclosure.onOpen}>Open Modal</Button>\n        <Modal\n          opened={initialFocusDisclosure.isOpen()}\n          initialFocus=\"#firstname\"\n          onClose={initialFocusDisclosure.onClose}\n        >\n          <ModalOverlay />\n          <ModalContent>\n            <ModalCloseButton />\n            <ModalHeader>Create your account</ModalHeader>\n            <ModalBody>\n              <FormControl id=\"firstname\" mb=\"$4\">\n                <FormLabel>First name</FormLabel>\n                <Input placeholder=\"First name\" />\n              </FormControl>\n              <FormControl id=\"lastname\">\n                <FormLabel>Last name</FormLabel>\n                <Input placeholder=\"Last name\" />\n              </FormControl>\n            </ModalBody>\n\n            <ModalFooter>\n              <Button onClick={initialFocusDisclosure.onClose}>Save</Button>\n            </ModalFooter>\n          </ModalContent>\n        </Modal>\n      </Preview>\n      <SectionSubtitle id=\"close-on-overlay-click\">Close modal on overlay click</SectionSubtitle>\n      <Text mb=\"$5\">\n        By default, the modal closes when you click its overlay. You can set{\" \"}\n        <Code>closeOnOverlayClick</Code> to <Code>false</Code> if you want the modal to stay\n        visible.\n      </Text>\n      <Preview snippet={snippets.closeOnOverlayClick} mb=\"$10\">\n        <Button onClick={closeOnOverlayClickDisclosure.onOpen}>Open Modal</Button>\n        <Modal\n          closeOnOverlayClick={false}\n          opened={closeOnOverlayClickDisclosure.isOpen()}\n          onClose={closeOnOverlayClickDisclosure.onClose}\n        >\n          <ModalOverlay />\n          <ModalContent>\n            <ModalCloseButton />\n            <ModalHeader>Modal Title</ModalHeader>\n            <ModalBody>\n              <p>Some contents...</p>\n            </ModalBody>\n\n            <ModalFooter>\n              <Button onClick={closeOnOverlayClickDisclosure.onClose}>Close</Button>\n            </ModalFooter>\n          </ModalContent>\n        </Modal>\n      </Preview>\n      <SectionSubtitle id=\"modal-vertically-centered\">\n        Make modal vertically centered\n      </SectionSubtitle>\n      <Text mb=\"$5\">\n        By default the modal has a vertical offset of <Code>3.75rem</Code> which you can change by\n        passing <Code>top</Code> to the <Code>ModalContent</Code>. If you need to vertically center\n        the modal, pass the <Code>centered</Code> prop.\n      </Text>\n      <Preview snippet={snippets.centered} mb=\"$6\">\n        <Button onClick={centeredDisclosure.onOpen}>Open Modal</Button>\n        <Modal centered opened={centeredDisclosure.isOpen()} onClose={centeredDisclosure.onClose}>\n          <ModalOverlay />\n          <ModalContent>\n            <ModalCloseButton />\n            <ModalHeader>Modal Title</ModalHeader>\n            <ModalBody>\n              <p>Some contents...</p>\n            </ModalBody>\n\n            <ModalFooter>\n              <Button onClick={centeredDisclosure.onClose}>Close</Button>\n            </ModalFooter>\n          </ModalContent>\n        </Modal>\n      </Preview>\n      <Alert status=\"warning\" mb=\"$10\">\n        <AlertDescription>\n          If the content within the modal overflows beyond the viewport, don't use this prop. Try\n          setting the{\" \"}\n          <Anchor href=\"#overflow-behavior\" color=\"$primary11\" fontWeight=\"$semibold\">\n            overflow behavior\n          </Anchor>{\" \"}\n          instead.\n        </AlertDescription>\n      </Alert>\n      <SectionSubtitle id=\"changing-transition\">Changing the transition</SectionSubtitle>\n      <Text mb=\"$5\">\n        The <Code>Modal</Code> comes with a scale transition by default but you can change it by\n        passing the <Code>motionPreset</Code> prop, and set its value to either{\" \"}\n        <Code>fade-in-bottom</Code>, <Code>scale</Code> or <Code>none</Code>.\n      </Text>\n      <Preview snippet={snippets.transition} mb=\"$10\">\n        <Button onClick={transitionDisclosure.onOpen}>Open Modal</Button>\n        <Modal\n          motionPreset=\"fade-in-bottom\"\n          opened={transitionDisclosure.isOpen()}\n          onClose={transitionDisclosure.onClose}\n        >\n          <ModalOverlay />\n          <ModalContent>\n            <ModalCloseButton />\n            <ModalHeader>Modal Title</ModalHeader>\n            <ModalBody>\n              <p>Some contents...</p>\n            </ModalBody>\n\n            <ModalFooter>\n              <Button onClick={transitionDisclosure.onClose}>Close</Button>\n            </ModalFooter>\n          </ModalContent>\n        </Modal>\n      </Preview>\n      <SectionSubtitle id=\"overflow-behavior\">Modal overflow behavior</SectionSubtitle>\n      <Text mb=\"$3\">\n        If the content within the modal overflows beyond the viewport, you can use the\n        <Code>scrollBehavior</Code> to control how scrolling should happen.\n      </Text>\n      <UnorderedList spacing=\"$2\" mb=\"$5\">\n        <ListItem>\n          If set to <Code>inside</Code>, scroll only occurs within the <Code>ModalBody</Code>.\n        </ListItem>\n        <ListItem>\n          If set to <Code>outside</Code>, the entire <Code>ModalContent</Code> will scroll within\n          the viewport.\n        </ListItem>\n      </UnorderedList>\n      <Preview snippet={snippets.overflow} mb=\"$10\">\n        <RadioGroup value={scrollBehavior()} onChange={setScrollBehavior}>\n          <HStack spacing=\"$4\" mb=\"$4\">\n            <Radio value=\"inside\">Inside</Radio>\n            <Radio value=\"outside\">Outside</Radio>\n          </HStack>\n        </RadioGroup>\n        <Button onClick={overflowDisclosure.onOpen}>Open Modal</Button>\n        <Modal\n          scrollBehavior={scrollBehavior() as ModalProps[\"scrollBehavior\"]}\n          opened={overflowDisclosure.isOpen()}\n          onClose={overflowDisclosure.onClose}\n        >\n          <ModalOverlay />\n          <ModalContent>\n            <ModalCloseButton />\n            <ModalHeader>Modal Title</ModalHeader>\n            <ModalBody>\n              <p>\n                Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quos blanditiis accusamus\n                in praesentium dolorem, sunt quia sit sequi minima maxime? Eius natus, aut omnis\n                deserunt nostrum fugiat! Totam magni sapiente maxime maiores aut doloremque veniam\n                excepturi, id quae veritatis est omnis, nesciunt ipsum, voluptate adipisci nam sed\n                ea inventore facere nulla optio aliquid? Aliquid iure, optio et fuga quo dicta\n                ratione impedit praesentium mollitia maiores ipsa, magni sapiente reiciendis\n                perspiciatis. Molestiae quisquam eveniet aliquam consequatur accusantium quasi ut\n                sint animi reiciendis. Suscipit numquam commodi fuga provident? Voluptatem dicta\n                exercitationem nemo beatae cum consequuntur pariatur quidem magni sed tempore. Eaque\n                itaque totam quae incidunt quidem officia atque libero placeat? Obcaecati, ullam\n                dolores velit sequi magni animi inventore earum error maiores et, sunt numquam illo\n                fugiat ducimus in aspernatur possimus minus, placeat blanditiis alias. Deleniti\n                corrupti eaque debitis adipisci, doloremque rerum temporibus saepe error! Fugiat\n                inventore possimus doloribus, nemo qui, nostrum alias non tempora nam itaque quae\n                maiores tempore, quasi blanditiis incidunt aut. Sapiente sit distinctio adipisci.\n                Consectetur numquam ratione facere fuga ipsum quasi aliquam velit illum iure\n                consequuntur, repellat cumque quibusdam dolorem asperiores perspiciatis ducimus.\n                Quod earum alias nihil voluptate inventore dolores mollitia natus saepe esse. Aut\n                assumenda nulla maxime recusandae nihil iusto dicta commodi pariatur veritatis?\n                Impedit nam deserunt optio aspernatur praesentium totam illum facere id\n                exercitationem veniam eveniet vitae obcaecati minima, similique rerum suscipit\n                dolorum tempora perferendis voluptatem ex ipsam! Ut ea, sapiente cum, adipisci ab\n                voluptatem enim, explicabo illo sunt exercitationem ipsum doloribus? Consectetur\n                impedit voluptatibus culpa aperiam facere, animi placeat ea corrupti quidem\n                repellendus sed saepe accusamus autem delectus enim, in soluta minus laboriosam\n                adipisci! Numquam quod dolorem eum tempora totam, assumenda nostrum eligendi aliquam\n                rerum dignissimos autem quo. Qui fugit, aperiam sequi quis exercitationem quisquam\n                nobis facilis debitis placeat quia temporibus distinctio maiores animi nisi\n                voluptatum accusamus laudantium non dolore? Dolorem eum vitae modi ipsam quibusdam\n                tempora natus obcaecati in, expedita fugit. Explicabo quae accusantium porro unde\n                dolores maxime ullam optio enim quibusdam fugit veritatis excepturi ad, molestias\n                natus tenetur esse rerum et ab rem cupiditate, dicta aspernatur corrupti deleniti\n                iste. Aspernatur repellendus, voluptates omnis, hic quod minima laudantium officiis\n                aliquam quasi voluptatibus voluptatum provident soluta suscipit ea illum amet fugit\n                blanditiis velit exercitationem assumenda inventore rerum nihil! Inventore\n                reprehenderit distinctio non veniam eum beatae nihil reiciendis nemo est molestias\n                qui, dolorum praesentium explicabo id culpa nostrum repudiandae recusandae! Vero ut\n                placeat, fugiat, aliquam quos omnis similique temporibus iusto nulla non rerum\n                repellat repudiandae illum sit sapiente. Iusto et qui eaque odit eum culpa ipsa,\n                libero, perspiciatis voluptatem quaerat aperiam assumenda. Architecto minus\n                doloremque sed numquam aperiam, ratione dolorem dolores odio obcaecati quis nemo sit\n                delectus voluptatum possimus ad maxime et officia minima nulla illum eum quos\n                molestiae laboriosam. Nihil harum voluptates, ea consequatur tenetur, nulla\n                explicabo fugiat earum veritatis doloribus maxime deleniti nostrum quos praesentium\n                voluptate commodi quas assumenda fuga et placeat? Quam repudiandae, tempore\n                consequuntur aperiam itaque in omnis et ut unde, temporibus alias maiores\n                distinctio, nihil culpa. Fugiat quasi quisquam eaque facilis totam.\n              </p>\n            </ModalBody>\n\n            <ModalFooter>\n              <Button onClick={overflowDisclosure.onClose}>Close</Button>\n            </ModalFooter>\n          </ModalContent>\n        </Modal>\n      </Preview>\n      <SectionSubtitle id=\"modal-sizes\">Modal sizes</SectionSubtitle>\n      <Text mb=\"$5\">\n        Pass the <Code>size</Code> prop if you need to adjust the size of the modal. Values can be{\" \"}\n        <Code>xs</Code>, <Code>sm</Code>, <Code>md</Code>, <Code>lg</Code>, <Code>xl...8xl</Code>,\n        or <Code>full</Code>.\n      </Text>\n      <Preview snippet={snippets.sizes} mb=\"$10\">\n        <For each={sizes}>\n          {size => (\n            <Button\n              onClick={() => handleSizeClick(size as ModalProps[\"size\"])}\n              m=\"$4\"\n            >{`Open ${size} Modal`}</Button>\n          )}\n        </For>\n\n        <Modal opened={sizeDisclosure.isOpen()} size={size()} onClose={sizeDisclosure.onClose}>\n          <ModalOverlay />\n          <ModalContent>\n            <ModalCloseButton />\n            <ModalHeader>Modal Title</ModalHeader>\n            <ModalBody>\n              <p>Some contents...</p>\n            </ModalBody>\n            <ModalFooter>\n              <Button onClick={sizeDisclosure.onClose}>Close</Button>\n            </ModalFooter>\n          </ModalContent>\n        </Modal>\n      </Preview>\n      <SectionSubtitle id=\"prevent-focus-trapping\">Prevent focus trapping</SectionSubtitle>\n      <Text mb=\"$5\">\n        By default the modal and drawer locks the focus inside them. Normally this is what you want\n        to maintain accessibility standards.\n      </Text>\n      <Text mb=\"$5\">\n        <strong>While strongly discourage this use case</strong> due to the accessibility impacts,\n        there are certain situations where you might not want the modal to trap focus.\n      </Text>\n      <Text mb=\"$5\">\n        To prevent focus trapping, pass <Code>trapFocus</Code> and set its value to{\" \"}\n        <Code>false</Code>.\n      </Text>\n      <Preview snippet={snippets.trapFocus} mb=\"$10\">\n        <Button onClick={trapFocusDisclosure.onOpen}>Open Modal</Button>\n        <Modal\n          trapFocus={false}\n          opened={trapFocusDisclosure.isOpen()}\n          onClose={trapFocusDisclosure.onClose}\n        >\n          <ModalOverlay />\n          <ModalContent>\n            <ModalCloseButton />\n            <ModalHeader>Modal Title</ModalHeader>\n            <ModalBody>\n              <Text fontWeight=\"$bold\">You can focus on the content behind the modal</Text>\n            </ModalBody>\n            <ModalFooter>\n              <Button onClick={trapFocusDisclosure.onClose}>Close</Button>\n            </ModalFooter>\n          </ModalContent>\n        </Modal>\n      </Preview>\n      <SectionSubtitle id=\"styling-backdrop\">Styling the backdrop</SectionSubtitle>\n      <Text mb=\"$5\">\n        The backdrop's background by default is set to <Code>$blackAlpha11</Code>, but if you want\n        to achieve a different style you can use style props.\n      </Text>\n      <Preview snippet={snippets.backdropStyle} mb=\"$6\">\n        <Button onClick={backdropStyleDisclosure.onOpen}>Open Modal</Button>\n        <Modal opened={backdropStyleDisclosure.isOpen()} onClose={backdropStyleDisclosure.onClose}>\n          <ModalOverlay\n            bg=\"$blackAlpha3\"\n            css={{\n              backdropFilter: \"blur(10px) hue-rotate(90deg)\",\n            }}\n          />\n          <ModalContent>\n            <ModalCloseButton />\n            <ModalHeader>Modal Title</ModalHeader>\n            <ModalBody>\n              <p>Some contents...</p>\n            </ModalBody>\n            <ModalFooter>\n              <Button onClick={backdropStyleDisclosure.onClose}>Close</Button>\n            </ModalFooter>\n          </ModalContent>\n        </Modal>\n      </Preview>\n      <Alert status=\"warning\" mb=\"$12\">\n        <AlertDescription>\n          Please be aware that not every browser supports the <Code>backdrop-filter</Code> CSS\n          property, used in the example above.\n        </AlertDescription>\n      </Alert>\n      <SectionTitle id=\"accessibility\">Accessibility</SectionTitle>\n      <SectionSubtitle>ARIA roles and attributes</SectionSubtitle>\n      <UnorderedList spacing=\"$2\" mb=\"$8\">\n        <ListItem>\n          The <Code>ModalContent</Code> has <Code>aria-modal</Code> set to <Code>true</Code>.\n        </ListItem>\n        <ListItem>\n          The <Code>ModalContent</Code> has <Code>aria-labelledby</Code> set to the <Code>id</Code>{\" \"}\n          of the <Code>ModalHeader</Code>.\n        </ListItem>\n        <ListItem>\n          The <Code>ModalContent</Code> has <Code>aria-describedby</Code> set to the <Code>id</Code>{\" \"}\n          of the <Code>ModalBody</Code>.\n        </ListItem>\n      </UnorderedList>\n      <SectionSubtitle>Keyboard support and Focus management</SectionSubtitle>\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>When the modal opens, focus is trapped within it.</ListItem>\n        <ListItem>\n          When the modal opens, focus is automatically set to the first enabled element, or the\n          element from <Code>initialFocus</Code>.\n        </ListItem>\n        <ListItem>Clicking on the overlay closes the Modal.</ListItem>\n        <ListItem>\n          Pressing <Kbd>esc</Kbd> closes the Modal.\n        </ListItem>\n        <ListItem>Scrolling is blocked on the elements behind the modal.</ListItem>\n        <ListItem>\n          The modal is rendered in a portal attached to the end of <Code>document.body</Code> to\n          break it out of the source order.\n        </ListItem>\n      </UnorderedList>\n\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Modal</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"modal-props\">Modal props</SectionSubtitle>\n      <PropsTable items={propItems} mb=\"$10\" />\n      <SectionSubtitle id=\"other-components-props\">Other components props</SectionSubtitle>\n      <UnorderedList spacing=\"$2\">\n        <ListItem>\n          <Code>ModalOverlay</Code>, <Code>ModalContent</Code>, <Code>ModalHeader</Code>,{\" \"}\n          <Code>ModalBody</Code> and <Code>ModalFooter</Code> composes{\" \"}\n          <Anchor as={Link} href=\"/docs/layout/box\" color=\"$primary11\" fontWeight=\"$semibold\">\n            Box\n          </Anchor>\n          .\n        </ListItem>\n        <ListItem>\n          <Code>ModalCloseButton</Code> composes{\" \"}\n          <Anchor\n            as={Link}\n            href=\"/docs/others/close-button\"\n            color=\"$primary11\"\n            fontWeight=\"$semibold\"\n          >\n            CloseButton\n          </Anchor>\n          .\n        </ListItem>\n      </UnorderedList>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/overlay/modal/snippets.ts",
    "content": "const importComponent = `import { \n  Modal,\n  ModalBody,\n  ModalCloseButton,\n  ModalContent,\n  ModalFooter,\n  ModalHeader,\n  ModalOverlay,\n} from \"@hope-ui/solid\"`;\n\nconst basicUsage = `function ModalExample() {\n  const { isOpen, onOpen, onClose } = createDisclosure()\n\n  return (\n    <>\n      <Button onClick={onOpen}>Open Modal</Button>\n      <Modal opened={isOpen()} onClose={onClose}>\n        <ModalOverlay />\n        <ModalContent>\n          <ModalCloseButton />\n          <ModalHeader>Modal Title</ModalHeader>\n          <ModalBody>\n            <p>Some contents...</p>\n          </ModalBody>\n          <ModalFooter>\n            <Button onClick={onClose}>Close</Button>\n          </ModalFooter>\n        </ModalContent>\n      </Modal>\n    </>\n  )\n}`;\n\nconst blockScroll = `function BlockScrollExample() {\n  const { isOpen, onOpen, onClose } = createDisclosure()\n\n  return (\n    <>\n      <Button onClick={onOpen}>Open Modal</Button>\n      <Modal\n        blockScrollOnMount={false}\n        opened={isOpen()}\n        onClose={onClose}\n      >\n        <ModalOverlay />\n        <ModalContent>\n          <ModalCloseButton />\n          <ModalHeader>Modal Title</ModalHeader>\n          <ModalBody>\n            <Text fontWeight=\"$bold\">\n              You can scroll the content behind the modal\n            </Text>\n          </ModalBody>\n          <ModalFooter>\n            <Button onClick={onClose}>Close</Button>\n          </ModalFooter>\n        </ModalContent>\n      </Modal>\n    </>\n  )\n}`;\n\nconst initialFocus = `function InitialFocusExample() {\n  const { isOpen, onOpen, onClose } = createDisclosure()\n\n  return (\n    <>\n      <Button onClick={onOpen}>Open Modal</Button>\n      <Modal\n        opened={isOpen()}\n        initialFocus=\"#firstname\"  // Focus on the element with id \\`firstname\\`\n        onClose={onClose}\n      >\n        <ModalOverlay />\n        <ModalContent>\n          <ModalCloseButton />\n          <ModalHeader>Create your account</ModalHeader>\n          <ModalBody>\n            <FormControl id=\"firstname\" mb=\"$4\">\n              <FormLabel>First name</FormLabel>\n              <Input placeholder=\"First name\" />\n            </FormControl>\n            <FormControl id=\"lastname\">\n              <FormLabel>Last name</FormLabel>\n              <Input placeholder=\"Last name\" />\n            </FormControl>\n          </ModalBody>\n          <ModalFooter>\n            <Button onClick={onClose}>Save</Button>\n          </ModalFooter>\n        </ModalContent>\n      </Modal>\n    </>\n  )\n}`;\n\nconst closeOnOverlayClick = `function CloseOnOverlayClickExample() {\n  const { isOpen, onOpen, onClose } = createDisclosure()\n\n  return (\n    <>\n      <Button onClick={onOpen}>Open Modal</Button>\n      <Modal\n        closeOnOverlayClick={false}\n        opened={isOpen()}\n        onClose={onClose}\n      >\n        <ModalOverlay />\n        <ModalContent>\n          <ModalCloseButton />\n          <ModalHeader>Modal Title</ModalHeader>\n          <ModalBody>\n            <p>Some contents...</p>\n          </ModalBody>\n          <ModalFooter>\n            <Button onClick={onClose}>Close</Button>\n          </ModalFooter>\n        </ModalContent>\n      </Modal>\n    </>\n  )\n}`;\n\nconst centered = `function CenteredExample() {\n  const { isOpen, onOpen, onClose } = createDisclosure()\n\n  return (\n    <>\n      <Button onClick={onOpen}>Open Modal</Button>\n      <Modal centered opened={isOpen()} onClose={onClose}>\n        <ModalOverlay />\n        <ModalContent>\n          <ModalCloseButton />\n          <ModalHeader>Modal Title</ModalHeader>\n          <ModalBody>\n            <p>Some contents...</p>\n          </ModalBody>\n          <ModalFooter>\n            <Button onClick={onClose}>Close</Button>\n          </ModalFooter>\n        </ModalContent>\n      </Modal>\n    </>\n  )\n}`;\n\nconst transition = `function TransitionExample() {\n  const { isOpen, onOpen, onClose } = createDisclosure()\n\n  return (\n    <>\n      <Button onClick={onOpen}>Open Modal</Button>\n      <Modal \n        motionPreset=\"fade-in-bottom\" \n        opened={isOpen()} \n        onClose={onClose}\n      >\n        <ModalOverlay />\n        <ModalContent>\n          <ModalCloseButton />\n          <ModalHeader>Modal Title</ModalHeader>\n          <ModalBody>\n            <p>Some contents...</p>\n          </ModalBody>\n          <ModalFooter>\n            <Button onClick={onClose}>Close</Button>\n          </ModalFooter>\n        </ModalContent>\n      </Modal>\n    </>\n  )\n}`;\n\nconst overflow = `function OverflowExample() {\n  const [scrollBehavior, setScrollBehavior] = createSignal(\"inside\");\n  const { isOpen, onOpen, onClose } = createDisclosure()\n\n  return (\n    <>\n      <RadioGroup value={scrollBehavior()} onChange={setScrollBehavior}>\n        <HStack spacing=\"$4\" mb=\"$4\">\n          <Radio value=\"inside\">Inside</Radio>\n          <Radio value=\"outside\">Outside</Radio>\n        </HStack>\n      </RadioGroup>\n\n      <Button onClick={onOpen}>Open Modal</Button>\n      <Modal \n        scrollBehavior={scrollBehavior()}\n        opened={isOpen()} \n        onClose={onClose}\n      >\n        <ModalOverlay />\n        <ModalContent>\n          <ModalCloseButton />\n          <ModalHeader>Modal Title</ModalHeader>\n          <ModalBody>\n            <p>Lorem ipsum...</p>\n          </ModalBody>\n          <ModalFooter>\n            <Button onClick={onClose}>Close</Button>\n          </ModalFooter>\n        </ModalContent>\n      </Modal>\n    </>\n  )\n}`;\n\nconst sizes = `function SizeExample() {\n  const [size, setSize] = createSignal<ModalProps[\"size\"]>(\"md\");\n  const { isOpen, onOpen, onClose } = createDisclosure()\n\n  const handleClick = (newSize) => {\n    setSize(newSize)\n    onOpen()\n  }\n\n  const sizes = ['xs', 'sm', 'md', 'lg', 'xl', 'full']\n\n  return (\n    <>\n      <For each={sizes}>\n        {size => (\n          <Button \n            onClick={() => handleClick(size)} \n            m=\"$4\"\n          >\n            {\\`Open \\${size} Modal\\`}\n          </Button>\n        )}\n      </For>\n\n      <Modal size={size()} opened={isOpen()} onClose={onClose}>\n        <ModalOverlay />\n        <ModalContent>\n          <ModalCloseButton />\n          <ModalHeader>Modal Title</ModalHeader>\n          <ModalBody>\n            <p>Some contents...</p>\n          </ModalBody>\n          <ModalFooter>\n            <Button onClick={onClose}>Close</Button>\n          </ModalFooter>\n        </ModalContent>\n      </Modal>\n    </>\n  )\n}`;\n\nconst trapFocus = `function TrapFocusExample() {\n  const { isOpen, onOpen, onClose } = createDisclosure()\n\n  return (\n    <>\n      <Button onClick={onOpen}>Open Modal</Button>\n      <Modal \n        trapFocus={false}\n        opened={isOpen()} \n        onClose={onClose}\n      >\n        <ModalOverlay />\n        <ModalContent>\n          <ModalCloseButton />\n          <ModalHeader>Modal Title</ModalHeader>\n          <ModalBody>\n            <Text fontWeight=\"$bold\">\n              You can focus on the content behind the modal\n            </Text>\n          </ModalBody>\n          <ModalFooter>\n            <Button onClick={onClose}>Close</Button>\n          </ModalFooter>\n        </ModalContent>\n      </Modal>\n    </>\n  )\n}`;\n\nconst backdropStyle = `function BackdropStyleExample() {\n  const { isOpen, onOpen, onClose } = createDisclosure()\n\n  return (\n    <>\n      <Button onClick={onOpen}>Open Modal</Button>\n      <Modal opened={isOpen()} onClose={onClose}>\n        <ModalOverlay\n          bg=\"$blackAlpha3\"\n          css={{\n            backdropFilter: \"blur(10px) hue-rotate(90deg)\",\n          }}\n        />\n        <ModalContent>\n          <ModalCloseButton />\n          <ModalHeader>Modal Title</ModalHeader>\n          <ModalBody>\n            <p>Some contents...</p>\n          </ModalBody>\n          <ModalFooter>\n            <Button onClick={onClose}>Close</Button>\n          </ModalFooter>\n        </ModalContent>\n      </Modal>\n    </>\n  )\n}`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Modal: {\n      baseStyle: {\n        overlay: SystemStyleObject,\n        content: SystemStyleObject,\n        closeButton: SystemStyleObject,\n        header: SystemStyleObject,\n        body: SystemStyleObject,\n        footer: SystemStyleObject\n      },\n      defaultProps: {\n        root: ThemeableModalOptions,\n        closeButton: ThemeableCloseButtonOptions\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  blockScroll,\n  initialFocus,\n  closeOnOverlayClick,\n  centered,\n  transition,\n  overflow,\n  sizes,\n  trapFocus,\n  backdropStyle,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/overlay/popover/index.tsx",
    "content": "import {\n  Alert,\n  AlertDescription,\n  AlertTitle,\n  Anchor,\n  Box,\n  Button,\n  ButtonGroup,\n  createDisclosure,\n  HStack,\n  IconButton,\n  Input,\n  Kbd,\n  ListItem,\n  Popover,\n  PopoverAnchor,\n  PopoverArrow,\n  PopoverBody,\n  PopoverCloseButton,\n  PopoverContent,\n  PopoverFooter,\n  PopoverHeader,\n  PopoverTrigger,\n  Text,\n  UnorderedList,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Link } from \"solid-app-router\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { IconMenu } from \"@/icons/IconMenu\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function PopoverDoc() {\n  const { isOpen, onClose, onToggle } = createDisclosure();\n\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/overlay/modal\",\n    label: \"Modal\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/overlay/tooltip\",\n    label: \"Tooltip\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#trigger-mode\", label: \"Trigger mode\", indent: true },\n    { href: \"#initial-focus\", label: \"Initial focus\", indent: true },\n    { href: \"#focus-trap\", label: \"Trapping focus within popover\", indent: true },\n    { href: \"#popover-placement\", label: \"Popover placement\", indent: true },\n    { href: \"#popover-anchor\", label: \"Popover anchor\", indent: true },\n    { href: \"#accessing-internal-state\", label: \"Accessing internal state\", indent: true },\n    { href: \"#controlled-popover\", label: \"Controlled popover\", indent: true },\n    { href: \"#composition\", label: \"Composition\" },\n    { href: \"#accessibility\", label: \"Accessibility\" },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n    { href: \"#popover-props\", label: \"Popover props\", indent: true },\n    { href: \"#other-components-props\", label: \"Other components props\", indent: true },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"placement\",\n      description: \"Placement of the popover.\",\n      type: \"Placement\",\n      defaultValue: \"bottom\",\n    },\n    {\n      name: \"offset\",\n      description: \"Offset between the popover and the reference (trigger) element.\",\n      type: \"number\",\n      defaultValue: \"8\",\n    },\n    {\n      name: \"shiftPadding\",\n      description:\n        \"The amount of padding to apply when the popover might go off screen. @see https://floating-ui.com/docs/shift.\",\n      type: \"number\",\n    },\n    {\n      name: \"id\",\n      description: \"The id of the popover content.\",\n      type: \"string\",\n    },\n    {\n      name: \"opened\",\n      description: \"If `true`, the popover will be shown (in controlled mode).\",\n      type: \"boolean\",\n    },\n    {\n      name: \"defaultOpened\",\n      description: \"If `true`, the popover will be initially shown (in uncontrolled mode).\",\n      type: \"boolean\",\n    },\n    {\n      name: \"triggerMode\",\n      description:\n        \"The interaction that triggers the popover. `hover` means the popover will open when you hover with mouse or focus with keyboard on the popover trigger. `click` means the popover will open on click or press `Enter` to `Space` on keyboard.\",\n      type: '\"hover\" | \"click\"',\n      defaultValue: '\"click\"',\n    },\n    {\n      name: \"inline\",\n      description:\n        \"If `true`, apply floating-ui `inline` middleware. Useful for inline reference elements that span over multiple lines, such as hyperlinks or range selections.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"arrowPadding\",\n      description: \"The padding between the arrow and the edges of the popover.\",\n      type: \"number\",\n      defaultValue: \"8\",\n    },\n    {\n      name: \"openDelay\",\n      description: \"Delay (in ms) before showing the popover.\",\n      type: \"number\",\n      defaultValue: \"0\",\n    },\n    {\n      name: \"closeDelay\",\n      description: \"Delay (in ms) before hiding the popover.\",\n      type: \"number\",\n      defaultValue: \"100\",\n    },\n    {\n      name: \"closeOnBlur\",\n      description:\n        \"If `true`, the popover will close when the user blur out it by clicking outside or tabbing out.\",\n      type: \"boolean\",\n      defaultValue: \"true\",\n    },\n    {\n      name: \"closeOnEsc\",\n      description: \"If `true`, the popover will close when the user hit the `Esc` key.\",\n      type: \"boolean\",\n      defaultValue: \"true\",\n    },\n    {\n      name: \"trapFocus\",\n      description: \"If `true`, the focus will be locked into the popover.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"initialFocus\",\n      description:\n        \"A query selector string targeting the element to receive focus when the popover opens.\",\n      type: \"string\",\n    },\n    {\n      name: \"motionPreset\",\n      description: \"Popover opening/closing transition.\",\n      type: \"PopoverMotionPreset\",\n      defaultValue: '\"scale\"',\n    },\n    {\n      name: \"children\",\n      description: \"Children of the popover.\",\n      type: \"JSX.Element | PopoverChildrenRenderProp\",\n    },\n    {\n      name: \"onOpen\",\n      description: \"Callback fired when the popover opens.\",\n      type: \"() => void\",\n    },\n    {\n      name: \"onClose\",\n      description: \"Callback fired when the popover closes.\",\n      type: \"() => void\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Popover</PageTitle>\n      <Text mb=\"$5\">\n        Popover is a non-modal dialog that floats around a trigger. It is used to display contextual\n        information to the user, and should be paired with a clickable trigger element.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$6\" />\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          <strong>Popover:</strong> The wrapper that provides props, state, and context to its\n          children.\n        </ListItem>\n        <ListItem>\n          <strong>PopoverTrigger:</strong> The component that opens/closes the popover.\n        </ListItem>\n        <ListItem>\n          <strong>PopoverAnchor:</strong> The component to use as positioning reference instead of\n          the trigger.\n        </ListItem>\n        <ListItem>\n          <strong>PopoverContent:</strong> The popover itself.\n        </ListItem>\n        <ListItem>\n          <strong>PopoverArrow:</strong> A visual arrow that points to the reference (trigger or\n          anchor) element.\n        </ListItem>\n        <ListItem>\n          <strong>PopoverCloseButton:</strong> A button to close the popover.\n        </ListItem>\n        <ListItem>\n          <strong>PopoverHeader:</strong> The header of the popover.\n        </ListItem>\n        <ListItem>\n          <strong>PopoverBody:</strong> The body of the popover.\n        </ListItem>\n        <ListItem>\n          <strong>PopoverFooter:</strong> The footer of the popover.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>PopoverTrigger</Code> renders an unstyled <Code>button</Code> by default. For\n        accessiblity reason, when using the <Code>as</Code> prop ensure the element passed in is\n        focusable.\n      </Text>\n      <Preview snippet={snippets.basicUsage} mb=\"$6\">\n        <Popover>\n          <PopoverTrigger as={Button} variant=\"subtle\" colorScheme=\"neutral\">\n            Trigger\n          </PopoverTrigger>\n          <PopoverContent>\n            <PopoverArrow />\n            <PopoverCloseButton />\n            <PopoverHeader>Confirmation!</PopoverHeader>\n            <PopoverBody>Are you sure you want to have that milkshake?</PopoverBody>\n          </PopoverContent>\n        </Popover>\n      </Preview>\n      <Alert status=\"warning\" mb=\"$10\">\n        <AlertTitle>Accessibility:</AlertTitle>\n        <AlertDescription ml=\"$2\">\n          When the popover opens, focus is sent to <Code>PopoverContent</Code>.\n        </AlertDescription>\n      </Alert>\n      <SectionSubtitle id=\"trigger-mode\">Trigger mode</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>triggerMode</Code> prop to change the way of opening the popover. You can set\n        the value to <Code>hover</Code> or <Code>click</Code>.\n      </Text>\n      <Preview snippet={snippets.triggerOnHover} mb=\"$10\">\n        <Popover triggerMode=\"hover\">\n          <PopoverTrigger as={Button} variant=\"subtle\" colorScheme=\"neutral\">\n            Trigger\n          </PopoverTrigger>\n          <PopoverContent>\n            <PopoverArrow />\n            <PopoverCloseButton />\n            <PopoverHeader>Confirmation!</PopoverHeader>\n            <PopoverBody>Are you sure you want to have that milkshake?</PopoverBody>\n          </PopoverContent>\n        </Popover>\n      </Preview>\n      <SectionSubtitle id=\"initial-focus\">Initial focus</SectionSubtitle>\n      <Text mb=\"$5\">\n        By default, focus is sent to <Code>PopoverContent</Code> when it opens. Use the{\" \"}\n        <Code>initialFocus</Code> prop to send focus to a specific element instead.\n      </Text>\n      <Preview snippet={snippets.initialFocus} mb=\"$10\">\n        <Popover initialFocus=\"#next\">\n          <PopoverTrigger as={Button} variant=\"subtle\" colorScheme=\"neutral\">\n            Trigger\n          </PopoverTrigger>\n          <PopoverContent maxW=\"$sm\">\n            <PopoverHeader border=\"0\">Running the app</PopoverHeader>\n            <PopoverArrow />\n            <PopoverCloseButton />\n            <PopoverBody>To start the development server run npm start command</PopoverBody>\n            <PopoverFooter\n              border=\"0\"\n              d=\"flex\"\n              alignItems=\"center\"\n              justifyContent=\"space-between\"\n              pb=\"$4\"\n            >\n              <Box fontSize=\"$sm\">Step 2 of 4</Box>\n              <ButtonGroup size=\"sm\">\n                <Button colorScheme=\"neutral\" variant=\"subtle\">\n                  Previous\n                </Button>\n                <Button id=\"next\" colorScheme=\"info\">\n                  Next\n                </Button>\n              </ButtonGroup>\n            </PopoverFooter>\n          </PopoverContent>\n        </Popover>\n      </Preview>\n      <SectionSubtitle id=\"focus-trap\">Trapping focus within popover</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>trapFocus</Code> prop to lock focus inside the <Code>PopoverContent</Code>.\n      </Text>\n      <Preview snippet={snippets.focusTrap} mb=\"$10\">\n        <Popover trapFocus>\n          <PopoverTrigger as={Button} variant=\"subtle\" colorScheme=\"neutral\">\n            Trigger\n          </PopoverTrigger>\n          <PopoverContent maxW=\"$sm\">\n            <PopoverHeader border=\"0\">Running the app</PopoverHeader>\n            <PopoverArrow />\n            <PopoverCloseButton />\n            <PopoverBody>To start the development server run npm start command</PopoverBody>\n            <PopoverFooter\n              border=\"0\"\n              d=\"flex\"\n              alignItems=\"center\"\n              justifyContent=\"space-between\"\n              pb=\"$4\"\n            >\n              <Box fontSize=\"$sm\">Step 2 of 4</Box>\n              <ButtonGroup size=\"sm\">\n                <Button colorScheme=\"neutral\" variant=\"subtle\">\n                  Previous\n                </Button>\n                <Button colorScheme=\"info\">Next</Button>\n              </ButtonGroup>\n            </PopoverFooter>\n          </PopoverContent>\n        </Popover>\n      </Preview>\n      <SectionSubtitle id=\"popover-placement\">Popover placement</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>placement</Code> prop to set the preferred popover placement. You can set the\n        value to <Code>top</Code>, <Code>right</Code>, <Code>left</Code>, <Code>bottom</Code> and\n        their <Code>-start</Code> or <Code>-end</Code> variants.\n      </Text>\n      <Preview snippet={snippets.placement} mb=\"$6\">\n        <Popover placement=\"top-start\">\n          <PopoverTrigger as={Button} variant=\"subtle\" colorScheme=\"neutral\">\n            Trigger\n          </PopoverTrigger>\n          <PopoverContent>\n            <PopoverArrow />\n            <PopoverCloseButton />\n            <PopoverHeader>Confirmation!</PopoverHeader>\n            <PopoverBody>Are you sure you want to have that milkshake?</PopoverBody>\n          </PopoverContent>\n        </Popover>\n      </Preview>\n      <Alert status=\"warning\" mb=\"$10\">\n        <AlertDescription>\n          Even though you specified the placement, Popover will try to reposition itself in the\n          event that available space at the specified placement isn't enough.\n        </AlertDescription>\n      </Alert>\n      <SectionSubtitle id=\"popover-anchor\">Popover anchor</SectionSubtitle>\n      <Text mb=\"$3\">\n        Use the <Code>PopoverAnchor</Code> component if you want to use a different element for the\n        popover positioning reference.\n      </Text>\n      <Text mb=\"$5\">\n        In the example below, the <Code>Button</Code> is the trigger that opens/closes the popover\n        and the <Code>Input</Code> is the reference element that the popover will position relative\n        to.\n      </Text>\n      <Preview snippet={snippets.anchor} mb=\"$10\">\n        <Popover>\n          <HStack spacing=\"$2\">\n            <PopoverAnchor\n              as={Input}\n              w=\"auto\"\n              display=\"inline-flex\"\n              placeholder=\"I am the anchor\"\n            />\n            <PopoverTrigger as={Button}>Trigger</PopoverTrigger>\n          </HStack>\n          <PopoverContent>\n            <PopoverArrow />\n            <PopoverCloseButton />\n            <PopoverHeader>Confirmation!</PopoverHeader>\n            <PopoverBody>Are you sure you want to have that milkshake?</PopoverBody>\n          </PopoverContent>\n        </Popover>\n      </Preview>\n      <SectionSubtitle id=\"accessing-internal-state\">Accessing internal state</SectionSubtitle>\n      <Text mb=\"$5\">\n        Popover provides access to its internal state <Code>opened</Code> state and an{\" \"}\n        <Code>onClose</Code> method that you can access via a render prop.\n      </Text>\n      <Preview snippet={snippets.internalState} mb=\"$10\">\n        <Popover closeOnBlur={false} placement=\"left\" initialFocus=\"#close-btn\">\n          {({ opened, onClose }) => (\n            <>\n              <PopoverTrigger as={Button} variant=\"subtle\" colorScheme=\"neutral\">\n                Click to {opened() ? \"close\" : \"open\"}\n              </PopoverTrigger>\n              <PopoverContent>\n                <PopoverHeader>This is the header</PopoverHeader>\n                <PopoverCloseButton />\n                <PopoverBody>\n                  <Box>Hello. Nice to meet you! This is the body of the popover</Box>\n                  <Button id=\"close-btn\" mt=\"$4\" colorScheme=\"info\" onClick={onClose}>\n                    Close\n                  </Button>\n                </PopoverBody>\n                <PopoverFooter>This is the footer</PopoverFooter>\n              </PopoverContent>\n            </>\n          )}\n        </Popover>\n      </Preview>\n      <SectionSubtitle id=\"controlled-popover\">Controlled popover</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>opened</Code> and <Code>onClose</Code> props to control the opening and\n        closing of the popover.\n      </Text>\n      <Preview snippet={snippets.controlled} mb=\"$12\">\n        <Button variant=\"subtle\" colorScheme=\"neutral\" mr=\"$2\" onClick={onToggle}>\n          Trigger\n        </Button>\n        <Popover placement=\"right\" closeOnBlur={false} opened={isOpen()} onClose={onClose}>\n          <PopoverTrigger as={Button}>Popover Target</PopoverTrigger>\n          <PopoverContent>\n            <PopoverArrow />\n            <PopoverCloseButton />\n            <PopoverHeader>Confirmation!</PopoverHeader>\n            <PopoverBody>Are you sure you want to have that milkshake?</PopoverBody>\n          </PopoverContent>\n        </Popover>\n      </Preview>\n      <SectionTitle id=\"composition\">Composition</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Popover</Code> is made up of several components that you can customize to achieve your\n        desired design.\n      </Text>\n      <Preview snippet={snippets.composition} mb=\"$12\">\n        <Popover offset={24}>\n          <PopoverTrigger\n            as={IconButton}\n            icon={<IconMenu />}\n            aria-label=\"trigger\"\n            variant=\"outline\"\n            colorScheme=\"accent\"\n          />\n          <PopoverContent borderColor=\"$accent3\" bg=\"$accent3\" color=\"$accent11\" maxW=\"$sm\">\n            <PopoverHeader fontWeight=\"$semibold\" border=\"none\" pb=\"0\">\n              Confirmation!\n            </PopoverHeader>\n            <PopoverArrow borderColor=\"$accent3\" boxSize=\"24px\" />\n            <PopoverCloseButton bg=\"$accent4\" />\n            <PopoverBody>Are you sure you want to have that milkshake?</PopoverBody>\n          </PopoverContent>\n        </Popover>\n      </Preview>\n      <SectionTitle id=\"accessibility\">Accessibility</SectionTitle>\n      <SectionSubtitle>ARIA roles and attributes</SectionSubtitle>\n      <UnorderedList spacing=\"$2\" mb=\"$8\">\n        <ListItem>\n          <Code>PopoverTrigger</Code> has <Code>aria-haspopup</Code> set to <Code>dialog</Code> to\n          denote that it triggers a popover.\n        </ListItem>\n        <ListItem>\n          <Code>PopoverTrigger</Code> has <Code>aria-controls</Code> set to the <Code>id</Code> of\n          the <Code>PopoverContent</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>PopoverTrigger</Code> has <Code>aria-expanded</Code> set to <Code>true</Code> or{\" \"}\n          <Code>false</Code> depending on the open/closed state of the popover.\n        </ListItem>\n        <ListItem>\n          <Code>PopoverContent</Code> has <Code>aria-labelledby</Code> set to the <Code>id</Code> of\n          the <Code>PopoverHeader</Code>.\n        </ListItem>\n        <ListItem>\n          <Code>PopoverContent</Code> has <Code>aria-describedby</Code> set to the <Code>id</Code>{\" \"}\n          of the <Code>PopoverBody</Code>.\n        </ListItem>\n        <ListItem>\n          When the <Code>triggerMode</Code> is set to <Code>hover</Code>,{\" \"}\n          <Code>PopoverContent</Code> has <Code>role</Code> set to <Code>tooltip</Code>, otherwise{\" \"}\n          <Code>role</Code> is set to <Code>dialog</Code>.\n        </ListItem>\n      </UnorderedList>\n      <SectionSubtitle>Keyboard support (closed popover)</SectionSubtitle>\n      <UnorderedList spacing=\"$2\" mb=\"$8\">\n        <ListItem>\n          When the <Code>triggerMode</Code> prop is set to <Code>click</Code>, clicking the{\" \"}\n          <Code>PopoverTrigger</Code> or pressing <Kbd>space</Kbd> or <Kbd>enter</Kbd> when focus is\n          on the trigger will open the popover.\n        </ListItem>\n        <ListItem>\n          When the <Code>triggerMode</Code> prop is set to <Code>hover</Code>, focusing on or\n          mousing over the <Code>PopoverTrigger</Code> will open the popover.\n        </ListItem>\n      </UnorderedList>\n      <SectionSubtitle>Keyboard support (opened popover)</SectionSubtitle>\n      <UnorderedList spacing=\"$2\" mb=\"$12\">\n        <ListItem>\n          When the <Code>initialFocus</Code> prop is set, focus is moved to the matching element,\n          otherwise focus moves to the <Code>PopoverContent</Code>.\n        </ListItem>\n        <ListItem>\n          When the <Code>triggerMode</Code> prop is set to <Code>click</Code>, clicking the{\" \"}\n          <Code>PopoverTrigger</Code> closes the popover.\n        </ListItem>\n        <ListItem>\n          When the <Code>triggerMode</Code> prop is set to <Code>hover</Code>, blurring or mousing\n          out of the <Code>PopoverTrigger</Code> will close the popover. If you move your mouse into\n          the <Code>PopoverContent</Code>, it'll remain visible.\n        </ListItem>\n        <ListItem>\n          When focus is within the <Code>PopoverContent</Code> and <Code>closeOnEsc</Code> prop is\n          set to <Code>true</Code>, pressing <Kbd>esc</Kbd> closes the popover.\n        </ListItem>\n        <ListItem>\n          When <Code>closeOnBur</Code> prop is set to <Code>true</Code>, clicking outside or\n          blurring out of the <Code>PopoverContent</Code> closes the popover.\n        </ListItem>\n      </UnorderedList>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Popover</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <SectionSubtitle id=\"popover-props\">Popover props</SectionSubtitle>\n      <PropsTable items={propItems} mb=\"$10\" />\n      <SectionSubtitle id=\"other-components-props\">Other components props</SectionSubtitle>\n      <UnorderedList spacing=\"$2\">\n        <ListItem>\n          <Code>PopoverContent</Code>, <Code>PopoverArrow</Code>, <Code>PopoverHeader</Code>,{\" \"}\n          <Code>PopoverBody</Code> and <Code>PopoverFooter</Code> composes{\" \"}\n          <Anchor\n            as={Link}\n            href=\"/docs/layout/box\"\n            external\n            color=\"$primary11\"\n            fontWeight=\"$semibold\"\n          >\n            Box\n          </Anchor>\n          .\n        </ListItem>\n        <ListItem>\n          <Code>PopoverCloseButton</Code> composes{\" \"}\n          <Anchor\n            as={Link}\n            href=\"/docs/others/close-button\"\n            external\n            color=\"$primary11\"\n            fontWeight=\"$semibold\"\n          >\n            CloseButton\n          </Anchor>\n          .\n        </ListItem>\n      </UnorderedList>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/overlay/popover/snippets.ts",
    "content": "const importComponent = `import {\n  Popover,\n  PopoverTrigger,\n  PopoverAnchor,\n  PopoverContent,\n  PopoverArrow,\n  PopoverCloseButton,\n  PopoverHeader,\n  PopoverBody,\n  PopoverFooter,\n} from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Popover>\n  <PopoverTrigger as={Button} variant=\"subtle\" colorScheme=\"neutral\">\n    Trigger\n  </PopoverTrigger>\n  <PopoverContent>\n    <PopoverArrow />\n    <PopoverCloseButton />\n    <PopoverHeader>Confirmation!</PopoverHeader>\n    <PopoverBody>Are you sure you want to have that milkshake?</PopoverBody>\n  </PopoverContent>\n</Popover>`;\n\nconst triggerOnHover = `<Popover triggerMode=\"hover\">\n  <PopoverTrigger as={Button} variant=\"subtle\" colorScheme=\"neutral\">\n    Trigger\n  </PopoverTrigger>\n  <PopoverContent>\n    <PopoverArrow />\n    <PopoverCloseButton />\n    <PopoverHeader>Confirmation!</PopoverHeader>\n    <PopoverBody>Are you sure you want to have that milkshake?</PopoverBody>\n  </PopoverContent>\n</Popover>`;\n\nconst initialFocus = `<Popover initialFocus=\"#next\">\n  <PopoverTrigger as={Button} variant=\"subtle\" colorScheme=\"neutral\">\n    Trigger\n  </PopoverTrigger>\n  <PopoverContent maxW=\"$sm\">\n    <PopoverHeader border=\"0\">Running the app</PopoverHeader>\n    <PopoverArrow />\n    <PopoverCloseButton />\n    <PopoverBody>\n      To start the development server run npm start command\n    </PopoverBody>\n    <PopoverFooter\n      border=\"0\"\n      d=\"flex\"\n      alignItems=\"center\"\n      justifyContent=\"space-between\"\n      pb=\"$4\"\n    >\n      <Box fontSize=\"$sm\">Step 2 of 4</Box>\n      <ButtonGroup size=\"sm\">\n        <Button colorScheme=\"neutral\" variant=\"subtle\">\n          Previous\n        </Button>\n        <Button id=\"next\" colorScheme=\"info\">\n          Next\n        </Button>\n      </ButtonGroup>\n    </PopoverFooter>\n  </PopoverContent>\n</Popover>`;\n\nconst focusTrap = `<Popover trapFocus>\n  <PopoverTrigger as={Button} variant=\"subtle\" colorScheme=\"neutral\">\n    Trigger\n  </PopoverTrigger>\n  <PopoverContent maxW=\"$sm\">\n    <PopoverHeader border=\"0\">Running the app</PopoverHeader>\n    <PopoverArrow />\n    <PopoverCloseButton />\n    <PopoverBody>\n      To start the development server run npm start command\n    </PopoverBody>\n    <PopoverFooter\n      border=\"0\"\n      d=\"flex\"\n      alignItems=\"center\"\n      justifyContent=\"space-between\"\n      pb=\"$4\"\n    >\n      <Box fontSize=\"$sm\">Step 2 of 4</Box>\n      <ButtonGroup size=\"sm\">\n        <Button colorScheme=\"neutral\" variant=\"subtle\">\n          Previous\n        </Button>\n        <Button colorScheme=\"info\">\n          Next\n        </Button>\n      </ButtonGroup>\n    </PopoverFooter>\n  </PopoverContent>\n</Popover>`;\n\nconst placement = `<Popover placement=\"top-start\">\n  <PopoverTrigger as={Button} variant=\"subtle\" colorScheme=\"neutral\">\n    Trigger\n  </PopoverTrigger>\n  <PopoverContent>\n    <PopoverArrow />\n    <PopoverCloseButton />\n    <PopoverHeader>Confirmation!</PopoverHeader>\n    <PopoverBody>Are you sure you want to have that milkshake?</PopoverBody>\n  </PopoverContent>\n</Popover>`;\n\nconst anchor = `<Popover>\n  <HStack spacing=\"$2\">\n    <PopoverAnchor\n      as={Input}\n      w=\"auto\"\n      display=\"inline-flex\"\n      placeholder=\"I am the anchor\"\n    />\n    <PopoverTrigger as={Button}>Trigger</PopoverTrigger>\n  </HStack>\n  <PopoverContent>\n    <PopoverArrow />\n    <PopoverCloseButton />\n    <PopoverHeader>Confirmation!</PopoverHeader>\n    <PopoverBody>Are you sure you want to have that milkshake?</PopoverBody>\n  </PopoverContent>\n</Popover>`;\n\nconst internalState = `<Popover closeOnBlur={false} placement=\"left\" initialFocus=\"#close-btn\">\n  {({ opened, onClose }) => (\n    <>\n      <PopoverTrigger as={Button} variant=\"subtle\" colorScheme=\"neutral\">\n        Click to {opened() ? \"close\" : \"open\"}\n      </PopoverTrigger>\n      <PopoverContent>\n        <PopoverHeader>This is the header</PopoverHeader>\n        <PopoverCloseButton />\n        <PopoverBody>\n          <Box>Hello. Nice to meet you! This is the body of the popover</Box>\n          <Button id=\"close-btn\" mt=\"$4\" colorScheme=\"info\" onClick={onClose}>\n            Close\n          </Button>\n        </PopoverBody>\n        <PopoverFooter>This is the footer</PopoverFooter>\n      </PopoverContent>\n    </>\n  )}\n</Popover>`;\n\nconst controlled = `function ControlledExample() {\n  const { isOpen, onClose, onToggle } = createDisclosure();\n\n  return (\n    <>\n      <Button variant=\"subtle\" colorScheme=\"neutral\" mr=\"$2\" onClick={onToggle}>\n        Trigger\n      </Button>\n      <Popover \n        placement=\"right\" \n        opened={isOpen()} \n        onClose={onClose}\n        closeOnBlur={false} \n      >\n        <PopoverTrigger as={Button}>Popover Target</PopoverTrigger>\n        <PopoverContent>\n          <PopoverArrow />\n          <PopoverCloseButton />\n          <PopoverHeader>Confirmation!</PopoverHeader>\n          <PopoverBody>Are you sure you want to have that milkshake?</PopoverBody>\n        </PopoverContent>\n      </Popover>\n    </>\n  );\n}`;\n\nconst composition = `<Popover offset={24}>\n  <PopoverTrigger\n    as={IconButton}\n    icon={<IconMenu />}\n    aria-label=\"trigger\"\n    variant=\"outline\"\n    colorScheme=\"accent\"\n  />\n  <PopoverContent \n    borderColor=\"$accent3\" \n    bg=\"$accent3\" \n    color=\"$accent11\" \n    maxW=\"$sm\"\n  >\n    <PopoverHeader fontWeight=\"$semibold\" border=\"none\" pb=\"0\">\n      Confirmation!\n    </PopoverHeader>\n    <PopoverArrow borderColor=\"$accent3\" boxSize=\"24px\" />\n    <PopoverCloseButton bg=\"$accent4\" />\n    <PopoverBody>Are you sure you want to have that milkshake?</PopoverBody>\n  </PopoverContent>\n</Popover>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Popover: {\n      baseStyle: {\n        content: SystemStyleObject,\n        arrow: SystemStyleObject,\n        closeButton: SystemStyleObject,\n        header: SystemStyleObject,\n        body: SystemStyleObject,\n        footer: SystemStyleObject,\n      },\n      defaultProps: {\n        root: ThemeablePopoverOptions,\n        closeButton: ThemeableCloseButtonOptions,\n      };\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  triggerOnHover,\n  initialFocus,\n  focusTrap,\n  placement,\n  anchor,\n  internalState,\n  controlled,\n  composition,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/overlay/tooltip/index.tsx",
    "content": "import { Anchor, Button, Flex, HStack, Text, Tooltip, VStack } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { IconSearch } from \"@/icons/IconSearch\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function TooltipDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/overlay/popover\",\n    label: \"Popover\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/others/close-button\",\n    label: \"CloseButton\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#with-arrow\", label: \"Tooltip with arrow\", indent: true },\n    { href: \"#with-focusable-content\", label: \"Tooltip with focusable content\", indent: true },\n    { href: \"#disabled-tooltip\", label: \"Disabled tooltip\", indent: true },\n    { href: \"#placement\", label: \"Placement\" },\n    { href: \"#more-examples\", label: \"More examples\" },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"opened\",\n      description: \"If `true`, the tooltip will be shown (in controlled mode).\",\n      type: \"boolean\",\n    },\n    {\n      name: \"defaultOpened\",\n      description: \"If `true`, the tooltip will be initially shown.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"label\",\n      description: \"The label of the tooltip.\",\n      type: \"JSX.Element\",\n    },\n    {\n      name: \"aria-label\",\n      description:\n        \"The accessible, human friendly label to use for screen readers. If passed, tooltip will show the content `label` but expose only `aria-label` to assistive technologies\",\n      type: \"string\",\n    },\n    {\n      name: \"id\",\n      description: \"The id of the tooltip.\",\n      type: \"string\",\n    },\n    {\n      name: \"placement\",\n      description: \"The placement of the tooltip relative to its reference.\",\n      type: \"Placement\",\n      defaultValue: '\"bottom\"',\n    },\n    {\n      name: \"offset\",\n      description: \"The offset between the tooltip and the reference (trigger) element.\",\n      type: \"number\",\n      defaultValue: \"8\",\n    },\n    {\n      name: \"inline\",\n      description:\n        \"If `true`, apply @floating-ui/dom `inline` middleware. Useful for inline reference elements that span over multiple lines, such as hyperlinks or range selections.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"disabled\",\n      description: \"If `true`, the tooltip will not show.\",\n      type: \"boolean\",\n    },\n    {\n      name: \"withArrow\",\n      description: \"If `true`, the tooltip will show an arrow tip.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"arrowSize\",\n      description: \"Size of the arrow.\",\n      type: \"number\",\n      defaultValue: \"8\",\n    },\n    {\n      name: \"arrowPadding\",\n      description: \"The padding between the arrow and the edges of the tooltip.\",\n      type: \"number\",\n      defaultValue: \"8\",\n    },\n    {\n      name: \"openDelay\",\n      description: \"Delay (in ms) before showing the tooltip.\",\n      type: \"number\",\n      defaultValue: \"0\",\n    },\n    {\n      name: \"closeDelay\",\n      description: \"Delay (in ms) before hiding the tooltip.\",\n      type: \"number\",\n      defaultValue: \"0\",\n    },\n    {\n      name: \"closeOnClick\",\n      description: \"If `true`, the tooltip will hide on click.\",\n      type: \"boolean\",\n      defaultValue: \"true\",\n    },\n    {\n      name: \"closeOnMouseDown\",\n      description: \"If `true`, the tooltip will hide while the mouse is down.\",\n      type: \"boolean\",\n      defaultValue: \"false\",\n    },\n    {\n      name: \"onOpen\",\n      description: \"Callback to run when the tooltip shows.\",\n      type: \"() => void\",\n    },\n    {\n      name: \"onClose\",\n      description: \"Callback to run when the tooltip hides.\",\n      type: \"() => void\",\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Tooltip</PageTitle>\n      <Text mb=\"$5\">\n        A tooltip is a brief, informative message that appears when a user interacts with an\n        element. Tooltips are usually initiated in one of two ways: through a mouse-hover gesture or\n        through a keyboard-hover gesture.\n      </Text>\n      <Text mb=\"$5\">\n        The <Code>Tooltip</Code> component follows the{\" \"}\n        <Anchor\n          href=\"https://www.w3.org/TR/wai-aria-practices/#tooltip\"\n          external\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          WAI-ARIA\n        </Anchor>{\" \"}\n        Tooltip Pattern.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$5\"></Text>\n      <Preview snippet={snippets.basicUsage} mb=\"$10\">\n        <Tooltip label=\"Hey, I'm here!\">\n          <span>Hover me</span>\n        </Tooltip>\n      </Preview>\n      <SectionSubtitle id=\"with-arrow\">Tooltip with arrow</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>withArrow</Code> prop to add an arrow to the tooltip.\n      </Text>\n      <Preview snippet={snippets.withArrow} mb=\"$10\">\n        <Tooltip withArrow label=\"Search places\">\n          <IconSearch boxSize=\"20px\" />\n        </Tooltip>\n      </Preview>\n      <SectionSubtitle id=\"with-focusable-content\">Tooltip with focusable content</SectionSubtitle>\n      <Text mb=\"$5\">\n        If the children of the tooltip is a focusable element, the tooltip will show when you focus\n        or hover on the element, and will hide when you blur or move cursor out of the element.\n      </Text>\n      <Preview snippet={snippets.withFocusableContent} mb=\"$10\">\n        <Tooltip label=\"Search places\">\n          <Button>Button</Button>\n        </Tooltip>\n      </Preview>\n      <SectionSubtitle id=\"disabled-tooltip\">Disabled tooltip</SectionSubtitle>\n      <Text mb=\"$5\">\n        Use the <Code>disabled</Code> prop to prevent the tooltip from showing up.\n      </Text>\n      <Preview snippet={snippets.disabled} mb=\"$12\">\n        <Tooltip disabled>\n          <IconSearch boxSize=\"20px\" />\n        </Tooltip>\n      </Preview>\n      <SectionTitle id=\"placement\">Placement</SectionTitle>\n      <Text mb=\"$5\">\n        Using the <Code>placement</Code> prop you can adjust where your tooltip will be displayed.\n      </Text>\n      <Preview snippet={snippets.placement} mb=\"$12\">\n        <VStack spacing=\"$6\">\n          <HStack spacing=\"$6\">\n            <Tooltip label=\"Top start\" placement=\"top-start\">\n              <Button>Top-Start</Button>\n            </Tooltip>\n\n            <Tooltip label=\"Top\" placement=\"top\">\n              <Button>Top</Button>\n            </Tooltip>\n\n            <Tooltip label=\"Top end\" placement=\"top-end\">\n              <Button>Top-End</Button>\n            </Tooltip>\n          </HStack>\n\n          <HStack spacing=\"$6\">\n            <Tooltip label=\"Right start\" placement=\"right-start\">\n              <Button>Right-Start</Button>\n            </Tooltip>\n\n            <Tooltip label=\"Right\" placement=\"right\">\n              <Button>Right</Button>\n            </Tooltip>\n\n            <Tooltip label=\"Right end\" placement=\"right-end\">\n              <Button>Right-End</Button>\n            </Tooltip>\n          </HStack>\n\n          <HStack spacing=\"$6\">\n            <Tooltip label=\"Bottom start\" placement=\"bottom-start\">\n              <Button>Bottom Start</Button>\n            </Tooltip>\n\n            <Tooltip label=\"Bottom\" placement=\"bottom\">\n              <Button>Bottom</Button>\n            </Tooltip>\n\n            <Tooltip label=\"Bottom end\" placement=\"bottom-end\">\n              <Button>Bottom End</Button>\n            </Tooltip>\n          </HStack>\n\n          <HStack spacing=\"$6\">\n            <Tooltip label=\"Left start\" placement=\"left-start\">\n              <Button>Left-Start</Button>\n            </Tooltip>\n\n            <Tooltip label=\"Left\" placement=\"left\">\n              <Button>Left</Button>\n            </Tooltip>\n\n            <Tooltip label=\"Left end\" placement=\"left-end\">\n              <Button>Left-End</Button>\n            </Tooltip>\n          </HStack>\n        </VStack>\n      </Preview>\n      <SectionTitle id=\"more-examples\">More examples</SectionTitle>\n      <Preview snippet={snippets.moreExamples} mb=\"$12\">\n        <Flex wrap=\"wrap\" gap=\"$6\">\n          <Tooltip label=\"I close on click\">\n            <Button>Close on Click - true(default)</Button>\n          </Tooltip>\n\n          <Tooltip label=\"I don't close on click\" closeOnClick={false}>\n            <Button>Close on Click - false</Button>\n          </Tooltip>\n\n          <Tooltip label=\"I am always open\" placement=\"top\" opened>\n            <Button>Always Open</Button>\n          </Tooltip>\n\n          <Tooltip label=\"I am open by default\" placement=\"left\" defaultOpened>\n            <Button>Open on startup</Button>\n          </Tooltip>\n\n          <Tooltip label=\"Opened after 500ms\" openDelay={500}>\n            <Button>Delay Open - 500ms</Button>\n          </Tooltip>\n\n          <Tooltip label=\"Closed after 500ms\" closeDelay={500}>\n            <Button>Delay Close - 500ms</Button>\n          </Tooltip>\n\n          <Tooltip label=\"I have 12px arrow\" withArrow arrowSize={12}>\n            <Button>Arrow size - 12px</Button>\n          </Tooltip>\n        </Flex>\n      </Preview>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Tooltip</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/overlay/tooltip/snippets.ts",
    "content": "const importComponent = `import { Tooltip } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Tooltip label=\"Hey, I'm here!\">\n  <span>Hover me</span>\n</Tooltip>`;\n\nconst withArrow = `<Tooltip withArrow label=\"Search places\">\n  <IconSearch />\n</Tooltip>`;\n\nconst withFocusableContent = `<Tooltip label=\"Search places\">\n  <Button>Button</Button>\n</Tooltip>`;\n\nconst disabled = `<Tooltip disabled>\n  <IconSearch />\n</Tooltip>`;\n\nconst placement = `<VStack spacing=\"$6\">\n  <HStack spacing=\"$6\">\n    <Tooltip label=\"Top start\" placement=\"top-start\">\n      <Button>Top-Start</Button>\n    </Tooltip>\n\n    <Tooltip label=\"Top\" placement=\"top\">\n      <Button>Top</Button>\n    </Tooltip>\n\n    <Tooltip label=\"Top end\" placement=\"top-end\">\n      <Button>Top-End</Button>\n    </Tooltip>\n  </HStack>\n\n  <HStack spacing=\"$6\">\n    <Tooltip label=\"Right start\" placement=\"right-start\">\n      <Button>Right-Start</Button>\n    </Tooltip>\n\n    <Tooltip label=\"Right\" placement=\"right\">\n      <Button>Right</Button>\n    </Tooltip>\n\n    <Tooltip label=\"Right end\" placement=\"right-end\">\n      <Button>Right-End</Button>\n    </Tooltip>\n  </HStack>\n\n  <HStack spacing=\"$6\">\n    <Tooltip label=\"Bottom start\" placement=\"bottom-start\">\n      <Button>Bottom Start</Button>\n    </Tooltip>\n\n    <Tooltip label=\"Bottom\" placement=\"bottom\">\n      <Button>Bottom</Button>\n    </Tooltip>\n\n    <Tooltip label=\"Bottom end\" placement=\"bottom-end\">\n      <Button>Bottom End</Button>\n    </Tooltip>\n  </HStack>\n\n  <HStack spacing=\"$6\">\n    <Tooltip label=\"Left start\" placement=\"left-start\">\n      <Button>Left-Start</Button>\n    </Tooltip>\n\n    <Tooltip label=\"Left\" placement=\"left\">\n      <Button>Left</Button>\n    </Tooltip>\n\n    <Tooltip label=\"Left end\" placement=\"left-end\">\n      <Button>Left-End</Button>\n    </Tooltip>\n  </HStack>\n</VStack>`;\n\nconst moreExamples = `<Flex wrap=\"wrap\" gap=\"$6\">\n  <Tooltip label=\"I close on click\">\n    <Button>Close on Click - true(default)</Button>\n  </Tooltip>\n\n  <Tooltip label=\"I don't close on click\" closeOnClick={false}>\n    <Button>Close on Click - false</Button>\n  </Tooltip>\n\n  <Tooltip label=\"I am always open\" placement=\"top\" opened>\n    <Button>Always Open</Button>\n  </Tooltip>\n\n  <Tooltip label=\"I am open by default\" placement=\"left\" defaultOpened>\n    <Button>Open on startup</Button>\n  </Tooltip>\n\n  <Tooltip label=\"Opened after 500ms\" openDelay={500}>\n    <Button>Delay Open - 500ms</Button>\n  </Tooltip>\n\n  <Tooltip label=\"Closed after 500ms\" closeDelay={500}>\n    <Button>Delay Close - 500ms</Button>\n  </Tooltip>\n\n  <Tooltip label=\"I have 12px arrow\" withArrow arrowSize={12}>\n    <Button>Arrow size - 12px</Button>\n  </Tooltip>\n</Flex>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Tooltip: {\n      baseStyle: SystemStyleObject,\n      defaultProps: ThemeableTooltipOptions\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  withArrow,\n  withFocusableContent,\n  disabled,\n  placement,\n  moreExamples,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/typography/heading/index.tsx",
    "content": "import { Alert, AlertDescription, Anchor, Heading, Text, VStack } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Link } from \"solid-app-router\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function HeadingDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/layout/stack\",\n    label: \"Stack\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/typography/text\",\n    label: \"Text\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#level\", label: \"Level\", indent: true },\n    { href: \"#changing-font-size\", label: \"Changing the font size\", indent: true },\n    { href: \"#truncate-text\", label: \"Truncate text\", indent: true },\n    { href: \"#override-style\", label: \"Override style\", indent: true },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"level\",\n      description: \"The level of the heading. For example, level 3 renders an `h3`.\",\n      type: \"1 | 2 | 3 | 4 | 5 | 6\",\n    },\n    {\n      name: \"size\",\n      description: \"The size of the text. A combination of `font-size` and `line-height`.\",\n      type: '\"xs\" | \"sm\" | \"base\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\" | \"4xl\" | \"5xl\" | \"6xl\" | \"7xl\" | \"8xl\" | \"9xl\"',\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Heading</PageTitle>\n      <Text mb=\"$5\">\n        <Code>Heading</Code> composes{\" \"}\n        <Anchor as={Link} href=\"/docs/layout/box\" color=\"$primary11\" fontWeight=\"$semibold\">\n          Box\n        </Anchor>{\" \"}\n        so you can use all the style props and add responsive styles as well. It renders a semibold{\" \"}\n        <Code>h2</Code> tag by default.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$12\">\n        <Heading>I'm a Heading</Heading>\n      </Preview>\n      <SectionSubtitle id=\"level\">Level</SectionSubtitle>\n      <Text mb=\"$5\">\n        To change the rendered <Code>h</Code> tag pass the <Code>level</Code> prop with a value from\n        1 to 6. For example, level 3 will render an <Code>h3</Code>. Use{\" \"}\n        <strong>Inspect Element</strong> to see the element that gets rendered in html.\n      </Text>\n      <Preview snippet={snippets.level} mb=\"$6\">\n        <VStack spacing=\"$3\" alignItems=\"flex-start\">\n          <Heading level=\"1\">The quick brown fox</Heading>\n          <Heading level=\"2\">The quick brown fox</Heading>\n          <Heading level=\"3\">The quick brown fox</Heading>\n          <Heading level=\"4\">The quick brown fox</Heading>\n          <Heading level=\"5\">The quick brown fox</Heading>\n          <Heading level=\"6\">The quick brown fox</Heading>\n        </VStack>\n      </Preview>\n      <Alert status=\"warning\" mb=\"$12\">\n        <AlertDescription>\n          The <Code>level</Code> prop is primarily for semantic purpose as it does not alter the\n          heading styles\n        </AlertDescription>\n      </Alert>\n      <SectionSubtitle id=\"changing-font-size\">Changing the font size</SectionSubtitle>\n      <Text mb=\"$5\">\n        To increase the font size of the text, you can pass the <Code>size</Code> prop. It apply a\n        combination of <Code>fontSize</Code> and <Code>lineHeight</Code> for an optimal reading\n        experience.\n      </Text>\n      <Preview snippet={snippets.sizes} mb=\"$12\">\n        <VStack spacing=\"$3\" alignItems=\"flex-start\">\n          <Heading size=\"9xl\" noOfLines={1}>\n            (9xl) The quick brown fox\n          </Heading>\n          <Heading size=\"8xl\" noOfLines={1}>\n            (8xl) The quick brown fox\n          </Heading>\n          <Heading size=\"7xl\" noOfLines={1}>\n            (7xl) The quick brown fox\n          </Heading>\n          <Heading size=\"6xl\">(6xl) The quick brown fox</Heading>\n          <Heading size=\"5xl\">(5xl) The quick brown fox</Heading>\n          <Heading size=\"4xl\">(4xl) The quick brown fox</Heading>\n          <Heading size=\"3xl\">(3xl) The quick brown fox</Heading>\n          <Heading size=\"2xl\">(2xl) The quick brown fox</Heading>\n          <Heading size=\"xl\">(xl) The quick brown fox</Heading>\n          <Heading size=\"lg\">(lg) The quick brown fox</Heading>\n          <Heading size=\"base\">(base) The quick brown fox</Heading>\n          <Heading size=\"sm\">(sm) The quick brown fox</Heading>\n          <Heading size=\"xs\">(xs) The quick brown fox</Heading>\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"truncate-text\">Truncate text</SectionSubtitle>\n      <Text mb=\"$5\">\n        If you'd like to truncate the text after a specific number of lines, pass the{\" \"}\n        <Code>noOfLines</Code> prop and set it to the desired number of lines. It will render an\n        ellipsis when the text exceeds the width of the viewport or <Code>maxWidth</Code> prop.\n      </Text>\n      <Preview snippet={snippets.truncateText} mb=\"$12\">\n        <Heading noOfLines={1}>\n          Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing\n          industries for previewing layouts and visual mockups.\n        </Heading>\n      </Preview>\n      <SectionSubtitle id=\"override-style\">Override style</SectionSubtitle>\n      <Text mb=\"$5\">\n        You can change the entire style of the text via props. For example, to change the font size,\n        pass the <Code>fontSize</Code> prop.\n      </Text>\n      <Preview snippet={snippets.overrideStyle} mb=\"$12\">\n        <Heading fontSize=\"50px\" color=\"tomato\">\n          I'm using a custom font-size value for this heading\n        </Heading>\n      </Preview>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Heading</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/typography/heading/snippets.ts",
    "content": "const importComponent = `import { Heading } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Heading>I'm a Heading</Heading>`;\n\nconst level = `<VStack spacing=\"$3\" alignItems=\"flex-start\">\n  <Heading level=\"1\">The quick brown fox</Heading>\n  <Heading level=\"2\">The quick brown fox</Heading>\n  <Heading level=\"3\">The quick brown fox</Heading>\n  <Heading level=\"4\">The quick brown fox</Heading>\n  <Heading level=\"5\">The quick brown fox</Heading>\n  <Heading level=\"6\">The quick brown fox</Heading>\n</VStack>`;\n\nconst sizes = `<VStack spacing=\"$3\" alignItems=\"flex-start\">\n  <Heading size=\"9xl\">(9xl) The quick brown fox</Heading>\n  <Heading size=\"8xl\">(8xl) The quick brown fox</Heading>\n  <Heading size=\"7xl\">(7xl) The quick brown fox</Heading>\n  <Heading size=\"6xl\">(6xl) The quick brown fox</Heading>\n  <Heading size=\"5xl\">(5xl) The quick brown fox</Heading>\n  <Heading size=\"4xl\">(4xl) The quick brown fox</Heading>\n  <Heading size=\"3xl\">(3xl) The quick brown fox</Heading>\n  <Heading size=\"2xl\">(2xl) The quick brown fox</Heading>\n  <Heading size=\"xl\">(xl) The quick brown fox</Heading>\n  <Heading size=\"lg\">(lg) The quick brown fox</Heading>\n  <Heading size=\"base\">(base) The quick brown fox</Heading>\n  <Heading size=\"sm\">(sm) The quick brown fox</Heading>\n  <Heading size=\"xs\">(xs) The quick brown fox</Heading>\n</VStack>`;\n\nconst truncateText = `<Heading noOfLines={1}>\n  Lorem ipsum is placeholder Heading commonly used in the graphic, print, and publishing\n  industries for previewing layouts and visual mockups.\n</Heading>`;\n\nconst overrideStyle = `<Heading fontSize=\"50px\" color=\"tomato\">\n  I'm using a custom font-size value for this heading\n</Heading>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Heading: {\n      baseStyle: SystemStyleObject,\n      defaultProps: ThemeableHeadingOptions\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  level,\n  sizes,\n  truncateText,\n  overrideStyle,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/typography/text/index.tsx",
    "content": "import { Text, VStack } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport { PropsTable, PropsTableItem } from \"@/components/PropsTable\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function TextDoc() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/typography/heading\",\n    label: \"Heading\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/data-entry/checkbox\",\n    label: \"Checkbox\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#import\", label: \"Import\" },\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#changing-font-size\", label: \"Changing the font size\", indent: true },\n    { href: \"#truncate-text\", label: \"Truncate text\", indent: true },\n    { href: \"#override-style\", label: \"Override style\", indent: true },\n    { href: \"#override-element\", label: \"Override the element\", indent: true },\n    { href: \"#theming\", label: \"Theming\" },\n    { href: \"#props\", label: \"Props\" },\n  ];\n\n  const propItems: PropsTableItem[] = [\n    {\n      name: \"size\",\n      description: \"The size of the text. It apply a combination of `font-size` and `line-height`.\",\n      type: '\"xs\" | \"sm\" | \"base\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\" | \"4xl\" | \"5xl\" | \"6xl\" | \"7xl\" | \"8xl\" | \"9xl\"',\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Text</PageTitle>\n      <Text mb=\"$8\">\n        <Code>Text</Code> component is the used to render text and paragraphs within an interface.\n        It renders a <Code>p</Code> tag by default.\n      </Text>\n      <SectionTitle id=\"import\">Import</SectionTitle>\n      <CodeSnippet snippet={snippets.importComponent} mb=\"$12\" />\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Preview snippet={snippets.basicUsage} mb=\"$12\">\n        <Text>I'm a Text</Text>\n      </Preview>\n      <SectionSubtitle id=\"changing-font-size\">Changing the font size</SectionSubtitle>\n      <Text mb=\"$5\">\n        To increase the font size of the text, you can pass the <Code>size</Code> prop. It apply a\n        combination of <Code>fontSize</Code> and <Code>lineHeight</Code> for an optimal reading\n        experience.\n      </Text>\n      <Preview snippet={snippets.sizes} mb=\"$12\">\n        <VStack spacing=\"$3\" alignItems=\"flex-start\">\n          <Text size=\"9xl\" noOfLines={1}>\n            (9xl) The quick brown fox\n          </Text>\n          <Text size=\"8xl\" noOfLines={1}>\n            (8xl) The quick brown fox\n          </Text>\n          <Text size=\"7xl\" noOfLines={1}>\n            (7xl) The quick brown fox\n          </Text>\n          <Text size=\"6xl\">(6xl) The quick brown fox</Text>\n          <Text size=\"5xl\">(5xl) The quick brown fox</Text>\n          <Text size=\"4xl\">(4xl) The quick brown fox</Text>\n          <Text size=\"3xl\">(3xl) The quick brown fox</Text>\n          <Text size=\"2xl\">(2xl) The quick brown fox</Text>\n          <Text size=\"xl\">(xl) The quick brown fox</Text>\n          <Text size=\"lg\">(lg) The quick brown fox</Text>\n          <Text size=\"base\">(base) The quick brown fox</Text>\n          <Text size=\"sm\">(sm) The quick brown fox</Text>\n          <Text size=\"xs\">(xs) The quick brown fox</Text>\n        </VStack>\n      </Preview>\n      <SectionSubtitle id=\"truncate-text\">Truncate text</SectionSubtitle>\n      <Text mb=\"$5\">\n        If you'd like to truncate the text after a specific number of lines, pass the{\" \"}\n        <Code>noOfLines</Code> prop and set it to the desired number of lines. It will render an\n        ellipsis when the text exceeds the width of the viewport or <Code>maxWidth</Code> prop.\n      </Text>\n      <Preview snippet={snippets.truncateText} mb=\"$12\">\n        <Text noOfLines={1}>\n          Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing\n          industries for previewing layouts and visual mockups.\n        </Text>\n      </Preview>\n      <SectionSubtitle id=\"override-style\">Override style</SectionSubtitle>\n      <Text mb=\"$5\">\n        You can change the entire style of the text via props. For example, to change the font size,\n        pass the <Code>fontSize</Code> prop.\n      </Text>\n      <Preview snippet={snippets.overrideStyle} mb=\"$12\">\n        <Text fontSize=\"50px\" color=\"tomato\">\n          I'm using a custom font-size value for this text\n        </Text>\n      </Preview>\n      <SectionSubtitle id=\"override-element\">Override the element</SectionSubtitle>\n      <Text mb=\"$5\">\n        To override the element that gets rendered, pass the <Code>as</Code> prop. Use{\" \"}\n        <strong>Inspect Element</strong> to see the element that gets rendered in html.\n      </Text>\n      <Preview snippet={snippets.overrideElement} mb=\"$12\">\n        <VStack alignItems=\"flex-start\">\n          <Text as=\"i\">Italic</Text>\n          <Text as=\"u\">Underline</Text>\n          <Text as=\"abbr\">I18N</Text>\n          <Text as=\"cite\">Citation</Text>\n          <Text as=\"del\">Deleted</Text>\n          <Text as=\"em\">Emphasis</Text>\n          <Text as=\"ins\">Inserted</Text>\n          <Text as=\"kbd\">Ctrl + C</Text>\n          <Text as=\"mark\">Highlighted</Text>\n          <Text as=\"s\">Strikethrough</Text>\n          <Text as=\"samp\">Sample</Text>\n          <Text as=\"sub\">sub</Text>\n          <Text as=\"sup\">sup</Text>\n        </VStack>\n      </Preview>\n      <SectionTitle id=\"theming\">Theming</SectionTitle>\n      <Text mb=\"$5\">\n        <Code>Text</Code> base styles and default props can be overridden in the Hope UI theme\n        configuration like below:\n      </Text>\n      <CodeSnippet lang=\"js\" snippet={snippets.theming} mb=\"$12\" />\n      <SectionTitle id=\"props\">Props</SectionTitle>\n      <PropsTable items={propItems} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/component-docs/typography/text/snippets.ts",
    "content": "const importComponent = `import { Text } from \"@hope-ui/solid\"`;\n\nconst basicUsage = `<Text>I'm a Text</Text>`;\n\nconst sizes = `<VStack spacing=\"$3\" alignItems=\"flex-start\">\n  <Text size=\"9xl\">(9xl) The quick brown fox</Text>\n  <Text size=\"8xl\">(8xl) The quick brown fox</Text>\n  <Text size=\"7xl\">(7xl) The quick brown fox</Text>\n  <Text size=\"6xl\">(6xl) The quick brown fox</Text>\n  <Text size=\"5xl\">(5xl) The quick brown fox</Text>\n  <Text size=\"4xl\">(4xl) The quick brown fox</Text>\n  <Text size=\"3xl\">(3xl) The quick brown fox</Text>\n  <Text size=\"2xl\">(2xl) The quick brown fox</Text>\n  <Text size=\"xl\">(xl) The quick brown fox</Text>\n  <Text size=\"lg\">(lg) The quick brown fox</Text>\n  <Text size=\"base\">(base) The quick brown fox</Text>\n  <Text size=\"sm\">(sm) The quick brown fox</Text>\n  <Text size=\"xs\">(xs) The quick brown fox</Text>\n</VStack>`;\n\nconst truncateText = `<Text noOfLines={1}>\n  Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing\n  industries for previewing layouts and visual mockups.\n</Text>`;\n\nconst overrideStyle = `<Text fontSize=\"50px\" color=\"tomato\">\n  I'm using a custom font-size value for this text\n</Text>`;\n\nconst overrideElement = `<VStack alignItems=\"flex-start\">\n  <Text as=\"i\">Italic</Text>\n  <Text as=\"u\">Underline</Text>\n  <Text as=\"abbr\">I18N</Text>\n  <Text as=\"cite\">Citation</Text>\n  <Text as=\"del\">Deleted</Text>\n  <Text as=\"em\">Emphasis</Text>\n  <Text as=\"ins\">Inserted</Text>\n  <Text as=\"kbd\">Ctrl + C</Text>\n  <Text as=\"mark\">Highlighted</Text>\n  <Text as=\"s\">Strikethrough</Text>\n  <Text as=\"samp\">Sample</Text>\n  <Text as=\"sub\">sub</Text>\n  <Text as=\"sup\">sup</Text>\n</VStack>`;\n\nconst theming = `const config: HopeThemeConfig = {\n  components: {\n    Text: {\n      baseStyle: SystemStyleObject,\n      defaultProps: ThemeableTextOptions\n    }\n  }\n}`;\n\nexport const snippets = {\n  importComponent,\n  basicUsage,\n  sizes,\n  truncateText,\n  overrideStyle,\n  overrideElement,\n  theming,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/features/create-styles/index.tsx",
    "content": "import { Anchor, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function CreateStyles() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/features/css-prop\",\n    label: \"The css prop\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/features/responsive-styles\",\n    label: \"Responsive styles\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#the-css-function\", label: \"The `css` function\" },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Create styles</PageTitle>\n      <Text mb=\"$8\">\n        All Hope UI components are built with the{\" \"}\n        <Anchor href=\"https://stitches.dev\" external color=\"$primary11\" fontWeight=\"$semibold\">\n          stitches\n        </Anchor>{\" \"}\n        css-in-js libary. Meaning you can use all tools available in stitches to create styles in\n        Hope UI.\n      </Text>\n      <SectionTitle id=\"the-css-function\">\n        The <Code>css</Code> function\n      </SectionTitle>\n      <Text mb=\"$5\">\n        Hope UI expose the <Code>css</Code> function from <Code>@stitches/core</Code> configured\n        with the Hope UI theme.\n      </Text>\n      <CodeSnippet snippet={snippets.importCssFunction} mb=\"$8\" />\n      <Text mb=\"$5\">\n        If you don't like the style props API or your HTML is comming too verbose the css function\n        is a great way to extract your styles plus you get the full power of the stitches API.\n      </Text>\n      <CodeSnippet snippet={snippets.usingCssFunction} mb=\"$5\" />\n      <Text>\n        If you want to learn more, check out{\" \"}\n        <Anchor\n          href=\"https://stitches.dev/docs/framework-agnostic\"\n          external\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          stitches\n        </Anchor>{\" \"}\n        documentation.\n      </Text>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/features/create-styles/snippets.ts",
    "content": "const importCssFunction = `import { css } from \"@hope-ui/solid\"`;\n\nconst usingCssFunction = `import { css } from \"@hope-ui/solid\"\n\nconst myButtonStyles = css({\n  backgroundColor: \"gainsboro\",\n  borderRadius: \"9999px\",\n  fontSize: \"13px\",\n  padding: \"10px 15px\",\n  \"&:hover\": {\n    backgroundColor: \"lightgray\",\n  },\n})\n\nfunction MyButton() {\n  return <button class={myButtonStyles()}>Button</button>\n}`;\n\nexport const snippets = {\n  importCssFunction,\n  usingCssFunction,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/features/css-prop/index.tsx",
    "content": "import { Anchor, Box, Heading, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Link } from \"solid-app-router\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function CSSProp() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/features/style-props\",\n    label: \"Style props\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/features/create-styles\",\n    label: \"Create styles\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#defining-any-standard-css-property\", label: \"Defining any standard CSS property\" },\n    { href: \"#defining-css-custom-properties\", label: \"Defining CSS custom properties\" },\n    { href: \"#creating-nested-selectors\", label: \"Creating nested selectors\" },\n    { href: \"#targeting-other-hope-components\", label: \"tageting other Hope UI components\" },\n    { href: \"#targeting-other-solid-components\", label: \"tageting other SolidJS components\" },\n    { href: \"#custom-media-queries\", label: \"Custom media queries\" },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>\n        The <Code>css</Code> prop\n      </PageTitle>\n      <Text mb=\"$5\">\n        With <Code>css</Code> you can provide any valid CSS to an element and utilize tokens from\n        your theme to ensure consistency and that you are utilizing constraint-based design\n        principles when styling your application.\n      </Text>\n      <Text mb=\"$5\">\n        This prop provides a superset of CSS (contains all CSS properties/selectors in addition to\n        custom ones) that maps values directly from the theme, depending on the CSS property used.\n        Also, it allows a simple way of defining responsive values that correspond to the\n        breakpoints defined in the theme.\n      </Text>\n      <Text mb=\"$5\">\n        To find out which properties are theme-aware, see the{\" \"}\n        <Anchor\n          as={Link}\n          href=\"/docs/features/style-props\"\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          Style Props\n        </Anchor>\n        .\n      </Text>\n      <Text mb=\"$8\">\n        Although the <Code>css</Code> prop is considered an escape hatch, there are few cases where\n        it is needed.\n      </Text>\n      <SectionTitle id=\"defining-any-standard-css-property\">\n        Defining any standard CSS property\n      </SectionTitle>\n      <Text mb=\"$5\">\n        In case you need to set a CSS property that is not listed in the Style Props list, you can\n        use the <Code>css</Code> prop and pass it whatever CSS property you desire.\n      </Text>\n      <Text mb=\"$5\">\n        One such example is the <Code>filter</Code> property:\n      </Text>\n      <Preview snippet={snippets.defineStandardCSSProperty} mb=\"$12\">\n        <Box\n          as=\"img\"\n          src=\"http://placekitten.com/200/300\"\n          alt=\"a kitten\"\n          css={{ filter: \"blur(8px)\" }}\n        />\n      </Preview>\n      <SectionTitle id=\"defining-css-custom-properties\">\n        Defining CSS custom properties\n      </SectionTitle>\n      <Text mb=\"$5\">\n        Custom CSS properties can be defined via the <Code>css</Code> prop as well:\n      </Text>\n      <Preview snippet={snippets.defineCustomCSSProperty} mb=\"$12\">\n        <Box css={{ \"--my-color\": \"#53c8c4\" }}>\n          <Heading color=\"var(--my-color)\" size=\"4xl\">\n            This uses CSS Custom Properties!\n          </Heading>\n        </Box>\n      </Preview>\n      <SectionTitle id=\"creating-nested-selectors\">Creating nested selectors</SectionTitle>\n      <Text mb=\"$5\">\n        To create complex, nested selectors, you can use the <Code>&</Code> operator like in sass.\n      </Text>\n      <Preview snippet={snippets.createNestingSelectors} mb=\"$12\">\n        <Box borderWidth={2} borderColor=\"$primary9\" p=\"$5\" class=\"my-box\">\n          <Heading size=\"4xl\">\n            Hover the box...\n            <Box\n              as=\"span\"\n              color=\"$danger9\"\n              css={{\n                \".my-box:hover &\": {\n                  color: \"$success9\",\n                },\n              }}\n            >\n              And I will turn green!\n            </Box>\n          </Heading>\n        </Box>\n      </Preview>\n      <SectionTitle id=\"targeting-other-hope-components\">\n        Targeting other Hope UI components\n      </SectionTitle>\n      <Text mb=\"$5\">\n        Inside the <Code>css</Code> prop you can target other Hope UI components using string\n        interpolation in the selector.\n      </Text>\n      <CodeSnippet snippet={snippets.targetingOtherHopeComponent} mb=\"$12\" />\n\n      <SectionTitle id=\"targeting-other-solid-components\">\n        Targeting other SolidJS components\n      </SectionTitle>\n      <Text mb=\"$5\">\n        Inside the <Code>css</Code> prop you can target other SolidJS components using string\n        interpolation in the selector.\n      </Text>\n      <CodeSnippet snippet={snippets.targetingOtherSolidComponent} mb=\"$12\" />\n\n      <SectionTitle id=\"custom-media-queries\">Custom media queries</SectionTitle>\n      <Preview snippet={snippets.customMediaQueries}>\n        <Box\n          css={{\n            \"@media print\": {\n              display: \"none\",\n            },\n          }}\n        >\n          This text won't be shown when printing this page.\n        </Box>\n      </Preview>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/features/css-prop/snippets.ts",
    "content": "const defineStandardCSSProperty = `<Box \n  as=\"img\"\n  src='http://placekitten.com/200/300'\n  alt='a kitten'\n  css={{ filter: 'blur(8px)' }}\n/>\n`;\n\nconst defineCustomCSSProperty = `<Box css={{ \"--my-color\": \"#53c8c4\" }}>\n  <Heading color=\"var(--my-color)\" size=\"4xl\">\n    This uses CSS Custom Properties!\n  </Heading>\n</Box>`;\n\nconst createNestingSelectors = `<Box borderWidth={2} borderColor=\"$primary9\" p=\"$5\" class=\"my-box\">\n  <Heading size=\"4xl\">\n    Hover the box...\n    <Box\n      as=\"span\"\n      color=\"$danger9\"\n      css={{\n        \".my-box:hover &\": {\n          color: \"$success9\",\n        },\n      }}\n    >\n      And I will turn green!\n    </Box>\n  </Heading>\n</Box>`;\n\nconst targetingOtherHopeComponent = `<Center>\n  <Button\n    css={{\n      [\\`\\${Center} &\\`]: {\n        bg: \"red\",\n      },\n    }}\n  >\n    Button\n  </Button>\n</Center>`;\n\nconst targetingOtherSolidComponent = `function MyButton() {\n  return <button className=\"my-button\">My Button</button>\n}\n\n// Add a \\`toString\\` method which map to a css selector inside your component\n// Here we use the underlying button class name\nMyButton.toString = () => \".my-button\"\n\n<Center\n  css={{\n    [\\`& \\${MyButton}\\`]: {\n      bg: \"red\",\n    },\n  }}\n>\n  <MyButton />\n</Center>`;\n\nconst customMediaQueries = `<Box\n  css={{\n    '@media print': {\n      display: 'none',\n    },\n  }}\n>\n  This text won't be shown when printing this page.\n</Box>`;\n\nexport const snippets = {\n  defineStandardCSSProperty,\n  defineCustomCSSProperty,\n  createNestingSelectors,\n  targetingOtherHopeComponent,\n  targetingOtherSolidComponent,\n  customMediaQueries,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/features/global-styles/index.tsx",
    "content": "import { Anchor, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function GlobalStyles() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/features/responsive-styles\",\n    label: \"Responsive styles\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/features/hope-factory\",\n    label: \"Hope factory\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#the-globalcss-function\", label: \"The `globalCss` function\" },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Global styles</PageTitle>\n      <Text mb=\"$8\">For handling things like global resets, you can write global CSS styles.</Text>\n      <SectionTitle id=\"the-globalcss-function\">\n        The <Code>globalCss</Code> function\n      </SectionTitle>\n      <Text mb=\"$5\">\n        Hope UI expose the <Code>globalCss</Code> function from <Code>@stitches/core</Code>.\n      </Text>\n      <CodeSnippet snippet={snippets.importGlobalCssFunction} mb=\"$8\" />\n      <Text mb=\"$5\">\n        This function will return another function, which you must call in your app.\n      </Text>\n      <CodeSnippet snippet={snippets.usingGlobalCssFunction} mb=\"$8\" />\n      <Text>\n        If you want to learn more, check out{\" \"}\n        <Anchor\n          href=\"https://stitches.dev/docs/framework-agnostic#global-styles\"\n          external\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          stitches\n        </Anchor>{\" \"}\n        documentation.\n      </Text>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/features/global-styles/snippets.ts",
    "content": "const importGlobalCssFunction = `import { globalCss } from \"@hope-ui/solid\"`;\n\nconst usingGlobalCssFunction = `import { globalCss } from \"@hope-ui/solid\"\n\nconst globalStyles = globalCss({\n  '*': { \n    margin: 0, \n    padding: 0 \n  },\n});\n\nfunction App() {\n  globalStyles();\n\n  return <MyApp />\n}`;\n\nexport const snippets = {\n  importGlobalCssFunction,\n  usingGlobalCssFunction,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/features/hope-factory/index.tsx",
    "content": "import { Alert, AlertDescription, Anchor, hope, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Link } from \"solid-app-router\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function HopeFactory() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/features/global-styles\",\n    label: \"Global styles\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/theming/default-theme\",\n    label: \"Default theme\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#hope-jsx-elements\", label: \"Hope JSX elements\" },\n    { href: \"#hope-factory-function\", label: \"Hope factory function\" },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Hope factory</PageTitle>\n      <Text mb=\"$5\">\n        Hope factory serves as an <strong>object of hope enabled JSX elements</strong>, and also a{\" \"}\n        <strong>function that can be used to enable custom component</strong> receive hope's style\n        props.\n      </Text>\n      <CodeSnippet snippet={snippets.importHopeFactory} mb=\"$12\" />\n      <SectionTitle id=\"hope-jsx-elements\">Hope JSX elements</SectionTitle>\n      <Text mb=\"$5\">\n        Create base html elements with theme-aware style props using{\" \"}\n        <Code>hope.&lt;element&gt;</Code> notation. For example, if you want a plain html button\n        with ability to pass Hope UI styles, you can write <Code>&lt;hope.button /&gt;</Code>.\n      </Text>\n      <Preview snippet={snippets.hopeJsxElements} mb=\"$5\">\n        <hope.button px=\"$3\" py=\"$2\" bg=\"$success7\" rounded=\"$md\" _hover={{ bg: \"$success8\" }}>\n          Click me\n        </hope.button>\n      </Preview>\n      <Text mb=\"$8\">\n        This reduces the need to create custom component wrappers and name them. This syntax is\n        available for any html elements.\n      </Text>\n      <SectionTitle id=\"hope-factory-function\">Hope factory function</SectionTitle>\n      <Text mb=\"$5\">\n        This is a function that converts <strong>non-hope components</strong> or{\" \"}\n        <strong>jsx element</strong> to hope-enabled components so you can pass style props to them.\n      </Text>\n      <Text mb=\"$5\">\n        Consider the <Code>Link</Code> component of the <Code>solid-app-router</Code> package, let's\n        use the hope factory function to make possible to pass style props to it.\n      </Text>\n      <CodeSnippet snippet={snippets.hopeFactoryFunction} mb=\"$5\" />\n      <Alert status=\"warning\" mb=\"$10\">\n        <AlertDescription>\n          Considering that Hope UI uses <Code>stitches</Code> under the hood, ensure the non-hope\n          component accepts <Code>class</Code> as props for this to work correctly\n        </AlertDescription>\n      </Alert>\n      <SectionSubtitle>Attaching styles</SectionSubtitle>\n      <Text mb=\"$5\">\n        In some instances, you might need to attach specific styles to the component wrapped in the\n        hope factory\n      </Text>\n      <CodeSnippet snippet={snippets.attachingStyles} mb=\"$8\" />\n      <Text mb=\"$5\">You can also use the hope factory on jsx elements as well.</Text>\n      <CodeSnippet snippet={snippets.attachingStylesJsxElement} mb=\"$5\" />\n      <Text mb=\"$5\">\n        The <strong>baseClass</strong> property is the CSS class to use when targeting this\n        component in a css selector. This class will be applied to the rendered dom element.\n      </Text>\n      <Text>\n        Taking the above example, in stitches <Code>css()</Code> method or Hope UI <Code>css</Code>{\" \"}\n        prop, if you want to target all <Code>p</Code> in the <Code>Card</Code> component you can\n        use the css selector <Code>{\"${Card} p\"}</Code> and it will evaluate to{\" \"}\n        <Code>{\".my-card p\"}</Code>. If you want to learn more, check out \"Targeting other SolidJS\n        components\" in the{\" \"}\n        <Anchor\n          as={Link}\n          href=\"/docs/features/css-prop#targeting-other-solid-components\"\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          css prop\n        </Anchor>{\" \"}\n        documentation.\n      </Text>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/features/hope-factory/snippets.ts",
    "content": "const importHopeFactory = `import { hope } from \"@hope-ui/solid\"`;\n\nconst hopeJsxElements = `<hope.button \n  px=\"$3\" \n  py=\"$2\" \n  bg=\"$success7\"\n  rounded=\"$md\" \n  _hover={{ bg: \"$success8\" }}\n>\n  Click me\n</hope.button>`;\n\nconst hopeFactoryFunction = `import { hope } from \"@hope-ui/solid\"\nimport { Link } from \"solid-app-router\"\n\nconst HopeLink = hope(Link)\n\nfunction Example() {\n  return <HopeLink href=\"#\" bg=\"$danger3\" fontSize=\"12px\" />\n}`;\n\nconst attachingStyles = `const HopeLink = hope(Link, {\n  baseClass: \"my-link\",\n  baseStyle: {\n    color: \"$primary9\"\n  }\n})\n`;\n\nconst attachingStylesJsxElement = `const Card = hope(\"div\", {\n  baseClass: \"my-card\",\n  baseStyle: {\n    shadow: \"$lg\",\n    rounded: \"$lg\",\n    bg: \"white\",\n  },\n})`;\n\nexport const snippets = {\n  importHopeFactory,\n  hopeJsxElements,\n  hopeFactoryFunction,\n  attachingStyles,\n  attachingStylesJsxElement,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/features/responsive-styles/index.tsx",
    "content": "import {\n  Alert,\n  AlertDescription,\n  Anchor,\n  Box,\n  hope,\n  Image,\n  Table,\n  Tbody,\n  Td,\n  Text,\n  Th,\n  Thead,\n  Tr,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { For, onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nconst breakpoints = [\n  { name: \"@initial\", value: \"none\" },\n  { name: \"@sm\", value: \"@media (min-width: 640px)\" },\n  { name: \"@md\", value: \"@media (min-width: 768px)\" },\n  { name: \"@lg\", value: \"@media (min-width: 1024px)\" },\n  { name: \"@xl\", value: \"@media (min-width: 1280px)\" },\n  { name: \"@2xl\", value: \"@media (min-width: 1536px)\" },\n];\n\nexport default function ResponsiveStyles() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/features/create-styles\",\n    label: \"Create styles\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/features/global-styles\",\n    label: \"Global styles\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#the-object-syntax\", label: \"The object syntax\" },\n    { href: \"#usage-with-css-prop\", label: \"Usage with the `css` prop\" },\n    { href: \"#usage-with-css-function\", label: \"Usage with stitches `css` function\" },\n    { href: \"#demo\", label: \"Demo\" },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Responsive styles</PageTitle>\n      <Text mb=\"$5\">\n        Hope UI supports responsive styles out of the box. Instead of manually adding{\" \"}\n        <Code>@media</Code> queries and adding nested styles throughout your code, Hope UI allows\n        you to use an object syntax to add mobile-first responsive styles.\n      </Text>\n      <Alert status=\"info\" mb=\"$5\">\n        <AlertDescription>\n          Hope UI use the <Code>@media(min-width)</Code> media query to ensure your interfaces are\n          mobile-first.\n        </AlertDescription>\n      </Alert>\n      <Text mb=\"$5\">\n        Responsive syntax relies on the following breakpoints defined in the Hope UI theme:\n      </Text>\n      <hope.div overflowX=\"auto\" mb=\"$8\">\n        <Table dense>\n          <Thead bg=\"$neutral2\">\n            <Tr>\n              <Th>Name</Th>\n              <Th>Value</Th>\n            </Tr>\n          </Thead>\n          <Tbody color=\"$primary11\" fontFamily=\"$mono\">\n            <For each={breakpoints}>\n              {breakpoint => (\n                <Tr>\n                  <Td>{breakpoint.name}</Td>\n                  <Td>{breakpoint.value}</Td>\n                </Tr>\n              )}\n            </For>\n          </Tbody>\n        </Table>\n      </hope.div>\n      <Alert status=\"warning\" mb=\"$8\">\n        <AlertDescription>\n          Breakpoints are created during the <Code>createStitches</Code> call which occurs\n          internally in Hope UI, for this reason it is currently not possible to customize\n          breakpoint values.\n        </AlertDescription>\n      </Alert>\n      <SectionTitle id=\"the-object-syntax\">The object syntax</SectionTitle>\n      <Text mb=\"$4\">\n        All style props accept an object as value for mobile-first responsive styles.\n      </Text>\n      <Text mb=\"$5\">\n        Let's say you have a <Code>Box</Code> with the following properties:\n      </Text>\n      <CodeSnippet snippet={snippets.initialBox} mb=\"$8\" />\n      <Text mb=\"$5\">To make the width responsive here's what you need to do:</Text>\n      <CodeSnippet snippet={snippets.boxWithResponsiveWidth} mb=\"$12\" />\n      <SectionTitle id=\"usage-with-css-prop\">\n        Usage with the <Code>css</Code> prop\n      </SectionTitle>\n      <Text mb=\"$5\">\n        When using responsive styles with the <Code>css</Code> prop you don't need the{\" \"}\n        <Code>@initial</Code> breakpoint. It's like the normal way of creating mobile-first\n        responsive styles in CSS.\n      </Text>\n      <CodeSnippet snippet={snippets.usageWithCssProp} mb=\"$5\" />\n      <Text mb=\"$8\">\n        If you want to learn more, check out the{\" \"}\n        <Anchor\n          href=\"https://stitches.dev/docs/breakpoints#using-breakpoints-in-the-style-objects\"\n          external\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          stitches\n        </Anchor>{\" \"}\n        documentation.\n      </Text>\n      <SectionTitle id=\"usage-with-css-function\">\n        Usage with stitches <Code>css</Code> function\n      </SectionTitle>\n      <Text mb=\"$5\">\n        Like style props, variant created with stitches <Code>css</Code> function support responsive\n        styles.\n      </Text>\n      <CodeSnippet snippet={snippets.usageWithCssFunction} mb=\"$5\" />\n      <Text mb=\"$8\">\n        If you want to learn more, check out the{\" \"}\n        <Anchor\n          href=\"https://stitches.dev/docs/breakpoints#setting-an-initial-variant\"\n          external\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          stitches\n        </Anchor>{\" \"}\n        documentation.\n      </Text>\n      <SectionTitle id=\"demo\">Demo</SectionTitle>\n      <Text mb=\"$5\">\n        Here's a simple example of a marketing page component that uses a stacked layout on small\n        screens, and a side-by-side layout on larger screens{\" \"}\n        <strong>(resize your browser to see it in action):</strong>\n      </Text>\n      <Preview snippet={snippets.demo}>\n        <Box p=\"$4\" display={{ \"@md\": \"flex\" }}>\n          <Box flexShrink={0}>\n            <Image\n              borderRadius=\"$lg\"\n              width={{ \"@md\": \"$40\" }}\n              src=\"https://bit.ly/2jYM25F\"\n              alt=\"Woman paying for a purchase\"\n            />\n          </Box>\n          <Box mt={{ \"@initial\": \"$4\", \"@md\": 0 }} ml={{ \"@md\": \"$6\" }}>\n            <Text\n              fontWeight=\"$bold\"\n              textTransform=\"uppercase\"\n              fontSize=\"$sm\"\n              letterSpacing=\"$wide\"\n              color=\"$primary9\"\n            >\n              Marketing\n            </Text>\n            <Anchor\n              mt=\"$1\"\n              display=\"block\"\n              fontSize=\"$lg\"\n              lineHeight=\"$normal\"\n              fontWeight=\"$semibold\"\n              href=\"#\"\n            >\n              Finding customers for your new business\n            </Anchor>\n            <Text mt=\"$2\" color=\"$neutral11\">\n              Getting a new business off the ground is a lot of hard work. Here are five ideas you\n              can use to find your first customers.\n            </Text>\n          </Box>\n        </Box>\n      </Preview>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/features/responsive-styles/snippets.ts",
    "content": "const initialBox = `<Box bg=\"$primary9\" w=\"400px\">\n  This is a box\n</Box>`;\n\nconst boxWithResponsiveWidth = `<Box bg=\"$primary9\" w={{ \"@initial\": \"300px\", \"@sm\": \"400px\", \"@md\": \"500px\"}}>\n  This is a box\n</Box>`;\n\nconst usageWithCssProp = `<Box\n  css={{\n    bg: \"$primary9\", // no need to wrap inside \\`@initial\\`\n    \"@sm\": {\n      bg: \"$success9\",\n    },\n    \"@md\": {\n      bg: \"$info9\",\n    },\n  }}\n>\n  Box\n</Box>`;\n\nconst usageWithCssFunction = `import { css } from \"@hope-ui/solid\";\n\nconst cardStyles = css({\n  borderRadius: \"$lg\",\n  backgroundColor: \"white\",\n\n  variants: {\n    elevation: {\n      sm: {\n        boxShadow: \"$sm\",\n      },\n      md: {\n        boxShadow: \"$md\",\n      },\n    },\n  },\n});\n\n// Inside your component, use the same object syntax as style props\ncardStyles({\n  elevation: {\n    \"@initial\": \"sm\", // <- initial value, no breakpoint\n    \"@lg\": \"md\", // <- value at breakpoint \"lg\"\n  },\n});`;\n\nconst demo = `<Box p=\"$4\" display={{ \"@md\": \"flex\" }}>\n  <Box flexShrink={0}>\n    <Image\n      borderRadius=\"$lg\"\n      width={{ \"@md\": \"$40\" }}\n      src=\"https://bit.ly/2jYM25F\"\n      alt=\"Woman paying for a purchase\"\n    />\n  </Box>\n  <Box mt={{ \"@initial\": \"$4\", \"@md\": 0 }} ml={{ \"@md\": \"$6\" }}>\n    <Text\n      fontWeight=\"$bold\"\n      textTransform=\"uppercase\"\n      fontSize=\"$sm\"\n      letterSpacing=\"$wide\"\n      color=\"$primary9\"\n    >\n      Marketing\n    </Text>\n    <Anchor\n      mt=\"$1\"\n      display=\"block\"\n      fontSize=\"$lg\"\n      lineHeight=\"$normal\"\n      fontWeight=\"$semibold\"\n      href=\"#\"\n    >\n      Finding customers for your new business\n    </Anchor>\n    <Text mt=\"$2\" color=\"$neutral11\">\n      Getting a new business off the ground is a lot of hard work. Here are five ideas you\n      can use to find your first customers.\n    </Text>\n  </Box>\n</Box>`;\n\nexport const snippets = {\n  initialBox,\n  boxWithResponsiveWidth,\n  usageWithCssProp,\n  usageWithCssFunction,\n  demo,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/features/style-props/index.tsx",
    "content": "import { Alert, AlertDescription, Button, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { Link } from \"solid-app-router\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\nimport { StylePropsTable, StylePropsTableItem } from \"@/components/StylePropsTable\";\n\nimport { snippets } from \"./snippets\";\n\nconst marginPaddingProps: StylePropsTableItem[] = [\n  { prop: \"m, margin\", cssProperty: \"margin\", themeToken: \"space\" },\n  { prop: \"mt, marginTop\", cssProperty: \"margin-top\", themeToken: \"space\" },\n  { prop: \"mr, marginRight\", cssProperty: \"margin-right\", themeToken: \"space\" },\n  { prop: \"ms, marginStart\", cssProperty: \"margin-inline-start\", themeToken: \"space\" },\n  { prop: \"mb, marginBottom\", cssProperty: \"margin-bottom\", themeToken: \"space\" },\n  { prop: \"ml, marginLeft\", cssProperty: \"margin-left\", themeToken: \"space\" },\n  { prop: \"me, marginEnd\", cssProperty: \"margin-inline-end\", themeToken: \"space\" },\n  { prop: \"mx\", cssProperty: \"margin-inline-start + margin-inline-end\", themeToken: \"space\" },\n  { prop: \"my\", cssProperty: \"margin-top + margin-bottom\", themeToken: \"space\" },\n\n  { prop: \"p, padding\", cssProperty: \"padding\", themeToken: \"space\" },\n  { prop: \"pt, paddingTop\", cssProperty: \"padding-top\", themeToken: \"space\" },\n  { prop: \"pr, paddingRight\", cssProperty: \"padding-right\", themeToken: \"space\" },\n  { prop: \"ps, paddingStart\", cssProperty: \"padding-inline-start\", themeToken: \"space\" },\n  { prop: \"pb, paddingBottom\", cssProperty: \"padding-bottom\", themeToken: \"space\" },\n  { prop: \"pl, paddingLeft\", cssProperty: \"padding-left\", themeToken: \"space\" },\n  { prop: \"pe, paddingEnd\", cssProperty: \"padding-inline-end\", themeToken: \"space\" },\n  { prop: \"px\", cssProperty: \"padding-inline-start + padding-inline-end\", themeToken: \"space\" },\n  { prop: \"py\", cssProperty: \"padding-top + padding-bottom\", themeToken: \"space\" },\n];\n\nconst colorProps: StylePropsTableItem[] = [\n  { prop: \"color\", cssProperty: \"color\", themeToken: \"colors\" },\n  { prop: \"bg, background\", cssProperty: \"background\", themeToken: \"colors\" },\n  { prop: \"bgColor, backgroundColor\", cssProperty: \"background-color\", themeToken: \"colors\" },\n  { prop: \"opacity\", cssProperty: \"opacity\" },\n];\n\nconst typographyProps: StylePropsTableItem[] = [\n  { prop: \"fontFamily\", cssProperty: \"font-family\", themeToken: \"fonts\" },\n  { prop: \"fontSize\", cssProperty: \"font-size\", themeToken: \"fontSizes\" },\n  { prop: \"fontWeight\", cssProperty: \"font-weight\", themeToken: \"fontWeights\" },\n  { prop: \"lineHeight\", cssProperty: \"line-height\", themeToken: \"lineHeights\" },\n  { prop: \"letterSpacing\", cssProperty: \"letter-spacing\", themeToken: \"letterSpacings\" },\n  { prop: \"textAlign\", cssProperty: \"text-align\" },\n  { prop: \"fontStyle\", cssProperty: \"font-style\" },\n  { prop: \"textTransform\", cssProperty: \"text-transform\" },\n  { prop: \"textDecoration\", cssProperty: \"text-decoration\" },\n];\n\nconst layoutProps: StylePropsTableItem[] = [\n  { prop: \"d, display\", cssProperty: \"display\" },\n  { prop: \"verticalAlign\", cssProperty: \"vertical-align\" },\n  { prop: \"overflow\", cssProperty: \"overflow\" },\n  { prop: \"overflowX\", cssProperty: \"overflow-x\" },\n  { prop: \"overflowY\", cssProperty: \"overflow-y\" },\n];\n\nconst sizeProps: StylePropsTableItem[] = [\n  { prop: \"w, width\", cssProperty: \"width\", themeToken: \"sizes\" },\n  { prop: \"h, height\", cssProperty: \"height\", themeToken: \"sizes\" },\n  { prop: \"minW, minWidth\", cssProperty: \"min-width\", themeToken: \"sizes\" },\n  { prop: \"maxW, maxWidth\", cssProperty: \"max-width\", themeToken: \"sizes\" },\n  { prop: \"minH, minHeight\", cssProperty: \"min-height\", themeToken: \"sizes\" },\n  { prop: \"maxH, maxHeight\", cssProperty: \"max-height\", themeToken: \"sizes\" },\n  { prop: \"boxSize\", cssProperty: \"width + height\", themeToken: \"sizes\" },\n];\n\nconst flexboxProps: StylePropsTableItem[] = [\n  { prop: \"alignItems\", cssProperty: \"align-items\" },\n  { prop: \"alignContent\", cssProperty: \"align-content\" },\n  { prop: \"justifyItems\", cssProperty: \"justify-items\" },\n  { prop: \"justifyContent\", cssProperty: \"justify-content\" },\n  { prop: \"flexDirection, *direction\", cssProperty: \"flex-direction\" },\n  { prop: \"flexWrap, *wrap\", cssProperty: \"flex-wrap\" },\n  { prop: \"flex\", cssProperty: \"flex\" },\n  { prop: \"flexGrow\", cssProperty: \"flex-grow\" },\n  { prop: \"flexShrink\", cssProperty: \"flex-shrink\" },\n  { prop: \"flexBasis\", cssProperty: \"flex-basis\" },\n  { prop: \"alignSelf\", cssProperty: \"align-self\" },\n  { prop: \"justifySelf\", cssProperty: \"justify-self\" },\n  { prop: \"order\", cssProperty: \"order\" },\n];\n\nconst gridProps: StylePropsTableItem[] = [\n  { prop: \"gap\", cssProperty: \"gap\", themeToken: \"space\" },\n  { prop: \"rowGap\", cssProperty: \"row-gap\", themeToken: \"space\" },\n  { prop: \"columnGap\", cssProperty: \"column-gap\", themeToken: \"space\" },\n  { prop: \"gridTemplate\", cssProperty: \"grid-template\" },\n  { prop: \"gridTemplateColumns, *templateColumns\", cssProperty: \"grid-template-columns\" },\n  { prop: \"gridTemplateRows, *templateRows\", cssProperty: \"grid-template-rows\" },\n  { prop: \"gridTemplateAreas, *templateAreas\", cssProperty: \"grid-template-areas\" },\n  { prop: \"gridArea, *area\", cssProperty: \"grid-area\" },\n  { prop: \"gridRow\", cssProperty: \"grid-row\" },\n  { prop: \"gridRowStart, *rowStart\", cssProperty: \"grid-row-start\" },\n  { prop: \"gridRowEnd, *rowEnd\", cssProperty: \"grid-row-end\" },\n  { prop: \"gridColumn\", cssProperty: \"grid-column\" },\n  { prop: \"gridColumnStart, *colStart\", cssProperty: \"grid-column-start\" },\n  { prop: \"gridColumnEnd, *colEnd\", cssProperty: \"grid-column-end\" },\n  { prop: \"gridAutoFlow, *autoFlow\", cssProperty: \"grid-auto-flow\" },\n  { prop: \"gridAutoColumns, *autoColumns\", cssProperty: \"grid-auto-columns\" },\n  { prop: \"gridAutoRows, *autoRows\", cssProperty: \"grid-auto-rows\" },\n  { prop: \"placeItems\", cssProperty: \"place-items\" },\n  { prop: \"placeContent\", cssProperty: \"place-content\" },\n  { prop: \"placeSelf\", cssProperty: \"place-self\" },\n];\n\nconst borderProps: StylePropsTableItem[] = [\n  { prop: \"border\", cssProperty: \"border\" },\n  { prop: \"borderStyle\", cssProperty: \"border-style\" },\n  { prop: \"borderWidth\", cssProperty: \"border-width\", themeToken: \"sizes\" },\n  { prop: \"borderColor\", cssProperty: \"border-color\", themeToken: \"colors\" },\n  { prop: \"borderTop\", cssProperty: \"border-top\" },\n  { prop: \"borderTopStyle\", cssProperty: \"border-top-style\" },\n  { prop: \"borderTopWidth\", cssProperty: \"border-top-width\", themeToken: \"sizes\" },\n  { prop: \"borderTopColor\", cssProperty: \"border-top-color\", themeToken: \"colors\" },\n  { prop: \"borderRight\", cssProperty: \"border-right\" },\n  { prop: \"borderRightStyle\", cssProperty: \"border-right-style\" },\n  { prop: \"borderRightWidth\", cssProperty: \"border-right-width\", themeToken: \"sizes\" },\n  { prop: \"borderRightColor\", cssProperty: \"border-right-color\", themeToken: \"colors\" },\n  { prop: \"borderBottom\", cssProperty: \"border-bottom\" },\n  { prop: \"borderBottomStyle\", cssProperty: \"border-bottom-style\" },\n  { prop: \"borderBottomWidth\", cssProperty: \"border-bottom-width\", themeToken: \"sizes\" },\n  { prop: \"borderBottomColor\", cssProperty: \"border-bottom-color\", themeToken: \"colors\" },\n  { prop: \"borderLeft\", cssProperty: \"border-left\" },\n  { prop: \"borderLeftStyle\", cssProperty: \"border-left-style\" },\n  { prop: \"borderLeftWidth\", cssProperty: \"border-left-width\", themeToken: \"sizes\" },\n  { prop: \"borderLeftColor\", cssProperty: \"border-left-color\", themeToken: \"colors\" },\n  { prop: \"borderX\", cssProperty: \"border-right + border-left\" },\n  { prop: \"borderY\", cssProperty: \"border-top + border-bottom\" },\n];\n\nconst borderRadiusProps: StylePropsTableItem[] = [\n  { prop: \"borderRadius, rounded\", cssProperty: \"border-radius\", themeToken: \"radii\" },\n  { prop: \"borderTopLeftRadius\", cssProperty: \"border-top-left-radius\", themeToken: \"radii\" },\n  { prop: \"borderTopRightRadius\", cssProperty: \"border-top-right-radius\", themeToken: \"radii\" },\n  {\n    prop: \"borderBottomRightRadius\",\n    cssProperty: \"border-bottom-right-radius\",\n    themeToken: \"radii\",\n  },\n  { prop: \"borderBottomLeftRadius\", cssProperty: \"border-bottom-left-radius\", themeToken: \"radii\" },\n  {\n    prop: \"borderTopRadius\",\n    cssProperty: \"border-top-left-radius + border-top-right-radius\",\n    themeToken: \"radii\",\n  },\n  {\n    prop: \"borderRightRadius\",\n    cssProperty: \"border-top-right-radius + border-bottom-right-radius\",\n    themeToken: \"radii\",\n  },\n  {\n    prop: \"borderBottomRadius\",\n    cssProperty: \"border-bottom-left-radius + border-bottom-right-radius\",\n    themeToken: \"radii\",\n  },\n  {\n    prop: \"borderLeftRadius\",\n    cssProperty: \"border-top-left-radius + border-bottom-left-radius\",\n    themeToken: \"radii\",\n  },\n];\n\nconst positionProps: StylePropsTableItem[] = [\n  { prop: \"pos, position\", cssProperty: \"position\" },\n  { prop: \"zIndex\", cssProperty: \"z-index\", themeToken: \"zIndices\" },\n  { prop: \"top\", cssProperty: \"top\", themeToken: \"space\" },\n  { prop: \"right\", cssProperty: \"right\", themeToken: \"space\" },\n  { prop: \"bottom\", cssProperty: \"bottom\", themeToken: \"space\" },\n  { prop: \"left\", cssProperty: \"left\", themeToken: \"space\" },\n];\n\nconst shadowProps: StylePropsTableItem[] = [\n  { prop: \"textShadow\", cssProperty: \"text-shadow\", themeToken: \"shadows\" },\n  { prop: \"shadow, boxShadow\", cssProperty: \"box-shadow\", themeToken: \"shadows\" },\n];\n\nconst pseudoProps: StylePropsTableItem[] = [\n  { prop: \"_hover\", cssProperty: \"&:hover, &[data-hover]\" },\n  { prop: \"_active\", cssProperty: \"&:active, &[data-active]\" },\n  { prop: \"_focus\", cssProperty: \"&:focus, &[data-focus]\" },\n  { prop: \"_highlighted\", cssProperty: \"&[data-highlighted]\" },\n  { prop: \"_focusWithin\", cssProperty: \"&:focus-within\" },\n  { prop: \"_focusVisible\", cssProperty: \"&:focus-visible\" },\n  { prop: \"_disabled\", cssProperty: \"&[disabled], &[aria-disabled=true], &[data-disabled]\" },\n  { prop: \"_readOnly\", cssProperty: \"&[aria-readonly=true], &[readonly], &[data-readonly]\" },\n  { prop: \"_before\", cssProperty: \"&::before\" },\n  { prop: \"_after\", cssProperty: \"&::after\" },\n  { prop: \"_empty\", cssProperty: \"&:empty\" },\n  { prop: \"_expanded\", cssProperty: \"&[aria-expanded=true], &[data-expanded]\" },\n  { prop: \"_checked\", cssProperty: \"&[aria-checked=true], &[data-checked]\" },\n  { prop: \"_grabbed\", cssProperty: \"&[aria-grabbed=true], &[data-grabbed]\" },\n  { prop: \"_pressed\", cssProperty: \"&[aria-pressed=true], &[data-pressed]\" },\n  { prop: \"_invalid\", cssProperty: \"&[aria-invalid=true], &[data-invalid]\" },\n  { prop: \"_valid\", cssProperty: \"&[data-valid], &[data-state=valid]\" },\n  { prop: \"_loading\", cssProperty: \"&[data-loading], &[aria-busy=true]\" },\n  { prop: \"_selected\", cssProperty: \"&[aria-selected=true], &[data-selected]\" },\n  { prop: \"_hidden\", cssProperty: \"&[hidden], &[data-hidden]\" },\n  { prop: \"_even\", cssProperty: \"&:nth-of-type(even)\" },\n  { prop: \"_odd\", cssProperty: \"&:nth-of-type(odd)\" },\n  { prop: \"_first\", cssProperty: \"&:first-of-type\" },\n  { prop: \"_last\", cssProperty: \"&:last-of-type\" },\n  { prop: \"_notFirst\", cssProperty: \"&:not(:first-of-type)\" },\n  { prop: \"_notLast\", cssProperty: \"&:not(:last-of-type)\" },\n  { prop: \"_visited\", cssProperty: \"&:visited\" },\n  { prop: \"_activeLink\", cssProperty: \"&[aria-current=page]\" },\n  { prop: \"_activeStep\", cssProperty: \"&[aria-current=step]\" },\n  {\n    prop: \"_indeterminate\",\n    cssProperty: \"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]\",\n  },\n  {\n    prop: \"_groupHover\",\n    cssProperty:\n      \"[role=group]:hover &, [role=group][data-hover] &, [data-group]:hover &, [data-group][data-hover] &, .group:hover &, .group[data-hover] &\",\n  },\n  {\n    prop: \"_peerHover\",\n    cssProperty:\n      \"[data-peer]:hover ~ &, [data-peer][data-hover] ~ &, .peer:hover ~ &, .peer[data-hover] ~ &\",\n  },\n  {\n    prop: \"_groupFocus\",\n    cssProperty:\n      \"[role=group]:focus &, [role=group][data-focus] &, [data-group]:focus &, [data-group][data-focus] &, .group:focus &, .group[data-focus] &\",\n  },\n  {\n    prop: \"_peerFocus\",\n    cssProperty:\n      \"[data-peer]:focus ~ &, [data-peer][data-focus] ~ &, .peer:focus ~ &, .peer[data-focus] ~ &\",\n  },\n  {\n    prop: \"_groupFocusVisible\",\n    cssProperty:\n      \"[role=group]:focus-visible &, [data-group]:focus-visible &, .group:focus-visible &\",\n  },\n  {\n    prop: \"_peerFocusVisible\",\n    cssProperty: \"[data-peer]:focus-visible ~ &, .peer:focus-visible ~ &\",\n  },\n  {\n    prop: \"_groupActive\",\n    cssProperty:\n      \"[role=group]:active &, [role=group][data-active] &, [data-group]:active &, [data-group][data-active] &, .group:active &, .group[data-active] &\",\n  },\n  {\n    prop: \"_peerActive\",\n    cssProperty:\n      \"[data-peer]:active ~ &, [data-peer][data-active] ~ &, .peer:active ~ &, .peer[data-active] ~ &\",\n  },\n  {\n    prop: \"_groupSelected\",\n    cssProperty:\n      \"[role=group][aria-selected=true] &, [role=group][data-selected] &, [data-group][aria-selected=true] &, [data-group][data-selected] &, .group[aria-selected=true] &, .group[data-selected] &\",\n  },\n  {\n    prop: \"_peerSelected\",\n    cssProperty:\n      \"[data-peer][aria-selected=true] ~ &, [data-peer][data-selected] ~ &, .peer[aria-selected=true] ~ &, .peer[data-selected] ~ &\",\n  },\n  {\n    prop: \"_groupDisabled\",\n    cssProperty:\n      \"[role=group]:disabled &, [role=group][data-disabled] &, [data-group]:disabled &, [data-group][data-disabled] &, .group:disabled &, .group[data-disabled] &\",\n  },\n  {\n    prop: \"_peerDisabled\",\n    cssProperty:\n      \"[data-peer]:disabled ~ &, [data-peer][data-disabled] ~ &, .peer:disabled ~ &, .peer[data-disabled] ~ &\",\n  },\n  {\n    prop: \"_groupInvalid\",\n    cssProperty:\n      \"[role=group]:invalid &, [role=group][data-invalid] &, [data-group]:invalid &, [data-group][data-invalid] &, .group:invalid &, .group[data-invalid] &\",\n  },\n  {\n    prop: \"_peerInvalid\",\n    cssProperty:\n      \"[data-peer]:invalid ~ &, [data-peer][data-invalid] ~ &, .peer:invalid ~ &, .peer[data-invalid] ~ &\",\n  },\n  {\n    prop: \"_groupChecked\",\n    cssProperty:\n      \"[role=group]:checked &, [role=group][data-checked] &, [data-group]:checked &, [data-group][data-checked] &, .group:checked &, .group[data-checked] &\",\n  },\n  {\n    prop: \"_peerChecked\",\n    cssProperty:\n      \"[data-peer]:checked ~ &, [data-peer][data-checked] ~ &, .peer:checked ~ &, .peer[data-checked] ~ &\",\n  },\n  {\n    prop: \"_groupFocusWithin\",\n    cssProperty: \"[role=group]:focus-within &, [data-group]:focus-within &, .group:focus-within &\",\n  },\n  { prop: \"_peerFocusWithin\", cssProperty: \"[data-peer]:focus-within ~ &, .peer:focus-within ~ &\" },\n  {\n    prop: \"_peerPlaceholderShown\",\n    cssProperty: \"[data-peer]:placeholder-shown ~ &, .peer:placeholder-shown ~ &\",\n  },\n  { prop: \"_placeholder\", cssProperty: \"&::placeholder\" },\n  { prop: \"_placeholderShown\", cssProperty: \"&:placeholder-shown\" },\n  { prop: \"_fullScreen\", cssProperty: \"&:fullscreen\" },\n  { prop: \"_selection\", cssProperty: \"&::selection\" },\n  { prop: \"_mediaDark\", cssProperty: \"@media (prefers-color-scheme: dark)\" },\n  { prop: \"_mediaReduceMotion\", cssProperty: \"@media (prefers-reduced-motion: reduce)\" },\n  { prop: \"_dark\", cssProperty: \".hope-ui-dark &\" },\n  { prop: \"_light\", cssProperty: \".hope-ui-light &\" },\n];\n\nconst othersProps: StylePropsTableItem[] = [\n  { prop: \"appearance\", cssProperty: \"appearance\" },\n  { prop: \"userSelect\", cssProperty: \"user-select\" },\n  { prop: \"pointerEvents\", cssProperty: \"pointer-events\" },\n  { prop: \"transition\", cssProperty: \"transition\" },\n  { prop: \"resize\", cssProperty: \"resize\" },\n  { prop: \"cursor\", cssProperty: \"cursor\" },\n  { prop: \"outline\", cssProperty: \"outline\" },\n  { prop: \"outlineOffset\", cssProperty: \"outline-offset\" },\n  { prop: \"outlineColor\", cssProperty: \"outline-color\" },\n];\n\nexport default function StyleProps() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/changelog\",\n    label: \"Changelog\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/features/css-prop\",\n    label: \"The css prop\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#margin-padding\", label: \"Margin and padding\" },\n    { href: \"#colors\", label: \"Colors\" },\n    { href: \"#typography\", label: \"Typography\" },\n    { href: \"#layout\", label: \"Layout\" },\n    { href: \"#size\", label: \"Size\" },\n    { href: \"#flexbox\", label: \"Flexbox\" },\n    { href: \"#grid-layout\", label: \"Grid layout\" },\n    { href: \"#border\", label: \"Borders\" },\n    { href: \"#border-radius\", label: \"Border radius\" },\n    { href: \"#position\", label: \"Position\" },\n    { href: \"#shadow\", label: \"Shadow\" },\n    { href: \"#pseudo\", label: \"Pseudo selectors\" },\n    { href: \"#others\", label: \"Others\" },\n    { href: \"#as-prop\", label: \"The `as` prop\" },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Style props</PageTitle>\n\n      <Text mb=\"$6\">\n        Style props are a way to alter the style of a component by simply passing props to it. It\n        helps to save time by providing helpful shorthand ways to style components.\n      </Text>\n      <SectionTitle>Reference</SectionTitle>\n      <Text mb=\"$5\">\n        The following table shows a list of every style prop and the properties within each group.\n      </Text>\n      <SectionSubtitle id=\"margin-padding\">Margin and padding</SectionSubtitle>\n      <CodeSnippet snippet={snippets.marginPadding} mb=\"$8\" />\n      <StylePropsTable items={marginPaddingProps} mb=\"$12\" />\n\n      <SectionSubtitle id=\"colors\">Color</SectionSubtitle>\n      <CodeSnippet snippet={snippets.colors} mb=\"$8\" />\n      <StylePropsTable items={colorProps} mb=\"$12\" />\n\n      <SectionSubtitle id=\"typography\">Typography</SectionSubtitle>\n      <CodeSnippet snippet={snippets.typography} mb=\"$8\" />\n      <StylePropsTable items={typographyProps} mb=\"$12\" />\n\n      <SectionSubtitle id=\"layout\">Layout</SectionSubtitle>\n      <CodeSnippet snippet={snippets.layout} mb=\"$8\" />\n      <StylePropsTable items={layoutProps} mb=\"$12\" />\n\n      <SectionSubtitle id=\"size\">Size</SectionSubtitle>\n      <CodeSnippet snippet={snippets.size} mb=\"$8\" />\n      <StylePropsTable items={sizeProps} mb=\"$12\" />\n\n      <SectionSubtitle id=\"flexbox\">Flexbox</SectionSubtitle>\n      <CodeSnippet snippet={snippets.flexbox} mb=\"$4\" />\n      <Alert status=\"warning\" mb=\"$8\">\n        <AlertDescription>\n          Props marked with an <Code>*</Code> will only work if you use the <Code>Flex</Code> or{\" \"}\n          <Code>Stack</Code> components.\n        </AlertDescription>\n      </Alert>\n      <StylePropsTable items={flexboxProps} mb=\"$12\" />\n\n      <SectionSubtitle id=\"grid-layout\">Grid layout</SectionSubtitle>\n      <CodeSnippet snippet={snippets.grid} mb=\"$4\" />\n      <Alert status=\"warning\" mb=\"$8\">\n        <AlertDescription>\n          Props marked with an <Code>*</Code> will only work if you use the <Code>Grid</Code> and{\" \"}\n          <Code>GridItem</Code> components.\n        </AlertDescription>\n      </Alert>\n      <StylePropsTable items={gridProps} mb=\"$12\" />\n\n      <SectionSubtitle id=\"border\">Borders</SectionSubtitle>\n      <CodeSnippet snippet={snippets.borders} mb=\"$8\" />\n      <StylePropsTable items={borderProps} mb=\"$12\" />\n\n      <SectionSubtitle id=\"border-radius\">Border radius</SectionSubtitle>\n      <CodeSnippet snippet={snippets.borderRadius} mb=\"$8\" />\n      <StylePropsTable items={borderRadiusProps} mb=\"$12\" />\n\n      <SectionSubtitle id=\"position\">Position</SectionSubtitle>\n      <CodeSnippet snippet={snippets.position} mb=\"$8\" />\n      <StylePropsTable items={positionProps} mb=\"$12\" />\n\n      <SectionSubtitle id=\"shadow\">Shadow</SectionSubtitle>\n      <CodeSnippet snippet={snippets.shadow} mb=\"$8\" />\n      <StylePropsTable items={shadowProps} mb=\"$12\" />\n\n      <SectionSubtitle id=\"pseudo\">Pseudo selectors</SectionSubtitle>\n      <CodeSnippet snippet={snippets.pseudo} mb=\"$8\" />\n      <StylePropsTable items={pseudoProps} mb=\"$12\" />\n\n      <SectionSubtitle id=\"others\">Others</SectionSubtitle>\n      <StylePropsTable items={othersProps} mb=\"$12\" />\n\n      <SectionTitle id=\"as-prop\">\n        The <Code>as</Code> prop\n      </SectionTitle>\n      <Text mb=\"$5\">\n        All Hope UI components are polymorphic, meaning you can use the <Code>as</Code> prop to\n        change the rendered element.\n      </Text>\n      <Text mb=\"$5\">\n        For example, say you are using a <Code>Button</Code> component, and you need to make it a\n        link instead. You can compose <Code>a</Code> and <Code>Button</Code> like this:\n      </Text>\n      <Preview snippet={snippets.asPropWithHTMLElement} mb=\"$8\">\n        <Button as=\"a\" target=\"_blank\" href=\"https://solidjs.com/\">\n          Go to SolidJS website\n        </Button>\n      </Preview>\n      <Text mb=\"$5\">And it works with SolidJS components too:</Text>\n      <Preview snippet={snippets.asPropWithComponent} mb=\"$5\">\n        <Button as={Link} href=\"/\">\n          Back to home\n        </Button>\n      </Preview>\n      <Text>\n        If you are using TypeScript you will get proper auto-completion based on the value of the{\" \"}\n        <Code>as</Code> prop.\n      </Text>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/features/style-props/snippets.ts",
    "content": "const asPropWithHTMLElement = `<Button as=\"a\" target=\"_blank\" href=\"https://solidjs.com\">\n  Go to SolidJS website\n</Button>`;\n\nconst asPropWithComponent = `import { Link } from \"solid-app-router\";\n\n<Button as={Link} href=\"/\">\n  Back to home\n</Button>`;\n\nconst marginPadding = `import { Box } from \"@hope-ui/solid\"\n\n// $2 refers to the value of \\`theme().space[2]\\`\n<Box m=\"$2\">Tomato</Box>\n\n// You can also use custom values\n<Box maxW=\"960px\" mx=\"auto\" />\n\n// sets margin \\`8px\\` on all viewports and \\`12px\\` from the first breakpoint and up\n<Box m={{ \"@initial\": \"$2\", \"@sm\": \"$3\" }} />\n`;\n\nconst colors = `import { Box } from \"@hope-ui/solid\"\n\n// $neutral9 refers to the value of \\`theme().colors.neutral9\\`\n<Box color=\"$neutral9\" />\n\n// raw CSS color value\n<Box color=\"#f00\" />\n\n// background colors\n<Box bg=\"tomato\" />\n\n// verbose prop\n<Box backgroundColor=\"tomato\" />`;\n\nconst typography = `import { Text } from \"@hope-ui/solid\"\n\n// font-size of \\`theme().fontSizes.base\\`\n<Text fontSize=\"$base\" />\n\n// font-size \\`32px\\`\n<Text fontSize={32} />\n\n// font-size \\`\"2em\"\\`\n<Text fontSize=\"2em\" />\n\n// text-align \\`left\\` on all viewports and \\`center\\` from the first breakpoint and up\n<Text textAlign={{ \"@initial\": \"left\", \"@sm\": \"center\" }} />`;\n\nconst layout = `import { Box } from \"@hope-ui/solid\"\n\n// verbose\n<Box display=\"flex\" />\n\n// shorthand\n<Box d=\"flex\" />`;\n\nconst size = `import { Box } from \"@hope-ui/solid\"\n\n// verbose\n<Box width=\"100%\" height={32} />\n\n// shorthand\n<Box w=\"100%\" h=\"32px\" />\n\n// use theme sizing\n<Box boxSize=\"$sm\" />\n\n// width \\`256px\\`\n<Box w={256} />\n\n// width \\`\"40px\"\\`\n<Box w=\"40px\" />`;\n\nconst flexbox = `import { Box, Flex } from \"@hope-ui/solid\"\n\n// verbose\n<Box display=\"flex\" alignItems=\"center\" justifyContent=\"space-between\">\n  Box with Flex props\n</Box>\n\n// shorthand using the \\`Flex\\` component\n<Flex alignItems=\"center\" justifyContent=\"center\">\n  Flex Container\n</Flex>`;\n\nconst grid = `import { Box, Grid } from \"@hope-ui/solid\"\n\n// verbose\n<Box display=\"grid\" gap={2} gridAutoFlow=\"row dense\">\n  Grid\n</Box>\n\n// shorthand using the \\`Grid\\` component\n<Grid gap={2} autoFlow=\"row dense\">\n  Grid\n</Grid>`;\n\nconst borders = `import { Box } from \"@hope-ui/solid\"\n\n<Box border=\"1px\" borderColor=\"$neutral6\">\n  Card\n</Box>`;\n\nconst borderRadius = `import { Button } from \"@hope-ui/solid\"\n\n// This button will have no right borderRadius\n<Button borderRightRadius=\"0\">Button 1</Button>\n\n// This button will have no left borderRadius\n<Button borderLeftRadius=\"0\">Button 2</Button>\n\n// top left and top right radius will be \\`theme().radii.md\\` => 6px\n<Button borderTopRadius=\"$md\">Button 3</Button>`;\n\nconst position = `import { Box } from \"@hope-ui/solid\"\n\n// verbose\n<Box position=\"absolute\">Cover</Box>\n\n// shorthand\n<Box pos=\"absolute\">Cover</Box>\n<Box pos=\"absolute\" top=\"0\" left=\"0\">\n  Absolute with top and left\n</Box>\n\n<Box pos=\"fixed\" w=\"100%\" zIndex={2}>\n  Fixed with zIndex\n</Box>`;\n\nconst shadow = `import { Box } from \"@hope-ui/solid\"\n\n// use \\`theme().shadows.md\\`\n<Box boxShadow=\"$md\">\n  md\n</Box>\n`;\n\nconst pseudo = `import { Button } from \"@hope-ui/solid\"\n\n// :hover style\n<Button\n  colorScheme=\"primary\"\n  _hover={{\n    background: \"white\",\n    color: \"$danger9\",\n  }}\n>\n  Hover me\n</Button>\n\n// apply :hover over parent element\n<Box role=\"group\">\n  <Box\n    _hover={{ fontWeight: \"semibold\" }}\n    _groupHover={{ color: \"tomato\" }}\n  >\n  </Box>\n</Box>`;\n\nexport const snippets = {\n  asPropWithHTMLElement,\n  asPropWithComponent,\n  marginPadding,\n  colors,\n  typography,\n  layout,\n  size,\n  flexbox,\n  grid,\n  borders,\n  borderRadius,\n  position,\n  shadow,\n  pseudo,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/getting-started/changelog/index.tsx",
    "content": "import { Anchor, Text } from \"@hope-ui/solid\";\n\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\n\nexport default function Changelog() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/getting-started\",\n    label: \"Installation\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/features/style-props\",\n    label: \"Style props\",\n  };\n\n  return (\n    <PageLayout previousLink={previousLink} nextLink={nextLink}>\n      <PageTitle>Changelog</PageTitle>\n      <Text>\n        All notable changes of the current major version are described in the{\" \"}\n        <Anchor\n          href=\"https://github.com/fabien-ml/hope-ui/blob/main/packages/solid/CHANGELOG.md\"\n          external\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          CHANGELOG.md\n        </Anchor>{\" \"}\n        file.\n      </Text>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/getting-started/installation/index.tsx",
    "content": "import { Alert, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function Installation() {\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/changelog\",\n    label: \"Changelog\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#installation\", label: \"Installlation\" },\n    { href: \"#provider-setup\", label: \"Provider setup\" },\n    { href: \"#optional-setup\", label: \"Optional setup\" },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout nextLink={nextLink} contextualNavLinks={contextualNavLinks}>\n      <PageTitle>Getting Started</PageTitle>\n      <Alert status=\"warning\" mb=\"$4\">\n        <strong>Warning:</strong>&nbsp;Hope UI v0.x is not compatible with Solid Start and doesn't\n        support SSR.\n      </Alert>\n      <SectionTitle id=\"installation\">Installation</SectionTitle>\n      <Text mb=\"$5\">\n        Inside your SolidJS project, install Hope UI by running either of the following:\n      </Text>\n      <CodeSnippet lang=\"bash\" snippet={snippets.npmInstall} mb=\"$3\" />\n      <CodeSnippet lang=\"bash\" snippet={snippets.yarnAdd} mb=\"$3\" />\n      <CodeSnippet lang=\"bash\" snippet={snippets.pnpmAdd} mb=\"$12\" />\n      <SectionTitle id=\"provider-setup\">Provider setup</SectionTitle>\n      <Text mb=\"$5\">\n        After installing Hope UI, you need to set up the <Code>HopeProvider</Code> at the root of\n        your application. This can be either in your <Code>index.jsx</Code> or{\" \"}\n        <Code>index.tsx</Code>\n      </Text>\n      <Text mb=\"$5\">Put in the following code:</Text>\n      <CodeSnippet snippet={snippets.providerSetup} mb=\"$12\" />\n      <SectionTitle id=\"optional-setup\">Optional setup</SectionTitle>\n      <Text mb=\"$3\">\n        If you intend to customise the default theme to match your design requirements, you can\n        extend the <Code>theme</Code> from <Code>@hope-ui/solid</Code>.\n      </Text>\n      <Text mb=\"$5\">\n        The HopeProvider accept a <Code>config</Code> prop that deep merges the default theme with\n        your customizations.\n      </Text>\n      <CodeSnippet snippet={snippets.customizeTheme} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/getting-started/installation/snippets.ts",
    "content": "const npmInstall = \"npm install @hope-ui/solid @stitches/core solid-transition-group\";\nconst yarnAdd = \"yarn add @hope-ui/solid @stitches/core solid-transition-group\";\nconst pnpmAdd = \"pnpm add @hope-ui/solid @stitches/core solid-transition-group\";\n\nconst providerSetup = `// 1. import \\`HopeProvider\\` component\nimport { HopeProvider } from '@hope-ui/solid'\n\n// 2. Wrap HopeProvider at the root of your app\nfunction App() {\n  return (\n    <HopeProvider>\n      <MyApp />\n    </HopeProvider>\n  )\n}`;\n\nconst customizeTheme = `// 1. Import the \\`HopeThemeConfig\\` type\nimport { HopeThemeConfig, HopeProvider } from '@hope-ui/solid'\n\n// 2. Create a theme config to include custom colors, fonts, etc\nconst config: HopeThemeConfig = {\n  lightTheme: {\n    colors: {\n      primary9: \"salmon\"\n    }\n  }\n}\n\n// 3. Pass the \\`config\\` prop to the \\`HopeProvider\\`\nfunction App() {\n  return (\n    <HopeProvider config={config}>\n      <MyApp />\n    </HopeProvider>\n  )\n}`;\n\nexport const snippets = {\n  npmInstall,\n  yarnAdd,\n  pnpmAdd,\n  providerSetup,\n  customizeTheme,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/landing-page.tsx",
    "content": "import {\n  Anchor,\n  Box,\n  Button,\n  Center,\n  Container,\n  GridItem,\n  Heading,\n  HStack,\n  HTMLHopeProps,\n  SimpleGrid,\n  Stack,\n  Text,\n  VStack,\n  VStackProps,\n} from \"@hope-ui/solid\";\nimport { Link } from \"solid-app-router\";\n\nimport Footer from \"@/components/Footer\";\nimport Header from \"@/components/Header\";\nimport { IconAccessibility } from \"@/icons/IconAccessibility\";\nimport { IconCode } from \"@/icons/IconCode\";\nimport { IconComponent } from \"@/icons/IconComponent\";\nimport { IconGithub } from \"@/icons/IconGithub\";\nimport { IconMoon } from \"@/icons/IconMoon\";\nimport { IconPalette } from \"@/icons/IconPalette\";\nimport { IconRocket } from \"@/icons/IconRocket\";\nimport { Portal } from \"solid-js/web\";\n\nfunction HeroSection(props: VStackProps) {\n  return (\n    <VStack\n      minH=\"calc(100vh - 92px)\"\n      maxW=\"$containerLg\"\n      mx={{ \"@initial\": \"$4\", \"@lg\": \"auto\" }}\n      textAlign=\"center\"\n      justifyContent=\"center\"\n      {...props}\n    >\n      <Heading\n        level=\"1\"\n        size={{ \"@initial\": \"4xl\", \"@sm\": \"5xl\", \"@md\": \"6xl\" }}\n        fontWeight=\"$black\"\n        mb={{ \"@initial\": \"$6\", \"@sm\": \"$8\", \"@md\": \"$10\" }}\n      >\n        The SolidJS component library you've{\" \"}\n        <Text as=\"span\" color=\"$primary10\">\n          hoped\n        </Text>{\" \"}\n        for\n      </Heading>\n      <Text size={{ \"@initial\": \"base\", \"@sm\": \"xl\" }} color=\"$neutral11\" maxW=\"$prose\" mb=\"$8\">\n        Hope UI is a composable and accessible component library that gives you the foundation to\n        build your next SolidJS application.\n      </Text>\n      <Stack\n        direction={{ \"@initial\": \"column\", \"@sm\": \"row\" }}\n        spacing=\"$4\"\n        justifyContent=\"center\"\n        alignItems=\"center\"\n        w=\"$full\"\n        mb={{ \"@initial\": \"$4\", \"@sm\": 0 }}\n      >\n        <Button\n          as={Link}\n          href=\"/docs/getting-started\"\n          size=\"xl\"\n          rounded=\"$lg\"\n          fullWidth={{ \"@initial\": true, \"@sm\": false }}\n        >\n          Get Started\n        </Button>\n        <Button\n          as=\"a\"\n          target=\"_blank\"\n          rel=\"noopenner noreferrer\"\n          href=\"https://github.com/fabien-ml/hope-ui\"\n          variant=\"subtle\"\n          colorScheme=\"neutral\"\n          size=\"xl\"\n          rounded=\"$lg\"\n          leftIcon={<IconGithub />}\n          fullWidth={{ \"@initial\": true, \"@sm\": false }}\n        >\n          Github\n        </Button>\n      </Stack>\n    </VStack>\n  );\n}\n\nfunction FeatureSection(props: HTMLHopeProps<\"div\">) {\n  return (\n    <Box minH=\"calc(100vh - 92px)\" bg=\"$neutral2\" {...props}>\n      <Container>\n        <VStack mx={{ \"@initial\": \"$4\", \"@xl\": \"auto\" }} py={{ \"@initial\": \"$10\", \"@sm\": \"$20\" }}>\n          <Heading\n            level={2}\n            color=\"$primary9\"\n            fontSize=\"$sm\"\n            fontWeight=\"$semibold\"\n            textTransform=\"uppercase\"\n            letterSpacing=\"$wide\"\n            mb={{ \"@initial\": \"$1\", \"@sm\": \"$2\" }}\n          >\n            Iterate fast\n          </Heading>\n          <Text\n            size={{ \"@initial\": \"2xl\", \"@sm\": \"3xl\", \"@md\": \"4xl\" }}\n            fontWeight=\"$black\"\n            textAlign=\"center\"\n            mb={{ \"@initial\": \"$4\", \"@sm\": \"$6\" }}\n          >\n            Do it yourself, but not alone.\n          </Text>\n          <Text\n            size={{ \"@initial\": \"base\", \"@sm\": \"xl\" }}\n            color=\"$neutral11\"\n            textAlign=\"center\"\n            maxW=\"$prose\"\n            mb={{ \"@initial\": \"$14\", \"@sm\": \"$20\" }}\n          >\n            Hope UI provides the foundation for building your application's user interface, giving\n            you the ability to focus on what really matter for your users.\n          </Text>\n          <SimpleGrid\n            columns={{ \"@initial\": 1, \"@sm\": 2, \"@lg\": 3 }}\n            columnGap=\"$12\"\n            rowGap={{ \"@initial\": \"$14\", \"@sm\": \"$20\" }}\n            mx=\"auto\"\n          >\n            <GridItem\n              as={VStack}\n              bg=\"$neutral3\"\n              rounded=\"$sm\"\n              px=\"$6\"\n              pb=\"$6\"\n              maxW=\"$sm\"\n              textAlign=\"center\"\n            >\n              <Center\n                bg=\"$primary9\"\n                boxSize=\"$12\"\n                rounded=\"$sm\"\n                shadow=\"$md\"\n                css={{\n                  transform: \"translateY(-50%)\",\n                }}\n              >\n                <IconRocket color=\"$neutral1\" boxSize=\"$6\" />\n              </Center>\n              <Text fontSize=\"$lg\" fontWeight=\"$semibold\" mt=\"-8px\" mb=\"$3\">\n                Ready to go\n              </Text>\n              <Text color=\"$neutral11\">\n                Start your project with over 40 well designed SolidJS components.\n              </Text>\n            </GridItem>\n            <GridItem\n              as={VStack}\n              bg=\"$neutral3\"\n              rounded=\"$sm\"\n              px=\"$6\"\n              pb=\"$6\"\n              maxW=\"$sm\"\n              textAlign=\"center\"\n            >\n              <Center\n                bg=\"$primary9\"\n                boxSize=\"$12\"\n                rounded=\"$sm\"\n                shadow=\"$md\"\n                css={{\n                  transform: \"translateY(-50%)\",\n                }}\n              >\n                <IconComponent color=\"$neutral1\" boxSize=\"$6\" />\n              </Center>\n              <Text fontSize=\"$lg\" fontWeight=\"$semibold\" mt=\"-8px\" mb=\"$3\">\n                Composable\n              </Text>\n              <Text color=\"$neutral11\">\n                Compose your application UI with reusable building blocks.\n              </Text>\n            </GridItem>\n            <GridItem\n              as={VStack}\n              bg=\"$neutral3\"\n              rounded=\"$sm\"\n              px=\"$6\"\n              pb=\"$6\"\n              maxW=\"$sm\"\n              textAlign=\"center\"\n            >\n              <Center\n                bg=\"$primary9\"\n                boxSize=\"$12\"\n                rounded=\"$sm\"\n                shadow=\"$md\"\n                css={{\n                  transform: \"translateY(-50%)\",\n                }}\n              >\n                <IconAccessibility color=\"$neutral1\" boxSize=\"$6\" />\n              </Center>\n              <Text fontSize=\"$lg\" fontWeight=\"$semibold\" mt=\"-8px\" mb=\"$3\">\n                Accessible\n              </Text>\n              <Text color=\"$neutral11\">\n                Hope UI follows WAI-ARIA standards, helping you to reach the largest audience\n                possible with less effort.\n              </Text>\n            </GridItem>\n            <GridItem\n              as={VStack}\n              bg=\"$neutral3\"\n              rounded=\"$sm\"\n              px=\"$6\"\n              pb=\"$6\"\n              maxW=\"$sm\"\n              textAlign=\"center\"\n            >\n              <Center\n                bg=\"$primary9\"\n                boxSize=\"$12\"\n                rounded=\"$sm\"\n                shadow=\"$md\"\n                css={{\n                  transform: \"translateY(-50%)\",\n                }}\n              >\n                <IconPalette color=\"$neutral1\" boxSize=\"$6\" />\n              </Center>\n              <Text fontSize=\"$lg\" fontWeight=\"$semibold\" mt=\"-8px\" mb=\"$3\">\n                Themeable\n              </Text>\n              <Text color=\"$neutral11\">\n                Use Hope UI's design system or build your own using the theming features.\n              </Text>\n            </GridItem>\n            <GridItem\n              as={VStack}\n              bg=\"$neutral3\"\n              rounded=\"$sm\"\n              px=\"$6\"\n              pb=\"$6\"\n              maxW=\"$sm\"\n              textAlign=\"center\"\n            >\n              <Center\n                bg=\"$primary9\"\n                boxSize=\"$12\"\n                rounded=\"$sm\"\n                shadow=\"$md\"\n                css={{\n                  transform: \"translateY(-50%)\",\n                }}\n              >\n                <IconMoon color=\"$neutral1\" boxSize=\"$6\" />\n              </Center>\n              <Text fontSize=\"$lg\" fontWeight=\"$semibold\" mt=\"-8px\" mb=\"$3\">\n                Dark mode\n              </Text>\n              <Text color=\"$neutral11\">\n                Add dark mode support to your app with just a few lines of code. All components are\n                built with dark mode in mind.\n              </Text>\n            </GridItem>\n            <GridItem\n              as={VStack}\n              bg=\"$neutral3\"\n              rounded=\"$sm\"\n              px=\"$6\"\n              pb=\"$6\"\n              maxW=\"$sm\"\n              textAlign=\"center\"\n            >\n              <Center\n                bg=\"$primary9\"\n                boxSize=\"$12\"\n                rounded=\"$sm\"\n                shadow=\"$md\"\n                css={{\n                  transform: \"translateY(-50%)\",\n                }}\n              >\n                <IconCode color=\"$neutral1\" boxSize=\"$6\" />\n              </Center>\n              <Text fontSize=\"$lg\" fontWeight=\"$semibold\" mt=\"-8px\" mb=\"$3\">\n                Developer experience\n              </Text>\n              <Text color=\"$neutral11\">\n                An intuitive and familiar API that help you speed up your development.\n              </Text>\n            </GridItem>\n          </SimpleGrid>\n        </VStack>\n      </Container>\n    </Box>\n  );\n}\n\nexport default function LandingPage() {\n  return (\n    <VStack alignItems=\"stretch\">\n      <Portal>\n        <Box position=\"fixed\" top=\"0\" left=\"0\" right=\"0\" zIndex=\"$banner\">\n          <HStack\n            bg=\"$danger9\"\n            color=\"white\"\n            px=\"$2\"\n            fontWeight=\"$medium\"\n            fontSize=\"$sm\"\n            lineHeight=\"$5\"\n            _dark={{\n              bg: \"$danger3\",\n              color: \"$danger11\",\n            }}\n          >\n            Hope UI is no longer maintained. Focus is on the developement of it's successor: <a href=\"https://github.com/kobaltedev/pigment\">Pigment</a>.\n          </HStack>\n        </Box>\n      </Portal>\n      <Header />\n      <HeroSection />\n      <FeatureSection />\n      <Footer />\n    </VStack>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/not-found.tsx",
    "content": "import { Button, Center, Divider, Flex, Stack, Text, VStack } from \"@hope-ui/solid\";\nimport { Link } from \"solid-app-router\";\n\nimport Header from \"@/components/Header\";\n\nexport default function NotFound() {\n  return (\n    <VStack alignItems=\"stretch\">\n      <Header />\n      <Center minH=\"calc(100vh - 92px)\">\n        <Stack direction={{ \"@initial\": \"column\", \"@md\": \"row\" }} alignItems=\"flex-start\" mx=\"auto\">\n          <Text\n            size={{ \"@initial\": \"3xl\", \"@sm\": \"4xl\", \"@md\": \"7xl\" }}\n            fontWeight=\"$extrabold\"\n            color=\"$primary9\"\n          >\n            404\n          </Text>\n          <Divider\n            d={{ \"@initial\": \"none\", \"@md\": \"inline-block\" }}\n            orientation=\"vertical\"\n            h=\"115px\"\n            mx=\"$8\"\n          />\n          <Flex direction=\"column\" alignItems=\"flex-start\">\n            <Text\n              size={{ \"@initial\": \"4xl\", \"@sm\": \"6xl\", \"@md\": \"7xl\" }}\n              fontSize={{ \"@md\": \"$7xl\" }}\n              fontWeight=\"$extrabold\"\n              mb=\"$2\"\n            >\n              Page not found\n            </Text>\n            <Text\n              size={{ \"@initial\": \"sm\", \"@sm\": \"base\", \"@md\": \"lg\" }}\n              color=\"$neutral11\"\n              ml=\"$0_5\"\n              mb=\"$4\"\n            >\n              Please check the URL in the address bar an try again.\n            </Text>\n            <Button as={Link} href=\"/\">\n              Back to home\n            </Button>\n          </Flex>\n        </Stack>\n      </Center>\n    </VStack>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/theming/color-mode/index.tsx",
    "content": "import {\n  Alert,\n  AlertDescription,\n  Box,\n  Button,\n  Text,\n  useColorMode,\n  useColorModeValue,\n} from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport { Preview } from \"@/components/Preview\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function ColorMode() {\n  const { colorMode, toggleColorMode } = useColorMode();\n  const bg = useColorModeValue(\"$danger9\", \"$info9\");\n  const color = useColorModeValue(\"white\", \"$blackAlpha12\");\n\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/theming/css-variables\",\n    label: \"CSS variables\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/general/button\",\n    label: \"Button\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#initial-color-mode\", label: \"Initial color mode\" },\n    { href: \"#changing-color-mode\", label: \"Changing color mode\" },\n    { href: \"#use-color-mode\", label: \"useColorMode\", indent: true },\n    { href: \"#use-color-mode-value\", label: \"useColorModeValue\", indent: true },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Color mode</PageTitle>\n      <Text mb=\"$5\">\n        Hope UI comes with built-in support for managing color mode in your applications. All Hope\n        UI components are color-mode aware.\n      </Text>\n      <Alert status=\"info\" mb=\"$12\">\n        <AlertDescription>\n          Hope UI stores the color mode in <Code>localStorage</Code> and appends a className to the{\" \"}\n          <Code>body</Code> to ensure the color mode is persistent.\n        </AlertDescription>\n      </Alert>\n      <SectionTitle id=\"initial-color-mode\">Initial color mode</SectionTitle>\n      <Text mb=\"$5\">\n        The default color mode used by Hope UI is <Code>light</Code>. To set the initial color mode\n        your application should start with, create a theme config, set the{\" \"}\n        <Code>initialColorMode</Code> to either <Code>light</Code>, <Code>dark</Code> or{\" \"}\n        <Code>system</Code> and pass the config to the HopeProvider.\n      </Text>\n      <CodeSnippet snippet={snippets.initialColorMode} mb=\"$6\" />\n      <Alert status=\"warning\" mb=\"$12\">\n        <AlertDescription>\n          When using <Code>system</Code> as initial color mode, the theme will change with the\n          system preference. However, if another theme is manually selected by the user then that\n          theme will be used on the next page load. To reset it to system preference, simply remove\n          the <Code>hope-ui-color-mode</Code> entry from localStorage.\n        </AlertDescription>\n      </Alert>\n      <SectionTitle id=\"changing-color-mode\">Changing color mode</SectionTitle>\n      <Text mb=\"$10\">\n        To manage color mode in your application, Hope UI exposes the <Code>useColorMode</Code> and{\" \"}\n        <Code>useColorModeValue</Code> hooks.\n      </Text>\n      <SectionSubtitle id=\"use-color-mode\">useColorMode</SectionSubtitle>\n      <Text mb=\"$5\">\n        <Code>useColorMode</Code> is a custom hook that gives you an accessor to get the current\n        color mode, and a function to toggle it.\n      </Text>\n      <Preview snippet={snippets.useColorMode} mb=\"$5\">\n        <Button onClick={toggleColorMode}>\n          Toggle {colorMode() === \"light\" ? \"dark\" : \"light\"}\n        </Button>\n      </Preview>\n      <Text mb=\"$10\">\n        Calling <Code>toggleColorMode</Code> anywhere in your app tree toggles the color mode from\n        <Code>light</Code> or <Code>dark</Code> and vice versa.\n      </Text>\n      <SectionSubtitle id=\"use-color-mode-value\">useColorModeValue</SectionSubtitle>\n      <Text mb=\"$5\">\n        <Code>useColorModeValue</Code> is a custom hook used to change any value or style based on\n        the color mode. It takes 2 arguments: the value in light mode, the value in dark mode and\n        returns a derived signal with the correct value based on the color mode.\n      </Text>\n      <Text mb=\"$5\">\n        Here's an example that changes the <Code>background-color</Code> and <Code>color</Code>{\" \"}\n        using the <Code>useColorModeValue</Code> hook.\n      </Text>\n      <Preview snippet={snippets.useColorModeValue}>\n        <div>\n          <Box mb=\"$4\" p=\"$2\" bg={bg()} color={color()}>\n            This box's style will change based on the color mode.\n          </Box>\n          <Button size=\"sm\" onClick={toggleColorMode}>\n            Toggle Mode\n          </Button>\n        </div>\n      </Preview>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/theming/color-mode/snippets.ts",
    "content": "const initialColorMode = `import { HopeThemeConfig, HopeProvider } from \"@hope-ui/solid\"\n\n// 1. Create a theme config\nconst config: HopeThemeConfig = {\n  initialColorMode: \"system\", // 2. Add your color mode\n  // rest of the config...\n}\n\n// 3. Pass the \\`config\\` prop to the \\`HopeProvider\\`\nfunction App() {\n  return (\n    <HopeProvider config={config}>\n      <MyApp />\n    </HopeProvider>\n  )\n}`;\n\nconst useColorMode = `function ColorModeSwitcher() {\n  const { colorMode, toggleColorMode } = useColorMode()\n\n  return (\n    <Button onClick={toggleColorMode}>\n      Toggle {colorMode() === 'light' ? 'dark' : 'light'}\n    </Button>\n  )\n}`;\n\nconst useColorModeValue = `function StyleColorMode() {\n  const { toggleColorMode } = useColorMode()\n\n  const bg = useColorModeValue(\"$danger9\", \"$info9\")\n  const color = useColorModeValue(\"white\", \"$blackAlpha12\")\n\n  return (\n    <>\n      <Box mb=\"$4\" p=\"$2\" bg={bg()} color={color()}>\n        This box's style will change based on the color mode.\n      </Box>\n      <Button size=\"sm\" onClick={toggleColorMode}>\n        Toggle Mode\n      </Button>\n    </>\n  )\n}`;\n\nexport const snippets = {\n  initialColorMode,\n  useColorMode,\n  useColorModeValue,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/theming/css-variables/index.tsx",
    "content": "import { Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function CSSVariables() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/theming/customize-theme\",\n    label: \"Customize theme\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/theming/color-mode\",\n    label: \"Color mode\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>CSS variables</PageTitle>\n      <Text mb=\"$5\">\n        All Hope UI theme tokens are available as CSS custom properties (aka CSS variables) with the{\" \"}\n        <Code>hope</Code> prefix.\n      </Text>\n      <Text mb=\"$5\">\n        Let's say you want to change your application <Code>#root</Code> div{\" \"}\n        <Code>background-color</Code> using a color from the Hope UI theme. In a plain CSS file you\n        can do it like this:\n      </Text>\n      <CodeSnippet lang=\"css\" snippet={snippets.cssVariables} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/theming/css-variables/snippets.ts",
    "content": "const cssVariables = `/* index.css */\n\n#root {\n  background-color: var(--hope-colors-neutral1);\n}`;\n\nexport const snippets = {\n  cssVariables,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/theming/customize-theme/index.tsx",
    "content": "import { Alert, AlertDescription, hope, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function CustomizeTheme() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/theming/default-theme\",\n    label: \"Default theme\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/theming/css-variables\",\n    label: \"CSS variables\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#customizing-theme-tokens\", label: \"Customizing theme tokens\" },\n    { href: \"#token-aliases\", label: \"Token aliases\" },\n    { href: \"#customizing-component-styles\", label: \"Customizing component styles\" },\n    {\n      href: \"#styling-single-part-components\",\n      label: \"Styling single-part components\",\n      indent: true,\n    },\n    {\n      href: \"#styling-muti-parts-components\",\n      label: \"Styling multi-parts components\",\n      indent: true,\n    },\n  ];\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Customize theme</PageTitle>\n      <Text mb=\"$5\">\n        By default, all Hope UI components inherit values from the default theme. In some scenarios,\n        you might need to customize the theme tokens to match your design requirements.\n      </Text>\n      <Text mb=\"$3\">Here are some options depending on your goals:</Text>\n      <hope.ul ps=\"$5\" mb=\"$12\">\n        <hope.li mb=\"$2\">\n          Customize the theme tokens like colors, font sizes, line heights, etc.\n        </hope.li>\n        <hope.li>Customize components base styles.</hope.li>\n      </hope.ul>\n      <SectionTitle id=\"customizing-theme-tokens\">Customizing theme tokens</SectionTitle>\n      <Text mb=\"$5\">\n        To override a token in the default theme, create a theme config and add the keys you'd like\n        to override. You can also add new values to the theme.\n      </Text>\n      <Text mb=\"$5\">\n        For example, if you'd like to override the primary color palette in the theme, here's what\n        you'll do:\n      </Text>\n      <CodeSnippet snippet={snippets.overrideThemeColors} mb=\"$5\" />\n      <Alert status=\"warning\" mb=\"$12\">\n        <AlertDescription>\n          Custom keys added to the Hope UI theme are not inferred by Typescript and won't appears in\n          IntelliSense.\n        </AlertDescription>\n      </Alert>\n      <SectionTitle id=\"token-aliases\">Token aliases</SectionTitle>\n      <Text mb=\"$5\">\n        Hope UI supports token aliases (aka semantic tokens) in it's theme configuration. For\n        example, you can create an <Code>appBg</Code> token representing your application{\" \"}\n        <Code>background-color</Code> which is <Code>white</Code> in light mode and refers to Hope\n        UI <Code>neutral3</Code> color token in dark mode:\n      </Text>\n      <CodeSnippet snippet={snippets.tokenAliases} mb=\"$12\" />\n      <SectionTitle id=\"customizing-component-styles\">Customizing component styles</SectionTitle>\n      <Text mb=\"$10\">\n        Hope UI provides a <Code>components</Code> option in it's theme configuration allowing you\n        to globally set base style and default props for each Hope UI components.\n      </Text>\n      <SectionSubtitle id=\"styling-single-part-components\">\n        Styling single-part components\n      </SectionSubtitle>\n      <Text mb=\"$5\">\n        Let's say you want all <Code>Button</Code> to have a \"pill shape\", be uppercased and apply\n        the <Code>subtle</Code> variant and <Code>success</Code> colorScheme by default, here's what\n        you'll do:\n      </Text>\n      <CodeSnippet snippet={snippets.singlePartComponentStyles} mb=\"$12\" />\n      <SectionSubtitle id=\"styling-muti-parts-components\">\n        Styling multi-parts components\n      </SectionSubtitle>\n      <Text mb=\"$5\">\n        Some Hope UI components are composed of multiple parts that you can stylize. Below is and\n        example for the <Code>Alert</Code> component.\n      </Text>\n      <CodeSnippet snippet={snippets.multiPartsComponentStyles} mb=\"$5\" />\n      <Text mb=\"$5\">\n        To know which part of a component can be stylized in the Hope UI theme configuration, please\n        refer to it's documentation.\n      </Text>\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/theming/customize-theme/snippets.ts",
    "content": "const overrideThemeColors = `// 1. Import the \\`HopeThemeConfig\\` type\nimport { HopeThemeConfig, HopeProvider } from \"@hope-ui/solid\"\n\n// 2. Create a theme config and pass your custom values\nconst config: HopeThemeConfig = {\n  initialColorMode: \"system\",\n  lightTheme: {\n    colors: {\n      primary1: \"#fefcff\",\n      // ...\n      primary12: \"#340c3b\", \n    }\n  },\n  darkTheme: {\n    colors: {\n      primary1: \"#1d131d\",\n      // ...\n      primary12: \"#fbecfc\", \n    }\n  },\n  components: {\n    // Components base styles...\n  }\n}\n\n// 3. Pass the config to \\`HopeProvider\\`\n<HopeProvider config={config}>\n  <App />\n</HopeProvider>\n\n// 4. Now you can use these colors in your components\nfunction Usage() {\n  return <Box bg=\"$primary1\">Welcome</Box>\n}`;\n\nconst tokenAliases = `// example theme config\nconst config: HopeThemeConfig = {\n  lightTheme: {\n    colors: {\n      appBg: \"#ffffff\",\n    }\n  },\n  darkTheme: {\n    colors: {\n      appBg: \"$neutral3\",  // Use the \\`$\\` prefix to refer to another token in the theme\n    }\n  },\n}`;\n\nconst singlePartComponentStyles = `// example theme config\nconst config: HopeThemeConfig = {\n  components: {\n    Button: {\n      baseStyle: {\n        borderRadius: \"$full\",\n        textTransform: \"uppercase\",\n      },\n      defaultProps: {\n        variant: \"subtle\",\n        colorScheme: \"success\",\n      }\n    }\n  }\n}`;\n\nconst multiPartsComponentStyles = `// example theme config\nconst config: HopeThemeConfig = {\n  components: {\n    Alert: {\n      baseStyle: {\n        // Base style for the <Alert /> component\n        root: {\n          borderRadius: \"$full\",\n        },\n        // Base style for the <AlertIcon /> component\n        icon: {\n          boxSize: \"$8\",\n        },\n        // Base style for the <AlertTitle /> component\n        title: {\n          fontWeight: \"$semibold\",\n          textTransform: \"uppercase\",\n        },\n        // Base style for the <AlertDescription /> component\n        description: {\n          fontSize: \"14px\",\n        }\n      },\n      defaultProps: {\n        // Default props for the <Alert /> component\n        root: {\n          variant: \"solid\",\n        },\n      }\n    }\n  }\n}`;\n\nexport const snippets = {\n  overrideThemeColors,\n  tokenAliases,\n  singlePartComponentStyles,\n  multiPartsComponentStyles,\n};\n"
  },
  {
    "path": "apps/docs/src/pages/theming/default-theme/index.tsx",
    "content": "import { Alert, AlertDescription, Anchor, hope, Text } from \"@hope-ui/solid\";\nimport Prism from \"prismjs\";\nimport { onMount } from \"solid-js\";\n\nimport Code from \"@/components/Code\";\nimport CodeSnippet from \"@/components/CodeSnippet\";\nimport { ColorScale, ColorScaleItem } from \"@/components/ColorScale\";\nimport { ContextualNavLink } from \"@/components/ContextualNav\";\nimport PageLayout from \"@/components/PageLayout\";\nimport PageTitle from \"@/components/PageTitle\";\nimport SectionSubtitle from \"@/components/SectionSubtitle\";\nimport SectionTitle from \"@/components/SectionTitle\";\n\nimport { snippets } from \"./snippets\";\n\nexport default function DefaultTheme() {\n  const previousLink: ContextualNavLink = {\n    href: \"/docs/features/hope-factory\",\n    label: \"Hope factory\",\n  };\n\n  const nextLink: ContextualNavLink = {\n    href: \"/docs/theming/customize-theme\",\n    label: \"Customize theme\",\n  };\n\n  const contextualNavLinks: ContextualNavLink[] = [\n    { href: \"#usage\", label: \"Usage\" },\n    { href: \"#colors\", label: \"Colors\" },\n    { href: \"#black-alpha\", label: \"Black alpha\", indent: true },\n    { href: \"#white-alpha\", label: \"White alpha\", indent: true },\n    { href: \"#primary\", label: \"Primary\", indent: true },\n    { href: \"#accent\", label: \"Accent\", indent: true },\n    { href: \"#neutral\", label: \"Neutral\", indent: true },\n    { href: \"#success\", label: \"Success\", indent: true },\n    { href: \"#info\", label: \"Info\", indent: true },\n    { href: \"#warning\", label: \"Warning\", indent: true },\n    { href: \"#danger\", label: \"Danger\", indent: true },\n    { href: \"#typography\", label: \"Typography\" },\n    { href: \"#space\", label: \"Space\" },\n    { href: \"#sizes\", label: \"Sizes\" },\n    { href: \"#radii\", label: \"Radii (Border radius)\" },\n    { href: \"#shadows\", label: \"Shadows\" },\n    { href: \"#z-indices\", label: \"z-index values\" },\n  ];\n\n  const colors: {\n    blackAlpha: ColorScaleItem[];\n    whiteAlpha: ColorScaleItem[];\n    primary: ColorScaleItem[];\n    accent: ColorScaleItem[];\n    neutral: ColorScaleItem[];\n    success: ColorScaleItem[];\n    info: ColorScaleItem[];\n    warning: ColorScaleItem[];\n    danger: ColorScaleItem[];\n  } = {\n    blackAlpha: [\n      { name: \"Black alpha 1\", token: \"blackAlpha1\" },\n      { name: \"Black alpha 2\", token: \"blackAlpha2\" },\n      { name: \"Black alpha 3\", token: \"blackAlpha3\" },\n      { name: \"Black alpha 4\", token: \"blackAlpha4\" },\n      { name: \"Black alpha 5\", token: \"blackAlpha5\" },\n      { name: \"Black alpha 6\", token: \"blackAlpha6\" },\n      { name: \"Black alpha 7\", token: \"blackAlpha7\" },\n      { name: \"Black alpha 8\", token: \"blackAlpha8\" },\n      { name: \"Black alpha 9\", token: \"blackAlpha9\" },\n      { name: \"Black alpha 10\", token: \"blackAlpha10\" },\n      { name: \"Black alpha 11\", token: \"blackAlpha11\" },\n      { name: \"Black alpha 12\", token: \"blackAlpha12\" },\n    ],\n    whiteAlpha: [\n      { name: \"White alpha 1\", token: \"whiteAlpha1\" },\n      { name: \"White alpha 2\", token: \"whiteAlpha2\" },\n      { name: \"White alpha 3\", token: \"whiteAlpha3\" },\n      { name: \"White alpha 4\", token: \"whiteAlpha4\" },\n      { name: \"White alpha 5\", token: \"whiteAlpha5\" },\n      { name: \"White alpha 6\", token: \"whiteAlpha6\" },\n      { name: \"White alpha 7\", token: \"whiteAlpha7\" },\n      { name: \"White alpha 8\", token: \"whiteAlpha8\" },\n      { name: \"White alpha 9\", token: \"whiteAlpha9\" },\n      { name: \"White alpha 10\", token: \"whiteAlpha10\" },\n      { name: \"White alpha 11\", token: \"whiteAlpha11\" },\n      { name: \"White alpha 12\", token: \"whiteAlpha12\" },\n    ],\n    primary: [\n      { name: \"Primary 1\", token: \"primary1\" },\n      { name: \"Primary 2\", token: \"primary2\" },\n      { name: \"Primary 3\", token: \"primary3\" },\n      { name: \"Primary 4\", token: \"primary4\" },\n      { name: \"Primary 5\", token: \"primary5\" },\n      { name: \"Primary 6\", token: \"primary6\" },\n      { name: \"Primary 7\", token: \"primary7\" },\n      { name: \"Primary 8\", token: \"primary8\" },\n      { name: \"Primary 9\", token: \"primary9\" },\n      { name: \"Primary 10\", token: \"primary10\" },\n      { name: \"Primary 11\", token: \"primary11\" },\n      { name: \"Primary 12\", token: \"primary12\" },\n    ],\n    accent: [\n      { name: \"Accent 1\", token: \"accent1\" },\n      { name: \"Accent 2\", token: \"accent2\" },\n      { name: \"Accent 3\", token: \"accent3\" },\n      { name: \"Accent 4\", token: \"accent4\" },\n      { name: \"Accent 5\", token: \"accent5\" },\n      { name: \"Accent 6\", token: \"accent6\" },\n      { name: \"Accent 7\", token: \"accent7\" },\n      { name: \"Accent 8\", token: \"accent8\" },\n      { name: \"Accent 9\", token: \"accent9\" },\n      { name: \"Accent 10\", token: \"accent10\" },\n      { name: \"Accent 11\", token: \"accent11\" },\n      { name: \"Accent 12\", token: \"accent12\" },\n    ],\n    neutral: [\n      { name: \"Neutral 1\", token: \"neutral1\" },\n      { name: \"Neutral 2\", token: \"neutral2\" },\n      { name: \"Neutral 3\", token: \"neutral3\" },\n      { name: \"Neutral 4\", token: \"neutral4\" },\n      { name: \"Neutral 5\", token: \"neutral5\" },\n      { name: \"Neutral 6\", token: \"neutral6\" },\n      { name: \"Neutral 7\", token: \"neutral7\" },\n      { name: \"Neutral 8\", token: \"neutral8\" },\n      { name: \"Neutral 9\", token: \"neutral9\" },\n      { name: \"Neutral 10\", token: \"neutral10\" },\n      { name: \"Neutral 11\", token: \"neutral11\" },\n      { name: \"Neutral 12\", token: \"neutral12\" },\n    ],\n    success: [\n      { name: \"Success 1\", token: \"success1\" },\n      { name: \"Success 2\", token: \"success2\" },\n      { name: \"Success 3\", token: \"success3\" },\n      { name: \"Success 4\", token: \"success4\" },\n      { name: \"Success 5\", token: \"success5\" },\n      { name: \"Success 6\", token: \"success6\" },\n      { name: \"Success 7\", token: \"success7\" },\n      { name: \"Success 8\", token: \"success8\" },\n      { name: \"Success 9\", token: \"success9\" },\n      { name: \"Success 10\", token: \"success10\" },\n      { name: \"Success 11\", token: \"success11\" },\n      { name: \"Success 12\", token: \"success12\" },\n    ],\n    info: [\n      { name: \"Info 1\", token: \"info1\" },\n      { name: \"Info 2\", token: \"info2\" },\n      { name: \"Info 3\", token: \"info3\" },\n      { name: \"Info 4\", token: \"info4\" },\n      { name: \"Info 5\", token: \"info5\" },\n      { name: \"Info 6\", token: \"info6\" },\n      { name: \"Info 7\", token: \"info7\" },\n      { name: \"Info 8\", token: \"info8\" },\n      { name: \"Info 9\", token: \"info9\" },\n      { name: \"Info 10\", token: \"info10\" },\n      { name: \"Info 11\", token: \"info11\" },\n      { name: \"Info 12\", token: \"info12\" },\n    ],\n    warning: [\n      { name: \"Warning 1\", token: \"warning1\" },\n      { name: \"Warning 2\", token: \"warning2\" },\n      { name: \"Warning 3\", token: \"warning3\" },\n      { name: \"Warning 4\", token: \"warning4\" },\n      { name: \"Warning 5\", token: \"warning5\" },\n      { name: \"Warning 6\", token: \"warning6\" },\n      { name: \"Warning 7\", token: \"warning7\" },\n      { name: \"Warning 8\", token: \"warning8\" },\n      { name: \"Warning 9\", token: \"warning9\" },\n      { name: \"Warning 10\", token: \"warning10\" },\n      { name: \"Warning 11\", token: \"warning11\" },\n      { name: \"Warning 12\", token: \"warning12\" },\n    ],\n    danger: [\n      { name: \"Danger 1\", token: \"danger1\" },\n      { name: \"Danger 2\", token: \"danger2\" },\n      { name: \"Danger 3\", token: \"danger3\" },\n      { name: \"Danger 4\", token: \"danger4\" },\n      { name: \"Danger 5\", token: \"danger5\" },\n      { name: \"Danger 6\", token: \"danger6\" },\n      { name: \"Danger 7\", token: \"danger7\" },\n      { name: \"Danger 8\", token: \"danger8\" },\n      { name: \"Danger 9\", token: \"danger9\" },\n      { name: \"Danger 10\", token: \"danger10\" },\n      { name: \"Danger 11\", token: \"danger11\" },\n      { name: \"Danger 12\", token: \"danger12\" },\n    ],\n  };\n\n  onMount(() => {\n    Prism.highlightAll();\n  });\n\n  return (\n    <PageLayout\n      previousLink={previousLink}\n      nextLink={nextLink}\n      contextualNavLinks={contextualNavLinks}\n    >\n      <PageTitle>Default theme</PageTitle>\n      <Text mb=\"$8\">\n        The theme object is where you define your application's color palette, type scale, font\n        stacks, border radius values, and more.\n      </Text>\n      <SectionTitle id=\"usage\">Usage</SectionTitle>\n      <Text mb=\"$5\">\n        Many CSS properties used in style props or stitches's <Code>css</Code> function are mapped\n        to a scale from the Hope UI theme. The list of CSS property / theme token mapping is\n        available on the{\" \"}\n        <Anchor\n          href=\"https://stitches.dev/docs/tokens#property-mapping\"\n          external\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          stitches\n        </Anchor>{\" \"}\n        documentation.\n      </Text>\n      <Text mb=\"$5\">\n        To apply a token you need to prefix it with a <Code>$</Code> sign.\n      </Text>\n      <CodeSnippet snippet={snippets.usage} mb=\"$12\" />\n      <SectionTitle id=\"colors\">Colors</SectionTitle>\n      <Text mb=\"$5\">\n        The <Code>colors</Code> key allows you to customize the color palettes for your project.\n      </Text>\n      <Text mb=\"$5\">\n        Hope UI uses{\" \"}\n        <Anchor\n          href=\"https://www.radix-ui.com/colors\"\n          external\n          color=\"$primary11\"\n          fontWeight=\"$semibold\"\n        >\n          Radix Colors\n        </Anchor>{\" \"}\n        in its default theme. Radix Colors are designed to be accessible, well-balanced, harmonious\n        and provide light and dark palette for each of their colors.\n      </Text>\n      <Alert status=\"warning\" mb=\"$5\">\n        <AlertDescription>\n          Since Hope UI components are built with Radix Colors, unless you have any design skills,\n          the recommended way of customizing colors is to pick a light and dark scale from Radix\n          Colors in order to keep all components accessible and dark mode friendly.\n        </AlertDescription>\n      </Alert>\n      <CodeSnippet snippet={snippets.colors} mb=\"$8\" />\n      <Text mb=\"$8\">\n        Below are the list of all colors available in the default Hope UI theme. For semantic colors\n        like <Code>primary</Code>, switching to dark mode will show the proper hex values from the\n        dark palette.\n      </Text>\n      <SectionSubtitle id=\"black-alpha\">Black alpha</SectionSubtitle>\n      <ColorScale scale={colors.blackAlpha} mb=\"$10\" />\n\n      <SectionSubtitle id=\"white-alpha\">White alpha</SectionSubtitle>\n      <ColorScale scale={colors.whiteAlpha} mb=\"$10\" />\n\n      <SectionSubtitle id=\"primary\">Primary</SectionSubtitle>\n      <ColorScale scale={colors.primary} mb=\"$10\" />\n\n      <SectionSubtitle id=\"accent\">Accent</SectionSubtitle>\n      <ColorScale scale={colors.accent} mb=\"$10\" />\n\n      <SectionSubtitle id=\"neutral\">Neutral</SectionSubtitle>\n      <ColorScale scale={colors.neutral} mb=\"$10\" />\n\n      <SectionSubtitle id=\"success\">Success</SectionSubtitle>\n      <ColorScale scale={colors.success} mb=\"$10\" />\n\n      <SectionSubtitle id=\"info\">Info</SectionSubtitle>\n      <ColorScale scale={colors.info} mb=\"$10\" />\n\n      <SectionSubtitle id=\"warning\">Warning</SectionSubtitle>\n      <ColorScale scale={colors.warning} mb=\"$10\" />\n\n      <SectionSubtitle id=\"danger\">Danger</SectionSubtitle>\n      <ColorScale scale={colors.danger} mb=\"$12\" />\n\n      <SectionTitle id=\"typography\">Typography</SectionTitle>\n      <Text mb=\"$2\">\n        To manage typography options, the theme object supports the following keys:\n      </Text>\n      <hope.ul ps=\"$5\" mb=\"$5\">\n        <hope.li mb=\"$2\">\n          <Code>fonts</Code> (font families)\n        </hope.li>\n        <hope.li mb=\"$2\">\n          <Code>fontSizes</Code>\n        </hope.li>\n        <hope.li mb=\"$2\">\n          <Code>fontWeights</Code>\n        </hope.li>\n        <hope.li mb=\"$2\">\n          <Code>lineHeights</Code>\n        </hope.li>\n        <hope.li mb=\"$2\">\n          <Code>letterSpacings</Code>\n        </hope.li>\n      </hope.ul>\n      <CodeSnippet snippet={snippets.typography} mb=\"$12\" />\n\n      <SectionTitle id=\"space\">Space</SectionTitle>\n      <Text mb=\"$5\">\n        The <Code>space</Code> key allows you to customize the global spacing scale for your\n        project.\n      </Text>\n      <CodeSnippet snippet={snippets.space} mb=\"$5\" />\n      <Alert status=\"info\" mb=\"$12\">\n        <AlertDescription>\n          <Code>0_5</Code> actually means <Code>0.5</Code>, unfortunately stitches doesn't allow\n          dots in theme token names.\n        </AlertDescription>\n      </Alert>\n\n      <SectionTitle id=\"sizes\">Sizes</SectionTitle>\n      <Text mb=\"$5\">\n        The <Code>sizes</Code> key allows you to customize the global sizing of components you build\n        for your project.\n      </Text>\n      <CodeSnippet snippet={snippets.sizes} mb=\"$12\" />\n\n      <SectionTitle id=\"radii\">Radii (Border radius)</SectionTitle>\n      <Text mb=\"$5\">\n        Hope UI provides a set of smooth corner radius values. The <Code>radii</Code> key allows you\n        to customize the global radii scale for your project.\n      </Text>\n      <CodeSnippet snippet={snippets.radii} mb=\"$12\" />\n\n      <SectionTitle id=\"shadows\">Shadows</SectionTitle>\n      <Text mb=\"$5\">\n        Hope UI provides a default set of shadows. The <Code>shadows</Code> key allows you to\n        customize the global shadow scale for your project.\n      </Text>\n      <CodeSnippet snippet={snippets.shadows} mb=\"$12\" />\n\n      <SectionTitle id=\"z-indices\">z-index values</SectionTitle>\n      <Text mb=\"$5\">\n        hope UI provides a set of z-indices out of the box to help control the stacking order of\n        components.\n      </Text>\n      <CodeSnippet snippet={snippets.zIndices} />\n    </PageLayout>\n  );\n}\n"
  },
  {
    "path": "apps/docs/src/pages/theming/default-theme/snippets.ts",
    "content": "const usage = `<Box bg=\"$primary9\" w=\"$40\" p=\"$4\" color=\"$whiteAlpha12\">\n  This is the Box\n</Box>`;\n\nconst colors = `// example theme object\nexport default {\n  colors: {\n    primary1: \"#fefcff\",\n    primary2: \"#fff8ff\",\n    primary3: \"#fceffc\",\n    primary4: \"#f9e5f9\",\n    primary5: \"#f3d9f4\",\n    primary6: \"#ebc8ed\",\n    primary7: \"#dfafe3\",\n    primary8: \"#cf91d8\",\n    primary9: \"#ab4aba\",\n    primary10: \"#a43cb4\",\n    primary11: \"#9c2bad\",\n    primary12: \"#340c3b\", \n  }\n}`;\n\nconst typography = `// example theme object\nexport default {\n  fonts: {\n    sans: \"ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'\",\n    serif: \"ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif\",\n    mono: \"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace\",\n  },\n  fontSizes: {\n    \"2xs\": \"0.625rem\",\n    xs: \"0.75rem\",\n    sm: \"0.875rem\",\n    base: \"1rem\",\n    lg: \"1.125rem\",\n    xl: \"1.25rem\",\n    \"2xl\": \"1.5rem\",\n    \"3xl\": \"1.875rem\",\n    \"4xl\": \"2.25rem\",\n    \"5xl\": \"3rem\",\n    \"6xl\": \"3.75rem\",\n    \"7xl\": \"4.5rem\",\n    \"8xl\": \"6rem\",\n    \"9xl\": \"8rem\",\n  },\n  fontWeights: {\n    hairline: 100,\n    thin: 200,\n    light: 300,\n    normal: 400,\n    medium: 500,\n    semibold: 600,\n    bold: 700,\n    extrabold: 800,\n    black: 900,\n  },\n  lineHeights: {\n    normal: \"normal\",\n    none: 1,\n    shorter: 1.25,\n    short: 1.375,\n    base: 1.5,\n    tall: 1.625,\n    taller: 2,\n    \"3\": \"0.75rem\",\n    \"4\": \"1rem\",\n    \"5\": \"1.25rem\",\n    \"6\": \"1.5rem\",\n    \"7\": \"1.75rem\",\n    \"8\": \"2rem\",\n    \"9\": \"2.25rem\",\n    \"10\": \"2.5rem\",\n  },\n  letterSpacings: {\n    tighter: \"-0.05em\",\n    tight: \"-0.025em\",\n    normal: \"0\",\n    wide: \"0.025em\",\n    wider: \"0.05em\",\n    widest: \"0.1em\",\n  }\n}`;\n\nconst space = `// example theme object\nexport default {\n  space: {\n    px: \"1px\",\n    \"0_5\": \"0.125rem\",\n    \"1\": \"0.25rem\",\n    \"1_5\": \"0.375rem\",\n    \"2\": \"0.5rem\",\n    \"2_5\": \"0.625rem\",\n    \"3\": \"0.75rem\",\n    \"3_5\": \"0.875rem\",\n    \"4\": \"1rem\",\n    \"5\": \"1.25rem\",\n    \"6\": \"1.5rem\",\n    \"7\": \"1.75rem\",\n    \"8\": \"2rem\",\n    \"9\": \"2.25rem\",\n    \"10\": \"2.5rem\",\n    \"12\": \"3rem\",\n    \"14\": \"3.5rem\",\n    \"16\": \"4rem\",\n    \"20\": \"5rem\",\n    \"24\": \"6rem\",\n    \"28\": \"7rem\",\n    \"32\": \"8rem\",\n    \"36\": \"9rem\",\n    \"40\": \"10rem\",\n    \"44\": \"11rem\",\n    \"48\": \"12rem\",\n    \"52\": \"13rem\",\n    \"56\": \"14rem\",\n    \"60\": \"15rem\",\n    \"64\": \"16rem\",\n    \"72\": \"18rem\",\n    \"80\": \"20rem\",\n    \"96\": \"24rem\",\n  }\n}`;\n\nconst sizes = `// example theme object\nexport default {\n  sizes: {\n    ...space,\n    prose: \"65ch\",\n    max: \"max-content\",\n    min: \"min-content\",\n    full: \"100%\",\n    screenW: \"100vw\",\n    screenH: \"100vh\",\n    xs: \"20rem\",\n    sm: \"24rem\",\n    md: \"28rem\",\n    lg: \"32rem\",\n    xl: \"36rem\",\n    \"2xl\": \"42rem\",\n    \"3xl\": \"48rem\",\n    \"4xl\": \"56rem\",\n    \"5xl\": \"64rem\",\n    \"6xl\": \"72rem\",\n    \"7xl\": \"80rem\",\n    \"8xl\": \"90rem\",\n    containerSm: \"640px\",\n    containerMd: \"768px\",\n    containerLg: \"1024px\",\n    containerXl: \"1280px\",\n    container2xl: \"1536px\",\n  }\n}`;\n\nconst radii = `// example theme object\nexport default {\n  radii: {\n    none: \"0\",\n    xs: \"0.125rem\",\n    sm: \"0.25rem\",\n    md: \"0.375rem\",\n    lg: \"0.5rem\",\n    xl: \"0.75rem\",\n    \"2xl\": \"1rem\",\n    \"3xl\": \"1.5rem\",\n    full: \"9999px\",\n  }\n}`;\n\nconst shadows = `// example theme object\nexport default {\n  shadows: {\n    none: \"0 0 #0000\",\n    xs: \"0 1px 2px 0 rgb(0 0 0 / 0.05)\",\n    sm: \"0 1px 3px 0 rgb(0 0 0 / 0.09), 0 1px 2px -1px rgb(0 0 0 / 0.1)\",\n    md: \"0 4px 6px -1px rgb(0 0 0 / 0.09), 0 2px 4px -2px rgb(0 0 0 / 0.1)\",\n    lg: \"0 10px 15px -3px rgb(0 0 0 / 0.09), 0 4px 6px -4px rgb(0 0 0 / 0.1)\",\n    xl: \"0 20px 25px -5px rgb(0 0 0 / 0.09), 0 8px 10px -6px rgb(0 0 0 / 0.1)\",\n    \"2xl\": \"0 25px 50px -12px rgb(0 0 0 / 0.24)\",\n    inner: \"inset 0 2px 4px 0 rgb(0 0 0 / 0.06)\",\n  }\n}`;\n\nconst zIndices = `// example theme object\nexport default {\n  zIndices: {\n    hide: -1,\n    auto: \"auto\",\n    base: 0,\n    docked: 10,\n    sticky: 1000,\n    banner: 1100,\n    overlay: 1200,\n    modal: 1300,\n    dropdown: 1400,\n    popover: 1500,\n    tooltip: 1600,\n    skipLink: 1700,\n    toast: 1800,\n  }\n}`;\n\nexport const snippets = { usage, colors, typography, space, sizes, radii, shadows, zIndices };\n"
  },
  {
    "path": "apps/docs/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"compilerOptions\": {\n    \"outDir\": \"dist\",\n    \"baseUrl\": \".\",\n    \"rootDir\": \".\",\n    \"paths\": {\n      \"@/*\": [\"src/*\"]\n    }\n  },\n  \"include\": [\"./src\", \"vite.config.ts\"]\n}\n"
  },
  {
    "path": "apps/docs/vite.config.ts",
    "content": "import { fileURLToPath } from \"url\";\nimport { defineConfig } from \"vite\";\nimport prismjs from \"vite-plugin-prismjs\";\nimport solidPlugin from \"vite-plugin-solid\";\n\nexport default defineConfig({\n  plugins: [\n    solidPlugin(),\n    prismjs({\n      languages: [\"bash\", \"js\", \"tsx\", \"html\", \"css\"],\n      plugins: [\"copy-to-clipboard\", \"line-highlight\"],\n      css: false,\n    }),\n  ],\n  resolve: {\n    alias: {\n      \"@/\": fileURLToPath(new URL(\"./src/\", import.meta.url)),\n    },\n  },\n  build: {\n    target: \"esnext\",\n    polyfillDynamicImport: false,\n  },\n});\n"
  },
  {
    "path": "commitlint.config.js",
    "content": "module.exports = {\n  extends: [\"@commitlint/config-conventional\"],\n};\n"
  },
  {
    "path": "jest.config.js",
    "content": "const pkgRootPath = `<rootDir>`;\nconst solidjsPath = `${pkgRootPath}/../../node_modules/solid-js`;\n\nmodule.exports = {\n  preset: \"ts-jest\",\n\n  globals: {\n    \"ts-jest\": {\n      tsconfig: `${pkgRootPath}/tsconfig.json`,\n      babelConfig: {\n        presets: [\"@babel/preset-env\", \"babel-preset-solid\"]\n      }\n    }\n  },\n\n  testEnvironment: \"jsdom\",\n\n  setupFilesAfterEnv: [`${pkgRootPath}/../../jest.setup.ts`, \"regenerator-runtime\"],\n\n  moduleNameMapper: {\n    \"solid-js/web\": `${solidjsPath}/web/dist/web.cjs`,\n    \"solid-js/store\": `${solidjsPath}/store/dist/store.cjs`,\n    \"solid-js\": `${solidjsPath}/dist/solid.cjs`\n  },\n\n  verbose: true,\n  testTimeout: 30000\n};\n"
  },
  {
    "path": "jest.setup.ts",
    "content": "// jest-dom adds custom jest matchers for asserting on DOM nodes.\n// allows you to do things like:\n// expect(element).toHaveTextContent(/solidjs/i)\n// learn more: https://github.com/testing-library/jest-dom\nimport \"@testing-library/jest-dom\";\n"
  },
  {
    "path": "netlify.toml",
    "content": "[[redirects]]\n  from = \"/*\"\n  to = \"/index.html\"\n  status = 200\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"hope-ui-monorepo\",\n  \"private\": true,\n  \"description\": \"The SolidJS component library you've hoped for.\",\n  \"homepage\": \"https://hope-ui.com\",\n  \"bugs\": {\n    \"url\": \"https://github.com/fabien-ml/hope-ui/issues\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/fabien-ml/hope-ui.git\"\n  },\n  \"license\": \"MIT\",\n  \"author\": \"Fabien MARIE-LOUISE (https://github.com/fabien-ml)\",\n  \"workspaces\": [\n    \"apps/*\",\n    \"packages/*\"\n  ],\n  \"scripts\": {\n    \"build\": \"turbo run build\",\n    \"changeset\": \"changeset\",\n    \"clean\": \"turbo run clean && rm -rf node_modules\",\n    \"commit\": \"git-cz\",\n    \"format\": \"prettier . --write --ignore-path .gitignore && git update-index --again\",\n    \"lint\": \"eslint . --ext .ts,.tsx --ignore-path .gitignore\",\n    \"prepare\": \"husky install\",\n    \"release\": \"turbo run build && changeset publish\",\n    \"test\": \"turbo run test\",\n    \"typecheck\": \"turbo run typecheck\",\n    \"version-packages\": \"changeset version\"\n  },\n  \"lint-staged\": {\n    \"*.{md,json}\": [\n      \"prettier --write\"\n    ],\n    \"*.ts?(x)\": [\n      \"eslint\",\n      \"prettier --write\"\n    ],\n    \"package.json\": \"npx sort-package-json\"\n  },\n  \"config\": {\n    \"commitizen\": {\n      \"path\": \"@commitlint/cz-commitlint\"\n    }\n  },\n  \"devDependencies\": {\n    \"@babel/core\": \"7.17.9\",\n    \"@babel/preset-env\": \"7.16.11\",\n    \"@babel/preset-typescript\": \"7.16.7\",\n    \"@changesets/cli\": \"2.22.0\",\n    \"@commitlint/cli\": \"16.2.3\",\n    \"@commitlint/config-conventional\": \"16.2.1\",\n    \"@commitlint/cz-commitlint\": \"16.2.3\",\n    \"@stitches/core\": \"1.2.8\",\n    \"@storybook/addon-a11y\": \"6.4.20\",\n    \"@storybook/addon-actions\": \"6.4.20\",\n    \"@storybook/addon-essentials\": \"6.4.20\",\n    \"@storybook/addon-links\": \"6.4.20\",\n    \"@storybook/addons\": \"6.4.20\",\n    \"@storybook/api\": \"6.4.20\",\n    \"@storybook/builder-webpack5\": \"6.4.20\",\n    \"@storybook/components\": \"6.4.20\",\n    \"@storybook/core-events\": \"6.4.20\",\n    \"@storybook/html\": \"6.4.20\",\n    \"@storybook/manager-webpack5\": \"6.4.20\",\n    \"@storybook/theming\": \"6.4.20\",\n    \"@testing-library/dom\": \"8.13.0\",\n    \"@testing-library/jest-dom\": \"5.16.4\",\n    \"@testing-library/user-event\": \"14.0.4\",\n    \"@types/jest\": \"27.4.1\",\n    \"@types/lodash.merge\": \"4.6.6\",\n    \"@types/node\": \"17.0.23\",\n    \"@types/prismjs\": \"1.26.0\",\n    \"@types/scroll-lock\": \"2.1.0\",\n    \"@types/testing-library__jest-dom\": \"5.14.3\",\n    \"@typescript-eslint/eslint-plugin\": \"5.18.0\",\n    \"@typescript-eslint/parser\": \"5.18.0\",\n    \"babel-loader\": \"8.2.4\",\n    \"babel-preset-solid\": \"1.3.13\",\n    \"commitizen\": \"4.2.4\",\n    \"eslint\": \"8.12.0\",\n    \"eslint-config-prettier\": \"8.5.0\",\n    \"eslint-import-resolver-typescript\": \"2.7.1\",\n    \"eslint-plugin-import\": \"2.26.0\",\n    \"eslint-plugin-jsx-a11y\": \"6.5.1\",\n    \"eslint-plugin-prettier\": \"4.0.0\",\n    \"eslint-plugin-simple-import-sort\": \"7.0.0\",\n    \"eslint-plugin-solid\": \"0.4.6\",\n    \"husky\": \"7.0.4\",\n    \"inquirer\": \"8.2.2\",\n    \"jest\": \"27.5.1\",\n    \"lint-staged\": \"12.3.7\",\n    \"prettier\": \"2.6.2\",\n    \"prismjs\": \"1.27.0\",\n    \"react\": \"17.0.1\",\n    \"react-dom\": \"17.0.1\",\n    \"solid-js\": \"1.4.0\",\n    \"solid-testing-library\": \"0.3.0\",\n    \"solid-transition-group\": \"0.0.10\",\n    \"sort-package-json\": \"1.55.0\",\n    \"storybook-dark-mode\": \"1.0.9\",\n    \"ts-jest\": \"27.1.4\",\n    \"turbo\": \"1.2.4\",\n    \"typescript\": \"4.6.4\",\n    \"vite\": \"2.9.1\",\n    \"vite-plugin-dts\": \"1.1.1\",\n    \"vite-plugin-prismjs\": \"0.0.8\",\n    \"vite-plugin-solid\": \"2.2.6\",\n    \"webpack\": \"5.72.0\"\n  }\n}\n"
  },
  {
    "path": "packages/solid/.browserslistrc",
    "content": "defaults\nnot IE 11\nnot op_mini all\n"
  },
  {
    "path": "packages/solid/.storybook/main.js",
    "content": "const path = require(\"path\");\n\nmodule.exports = {\n  stories: [\"../src/**/*.stories.mdx\", \"../src/**/*.stories.@(js|jsx|ts|tsx)\"],\n  addons: [\n    \"@storybook/addon-links\",\n    \"@storybook/addon-essentials\",\n    \"@storybook/addon-a11y\",\n    \"storybook-dark-mode\",\n  ],\n  framework: \"@storybook/html\",\n  core: {\n    builder: \"webpack5\",\n  },\n  babel: async options => ({\n    ...options,\n    presets: [\"@babel/preset-typescript\", \"solid\"],\n  }),\n  webpackFinal: async config => {\n    config.resolve.alias = {\n      ...config.resolve.alias,\n      \"@\": path.resolve(__dirname, \"../src\"),\n    };\n\n    return config;\n  },\n};\n"
  },
  {
    "path": "packages/solid/.storybook/preview.js",
    "content": "import { themes } from \"@storybook/theming\";\n\nimport { render } from \"solid-js/web\";\n\nlet disposeStory;\n\n// SolidJS decorators\nexport const decorators = [\n  Story => {\n    if (disposeStory) {\n      disposeStory();\n    }\n    const root = document.getElementById(\"root\");\n    const solid = document.createElement(\"div\");\n\n    solid.setAttribute(\"id\", \"solid-root\");\n    root.appendChild(solid);\n    disposeStory = render(Story, solid);\n    return solid;\n  },\n];\n\nexport const parameters = {\n  actions: { argTypesRegex: \"^on[A-Z].*\" },\n  decorators,\n  options: {\n    storySort: {\n      order: [\n        \"General\",\n        \"Layout\",\n        \"Data entry\",\n        \"Data display\",\n        \"Navigation\",\n        \"Feedback\",\n        \"Overlay\",\n      ],\n    },\n  },\n  darkMode: {\n    dark: { ...themes.dark, appBg: \"#1c1c1c\", appContentBg: \"#151718\" },\n    light: { ...themes.normal, appBg: \"#f9fafb\", appContentBg: \"#ffffff\" },\n  },\n  controls: {\n    matchers: {\n      color: /(background|color)$/i,\n      date: /Date$/,\n    },\n  },\n};\n"
  },
  {
    "path": "packages/solid/CHANGELOG.md",
    "content": "## [0.6.3](https://github.com/fabien-ml/hope-ui/compare/v0.6.2...v0.6.3) (2022-08-01)\n\n### 🐛 Bug fixes\n\n- Added `imageProps` to `Avatar`.\n\n## [0.6.2](https://github.com/fabien-ml/hope-ui/compare/v0.6.1...v0.6.2) (2022-05-31)\n\n### 🐛 Bug fixes\n\n- Select doesn't work in overlay components Modal/Drawer (#166).\n\n## [0.6.1](https://github.com/fabien-ml/hope-ui/compare/v0.6.0...v0.6.1) (2022-05-21)\n\n### 🐛 Bug fixes\n\n- Opening accordion triggers form submission (#154).\n- Notification close button is too small on mobile devices (#155).\n\n## [0.6.0](https://github.com/fabien-ml/hope-ui/compare/v0.5.1...v0.6.0) (2022-05-15)\n\n### 💥 BREAKING CHANGES\n\n- Update `solid-js` peer dependency version to `^1.4.0`.\n\n### 🐛 Bug fixes\n\n- `Select` and `Menu` doesn't work with SolidJS ^1.4.0 (#150).\n\n## [0.5.1](https://github.com/fabien-ml/hope-ui/compare/v0.5.0...v0.5.1) (2022-05-08)\n\n### 🐛 Bug fixes\n\n- Clicking Scrollbar in `Select` closes dropdown instead of scrolling (#145).\n\n## [0.5.0](https://github.com/fabien-ml/hope-ui/compare/v0.4.5...v0.5.0) (2022-05-04)\n\n### 💥 BREAKING CHANGES\n\n- `CheckboxControl` and `CheckboxLabel` components has been removed.\n- `RadioControl` and `RadioLabel` components has been removed.\n- `SwitchControl` and `SwitchLabel` components has been removed.\n\n### 🐛 Bug fixes\n\n- `Input` event listener leak (#141).\n\n## [0.4.5](https://github.com/fabien-ml/hope-ui/compare/v0.4.4...v0.4.5) (2022-04-28)\n\n### 🐛 Bug fixes\n\n- `Select` in controlled mode doesn't show the current value (#140).\n\n## [0.4.4](https://github.com/fabien-ml/hope-ui/compare/v0.4.3...v0.4.4) (2022-04-28)\n\n### 🐛 Bug fixes\n\n- `_hover` style prop is not applied on `Button` and `Tabs`.\n\n## [0.4.3](https://github.com/fabien-ml/hope-ui/compare/v0.4.2...v0.4.3) (2022-04-19)\n\n### 🐛 Bug fixes\n\n- Export all component styles.\n\n## [0.4.2](https://github.com/fabien-ml/hope-ui/compare/v0.4.1...v0.4.2) (2022-04-08)\n\n### 🐛 Bug fixes\n\n- improved `Notification` styles.\n\n## [0.4.1](https://github.com/fabien-ml/hope-ui/compare/v0.4.0...v0.4.1) (2022-04-08)\n\n### 🐛 Bug fixes\n\n- `Accordion` and `Tabs` causes infinite loops.\n\n## [0.4.0](https://github.com/fabien-ml/hope-ui/compare/v0.3.1...v0.4.0) (2022-04-06)\n\n### ✨ Features\n\n- Added `Notification` system.\n\n## [0.3.1](https://github.com/fabien-ml/hope-ui/compare/v0.3.0...v0.3.1) (2022-04-04)\n\n### 🐛 Bug fixes\n\n- Incorrect `borderRadius` on `Input` with addons.\n\n## [0.3.0](https://github.com/fabien-ml/hope-ui/compare/v0.2.1...v0.3.0) (2022-04-03)\n\n### 💥 BREAKING CHANGES\n\n- `Select` and `SelectOption` only accept `string | number` as value.\n- `SelectIcon` render prop has been removed.\n- `Stack` default value for `alignItems` prop is `stretch`.\n- `TabPanels` component has been removed.\n\n### ✨ Features\n\n- Added `Skeleton` component.\n- Added `Accordion` component.\n- Added `Popover` component.\n- Added `screenW` and `screenH` theme tokens as semantic equivalents of `100vw` and `100vh`.\n\n## [0.2.1](https://github.com/fabien-ml/hope-ui/compare/v0.2.0...v0.2.1) (2022-03-30)\n\n### 🐛 Bug fixes\n\n- `Tabs` not showing correct `TabPanel` in Safari.\n\n## [0.2.0](https://github.com/fabien-ml/hope-ui/compare/v0.1.2...v0.2.0) (2022-03-28)\n\n### ✨ Features\n\n- Added `Tabs` and `Menu` components.\n- Added `accent` color palette.\n\n## [0.1.2](https://github.com/fabien-ml/hope-ui/compare/v0.1.1...v0.1.2) (2022-03-24)\n\n### 🐛 Bug fixes\n\n- Same `id` is passed to all `Radio` and `Checkbox` when used in a `FormControl`.\n\n## [0.1.1](https://github.com/fabien-ml/hope-ui/compare/v0.1.0...v0.1.1) (2022-03-24)\n\n### 🐛 Bug fixes\n\n- Incorrect `checked` state on `Radio` when a number is used as `value`.\n\n### ✨ Features\n\n- Add `data-group` attribute to `Radio`, `Checkbox` and `Switch` to allow usage of `_group*` style props on children.\n- `Radio`, `Checkbox` and `Switch` exposes they `checked` state as render props.\n\n## [0.1.0](https://github.com/fabien-ml/hope-ui/releases/tag/v0.1.0) (2022-03-23)\n\n### 💥 BREAKING CHANGES\n\n- `Radio` has been splitted into `Radio`, `RadioControl` and `RadioLabel` to improve composability.\n- `Checkbox` has been splitted into `Checkbox`, `CheckboxControl` and `CheckboxLabel` to improve composability.\n- `Switch` has been splitted into `Switch`, `SwitchControl` and `SwitchLabel` to improve composability.\n\n### ✨ Features\n\n- Added `SimpleSelect` and `SimpleOption` components as a simpler abstraction over the `Select` API.\n"
  },
  {
    "path": "packages/solid/README.md",
    "content": "# @hope-ui/solid\n\nA composable and accessible component library that gives you the foundation to build your next SolidJS application.\n\n## Documentation\n\nFor full documentation, visit [hope-ui.com](https://hope-ui.com/).\n\n## Installation\n\n```sh\n# With npm\nnpm install @hope-ui/solid @stitches/core solid-transition-group\n\n# With yarn\nyarn add @hope-ui/solid @stitches/core solid-transition-group\n\n# With pnpm\npnpm add @hope-ui/solid @stitches/core solid-transition-group\n```\n\n## License\n\nThis project is licensed under the MIT License.\n"
  },
  {
    "path": "packages/solid/dev/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <title>Solid App</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n    <script src=\"./index.tsx\" type=\"module\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/solid/dev/index.tsx",
    "content": "import { render } from \"solid-js/web\";\n\nimport { HopeProvider } from \"../src\";\n\nfunction App() {\n  return <></>;\n}\n\nrender(\n  () => (\n    <HopeProvider>\n      <App />\n    </HopeProvider>\n  ),\n  document.getElementById(\"root\") as HTMLDivElement\n);\n"
  },
  {
    "path": "packages/solid/dev/vite.config.ts",
    "content": "import viteConfig from \"../vite.config\";\n\nexport default viteConfig;\n"
  },
  {
    "path": "packages/solid/jest.config.js",
    "content": "const baseJest = require(\"../../jest.config\");\n\nmodule.exports = {\n  ...baseJest,\n};\n"
  },
  {
    "path": "packages/solid/package.json",
    "content": "{\n  \"name\": \"@hope-ui/solid\",\n  \"version\": \"0.6.3\",\n  \"private\": false,\n  \"description\": \"The SolidJS component library you've hoped for.\",\n  \"keywords\": [\n    \"solid\",\n    \"solidjs\",\n    \"ui\",\n    \"library\",\n    \"design\",\n    \"system\",\n    \"components\"\n  ],\n  \"homepage\": \"https://hope-ui.com\",\n  \"bugs\": {\n    \"url\": \"https://github.com/fabien-ml/hope-ui/issues\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/fabien-ml/hope-ui.git\",\n    \"directory\": \"packages/design-system\"\n  },\n  \"license\": \"MIT\",\n  \"author\": \"Fabien MARIE-LOUISE (https://github.com/fabien-ml)\",\n  \"sideEffects\": false,\n  \"exports\": {\n    \".\": {\n      \"import\": \"./dist/index.mjs\",\n      \"require\": \"./dist/index.cjs\"\n    }\n  },\n  \"main\": \"./dist/index.cjs\",\n  \"module\": \"./dist/index.mjs\",\n  \"types\": \"./dist/index.d.ts\",\n  \"files\": [\n    \"dist\"\n  ],\n  \"scripts\": {\n    \"build\": \"vite build\",\n    \"clean\": \"rm -rf .turbo && rm -rf node_modules && rm -rf dist\",\n    \"dev\": \"vite serve dev --host\",\n    \"storybook\": \"start-storybook -p 6006\",\n    \"test\": \"jest\",\n    \"test:watch\": \"jest --watch\",\n    \"typecheck\": \"tsc --noEmit\"\n  },\n  \"dependencies\": {\n    \"@floating-ui/dom\": \"0.4.4\",\n    \"csstype\": \"3.0.11\",\n    \"focus-trap\": \"6.7.3\",\n    \"lodash.merge\": \"4.6.2\",\n    \"scroll-lock\": \"2.1.5\"\n  },\n  \"peerDependencies\": {\n    \"@stitches/core\": \"^1.2.8\",\n    \"solid-js\": \"^1.4.0\",\n    \"solid-transition-group\": \"^0.0.10\"\n  },\n  \"publishConfig\": {\n    \"access\": \"public\"\n  }\n}\n"
  },
  {
    "path": "packages/solid/src/color-mode.ts",
    "content": "import { isServer } from \"solid-js/web\";\n\nimport { __DEV__ } from \"./utils/assertion\";\nimport { mockBody } from \"./utils/object\";\n\nexport type ColorMode = \"light\" | \"dark\" | \"system\";\n\nconst hasLocalStorageSupport = () => typeof Storage !== \"undefined\";\n\nconst COLOR_MODE_STORAGE_KEY = \"hope-ui-color-mode\";\n\n/**\n * Theme CSS class name added to `document.body` based on color mode.\n */\nexport const colorModeClassNames = {\n  light: \"hope-ui-light\",\n  dark: \"hope-ui-dark\",\n};\n\nfunction getColorModeFromLocalStorage() {\n  if (!hasLocalStorageSupport()) {\n    return null;\n  }\n\n  try {\n    return localStorage.getItem(COLOR_MODE_STORAGE_KEY) as ColorMode | null;\n  } catch (error) {\n    if (__DEV__) {\n      console.log(error);\n    }\n    return null;\n  }\n}\n\nexport function saveColorModeToLocalStorage(value: ColorMode) {\n  if (!hasLocalStorageSupport()) {\n    return;\n  }\n\n  try {\n    localStorage.setItem(COLOR_MODE_STORAGE_KEY, value);\n  } catch (error) {\n    if (__DEV__) {\n      console.log(error);\n    }\n  }\n}\n\n/**\n * Get the default color mode based on system preference or from local storage.\n * @param fallbackValue Fallback color mode value, if `system` it will be the system color mode.\n * @returns The default color mode to use.\n */\nexport function getDefaultColorMode(fallbackValue: ColorMode): ColorMode {\n  const persistedPreference = getColorModeFromLocalStorage();\n\n  if (persistedPreference) {\n    return persistedPreference;\n  } else if (fallbackValue === \"system\") {\n    const isSystemDark = window.matchMedia(\"(prefers-color-scheme: dark)\").matches;\n    return isSystemDark ? \"dark\" : \"light\";\n  } else {\n    return fallbackValue;\n  }\n}\n\n/**\n * Returns the theme class to apply based on color mode.\n */\nexport function getColorModeClassName(isDark: boolean) {\n  return isDark ? colorModeClassNames.dark : colorModeClassNames.light;\n}\n\n/**\n * Toggle the theme class from `document.body` based on color mode.\n */\nexport function syncBodyColorModeClassName(isDark: boolean) {\n  const body = isServer ? mockBody : document.body;\n\n  body.classList.add(getColorModeClassName(isDark));\n  body.classList.remove(isDark ? colorModeClassNames.light : colorModeClassNames.dark);\n}\n"
  },
  {
    "path": "packages/solid/src/components/accordion/__tests__/accordion.test.tsx",
    "content": "import { cleanup, fireEvent, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { Accordion } from \"../accordion\";\nimport { AccordionButton } from \"../accordion-button\";\nimport { AccordionItem } from \"../accordion-item\";\nimport { AccordionPanel } from \"../accordion-panel\";\n\ndescribe(\"Accordion\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"opens the accordion panel (uncontrolled)\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <Accordion defaultIndex={0}>\n        <AccordionItem>\n          <h2>\n            <AccordionButton data-testid=\"button\">Section 1 title</AccordionButton>\n          </h2>\n          <AccordionPanel data-testid=\"panel\">Panel 1</AccordionPanel>\n        </AccordionItem>\n      </Accordion>\n    ));\n\n    const button = screen.getByTestId(\"button\");\n\n    // assert\n    expect(button).toHaveAttribute(\"aria-expanded\", \"true\");\n  });\n\n  // it(\"toggles the accordion on click (uncontrolled)\", async () => {\n  //   // act\n  //   renderWithHopeProvider(() => (\n  //     <Accordion>\n  //       <AccordionItem>\n  //         <h2>\n  //           <AccordionButton>Trigger</AccordionButton>\n  //         </h2>\n  //         <AccordionPanel>Panel</AccordionPanel>\n  //       </AccordionItem>\n  //     </Accordion>\n  //   ));\n\n  //   const trigger = screen.getByText(\"Trigger\");\n\n  //   expect(trigger).toHaveAttribute(\"aria-expanded\", \"false\");\n\n  //   // assert\n  //   fireEvent.click(trigger);\n  //   await Promise.resolve();\n\n  //   expect(trigger).toHaveAttribute(\"aria-expanded\", \"true\");\n\n  //   fireEvent.click(trigger);\n  //   await Promise.resolve();\n\n  //   expect(trigger).toHaveAttribute(\"aria-expanded\", \"false\");\n  // });\n});\n"
  },
  {
    "path": "packages/solid/src/components/accordion/accordion-button.tsx",
    "content": "import { JSX, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { isFunction } from \"../../utils/assertion\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { callHandler, chainHandlers } from \"../../utils/function\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { accordionButtonStyles } from \"./accordion.styles\";\nimport { useAccordionItemContext } from \"./accordion-item\";\n\nexport type AccordionButtonProps<C extends ElementType = \"button\"> = HTMLHopeProps<C>;\n\nconst hopeAccordionButtonClass = \"hope-accordion__button\";\n\n/**\n * AccordionButton is used expands and collapses an accordion item.\n * It must be a child of `AccordionItem`.\n *\n * Note 🚨: Each accordion button must be wrapped in an heading tag,\n * that is appropriate for the information architecture of the page.\n */\nexport function AccordionButton<C extends ElementType = \"button\">(props: AccordionButtonProps<C>) {\n  const theme = useStyleConfig().Accordion;\n\n  const accordionItemContext = useAccordionItemContext();\n\n  const [local, others] = splitProps(props as AccordionButtonProps<\"button\">, [\n    \"ref\",\n    \"class\",\n    \"disabled\",\n    \"onClick\",\n    \"onFocus\",\n    \"onKeyDown\",\n  ]);\n\n  const assignRef = (el: HTMLButtonElement) => {\n    accordionItemContext.registerButton(el);\n\n    if (isFunction(local.ref)) {\n      local.ref(el);\n    } else {\n      // eslint-disable-next-line solid/reactivity\n      local.ref = el;\n    }\n  };\n\n  const onClick: JSX.EventHandlerUnion<HTMLButtonElement, MouseEvent> = event => {\n    callHandler(local.onClick, event);\n\n    accordionItemContext.toggleExpandedState();\n  };\n\n  const onFocus: JSX.EventHandlerUnion<HTMLButtonElement, FocusEvent> = event => {\n    callHandler(local.onFocus, event);\n\n    accordionItemContext.setFocusedIndex();\n  };\n\n  const onKeyDown: JSX.EventHandlerUnion<HTMLButtonElement, KeyboardEvent> = event => {\n    chainHandlers(local.onKeyDown, accordionItemContext.onButtonKeyDown)(event);\n  };\n\n  const classes = () => classNames(local.class, hopeAccordionButtonClass, accordionButtonStyles());\n\n  return (\n    <hope.button\n      role=\"button\"\n      type=\"button\"\n      ref={assignRef}\n      id={accordionItemContext.state.buttonId}\n      aria-controls={accordionItemContext.state.panelId}\n      aria-expanded={accordionItemContext.state.expanded}\n      disabled={accordionItemContext.state.disabled}\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.button}\n      onClick={onClick}\n      onFocus={onFocus}\n      onKeyDown={onKeyDown}\n      {...others}\n    />\n  );\n}\n\nAccordionButton.toString = () => createClassSelector(hopeAccordionButtonClass);\n"
  },
  {
    "path": "packages/solid/src/components/accordion/accordion-icon.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { IconProps } from \"../icon/icon\";\nimport { IconCaretDown } from \"../icons/IconCaretDown\";\nimport { ElementType } from \"../types\";\nimport { accordionIconStyles } from \"./accordion.styles\";\nimport { useAccordionItemContext } from \"./accordion-item\";\n\nexport type AccordionIconProps<C extends ElementType = \"svg\"> = IconProps<C>;\n\nconst hopeAccordionIconClass = \"hope-accordion__icon\";\n\n/**\n * AccordionIcon that gives a visual cue of the open/close state of the accordion item.\n * It rotates `180deg` based on the open/close state.\n */\nexport function AccordionIcon<C extends ElementType = \"svg\">(props: AccordionIconProps<C>) {\n  const theme = useStyleConfig().Accordion;\n\n  const accordionItemContext = useAccordionItemContext();\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeAccordionIconClass,\n      accordionIconStyles({\n        expanded: accordionItemContext.state.expanded,\n        disabled: accordionItemContext.state.disabled,\n      })\n    );\n  };\n\n  return (\n    <IconCaretDown aria-hidden class={classes()} __baseStyle={theme?.baseStyle?.icon} {...others} />\n  );\n}\n\nAccordionIcon.toString = () => createClassSelector(hopeAccordionIconClass);\n"
  },
  {
    "path": "packages/solid/src/components/accordion/accordion-item.tsx",
    "content": "import {\n  Accessor,\n  createContext,\n  createMemo,\n  createUniqueId,\n  JSX,\n  Show,\n  splitProps,\n  useContext,\n} from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { normalizeEventKey } from \"../../utils/dom\";\nimport { callHandler } from \"../../utils/function\";\nimport { isChildrenFunction } from \"../../utils/solid\";\nimport { EventKeyMap } from \"../../utils/types\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useAccordionContext } from \"./accordion\";\nimport { accordionItemStyles } from \"./accordion.styles\";\n\ntype AccordionItemChildrenRenderProp = (props: {\n  expanded: Accessor<boolean>;\n  disabled: Accessor<boolean>;\n}) => JSX.Element;\n\ninterface AccordionItemOptions {\n  /**\n   * If `true`, the accordion item will be disabled.\n   */\n  disabled?: boolean;\n\n  /**\n   * The children of the accordion item.\n   */\n  children?: JSX.Element | AccordionItemChildrenRenderProp;\n}\n\nexport type AccordionItemProps<C extends ElementType = \"div\"> = HTMLHopeProps<\n  C,\n  AccordionItemOptions\n>;\n\ninterface AccordionItemState {\n  /**\n   * The index of the accordion item.\n   */\n  index: number;\n\n  /**\n   * The id of the accordion button.\n   */\n  buttonId: string;\n\n  /**\n   * The id of the accordion panel.\n   */\n  panelId: string;\n\n  /**\n   * If `true`, the accordion item will be expanded.\n   */\n  expanded: boolean;\n\n  /**\n   * If `true`, the accordion item will be disabled.\n   */\n  disabled: boolean;\n}\n\nconst hopeAccordionItemClass = \"hope-accordion__item\";\n\n/**\n * AccordionItem is a single accordion that provides the open-close\n * behavior when the accordion button is clicked.\n *\n * It also provides context for the accordion button and panel.\n */\nexport function AccordionItem<C extends ElementType = \"div\">(props: AccordionItemProps<C>) {\n  const defaultIdPrefix = `hope-accordion-item-${createUniqueId()}`;\n\n  const theme = useStyleConfig().Accordion;\n\n  const accordionContext = useAccordionContext();\n\n  const [state, setState] = createStore<AccordionItemState>({\n    index: -1,\n    get buttonId() {\n      return `${defaultIdPrefix}-button`;\n    },\n    get panelId() {\n      return `${defaultIdPrefix}-panel`;\n    },\n    get expanded() {\n      return accordionContext.isExpandedIndex(this.index);\n    },\n    get disabled() {\n      return props.disabled ?? false;\n    },\n  });\n\n  const [local, others] = splitProps(props, [\"class\", \"children\"]);\n\n  const registerButton = (el: HTMLButtonElement) => {\n    const index = accordionContext.registerAccordionButton(el);\n    setState(\"index\", index);\n  };\n\n  const setFocusedIndex = () => {\n    accordionContext.setFocusedIndex(state.index);\n  };\n\n  const toggleExpandedState = () => {\n    accordionContext.setExpandedIndex(state.index, !state.expanded);\n  };\n\n  const keyMap: Accessor<EventKeyMap> = createMemo(() => ({\n    ArrowDown: accordionContext.focusNextAccordionButton,\n    ArrowUp: accordionContext.focusPrevAccordionButton,\n    Home: accordionContext.focusFirstAccordionButton,\n    End: accordionContext.focusLastAccordionButton,\n  }));\n\n  const onButtonKeyDown: JSX.EventHandlerUnion<HTMLButtonElement, KeyboardEvent> = event => {\n    const eventKey = normalizeEventKey(event);\n\n    const action = keyMap()[eventKey];\n\n    if (action) {\n      event.preventDefault();\n      callHandler(action, event);\n    }\n  };\n\n  const expandedAccessor = () => state.expanded;\n  const disabledAccessor = () => state.disabled;\n\n  const classes = () => classNames(local.class, hopeAccordionItemClass, accordionItemStyles());\n\n  const context: AccordionItemContextValue = {\n    state: state as AccordionItemState,\n    registerButton,\n    setFocusedIndex,\n    toggleExpandedState,\n    onButtonKeyDown,\n  };\n\n  return (\n    <AccordionItemContext.Provider value={context}>\n      <Box class={classes()} __baseStyle={theme?.baseStyle?.item} {...others}>\n        <Show when={isChildrenFunction(local)} fallback={local.children as JSX.Element}>\n          {(local.children as AccordionItemChildrenRenderProp)?.({\n            expanded: expandedAccessor,\n            disabled: disabledAccessor,\n          })}\n        </Show>\n      </Box>\n    </AccordionItemContext.Provider>\n  );\n}\n\nAccordionItem.toString = () => createClassSelector(hopeAccordionItemClass);\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ninterface AccordionItemContextValue {\n  state: AccordionItemState;\n\n  /**\n   * Callback to set the accordion item button to the accordion context.\n   */\n  registerButton: (el: HTMLButtonElement) => void;\n\n  /**\n   * Callback to notify the accordion context that this item has focus.\n   */\n  setFocusedIndex: () => void;\n\n  /**\n   * Callback to toggle the expanded state of the accordion item.\n   */\n  toggleExpandedState: () => void;\n\n  /**\n   * Manage keyboard navigation between accordion items.\n   */\n  onButtonKeyDown: JSX.EventHandlerUnion<HTMLButtonElement, KeyboardEvent>;\n}\n\nconst AccordionItemContext = createContext<AccordionItemContextValue>();\n\nexport function useAccordionItemContext() {\n  const context = useContext(AccordionItemContext);\n\n  if (!context) {\n    throw new Error(\n      \"[Hope UI]: useAccordionItemContext must be used within a `<AccordionItem />` component\"\n    );\n  }\n\n  return context;\n}\n"
  },
  {
    "path": "packages/solid/src/components/accordion/accordion-panel.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { Collapse } from \"../collapse/collapse\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { accordionPanelStyles } from \"./accordion.styles\";\nimport { useAccordionItemContext } from \"./accordion-item\";\n\nexport type AccordionPanelProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeAccordionPanelClass = \"hope-accordion__panel\";\n\n/**\n * Accordion panel that holds the content for each accordion.\n * It shows and hides based on the state from the `AccordionItem`.\n *\n * It uses the `Collapse` component to animate its height.\n */\nexport function AccordionPanel<C extends ElementType = \"div\">(props: AccordionPanelProps<C>) {\n  const theme = useStyleConfig().Accordion;\n\n  const accordionItemContext = useAccordionItemContext();\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeAccordionPanelClass, accordionPanelStyles());\n\n  return (\n    <Collapse expanded={accordionItemContext.state.expanded}>\n      <Box\n        role=\"region\"\n        id={accordionItemContext.state.panelId}\n        aria-labelledby={accordionItemContext.state.buttonId}\n        class={classes()}\n        __baseStyle={theme?.baseStyle?.panel}\n        {...others}\n      />\n    </Collapse>\n  );\n}\n\nAccordionPanel.toString = () => createClassSelector(hopeAccordionPanelClass);\n"
  },
  {
    "path": "packages/solid/src/components/accordion/accordion.styles.ts",
    "content": "import { css } from \"../../styled-system/stitches.config\";\n\n/* -------------------------------------------------------------------------------------------------\n * Accordion - item\n * -----------------------------------------------------------------------------------------------*/\n\nexport const accordionItemStyles = css({\n  borderTopWidth: \"1px\",\n  borderColor: \"$neutral7\",\n\n  overflowAnchor: \"none\",\n\n  \"&:last-of-type\": {\n    borderBottomWidth: \"1px\",\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Accordion - button\n * -----------------------------------------------------------------------------------------------*/\n\nexport const accordionButtonStyles = css({\n  appearance: \"none\",\n\n  display: \"flex\",\n  alignItems: \"center\",\n\n  width: \"100%\",\n\n  outline: \"none\",\n\n  backgroundColor: \"transparent\",\n\n  px: \"$4\",\n  py: \"$2\",\n\n  color: \"inherit\",\n  fontSize: \"$base\",\n  lineHeight: \"$6\",\n\n  cursor: \"pointer\",\n  transition: \"background-color 250ms\",\n\n  \"&:disabled\": {\n    opacity: 0.4,\n    cursor: \"not-allowed\",\n  },\n\n  \"&:hover\": {\n    backgroundColor: \"$neutral4\",\n  },\n\n  \"&:focus\": {\n    outline: \"none\",\n    boxShadow: \"$outline\",\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Accordion - icon\n * -----------------------------------------------------------------------------------------------*/\n\nexport const accordionIconStyles = css({\n  flexGrow: 0,\n  flexShrink: 0,\n\n  fontSize: \"1.25em\",\n  pointerEvents: \"none\",\n\n  transition: \"transform 250ms\",\n  transformOrigin: \"center\",\n\n  variants: {\n    expanded: {\n      true: {\n        transform: \"rotate(-180deg)\",\n      },\n    },\n    disabled: {\n      true: {\n        opacity: 0.4,\n      },\n    },\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Accordion - panel\n * -----------------------------------------------------------------------------------------------*/\n\nexport const accordionPanelStyles = css({\n  pt: \"$2\",\n  px: \"$4\",\n  pb: \"$4\",\n});\n"
  },
  {
    "path": "packages/solid/src/components/accordion/accordion.tsx",
    "content": "import {\n  createContext,\n  createMemo,\n  createSignal,\n  onCleanup,\n  splitProps,\n  useContext,\n} from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { SystemStyleObject } from \"../../styled-system/types\";\nimport { isArray } from \"../../utils/assertion\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { getNextIndex, getPrevIndex } from \"../../utils/number\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\n\nexport type ExpandedIndex = number | number[];\n\ninterface AccordionOptions {\n  /**\n   * If `true`, multiple accordion items can be expanded at once.\n   */\n  allowMultiple?: boolean;\n\n  /**\n   * The index(es) of the expanded accordion item.\n   * (in controlled mode)\n   */\n  index?: ExpandedIndex;\n\n  /**\n   * The initial index(es) of the expanded accordion item.\n   * (in uncontrolled mode)\n   */\n  defaultIndex?: ExpandedIndex;\n\n  /**\n   * The callback invoked when accordion items are expanded or collapsed.\n   */\n  onChange?: (expandedIndex: ExpandedIndex) => void;\n}\n\nexport type AccordionProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, AccordionOptions>;\n\ninterface AccordionState {\n  /**\n   * The index(es) of the expanded accordion items.\n   * (In uncontrolled mode)\n   */\n  _expandedIndex: ExpandedIndex;\n\n  /**\n   * If `true`, the accordion is in controlled mode.\n   * (have index and onChange props)\n   */\n  isControlled: boolean;\n\n  /**\n   * The index(es) of the expanded accordion items.\n   * (in controlled mode)\n   */\n  expandedIndex: ExpandedIndex;\n\n  /**\n   * The index of the focused accordion button.\n   */\n  focusedIndex: number;\n\n  /**\n   * All accordion button nodes.\n   */\n  //buttons: Array<HTMLButtonElement>;\n}\n\nconst hopeAccordionClass = \"hope-accordion\";\n\n/**\n * The wrapper that provides context and focus management for all accordion items.\n * It wraps all accordion items in a `div` for better grouping.\n */\nexport function Accordion<C extends ElementType = \"div\">(props: AccordionProps<C>) {\n  const theme = useStyleConfig().Accordion;\n\n  const [buttons, setButtons] = createSignal<HTMLButtonElement[]>([]);\n\n  const [state, setState] = createStore<AccordionState>({\n    // eslint-disable-next-line solid/reactivity\n    _expandedIndex: props.defaultIndex ?? (props.allowMultiple ? [] : -1),\n    focusedIndex: -1,\n    //buttons: [],\n    get isControlled() {\n      return props.index !== undefined;\n    },\n    get expandedIndex() {\n      return this.isControlled ? props.index : this._expandedIndex;\n    },\n  });\n\n  const [local, others] = splitProps(props, [\n    \"class\",\n    \"allowMultiple\",\n    \"index\",\n    \"defaultIndex\",\n    \"onChange\",\n  ]);\n\n  const reverseButtons = createMemo(() => buttons().slice().reverse());\n\n  const setFocusedIndex = (index: number) => {\n    setState(\"focusedIndex\", index);\n  };\n\n  const setExpandedIndex = (index: number, isExpanded: boolean) => {\n    let nextState: ExpandedIndex = -1;\n\n    if (local.allowMultiple && isArray<number>(state.expandedIndex)) {\n      nextState = isExpanded\n        ? [...state.expandedIndex, index]\n        : state.expandedIndex.filter(idx => idx !== index);\n    } else if (isExpanded) {\n      nextState = index;\n    } else {\n      nextState = -1;\n    }\n\n    setState(\"_expandedIndex\", nextState);\n\n    local.onChange?.(nextState);\n  };\n\n  const isExpandedIndex = (index: number) => {\n    return isArray(state.expandedIndex)\n      ? state.expandedIndex.includes(index)\n      : state.expandedIndex === index;\n  };\n\n  const registerAccordionButton = (node: HTMLButtonElement) => {\n    return setButtons(prev => [...prev, node]).length - 1;\n\n    // This cause infinite loop and crash, so use a signal instead\n    //setState(\"buttons\", prev => [...prev, node] as Array<DeepReadonly<HTMLButtonElement>>);\n\n    //return state.buttons.length - 1;\n  };\n\n  const focusNextAccordionButton = () => {\n    const lastIndex = buttons().length - 1;\n    let nextIndex = getNextIndex(state.focusedIndex, lastIndex, true);\n    let nextButton = buttons()[nextIndex];\n\n    while (nextButton.disabled) {\n      nextIndex = getNextIndex(nextIndex, lastIndex, true);\n      nextButton = buttons()[nextIndex];\n    }\n\n    nextButton.focus();\n  };\n\n  const focusPrevAccordionButton = () => {\n    const lastIndex = buttons().length - 1;\n    let prevIndex = getPrevIndex(state.focusedIndex, lastIndex, true);\n    let prevButton = buttons()[prevIndex];\n\n    while (prevButton.disabled) {\n      prevIndex = getPrevIndex(prevIndex, lastIndex, true);\n      prevButton = buttons()[prevIndex];\n    }\n\n    prevButton.focus();\n  };\n\n  const focusFirstAccordionButton = () => {\n    buttons()\n      .find(button => !button.disabled)\n      ?.focus();\n  };\n\n  const focusLastAccordionButton = () => {\n    reverseButtons()\n      .find(button => !button.disabled)\n      ?.focus();\n  };\n\n  const classes = () => classNames(local.class, hopeAccordionClass);\n\n  // Reset focused index when accordion unmounts or descendants change\n  onCleanup(() => {\n    setFocusedIndex(-1);\n  });\n\n  const context: AccordionContextValue = {\n    state: state as AccordionState,\n    setFocusedIndex,\n    setExpandedIndex,\n    isExpandedIndex,\n    registerAccordionButton,\n    focusNextAccordionButton,\n    focusPrevAccordionButton,\n    focusFirstAccordionButton,\n    focusLastAccordionButton,\n  };\n\n  return (\n    <AccordionContext.Provider value={context}>\n      <Box class={classes()} __baseStyle={theme?.baseStyle?.root} {...others} />\n    </AccordionContext.Provider>\n  );\n}\n\nAccordion.toString = () => createClassSelector(hopeAccordionClass);\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ninterface AccordionContextValue {\n  state: AccordionState;\n\n  /**\n   * Callback to set the focused accordion button index.\n   */\n  setFocusedIndex: (index: number) => void;\n\n  /**\n   * Callback to set the expanded accordion indexes.\n   */\n  setExpandedIndex: (index: number, isExpanded: boolean) => void;\n\n  /**\n   * Check if the accordion item at the given index is expanded or not.\n   */\n  isExpandedIndex: (index: number) => boolean;\n\n  /**\n   * Register a `AccordionButton` to the context.\n   * @return The index of the accordion button.\n   */\n  registerAccordionButton: (node: HTMLButtonElement) => number;\n\n  /**\n   * Focus the previous non disabled accordion button.\n   */\n  focusPrevAccordionButton: () => void;\n\n  /**\n   * Focus the next non disabled accordion button.\n   */\n  focusNextAccordionButton: () => void;\n\n  /**\n   * Focus the first non disabled accordion button.\n   */\n  focusFirstAccordionButton: () => void;\n\n  /**\n   * Focus the last non disabled accordion button.\n   */\n  focusLastAccordionButton: () => void;\n}\n\nconst AccordionContext = createContext<AccordionContextValue>();\n\nexport function useAccordionContext() {\n  const context = useContext(AccordionContext);\n\n  if (!context) {\n    throw new Error(\n      \"[Hope UI]: useAccordionContext must be used within a `<Accordion />` component\"\n    );\n  }\n\n  return context;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * StyleConfig\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface AccordionStyleConfig {\n  baseStyle?: {\n    root?: SystemStyleObject;\n    item?: SystemStyleObject;\n    button?: SystemStyleObject;\n    icon?: SystemStyleObject;\n    panel?: SystemStyleObject;\n  };\n}\n"
  },
  {
    "path": "packages/solid/src/components/accordion/index.ts",
    "content": "export * from \"./accordion\";\nexport * from \"./accordion.styles\";\nexport * from \"./accordion-button\";\nexport * from \"./accordion-icon\";\nexport * from \"./accordion-item\";\nexport * from \"./accordion-panel\";\n"
  },
  {
    "path": "packages/solid/src/components/alert/__tests__/alert-description.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { alertDescriptionStyles } from \"../alert.styles\";\nimport { AlertDescription } from \"../alert-description\";\n\ndescribe(\"AlertDescription\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <AlertDescription data-testid=\"alert-description\">AlertDescription</AlertDescription>\n    ));\n    const alertDescription = screen.getByTestId(\"alert-description\");\n\n    // assert\n    expect(alertDescription).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <AlertDescription data-testid=\"alert-description\">AlertDescription</AlertDescription>\n    ));\n    const alertDescription = screen.getByTestId(\"alert-description\");\n\n    // assert\n    expect(alertDescription).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <AlertDescription data-testid=\"alert-description\" as=\"p\">\n        AlertDescription\n      </AlertDescription>\n    ));\n    const alertDescription = screen.getByTestId(\"alert-description\");\n\n    // assert\n    expect(alertDescription).toBeInstanceOf(HTMLParagraphElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"AlertDescription\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <AlertDescription data-testid=\"alert-description\">{children}</AlertDescription>\n    ));\n    const alertDescription = screen.getByTestId(\"alert-description\");\n\n    // assert\n    expect(alertDescription).toHaveTextContent(children);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <AlertDescription data-testid=\"alert-description\">AlertDescription</AlertDescription>\n    ));\n    const alertDescription = screen.getByTestId(\"alert-description\");\n\n    // assert\n    expect(alertDescription).toHaveClass(\"hope-alert__description\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(AlertDescription.toString()).toBe(\".hope-alert__description\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <AlertDescription data-testid=\"alert-description\" class={stubClass}>\n        AlertDescription\n      </AlertDescription>\n    ));\n    const alertDescription = screen.getByTestId(\"alert-description\");\n\n    // assert\n    expect(alertDescription).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <AlertDescription data-testid=\"alert-description\" className={stubClass}>\n        AlertDescription\n      </AlertDescription>\n    ));\n    const alertDescription = screen.getByTestId(\"alert-description\");\n\n    // assert\n    expect(alertDescription).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <AlertDescription data-testid=\"alert-description\" classList={{ [stubClass]: true }}>\n        AlertDescription\n      </AlertDescription>\n    ));\n    const alertDescription = screen.getByTestId(\"alert-description\");\n\n    // assert\n    expect(alertDescription).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from alertDescriptionStyles\", () => {\n    // arrange\n    const alertDescriptionClass = alertDescriptionStyles();\n\n    // act\n    renderWithHopeProvider(() => (\n      <AlertDescription data-testid=\"alert-description\">Text</AlertDescription>\n    ));\n    const alertDescription = screen.getByTestId(\"alert-description\");\n\n    // assert\n    expect(alertDescription).toHaveClass(alertDescriptionClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/alert/__tests__/alert-icon.test.tsx",
    "content": "import { JSX } from \"solid-js\";\nimport { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { Alert } from \"../alert\";\nimport { alertIconStyles } from \"../alert.styles\";\nimport { AlertIcon } from \"../alert-icon\";\n\nfunction renderWithAlertContext(callback: () => JSX.Element) {\n  return renderWithHopeProvider(() => <Alert status=\"success\">{callback}</Alert>);\n}\n\ndescribe(\"AlertIcon\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithAlertContext(() => <AlertIcon data-testid=\"alert-icon\" />);\n    const alertIcon = screen.getByTestId(\"alert-icon\");\n\n    // assert\n    expect(alertIcon).toBeInTheDocument();\n  });\n\n  it(\"should render content provided by the 'as' prop\", () => {\n    // act\n    renderWithAlertContext(() => <AlertIcon data-testid=\"alert-icon\" />);\n    const alertIcon = screen.getByTestId(\"alert-icon\");\n\n    // assert\n    expect(alertIcon).toBeInstanceOf(SVGElement);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithAlertContext(() => <AlertIcon data-testid=\"alert-icon\" />);\n    const alertIcon = screen.getByTestId(\"alert-icon\");\n\n    // assert\n    expect(alertIcon).toHaveClass(\"hope-alert__icon\");\n  });\n\n  it(\"should return semantic hope class of <Icon/> as css selector when calling toString()\", () => {\n    expect(AlertIcon.toString()).toBe(\".hope-alert__icon\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithAlertContext(() => <AlertIcon data-testid=\"alert-icon\" class={stubClass} />);\n    const alertIcon = screen.getByTestId(\"alert-icon\");\n\n    // assert\n    expect(alertIcon).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithAlertContext(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <AlertIcon data-testid=\"alert-icon\" className={stubClass} />\n    ));\n    const alertIcon = screen.getByTestId(\"alert-icon\");\n\n    // assert\n    expect(alertIcon).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithAlertContext(() => (\n      <AlertIcon data-testid=\"alert-icon\" classList={{ [stubClass]: true }} />\n    ));\n    const alertIcon = screen.getByTestId(\"alert-icon\");\n\n    // assert\n    expect(alertIcon).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from alertIconStyles\", () => {\n    // arrange\n    const alertIconClass = alertIconStyles();\n\n    // act\n    renderWithAlertContext(() => <AlertIcon data-testid=\"alert-icon\" />);\n    const alertIcon = screen.getByTestId(\"alert-icon\");\n\n    // assert\n    expect(alertIcon).toHaveClass(alertIconClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/alert/__tests__/alert-title.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { alertTitleStyles } from \"../alert.styles\";\nimport { AlertTitle } from \"../alert-title\";\n\ndescribe(\"AlertTitle\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <AlertTitle data-testid=\"alert-title\">AlertTitle</AlertTitle>);\n    const alertTitle = screen.getByTestId(\"alert-title\");\n\n    // assert\n    expect(alertTitle).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <AlertTitle data-testid=\"alert-title\">AlertTitle</AlertTitle>);\n    const alertTitle = screen.getByTestId(\"alert-title\");\n\n    // assert\n    expect(alertTitle).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <AlertTitle data-testid=\"alert-title\" as=\"p\">\n        AlertTitle\n      </AlertTitle>\n    ));\n    const alertTitle = screen.getByTestId(\"alert-title\");\n\n    // assert\n    expect(alertTitle).toBeInstanceOf(HTMLParagraphElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"AlertTitle\";\n\n    // act\n    renderWithHopeProvider(() => <AlertTitle data-testid=\"alert-title\">{children}</AlertTitle>);\n    const alertTitle = screen.getByTestId(\"alert-title\");\n\n    // assert\n    expect(alertTitle).toHaveTextContent(children);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <AlertTitle data-testid=\"alert-title\">AlertTitle</AlertTitle>);\n    const alertTitle = screen.getByTestId(\"alert-title\");\n\n    // assert\n    expect(alertTitle).toHaveClass(\"hope-alert__title\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(AlertTitle.toString()).toBe(\".hope-alert__title\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <AlertTitle data-testid=\"alert-title\" class={stubClass}>\n        AlertTitle\n      </AlertTitle>\n    ));\n    const alertTitle = screen.getByTestId(\"alert-title\");\n\n    // assert\n    expect(alertTitle).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <AlertTitle data-testid=\"alert-title\" className={stubClass}>\n        AlertTitle\n      </AlertTitle>\n    ));\n    const alertTitle = screen.getByTestId(\"alert-title\");\n\n    // assert\n    expect(alertTitle).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <AlertTitle data-testid=\"alert-title\" classList={{ [stubClass]: true }}>\n        AlertTitle\n      </AlertTitle>\n    ));\n    const alertTitle = screen.getByTestId(\"alert-title\");\n\n    // assert\n    expect(alertTitle).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from alertTitleStyles\", () => {\n    // arrange\n    const alertTitleClass = alertTitleStyles();\n\n    // act\n    renderWithHopeProvider(() => <AlertTitle data-testid=\"alert-title\">Text</AlertTitle>);\n    const alertTitle = screen.getByTestId(\"alert-title\");\n\n    // assert\n    expect(alertTitle).toHaveClass(alertTitleClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/alert/__tests__/alert.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { Alert } from \"../alert\";\nimport { alertStyles, AlertVariants } from \"../alert.styles\";\n\ndescribe(\"Alert\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Alert data-testid=\"alert\">Alert</Alert>);\n    const alert = screen.getByTestId(\"alert\");\n\n    // assert\n    expect(alert).toBeInTheDocument();\n  });\n\n  it(\"should render <div> alert by default\", () => {\n    // act\n    renderWithHopeProvider(() => <Alert data-testid=\"alert\">Alert</Alert>);\n    const alert = screen.getByTestId(\"alert\");\n\n    // assert\n    expect(alert).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render alert provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <Alert data-testid=\"alert\" as=\"span\">\n        Alert\n      </Alert>\n    ));\n    const alert = screen.getByTestId(\"alert\");\n\n    // assert\n    expect(alert).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"Alert\";\n\n    // act\n    renderWithHopeProvider(() => <Alert data-testid=\"alert\">{children}</Alert>);\n    const alert = screen.getByTestId(\"alert\");\n\n    // assert\n    expect(alert).toHaveTextContent(children);\n  });\n\n  it(\"should have role=alert\", () => {\n    // act\n    renderWithHopeProvider(() => <Alert data-testid=\"alert\">Alert</Alert>);\n    const alert = screen.getByTestId(\"alert\");\n\n    // assert\n    expect(alert).toHaveAttribute(\"role\", \"alert\");\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <Alert data-testid=\"alert\">Alert</Alert>);\n    const alert = screen.getByTestId(\"alert\");\n\n    // assert\n    expect(alert).toHaveClass(\"hope-alert\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(Alert.toString()).toBe(\".hope-alert\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Alert data-testid=\"alert\" class={stubClass}>\n        Alert\n      </Alert>\n    ));\n    const alert = screen.getByTestId(\"alert\");\n\n    // assert\n    expect(alert).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <Alert data-testid=\"alert\" className={stubClass}>\n        Alert\n      </Alert>\n    ));\n    const alert = screen.getByTestId(\"alert\");\n\n    // assert\n    expect(alert).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Alert data-testid=\"alert\" classList={{ [stubClass]: true }}>\n        Alert\n      </Alert>\n    ));\n    const alert = screen.getByTestId(\"alert\");\n\n    // assert\n    expect(alert).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from variants prop\", () => {\n    // arrange\n    const variantProps: AlertVariants = {\n      status: \"success\",\n      variant: \"subtle\",\n    };\n    const alertClass = alertStyles(variantProps);\n\n    // act\n    renderWithHopeProvider(() => (\n      <Alert data-testid=\"alert\" {...variantProps}>\n        Alert\n      </Alert>\n    ));\n    const alert = screen.getByTestId(\"alert\");\n\n    // assert\n    expect(alert).toHaveClass(alertClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/alert/alert-description.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { alertDescriptionStyles } from \"./alert.styles\";\n\nexport type AlertDescriptionProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeAlertDescriptionClass = \"hope-alert__description\";\n\nexport function AlertDescription<C extends ElementType = \"div\">(props: AlertDescriptionProps<C>) {\n  const theme = useStyleConfig().Alert;\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () =>\n    classNames(local.class, hopeAlertDescriptionClass, alertDescriptionStyles());\n\n  return <Box class={classes()} __baseStyle={theme?.baseStyle?.description} {...others} />;\n}\n\nAlertDescription.toString = () => createClassSelector(hopeAlertDescriptionClass);\n"
  },
  {
    "path": "packages/solid/src/components/alert/alert-icon.tsx",
    "content": "import { mergeProps, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Icon, IconProps } from \"../icon/icon\";\nimport { IconCheckCircleSolid } from \"../icons/IconCheckCircleSolid\";\nimport { IconExclamationCircleSolid } from \"../icons/IconExclamationCircleSolid\";\nimport { IconExclamationTriangleSolid } from \"../icons/IconExclamationTriangleSolid\";\nimport { IconInfoCircleSolid } from \"../icons/IconInfoCircleSolid\";\nimport { ElementType } from \"../types\";\nimport { useAlertContext } from \"./alert\";\nimport { alertIconStyles } from \"./alert.styles\";\n\nexport type AlertIconProps<C extends ElementType = \"svg\"> = IconProps<C>;\n\nconst hopeAlertIconClass = \"hope-alert__icon\";\n\nexport function AlertIcon<C extends ElementType = \"svg\">(props: AlertIconProps<C>) {\n  const theme = useStyleConfig().Alert;\n  const { status } = useAlertContext();\n\n  const defaultProps: AlertIconProps<\"svg\"> = {\n    boxSize: \"$6\",\n  };\n\n  const propsWithDefault: AlertIconProps<\"svg\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault, [\"as\", \"class\"]);\n\n  const classes = () => classNames(local.class, hopeAlertIconClass, alertIconStyles());\n\n  const icon = () => {\n    if (local.as) {\n      return local.as as ElementType;\n    }\n\n    switch (status()) {\n      case \"success\":\n        return IconCheckCircleSolid;\n      case \"info\":\n        return IconInfoCircleSolid;\n      case \"warning\":\n        return IconExclamationTriangleSolid;\n      case \"danger\":\n        return IconExclamationCircleSolid;\n    }\n  };\n\n  return <Icon as={icon()} class={classes()} __baseStyle={theme?.baseStyle?.icon} {...others} />;\n}\n\nAlertIcon.toString = () => createClassSelector(hopeAlertIconClass);\n"
  },
  {
    "path": "packages/solid/src/components/alert/alert-title.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { alertTitleStyles } from \"./alert.styles\";\n\nexport type AlertTitleProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeAlertTitleClass = \"hope-alert__title\";\n\nexport function AlertTitle<C extends ElementType = \"div\">(props: AlertTitleProps<C>) {\n  const theme = useStyleConfig().Alert;\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeAlertTitleClass, alertTitleStyles());\n\n  return <Box class={classes()} __baseStyle={theme?.baseStyle?.title} {...others} />;\n}\n\nAlertTitle.toString = () => createClassSelector(hopeAlertTitleClass);\n"
  },
  {
    "path": "packages/solid/src/components/alert/alert.stories.tsx",
    "content": "import { VStack } from \"../stack/stack\";\nimport { HopeWrapper } from \"../storybook-utils\";\nimport { Alert } from \"./alert\";\nimport { AlertDescription } from \"./alert-description\";\nimport { AlertIcon } from \"./alert-icon\";\nimport { AlertTitle } from \"./alert-title\";\n\nexport default {\n  title: \"Feedback/Alert\",\n  component: Alert,\n  parameters: { layout: \"centered\" },\n  decorators: [\n    (Story: any) => (\n      <HopeWrapper>\n        <Story />\n      </HopeWrapper>\n    ),\n  ],\n  argTypes: {\n    variant: {\n      control: { type: \"select\" },\n      options: [\"solid\", \"subtle\", \"left-accent\", \"top-accent\"],\n    },\n    children: {\n      control: { type: \"text\" },\n    },\n  },\n  args: {\n    variant: \"subtle\",\n    children: \"Hope UI is going live on April 7th. Get ready!\",\n  },\n};\n\nexport const Default = (args: any) => (\n  <VStack spacing=\"$4\">\n    <Alert status=\"success\" {...args} />\n    <Alert status=\"info\" {...args} />\n    <Alert status=\"warning\" {...args} />\n    <Alert status=\"danger\" {...args} />\n  </VStack>\n);\n\nexport const WithTitleAndDescription = (args: any) => (\n  <VStack alignItems=\"flex-start\" spacing=\"$4\">\n    <Alert status=\"success\" variant={args.variant}>\n      <AlertTitle mr=\"$2\">Success</AlertTitle>\n      <AlertDescription>{args.children}</AlertDescription>\n    </Alert>\n    <Alert status=\"info\" variant={args.variant}>\n      <AlertTitle mr=\"$2\">Info</AlertTitle>\n      <AlertDescription>{args.children}</AlertDescription>\n    </Alert>\n    <Alert status=\"warning\" variant={args.variant}>\n      <AlertTitle mr=\"$2\">Warning</AlertTitle>\n      <AlertDescription>{args.children}</AlertDescription>\n    </Alert>\n    <Alert status=\"danger\" variant={args.variant}>\n      <AlertTitle mr=\"$2\">Danger</AlertTitle>\n      <AlertDescription>{args.children}</AlertDescription>\n    </Alert>\n  </VStack>\n);\nWithTitleAndDescription.storyName = \"With title and description\";\n\nexport const WithIcon = (args: any) => (\n  <VStack spacing=\"$4\">\n    <Alert status=\"success\" variant={args.variant}>\n      <AlertIcon />\n      {args.children}\n    </Alert>\n    <Alert status=\"info\" variant={args.variant}>\n      <AlertIcon />\n      {args.children}\n    </Alert>\n    <Alert status=\"warning\" variant={args.variant}>\n      <AlertIcon />\n      {args.children}\n    </Alert>\n    <Alert status=\"danger\" variant={args.variant}>\n      <AlertIcon />\n      {args.children}\n    </Alert>\n  </VStack>\n);\nWithIcon.storyName = \"With icon\";\n\nexport const Custom = (args: any) => (\n  <Alert\n    status=\"success\"\n    variant={args.variant}\n    flexDirection=\"column\"\n    alignItems=\"center\"\n    justifyContent=\"center\"\n    textAlign=\"center\"\n    height=\"200px\"\n  >\n    <AlertIcon boxSize=\"40px\" mr={0} />\n    <AlertTitle mt=\"$4\" mb=\"$1\" fontSize=\"$lg\">\n      Application submitted!\n    </AlertTitle>\n    <AlertDescription maxWidth=\"$sm\">\n      Thanks for submitting your application. Our team will get back to you soon.\n    </AlertDescription>\n  </Alert>\n);\n"
  },
  {
    "path": "packages/solid/src/components/alert/alert.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css } from \"../../styled-system/stitches.config\";\n\n/* -------------------------------------------------------------------------------------------------\n * AlertIcon\n * -----------------------------------------------------------------------------------------------*/\n\nexport const alertIconStyles = css({\n  flexShrink: 0,\n});\n\n/* -------------------------------------------------------------------------------------------------\n * AlertTitle\n * -----------------------------------------------------------------------------------------------*/\n\nexport const alertTitleStyles = css({\n  fontWeight: \"$semibold\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * AlertDescription\n * -----------------------------------------------------------------------------------------------*/\n\nexport const alertDescriptionStyles = css({\n  display: \"inline-block\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Alert\n * -----------------------------------------------------------------------------------------------*/\n\nexport const alertStyles = css({\n  position: \"relative\",\n\n  display: \"flex\",\n  alignItems: \"center\",\n\n  borderRadius: \"$sm\",\n\n  px: \"$4\",\n  py: \"$3\",\n\n  fontSize: \"$base\",\n  lineHeight: \"$6\",\n\n  variants: {\n    variant: {\n      solid: {},\n      subtle: {},\n      \"left-accent\": {\n        borderLeftStyle: \"solid\",\n        borderLeftWidth: \"$sizes$1\",\n      },\n      \"top-accent\": {\n        borderTopStyle: \"solid\",\n        borderTopWidth: \"$sizes$1\",\n      },\n    },\n    status: {\n      success: {},\n      info: {},\n      warning: {},\n      danger: {},\n    },\n  },\n  compoundVariants: [\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - solid\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"solid\",\n      status: \"success\",\n      css: {\n        backgroundColor: \"$success9\",\n        color: \"white\",\n      },\n    },\n    {\n      variant: \"solid\",\n      status: \"info\",\n      css: {\n        backgroundColor: \"$info9\",\n        color: \"white\",\n      },\n    },\n    {\n      variant: \"solid\",\n      status: \"warning\",\n      css: {\n        backgroundColor: \"$warning9\",\n        color: \"$blackAlpha12\",\n      },\n    },\n    {\n      variant: \"solid\",\n      status: \"danger\",\n      css: {\n        backgroundColor: \"$danger9\",\n        color: \"white\",\n      },\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - subtle\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"subtle\",\n      status: \"success\",\n      css: {\n        backgroundColor: \"$success3\",\n        color: \"$success11\",\n\n        [`& .${alertIconStyles}`]: {\n          color: \"$success9\",\n        },\n      },\n    },\n    {\n      variant: \"subtle\",\n      status: \"info\",\n      css: {\n        backgroundColor: \"$info3\",\n        color: \"$info11\",\n\n        [`& .${alertIconStyles}`]: {\n          color: \"$info9\",\n        },\n      },\n    },\n    {\n      variant: \"subtle\",\n      status: \"warning\",\n      css: {\n        backgroundColor: \"$warning3\",\n        color: \"$warning11\",\n\n        [`& .${alertIconStyles}`]: {\n          color: \"$warning9\",\n        },\n      },\n    },\n    {\n      variant: \"subtle\",\n      status: \"danger\",\n      css: {\n        backgroundColor: \"$danger3\",\n        color: \"$danger11\",\n\n        [`& .${alertIconStyles}`]: {\n          color: \"$danger9\",\n        },\n      },\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - \"left-accent\"\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"left-accent\",\n      status: \"success\",\n      css: {\n        borderLeftColor: \"$success9\",\n        backgroundColor: \"$success3\",\n        color: \"$success11\",\n\n        [`& .${alertIconStyles}`]: {\n          color: \"$success9\",\n        },\n      },\n    },\n    {\n      variant: \"left-accent\",\n      status: \"info\",\n      css: {\n        borderLeftColor: \"$info9\",\n        backgroundColor: \"$info3\",\n        color: \"$info11\",\n\n        [`& .${alertIconStyles}`]: {\n          color: \"$info9\",\n        },\n      },\n    },\n    {\n      variant: \"left-accent\",\n      status: \"warning\",\n      css: {\n        borderLeftColor: \"$warning9\",\n        backgroundColor: \"$warning3\",\n        color: \"$warning11\",\n\n        [`& .${alertIconStyles}`]: {\n          color: \"$warning9\",\n        },\n      },\n    },\n    {\n      variant: \"left-accent\",\n      status: \"danger\",\n      css: {\n        borderLeftColor: \"$danger9\",\n        backgroundColor: \"$danger3\",\n        color: \"$danger11\",\n\n        [`& .${alertIconStyles}`]: {\n          color: \"$danger9\",\n        },\n      },\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - \"top-accent\"\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"top-accent\",\n      status: \"success\",\n      css: {\n        borderTopColor: \"$success9\",\n        backgroundColor: \"$success3\",\n        color: \"$success11\",\n\n        [`& .${alertIconStyles}`]: {\n          color: \"$success9\",\n        },\n      },\n    },\n    {\n      variant: \"top-accent\",\n      status: \"info\",\n      css: {\n        borderTopColor: \"$info9\",\n        backgroundColor: \"$info3\",\n        color: \"$info11\",\n\n        [`& .${alertIconStyles}`]: {\n          color: \"$info9\",\n        },\n      },\n    },\n    {\n      variant: \"top-accent\",\n      status: \"warning\",\n      css: {\n        borderTopColor: \"$warning9\",\n        backgroundColor: \"$warning3\",\n        color: \"$warning11\",\n\n        [`& .${alertIconStyles}`]: {\n          color: \"$warning9\",\n        },\n      },\n    },\n    {\n      variant: \"top-accent\",\n      status: \"danger\",\n      css: {\n        borderTopColor: \"$danger9\",\n        backgroundColor: \"$danger3\",\n        color: \"$danger11\",\n\n        [`& .${alertIconStyles}`]: {\n          color: \"$danger9\",\n        },\n      },\n    },\n  ],\n});\n\nexport type AlertVariants = VariantProps<typeof alertStyles>;\n"
  },
  {
    "path": "packages/solid/src/components/alert/alert.tsx",
    "content": "import { Accessor, createContext, mergeProps, splitProps, useContext } from \"solid-js\";\n\nimport { SystemStyleObject } from \"../../styled-system/types\";\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { alertStyles, AlertVariants } from \"./alert.styles\";\n\ntype ThemeableAlertOptions = AlertVariants;\n\nexport type AlertProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, AlertVariants>;\n\nconst hopeAlertClass = \"hope-alert\";\n\n/**\n * Alert is used to communicate the state or status of a page,\n * feature or action\n */\nexport function Alert<C extends ElementType = \"div\">(props: AlertProps<C>) {\n  const theme = useStyleConfig().Alert;\n\n  const defaultProps: AlertProps<\"div\"> = {\n    variant: theme?.defaultProps?.root?.variant ?? \"subtle\",\n    status: theme?.defaultProps?.root?.status ?? \"info\",\n  };\n\n  const propsWithDefault: AlertProps<\"div\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault, [\"class\", \"variant\", \"status\"]);\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeAlertClass,\n      alertStyles({\n        variant: local.variant,\n        status: local.status,\n      })\n    );\n  };\n\n  const statusAccessor = () => local.status;\n\n  const context: AlertContextValue = {\n    status: statusAccessor,\n  };\n\n  return (\n    <AlertContext.Provider value={context}>\n      <Box role=\"alert\" class={classes()} __baseStyle={theme?.baseStyle?.root} {...others} />\n    </AlertContext.Provider>\n  );\n}\n\nAlert.toString = () => createClassSelector(hopeAlertClass);\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ntype AlertContextValue = {\n  status: Accessor<AlertVariants[\"status\"]>;\n};\n\nconst AlertContext = createContext<AlertContextValue>();\n\nexport function useAlertContext() {\n  const context = useContext(AlertContext);\n\n  if (!context) {\n    throw new Error(\"[Hope UI]: useAlertContext must be used within an `<Alert />` component\");\n  }\n\n  return context;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * StyleConfig\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface AlertStyleConfig {\n  baseStyle?: {\n    root?: SystemStyleObject;\n    icon?: SystemStyleObject;\n    title?: SystemStyleObject;\n    description?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: ThemeableAlertOptions;\n  };\n}\n"
  },
  {
    "path": "packages/solid/src/components/alert/index.ts",
    "content": "export * from \"./alert\";\nexport * from \"./alert.styles\";\nexport * from \"./alert-description\";\nexport * from \"./alert-icon\";\nexport * from \"./alert-title\";\n"
  },
  {
    "path": "packages/solid/src/components/anchor/anchor.stories.tsx",
    "content": "import { Flex, Text } from \"..\";\nimport { HopeWrapper } from \"../storybook-utils\";\nimport { Anchor } from \"./anchor\";\n\nexport default {\n  title: \"Navigation/Anchor\",\n  component: Anchor,\n  parameters: { layout: \"centered\" },\n  decorators: [\n    (Story: any) => (\n      <HopeWrapper>\n        <Story />\n      </HopeWrapper>\n    ),\n  ],\n};\n\nexport const Default = () => (\n  <Flex direction=\"column\" rowGap=\"$4\">\n    <Anchor>Hope UI</Anchor>\n    <Anchor href=\"https://hope-ui-solid.vercel.app\" external>\n      Hope Design system\n    </Anchor>\n    <Text>\n      Did you know that{\" \"}\n      <Anchor color=\"$primary9\" href=\"#\">\n        links can live inline with text\n      </Anchor>\n    </Text>\n  </Flex>\n);\nDefault.storyName = \"Anchor\";\n"
  },
  {
    "path": "packages/solid/src/components/anchor/anchor.styles.ts",
    "content": "import { css } from \"../../styled-system/stitches.config\";\n\nexport const anchorStyles = css({\n  position: \"relative\",\n  outline: \"none\",\n  backgroundColor: \"transparent\",\n  textDecoration: \"none\",\n  cursor: \"pointer\",\n  transition: \"text-decoration 250ms\",\n\n  \"&:hover\": {\n    textDecoration: \"underline\",\n  },\n\n  \"&:focus\": {\n    boxShadow: \"$outline\",\n  },\n});\n"
  },
  {
    "path": "packages/solid/src/components/anchor/anchor.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../test-utils\";\nimport { Anchor } from \"./anchor\";\nimport { anchorStyles } from \"./anchor.styles\";\n\ndescribe(\"Anchor\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Anchor data-testid=\"anchor\">Anchor</Anchor>);\n    const anchor = screen.getByTestId(\"anchor\");\n\n    // assert\n    expect(anchor).toBeInTheDocument();\n  });\n\n  it(\"should render <a> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <Anchor data-testid=\"anchor\">Anchor</Anchor>);\n    const anchor = screen.getByTestId(\"anchor\");\n\n    // assert\n    expect(anchor).toBeInstanceOf(HTMLAnchorElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <Anchor data-testid=\"anchor\" as=\"span\">\n        Anchor\n      </Anchor>\n    ));\n    const anchor = screen.getByTestId(\"anchor\");\n\n    // assert\n    expect(anchor).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"Anchor\";\n\n    // act\n    renderWithHopeProvider(() => <Anchor data-testid=\"anchor\">{children}</Anchor>);\n    const anchor = screen.getByTestId(\"anchor\");\n\n    // assert\n    expect(anchor).toHaveTextContent(children);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <Anchor data-testid=\"anchor\">Anchor</Anchor>);\n    const anchor = screen.getByTestId(\"anchor\");\n\n    // assert\n    expect(anchor).toHaveClass(\"hope-anchor\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(Anchor.toString()).toBe(\".hope-anchor\");\n  });\n\n  it(\"should have target '_blank' when external\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <Anchor data-testid=\"anchor\" external>\n        Anchor\n      </Anchor>\n    ));\n    const anchor = screen.getByTestId(\"anchor\");\n\n    // assert\n    expect(anchor).toHaveAttribute(\"target\", \"_blank\");\n  });\n\n  it(\"should have rel 'noopener noreferrer' when external\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <Anchor data-testid=\"anchor\" external>\n        Anchor\n      </Anchor>\n    ));\n    const anchor = screen.getByTestId(\"anchor\");\n\n    // assert\n    expect(anchor).toHaveAttribute(\"rel\", \"noopener noreferrer\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Anchor data-testid=\"anchor\" class={stubClass}>\n        Anchor\n      </Anchor>\n    ));\n    const anchor = screen.getByTestId(\"anchor\");\n\n    // assert\n    expect(anchor).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <Anchor data-testid=\"anchor\" className={stubClass}>\n        Anchor\n      </Anchor>\n    ));\n    const anchor = screen.getByTestId(\"anchor\");\n\n    // assert\n    expect(anchor).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Anchor data-testid=\"anchor\" classList={{ [stubClass]: true }}>\n        Anchor\n      </Anchor>\n    ));\n    const anchor = screen.getByTestId(\"anchor\");\n\n    // assert\n    expect(anchor).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from anchorStyles\", () => {\n    // arrange\n    const anchorClass = anchorStyles();\n\n    // act\n    renderWithHopeProvider(() => <Anchor data-testid=\"anchor\">Anchor</Anchor>);\n    const anchor = screen.getByTestId(\"anchor\");\n\n    // assert\n    expect(anchor).toHaveClass(anchorClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/anchor/anchor.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps, SinglePartComponentStyleConfig } from \"../types\";\nimport { anchorStyles } from \"./anchor.styles\";\n\nexport type AnchorStyleConfig = SinglePartComponentStyleConfig<void>;\n\ninterface AnchorOptions {\n  external?: boolean;\n}\n\nexport type AnchorProps<C extends ElementType = \"a\"> = HTMLHopeProps<C, AnchorOptions>;\n\nconst hopeAnchorClass = \"hope-anchor\";\n\n/**\n * Anchors are accessible elements used primarily for navigation.\n * This component is styled to resemble a hyperlink and semantically renders an <a>.\n */\nexport function Anchor<C extends ElementType = \"a\">(props: AnchorProps<C>) {\n  const theme = useStyleConfig().Anchor;\n\n  const [local, others] = splitProps(props, [\"class\", \"external\"]);\n\n  const classes = () => classNames(local.class, hopeAnchorClass, anchorStyles());\n\n  return (\n    <hope.a\n      class={classes()}\n      __baseStyle={theme?.baseStyle}\n      target={local.external ? \"_blank\" : undefined}\n      rel={local.external ? \"noopener noreferrer\" : undefined}\n      {...others}\n    />\n  );\n}\n\nAnchor.toString = () => createClassSelector(hopeAnchorClass);\n"
  },
  {
    "path": "packages/solid/src/components/anchor/index.ts",
    "content": "export * from \"./anchor\";\nexport * from \"./anchor.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/aspect-ratio/aspect-ratio.styles.ts",
    "content": "import { css } from \"../../styled-system/stitches.config\";\n\nexport const aspectRatioStyles = css({\n  position: \"relative\",\n\n  \"&::before\": {\n    height: 0,\n    content: \"''\",\n    display: \"block\",\n  },\n\n  \"& > *:not(style)\": {\n    overflow: \"hidden\",\n    position: \"absolute\",\n    top: \"0\",\n    right: \"0\",\n    bottom: \"0\",\n    left: \"0\",\n    display: \"flex\",\n    alignItems: \"center\",\n    justifyContent: \"center\",\n    width: \"100%\",\n    height: \"100%\",\n  },\n\n  \"& > img, & > video\": {\n    objectFit: \"cover\",\n  },\n});\n"
  },
  {
    "path": "packages/solid/src/components/aspect-ratio/aspect-ratio.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../test-utils\";\nimport { AspectRatio } from \"./aspect-ratio\";\nimport { aspectRatioStyles } from \"./aspect-ratio.styles\";\n\ndescribe(\"AspectRatio\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <AspectRatio data-testid=\"aspect-ratio\">AspectRatio</AspectRatio>);\n    const aspectRatio = screen.getByTestId(\"aspect-ratio\");\n\n    // assert\n    expect(aspectRatio).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <AspectRatio data-testid=\"aspect-ratio\">AspectRatio</AspectRatio>);\n    const aspectRatio = screen.getByTestId(\"aspect-ratio\");\n\n    // assert\n    expect(aspectRatio).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <AspectRatio data-testid=\"aspect-ratio\" as=\"span\">\n        AspectRatio\n      </AspectRatio>\n    ));\n    const aspectRatio = screen.getByTestId(\"aspect-ratio\");\n\n    // assert\n    expect(aspectRatio).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"AspectRatio\";\n\n    // act\n    renderWithHopeProvider(() => <AspectRatio data-testid=\"aspect-ratio\">{children}</AspectRatio>);\n    const aspectRatio = screen.getByTestId(\"aspect-ratio\");\n\n    // assert\n    expect(aspectRatio).toHaveTextContent(children);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <AspectRatio data-testid=\"aspect-ratio\">AspectRatio</AspectRatio>);\n    const aspectRatio = screen.getByTestId(\"aspect-ratio\");\n\n    // assert\n    expect(aspectRatio).toHaveClass(\"hope-aspect-ratio\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(AspectRatio.toString()).toBe(\".hope-aspect-ratio\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <AspectRatio data-testid=\"aspect-ratio\" class={stubClass}>\n        AspectRatio\n      </AspectRatio>\n    ));\n    const aspectRatio = screen.getByTestId(\"aspect-ratio\");\n\n    // assert\n    expect(aspectRatio).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <AspectRatio data-testid=\"aspect-ratio\" className={stubClass}>\n        AspectRatio\n      </AspectRatio>\n    ));\n    const aspectRatio = screen.getByTestId(\"aspect-ratio\");\n\n    // assert\n    expect(aspectRatio).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <AspectRatio data-testid=\"aspect-ratio\" classList={{ [stubClass]: true }}>\n        AspectRatio\n      </AspectRatio>\n    ));\n    const aspectRatio = screen.getByTestId(\"aspect-ratio\");\n\n    // assert\n    expect(aspectRatio).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from aspectRatioStyles\", () => {\n    // arrange\n    const aspectRatioClass = aspectRatioStyles();\n\n    // act\n    renderWithHopeProvider(() => <AspectRatio data-testid=\"aspect-ratio\">AspectRatio</AspectRatio>);\n    const aspectRatio = screen.getByTestId(\"aspect-ratio\");\n\n    // assert\n    expect(aspectRatio).toHaveClass(aspectRatioClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/aspect-ratio/aspect-ratio.tsx",
    "content": "import { mergeProps, splitProps } from \"solid-js\";\n\nimport { ResponsiveValue } from \"../../styled-system/types\";\nimport { mapResponsive } from \"../../styled-system/utils\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { aspectRatioStyles } from \"./aspect-ratio.styles\";\n\ninterface AspectRatioOptions {\n  /**\n   * The aspect ratio of the Box. Common values are:\n   *\n   * `21/9`, `16/9`, `9/16`, `4/3`, `1.85/1`\n   */\n  ratio?: ResponsiveValue<number>;\n}\n\nexport type AspectRatioProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, AspectRatioOptions>;\n\nconst hopeAspectRatioClass = \"hope-aspect-ratio\";\n\n/**\n * Component used to cropping media (videos, images and maps)\n * to a desired aspect ratio.\n */\nexport function AspectRatio<C extends ElementType = \"div\">(props: AspectRatioProps<C>) {\n  const defaultProps: AspectRatioProps<\"div\"> = {\n    ratio: 4 / 3,\n  };\n\n  const propsWithDefault: AspectRatioProps<\"div\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault, [\"class\", \"ratio\"]);\n\n  const classes = () => classNames(local.class, hopeAspectRatioClass, aspectRatioStyles());\n\n  const paddingBottom = () => mapResponsive(local.ratio, r => `${(1 / r) * 100}%`);\n\n  return <Box class={classes()} _before={{ paddingBottom: paddingBottom() }} {...others} />;\n}\n\nAspectRatio.toString = () => createClassSelector(hopeAspectRatioClass);\n"
  },
  {
    "path": "packages/solid/src/components/aspect-ratio/index.ts",
    "content": "export * from \"./aspect-ratio\";\nexport * from \"./aspect-ratio.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/async-button/async-button.stories.tsx",
    "content": "import { action } from \"@storybook/addon-actions\";\n\nimport { HopeWrapper } from \"../storybook-utils\";\nimport { AsyncButton } from \"./async-button\";\n\nexport default {\n  title: \"General/AsyncButton\",\n  component: AsyncButton,\n  parameters: { layout: \"centered\" },\n  decorators: [\n    (Story: any) => (\n      <HopeWrapper>\n        <div style={{ display: \"flex\", \"justify-content\": \"center\", width: \"90vw\" }}>\n          <Story />\n        </div>\n      </HopeWrapper>\n    ),\n  ],\n  argTypes: {\n    variant: {\n      control: { type: \"select\" },\n      options: [\"solid\", \"subtle\", \"outline\", \"dashed\", \"ghost\"],\n    },\n    colorScheme: {\n      control: { type: \"select\" },\n      options: [\"primary\", \"neutral\", \"success\", \"info\", \"warning\", \"danger\"],\n    },\n    size: {\n      control: { type: \"select\" },\n      options: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\"],\n    },\n    loaderPlacement: {\n      control: { type: \"inline-radio\" },\n      options: [\"start\", \"end\"],\n    },\n    compact: {\n      control: { type: \"boolean\" },\n    },\n    fullWidth: {\n      control: { type: \"boolean\" },\n    },\n    disabled: {\n      control: { type: \"boolean\" },\n    },\n    loadingText: {\n      control: \"text\",\n    },\n    children: {\n      control: \"text\",\n    },\n  },\n  args: {\n    variant: \"solid\",\n    colorScheme: \"primary\",\n    size: \"md\",\n    loaderPlacement: \"start\",\n    compact: false,\n    fullWidth: false,\n    disabled: false,\n    loadingText: \"\",\n    children: \"Async button\",\n    onClick: async () => {\n      action(\"clicked\");\n      await new Promise(resolve => setTimeout(resolve, 10000));\n    },\n  },\n};\n\nexport const Default = (args: any) => <AsyncButton {...args} />;\nDefault.storyName = \"AsyncButton\";\n"
  },
  {
    "path": "packages/solid/src/components/async-button/async-button.test.tsx",
    "content": "import { cleanup, fireEvent, screen } from \"solid-testing-library\";\n\nimport { buttonStyles } from \"../button/button.styles\";\nimport { renderWithHopeProvider } from \"../test-utils\";\nimport { AsyncButton } from \"./async-button\";\n\ndescribe(\"AsyncButton\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <AsyncButton />);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toBeInTheDocument();\n  });\n\n  it(\"should change state to loading and back when clicked\", async () => {\n    // setup\n    const buttonLoadingClass = buttonStyles({ loading: true });\n    const handleClick = jest.fn(async () => undefined);\n\n    // render still button\n    renderWithHopeProvider(() => <AsyncButton onClick={handleClick} />);\n    const button = screen.getByRole(\"button\");\n    expect(button.className.split(\" \")).not.toEqual(\n      expect.arrayContaining(buttonLoadingClass.className.split(\" \"))\n    );\n\n    // make it loading\n    fireEvent.click(button);\n    expect(button.className.split(\" \")).toEqual(\n      expect.arrayContaining(buttonLoadingClass.className.split(\" \"))\n    );\n    expect(handleClick).toBeCalled();\n\n    // next tick resolve back to still button\n    await new Promise(resolve => setTimeout(resolve, 0));\n    expect(button.className.split(\" \")).not.toEqual(\n      expect.arrayContaining(buttonLoadingClass.className.split(\" \"))\n    );\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/async-button/async-button.tsx",
    "content": "import { createSignal, splitProps } from \"solid-js\";\n\nimport { createClassSelector } from \"../../utils/css\";\nimport { Button, ButtonOptions, hopeButtonClass } from \"../button/button\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\n\nexport interface AsyncButtonOptions extends ButtonOptions {\n  onClick?: (event: MouseEvent) => Promise<void>;\n}\n\nexport type AsyncButtonProps<C extends ElementType = \"button\"> = HTMLHopeProps<\n  C,\n  AsyncButtonOptions\n>;\n\n/**\n * AsyncButton renders regular Button component and manages loading state automatically.\n * Hence requires onClick handler to return a Promise.\n */\nexport function AsyncButton<C extends ElementType = \"button\">(props: AsyncButtonProps<C>) {\n  const [local, others] = splitProps(props, [\"onClick\"]);\n  const [loading, setLoading] = createSignal(false);\n\n  const onClickInterceptor = (e: MouseEvent) => {\n    if (local.onClick) {\n      setLoading(true);\n      local.onClick(e).finally(() => setLoading(false));\n    }\n  };\n\n  return <Button loading={loading()} {...others} onClick={onClickInterceptor} />;\n}\n\nAsyncButton.toString = () => createClassSelector(hopeButtonClass);\n"
  },
  {
    "path": "packages/solid/src/components/async-button/index.ts",
    "content": "export * from \"./async-button\";\n"
  },
  {
    "path": "packages/solid/src/components/avatar/avatar-badge.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { avatarBadgeStyles, AvatarBadgeVariants } from \"./avatar.styles\";\n\ntype AvatarBadgeOptions = AvatarBadgeVariants;\n\nexport type AvatarBadgeProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, AvatarBadgeOptions>;\n\nconst hopeAvatarBadgeClass = \"hope-avatar__badge\";\n\n/**\n * AvatarBadge used to show extra badge to the top-right\n * or bottom-right corner of an avatar.\n */\nexport function AvatarBadge<C extends ElementType = \"div\">(props: AvatarBadgeProps<C>) {\n  const theme = useStyleConfig().Avatar;\n\n  const [local, others] = splitProps(props, [\"class\", \"placement\"]);\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeAvatarBadgeClass,\n      avatarBadgeStyles({\n        placement: local.placement ?? \"bottom-end\",\n      })\n    );\n  };\n\n  return <Box class={classes()} __baseStyle={theme?.baseStyle?.badge} {...others} />;\n}\n\nAvatarBadge.toString = () => createClassSelector(hopeAvatarBadgeClass);\n"
  },
  {
    "path": "packages/solid/src/components/avatar/avatar-excess.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { avatarExcessStyles, AvatarExcessVariants } from \"./avatar.styles\";\nimport { useAvatarGroupContext } from \"./avatar-group\";\n\nexport type AvatarExcessProps<C extends ElementType = \"span\"> = HTMLHopeProps<\n  C,\n  AvatarExcessVariants\n>;\n\nconst hopeAvatarExcessClass = \"hope-avatar__excess\";\n\n/**\n * Component to show the remaining number of avatars in a group.\n */\nexport function AvatarExcess<C extends ElementType = \"span\">(props: AvatarExcessProps<C>) {\n  const theme = useStyleConfig().Avatar;\n\n  const avatarGroupContext = useAvatarGroupContext();\n\n  const [local, others] = splitProps(props, [\"class\", \"size\", \"withBorder\"]);\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeAvatarExcessClass,\n      avatarExcessStyles({\n        size:\n          local.size ?? avatarGroupContext?.state.size ?? theme?.defaultProps?.root?.size ?? \"md\",\n        withBorder:\n          local.withBorder ??\n          !!avatarGroupContext ??\n          theme?.defaultProps?.root?.withBorder ??\n          false,\n      })\n    );\n  };\n\n  return (\n    <hope.span\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.excess}\n      borderRadius={avatarGroupContext?.state.avatarBorderRadius}\n      borderColor={avatarGroupContext?.state.avatarBorderColor}\n      borderWidth={avatarGroupContext?.state.avatarBorderWidth}\n      marginStart={avatarGroupContext?.state.spacing}\n      {...others}\n    />\n  );\n}\n\nAvatarExcess.toString = () => createClassSelector(hopeAvatarExcessClass);\n"
  },
  {
    "path": "packages/solid/src/components/avatar/avatar-group.tsx",
    "content": "import { createContext, splitProps, useContext } from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { BorderProps } from \"../../styled-system/props/border\";\nimport { MarginProps } from \"../../styled-system/props/margin\";\nimport { RadiiProps } from \"../../styled-system/props/radii\";\nimport { ResponsiveValue } from \"../../styled-system/types\";\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { avatarGroupStyles, AvatarVariants } from \"./avatar.styles\";\n\nexport interface ThemeableAvatarGroupOptions {\n  /**\n   * The size of the avatars.\n   */\n  size?: AvatarVariants[\"size\"];\n\n  /**\n   * The space between the avatars in the group.\n   */\n  spacing?: ResponsiveValue<MarginProps[\"margin\"]>;\n\n  /**\n   * The `border-radius` of the avatars\n   */\n  avatarBorderRadius?: ResponsiveValue<RadiiProps[\"borderRadius\"]>;\n\n  /**\n   * The `border-color` of the avatars\n   */\n  avatarBorderColor?: ResponsiveValue<BorderProps[\"borderColor\"]>;\n\n  /**\n   * The `border-width` of the avatars\n   */\n  avatarBorderWidth?: ResponsiveValue<BorderProps[\"borderWidth\"]>;\n}\n\ntype AvatarGroupOptions = ThemeableAvatarGroupOptions;\n\nexport type AvatarGroupProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, AvatarGroupOptions>;\n\ntype AvatarGroupState = Required<Pick<AvatarGroupOptions, \"spacing\" | \"size\">> &\n  Pick<AvatarGroupOptions, \"avatarBorderRadius\" | \"avatarBorderColor\" | \"avatarBorderWidth\">;\n\ninterface AvatarGroupContextValue {\n  state: AvatarGroupState;\n}\n\nconst AvatarGroupContext = createContext<AvatarGroupContextValue>();\n\nconst hopeAvatarGroupClass = \"hope-avatar__group\";\n\n/**\n * AvatarGroup displays a number of avatars grouped together in a stack.\n */\nexport function AvatarGroup<C extends ElementType = \"div\">(props: AvatarGroupProps<C>) {\n  const theme = useStyleConfig().Avatar;\n\n  const [state] = createStore<AvatarGroupState>({\n    get size() {\n      return props.size ?? theme?.defaultProps?.group?.size ?? \"md\";\n    },\n    get spacing() {\n      return props.spacing ?? theme?.defaultProps?.group?.spacing ?? \"-1em\";\n    },\n    get avatarBorderRadius() {\n      return props.avatarBorderRadius ?? theme?.defaultProps?.group?.avatarBorderRadius;\n    },\n    get avatarBorderColor() {\n      return props.avatarBorderColor ?? theme?.defaultProps?.group?.avatarBorderColor;\n    },\n    get avatarBorderWidth() {\n      return props.avatarBorderWidth ?? theme?.defaultProps?.group?.avatarBorderWidth;\n    },\n  });\n\n  const [local, others] = splitProps(props, [\n    \"class\",\n    \"size\",\n    \"spacing\",\n    \"avatarBorderRadius\",\n    \"avatarBorderColor\",\n    \"avatarBorderWidth\",\n  ]);\n\n  const classes = () => classNames(local.class, hopeAvatarGroupClass, avatarGroupStyles());\n\n  const context: AvatarGroupContextValue = {\n    state: state as AvatarGroupState,\n  };\n\n  return (\n    <AvatarGroupContext.Provider value={context}>\n      <Box role=\"group\" class={classes()} __baseStyle={theme?.baseStyle?.group} {...others} />\n    </AvatarGroupContext.Provider>\n  );\n}\n\nAvatarGroup.toString = () => createClassSelector(hopeAvatarGroupClass);\n\nexport function useAvatarGroupContext() {\n  return useContext(AvatarGroupContext);\n}\n"
  },
  {
    "path": "packages/solid/src/components/avatar/avatar-image.tsx",
    "content": "import { Accessor, createMemo, Show, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ImageProps } from \"../image\";\nimport { createImageLoadingStatus } from \"../image/image.utils\";\nimport { AvatarIconProps, AvatarProps } from \"./avatar\";\nimport { avatarImageStyles } from \"./avatar.styles\";\nimport { AvatarInitials } from \"./avatar-initials\";\n\nexport type AvatarImageProps = ImageProps &\n  Pick<AvatarProps, \"getInitials\" | \"name\" | \"icon\" | \"iconLabel\" | \"borderRadius\">;\n\nconst hopeAvatarImageClass = \"hope-avatar__image\";\n\nexport function AvatarImage(props: AvatarImageProps) {\n  const theme = useStyleConfig().Avatar;\n\n  const [local, others] = splitProps(props, [\n    \"class\",\n    \"src\",\n    \"srcSet\",\n    \"getInitials\",\n    \"name\",\n    \"loading\",\n    \"iconLabel\",\n    \"icon\",\n    \"ignoreFallback\",\n    \"onError\",\n  ]);\n\n  const status = createMemo(() => {\n    return createImageLoadingStatus({\n      src: local.src,\n      onError: local.onError,\n      ignoreFallback: local.ignoreFallback,\n    });\n  });\n\n  const classes = () => classNames(local.class, hopeAvatarImageClass, avatarImageStyles());\n\n  const hasLoaded = () => !!local.src && status()() === \"loaded\";\n\n  const iconProps: Accessor<AvatarIconProps> = () => ({\n    role: \"img\",\n    \"aria-label\": local.iconLabel ?? \"avatar\",\n  });\n\n  return (\n    <Show\n      when={hasLoaded()}\n      fallback={\n        <Show when={local.name} fallback={local.icon?.(iconProps())}>\n          <AvatarInitials getInitials={local.getInitials} name={local.name} />\n        </Show>\n      }\n    >\n      <hope.img\n        class={classes()}\n        src={local.src}\n        srcSet={local.srcSet}\n        alt={local.name}\n        loading={local.loading}\n        __baseStyle={theme?.baseStyle?.image}\n        {...others}\n      />\n    </Show>\n  );\n}\n\nAvatarImage.toString = () => createClassSelector(hopeAvatarImageClass);\n"
  },
  {
    "path": "packages/solid/src/components/avatar/avatar-initials.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { HTMLHopeProps } from \"../types\";\nimport { AvatarOptions } from \"./avatar\";\n\ntype AvatarInitialsProps = HTMLHopeProps<\"div\", Pick<AvatarOptions, \"getInitials\" | \"name\">>;\n\nconst hopeAvatarInitialsClass = \"hope-avatar__initials\";\n\n/**\n * The avatar initials container.\n */\nexport function AvatarInitials(props: AvatarInitialsProps) {\n  const theme = useStyleConfig().Avatar;\n\n  const [local, others] = splitProps(props, [\"class\", \"getInitials\", \"name\"]);\n\n  const classes = () => classNames(local.class, hopeAvatarInitialsClass);\n\n  const diplayInitials = () => local.name && local.getInitials?.(local.name);\n\n  return (\n    <Box\n      role=\"img\"\n      aria-label={local.name}\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.initials}\n      {...others}\n    >\n      {diplayInitials()}\n    </Box>\n  );\n}\n\nAvatarInitials.toString = () => createClassSelector(hopeAvatarInitialsClass);\n"
  },
  {
    "path": "packages/solid/src/components/avatar/avatar.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css } from \"../../styled-system/stitches.config\";\nimport { SystemStyleObject } from \"../../styled-system/types\";\n\n/* -------------------------------------------------------------------------------------------------\n * Avatar\n * -----------------------------------------------------------------------------------------------*/\n\nfunction createSizeVariant(size: string): SystemStyleObject {\n  return {\n    boxSize: size,\n    fontSize: `calc(${size} / 2.5)`,\n    lineHeight: size,\n  };\n}\n\nexport const avatarStyles = css({\n  position: \"relative\",\n\n  display: \"inline-flex\",\n  alignItems: \"center\",\n  justifyContent: \"center\",\n  flexShrink: 0,\n\n  borderRadius: \"$full\",\n  borderColor: \"$loContrast\",\n\n  backgroundColor: \"$neutral8\",\n\n  color: \"$neutral12\",\n  fontWeight: \"$medium\",\n  textAlign: \"center\",\n  textTransform: \"uppercase\",\n\n  verticalAlign: \"top\",\n\n  variants: {\n    size: {\n      \"2xs\": createSizeVariant(\"$sizes$4\"),\n      xs: createSizeVariant(\"$sizes$6\"),\n      sm: createSizeVariant(\"$sizes$8\"),\n      md: createSizeVariant(\"$sizes$12\"),\n      lg: createSizeVariant(\"$sizes$16\"),\n      xl: createSizeVariant(\"$sizes$24\"),\n      \"2xl\": createSizeVariant(\"$sizes$32\"),\n      full: {\n        boxSize: \"$full\",\n        fontSize: \"calc($sizes$full / 2.5)\",\n      },\n    },\n    withBorder: {\n      true: {},\n    },\n  },\n\n  compoundVariants: [\n    /* -------------------------------------------------------------------------------------------------\n     * Varaint - border + size\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      withBorder: true,\n      size: \"2xs\",\n      css: { borderWidth: \"1px\" },\n    },\n    {\n      withBorder: true,\n      size: \"xs\",\n      css: { borderWidth: \"1px\" },\n    },\n    {\n      withBorder: true,\n      size: \"sm\",\n      css: { borderWidth: \"2px\" },\n    },\n    {\n      withBorder: true,\n      size: \"md\",\n      css: { borderWidth: \"2px\" },\n    },\n    {\n      withBorder: true,\n      size: \"lg\",\n      css: { borderWidth: \"3px\" },\n    },\n    {\n      withBorder: true,\n      size: \"xl\",\n      css: { borderWidth: \"4px\" },\n    },\n    {\n      withBorder: true,\n      size: \"2xl\",\n      css: { borderWidth: \"5px\" },\n    },\n    {\n      withBorder: true,\n      size: \"full\",\n      css: { borderWidth: \"2px\" },\n    },\n  ],\n});\n\nexport type AvatarVariants = VariantProps<typeof avatarStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * Avatar - excess\n * -----------------------------------------------------------------------------------------------*/\n\nexport const avatarExcessStyles = css(avatarStyles);\n\nexport type AvatarExcessVariants = VariantProps<typeof avatarExcessStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * Avatar - image\n * -----------------------------------------------------------------------------------------------*/\n\nexport const avatarImageStyles = css({\n  boxSize: \"$full\",\n  borderRadius: \"$full\",\n  objectFit: \"cover\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Avatar - badge\n * -----------------------------------------------------------------------------------------------*/\n\nexport const avatarBadgeStyles = css({\n  position: \"absolute\",\n\n  display: \"flex\",\n  alignItems: \"center\",\n  justifyContent: \"center\",\n\n  borderRadius: \"$full\",\n\n  borderWidth: \"0.2em\",\n  borderStyle: \"solid\",\n  borderColor: \"$loContrast\",\n\n  variants: {\n    placement: {\n      \"top-start\": {\n        insetInlineStart: \"0\",\n        top: \"0\",\n        transform: \"translate(-25%, -25%)\",\n      },\n      \"top-end\": {\n        insetInlineEnd: \"0\",\n        top: \"0\",\n        transform: \"translate(25%, -25%)\",\n      },\n      \"bottom-start\": {\n        insetInlineStart: \"0\",\n        bottom: \"0\",\n        transform: \"translate(-25%, 25%)\",\n      },\n      \"bottom-end\": {\n        insetInlineEnd: \"0\",\n        bottom: \"0\",\n        transform: \"translate(25%, 25%)\",\n      },\n    },\n  },\n});\n\nexport type AvatarBadgeVariants = VariantProps<typeof avatarBadgeStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * AvatarGroup\n * -----------------------------------------------------------------------------------------------*/\n\nexport const avatarGroupStyles = css({\n  display: \"flex\",\n  alignItems: \"center\",\n  justifyContent: \"flex-start\",\n  flexDirection: \"row\",\n\n  [`& .${avatarStyles}:first-child`]: {\n    marginStart: \"0\",\n  },\n});\n"
  },
  {
    "path": "packages/solid/src/components/avatar/avatar.tsx",
    "content": "import { JSX, mergeProps, splitProps } from \"solid-js\";\n\nimport { SystemStyleObject } from \"../../styled-system\";\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ImageProps } from \"../image\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { avatarStyles, AvatarVariants } from \"./avatar.styles\";\nimport { DefaultAvatarIcon, initials } from \"./avatar.utils\";\nimport { ThemeableAvatarGroupOptions, useAvatarGroupContext } from \"./avatar-group\";\nimport { AvatarImage } from \"./avatar-image\";\n\nexport interface AvatarIconProps {\n  /**\n   * The role of the icon.\n   */\n  role: string;\n\n  /**\n   * A11y: A label that describes the icon\n   */\n  \"aria-label\": string;\n}\n\ninterface ThemeableAvatarOptions extends AvatarVariants {\n  /**\n   * Defines loading strategy.\n   */\n  loading?: ImageProps[\"loading\"];\n\n  /**\n   * If `true`, opt out of the avatar's `fallback` logic and\n   * renders the `img` at all times.\n   */\n  ignoreFallback?: boolean;\n\n  /**\n   * The default avatar used as fallback when `name`, and `src` is not specified.\n   */\n  icon?: (props: AvatarIconProps) => JSX.Element;\n\n  /**\n   * `aria-label` to use with the default avatar icon when no `name` is provided.\n   */\n  iconLabel?: string;\n\n  /**\n   * Function to get the initials to display.\n   */\n  getInitials?: (name: string) => string;\n}\n\nexport interface AvatarOptions extends ThemeableAvatarOptions {\n  /**\n   * The name of the person in the avatar.\n   * - if `src` has loaded, the name will be used as the `alt` attribute of the `img`\n   * - If `src` is not loaded, the name will be used to create the initials\n   */\n  name?: string;\n\n  /**\n   * The image url of the `Avatar`.\n   */\n  src?: string;\n\n  /**\n   * List of sources to use for different screen resolutions.\n   */\n  srcSet?: string;\n\n  /**\n   * Function called when image failed to load.\n   */\n  onError?: ImageProps[\"onError\"];\n\n  /**\n   * Additional props to be passed to the `AvatarImage`.\n   */\n  imageProps?: ImageProps;\n}\n\nexport interface AvatarStyleConfig {\n  baseStyle?: {\n    root?: SystemStyleObject;\n    group?: SystemStyleObject;\n    image?: SystemStyleObject;\n    initials?: SystemStyleObject;\n    badge?: SystemStyleObject;\n    excess?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: ThemeableAvatarOptions;\n    group?: ThemeableAvatarGroupOptions;\n  };\n}\n\nexport type AvatarProps<C extends ElementType = \"span\"> = HTMLHopeProps<C, AvatarOptions>;\n\nconst hopeAvatarClass = \"hope-avatar\";\n\n/**\n * Avatar component that renders an user avatar with\n * support for fallback avatar and name-only avatars\n */\nexport function Avatar<C extends ElementType = \"span\">(props: AvatarProps<C>) {\n  const theme = useStyleConfig().Avatar;\n\n  const avatarGroupContext = useAvatarGroupContext();\n\n  const defaultProps: AvatarProps<\"span\"> = {\n    icon: theme?.defaultProps?.root?.icon ?? (props => <DefaultAvatarIcon {...props} />),\n    iconLabel: theme?.defaultProps?.root?.iconLabel ?? \"avatar\",\n    getInitials: theme?.defaultProps?.root?.getInitials ?? initials,\n    ignoreFallback: theme?.defaultProps?.root?.ignoreFallback ?? false,\n    loading: theme?.defaultProps?.root?.loading,\n  };\n\n  const propsWithDefault: AvatarProps<\"span\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault, [\n    \"class\",\n    \"children\",\n    \"size\",\n    \"withBorder\",\n    \"src\",\n    \"srcSet\",\n    \"name\",\n    \"borderRadius\",\n    \"onError\",\n    \"getInitials\",\n    \"icon\",\n    \"iconLabel\",\n    \"loading\",\n    \"ignoreFallback\",\n    \"imageProps\",\n  ]);\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeAvatarClass,\n      avatarStyles({\n        size:\n          local.size ?? avatarGroupContext?.state.size ?? theme?.defaultProps?.root?.size ?? \"md\",\n        withBorder:\n          local.withBorder ??\n          !!avatarGroupContext ??\n          theme?.defaultProps?.root?.withBorder ??\n          false,\n      })\n    );\n  };\n\n  return (\n    <hope.span\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.root}\n      borderRadius={local.borderRadius ?? avatarGroupContext?.state.avatarBorderRadius}\n      borderColor={avatarGroupContext?.state.avatarBorderColor}\n      borderWidth={avatarGroupContext?.state.avatarBorderWidth}\n      marginStart={avatarGroupContext?.state.spacing}\n      {...others}\n    >\n      <AvatarImage\n        src={local.src}\n        srcSet={local.srcSet}\n        loading={local.loading}\n        getInitials={local.getInitials}\n        name={local.name}\n        icon={local.icon}\n        iconLabel={local.iconLabel}\n        ignoreFallback={local.ignoreFallback}\n        borderRadius={local.borderRadius ?? avatarGroupContext?.state.avatarBorderRadius}\n        // eslint-disable-next-line solid/reactivity\n        onError={local.onError}\n        {...local.imageProps}\n      />\n      {local.children}\n    </hope.span>\n  );\n}\n\nAvatar.toString = () => createClassSelector(hopeAvatarClass);\n"
  },
  {
    "path": "packages/solid/src/components/avatar/avatar.utils.tsx",
    "content": "import { hope } from \"../factory\";\nimport { IconProps } from \"../icon\";\n\nexport function initials(name: string) {\n  const [firstName, lastName] = name.split(\" \");\n  return firstName && lastName\n    ? `${firstName.charAt(0)}${lastName.charAt(0)}`\n    : firstName.charAt(0);\n}\n\n/**\n * Fallback avatar component.\n * This should be a generic svg used to represent an avatar\n */\nexport function DefaultAvatarIcon(props: IconProps) {\n  return (\n    <hope.svg\n      viewBox=\"0 0 128 128\"\n      class=\"hope-avatar__svg\"\n      color=\"$loContrast\"\n      boxSize=\"$full\"\n      {...props}\n    >\n      <path\n        fill=\"currentColor\"\n        d=\"M103,102.1388 C93.094,111.92 79.3504,118 64.1638,118 C48.8056,118 34.9294,111.768 25,101.7892 L25,95.2 C25,86.8096 31.981,80 40.6,80 L87.4,80 C96.019,80 103,86.8096 103,95.2 L103,102.1388 Z\"\n      />\n      <path\n        fill=\"currentColor\"\n        d=\"M63.9961647,24 C51.2938136,24 41,34.2938136 41,46.9961647 C41,59.7061864 51.2938136,70 63.9961647,70 C76.6985159,70 87,59.7061864 87,46.9961647 C87,34.2938136 76.6985159,24 63.9961647,24\"\n      />\n    </hope.svg>\n  );\n}\n"
  },
  {
    "path": "packages/solid/src/components/avatar/index.ts",
    "content": "export * from \"./avatar\";\nexport * from \"./avatar.styles\";\nexport * from \"./avatar-badge\";\nexport * from \"./avatar-excess\";\nexport * from \"./avatar-group\";\n"
  },
  {
    "path": "packages/solid/src/components/badge/badge.stories.tsx",
    "content": "import { HopeWrapper } from \"../storybook-utils\";\nimport { Badge } from \"./badge\";\n\nexport default {\n  title: \"Data display/Badge\",\n  component: Badge,\n  parameters: { layout: \"centered\" },\n  decorators: [\n    (Story: any) => (\n      <HopeWrapper>\n        <Story />\n      </HopeWrapper>\n    ),\n  ],\n  argTypes: {\n    variant: {\n      control: { type: \"select\" },\n      options: [\"solid\", \"subtle\", \"outline\"],\n    },\n    colorScheme: {\n      control: { type: \"select\" },\n      options: [\"primary\", \"neutral\", \"success\", \"info\", \"warning\", \"danger\"],\n    },\n    children: {\n      control: \"text\",\n    },\n  },\n  args: {\n    variant: \"subtle\",\n    colorScheme: \"primary\",\n    children: \"Badge\",\n  },\n};\n\nexport const Default = (args: any) => <Badge {...args} />;\nDefault.storyName = \"Badge\";\n"
  },
  {
    "path": "packages/solid/src/components/badge/badge.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css } from \"../../styled-system/stitches.config\";\n\n/* -------------------------------------------------------------------------------------------------\n * Badge\n * -----------------------------------------------------------------------------------------------*/\n\nexport const badgeStyles = css({\n  display: \"inline-block\",\n\n  borderRadius: \"$sm\",\n\n  py: \"$0_5\",\n  px: \"$1\",\n\n  fontSize: \"$xs\",\n  fontWeight: \"$bold\",\n  lineHeight: \"$none\",\n  letterSpacing: \"$wide\",\n  textTransform: \"uppercase\",\n  whiteSpace: \"nowrap\",\n  verticalAlign: \"middle\",\n\n  variants: {\n    variant: {\n      solid: {\n        border: \"1px solid transparent\",\n        color: \"white\",\n      },\n      subtle: {\n        border: \"1px solid transparent\",\n      },\n      outline: {\n        borderStyle: \"solid\",\n        borderWidth: \"1px\",\n        backgroundColor: \"transparent\",\n      },\n    },\n    colorScheme: {\n      primary: {},\n      accent: {},\n      neutral: {},\n      success: {},\n      info: {},\n      warning: {},\n      danger: {},\n    },\n  },\n  compoundVariants: [\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - solid + color\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"solid\",\n      colorScheme: \"primary\",\n      css: {\n        color: \"white\",\n        bgColor: \"$primary9\",\n      },\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"accent\",\n      css: {\n        color: \"white\",\n        bgColor: \"$accent9\",\n      },\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"neutral\",\n      css: {\n        color: \"white\",\n        bgColor: \"$neutral9\",\n      },\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"success\",\n      css: {\n        color: \"white\",\n        bgColor: \"$success9\",\n      },\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"info\",\n      css: {\n        color: \"white\",\n        bgColor: \"$info9\",\n      },\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"warning\",\n      css: {\n        color: \"$blackAlpha12\",\n        bgColor: \"$warning9\",\n      },\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"danger\",\n      css: {\n        color: \"white\",\n        bgColor: \"$danger9\",\n      },\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - subtle + color\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"subtle\",\n      colorScheme: \"primary\",\n      css: {\n        color: \"$primary11\",\n        bgColor: \"$primary4\",\n      },\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"accent\",\n      css: {\n        color: \"$accent11\",\n        bgColor: \"$accent4\",\n      },\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"neutral\",\n      css: {\n        color: \"$neutral12\",\n        bgColor: \"$neutral4\",\n      },\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"success\",\n      css: {\n        color: \"$success11\",\n        bgColor: \"$success4\",\n      },\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"info\",\n      css: {\n        color: \"$info11\",\n        bgColor: \"$info4\",\n      },\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"warning\",\n      css: {\n        color: \"$warning11\",\n        bgColor: \"$warning4\",\n      },\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"danger\",\n      css: {\n        color: \"$danger11\",\n        bgColor: \"$danger4\",\n      },\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - outline + color\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"outline\",\n      colorScheme: \"primary\",\n      css: {\n        color: \"$primary11\",\n        borderColor: \"$primary7\",\n      },\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"accent\",\n      css: {\n        color: \"$accent11\",\n        borderColor: \"$accent7\",\n      },\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"neutral\",\n      css: {\n        color: \"$neutral12\",\n        borderColor: \"$neutral7\",\n      },\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"success\",\n      css: {\n        color: \"$success11\",\n        borderColor: \"$success7\",\n      },\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"info\",\n      css: {\n        color: \"$info11\",\n        borderColor: \"$info7\",\n      },\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"warning\",\n      css: {\n        color: \"$warning11\",\n        borderColor: \"$warning7\",\n      },\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"danger\",\n      css: {\n        color: \"$danger11\",\n        borderColor: \"$danger7\",\n      },\n    },\n  ],\n});\n\nexport type BadgeVariants = VariantProps<typeof badgeStyles>;\n"
  },
  {
    "path": "packages/solid/src/components/badge/badge.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../test-utils\";\nimport { Badge } from \"./badge\";\nimport { badgeStyles, BadgeVariants } from \"./badge.styles\";\n\ndescribe(\"Badge\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Badge data-testid=\"badge\">Badge</Badge>);\n    const badge = screen.getByTestId(\"badge\");\n\n    // assert\n    expect(badge).toBeInTheDocument();\n  });\n\n  it(\"should render <span> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <Badge data-testid=\"badge\">Badge</Badge>);\n    const badge = screen.getByTestId(\"badge\");\n\n    // assert\n    expect(badge).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <Badge data-testid=\"badge\" as=\"div\">\n        Badge\n      </Badge>\n    ));\n    const badge = screen.getByTestId(\"badge\");\n\n    // assert\n    expect(badge).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"Badge\";\n\n    // act\n    renderWithHopeProvider(() => <Badge data-testid=\"badge\">{children}</Badge>);\n    const badge = screen.getByTestId(\"badge\");\n\n    // assert\n    expect(badge).toHaveTextContent(children);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <Badge data-testid=\"badge\">Badge</Badge>);\n    const badge = screen.getByTestId(\"badge\");\n\n    // assert\n    expect(badge).toHaveClass(\"hope-badge\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(Badge.toString()).toBe(\".hope-badge\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Badge data-testid=\"badge\" class={stubClass}>\n        Badge\n      </Badge>\n    ));\n    const badge = screen.getByTestId(\"badge\");\n\n    // assert\n    expect(badge).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <Badge data-testid=\"badge\" className={stubClass}>\n        Badge\n      </Badge>\n    ));\n    const badge = screen.getByTestId(\"badge\");\n\n    // assert\n    expect(badge).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Badge data-testid=\"badge\" classList={{ [stubClass]: true }}>\n        Badge\n      </Badge>\n    ));\n    const badge = screen.getByTestId(\"badge\");\n\n    // assert\n    expect(badge).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from variants prop\", () => {\n    // arrange\n    const variantProps: BadgeVariants = {\n      variant: \"subtle\",\n      colorScheme: \"success\",\n    };\n    const badgeClass = badgeStyles(variantProps);\n\n    // act\n    renderWithHopeProvider(() => (\n      <Badge data-testid=\"badge\" {...variantProps}>\n        Badge\n      </Badge>\n    ));\n    const badge = screen.getByTestId(\"badge\");\n\n    // assert\n    expect(badge).toHaveClass(badgeClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/badge/badge.tsx",
    "content": "import { mergeProps, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps, SinglePartComponentStyleConfig } from \"../types\";\nimport { badgeStyles, BadgeVariants } from \"./badge.styles\";\n\ntype ThemeableBadgeOptions = Pick<BadgeVariants, \"variant\" | \"colorScheme\">;\n\nexport type BadgeStyleConfig = SinglePartComponentStyleConfig<ThemeableBadgeOptions>;\n\nexport type BadgeProps<C extends ElementType = \"span\"> = HTMLHopeProps<C, BadgeVariants>;\n\nconst hopeBadgeClass = \"hope-badge\";\n\n/**\n * Badges are used to highlight an item's status for quick recognition.\n */\nexport function Badge<C extends ElementType = \"span\">(props: BadgeProps<C>) {\n  const theme = useStyleConfig().Badge;\n\n  const defaultProps: BadgeProps<\"span\"> = {\n    variant: theme?.defaultProps?.variant ?? \"subtle\",\n    colorScheme: theme?.defaultProps?.colorScheme ?? \"neutral\",\n  };\n\n  const propsWithDefault: BadgeProps<\"span\"> = mergeProps(defaultProps, props);\n  const [local, variantProps, others] = splitProps(\n    propsWithDefault,\n    [\"class\"],\n    [\"variant\", \"colorScheme\"]\n  );\n\n  const classes = () => classNames(local.class, hopeBadgeClass, badgeStyles(variantProps));\n\n  return <hope.span class={classes()} __baseStyle={theme?.baseStyle} {...others} />;\n}\n\nBadge.toString = () => createClassSelector(hopeBadgeClass);\n"
  },
  {
    "path": "packages/solid/src/components/badge/index.ts",
    "content": "export * from \"./badge\";\nexport * from \"./badge.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/box/box.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { createStyledSystemClass } from \"../../styled-system/system\";\nimport { StyleProps } from \"../../styled-system/types\";\nimport { renderWithHopeProvider } from \"../test-utils\";\nimport { Box } from \"./box\";\n\ndescribe(\"Box\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Box data-testid=\"box\">Box</Box>);\n    const box = screen.getByTestId(\"box\");\n\n    // assert\n    expect(box).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <Box data-testid=\"box\">Box</Box>);\n    const box = screen.getByTestId(\"box\");\n\n    // assert\n    expect(box).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <Box data-testid=\"box\" as=\"span\">\n        Box\n      </Box>\n    ));\n    const box = screen.getByTestId(\"box\");\n\n    // assert\n    expect(box).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"Box\";\n\n    // act\n    renderWithHopeProvider(() => <Box data-testid=\"box\">{children}</Box>);\n    const box = screen.getByTestId(\"box\");\n\n    // assert\n    expect(box).toHaveTextContent(children);\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Box data-testid=\"box\" class={stubClass}>\n        Box\n      </Box>\n    ));\n    const box = screen.getByTestId(\"box\");\n\n    // assert\n    expect(box).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <Box data-testid=\"box\" className={stubClass}>\n        Box\n      </Box>\n    ));\n    const box = screen.getByTestId(\"box\");\n\n    // assert\n    expect(box).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Box data-testid=\"box\" classList={{ [stubClass]: true }}>\n        Box\n      </Box>\n    ));\n    const box = screen.getByTestId(\"box\");\n\n    // assert\n    expect(box).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from style props\", () => {\n    // arrange\n    const styleProps: StyleProps = {\n      p: \"$4\",\n      color: \"white\",\n      bg: \"tomato\",\n      css: {\n        transition: \"all 300ms ease-in\",\n      },\n    };\n    const className = createStyledSystemClass(styleProps).className;\n\n    // act\n    renderWithHopeProvider(() => (\n      <Box data-testid=\"box\" {...styleProps}>\n        Box\n      </Box>\n    ));\n    const box = screen.getByTestId(\"box\");\n\n    // assert\n    expect(box).toHaveClass(className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/box/box.tsx",
    "content": "import { hope } from \"../factory\";\n\n/**\n * Box is the most abstract component on top of which all other Hope UI components are built.\n * By default, it renders a div element.\n */\nexport const Box = hope.div;\n"
  },
  {
    "path": "packages/solid/src/components/box/index.ts",
    "content": "export * from \"./box\";\n"
  },
  {
    "path": "packages/solid/src/components/breadcrumb/breadcrumb-item.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useBreadcrumbContext } from \"./breadcrumb\";\nimport { breadcrumbItemStyles } from \"./breadcrumb.styles\";\n\nexport type BreadcrumbItemProps<C extends ElementType = \"li\"> = HTMLHopeProps<C>;\n\nconst hopeBreadcrumbItemClass = \"hope-breadcrumb__item\";\n\n/**\n * BreadcrumbItem is used to group a breadcrumb link and separator.\n * It renders a `li` element to denote it belongs to an order list of links.\n */\nexport function BreadcrumbItem<C extends ElementType = \"li\">(props: BreadcrumbItemProps<C>) {\n  const theme = useStyleConfig().Breadcrumb;\n\n  const breadcrumbContext = useBreadcrumbContext();\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => {\n    return classNames(local.class, hopeBreadcrumbItemClass, breadcrumbItemStyles());\n  };\n\n  return (\n    <hope.li\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.item}\n      gap={breadcrumbContext.state.spacing}\n      {...others}\n    />\n  );\n}\n\nBreadcrumbItem.toString = () => createClassSelector(hopeBreadcrumbItemClass);\n"
  },
  {
    "path": "packages/solid/src/components/breadcrumb/breadcrumb-link.tsx",
    "content": "import { Show, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { breadcrumbLinkStyles } from \"./breadcrumb.styles\";\n\nexport interface BreadcrumbLinkOptions {\n  currentPage?: boolean;\n}\n\nexport type BreadcrumbLinkProps<C extends ElementType = \"a\"> = HTMLHopeProps<\n  C,\n  BreadcrumbLinkOptions\n>;\n\nconst hopeBreadcrumbLinkClass = \"hope-breadcrumb__link\";\n\n/**\n * Breadcrumb link.\n *\n * It renders a `span` when it matches the current link.\n * Otherwise, it renders an anchor tag.\n */\nexport function BreadcrumbLink<C extends ElementType = \"a\">(props: BreadcrumbLinkProps<C>) {\n  const theme = useStyleConfig().Breadcrumb;\n\n  const [local, others] = splitProps(props as BreadcrumbLinkProps<\"a\">, [\n    \"class\",\n    \"currentPage\",\n    \"href\",\n  ]);\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeBreadcrumbLinkClass,\n      breadcrumbLinkStyles({\n        currentPage: local.currentPage === true ? true : false, // ensure a boolean is passed so the `true/false` values works correctly\n      })\n    );\n  };\n\n  return (\n    <Show\n      when={local.currentPage}\n      fallback={\n        <hope.a\n          href={local.href}\n          class={classes()}\n          __baseStyle={theme?.baseStyle?.link}\n          {...others}\n        />\n      }\n    >\n      <hope.span\n        aria-current=\"page\"\n        class={classes()}\n        __baseStyle={theme?.baseStyle?.link}\n        {...others}\n      />\n    </Show>\n  );\n}\n\nBreadcrumbLink.toString = () => createClassSelector(hopeBreadcrumbLinkClass);\n"
  },
  {
    "path": "packages/solid/src/components/breadcrumb/breadcrumb-separator.tsx",
    "content": "import { Show, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useBreadcrumbContext } from \"./breadcrumb\";\nimport { breadcrumbSeparatorStyles } from \"./breadcrumb.styles\";\n\nexport type BreadcrumbSeparatorProps<C extends ElementType = \"span\"> = HTMLHopeProps<C>;\n\nconst hopeBreadcrumbSeparatorClass = \"hope-breadcrumb__separator\";\n\n/**\n * The visual separator between each breadcrumb.\n */\nexport function BreadcrumbSeparator<C extends ElementType = \"span\">(\n  props: BreadcrumbSeparatorProps<C>\n) {\n  const theme = useStyleConfig().Breadcrumb;\n\n  const breadcrumbContext = useBreadcrumbContext();\n\n  const [local, others] = splitProps(props, [\"class\", \"children\"]);\n\n  const classes = () => {\n    return classNames(local.class, hopeBreadcrumbSeparatorClass, breadcrumbSeparatorStyles());\n  };\n\n  return (\n    <hope.span\n      role=\"presentation\"\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.separator}\n      {...others}\n    >\n      <Show when={local.children} fallback={breadcrumbContext.state.separator}>\n        {local.children}\n      </Show>\n    </hope.span>\n  );\n}\n\nBreadcrumbSeparator.toString = () => createClassSelector(hopeBreadcrumbSeparatorClass);\n"
  },
  {
    "path": "packages/solid/src/components/breadcrumb/breadcrumb.styles.ts",
    "content": "import { css } from \"../../styled-system/stitches.config\";\n\n/* -------------------------------------------------------------------------------------------------\n * Breadcrumb\n * -----------------------------------------------------------------------------------------------*/\n\nexport const breadcrumbStyles = css({\n  display: \"block\",\n  fontSize: \"$base\",\n  lineHeight: \"$6\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Breadcrumb - List\n * -----------------------------------------------------------------------------------------------*/\n\nexport const breadcrumbListStyles = css({\n  display: \"flex\",\n  alignItems: \"center\",\n  margin: 0,\n  padding: 0,\n  listStyle: \"none\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Breadcrumb - item\n * -----------------------------------------------------------------------------------------------*/\n\nexport const breadcrumbItemStyles = css({\n  display: \"inline-flex\",\n  alignItems: \"center\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Breadcrumb - separator\n * -----------------------------------------------------------------------------------------------*/\n\nexport const breadcrumbSeparatorStyles = css({\n  display: \"inline-flex\",\n  alignItems: \"center\",\n  justifyContent: \"center\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Breadcrumb - link\n * -----------------------------------------------------------------------------------------------*/\n\nexport const breadcrumbLinkStyles = css({\n  position: \"relative\",\n\n  display: \"inline-flex\",\n  alignItems: \"center\",\n\n  outline: \"none\",\n  backgroundColor: \"transparent\",\n\n  color: \"$neutral11\",\n  textDecoration: \"none\",\n  cursor: \"pointer\",\n  transition: \"color 250ms, text-decoration 250ms\",\n\n  \"&:focus\": {\n    boxShadow: \"$outline\",\n  },\n\n  variants: {\n    currentPage: {\n      true: {\n        color: \"$neutral12\",\n        cursor: \"default\",\n      },\n      false: {\n        \"&:hover\": {\n          color: \"$primary11\",\n        },\n      },\n    },\n  },\n});\n"
  },
  {
    "path": "packages/solid/src/components/breadcrumb/breadcrumb.tsx",
    "content": "import { createContext, JSX, splitProps, useContext } from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { GridLayoutProps } from \"../../styled-system/props/grid\";\nimport { ResponsiveValue, SystemStyleObject } from \"../../styled-system/types\";\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { breadcrumbListStyles, breadcrumbStyles } from \"./breadcrumb.styles\";\n\ninterface BreadcrumbState {\n  /**\n   * The space between each item, link and separator.\n   */\n  spacing: ResponsiveValue<GridLayoutProps[\"gap\"]>;\n\n  /**\n   * The visual separator between each breadcrumb item.\n   */\n  separator: string | JSX.Element;\n}\n\ninterface BreadcrumbContextValue {\n  state: BreadcrumbState;\n}\n\nconst BreadcrumbContext = createContext<BreadcrumbContextValue>();\n\ntype BreadcrumbOptions = Partial<BreadcrumbState>;\n\ntype ThemeableBreadcrumbOptions = BreadcrumbOptions;\n\nexport type BreadcrumbProps<C extends ElementType = \"nav\"> = HTMLHopeProps<C, BreadcrumbOptions>;\n\nexport interface BreadcrumbStyleConfig {\n  baseStyle?: {\n    root?: SystemStyleObject;\n    item?: SystemStyleObject;\n    link?: SystemStyleObject;\n    separator?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: ThemeableBreadcrumbOptions;\n  };\n}\n\nconst hopeBreadcrumbClass = \"hope-breadcrumb\";\nconst hopeBreadcrumbListClass = \"hope-breadcrumb__list\";\n\n/**\n * Breadcrumb is used to render a breadcrumb navigation landmark.\n * It renders a `nav` element with `aria-label` set to `breadcrumb`\n */\nexport function Breadcrumb<C extends ElementType = \"nav\">(props: BreadcrumbProps<C>) {\n  const theme = useStyleConfig().Breadcrumb;\n\n  const [state] = createStore<BreadcrumbState>({\n    get spacing() {\n      return props.spacing ?? theme?.defaultProps?.root?.spacing ?? \"0.5rem\";\n    },\n    get separator() {\n      return props.separator ?? theme?.defaultProps?.root?.separator ?? \"/\";\n    },\n  });\n\n  const [local, others] = splitProps(props, [\"class\", \"children\", \"separator\", \"spacing\"]);\n\n  const rootClasses = () => classNames(local.class, hopeBreadcrumbClass, breadcrumbStyles());\n\n  const listClasses = () => classNames(hopeBreadcrumbListClass, breadcrumbListStyles());\n\n  const context: BreadcrumbContextValue = {\n    state: state as BreadcrumbState,\n  };\n\n  return (\n    <BreadcrumbContext.Provider value={context}>\n      <hope.nav\n        aria-label=\"breadcrumb\"\n        class={rootClasses()}\n        __baseStyle={theme?.baseStyle?.root}\n        {...others}\n      >\n        <hope.ol class={listClasses()} gap={(state as BreadcrumbState).spacing}>\n          {local.children}\n        </hope.ol>\n      </hope.nav>\n    </BreadcrumbContext.Provider>\n  );\n}\n\nBreadcrumb.toString = () => createClassSelector(hopeBreadcrumbClass);\n\nexport function useBreadcrumbContext() {\n  const context = useContext(BreadcrumbContext);\n\n  if (!context) {\n    throw new Error(\n      \"[Hope UI]: useBreadcrumbContext must be used within a `<Breadcrumb />` component\"\n    );\n  }\n\n  return context;\n}\n"
  },
  {
    "path": "packages/solid/src/components/breadcrumb/index.ts",
    "content": "export * from \"./breadcrumb\";\nexport * from \"./breadcrumb.styles\";\nexport * from \"./breadcrumb-item\";\nexport * from \"./breadcrumb-link\";\nexport * from \"./breadcrumb-separator\";\n"
  },
  {
    "path": "packages/solid/src/components/button/button-group.tsx",
    "content": "import { createContext, mergeProps, splitProps, useContext } from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { MarginProps } from \"../../styled-system/props/margin\";\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { ButtonOptions } from \"./button\";\nimport { buttonGroupStyles } from \"./button.styles\";\n\ninterface ButtonGroupOptions extends Pick<ButtonOptions, \"variant\" | \"colorScheme\" | \"size\"> {\n  /**\n   * If `true`, the borderRadius of button that are direct children will be altered\n   * to look flushed together.\n   */\n  attached?: boolean;\n\n  /**\n   * The spacing between each buttons.\n   */\n  spacing?: MarginProps[\"marginRight\"];\n\n  /**\n   * If `true`, all wrapped button will be disabled.\n   */\n  disabled?: boolean;\n}\n\nexport type ThemeableButtonGroupOptions = Omit<ButtonGroupOptions, \"disabled\">;\n\nexport type ButtonGroupProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, ButtonGroupOptions>;\n\nconst hopeButtonGroupClass = \"hope-button__group\";\n\ntype ButtonGroupState = Pick<ButtonGroupProps, \"variant\" | \"colorScheme\" | \"size\" | \"disabled\">;\n\ninterface ButtonGroupContextValue {\n  state: ButtonGroupState;\n}\n\nconst ButtonGroupContext = createContext<ButtonGroupContextValue>();\n\nexport function ButtonGroup<C extends ElementType = \"div\">(props: ButtonGroupProps<C>) {\n  const theme = useStyleConfig().Button;\n\n  const [state] = createStore<ButtonGroupState>({\n    get variant() {\n      return props.variant ?? theme?.defaultProps?.group?.variant;\n    },\n    get colorScheme() {\n      return props.colorScheme ?? theme?.defaultProps?.group?.colorScheme;\n    },\n    get size() {\n      return props.size ?? theme?.defaultProps?.group?.size;\n    },\n    get disabled() {\n      return props.disabled;\n    },\n  });\n\n  const defaultProps: ButtonGroupProps<\"div\"> = {\n    attached: theme?.defaultProps?.group?.attached ?? false,\n    spacing: theme?.defaultProps?.group?.spacing ?? \"0.5rem\",\n  };\n\n  const propsWithDefault: ButtonGroupProps<\"div\"> = mergeProps(defaultProps, props);\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  const [local, _, others] = splitProps(\n    propsWithDefault,\n    [\"class\", \"attached\", \"spacing\"],\n    [\"variant\", \"colorScheme\", \"size\", \"disabled\"]\n  );\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeButtonGroupClass,\n      buttonGroupStyles({\n        css: local.attached\n          ? {\n              \"> *:first-of-type:not(:last-of-type)\": { borderRightRadius: 0 },\n              \"> *:not(:first-of-type):not(:last-of-type)\": { borderRadius: 0 },\n              \"> *:not(:first-of-type):last-of-type\": { borderLeftRadius: 0 },\n            }\n          : {\n              \"& > *:not(style) ~ *:not(style)\": { marginStart: local.spacing },\n            },\n      })\n    );\n  };\n\n  const context: ButtonGroupContextValue = {\n    state,\n  };\n\n  return (\n    <ButtonGroupContext.Provider value={context}>\n      <Box role=\"group\" class={classes()} __baseStyle={theme?.baseStyle?.group} {...others} />\n    </ButtonGroupContext.Provider>\n  );\n}\n\nButtonGroup.toString = () => createClassSelector(hopeButtonGroupClass);\n\nexport function useButtonGroupContext() {\n  return useContext(ButtonGroupContext);\n}\n"
  },
  {
    "path": "packages/solid/src/components/button/button-icon.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { buttonIconStyles } from \"./button.styles\";\n\nexport type ButtonIconProps<C extends ElementType = \"span\"> = HTMLHopeProps<C>;\n\nconst hopeButtonIconClass = \"hope-button__icon\";\n\nexport function ButtonIcon<C extends ElementType = \"span\">(props: ButtonIconProps<C>) {\n  const [local, others] = splitProps(props, [\"class\", \"children\"]);\n\n  const classes = () => classNames(local.class, hopeButtonIconClass, buttonIconStyles());\n\n  return (\n    <hope.span class={classes()} {...others}>\n      {local.children}\n    </hope.span>\n  );\n}\n\nButtonIcon.toString = () => createClassSelector(hopeButtonIconClass);\n"
  },
  {
    "path": "packages/solid/src/components/button/button-loader.tsx",
    "content": "import { Property } from \"csstype\";\nimport { mergeProps, splitProps } from \"solid-js\";\n\nimport { SpaceScaleValue } from \"../../styled-system\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { IconSpinner } from \"../icons/IconSpinner\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { buttonIconSpinnerStyles, buttonLoaderStyles } from \"./button.styles\";\n\nexport type ButtonLoaderProps<C extends ElementType = \"div\"> = HTMLHopeProps<\n  C,\n  {\n    withLoadingText?: boolean;\n    spacing?: Property.Margin<SpaceScaleValue>;\n    placement?: \"start\" | \"end\";\n  }\n>;\n\nconst hopeButtonLoaderClass = \"hope-button__loader\";\n\nexport function ButtonLoader<C extends ElementType = \"div\">(props: ButtonLoaderProps<C>) {\n  const defaultProps: ButtonLoaderProps<\"div\"> = {\n    spacing: \"0.5rem\",\n    children: <IconSpinner class={buttonIconSpinnerStyles()} />,\n  };\n\n  const propsWithDefault: ButtonLoaderProps<\"div\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault, [\n    \"class\",\n    \"children\",\n    \"withLoadingText\",\n    \"placement\",\n    \"spacing\",\n  ]);\n\n  const marginProp = () => (local.placement === \"start\" ? \"marginEnd\" : \"marginStart\");\n\n  const loaderStyles = () => ({\n    [marginProp()]: local.withLoadingText ? local.spacing : 0,\n  });\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeButtonLoaderClass,\n      buttonLoaderStyles({ withLoadingText: local.withLoadingText })\n    );\n  };\n\n  return (\n    <hope.div class={classes()} {...loaderStyles} {...others}>\n      {local.children}\n    </hope.div>\n  );\n}\n\nButtonLoader.toString = () => createClassSelector(hopeButtonLoaderClass);\n"
  },
  {
    "path": "packages/solid/src/components/button/button.stories.tsx",
    "content": "import { action } from \"@storybook/addon-actions\";\nimport { JSX } from \"solid-js\";\n\nimport { HopeWrapper } from \"../storybook-utils\";\nimport { Button } from \"./button\";\n\nfunction IconCart(props: JSX.SvgSVGAttributes<SVGSVGElement>) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width=\"1em\"\n      height=\"1em\"\n      viewBox=\"0 0 20 20\"\n      preserveAspectRatio=\"xMidYMid meet\"\n      {...props}\n    >\n      <g fill=\"none\">\n        <path\n          d=\"M3 1a1 1 0 0 0 0 2h1.22l.305 1.222a.997.997 0 0 0 .01.042l1.358 5.43l-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 0 0 0-2H6.414l1-1H14a1 1 0 0 0 .894-.553l3-6A1 1 0 0 0 17 3H6.28l-.31-1.243A1 1 0 0 0 5 1H3z\"\n          fill=\"currentColor\"\n        ></path>\n        <path d=\"M16 16.5a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0z\" fill=\"currentColor\"></path>\n        <path d=\"M6.5 18a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3z\" fill=\"currentColor\"></path>\n      </g>\n    </svg>\n  );\n}\n\nexport default {\n  title: \"General/Button\",\n  component: Button,\n  parameters: { layout: \"centered\" },\n  decorators: [\n    (Story: any) => (\n      <HopeWrapper>\n        <div style={{ display: \"flex\", \"justify-content\": \"center\", width: \"90vw\" }}>\n          <Story />\n        </div>\n      </HopeWrapper>\n    ),\n  ],\n  argTypes: {\n    variant: {\n      control: { type: \"select\" },\n      options: [\"solid\", \"subtle\", \"outline\", \"dashed\", \"ghost\"],\n    },\n    colorScheme: {\n      control: { type: \"select\" },\n      options: [\"primary\", \"neutral\", \"success\", \"info\", \"warning\", \"danger\"],\n    },\n    size: {\n      control: { type: \"select\" },\n      options: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\"],\n    },\n    loaderPlacement: {\n      control: { type: \"inline-radio\" },\n      options: [\"start\", \"end\"],\n    },\n    compact: {\n      control: { type: \"boolean\" },\n    },\n    fullWidth: {\n      control: { type: \"boolean\" },\n    },\n    loading: {\n      control: { type: \"boolean\" },\n    },\n    disabled: {\n      control: { type: \"boolean\" },\n    },\n    loadingText: {\n      control: \"text\",\n    },\n    children: {\n      control: \"text\",\n    },\n  },\n  args: {\n    variant: \"solid\",\n    colorScheme: \"primary\",\n    size: \"md\",\n    loaderPlacement: \"start\",\n    compact: false,\n    fullWidth: false,\n    loading: false,\n    disabled: false,\n    loadingText: \"\",\n    children: \"Button\",\n  },\n};\n\nexport const Default = (args: any) => <Button {...args} onClick={action(\"clicked\")} />;\n\nexport const WithLeftIcon = (args: any) => (\n  <Button leftIcon={<IconCart />} onClick={action(\"clicked\")} {...args} />\n);\nWithLeftIcon.storyName = \"With left icon\";\n\nexport const WithRightIcon = (args: any) => (\n  <Button rightIcon={<IconCart />} onClick={action(\"clicked\")} {...args} />\n);\nWithRightIcon.storyName = \"With right icon\";\n"
  },
  {
    "path": "packages/solid/src/components/button/button.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { spin } from \"../../styled-system/keyframes\";\nimport { css } from \"../../styled-system/stitches.config\";\nimport { SystemStyleObject } from \"../../styled-system/types\";\n\nexport const hopeIconButtonClass = \"hope-icon-button\";\n\n/* -------------------------------------------------------------------------------------------------\n * Button - icon\n * -----------------------------------------------------------------------------------------------*/\n\nexport const buttonIconStyles = css({\n  display: \"inline-flex\",\n  alignSelf: \"center\",\n  flexShrink: 0,\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Button - loader\n * -----------------------------------------------------------------------------------------------*/\n\nexport const buttonLoaderStyles = css({\n  position: \"absolute\",\n\n  display: \"flex\",\n  alignItems: \"center\",\n  flexShrink: 0,\n\n  fontSize: \"1em\",\n  lineHeight: \"$normal\",\n\n  variants: {\n    withLoadingText: {\n      true: {\n        position: \"relative\",\n      },\n    },\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Button - default icon spinner\n * -----------------------------------------------------------------------------------------------*/\n\nexport const buttonIconSpinnerStyles = css({\n  fontSize: \"1.3em\",\n  animation: `1s linear infinite ${spin}`,\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Button - Size\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SizeVariantConfig {\n  height: string;\n  paddingX: string;\n  fontSize: string;\n  spacing: string;\n}\n\nfunction createSizeVariant(config: SizeVariantConfig): SystemStyleObject {\n  return {\n    height: config.height,\n    py: 0,\n    px: config.paddingX,\n    fontSize: config.fontSize,\n\n    [`&.${hopeIconButtonClass}`]: {\n      width: config.height,\n      padding: \"0\",\n    },\n  };\n}\n\ninterface CompactSizeVariantConfig {\n  height: string;\n  paddingX: string;\n}\n\nfunction createCompactSizeCompoundVariant(config: CompactSizeVariantConfig): SystemStyleObject {\n  return {\n    height: config.height,\n    py: 0,\n    px: config.paddingX,\n\n    [`&.${hopeIconButtonClass}`]: {\n      width: config.height,\n      padding: \"0\",\n    },\n  };\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Button - variant - solid\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SolidCompoundVariantConfig {\n  color: string;\n  bgColor: string;\n  bgColorHover: string;\n}\n\nfunction createSolidCompoundVariant(config: SolidCompoundVariantConfig): SystemStyleObject {\n  return {\n    backgroundColor: config.bgColor,\n    color: config.color,\n\n    \"&:hover\": {\n      backgroundColor: config.bgColorHover,\n    },\n  };\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Button - variant - subtle\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SubtleCompoundVariantConfig {\n  color: string;\n  bgColor: string;\n  bgColorHover: string;\n  bgColorActive: string;\n}\n\nfunction createSubtleCompoundVariant(config: SubtleCompoundVariantConfig): SystemStyleObject {\n  return {\n    backgroundColor: config.bgColor,\n    color: config.color,\n\n    \"&:hover\": {\n      backgroundColor: config.bgColorHover,\n    },\n\n    \"&:active\": {\n      backgroundColor: config.bgColorActive,\n    },\n  };\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Button - variant - outline\n * -----------------------------------------------------------------------------------------------*/\n\ninterface OutlineCompoundVariantConfig {\n  color: string;\n  borderColor: string;\n  borderColorHover: string;\n  bgColorHover: string;\n  bgColorActive: string;\n}\n\nfunction createOutlineCompoundVariant(config: OutlineCompoundVariantConfig): SystemStyleObject {\n  return {\n    borderColor: config.borderColor,\n    color: config.color,\n\n    \"&:hover\": {\n      borderColor: config.borderColorHover,\n      backgroundColor: config.bgColorHover,\n    },\n\n    \"&:active\": {\n      backgroundColor: config.bgColorActive,\n    },\n  };\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Button - variant - ghost\n * -----------------------------------------------------------------------------------------------*/\n\ninterface GhostCompoundVariantConfig {\n  color: string;\n  bgColorHover: string;\n  bgColorActive: string;\n}\n\nfunction createGhostCompoundVariant(config: GhostCompoundVariantConfig): SystemStyleObject {\n  return {\n    color: config.color,\n\n    \"&:hover\": {\n      backgroundColor: config.bgColorHover,\n    },\n\n    \"&:active\": {\n      backgroundColor: config.bgColorActive,\n    },\n  };\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Button - styles\n * -----------------------------------------------------------------------------------------------*/\n\nexport const buttonStyles = css({\n  appearance: \"none\",\n  position: \"relative\",\n\n  display: \"inline-flex\",\n  justifyContent: \"center\",\n  alignItems: \"center\",\n\n  outline: \"none\",\n  borderRadius: \"$sm\",\n\n  padding: \"0\",\n\n  fontWeight: \"$medium\",\n  lineHeight: \"$none\",\n  textDecoration: \"none\",\n\n  cursor: \"pointer\",\n  userSelect: \"none\",\n  whiteSpace: \"nowrap\",\n  verticalAlign: \"middle\",\n  transition: \"color 250ms, background-color 250ms, box-shadow 250ms\",\n\n  \"&:focus\": {\n    outline: \"none\",\n    boxShadow: \"$outline\",\n  },\n\n  \"&:disabled, &:hover:disabled\": {\n    color: \"$neutral7\",\n    cursor: \"not-allowed\",\n  },\n\n  variants: {\n    variant: {\n      solid: {\n        border: \"1px solid transparent\",\n\n        \"&:disabled, &:hover:disabled\": {\n          backgroundColor: \"$neutral3\",\n        },\n      },\n      subtle: {\n        border: \"1px solid transparent\",\n\n        \"&:disabled, &:hover:disabled\": {\n          backgroundColor: \"$neutral3\",\n        },\n      },\n      outline: {\n        borderStyle: \"solid\",\n        borderWidth: \"1px\",\n        backgroundColor: \"transparent\",\n\n        \"&:disabled, &:hover:disabled\": {\n          borderColor: \"$neutral3\",\n        },\n      },\n      dashed: {\n        borderStyle: \"dashed\",\n        borderWidth: \"1px\",\n        backgroundColor: \"transparent\",\n\n        \"&:disabled, &:hover:disabled\": {\n          borderColor: \"$neutral3\",\n        },\n      },\n      ghost: {\n        border: \"1px solid transparent\",\n        backgroundColor: \"transparent\",\n      },\n    },\n    colorScheme: {\n      primary: {},\n      accent: {},\n      neutral: {},\n      success: {},\n      info: {},\n      warning: {},\n      danger: {},\n    },\n    size: {\n      xs: createSizeVariant({\n        height: \"$6\",\n        paddingX: \"$2\",\n        fontSize: \"$xs\",\n        spacing: \"$1\",\n      }),\n      sm: createSizeVariant({\n        height: \"$8\",\n        paddingX: \"$3\",\n        fontSize: \"$sm\",\n        spacing: \"$1_5\",\n      }),\n      md: createSizeVariant({\n        height: \"$10\",\n        paddingX: \"$4\",\n        fontSize: \"$base\",\n        spacing: \"$1_5\",\n      }),\n      lg: createSizeVariant({\n        height: \"$12\",\n        paddingX: \"$6\",\n        fontSize: \"$lg\",\n        spacing: \"$2\",\n      }),\n      xl: createSizeVariant({\n        height: \"$16\",\n        paddingX: \"$10\",\n        fontSize: \"$xl\",\n        spacing: \"$2\",\n      }),\n    },\n    compact: {\n      true: {},\n      false: {},\n    },\n    fullWidth: {\n      true: {\n        display: \"flex\",\n        width: \"100%\",\n      },\n      false: {\n        display: \"inline-flex\",\n        width: \"auto\",\n      },\n    },\n    loading: {\n      true: {\n        opacity: \"0.75\",\n        cursor: \"default\",\n        pointerEvents: \"none\",\n      },\n      false: {},\n    },\n  },\n\n  compoundVariants: [\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - solid\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"solid\",\n      colorScheme: \"primary\",\n      css: createSolidCompoundVariant({\n        color: \"white\",\n        bgColor: \"$primary9\",\n        bgColorHover: \"$primary10\",\n      }),\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"accent\",\n      css: createSolidCompoundVariant({\n        color: \"white\",\n        bgColor: \"$accent9\",\n        bgColorHover: \"$accent10\",\n      }),\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"neutral\",\n      css: createSolidCompoundVariant({\n        color: \"white\",\n        bgColor: \"$neutral9\",\n        bgColorHover: \"$neutral10\",\n      }),\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"success\",\n      css: createSolidCompoundVariant({\n        color: \"white\",\n        bgColor: \"$success9\",\n        bgColorHover: \"$success10\",\n      }),\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"info\",\n      css: createSolidCompoundVariant({\n        color: \"white\",\n        bgColor: \"$info9\",\n        bgColorHover: \"$info10\",\n      }),\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"warning\",\n      css: createSolidCompoundVariant({\n        color: \"$blackAlpha12\",\n        bgColor: \"$warning9\",\n        bgColorHover: \"$warning10\",\n      }),\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"danger\",\n      css: createSolidCompoundVariant({\n        color: \"white\",\n        bgColor: \"$danger9\",\n        bgColorHover: \"$danger10\",\n      }),\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - subtle\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"subtle\",\n      colorScheme: \"primary\",\n      css: createSubtleCompoundVariant({\n        color: \"$primary11\",\n        bgColor: \"$primary4\",\n        bgColorHover: \"$primary5\",\n        bgColorActive: \"$primary6\",\n      }),\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"accent\",\n      css: createSubtleCompoundVariant({\n        color: \"$accent11\",\n        bgColor: \"$accent4\",\n        bgColorHover: \"$accent5\",\n        bgColorActive: \"$accent6\",\n      }),\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"neutral\",\n      css: createSubtleCompoundVariant({\n        color: \"$neutral12\",\n        bgColor: \"$neutral4\",\n        bgColorHover: \"$neutral5\",\n        bgColorActive: \"$neutral6\",\n      }),\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"success\",\n      css: createSubtleCompoundVariant({\n        color: \"$success11\",\n        bgColor: \"$success4\",\n        bgColorHover: \"$success5\",\n        bgColorActive: \"$success6\",\n      }),\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"info\",\n      css: createSubtleCompoundVariant({\n        color: \"$info11\",\n        bgColor: \"$info4\",\n        bgColorHover: \"$info5\",\n        bgColorActive: \"$info6\",\n      }),\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"warning\",\n      css: createSubtleCompoundVariant({\n        color: \"$warning11\",\n        bgColor: \"$warning4\",\n        bgColorHover: \"$warning5\",\n        bgColorActive: \"$warning6\",\n      }),\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"danger\",\n      css: createSubtleCompoundVariant({\n        color: \"$danger11\",\n        bgColor: \"$danger4\",\n        bgColorHover: \"$danger5\",\n        bgColorActive: \"$danger6\",\n      }),\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - outline\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"outline\",\n      colorScheme: \"primary\",\n      css: createOutlineCompoundVariant({\n        color: \"$primary11\",\n        borderColor: \"$primary7\",\n        borderColorHover: \"$primary8\",\n        bgColorHover: \"$primary4\",\n        bgColorActive: \"$primary5\",\n      }),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"accent\",\n      css: createOutlineCompoundVariant({\n        color: \"$accent11\",\n        borderColor: \"$accent7\",\n        borderColorHover: \"$accent8\",\n        bgColorHover: \"$accent4\",\n        bgColorActive: \"$accent5\",\n      }),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"neutral\",\n      css: createOutlineCompoundVariant({\n        color: \"$neutral12\",\n        borderColor: \"$neutral7\",\n        borderColorHover: \"$neutral8\",\n        bgColorHover: \"$neutral4\",\n        bgColorActive: \"$neutral5\",\n      }),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"success\",\n      css: createOutlineCompoundVariant({\n        color: \"$success11\",\n        borderColor: \"$success7\",\n        borderColorHover: \"$success8\",\n        bgColorHover: \"$success4\",\n        bgColorActive: \"$success5\",\n      }),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"info\",\n      css: createOutlineCompoundVariant({\n        color: \"$info11\",\n        borderColor: \"$info7\",\n        borderColorHover: \"$info8\",\n        bgColorHover: \"$info4\",\n        bgColorActive: \"$info5\",\n      }),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"warning\",\n      css: createOutlineCompoundVariant({\n        color: \"$warning11\",\n        borderColor: \"$warning7\",\n        borderColorHover: \"$warning8\",\n        bgColorHover: \"$warning4\",\n        bgColorActive: \"$warning5\",\n      }),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"danger\",\n      css: createOutlineCompoundVariant({\n        color: \"$danger11\",\n        borderColor: \"$danger7\",\n        borderColorHover: \"$danger8\",\n        bgColorHover: \"$danger4\",\n        bgColorActive: \"$danger5\",\n      }),\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - dashed\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"dashed\",\n      colorScheme: \"primary\",\n      css: createOutlineCompoundVariant({\n        color: \"$primary11\",\n        borderColor: \"$primary7\",\n        borderColorHover: \"$primary8\",\n        bgColorHover: \"$primary4\",\n        bgColorActive: \"$primary5\",\n      }),\n    },\n    {\n      variant: \"dashed\",\n      colorScheme: \"accent\",\n      css: createOutlineCompoundVariant({\n        color: \"$accent11\",\n        borderColor: \"$accent7\",\n        borderColorHover: \"$accent8\",\n        bgColorHover: \"$accent4\",\n        bgColorActive: \"$accent5\",\n      }),\n    },\n    {\n      variant: \"dashed\",\n      colorScheme: \"neutral\",\n      css: createOutlineCompoundVariant({\n        color: \"$neutral12\",\n        borderColor: \"$neutral7\",\n        borderColorHover: \"$neutral8\",\n        bgColorHover: \"$neutral4\",\n        bgColorActive: \"$neutral5\",\n      }),\n    },\n    {\n      variant: \"dashed\",\n      colorScheme: \"success\",\n      css: createOutlineCompoundVariant({\n        color: \"$success11\",\n        borderColor: \"$success7\",\n        borderColorHover: \"$success8\",\n        bgColorHover: \"$success4\",\n        bgColorActive: \"$success5\",\n      }),\n    },\n    {\n      variant: \"dashed\",\n      colorScheme: \"info\",\n      css: createOutlineCompoundVariant({\n        color: \"$info11\",\n        borderColor: \"$info7\",\n        borderColorHover: \"$info8\",\n        bgColorHover: \"$info4\",\n        bgColorActive: \"$info5\",\n      }),\n    },\n    {\n      variant: \"dashed\",\n      colorScheme: \"warning\",\n      css: createOutlineCompoundVariant({\n        color: \"$warning11\",\n        borderColor: \"$warning7\",\n        borderColorHover: \"$warning8\",\n        bgColorHover: \"$warning4\",\n        bgColorActive: \"$warning5\",\n      }),\n    },\n    {\n      variant: \"dashed\",\n      colorScheme: \"danger\",\n      css: createOutlineCompoundVariant({\n        color: \"$danger11\",\n        borderColor: \"$danger7\",\n        borderColorHover: \"$danger8\",\n        bgColorHover: \"$danger4\",\n        bgColorActive: \"$danger5\",\n      }),\n    },\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - ghost\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"ghost\",\n      colorScheme: \"primary\",\n      css: createGhostCompoundVariant({\n        color: \"$primary11\",\n        bgColorHover: \"$primary4\",\n        bgColorActive: \"$primary5\",\n      }),\n    },\n    {\n      variant: \"ghost\",\n      colorScheme: \"accent\",\n      css: createGhostCompoundVariant({\n        color: \"$accent11\",\n        bgColorHover: \"$accent4\",\n        bgColorActive: \"$accent5\",\n      }),\n    },\n    {\n      variant: \"ghost\",\n      colorScheme: \"neutral\",\n      css: createGhostCompoundVariant({\n        color: \"$neutral12\",\n        bgColorHover: \"$neutral4\",\n        bgColorActive: \"$neutral5\",\n      }),\n    },\n    {\n      variant: \"ghost\",\n      colorScheme: \"success\",\n      css: createGhostCompoundVariant({\n        color: \"$success11\",\n        bgColorHover: \"$success4\",\n        bgColorActive: \"$success5\",\n      }),\n    },\n    {\n      variant: \"ghost\",\n      colorScheme: \"info\",\n      css: createGhostCompoundVariant({\n        color: \"$info11\",\n        bgColorHover: \"$info4\",\n        bgColorActive: \"$info5\",\n      }),\n    },\n    {\n      variant: \"ghost\",\n      colorScheme: \"warning\",\n      css: createGhostCompoundVariant({\n        color: \"$warning11\",\n        bgColorHover: \"$warning4\",\n        bgColorActive: \"$warning5\",\n      }),\n    },\n    {\n      variant: \"ghost\",\n      colorScheme: \"danger\",\n      css: createGhostCompoundVariant({\n        color: \"$danger11\",\n        bgColorHover: \"$danger4\",\n        bgColorActive: \"$danger5\",\n      }),\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Compact sizes\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      size: \"xs\",\n      compact: \"true\",\n      css: createCompactSizeCompoundVariant({ height: \"$5\", paddingX: \"$1\" }),\n    },\n    {\n      size: \"sm\",\n      compact: \"true\",\n      css: createCompactSizeCompoundVariant({ height: \"$6\", paddingX: \"$1_5\" }),\n    },\n    {\n      size: \"md\",\n      compact: \"true\",\n      css: createCompactSizeCompoundVariant({ height: \"$7\", paddingX: \"$2\" }),\n    },\n    {\n      size: \"lg\",\n      compact: \"true\",\n      css: createCompactSizeCompoundVariant({ height: \"$8\", paddingX: \"$2_5\" }),\n    },\n    {\n      size: \"xl\",\n      compact: \"true\",\n      css: createCompactSizeCompoundVariant({ height: \"$10\", paddingX: \"$3_5\" }),\n    },\n  ],\n});\n\nexport type ButtonVariants = VariantProps<typeof buttonStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * ButtonGroup\n * -----------------------------------------------------------------------------------------------*/\n\nexport const buttonGroupStyles = css({\n  display: \"inline-flex\",\n\n  [`& .${buttonStyles}:focus`]: {\n    zIndex: 1,\n  },\n});\n"
  },
  {
    "path": "packages/solid/src/components/button/button.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../test-utils\";\nimport { Button } from \"./button\";\nimport { buttonStyles, ButtonVariants } from \"./button.styles\";\n\ndescribe(\"Button\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Button>Button</Button>);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toBeInTheDocument();\n  });\n\n  it(\"should render <button> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <Button>Button</Button>);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toBeInstanceOf(HTMLButtonElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => <Button as=\"a\">Button</Button>);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toBeInstanceOf(HTMLAnchorElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"Button\";\n\n    // act\n    renderWithHopeProvider(() => <Button>{children}</Button>);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveTextContent(children);\n  });\n\n  it(\"should have type=button\", () => {\n    // act\n    renderWithHopeProvider(() => <Button>Button</Button>);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveAttribute(\"type\", \"button\");\n  });\n\n  it(\"should have role=button\", () => {\n    // act\n    renderWithHopeProvider(() => <Button>Button</Button>);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveAttribute(\"role\", \"button\");\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <Button>Button</Button>);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveClass(\"hope-button\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(Button.toString()).toBe(\".hope-button\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => <Button class={stubClass}>Button</Button>);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    // eslint-disable-next-line solid/no-react-specific-props\n    renderWithHopeProvider(() => <Button className={stubClass}>Button</Button>);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => <Button classList={{ [stubClass]: true }}>Button</Button>);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from variants prop\", () => {\n    // arrange\n    const variantProps: ButtonVariants = {\n      variant: \"subtle\",\n      colorScheme: \"success\",\n      size: \"lg\",\n      compact: true,\n      loading: false,\n      fullWidth: false,\n    };\n    const buttonClass = buttonStyles(variantProps);\n\n    // act\n    renderWithHopeProvider(() => <Button {...variantProps}>Button</Button>);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveClass(buttonClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/button/button.tsx",
    "content": "import { Property } from \"csstype\";\nimport { JSX, mergeProps, Show, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { SpaceScaleValue, SystemStyleObject } from \"../../styled-system/types\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { buttonStyles, ButtonVariants } from \"./button.styles\";\nimport { ThemeableButtonGroupOptions, useButtonGroupContext } from \"./button-group\";\nimport { ButtonIcon } from \"./button-icon\";\nimport { ButtonLoader } from \"./button-loader\";\n\nexport interface ButtonOptions extends ButtonVariants {\n  /**\n   * If `true`, the button will be disabled.\n   */\n  disabled?: boolean;\n\n  /**\n   * The label to show in the button when `loading` is true\n   * If no text is passed, it only shows the loader\n   */\n  loadingText?: string;\n\n  /**\n   * Replace the loader component when `loading` is set to `true`\n   */\n  loader?: JSX.Element;\n\n  /**\n   * It determines the placement of the loader when isLoading is true\n   */\n  loaderPlacement?: \"start\" | \"end\";\n\n  /**\n   * The space between the button icon and label.\n   */\n  iconSpacing?: Property.MarginRight<SpaceScaleValue>;\n\n  /**\n   * If added, the button will show an icon before the button's label.\n   */\n  leftIcon?: JSX.Element;\n\n  /**\n   * If added, the button will show an icon after the button's label.\n   */\n  rightIcon?: JSX.Element;\n}\n\nexport type ThemeableButtonOptions = Pick<\n  ButtonOptions,\n  \"variant\" | \"colorScheme\" | \"size\" | \"loaderPlacement\"\n>;\n\nexport interface ButtonStyleConfig {\n  baseStyle?: {\n    root?: SystemStyleObject;\n    group?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: ThemeableButtonOptions;\n    group?: ThemeableButtonGroupOptions;\n  };\n}\n\nexport type ButtonProps<C extends ElementType = \"button\"> = HTMLHopeProps<C, ButtonOptions>;\n\nexport const hopeButtonClass = \"hope-button\";\n\n/**\n * The Button component is used to trigger an action or event,\n * such as submitting a form, opening a dialog, canceling an action, or performing a delete operation.\n */\nexport function Button<C extends ElementType = \"button\">(props: ButtonProps<C>) {\n  const theme = useStyleConfig().Button;\n\n  const buttonGroupContext = useButtonGroupContext();\n\n  const defaultProps: ButtonProps<\"button\"> = {\n    loaderPlacement: theme?.defaultProps?.root?.loaderPlacement ?? \"start\",\n    iconSpacing: \"0.5rem\",\n    type: \"button\",\n    role: \"button\",\n  };\n\n  const propsWithDefault: ButtonProps<\"button\"> = mergeProps(defaultProps, props);\n  const [local, contentProps, others] = splitProps(\n    propsWithDefault,\n    [\n      \"class\",\n      \"disabled\",\n      \"loadingText\",\n      \"loader\",\n      \"loaderPlacement\",\n      \"variant\",\n      \"colorScheme\",\n      \"size\",\n      \"loading\",\n      \"compact\",\n      \"fullWidth\",\n    ],\n    [\"children\", \"iconSpacing\", \"leftIcon\", \"rightIcon\"]\n  );\n\n  const disabled = () => local.disabled ?? buttonGroupContext?.state.disabled;\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeButtonClass,\n      buttonStyles({\n        variant:\n          local.variant ??\n          buttonGroupContext?.state.variant ??\n          theme?.defaultProps?.root?.variant ??\n          \"solid\",\n        colorScheme:\n          local.colorScheme ??\n          buttonGroupContext?.state.colorScheme ??\n          theme?.defaultProps?.root?.colorScheme ??\n          \"primary\",\n        size:\n          local.size ?? buttonGroupContext?.state.size ?? theme?.defaultProps?.root?.size ?? \"md\",\n        loading: local.loading,\n        compact: local.compact,\n        fullWidth: local.fullWidth,\n      })\n    );\n  };\n\n  return (\n    <hope.button\n      class={classes()}\n      disabled={disabled()}\n      __baseStyle={theme?.baseStyle?.root}\n      {...others}\n    >\n      <Show when={local.loading && local.loaderPlacement === \"start\"}>\n        <ButtonLoader\n          class=\"hope-button__loader--start\"\n          withLoadingText={!!local.loadingText}\n          placement=\"start\"\n          spacing={contentProps.iconSpacing}\n        >\n          {local.loader}\n        </ButtonLoader>\n      </Show>\n\n      <Show when={local.loading} fallback={<ButtonContent {...contentProps} />}>\n        <Show\n          when={local.loadingText}\n          fallback={\n            <hope.span opacity={0}>\n              <ButtonContent {...contentProps} />\n            </hope.span>\n          }\n        >\n          {local.loadingText}\n        </Show>\n      </Show>\n\n      <Show when={local.loading && local.loaderPlacement === \"end\"}>\n        <ButtonLoader\n          class=\"hope-button__loader--end\"\n          withLoadingText={!!local.loadingText}\n          placement=\"end\"\n          spacing={contentProps.iconSpacing}\n        >\n          {local.loader}\n        </ButtonLoader>\n      </Show>\n    </hope.button>\n  );\n}\n\nButton.toString = () => createClassSelector(hopeButtonClass);\n\ntype ButtonContentProps = Pick<ButtonProps, \"iconSpacing\" | \"leftIcon\" | \"rightIcon\" | \"children\">;\n\nfunction ButtonContent(props: ButtonContentProps) {\n  return (\n    <>\n      <Show when={props.leftIcon}>\n        <ButtonIcon marginEnd={props.iconSpacing}>{props.leftIcon}</ButtonIcon>\n      </Show>\n      {props.children}\n      <Show when={props.rightIcon}>\n        <ButtonIcon marginStart={props.iconSpacing}>{props.rightIcon}</ButtonIcon>\n      </Show>\n    </>\n  );\n}\n"
  },
  {
    "path": "packages/solid/src/components/button/index.ts",
    "content": "export * from \"./button\";\nexport * from \"./button.styles\";\nexport * from \"./button-group\";\n"
  },
  {
    "path": "packages/solid/src/components/center/center.stories.tsx",
    "content": "import { HopeWrapper } from \"../storybook-utils\";\nimport { Center } from \"./center\";\n\nexport default {\n  title: \"Layout/Center\",\n  component: Center,\n  parameters: { layout: \"centered\" },\n  decorators: [\n    (Story: any) => (\n      <HopeWrapper>\n        <Story />\n      </HopeWrapper>\n    ),\n  ],\n};\n\nexport const Default = () => (\n  <Center bg=\"$info7\" w=\"$40\" h=\"$24\">\n    This is the Center\n  </Center>\n);\nDefault.storyName = \"Center\";\n"
  },
  {
    "path": "packages/solid/src/components/center/center.styles.ts",
    "content": "import { css } from \"../../styled-system/stitches.config\";\n\nexport const centerStyles = css({\n  display: \"flex\",\n  justifyContent: \"center\",\n  alignItems: \"center\",\n});\n"
  },
  {
    "path": "packages/solid/src/components/center/center.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../test-utils\";\nimport { Center } from \"./center\";\nimport { centerStyles } from \"./center.styles\";\n\ndescribe(\"Center\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Center data-testid=\"center\">Center</Center>);\n    const center = screen.getByTestId(\"center\");\n\n    // assert\n    expect(center).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <Center data-testid=\"center\">Center</Center>);\n    const center = screen.getByTestId(\"center\");\n\n    // assert\n    expect(center).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <Center data-testid=\"center\" as=\"span\">\n        Center\n      </Center>\n    ));\n    const center = screen.getByTestId(\"center\");\n\n    // assert\n    expect(center).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"Center\";\n\n    // act\n    renderWithHopeProvider(() => <Center data-testid=\"center\">{children}</Center>);\n    const center = screen.getByTestId(\"center\");\n\n    // assert\n    expect(center).toHaveTextContent(children);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <Center data-testid=\"center\">Center</Center>);\n    const center = screen.getByTestId(\"center\");\n\n    // assert\n    expect(center).toHaveClass(\"hope-center\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(Center.toString()).toBe(\".hope-center\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Center data-testid=\"center\" class={stubClass}>\n        Center\n      </Center>\n    ));\n    const center = screen.getByTestId(\"center\");\n\n    // assert\n    expect(center).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <Center data-testid=\"center\" className={stubClass}>\n        Center\n      </Center>\n    ));\n    const center = screen.getByTestId(\"center\");\n\n    // assert\n    expect(center).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Center data-testid=\"center\" classList={{ [stubClass]: true }}>\n        Center\n      </Center>\n    ));\n    const center = screen.getByTestId(\"center\");\n\n    // assert\n    expect(center).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from centerStyles\", () => {\n    // arrange\n    const centerClass = centerStyles();\n\n    // act\n    renderWithHopeProvider(() => <Center data-testid=\"center\">Center</Center>);\n    const center = screen.getByTestId(\"center\");\n\n    // assert\n    expect(center).toHaveClass(centerClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/center/center.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { centerStyles } from \"./center.styles\";\n\nexport type CenterProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeCenterClass = \"hope-center\";\n\n/**\n * Center is a layout component that centers its child within itself.\n */\nexport function Center<C extends ElementType = \"div\">(props: CenterProps<C>) {\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeCenterClass, centerStyles());\n\n  return <Box class={classes()} {...others} />;\n}\n\nCenter.toString = () => createClassSelector(hopeCenterClass);\n"
  },
  {
    "path": "packages/solid/src/components/center/index.ts",
    "content": "export * from \"./center\";\nexport * from \"./center.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/checkbox/checkbox-group.tsx",
    "content": "import { createContext, createUniqueId, JSX, splitProps, useContext } from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { ThemeableCheckboxOptions } from \"./checkbox\";\n\ntype CheckboxGroupValue = (string | number)[];\n\ninterface CheckboxGroupOptions extends ThemeableCheckboxOptions {\n  /**\n   * The `name` attribute forwarded to each `checkbox` element\n   */\n  name?: string;\n\n  /**\n   * The value of the checkbox group.\n   * (in controlled mode)\n   */\n  value?: CheckboxGroupValue;\n\n  /**\n   * The initial value of the checkbox group.\n   * (in uncontrolled mode)\n   */\n  defaultValue?: CheckboxGroupValue;\n\n  /**\n   * If `true`, all wrapped checkbox inputs will be marked as required,\n   * and `required` attribute will be added.\n   */\n  required?: boolean;\n\n  /**\n   * If `true`, all wrapped checkbox inputs will be disabled.\n   */\n  disabled?: boolean;\n\n  /**\n   * If `true`, all wrapped checkbox inputs will have `aria-invalid` set to `true`.\n   */\n  invalid?: boolean;\n\n  /**\n   * If `true`, all wrapped checkbox inputs will be readonly.\n   */\n  readOnly?: boolean;\n\n  /**\n   * The children of the CheckboxGroup.\n   */\n  children?: JSX.Element;\n\n  /**\n   * Callback invoked once a checkbox is checked.\n   * @param value the value of the checked checkbox\n   */\n  onChange?: (value: CheckboxGroupValue) => void;\n}\n\nexport type CheckboxGroupProps<C extends ElementType = \"div\"> = HTMLHopeProps<\n  C,\n  CheckboxGroupOptions\n>;\n\ninterface CheckboxGroupState extends Omit<CheckboxGroupProps, \"name\" | \"onChange\"> {\n  /**\n   * The `name` attribute forwarded to each `radio` element.\n   */\n  name: string;\n\n  /**\n   * The value of the radio to be `checked`.\n   * (in uncontrolled mode)\n   */\n  _value: CheckboxGroupValue;\n\n  /**\n   * If `true`, the radio group is in controlled mode.\n   * (have value and onChange props)\n   */\n  isControlled: boolean;\n}\n\nconst hopeCheckboxGroupClass = \"hope-checkbox__group\";\n\nexport function CheckboxGroup<C extends ElementType = \"div\">(props: CheckboxGroupProps<C>) {\n  const defaultName = `hope-checkbox-group-${createUniqueId()}--checkbox`;\n\n  const theme = useStyleConfig().Checkbox;\n\n  const [state, setState] = createStore<CheckboxGroupState>({\n    // eslint-disable-next-line solid/reactivity\n    _value: props.defaultValue ?? [],\n    get isControlled() {\n      return props.value !== undefined;\n    },\n    get value() {\n      return this.isControlled ? props.value : this._value;\n    },\n    get name() {\n      return props.name ?? defaultName;\n    },\n    get required() {\n      return props.required;\n    },\n    get disabled() {\n      return props.disabled;\n    },\n    get invalid() {\n      return props.invalid;\n    },\n    get readOnly() {\n      return props.readOnly;\n    },\n    get variant() {\n      return props.variant ?? theme?.defaultProps?.group?.variant;\n    },\n    get colorScheme() {\n      return props.colorScheme ?? theme?.defaultProps?.group?.colorScheme;\n    },\n    get size() {\n      return props.size ?? theme?.defaultProps?.group?.size;\n    },\n    get labelPlacement() {\n      return props.labelPlacement ?? theme?.defaultProps?.group?.labelPlacement;\n    },\n  });\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  const [local, _, others] = splitProps(\n    props,\n    [\"class\", \"onChange\"],\n    [\"value\", \"defaultValue\", \"name\", \"required\", \"disabled\", \"readOnly\", \"invalid\"]\n  );\n\n  const onChange: JSX.EventHandlerUnion<HTMLInputElement, Event> = event => {\n    if (!state.value) {\n      return;\n    }\n\n    const target = event.target as HTMLInputElement;\n\n    const nextValue: CheckboxGroupValue = target.checked\n      ? [...state.value, target.value]\n      : state.value.filter(val => String(val) !== String(target.value));\n\n    setState(\"_value\", nextValue);\n\n    local.onChange?.(nextValue);\n  };\n\n  const classes = () => classNames(local.class, hopeCheckboxGroupClass);\n\n  const context: CheckboxGroupContextValue = {\n    state: state as CheckboxGroupState,\n    onChange,\n  };\n\n  return (\n    <CheckboxGroupContext.Provider value={context}>\n      <Box class={classes()} __baseStyle={theme?.baseStyle?.group} {...others} />\n    </CheckboxGroupContext.Provider>\n  );\n}\n\nCheckboxGroup.toString = () => createClassSelector(hopeCheckboxGroupClass);\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ninterface CheckboxGroupContextValue {\n  state: CheckboxGroupState;\n\n  /**\n   * The callback invoked when the checked state of the `Checkbox` in `CheckboxGroup` changes.\n   */\n  onChange: JSX.EventHandlerUnion<HTMLInputElement, Event>;\n}\n\nconst CheckboxGroupContext = createContext<CheckboxGroupContextValue>();\n\nexport function useCheckboxGroupContext() {\n  return useContext(CheckboxGroupContext);\n}\n"
  },
  {
    "path": "packages/solid/src/components/checkbox/checkbox-primitive-indicator.tsx",
    "content": "import { Show } from \"solid-js\";\n\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useCheckboxPrimitiveContext } from \"./checkbox-primitive\";\n\nexport type CheckboxPrimitiveIndicatorProps<C extends ElementType = \"span\"> = HTMLHopeProps<C>;\n\n/**\n * Renders when the checkbox primitive is in a checked or indeterminate state.\n * You can style this element directly, or you can use it as a wrapper to put an icon into, or both.\n */\nexport function CheckboxPrimitiveIndicator<C extends ElementType = \"span\">(\n  props: CheckboxPrimitiveIndicatorProps<C>\n) {\n  const checkboxPrimitiveContext = useCheckboxPrimitiveContext();\n\n  return (\n    <Show\n      when={checkboxPrimitiveContext.state.checked || checkboxPrimitiveContext.state.indeterminate}\n    >\n      <hope.span\n        aria-hidden={true}\n        data-indeterminate={checkboxPrimitiveContext.state[\"data-indeterminate\"]}\n        data-focus={checkboxPrimitiveContext.state[\"data-focus\"]}\n        data-checked={checkboxPrimitiveContext.state[\"data-checked\"]}\n        data-required={checkboxPrimitiveContext.state[\"data-required\"]}\n        data-disabled={checkboxPrimitiveContext.state[\"data-disabled\"]}\n        data-invalid={checkboxPrimitiveContext.state[\"data-invalid\"]}\n        data-readonly={checkboxPrimitiveContext.state[\"data-readonly\"]}\n        {...props}\n      />\n    </Show>\n  );\n}\n"
  },
  {
    "path": "packages/solid/src/components/checkbox/checkbox-primitive.tsx",
    "content": "import {\n  Accessor,\n  createContext,\n  createUniqueId,\n  JSX,\n  Show,\n  splitProps,\n  useContext,\n} from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { visuallyHiddenStyles } from \"../../styled-system/utils\";\nimport { isFunction } from \"../../utils/assertion\";\nimport { classNames } from \"../../utils/css\";\nimport { callHandler, chainHandlers } from \"../../utils/function\";\nimport { hope } from \"../factory\";\nimport { useFormControlContext } from \"../form-control/form-control\";\nimport { useFormControl } from \"../form-control/use-form-control\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useCheckboxGroupContext } from \"./checkbox-group\";\n\ntype CheckboxPrimitiveChildrenRenderProp = (props: {\n  state: Accessor<CheckboxPrimitiveState>;\n}) => JSX.Element;\n\ninterface CheckboxPrimitiveOptions {\n  /**\n   * The ref to be passed to the internal <input> tag.\n   */\n  ref?: HTMLInputElement | ((el: HTMLInputElement) => void);\n\n  /**\n   * The id to be passed to the internal <input> tag.\n   */\n  id?: string;\n\n  /**\n   * The css class to be passed to the internal <input> tag.\n   */\n  inputClass?: string;\n\n  /**\n   * The name to be passed to the internal <input> tag.\n   */\n  name?: string;\n\n  /**\n   * The value to be used in the checkbox input.\n   * This is the value that will be returned on form submission.\n   */\n  value?: string | number;\n\n  /**\n   * If `true`, the checkbox will be checked.\n   * You'll need to pass `onChange` to update its value (since it is now controlled)\n   */\n  checked?: boolean;\n\n  /**\n   * If `true`, the checkbox will be initially checked.\n   */\n  defaultChecked?: boolean;\n\n  /**\n   * If `true`, the checkbox will be indeterminate.\n   * This only affects the icon shown inside checkbox\n   * and does not modify the checked property.\n   */\n  indeterminate?: boolean;\n\n  /**\n   * If `true`, the checkbox input is marked as required,\n   * and `required` attribute will be added\n   */\n  required?: boolean;\n\n  /**\n   * If `true`, the checkbox will be disabled\n   */\n  disabled?: boolean;\n\n  /**\n   * If `true`, the input will have `aria-invalid` set to `true`\n   */\n  invalid?: boolean;\n\n  /**\n   * If `true`, the checkbox will be readonly\n   */\n  readOnly?: boolean;\n\n  /**\n   * The children of the checkbox.\n   */\n  children?: JSX.Element | CheckboxPrimitiveChildrenRenderProp;\n\n  /**\n   * The callback invoked when the checked state of the checkbox changes.\n   */\n  onChange?: JSX.EventHandlerUnion<HTMLInputElement, Event>;\n\n  /**\n   * The callback invoked when the checkbox is focused\n   */\n  onFocus?: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>;\n\n  /**\n   * The callback invoked when the checkbox is blurred (loses focus)\n   */\n  onBlur?: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>;\n}\n\nexport type CheckboxPrimitiveProps<C extends ElementType = \"label\"> = HTMLHopeProps<\n  C,\n  CheckboxPrimitiveOptions\n>;\n\nexport interface CheckboxPrimitiveState {\n  /**\n   * The `checked` state of the checkbox.\n   * (In uncontrolled mode)\n   */\n  _checked: boolean;\n\n  /**\n   * If `true`, the checkbox is in controlled mode.\n   * (have checked and onChange props)\n   */\n  isControlled: boolean;\n\n  /**\n   * If `true`, the checkbox is currently focused.\n   */\n  isFocused: boolean;\n\n  /**\n   * The `checked` state of the checkbox.\n   * (In controlled mode)\n   */\n  checked: boolean;\n\n  /**\n   * The value to be used in the checkbox input.\n   * This is the value that will be returned on form submission.\n   */\n  value?: string | number;\n\n  /**\n   * The id of the input field in a checkbox.\n   */\n  id?: string;\n\n  /**\n   * The name of the input field in a checkbox.\n   */\n  name?: string;\n\n  /**\n   * If `true`, the checkbox input is marked as required,\n   * and `required` attribute will be added\n   */\n  required?: boolean;\n\n  /**\n   * If `true`, the checkbox will be indeterminate.\n   * This only affects the icon shown inside checkbox\n   * and does not modify the checked property.\n   */\n  indeterminate?: boolean;\n\n  /**\n   * If `true`, the checkbox will be disabled\n   */\n  disabled?: boolean;\n\n  /**\n   * If `true`, the input will have `aria-invalid` set to `true`\n   */\n  invalid?: boolean;\n\n  /**\n   * If `true`, the checkbox will be readonly\n   */\n  readOnly?: boolean;\n\n  \"aria-required\"?: boolean;\n  \"aria-disabled\"?: boolean;\n  \"aria-invalid\"?: boolean;\n  \"aria-readonly\"?: boolean;\n  \"aria-label\"?: string;\n  \"aria-labelledby\"?: string;\n  \"aria-describedby\"?: string;\n\n  \"data-indeterminate\"?: string;\n  \"data-focus\"?: string;\n  \"data-checked\"?: string;\n  \"data-required\"?: string;\n  \"data-disabled\"?: string;\n  \"data-invalid\"?: string;\n  \"data-readonly\"?: string;\n}\n\n/**\n * Contains all the parts of a checkbox.\n * It renders a `label` with a visualy hidden `input[type=checkbox]`.\n * You can style this element directly, or you can use it as a wrapper to put other components into, or both.\n */\nexport function CheckboxPrimitive<C extends ElementType = \"label\">(\n  props: CheckboxPrimitiveProps<C>\n) {\n  const defaultId = `hope-checkbox-${createUniqueId()}`;\n\n  const formControlContext = useFormControlContext();\n  const checkboxGroupContext = useCheckboxGroupContext();\n\n  const formControlProps = useFormControl<HTMLInputElement>(props);\n\n  const [state, setState] = createStore<CheckboxPrimitiveState>({\n    // eslint-disable-next-line solid/reactivity\n    _checked: !!props.defaultChecked,\n    isFocused: false,\n    get isControlled() {\n      return props.checked !== undefined;\n    },\n    get checked() {\n      if (checkboxGroupContext) {\n        const checkboxGroupValue = checkboxGroupContext.state.value;\n        return checkboxGroupValue != null\n          ? checkboxGroupValue.some(val => String(props.value) === String(val))\n          : false;\n      }\n\n      // Not in CheckboxGroup\n      return this.isControlled ? !!props.checked : this._checked;\n    },\n    get id() {\n      if (formControlContext && !checkboxGroupContext) {\n        return formControlProps.id;\n      }\n\n      return props.id ?? defaultId;\n    },\n    get name() {\n      return props.name ?? checkboxGroupContext?.state.name;\n    },\n    get value() {\n      return props.value;\n    },\n    get indeterminate() {\n      return props.indeterminate;\n    },\n    get required() {\n      return formControlProps.required ?? checkboxGroupContext?.state.required;\n    },\n    get disabled() {\n      return formControlProps.disabled ?? checkboxGroupContext?.state.disabled;\n    },\n    get invalid() {\n      return formControlProps.invalid ?? checkboxGroupContext?.state.invalid;\n    },\n    get readOnly() {\n      return formControlProps.readOnly ?? checkboxGroupContext?.state.readOnly;\n    },\n    get [\"aria-required\"]() {\n      return this.required ? true : undefined;\n    },\n    get [\"aria-disabled\"]() {\n      return this.disabled ? true : undefined;\n    },\n    get [\"aria-invalid\"]() {\n      return this.invalid ? true : undefined;\n    },\n    get [\"aria-readonly\"]() {\n      return this.readOnly ? true : undefined;\n    },\n    get [\"aria-label\"]() {\n      return props[\"aria-label\"];\n    },\n    get [\"aria-labelledby\"]() {\n      return props[\"aria-labelledby\"];\n    },\n    get [\"aria-describedby\"]() {\n      return props[\"aria-describedby\"];\n    },\n    get [\"data-indeterminate\"]() {\n      return this.indeterminate ? \"\" : undefined;\n    },\n    get [\"data-focus\"]() {\n      return this.isFocused ? \"\" : undefined;\n    },\n    get [\"data-checked\"]() {\n      return this.checked ? \"\" : undefined;\n    },\n    get [\"data-required\"]() {\n      return this.required ? \"\" : undefined;\n    },\n    get [\"data-disabled\"]() {\n      return this.disabled ? \"\" : undefined;\n    },\n    get [\"data-invalid\"]() {\n      return this.invalid ? \"\" : undefined;\n    },\n    get [\"data-readonly\"]() {\n      return this.readOnly ? \"\" : undefined;\n    },\n  });\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  const [local, _, others] = splitProps(\n    props as CheckboxPrimitiveProps<\"label\">,\n    [\"inputClass\", \"children\", \"ref\", \"tabIndex\", \"onChange\"],\n    [\n      \"id\",\n      \"name\",\n      \"value\",\n      \"indeterminate\",\n      \"checked\",\n      \"defaultChecked\",\n      \"required\",\n      \"disabled\",\n      \"invalid\",\n      \"readOnly\",\n      \"onFocus\",\n      \"onBlur\",\n    ]\n  );\n\n  const onChange: JSX.EventHandlerUnion<HTMLInputElement, Event> = event => {\n    if (state.readOnly || state.disabled) {\n      event.preventDefault();\n      return;\n    }\n\n    if (!state.isControlled) {\n      const target = event.target as HTMLInputElement;\n      setState(\"_checked\", target.checked);\n    }\n\n    chainHandlers(checkboxGroupContext?.onChange, local.onChange)(event);\n  };\n\n  const onFocus: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent> = event => {\n    setState(\"isFocused\", true);\n    callHandler(formControlProps.onFocus, event);\n  };\n\n  const onBlur: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent> = event => {\n    setState(\"isFocused\", false);\n    callHandler(formControlProps.onBlur, event);\n  };\n\n  const inputClasses = () => classNames(local.inputClass, visuallyHiddenStyles());\n\n  const stateAccessor = () => state;\n\n  const context: CheckboxPrimitiveContextValue = {\n    state,\n  };\n\n  return (\n    <CheckboxPrimitiveContext.Provider value={context}>\n      <hope.label\n        for={state.id}\n        data-group\n        data-indeterminate={state[\"data-indeterminate\"]}\n        data-focus={state[\"data-focus\"]}\n        data-checked={state[\"data-checked\"]}\n        data-required={state[\"data-required\"]}\n        data-disabled={state[\"data-disabled\"]}\n        data-invalid={state[\"data-invalid\"]}\n        data-readonly={state[\"data-readonly\"]}\n        {...others}\n      >\n        <input\n          type=\"checkbox\"\n          class={inputClasses()}\n          ref={local.ref}\n          tabIndex={local.tabIndex}\n          value={state.value}\n          id={state.id}\n          name={state.name}\n          checked={state.checked}\n          required={state.required}\n          disabled={state.disabled}\n          readOnly={state.readOnly}\n          onChange={onChange}\n          onFocus={onFocus}\n          onBlur={onBlur}\n          aria-required={state[\"aria-required\"]}\n          aria-disabled={state[\"aria-disabled\"]}\n          aria-invalid={state[\"aria-invalid\"]}\n          aria-readonly={state[\"aria-readonly\"]}\n          aria-label={state[\"aria-label\"]}\n          aria-labelledby={state[\"aria-labelledby\"]}\n          aria-describedby={state[\"aria-describedby\"]}\n        />\n        <Show when={isFunction(local.children)} fallback={local.children as JSX.Element}>\n          {(local.children as CheckboxPrimitiveChildrenRenderProp)?.({ state: stateAccessor })}\n        </Show>\n      </hope.label>\n    </CheckboxPrimitiveContext.Provider>\n  );\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ninterface CheckboxPrimitiveContextValue {\n  state: CheckboxPrimitiveState;\n}\n\nconst CheckboxPrimitiveContext = createContext<CheckboxPrimitiveContextValue>();\n\nexport function useCheckboxPrimitiveContext() {\n  const context = useContext(CheckboxPrimitiveContext);\n\n  if (!context) {\n    throw new Error(\n      \"[Hope UI]: useCheckboxPrimitiveContext must be used within a `<CheckboxPrimitive />` component\"\n    );\n  }\n\n  return context;\n}\n"
  },
  {
    "path": "packages/solid/src/components/checkbox/checkbox.stories.tsx",
    "content": "import { createSignal } from \"solid-js\";\n\nimport { Button } from \"..\";\nimport { HStack, VStack } from \"../stack/stack\";\nimport { HopeWrapper } from \"../storybook-utils\";\nimport { Checkbox } from \"./checkbox\";\nimport { CheckboxGroup } from \"./checkbox-group\";\n\nexport default {\n  title: \"Data entry/Checkbox\",\n  component: Checkbox,\n  parameters: { layout: \"centered\" },\n  decorators: [\n    (Story: any) => (\n      <HopeWrapper>\n        <Story />\n      </HopeWrapper>\n    ),\n  ],\n  argTypes: {\n    variant: {\n      control: { type: \"select\" },\n      options: [\"outline\", \"filled\"],\n    },\n    colorScheme: {\n      control: { type: \"select\" },\n      options: [\"primary\", \"neutral\", \"success\", \"info\", \"warning\", \"danger\"],\n    },\n    size: {\n      control: { type: \"select\" },\n      options: [\"sm\", \"md\", \"lg\"],\n    },\n    indeterminate: {\n      control: { type: \"boolean\" },\n    },\n    invalid: {\n      control: { type: \"boolean\" },\n    },\n    disabled: {\n      control: { type: \"boolean\" },\n    },\n    required: {\n      control: { type: \"boolean\" },\n    },\n    readOnly: {\n      control: { type: \"boolean\" },\n    },\n  },\n  args: {\n    variant: \"outline\",\n    colorScheme: \"primary\",\n    size: \"md\",\n    indeterminate: false,\n    invalid: false,\n    disabled: false,\n    required: false,\n    readOnly: false,\n  },\n};\n\nexport const Default = (args: any) => {\n  const [checked, setChecked] = createSignal(false);\n\n  const onChange = (event: Event) => {\n    setChecked((event.target as HTMLInputElement).checked);\n  };\n\n  return (\n    <VStack spacing=\"$5\">\n      <Button onClick={() => setChecked(prev => !prev)}>\n        Toggle controlled checkbox ({checked().toString()})\n      </Button>\n      <HStack spacing=\"$5\">\n        <Checkbox {...args} checked={checked()} onChange={onChange}>\n          Controlled\n        </Checkbox>\n        <Checkbox {...args}>Uncontrolled</Checkbox>\n      </HStack>\n    </VStack>\n  );\n};\n\nexport const WithCheckboxGroup = (args: any) => {\n  const [fruits, setFruits] = createSignal([\"orange\"]);\n\n  const onChange = (value: string[]) => {\n    setFruits(value);\n  };\n\n  return (\n    <VStack spacing=\"$5\">\n      <Button onClick={() => setFruits([\"apple\"])}>\n        Select Apple (current: {JSON.stringify(fruits())})\n      </Button>\n      <CheckboxGroup name=\"fruit\" onChange={onChange} value={fruits()} {...args}>\n        <HStack spacing=\"$5\">\n          <Checkbox value=\"peach\">Peach</Checkbox>\n          <Checkbox value=\"apple\">Apple</Checkbox>\n          <Checkbox value=\"orange\">Orange</Checkbox>\n        </HStack>\n      </CheckboxGroup>\n      <CheckboxGroup defaultValue={[\"apple\"]} {...args}>\n        <HStack spacing=\"$5\">\n          <Checkbox value=\"peach\">Peach</Checkbox>\n          <Checkbox value=\"apple\">Apple</Checkbox>\n          <Checkbox value=\"orange\">Orange</Checkbox>\n        </HStack>\n      </CheckboxGroup>\n    </VStack>\n  );\n};\nWithCheckboxGroup.storyName = \"With CheckboxGroup\";\n"
  },
  {
    "path": "packages/solid/src/components/checkbox/checkbox.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css } from \"../../styled-system/stitches.config\";\nimport { SystemStyleObject } from \"../../styled-system/types\";\n\n/* -------------------------------------------------------------------------------------------------\n * Toggle - base style for checkbox, radio and switch\n * -----------------------------------------------------------------------------------------------*/\n\ninterface ColorVariantConfig {\n  color: string;\n  boxShadowColorFocus: string;\n  borderColorFocus: string;\n}\n\nfunction createColorVariant(config: ColorVariantConfig): SystemStyleObject {\n  return {\n    color: config.color,\n\n    \"&[data-disabled]\": {\n      color: \"$neutral10\",\n    },\n\n    \"&[data-focus]\": {\n      boxShadow: `0 0 0 3px $colors${config.boxShadowColorFocus}`,\n      borderColor: config.borderColorFocus,\n    },\n  };\n}\n\nexport const toggleWrapperStyles = css({\n  position: \"relative\",\n  display: \"inline-flex\",\n  alignItems: \"center\",\n  gap: \"$2\",\n\n  cursor: \"pointer\",\n  userSelect: \"none\",\n\n  \"&[data-disabled]\": {\n    opacity: \"0.5\",\n    cursor: \"not-allowed\",\n  },\n\n  variants: {\n    size: {\n      sm: {\n        fontSize: \"$sm\",\n        lineHeight: \"$5\",\n      },\n      md: {\n        fontSize: \"$base\",\n        lineHeight: \"$6\",\n      },\n      lg: {\n        fontSize: \"$lg\",\n        lineHeight: \"$7\",\n      },\n    },\n  },\n});\n\nexport const toggleControlLabelStyles = css({\n  cursor: \"pointer\",\n  userSelect: \"none\",\n\n  \"&[data-disabled]\": {\n    opacity: \"0.5\",\n    cursor: \"not-allowed\",\n  },\n});\n\nexport const toggleControlStyles = css({\n  position: \"relative\",\n  display: \"inline-flex\",\n  alignItems: \"center\",\n  justifyContent: \"center\",\n  flexShrink: 0,\n\n  height: \"100%\",\n\n  outline: \"none\",\n\n  padding: 0,\n\n  verticalAlign: \"middle\",\n  cursor: \"pointer\",\n  userSelect: \"none\",\n  transition: \"border-color 250ms, box-shadow 250ms\",\n\n  \"&[data-disabled]\": {\n    opacity: \"0.5\",\n    cursor: \"not-allowed\",\n  },\n\n  \"&[data-invalid]\": {\n    borderColor: \"$danger8\",\n    color: \"$danger9\",\n  },\n\n  \"&[data-focus][data-invalid]\": {\n    boxShadow: \"0 0 0 3px $colors$danger5\",\n    borderColor: \"$danger8\",\n  },\n\n  \"&[data-checked], &[data-focus][data-checked]\": {\n    borderColor: \"transparent\",\n    backgroundColor: \"currentColor\",\n  },\n\n  variants: {\n    variant: {\n      outline: {\n        border: \"1px solid $colors$neutral8\",\n        backgroundColor: \"transparent\",\n      },\n      filled: {\n        border: \"1px solid transparent\",\n        backgroundColor: \"$neutral7\",\n      },\n    },\n    colorScheme: {\n      primary: createColorVariant({\n        color: \"$primary9\",\n        boxShadowColorFocus: \"$primary5\",\n        borderColorFocus: \"$primary8\",\n      }),\n      accent: createColorVariant({\n        color: \"$accent9\",\n        boxShadowColorFocus: \"$accent5\",\n        borderColorFocus: \"$accent8\",\n      }),\n      neutral: createColorVariant({\n        color: \"$neutral9\",\n        boxShadowColorFocus: \"$neutral5\",\n        borderColorFocus: \"$neutral8\",\n      }),\n      success: createColorVariant({\n        color: \"$success9\",\n        boxShadowColorFocus: \"$success5\",\n        borderColorFocus: \"$success8\",\n      }),\n      info: createColorVariant({\n        color: \"$info9\",\n        boxShadowColorFocus: \"$info5\",\n        borderColorFocus: \"$info8\",\n      }),\n      warning: createColorVariant({\n        color: \"$warning9\",\n        boxShadowColorFocus: \"$warning5\",\n        borderColorFocus: \"$warning8\",\n      }),\n      danger: createColorVariant({\n        color: \"$danger9\",\n        boxShadowColorFocus: \"$danger5\",\n        borderColorFocus: \"$danger8\",\n      }),\n    },\n    size: {\n      sm: {\n        boxSize: \"$3\",\n      },\n      md: {\n        boxSize: \"$4\",\n      },\n      lg: {\n        boxSize: \"$5\",\n      },\n    },\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Checkbox - wrapper\n * -----------------------------------------------------------------------------------------------*/\n\nexport const checkboxWrapperStyles = css(toggleWrapperStyles, {\n  variants: {\n    labelPlacement: {\n      start: {\n        flexDirection: \"row-reverse\",\n      },\n      end: {\n        flexDirection: \"row\",\n      },\n    },\n  },\n});\n\nexport type CheckboxWrapperVariants = VariantProps<typeof checkboxWrapperStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * Checkbox - label\n * -----------------------------------------------------------------------------------------------*/\n\nexport const checkboxLabelStyles = css(toggleControlLabelStyles);\n\n/* -------------------------------------------------------------------------------------------------\n * Checkbox - control\n * -----------------------------------------------------------------------------------------------*/\n\nexport const checkboxControlStyles = css(toggleControlStyles, {\n  borderRadius: \"$sm\",\n\n  \"& svg\": {\n    color: \"$loContrast\",\n  },\n\n  \"&[data-indeterminate], &[data-focus][data-indeterminate]\": {\n    borderColor: \"transparent\",\n    backgroundColor: \"currentColor\",\n  },\n});\n\nexport type CheckboxControlVariants = VariantProps<typeof checkboxControlStyles>;\n"
  },
  {
    "path": "packages/solid/src/components/checkbox/checkbox.tsx",
    "content": "import { JSX, Match, mergeProps, Show, splitProps, Switch } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { SystemStyleObject } from \"../../styled-system/types\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { OverrideProps } from \"../../utils/types\";\nimport { hope } from \"../factory\";\nimport { createIcon } from \"../icon/create-icon\";\nimport { ElementType } from \"../types\";\nimport {\n  checkboxControlStyles,\n  CheckboxControlVariants,\n  checkboxLabelStyles,\n  checkboxWrapperStyles,\n  CheckboxWrapperVariants,\n} from \"./checkbox.styles\";\nimport { useCheckboxGroupContext } from \"./checkbox-group\";\nimport { CheckboxPrimitive, CheckboxPrimitiveProps } from \"./checkbox-primitive\";\n\nexport type ThemeableCheckboxOptions = CheckboxWrapperVariants & CheckboxControlVariants;\n\ninterface CheckboxOptions extends ThemeableCheckboxOptions {\n  /**\n   * The checked icon to use.\n   */\n  iconChecked?: JSX.Element;\n\n  /**\n   * The indeterminate icon to use.\n   */\n  iconIndeterminate?: JSX.Element;\n\n  /**\n   * The children of the checkbox.\n   */\n  children?: JSX.Element;\n}\n\nexport type CheckboxProps<C extends ElementType = \"label\"> = OverrideProps<\n  CheckboxPrimitiveProps<C>,\n  CheckboxOptions\n>;\n\nconst hopeCheckboxClass = \"hope-checkbox\";\nconst hopeCheckboxInputClass = \"hope-checkbox__input\";\nconst hopeCheckboxControlClass = \"hope-checkbox__control\";\nconst hopeCheckboxLabelClass = \"hope-checkbox__label\";\n\n/**\n * Checkboxes allow users to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n */\nexport function Checkbox<C extends ElementType = \"label\">(props: CheckboxProps<C>) {\n  const theme = useStyleConfig().Checkbox;\n\n  const checkboxGroupContext = useCheckboxGroupContext();\n\n  const defaultProps: CheckboxProps<\"label\"> = {\n    variant:\n      checkboxGroupContext?.state?.variant ?? theme?.defaultProps?.root?.variant ?? \"outline\",\n    colorScheme:\n      checkboxGroupContext?.state?.colorScheme ??\n      theme?.defaultProps?.root?.colorScheme ??\n      \"primary\",\n    size: checkboxGroupContext?.state?.size ?? theme?.defaultProps?.root?.size ?? \"md\",\n    labelPlacement:\n      checkboxGroupContext?.state?.labelPlacement ??\n      theme?.defaultProps?.root?.labelPlacement ??\n      \"end\",\n  };\n\n  const propsWitDefault: CheckboxProps<\"label\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWitDefault, [\n    \"children\",\n    \"class\",\n    \"variant\",\n    \"colorScheme\",\n    \"size\",\n    \"labelPlacement\",\n    \"iconChecked\",\n    \"iconIndeterminate\",\n  ]);\n\n  const wrapperClasses = () => {\n    return classNames(\n      local.class,\n      hopeCheckboxClass,\n      checkboxWrapperStyles({\n        size: local.size,\n        labelPlacement: local.labelPlacement,\n      })\n    );\n  };\n\n  const controlClasses = () => {\n    return classNames(\n      hopeCheckboxControlClass,\n      checkboxControlStyles({\n        variant: local.variant,\n        colorScheme: local.colorScheme,\n        size: local.size,\n      })\n    );\n  };\n\n  const labelClasses = () => {\n    return classNames(hopeCheckboxLabelClass, checkboxLabelStyles());\n  };\n\n  return (\n    <CheckboxPrimitive\n      class={wrapperClasses()}\n      inputClass={hopeCheckboxInputClass}\n      __baseStyle={theme?.baseStyle?.root}\n      {...others}\n    >\n      {({ state }) => (\n        <>\n          <hope.span\n            aria-hidden={true}\n            class={controlClasses()}\n            __baseStyle={theme?.baseStyle?.control}\n            data-indeterminate={state()[\"data-indeterminate\"]}\n            data-focus={state()[\"data-focus\"]}\n            data-checked={state()[\"data-checked\"]}\n            data-required={state()[\"data-required\"]}\n            data-disabled={state()[\"data-disabled\"]}\n            data-invalid={state()[\"data-invalid\"]}\n            data-readonly={state()[\"data-readonly\"]}\n          >\n            <Switch>\n              <Match when={state().indeterminate}>\n                <Show when={local.iconIndeterminate} fallback={<CheckboxIconIndeterminate />}>\n                  {local.iconIndeterminate}\n                </Show>\n              </Match>\n              <Match when={state().checked && !state().indeterminate}>\n                <Show when={local.iconChecked} fallback={<CheckboxIconCheck />}>\n                  {local.iconChecked}\n                </Show>\n              </Match>\n            </Switch>\n          </hope.span>\n          <hope.span\n            class={labelClasses()}\n            __baseStyle={theme?.baseStyle?.label}\n            data-indeterminate={state()[\"data-indeterminate\"]}\n            data-focus={state()[\"data-focus\"]}\n            data-checked={state()[\"data-checked\"]}\n            data-required={state()[\"data-required\"]}\n            data-disabled={state()[\"data-disabled\"]}\n            data-invalid={state()[\"data-invalid\"]}\n            data-readonly={state()[\"data-readonly\"]}\n          >\n            {local.children}\n          </hope.span>\n        </>\n      )}\n    </CheckboxPrimitive>\n  );\n}\n\nCheckbox.toString = () => createClassSelector(hopeCheckboxClass);\n\n/* -------------------------------------------------------------------------------------------------\n * StyleConfig\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface CheckboxStyleConfig {\n  baseStyle?: {\n    root?: SystemStyleObject;\n    group?: SystemStyleObject;\n    control?: SystemStyleObject;\n    label?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: ThemeableCheckboxOptions;\n    group?: ThemeableCheckboxOptions;\n  };\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Icons\n * -----------------------------------------------------------------------------------------------*/\n\n// A thicker version of radix-icon-check\nconst CheckboxIconCheck = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z\"\n      fill=\"currentColor\"\n      stroke=\"currentColor\"\n      stroke-width=\"1\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n\n// A thicker version of radix-icon-minus\nconst CheckboxIconIndeterminate = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M2.25 7.5C2.25 7.22386 2.47386 7 2.75 7H12.25C12.5261 7 12.75 7.22386 12.75 7.5C12.75 7.77614 12.5261 8 12.25 8H2.75C2.47386 8 2.25 7.77614 2.25 7.5Z\"\n      fill=\"currentColor\"\n      stroke=\"currentColor\"\n      stroke-width=\"1\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "packages/solid/src/components/checkbox/index.ts",
    "content": "export * from \"./checkbox\";\nexport * from \"./checkbox.styles\";\nexport * from \"./checkbox-group\";\nexport * from \"./checkbox-primitive\";\nexport * from \"./checkbox-primitive-indicator\";\n"
  },
  {
    "path": "packages/solid/src/components/circular-progress/circular-progress-indicator.tsx",
    "content": "import { mergeProps, splitProps } from \"solid-js\";\n\nimport { ColorProps } from \"../../styled-system/props/color\";\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { HTMLHopeProps } from \"../types\";\nimport { useCircularProgressContext } from \"./circular-progress\";\nimport {\n  circularProgressIndicatorContainerStyles,\n  circularProgressIndicatorStyles,\n} from \"./circular-progress.styles\";\n\nexport interface ThemeableCircularProgressIndicatorOptions {\n  /**\n   * The stroke color of the progress indicator.\n   */\n  color?: ColorProps[\"color\"];\n\n  /**\n   * If `true`, the caps of the progress indicator will be rounded.\n   */\n  withRoundCaps?: boolean;\n}\n\ntype CircularProgressIndicatorOptions = ThemeableCircularProgressIndicatorOptions;\n\ntype CircularProgressIndicatorProps = HTMLHopeProps<\"svg\", CircularProgressIndicatorOptions>;\n\nconst hopeCircularProgressIndicatorClass = \"hope-circular-progress__indicator\";\n\n/**\n * ProgressIndicator (Circular)\n *\n * The progress component that visually indicates the current level of the circular progress bar.\n */\nexport function CircularProgressIndicator(props: CircularProgressIndicatorProps) {\n  const theme = useStyleConfig().CircularProgress;\n\n  const circularProgressContext = useCircularProgressContext();\n\n  const defaultProps: CircularProgressIndicatorProps = {\n    color: theme?.defaultProps?.indicator?.color ?? \"$primary9\",\n    withRoundCaps: theme?.defaultProps?.indicator?.withRoundCaps ?? false,\n  };\n\n  const propsWithDefault: CircularProgressIndicatorProps = mergeProps(defaultProps, props);\n\n  const [local, others] = splitProps(propsWithDefault, [\n    \"class\",\n    \"children\",\n    \"color\",\n    \"withRoundCaps\",\n  ]);\n\n  const strokeDasharray = () => {\n    if (circularProgressContext.state.indeterminate) {\n      return undefined;\n    }\n\n    const determinant = circularProgressContext.state.percent * 2.64;\n\n    return `${determinant} ${264 - determinant}`;\n  };\n\n  const rootClasses = () => {\n    return classNames(\n      local.class,\n      hopeCircularProgressIndicatorClass,\n      circularProgressIndicatorContainerStyles({\n        spin: circularProgressContext.state.indeterminate,\n      })\n    );\n  };\n\n  const indicatorClasses = () => {\n    return circularProgressIndicatorStyles({\n      hidden: !circularProgressContext.state.isIndicatorVisible,\n      indeterminate: circularProgressContext.state.indeterminate === true ? true : false, // ensure a boolean is passed so the `true/false` values works correctly\n      withRoundCaps: local.withRoundCaps,\n      css: {\n        color: local.color,\n        strokeWidth: circularProgressContext.state.thickness,\n        strokeDasharray: strokeDasharray(),\n      },\n    });\n  };\n\n  return (\n    <hope.svg\n      viewBox=\"0 0 100 100\"\n      class={rootClasses()}\n      boxSize={circularProgressContext.state.size}\n      {...others}\n    >\n      <hope.circle\n        cx={50}\n        cy={50}\n        r={42}\n        class={indicatorClasses()}\n        __baseStyle={theme?.baseStyle?.indicator}\n      />\n    </hope.svg>\n  );\n}\n\nCircularProgressIndicator.toString = () => createClassSelector(hopeCircularProgressIndicatorClass);\n"
  },
  {
    "path": "packages/solid/src/components/circular-progress/circular-progress-label.tsx",
    "content": "import { Show, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useCircularProgressContext } from \"./circular-progress\";\nimport { circularProgressLabelStyles } from \"./circular-progress.styles\";\n\nexport type CircularProgressLabelProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeCircularProgressLabelClass = \"hope-circular-progress__label\";\n\n/**\n * CircularProgressLabel is used to show the numeric value of the progress.\n */\nexport function CircularProgressLabel<C extends ElementType = \"div\">(\n  props: CircularProgressLabelProps<C>\n) {\n  const theme = useStyleConfig().CircularProgress;\n\n  const circularProgressContext = useCircularProgressContext();\n\n  const [local, others] = splitProps(props, [\"class\", \"children\"]);\n\n  const classes = () => {\n    return classNames(local.class, hopeCircularProgressLabelClass, circularProgressLabelStyles());\n  };\n\n  return (\n    <Box class={classes()} __baseStyle={theme?.baseStyle?.label} {...others}>\n      <Show when={local.children} fallback={circularProgressContext.state.ariaValueText}>\n        {local.children}\n      </Show>\n    </Box>\n  );\n}\n\nCircularProgressLabel.toString = () => createClassSelector(hopeCircularProgressLabelClass);\n"
  },
  {
    "path": "packages/solid/src/components/circular-progress/circular-progress.styles.ts",
    "content": "import { spin } from \"../../styled-system/keyframes\";\nimport { css, keyframes } from \"../../styled-system/stitches.config\";\n\n/* -------------------------------------------------------------------------------------------------\n * CircularProgress - keyframes\n * -----------------------------------------------------------------------------------------------*/\n\nexport const growAndShrink = keyframes({\n  \"0%\": {\n    strokeDasharray: \"1, 400\",\n    strokeDashoffset: \"0\",\n  },\n  \"50%\": {\n    strokeDasharray: \"400, 400\",\n    strokeDashoffset: \"-100\",\n  },\n  \"100%\": {\n    strokeDasharray: \"400, 400\",\n    strokeDashoffset: \"-260\",\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * CircularProgress\n * -----------------------------------------------------------------------------------------------*/\n\nexport const circularProgressStyles = css({\n  position: \"relative\",\n\n  display: \"inline-flex\",\n  alignItems: \"center\",\n  justifyContent: \"center\",\n\n  verticalAlign: \"middle\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * CircularProgress - track\n * -----------------------------------------------------------------------------------------------*/\n\nexport const circularProgressTrackStyles = css({\n  fill: \"transparent\",\n  stroke: \"currentColor\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * CircularProgress - svg container for the indicator\n * -----------------------------------------------------------------------------------------------*/\n\nexport const circularProgressIndicatorContainerStyles = css({\n  position: \"absolute\",\n  top: 0,\n  left: 0,\n\n  variants: {\n    spin: {\n      true: {\n        animation: `${spin} 2s linear infinite`,\n      },\n    },\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * CircularProgress - indicator\n * -----------------------------------------------------------------------------------------------*/\n\nexport const circularProgressIndicatorStyles = css({\n  fill: \"transparent\",\n  stroke: \"currentColor\",\n\n  opacity: 1,\n\n  variants: {\n    hidden: {\n      true: {\n        opacity: 0,\n      },\n    },\n    withRoundCaps: {\n      true: { strokeLinecap: \"round\" },\n    },\n    indeterminate: {\n      true: {\n        animation: `${growAndShrink} 2s linear infinite`,\n      },\n      false: {\n        strokeDashoffset: 66,\n        transitionProperty: \"stroke-dasharray, stroke, opacity\",\n        transitionDuration: \"600ms\",\n        transitionTimingFunction: \"ease\",\n      },\n    },\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * CircularProgress - label\n * -----------------------------------------------------------------------------------------------*/\n\nexport const circularProgressLabelStyles = css({\n  position: \"absolute\",\n  top: \"50%\",\n  left: \"50%\",\n\n  width: \"100%\",\n\n  color: \"$neutral12\",\n  fontSize: \"$xs\",\n  lineHeight: \"$none\",\n  fontWeight: \"$bold\",\n  textAlign: \"center\",\n\n  transform: \"translate(-50%, -50%)\",\n});\n"
  },
  {
    "path": "packages/solid/src/components/circular-progress/circular-progress.tsx",
    "content": "import { Property } from \"csstype\";\nimport { createContext, mergeProps, splitProps, useContext } from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { SizeScaleValue, SystemStyleObject } from \"../../styled-system\";\nimport { ColorProps } from \"../../styled-system/props/color\";\nimport { SizeProps } from \"../../styled-system/props/size\";\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { isFunction } from \"../../utils/assertion\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { valueToPercent } from \"../../utils/number\";\nimport { Box } from \"../box/box\";\nimport { hope } from \"../factory\";\nimport { ProgressState } from \"../progress/progress\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { circularProgressStyles, circularProgressTrackStyles } from \"./circular-progress.styles\";\nimport { ThemeableCircularProgressIndicatorOptions } from \"./circular-progress-indicator\";\n\ninterface CircularProgressState extends ProgressState {\n  /**\n   * The size of the circular progress.\n   */\n  size: SizeProps[\"boxSize\"];\n\n  /**\n   * The thickness of the circles.\n   */\n  thickness: Property.StrokeWidth<SizeScaleValue> | number;\n\n  /**\n   * If `true`, the circular progress indicator will be visible.\n   * Used to prevent showing the indicator when value is 0 in Safari.\n   */\n  isIndicatorVisible: boolean;\n}\n\ninterface CircularProgressOptions\n  extends Partial<Omit<CircularProgressState, \"percent\" | \"ariaValueText\" | \"isIndicatorVisible\">> {\n  /**\n   * The color of the circular progress track.\n   */\n  trackColor?: ColorProps[\"color\"];\n\n  /**\n   * The desired valueText to use in place of the value\n   */\n  valueText?: string;\n}\n\ntype ThemeableCircularProgressOptions = Pick<\n  CircularProgressOptions,\n  \"size\" | \"thickness\" | \"trackColor\"\n>;\n\nexport type CircularProgressProps<C extends ElementType = \"div\"> = HTMLHopeProps<\n  C,\n  CircularProgressOptions\n>;\n\nexport interface CircularProgressStyleConfig {\n  baseStyle?: {\n    root?: SystemStyleObject;\n    track?: SystemStyleObject;\n    indicator?: SystemStyleObject;\n    label?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: ThemeableCircularProgressOptions;\n    indicator?: ThemeableCircularProgressIndicatorOptions;\n  };\n}\n\ninterface CircularProgressContextValue {\n  state: CircularProgressState;\n}\n\nconst CircularProgressContext = createContext<CircularProgressContextValue>();\n\nconst hopeCircularProgressClass = \"hope-circular-progress\";\nconst hopeCircularProgressTrackClass = \"hope-circular-progress__track\";\n\n/**\n * Progress (Circular)\n *\n * CircularProgress is used to display the progress status for a task that takes a long\n * time or consists of several steps.\n *\n * It includes accessible attributes to help assistive technologies understand\n * and speak the progress values.\n */\nexport function CircularProgress<C extends ElementType = \"div\">(props: CircularProgressProps<C>) {\n  const theme = useStyleConfig().CircularProgress;\n\n  const [state] = createStore<CircularProgressState>({\n    get size() {\n      return props.size ?? theme?.defaultProps?.root?.size ?? \"$12\";\n    },\n    get thickness() {\n      return props.thickness ?? theme?.defaultProps?.root?.thickness ?? \"$2_5\";\n    },\n    get min() {\n      return props.min ?? 0;\n    },\n    get max() {\n      return props.max ?? 100;\n    },\n    get value() {\n      return props.value ?? 0;\n    },\n    get percent() {\n      return valueToPercent(this.value, this.min, this.max);\n    },\n    get indeterminate() {\n      return props.indeterminate ?? false;\n    },\n    get ariaValueText() {\n      if (this.indeterminate) {\n        return undefined;\n      }\n\n      if (isFunction(this.getValueText)) {\n        return this.getValueText(this.value, this.percent);\n      }\n\n      return props.valueText ?? `${this.percent}%`;\n    },\n    get getValueText() {\n      return props.getValueText;\n    },\n    get isIndicatorVisible() {\n      return this.value > 0 || this.indeterminate ? true : false;\n    },\n  });\n\n  const defaultProps: CircularProgressProps<\"div\"> = {\n    size: theme?.defaultProps?.root?.size ?? \"$12\",\n    thickness: theme?.defaultProps?.root?.thickness ?? \"$2_5\",\n    trackColor: theme?.defaultProps?.root?.trackColor ?? \"$neutral4\",\n  };\n\n  const propsWithDefaults: CircularProgressProps<\"div\"> = mergeProps(defaultProps, props);\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  const [local, _, others] = splitProps(\n    propsWithDefaults,\n    [\"class\", \"children\", \"trackColor\"],\n    [\"size\", \"thickness\", \"min\", \"max\", \"getValueText\"]\n  );\n\n  const rootClasses = () =>\n    classNames(local.class, hopeCircularProgressClass, circularProgressStyles());\n\n  const trackClasses = () => {\n    return classNames(\n      hopeCircularProgressTrackClass,\n      circularProgressTrackStyles({\n        css: {\n          color: local.trackColor,\n          strokeWidth: state.thickness,\n        },\n      })\n    );\n  };\n\n  const context: CircularProgressContextValue = {\n    state,\n  };\n\n  return (\n    <CircularProgressContext.Provider value={context}>\n      <Box\n        role=\"progressbar\"\n        data-indeterminate={state.indeterminate ? \"\" : undefined}\n        aria-valuemin={state.min}\n        aria-valuemax={state.max}\n        aria-valuenow={state.indeterminate ? undefined : state.value}\n        aria-valuetext={state.ariaValueText}\n        class={rootClasses()}\n        __baseStyle={theme?.baseStyle?.root}\n        {...others}\n      >\n        <hope.svg viewBox=\"0 0 100 100\" boxSize={state.size}>\n          <hope.circle\n            cx={50}\n            cy={50}\n            r={42}\n            class={trackClasses()}\n            __baseStyle={theme?.baseStyle?.track}\n          />\n        </hope.svg>\n        {local.children}\n      </Box>\n    </CircularProgressContext.Provider>\n  );\n}\n\nCircularProgress.toString = () => createClassSelector(hopeCircularProgressClass);\n\nexport function useCircularProgressContext() {\n  const context = useContext(CircularProgressContext);\n\n  if (!context) {\n    throw new Error(\n      \"[Hope UI]: useCircularProgressContext must be used within a `<CircularProgress />` component\"\n    );\n  }\n\n  return context;\n}\n"
  },
  {
    "path": "packages/solid/src/components/circular-progress/index.ts",
    "content": "export * from \"./circular-progress\";\nexport * from \"./circular-progress.styles\";\nexport * from \"./circular-progress-indicator\";\nexport * from \"./circular-progress-label\";\n"
  },
  {
    "path": "packages/solid/src/components/click-outside/click-outside.tsx",
    "content": "import { children, PropsWithChildren } from \"solid-js\";\n\nimport { useClickOutside } from \"../../hooks/use-click-outside\";\n\nexport type ClickOutsideProps = PropsWithChildren<{\n  /**\n   * Callback invoked when the user click outside.\n   */\n  onClickOutside: (event: Event) => void;\n}>;\n\n/**\n * Renderless component that manage outside click on its children.\n * It accepts one `JSX.Element` as children, no `Fragment`.\n */\nexport function ClickOutside(props: ClickOutsideProps) {\n  const resolvedChildren = children(() => props.children);\n\n  useClickOutside({\n    element: () => resolvedChildren() as HTMLElement,\n    handler: event => props.onClickOutside(event),\n  });\n\n  return resolvedChildren;\n}\n"
  },
  {
    "path": "packages/solid/src/components/click-outside/index.ts",
    "content": "export * from \"./click-outside\";\n"
  },
  {
    "path": "packages/solid/src/components/close-button/close-button.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css } from \"../../styled-system/stitches.config\";\n\nexport const closeButtonStyles = css({\n  appearance: \"none\",\n\n  display: \"flex\",\n  alignItems: \"center\",\n  justifyContent: \"center\",\n  flexShrink: 0,\n\n  outline: \"none\",\n\n  borderWidth: 0,\n  borderRadius: \"$sm\",\n  backgroundColor: \"transparent\",\n  padding: 0,\n\n  color: \"currentColor\",\n\n  cursor: \"pointer\",\n  userSelect: \"none\",\n  transition: \"color 250ms, background-color 250ms\",\n\n  \"&:disbaled\": {\n    opacity: \"0.5\",\n    cursor: \"not-allowed\",\n    boxShadow: \"none\",\n  },\n\n  \"&:hover\": {\n    backgroundColor: \"$closeButtonHoverBackground\",\n  },\n\n  \"&:active\": {\n    backgroundColor: \"$closeButtonActiveBackground\",\n  },\n\n  \"&:focus\": {\n    outline: \"none\",\n    boxShadow: \"$outline\",\n  },\n\n  variants: {\n    size: {\n      sm: {\n        boxSize: \"24px\",\n        fontSize: \"10px\",\n      },\n      md: {\n        boxSize: \"32px\",\n        fontSize: \"12px\",\n      },\n      lg: {\n        boxSize: \"40px\",\n        fontSize: \"16px\",\n      },\n    },\n  },\n});\n\nexport type CloseButtonVariants = VariantProps<typeof closeButtonStyles>;\n"
  },
  {
    "path": "packages/solid/src/components/close-button/close-button.tsx",
    "content": "import { JSX, mergeProps, Show, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { IconClose } from \"../icons/IconClose\";\nimport { ElementType, HTMLHopeProps, SinglePartComponentStyleConfig } from \"../types\";\nimport { closeButtonStyles, CloseButtonVariants } from \"./close-button.styles\";\n\nexport interface ThemeableCloseButtonOptions extends CloseButtonVariants {\n  /**\n   * A11y: A label that describes the button\n   */\n  \"aria-label\"?: string;\n\n  /**\n   * The icon to be used in the button.\n   */\n  icon?: JSX.Element;\n}\n\nexport type CloseButtonProps<C extends ElementType = \"button\"> = HTMLHopeProps<\n  C,\n  ThemeableCloseButtonOptions\n>;\n\nexport type CloseButtonStyleConfig = SinglePartComponentStyleConfig<ThemeableCloseButtonOptions>;\n\nconst hopeCloseButtonClass = \"hope-close-button\";\n\n/**\n * A button with a close icon.\n *\n * It is used to handle the close functionality in feedback and overlay components\n * like Alerts, Toasts, Drawers and Modals.\n */\nexport function CloseButton<C extends ElementType = \"button\">(props: CloseButtonProps<C>) {\n  const theme = useStyleConfig().CloseButton;\n\n  const defaultProps: CloseButtonProps<\"button\"> = {\n    \"aria-label\": theme?.defaultProps?.[\"aria-label\"] ?? \"Close\",\n    icon: theme?.defaultProps?.icon ?? <IconClose />,\n    size: theme?.defaultProps?.size ?? \"md\",\n  };\n\n  const propsWithDefaults = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefaults as CloseButtonProps<\"button\">, [\n    \"class\",\n    \"children\",\n    \"size\",\n    \"icon\",\n  ]);\n\n  const classes = () => {\n    return classNames(local.class, hopeCloseButtonClass, closeButtonStyles({ size: local.size }));\n  };\n\n  return (\n    <hope.button type=\"button\" class={classes()} __baseStyle={theme?.baseStyle} {...others}>\n      <Show when={local.children} fallback={local.icon}>\n        {local.children}\n      </Show>\n    </hope.button>\n  );\n}\n\nCloseButton.toString = () => createClassSelector(hopeCloseButtonClass);\n"
  },
  {
    "path": "packages/solid/src/components/close-button/index.ts",
    "content": "export * from \"./close-button\";\nexport * from \"./close-button.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/collapse/collapse.styles.ts",
    "content": "import { css } from \"../../styled-system/stitches.config\";\n\nexport const collapseStyles = css({\n  overflow: \"hidden\",\n});\n"
  },
  {
    "path": "packages/solid/src/components/collapse/collapse.tsx",
    "content": "import { Property } from \"csstype\";\nimport { children, mergeProps, Show, splitProps } from \"solid-js\";\nimport { Transition } from \"solid-transition-group\";\n\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { collapseStyles } from \"./collapse.styles\";\n\ninterface CollapseOptions {\n  /**\n   * If `true`, the collapse will be expanded.\n   */\n  expanded?: boolean;\n\n  /**\n   * If `true`, the opacity of the content will be animated.\n   */\n  animateOpacity?: boolean;\n\n  /**\n   * Duration of the expand transition in ms.\n   */\n  expandDuration?: number;\n\n  /**\n   * Timing function of the expand transition.\n   */\n  expandTimingFunction?: Property.TransitionTimingFunction;\n\n  /**\n   * Duration of the collapse transition in ms.\n   */\n  collapseDuration?: number;\n\n  /**\n   * Duration of the expand collapse in ms.\n   */\n  collapseTimingFunction?: Property.TransitionTimingFunction;\n\n  /**\n   * If `true`, the element stays mounted when collapsed.\n   */\n  keepAlive?: boolean;\n}\n\nexport type CollapseProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, CollapseOptions>;\n\nconst hopeCollapseClass = \"hope-collapse\";\n\nexport function Collapse<C extends ElementType = \"div\">(props: CollapseProps<C>) {\n  const defaultProps: CollapseProps<\"div\"> = {\n    animateOpacity: true,\n    expandDuration: 300,\n    expandTimingFunction: \"ease\",\n    collapseDuration: 300,\n    collapseTimingFunction: \"ease\",\n    keepAlive: true,\n  };\n\n  const propsWithDefault: CollapseProps<\"div\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault, [\n    \"class\",\n    \"children\",\n    \"expanded\",\n    \"animateOpacity\",\n    \"expandDuration\",\n    \"expandTimingFunction\",\n    \"collapseDuration\",\n    \"collapseTimingFunction\",\n    \"keepAlive\",\n  ]);\n\n  const resolvedChildren = children(() => local.children);\n\n  const classes = () => {\n    return classNames(local.class, hopeCollapseClass, collapseStyles());\n  };\n\n  const collapsedStyles = () => {\n    const styles = {\n      height: 0,\n    };\n\n    if (local.animateOpacity) {\n      return {\n        ...styles,\n        opacity: 0,\n      };\n    }\n\n    return styles;\n  };\n\n  const expandedStyles = (el: Element) => {\n    const styles = {\n      height: `${el.scrollHeight}px`,\n    };\n\n    if (local.animateOpacity) {\n      return {\n        ...styles,\n        opacity: 1,\n      };\n    }\n\n    return styles;\n  };\n\n  const onEnterTransition = (el: Element, done: () => void) => {\n    const animation = el.animate([collapsedStyles(), expandedStyles(el)], {\n      duration: local.expandDuration,\n      easing: local.expandTimingFunction,\n    });\n\n    animation.finished.then(done);\n  };\n\n  const onExitTransition = (el: Element, done: () => void) => {\n    const animation = el.animate([expandedStyles(el), collapsedStyles()], {\n      duration: local.collapseDuration,\n      easing: local.collapseTimingFunction,\n    });\n\n    animation.finished.then(done);\n  };\n\n  return (\n    <Transition onEnter={onEnterTransition} onExit={onExitTransition}>\n      <Show when={local.expanded}>\n        <Box class={classes()} {...others}>\n          <Show when={local.keepAlive} fallback={local.children}>\n            {resolvedChildren()}\n          </Show>\n        </Box>\n      </Show>\n    </Transition>\n  );\n}\n\nCollapse.toString = () => createClassSelector(hopeCollapseClass);\n"
  },
  {
    "path": "packages/solid/src/components/collapse/index.ts",
    "content": "export * from \"./collapse\";\nexport * from \"./collapse.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/container/container.stories.tsx",
    "content": "import { HopeWrapper } from \"../storybook-utils\";\nimport { Container } from \"./container\";\n\nexport default {\n  title: \"Layout/Container\",\n  component: Container,\n  decorators: [\n    (Story: any) => (\n      <HopeWrapper>\n        <Story />\n      </HopeWrapper>\n    ),\n  ],\n  argTypes: {\n    centered: {\n      control: { type: \"boolean\" },\n    },\n    centerContent: {\n      control: { type: \"boolean\" },\n    },\n  },\n  args: {\n    centered: true,\n    centerContent: false,\n  },\n};\n\nexport const Default = (args: any) => (\n  <Container bg=\"$info7\" {...args}>\n    <p>Resize the window to see the changes in the container width.</p>\n  </Container>\n);\nDefault.storyName = \"Container\";\n"
  },
  {
    "path": "packages/solid/src/components/container/container.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css } from \"../../styled-system/stitches.config\";\n\nexport const containerStyles = css({\n  width: \"100%\",\n\n  \"@sm\": { maxWidth: \"$containerSm\" },\n  \"@md\": { maxWidth: \"$containerMd\" },\n  \"@lg\": { maxWidth: \"$containerLg\" },\n  \"@xl\": { maxWidth: \"$containerXl\" },\n  \"@2xl\": { maxWidth: \"$container2xl\" },\n\n  variants: {\n    /**\n     * If `true`, container itself will be centered on the page.\n     */\n    centered: {\n      true: {\n        mx: \"auto\",\n      },\n    },\n\n    /**\n     * If `true`, container will center its children regardless of their width.\n     */\n    centerContent: {\n      true: {\n        display: \"flex\",\n        flexDirection: \"column\",\n        alignItems: \"center\",\n      },\n    },\n  },\n});\n\nexport type ContainerVariants = VariantProps<typeof containerStyles>;\n"
  },
  {
    "path": "packages/solid/src/components/container/container.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../test-utils\";\nimport { Container } from \"./container\";\nimport { containerStyles, ContainerVariants } from \"./container.styles\";\n\ndescribe(\"Container\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Container data-testid=\"container\">Container</Container>);\n    const container = screen.getByTestId(\"container\");\n\n    // assert\n    expect(container).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <Container data-testid=\"container\">Container</Container>);\n    const container = screen.getByTestId(\"container\");\n\n    // assert\n    expect(container).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <Container data-testid=\"container\" as=\"span\">\n        Container\n      </Container>\n    ));\n    const container = screen.getByTestId(\"container\");\n\n    // assert\n    expect(container).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"Container\";\n\n    // act\n    renderWithHopeProvider(() => <Container data-testid=\"container\">{children}</Container>);\n    const container = screen.getByTestId(\"container\");\n\n    // assert\n    expect(container).toHaveTextContent(children);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <Container data-testid=\"container\">Container</Container>);\n    const container = screen.getByTestId(\"container\");\n\n    // assert\n    expect(container).toHaveClass(\"hope-container\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(Container.toString()).toBe(\".hope-container\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Container data-testid=\"container\" class={stubClass}>\n        Container\n      </Container>\n    ));\n    const container = screen.getByTestId(\"container\");\n\n    // assert\n    expect(container).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <Container data-testid=\"container\" className={stubClass}>\n        Container\n      </Container>\n    ));\n    const container = screen.getByTestId(\"container\");\n\n    // assert\n    expect(container).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Container data-testid=\"container\" classList={{ [stubClass]: true }}>\n        Container\n      </Container>\n    ));\n    const container = screen.getByTestId(\"container\");\n\n    // assert\n    expect(container).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from containerStyles and variants prop\", () => {\n    // arrange\n    const variantProps: ContainerVariants = {\n      centered: true,\n      centerContent: true,\n    };\n    const containerClass = containerStyles(variantProps);\n\n    // act\n    renderWithHopeProvider(() => (\n      <Container data-testid=\"container\" {...variantProps}>\n        Container\n      </Container>\n    ));\n    const container = screen.getByTestId(\"container\");\n\n    // assert\n    expect(container).toHaveClass(containerClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/container/container.tsx",
    "content": "import { mergeProps, splitProps } from \"solid-js\";\n\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { containerStyles, ContainerVariants } from \"./container.styles\";\n\nexport type ContainerProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, ContainerVariants>;\n\nconst hopeContainerClass = \"hope-container\";\n\n/**\n * Layout component used to wrap app or website content\n *\n * By default it sets `margin-left` and `margin-right` to `auto`,\n * to keep its content centered.\n */\nexport function Container<C extends ElementType = \"div\">(props: ContainerProps<C>) {\n  const defaultProps: ContainerProps<\"div\"> = {\n    centered: true,\n    centerContent: false,\n  };\n\n  const propsWithDefault: ContainerProps<\"div\"> = mergeProps(defaultProps, props);\n  const [local, variantProps, others] = splitProps(\n    propsWithDefault,\n    [\"class\"],\n    [\"centered\", \"centerContent\"]\n  );\n\n  const classes = () => classNames(local.class, hopeContainerClass, containerStyles(variantProps));\n\n  return <Box class={classes()} {...others} />;\n}\n\nContainer.toString = () => createClassSelector(hopeContainerClass);\n"
  },
  {
    "path": "packages/solid/src/components/container/index.ts",
    "content": "export * from \"./container\";\nexport * from \"./container.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/divider/divider.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css } from \"../../styled-system/stitches.config\";\n\nexport const dividerStyles = css({\n  border: 0,\n  borderColor: \"currentColor\",\n\n  variants: {\n    variant: {\n      solid: {\n        borderStyle: \"solid\",\n      },\n      dashed: {\n        borderStyle: \"dashed\",\n      },\n      dotted: {\n        borderStyle: \"dotted\",\n      },\n    },\n    orientation: {\n      vertical: {\n        height: \"100%\",\n      },\n      horizontal: {\n        width: \"100%\",\n      },\n    },\n  },\n});\n\nexport type DividerVariants = VariantProps<typeof dividerStyles>;\n"
  },
  {
    "path": "packages/solid/src/components/divider/divider.tsx",
    "content": "import { Property } from \"csstype\";\nimport { mergeProps, splitProps } from \"solid-js\";\n\nimport { SizeScaleValue } from \"../../styled-system/types\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { dividerStyles, DividerVariants } from \"./divider.styles\";\n\nexport interface DividerOptions extends DividerVariants {\n  /**\n   * The thickness of the divider\n   * @example\n   * ```jsx\n   * <Divider thickness=\"4px\"/>\n   * ```\n   */\n  thickness?: Property.BorderWidth<SizeScaleValue>;\n}\n\nexport type DividerProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, DividerOptions>;\n\nconst hopeDividerClass = \"hope-divider\";\n\nexport function Divider<C extends ElementType = \"div\">(props: DividerProps<C>) {\n  const defaultProps: DividerProps<\"div\"> = {\n    as: \"div\",\n    variant: \"solid\",\n    orientation: \"horizontal\",\n    color: \"$neutral6\",\n    thickness: \"1px\",\n  };\n\n  const propsWithDefault: DividerProps<\"div\"> = mergeProps(defaultProps, props);\n\n  const [local, others] = splitProps(propsWithDefault, [\n    \"class\",\n    \"variant\",\n    \"orientation\",\n    \"thickness\",\n  ]);\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeDividerClass,\n      dividerStyles({\n        variant: local.variant,\n        orientation: local.orientation,\n        css: {\n          borderLeftWidth: local.orientation === \"vertical\" ? local.thickness : 0,\n          borderBottomWidth: local.orientation === \"horizontal\" ? local.thickness : 0,\n        },\n      })\n    );\n  };\n\n  return <Box class={classes()} {...others} />;\n}\n\nDivider.toString = () => createClassSelector(hopeDividerClass);\n"
  },
  {
    "path": "packages/solid/src/components/divider/index.ts",
    "content": "export * from \"./divider\";\nexport * from \"./divider.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/drawer/drawer-content.tsx",
    "content": "import { Show, splitProps } from \"solid-js\";\nimport { Transition } from \"solid-transition-group\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { hope } from \"../factory\";\nimport { useModalContext } from \"../modal\";\nimport { createModal } from \"../modal/create-modal\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useDrawerContext } from \"./drawer\";\nimport { drawerContainerStyles, drawerDialogStyles, drawerTransitionName } from \"./drawer.styles\";\n\nexport type DrawerContentProps<C extends ElementType = \"section\"> = HTMLHopeProps<C>;\n\nconst hopeDrawerContainerClass = \"hope-drawer__content-container\";\nconst hopeDrawerContentClass = \"hope-drawer__content\";\n\n/**\n * Container for the drawer dialog's content.\n */\nexport function DrawerContent<C extends ElementType = \"section\">(props: DrawerContentProps<C>) {\n  const theme = useStyleConfig().Drawer;\n\n  const drawerContext = useDrawerContext();\n  const modalContext = useModalContext();\n\n  const [local, others] = splitProps(props as DrawerContentProps<\"section\">, [\n    \"ref\",\n    \"class\",\n    \"role\",\n    \"aria-labelledby\",\n    \"aria-describedby\",\n    \"onClick\",\n  ]);\n\n  const { assignContainerRef, ariaLabelledBy, ariaDescribedBy, onDialogClick } = createModal(local);\n\n  const containerClasses = () => {\n    return classNames(\n      hopeDrawerContainerClass,\n      drawerContainerStyles({\n        placement: drawerContext.placement,\n      })\n    );\n  };\n\n  const dialogClasses = () => {\n    const dialogClass = drawerDialogStyles({\n      size: drawerContext.size,\n      placement: drawerContext.placement,\n      fullHeight: drawerContext.fullHeight,\n    });\n\n    return classNames(local.class, hopeDrawerContentClass, dialogClass);\n  };\n\n  const transitionName = () => {\n    if (drawerContext.disableMotion) {\n      return \"hope-none\";\n    }\n\n    switch (drawerContext.placement) {\n      case \"top\":\n        return drawerTransitionName.slideInTop;\n      case \"right\":\n        return drawerTransitionName.slideInRight;\n      case \"bottom\":\n        return drawerTransitionName.slideInBottom;\n      case \"left\":\n        return drawerTransitionName.slideInLeft;\n    }\n  };\n\n  return (\n    <Transition name={transitionName()} appear onAfterExit={modalContext.unmountPortal}>\n      <Show when={modalContext.state.opened}>\n        <Box\n          ref={assignContainerRef}\n          class={containerClasses()}\n          tabIndex={-1}\n          onMouseDown={modalContext.onMouseDown}\n          onKeyDown={modalContext.onKeyDown}\n          onClick={modalContext.onOverlayClick}\n        >\n          <hope.section\n            class={dialogClasses()}\n            __baseStyle={theme?.baseStyle?.content}\n            id={modalContext.state.dialogId}\n            role={local.role ?? \"dialog\"}\n            tabIndex={-1}\n            aria-modal={true}\n            aria-labelledby={ariaLabelledBy()}\n            aria-describedby={ariaDescribedBy()}\n            onClick={onDialogClick}\n            {...others}\n          />\n        </Box>\n      </Show>\n    </Transition>\n  );\n}\n\nDrawerContent.toString = () => createClassSelector(hopeDrawerContentClass);\n"
  },
  {
    "path": "packages/solid/src/components/drawer/drawer-overlay.tsx",
    "content": "import { Show, splitProps } from \"solid-js\";\nimport { Transition } from \"solid-transition-group\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { useModalContext } from \"../modal/modal\";\nimport { modalOverlayStyles } from \"../modal/modal.styles\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useDrawerContext } from \"./drawer\";\nimport { drawerTransitionName } from \"./drawer.styles\";\n\nexport type DrawerOverlayProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeDrawerOverlayClass = \"hope-drawer__overlay\";\n\n/**\n * DrawerOverlay renders a backdrop behind the drawer.\n */\nexport function DrawerOverlay<C extends ElementType = \"div\">(props: DrawerOverlayProps<C>) {\n  const theme = useStyleConfig().Drawer;\n\n  const drawerContext = useDrawerContext();\n  const modalContext = useModalContext();\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeDrawerOverlayClass, modalOverlayStyles());\n\n  const transitionName = () => {\n    return drawerContext.disableMotion ? \"hope-none\" : drawerTransitionName.fade;\n  };\n\n  return (\n    <Transition name={transitionName()} appear>\n      <Show when={modalContext.state.opened}>\n        <Box class={classes()} __baseStyle={theme?.baseStyle?.overlay} {...others} />\n      </Show>\n    </Transition>\n  );\n}\n\nDrawerOverlay.toString = () => createClassSelector(hopeDrawerOverlayClass);\n"
  },
  {
    "path": "packages/solid/src/components/drawer/drawer.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css, globalCss } from \"../../styled-system/stitches.config\";\nimport { baseDialogStyles, baseModalContainerStyles } from \"../modal/modal.styles\";\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer - solid-transition-group classes\n * -----------------------------------------------------------------------------------------------*/\n\nexport const drawerTransitionName = {\n  fade: \"hope-drawer-fade-transition\",\n  slideInTop: \"hope-drawer-slide-in-top-transition\",\n  slideInRight: \"hope-drawer-slide-in-right-transition\",\n  slideInBottom: \"hope-drawer-slide-in-bottom-transition\",\n  slideInLeft: \"hope-drawer-slide-in-left-transition\",\n};\n\nexport const drawerTransitionStyles = globalCss({\n  /* fade */\n  [`.${drawerTransitionName.fade}-enter, .${drawerTransitionName.fade}-exit-to`]: {\n    opacity: 0,\n  },\n  [`.${drawerTransitionName.fade}-enter-to, .${drawerTransitionName.fade}-exit`]: {\n    opacity: 1,\n  },\n  [`.${drawerTransitionName.fade}-enter-active, .${drawerTransitionName.fade}-exit-active`]: {\n    transition: \"opacity 500ms ease-in-out\",\n  },\n\n  /* slide common */\n  [`.${drawerTransitionName.slideInTop}-enter-active, .${drawerTransitionName.slideInTop}-exit-active,\n    .${drawerTransitionName.slideInRight}-enter-active, .${drawerTransitionName.slideInRight}-exit-active,\n    .${drawerTransitionName.slideInBottom}-enter-active, .${drawerTransitionName.slideInBottom}-exit-active,\n    .${drawerTransitionName.slideInLeft}-enter-active, .${drawerTransitionName.slideInLeft}-exit-active`]:\n    {\n      transition: \"transform 500ms ease-in-out\",\n    },\n\n  /* slide-in-top */\n  [`.${drawerTransitionName.slideInTop}-enter, .${drawerTransitionName.slideInTop}-exit-to`]: {\n    transform: \"translateY(-100%)\",\n  },\n  [`.${drawerTransitionName.slideInTop}-enter-to, .${drawerTransitionName.slideInTop}-exit`]: {\n    transform: \"translateY(0)\",\n  },\n\n  /* slide-in-right */\n  [`.${drawerTransitionName.slideInRight}-enter, .${drawerTransitionName.slideInRight}-exit-to`]: {\n    transform: \"translateX(100%)\",\n  },\n  [`.${drawerTransitionName.slideInRight}-enter-to, .${drawerTransitionName.slideInRight}-exit`]: {\n    transform: \"translateX(0)\",\n  },\n\n  /* slide-in-bottom */\n  [`.${drawerTransitionName.slideInBottom}-enter, .${drawerTransitionName.slideInBottom}-exit-to`]:\n    {\n      transform: \"translateY(100%)\",\n    },\n  [`.${drawerTransitionName.slideInBottom}-enter-to, .${drawerTransitionName.slideInBottom}-exit`]:\n    {\n      transform: \"translateY(0)\",\n    },\n\n  /* slide-in-left */\n  [`.${drawerTransitionName.slideInLeft}-enter, .${drawerTransitionName.slideInLeft}-exit-to`]: {\n    transform: \"translateX(-100%)\",\n  },\n  [`.${drawerTransitionName.slideInLeft}-enter-to, .${drawerTransitionName.slideInLeft}-exit`]: {\n    transform: \"translateX(0)\",\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer - container\n * -----------------------------------------------------------------------------------------------*/\n\nexport const drawerContainerStyles = css(baseModalContainerStyles, {\n  overflow: \"hidden\",\n\n  variants: {\n    placement: {\n      top: {\n        alignItems: \"flex-start\",\n        justifyContent: \"stretch\",\n      },\n      right: {\n        alignItems: \"stretch\",\n        justifyContent: \"flex-end\",\n      },\n      bottom: {\n        alignItems: \"flex-end\",\n        justifyContent: \"stretch\",\n      },\n      left: {\n        alignItems: \"stretch\",\n        justifyContent: \"flex-start\",\n      },\n    },\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer - dialog (content)\n * -----------------------------------------------------------------------------------------------*/\n\nexport const drawerDialogStyles = css(baseDialogStyles, {\n  maxHeight: \"100vh\",\n\n  variants: {\n    size: {\n      xs: {\n        maxWidth: \"$xs\",\n      },\n      sm: {\n        maxWidth: \"$md\",\n      },\n      md: {\n        maxWidth: \"$lg\",\n      },\n      lg: {\n        maxWidth: \"$2xl\",\n      },\n      xl: {\n        maxWidth: \"$4xl\",\n      },\n      full: {\n        maxWidth: \"100vw\",\n        height: \"100vh\",\n      },\n    },\n    placement: {\n      top: {},\n      right: {},\n      bottom: {},\n      left: {},\n    },\n    fullHeight: {\n      true: {\n        height: \"100vh\",\n      },\n      false: {},\n    },\n  },\n  compoundVariants: [\n    /* -------------------------------------------------------------------------------------------------\n     * Placement - top + size\n     * -----------------------------------------------------------------------------------------------*/\n    { placement: \"top\", size: \"xs\", css: { maxWidth: \"100vw\" } },\n    { placement: \"top\", size: \"sm\", css: { maxWidth: \"100vw\" } },\n    { placement: \"top\", size: \"md\", css: { maxWidth: \"100vw\" } },\n    { placement: \"top\", size: \"lg\", css: { maxWidth: \"100vw\" } },\n    { placement: \"top\", size: \"xl\", css: { maxWidth: \"100vw\" } },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Placement - bottom + size\n     * -----------------------------------------------------------------------------------------------*/\n    { placement: \"bottom\", size: \"xs\", css: { maxWidth: \"100vw\" } },\n    { placement: \"bottom\", size: \"sm\", css: { maxWidth: \"100vw\" } },\n    { placement: \"bottom\", size: \"md\", css: { maxWidth: \"100vw\" } },\n    { placement: \"bottom\", size: \"lg\", css: { maxWidth: \"100vw\" } },\n    { placement: \"bottom\", size: \"xl\", css: { maxWidth: \"100vw\" } },\n  ],\n});\n\nexport type DrawerDialogVariants = VariantProps<typeof drawerDialogStyles>;\n"
  },
  {
    "path": "packages/solid/src/components/drawer/drawer.tsx",
    "content": "import { createContext, mergeProps, splitProps, useContext } from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { SystemStyleObject } from \"../../styled-system/types\";\nimport { OverrideProps } from \"../../utils/types\";\nimport { CloseButtonProps, ThemeableCloseButtonOptions } from \"../close-button/close-button\";\nimport { Modal, ModalProps } from \"../modal/modal\";\nimport { ModalBody, ModalBodyProps } from \"../modal/modal-body\";\nimport { ModalCloseButton } from \"../modal/modal-close-button\";\nimport { ModalFooter, ModalFooterProps } from \"../modal/modal-footer\";\nimport { ModalHeader, ModalHeaderProps } from \"../modal/modal-header\";\nimport { ElementType } from \"../types\";\nimport { DrawerDialogVariants } from \"./drawer.styles\";\n\nexport type DrawerPlacement = \"top\" | \"right\" | \"bottom\" | \"left\";\n\ninterface DrawerOptions extends DrawerDialogVariants {\n  /**\n   * The placement of the drawer\n   */\n  placement?: DrawerPlacement;\n\n  /**\n   * If `true`, the drawer will appear without any transition.\n   */\n  disableMotion?: boolean;\n}\n\nexport type DrawerProps = OverrideProps<\n  Omit<ModalProps, \"scrollBehavior\" | \"centered\" | \"motionPreset\">,\n  DrawerOptions\n>;\n\ntype ThemeableDrawerOptions = Pick<\n  DrawerProps,\n  | \"placement\"\n  | \"size\"\n  | \"fullHeight\"\n  | \"disableMotion\"\n  | \"blockScrollOnMount\"\n  | \"closeOnEsc\"\n  | \"closeOnOverlayClick\"\n  | \"preserveScrollBarGap\"\n  | \"trapFocus\"\n>;\n\nexport interface DrawerStyleConfig {\n  baseStyle?: {\n    overlay?: SystemStyleObject;\n    content?: SystemStyleObject;\n    closeButton?: SystemStyleObject;\n    header?: SystemStyleObject;\n    body?: SystemStyleObject;\n    footer?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: ThemeableDrawerOptions;\n    closeButton?: ThemeableCloseButtonOptions;\n  };\n}\n\ntype DrawerContextValue = Required<DrawerOptions>;\n\nconst DrawerContext = createContext<DrawerContextValue>();\n\nexport function Drawer(props: DrawerProps) {\n  const theme = useStyleConfig().Drawer;\n\n  const [, modalProps] = splitProps(props, [\n    \"opened\",\n    \"onClose\",\n    \"placement\",\n    \"size\",\n    \"fullHeight\",\n    \"disableMotion\",\n  ]);\n\n  const [state] = createStore<DrawerContextValue>({\n    get placement() {\n      return props.placement ?? theme?.defaultProps?.root?.placement ?? \"right\";\n    },\n    get size() {\n      return props.size ?? theme?.defaultProps?.root?.size ?? \"xs\";\n    },\n    get fullHeight() {\n      return props.fullHeight ?? theme?.defaultProps?.root?.fullHeight ?? false;\n    },\n    get disableMotion() {\n      return props.disableMotion ?? theme?.defaultProps?.root?.disableMotion ?? false;\n    },\n  });\n\n  return (\n    <DrawerContext.Provider value={state}>\n      <Modal\n        scrollBehavior=\"inside\"\n        blockScrollOnMount={theme?.defaultProps?.root?.blockScrollOnMount}\n        closeOnEsc={theme?.defaultProps?.root?.closeOnEsc}\n        closeOnOverlayClick={theme?.defaultProps?.root?.closeOnOverlayClick}\n        preserveScrollBarGap={theme?.defaultProps?.root?.preserveScrollBarGap}\n        trapFocus={theme?.defaultProps?.root?.trapFocus}\n        opened={props.opened}\n        onClose={props.onClose}\n        {...modalProps}\n      />\n    </DrawerContext.Provider>\n  );\n}\n\nexport function useDrawerContext() {\n  const context = useContext(DrawerContext);\n\n  if (!context) {\n    throw new Error(\"[Hope UI]: useDrawerContext must be used within a `<Drawer />` component\");\n  }\n\n  return context;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Drawer parts is just Modal parts with drawer's theme baseStyle\n * -----------------------------------------------------------------------------------------------*/\n\nexport function DrawerCloseButton(props: CloseButtonProps) {\n  const theme = useStyleConfig().Drawer;\n\n  const defaultProps: CloseButtonProps = {\n    \"aria-label\": theme?.defaultProps?.closeButton?.[\"aria-label\"] ?? \"Close drawer\",\n    size: theme?.defaultProps?.closeButton?.size ?? \"md\",\n    icon: theme?.defaultProps?.closeButton?.icon,\n  };\n\n  const propsWithDefault = mergeProps(defaultProps, props);\n\n  return <ModalCloseButton __baseStyle={theme?.baseStyle?.closeButton} {...propsWithDefault} />;\n}\n\nexport function DrawerBody<C extends ElementType = \"div\">(props: ModalBodyProps<C>) {\n  const theme = useStyleConfig().Drawer;\n  return <ModalBody __baseStyle={theme?.baseStyle?.body} {...props} />;\n}\n\nexport function DrawerHeader<C extends ElementType = \"header\">(props: ModalHeaderProps<C>) {\n  const theme = useStyleConfig().Drawer;\n  return <ModalHeader __baseStyle={theme?.baseStyle?.header} {...props} />;\n}\n\nexport function DrawerFooter<C extends ElementType = \"footer\">(props: ModalFooterProps<C>) {\n  const theme = useStyleConfig().Drawer;\n  return <ModalFooter __baseStyle={theme?.baseStyle?.footer} {...props} />;\n}\n"
  },
  {
    "path": "packages/solid/src/components/drawer/index.ts",
    "content": "export * from \"./drawer\";\nexport * from \"./drawer.styles\";\nexport * from \"./drawer-content\";\nexport * from \"./drawer-overlay\";\n"
  },
  {
    "path": "packages/solid/src/components/factory.tsx",
    "content": "import { createMemo, mergeProps, splitProps } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\n\nimport { createStyledSystemClass, getUsedStylePropNames } from \"../styled-system/system\";\nimport { isFunction } from \"../utils/assertion\";\nimport { classNames, createClassSelector } from \"../utils/css\";\nimport {\n  DOMElements,\n  ElementType,\n  HopeComponent,\n  HopeFactory,\n  HopeFactoryStyleOptions,\n  HTMLHopeComponents,\n  HTMLHopeProps,\n} from \"./types\";\n\n// TODO: add stitches variant support\n\nconst styled: HopeFactory = <T extends ElementType>(\n  component: T,\n  styleOptions?: HopeFactoryStyleOptions<T>\n) => {\n  const hopeComponent: HopeComponent<T> = props => {\n    const usedStylePropNames = getUsedStylePropNames(props);\n\n    const propsWithDefault = mergeProps({ as: component }, props);\n\n    const [local, styleProps, others] = splitProps(\n      propsWithDefault as HTMLHopeProps<any>,\n      [\"as\", \"class\", \"className\", \"__baseStyle\"],\n      usedStylePropNames\n    );\n\n    const __baseStyles = createMemo(() => {\n      const factoryBaseStyle = isFunction(styleOptions?.baseStyle)\n        ? styleOptions?.baseStyle(props as any)\n        : styleOptions?.baseStyle;\n\n      // order is important for css override\n      return [factoryBaseStyle, local.__baseStyle];\n    });\n\n    const classes = () => {\n      return classNames(\n        styleOptions?.baseClass, // In order to target the component in stitches css method and prop, like any other Hope UI components.\n        local.class,\n        local.className,\n        createStyledSystemClass(styleProps, __baseStyles())\n      );\n    };\n\n    return <Dynamic component={local.as ?? \"div\"} class={classes()} {...others} />;\n  };\n\n  // In order to target the component in stitches css method and prop, like any other Hope UI components.\n  hopeComponent.toString = () =>\n    styleOptions?.baseClass ? createClassSelector(styleOptions.baseClass) : \"\";\n\n  return hopeComponent;\n};\n\nfunction factory() {\n  const cache = new Map<DOMElements, HopeComponent<DOMElements>>();\n\n  return new Proxy(styled, {\n    /**\n     * @example\n     * const Div = hope(\"div\")\n     * const WithHope = hope(AnotherComponent)\n     */\n    apply(target, thisArg, argArray: [ElementType, HopeFactoryStyleOptions<ElementType>]) {\n      return styled(...argArray);\n    },\n\n    /**\n     * @example\n     * <hope.div />\n     */\n    get(_, element: DOMElements) {\n      if (!cache.has(element)) {\n        cache.set(element, styled(element));\n      }\n      return cache.get(element);\n    },\n  }) as HopeFactory & HTMLHopeComponents;\n}\n\nexport const hope = factory();\n"
  },
  {
    "path": "packages/solid/src/components/flex/flex.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { css } from \"../../styled-system\";\nimport * as styledSystem from \"../../styled-system/system\";\nimport { renderWithHopeProvider } from \"../test-utils\";\nimport { Flex, FlexOptions } from \"./flex\";\n\ndescribe(\"Flex\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Flex data-testid=\"flex\">Flex</Flex>);\n    const flex = screen.getByTestId(\"flex\");\n\n    // assert\n    expect(flex).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <Flex data-testid=\"flex\">Flex</Flex>);\n    const flex = screen.getByTestId(\"flex\");\n\n    // assert\n    expect(flex).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <Flex data-testid=\"flex\" as=\"span\">\n        Flex\n      </Flex>\n    ));\n    const flex = screen.getByTestId(\"flex\");\n\n    // assert\n    expect(flex).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"Flex\";\n\n    // act\n    renderWithHopeProvider(() => <Flex data-testid=\"flex\">{children}</Flex>);\n    const flex = screen.getByTestId(\"flex\");\n\n    // assert\n    expect(flex).toHaveTextContent(children);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <Flex data-testid=\"flex\">Flex</Flex>);\n    const flex = screen.getByTestId(\"flex\");\n\n    // assert\n    expect(flex).toHaveClass(\"hope-flex\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(Flex.toString()).toBe(\".hope-flex\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Flex data-testid=\"flex\" class={stubClass}>\n        Flex\n      </Flex>\n    ));\n    const flex = screen.getByTestId(\"flex\");\n\n    // assert\n    expect(flex).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <Flex data-testid=\"flex\" className={stubClass}>\n        Flex\n      </Flex>\n    ));\n    const flex = screen.getByTestId(\"flex\");\n\n    // assert\n    expect(flex).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Flex data-testid=\"flex\" classList={{ [stubClass]: true }}>\n        Flex\n      </Flex>\n    ));\n    const flex = screen.getByTestId(\"flex\");\n\n    // assert\n    expect(flex).toHaveClass(stubClass);\n  });\n\n  it(\"should have display props to 'flex' by default\", () => {\n    // arrange\n    const stubClassName = css({})();\n\n    jest.spyOn(styledSystem, \"createStyledSystemClass\").mockReturnValue(stubClassName);\n\n    // act\n    renderWithHopeProvider(() => <Flex>Flex</Flex>);\n\n    // assert\n    expect(styledSystem.createStyledSystemClass).toHaveBeenCalledWith(\n      expect.objectContaining({\n        display: \"flex\",\n      }),\n      [undefined, undefined] // __baseStyles\n    );\n  });\n\n  it(\"should renders all the allowed shorthand style props\", () => {\n    // arrange\n    const shorthandProps: FlexOptions = {\n      direction: \"column-reverse\",\n      wrap: \"wrap\",\n    };\n\n    const stubClassName = css({})();\n\n    jest.spyOn(styledSystem, \"createStyledSystemClass\").mockReturnValue(stubClassName);\n\n    // act\n    renderWithHopeProvider(() => <Flex {...shorthandProps}>Flex</Flex>);\n\n    // assert\n    expect(styledSystem.createStyledSystemClass).toHaveBeenCalledWith(\n      expect.objectContaining({\n        flexDirection: shorthandProps.direction,\n        flexWrap: shorthandProps.wrap,\n      }),\n      [undefined, undefined] // __baseStyles\n    );\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/flex/flex.tsx",
    "content": "import { Property } from \"csstype\";\nimport { splitProps } from \"solid-js\";\n\nimport { ResponsiveProps } from \"../../styled-system/types\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\n\nexport type FlexOptions = ResponsiveProps<{\n  direction?: Property.FlexDirection;\n  wrap?: Property.FlexWrap;\n}>;\n\nexport type FlexProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, FlexOptions>;\n\nconst hopeFlexClass = \"hope-flex\";\n\n/**\n * Hope UI component used to create flexbox layouts.\n * It renders a `div` with `display: flex` and comes with helpful style shorthand.\n */\nexport function Flex<C extends ElementType = \"div\">(props: FlexProps<C>) {\n  const [local, others] = splitProps(props, [\"class\", \"direction\", \"wrap\"]);\n\n  const classes = () => classNames(local.class, hopeFlexClass);\n\n  return (\n    <Box\n      class={classes()}\n      display=\"flex\"\n      flexDirection={local.direction}\n      flexWrap={local.wrap}\n      {...others}\n    />\n  );\n}\n\nFlex.toString = () => createClassSelector(hopeFlexClass);\n"
  },
  {
    "path": "packages/solid/src/components/flex/index.ts",
    "content": "export * from \"./flex\";\n"
  },
  {
    "path": "packages/solid/src/components/form-control/__tests__/form-control.test.tsx",
    "content": "import { cleanup, fireEvent, screen } from \"solid-testing-library\";\n\nimport { Input } from \"../../input/input\";\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { FormControl } from \"../form-control\";\nimport { formControlStyles } from \"../form-control.styles\";\nimport { FormErrorMessage } from \"../form-error-message\";\nimport { FormHelperText } from \"../form-helper-text\";\nimport { FormLabel } from \"../form-label\";\n\ndescribe(\"FormControl\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl data-testid=\"control\">\n        <FormLabel>Name</FormLabel>\n        <Input />\n        <FormHelperText>Enter a name</FormHelperText>\n        <FormErrorMessage>Name is required</FormErrorMessage>\n      </FormControl>\n    ));\n    const control = screen.getByTestId(\"control\");\n\n    // assert\n    expect(control).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl data-testid=\"control\">\n        <FormLabel>Name</FormLabel>\n        <Input />\n        <FormHelperText>Enter a name</FormHelperText>\n        <FormErrorMessage>Name is required</FormErrorMessage>\n      </FormControl>\n    ));\n    const control = screen.getByTestId(\"control\");\n\n    // assert\n    expect(control).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl data-testid=\"control\" as=\"span\">\n        <FormLabel>Name</FormLabel>\n        <Input />\n        <FormHelperText>Enter a name</FormHelperText>\n        <FormErrorMessage>Name is required</FormErrorMessage>\n      </FormControl>\n    ));\n    const control = screen.getByTestId(\"control\");\n\n    // assert\n    expect(control).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should create underlying elements ids based on 'id' prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl id=\"name\" invalid>\n        <FormLabel data-testid=\"label\">Name</FormLabel>\n        <Input data-testid=\"input\" />\n        <FormHelperText data-testid=\"helper-text\">Enter a name</FormHelperText>\n        <FormErrorMessage data-testid=\"error-message\">Name is required</FormErrorMessage>\n      </FormControl>\n    ));\n\n    const input = screen.getByTestId(\"input\");\n    const label = screen.getByTestId(\"label\");\n    const helperText = screen.getByTestId(\"helper-text\");\n    const errorMessage = screen.getByTestId(\"error-message\");\n\n    // assert\n    expect(input).toHaveAttribute(\"id\", \"name\");\n    expect(label).toHaveAttribute(\"id\", \"name-label\");\n    expect(helperText).toHaveAttribute(\"id\", \"name-helper-text\");\n    expect(errorMessage).toHaveAttribute(\"id\", \"name-error-message\");\n  });\n\n  it(\"should create underlying elements ids with a generated id when 'id' prop is not set\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl invalid>\n        <FormLabel data-testid=\"label\">Name</FormLabel>\n        <Input data-testid=\"input\" />\n        <FormHelperText data-testid=\"helper-text\">Enter a name</FormHelperText>\n        <FormErrorMessage data-testid=\"error-message\">Name is required</FormErrorMessage>\n      </FormControl>\n    ));\n\n    const input = screen.getByTestId(\"input\");\n    const label = screen.getByTestId(\"label\");\n    const helperText = screen.getByTestId(\"helper-text\");\n    const errorMessage = screen.getByTestId(\"error-message\");\n\n    // assert\n    expect(input).toHaveAttribute(\"id\", expect.stringMatching(/^hope-field-(.+)/));\n    expect(label).toHaveAttribute(\"id\", `${input.id}-label`);\n    expect(helperText).toHaveAttribute(\"id\", `${input.id}-helper-text`);\n    expect(errorMessage).toHaveAttribute(\"id\", `${input.id}-error-message`);\n  });\n\n  it(\"should calls provided input callbacks\", async () => {\n    // arrange\n    const onFocus = jest.fn();\n    const onBlur = jest.fn();\n\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl data-testid=\"control\" as=\"span\">\n        <FormLabel>Name</FormLabel>\n        <Input data-testid=\"input\" placeholder=\"Name\" onFocus={onFocus} onBlur={onBlur} />\n      </FormControl>\n    ));\n    const input = screen.getByTestId(\"input\");\n\n    fireEvent.focus(input);\n    fireEvent.blur(input);\n\n    // assert\n    expect(onFocus).toHaveBeenCalled();\n    expect(onBlur).toHaveBeenCalled();\n  });\n\n  it(\"should have 'role=group' attribute\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl data-testid=\"control\">\n        <FormLabel>Name</FormLabel>\n        <Input />\n        <FormHelperText>Enter a name</FormHelperText>\n        <FormErrorMessage>Name is required</FormErrorMessage>\n      </FormControl>\n    ));\n    const control = screen.getByTestId(\"control\");\n\n    // assert\n    expect(control).toHaveAttribute(\"role\", \"group\");\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl data-testid=\"control\">\n        <FormLabel>Name</FormLabel>\n        <Input />\n        <FormHelperText>Enter a name</FormHelperText>\n        <FormErrorMessage>Name is required</FormErrorMessage>\n      </FormControl>\n    ));\n    const control = screen.getByTestId(\"control\");\n\n    // assert\n    expect(control).toHaveClass(\"hope-form-control\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(FormControl.toString()).toBe(\".hope-form-control\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl data-testid=\"control\" class={stubClass}>\n        <FormLabel>Name</FormLabel>\n        <Input />\n        <FormHelperText>Enter a name</FormHelperText>\n        <FormErrorMessage>Name is required</FormErrorMessage>\n      </FormControl>\n    ));\n    const control = screen.getByTestId(\"control\");\n\n    // assert\n    expect(control).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <FormControl data-testid=\"control\" className={stubClass}>\n        <FormLabel>Name</FormLabel>\n        <Input />\n        <FormHelperText>Enter a name</FormHelperText>\n        <FormErrorMessage>Name is required</FormErrorMessage>\n      </FormControl>\n    ));\n    const control = screen.getByTestId(\"control\");\n\n    // assert\n    expect(control).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl data-testid=\"control\" classList={{ [stubClass]: true }}>\n        <FormLabel>Name</FormLabel>\n        <Input />\n        <FormHelperText>Enter a name</FormHelperText>\n        <FormErrorMessage>Name is required</FormErrorMessage>\n      </FormControl>\n    ));\n    const control = screen.getByTestId(\"control\");\n\n    // assert\n    expect(control).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from formControlStyles\", () => {\n    // arrange\n    const formControlClass = formControlStyles();\n\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl data-testid=\"control\">\n        <FormLabel>Name</FormLabel>\n        <Input />\n        <FormHelperText>Enter a name</FormHelperText>\n        <FormErrorMessage>Name is required</FormErrorMessage>\n      </FormControl>\n    ));\n    const control = screen.getByTestId(\"control\");\n\n    // assert\n    expect(control).toHaveClass(formControlClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/form-control/__tests__/form-error-message.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { FormControl } from \"../form-control\";\nimport { formErrorMessageStyles } from \"../form-control.styles\";\nimport { FormErrorMessage } from \"../form-error-message\";\n\ndescribe(\"FormErrorMessage\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should NOT render when FormControl is valid\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <FormErrorMessage data-testid=\"error-message\" />\n      </FormControl>\n    ));\n    const errorMessage = screen.queryByTestId(\"error-message\");\n\n    // assert\n    expect(errorMessage).not.toBeInTheDocument();\n  });\n\n  it(\"should render when FormControl is invalid\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl invalid>\n        <FormErrorMessage data-testid=\"error-message\" />\n      </FormControl>\n    ));\n    const errorMessage = screen.getByTestId(\"error-message\");\n\n    // assert\n    expect(errorMessage).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl invalid>\n        <FormErrorMessage data-testid=\"error-message\" />\n      </FormControl>\n    ));\n    const errorMessage = screen.getByTestId(\"error-message\");\n\n    // assert\n    expect(errorMessage).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl invalid>\n        <FormErrorMessage as=\"span\" data-testid=\"error-message\" />\n      </FormControl>\n    ));\n    const errorMessage = screen.getByTestId(\"error-message\");\n\n    // assert\n    expect(errorMessage).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should have default id from FormControl\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl id=\"email\" invalid>\n        <FormErrorMessage data-testid=\"error-message\" />\n      </FormControl>\n    ));\n    const errorMessage = screen.getByTestId(\"error-message\");\n\n    // assert\n    expect(errorMessage).toHaveAttribute(\"id\", \"email-error-message\");\n  });\n\n  it(\"should have 'data-disabled' attribute when FormControl is disabled\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl invalid disabled>\n        <FormErrorMessage data-testid=\"error-message\" />\n      </FormControl>\n    ));\n    const errorMessage = screen.getByTestId(\"error-message\");\n\n    // assert\n    expect(errorMessage).toHaveAttribute(\"data-disabled\");\n  });\n\n  it(\"should have 'data-readonly' attribute when FormControl is readOnly\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl invalid readOnly>\n        <FormErrorMessage data-testid=\"error-message\" />\n      </FormControl>\n    ));\n    const errorMessage = screen.getByTestId(\"error-message\");\n\n    // assert\n    expect(errorMessage).toHaveAttribute(\"data-readonly\");\n  });\n\n  it(\"should have 'aria-live=polite' attribute\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl invalid readOnly>\n        <FormErrorMessage data-testid=\"error-message\" />\n      </FormControl>\n    ));\n    const errorMessage = screen.getByTestId(\"error-message\");\n\n    // assert\n    expect(errorMessage).toHaveAttribute(\"aria-live\", \"polite\");\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl invalid>\n        <FormErrorMessage data-testid=\"error-message\" />\n      </FormControl>\n    ));\n    const errorMessage = screen.getByTestId(\"error-message\");\n\n    // assert\n    expect(errorMessage).toHaveClass(\"hope-form-error-message\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(FormErrorMessage.toString()).toBe(\".hope-form-error-message\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl invalid>\n        <FormErrorMessage data-testid=\"error-message\" class={stubClass} />\n      </FormControl>\n    ));\n    const errorMessage = screen.getByTestId(\"error-message\");\n\n    // assert\n    expect(errorMessage).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl invalid>\n        {/* eslint-disable-next-line solid/no-react-specific-props */}\n        <FormErrorMessage data-testid=\"error-message\" className={stubClass} />\n      </FormControl>\n    ));\n    const errorMessage = screen.getByTestId(\"error-message\");\n\n    // assert\n    expect(errorMessage).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl invalid>\n        <FormErrorMessage data-testid=\"error-message\" classList={{ [stubClass]: true }} />\n      </FormControl>\n    ));\n    const errorMessage = screen.getByTestId(\"error-message\");\n\n    // assert\n    expect(errorMessage).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from formErrorMessageStyles\", () => {\n    // arrange\n    const formErrorMessageClass = formErrorMessageStyles();\n\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl invalid>\n        <FormErrorMessage data-testid=\"error-message\" />\n      </FormControl>\n    ));\n    const errorMessage = screen.getByTestId(\"error-message\");\n\n    // assert\n    expect(errorMessage).toHaveClass(formErrorMessageClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/form-control/__tests__/form-helper-text.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { FormControl } from \"../form-control\";\nimport { formHelperTextStyles } from \"../form-control.styles\";\nimport { FormHelperText } from \"../form-helper-text\";\n\ndescribe(\"FormHelperText\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <FormHelperText data-testid=\"helper-text\" />\n      </FormControl>\n    ));\n    const helperText = screen.getByTestId(\"helper-text\");\n\n    // assert\n    expect(helperText).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <FormHelperText data-testid=\"helper-text\" />\n      </FormControl>\n    ));\n    const helperText = screen.getByTestId(\"helper-text\");\n\n    // assert\n    expect(helperText).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <FormHelperText as=\"span\" data-testid=\"helper-text\" />\n      </FormControl>\n    ));\n    const helperText = screen.getByTestId(\"helper-text\");\n\n    // assert\n    expect(helperText).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should have default id from FormControl\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl id=\"email\">\n        <FormHelperText data-testid=\"helper-text\" />\n      </FormControl>\n    ));\n    const helperText = screen.getByTestId(\"helper-text\");\n\n    // assert\n    expect(helperText).toHaveAttribute(\"id\", \"email-helper-text\");\n  });\n\n  it(\"should have 'data-disabled' attribute when FormControl is disabled\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl disabled>\n        <FormHelperText data-testid=\"helper-text\" />\n      </FormControl>\n    ));\n    const helperText = screen.getByTestId(\"helper-text\");\n\n    // assert\n    expect(helperText).toHaveAttribute(\"data-disabled\");\n  });\n\n  it(\"should have 'data-readonly' attribute when FormControl is readOnly\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl readOnly>\n        <FormHelperText data-testid=\"helper-text\" />\n      </FormControl>\n    ));\n    const helperText = screen.getByTestId(\"helper-text\");\n\n    // assert\n    expect(helperText).toHaveAttribute(\"data-readonly\");\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <FormHelperText data-testid=\"helper-text\" />\n      </FormControl>\n    ));\n    const helperText = screen.getByTestId(\"helper-text\");\n\n    // assert\n    expect(helperText).toHaveClass(\"hope-form-helper-text\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(FormHelperText.toString()).toBe(\".hope-form-helper-text\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <FormHelperText data-testid=\"helper-text\" class={stubClass} />\n      </FormControl>\n    ));\n    const helperText = screen.getByTestId(\"helper-text\");\n\n    // assert\n    expect(helperText).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        {/* eslint-disable-next-line solid/no-react-specific-props */}\n        <FormHelperText data-testid=\"helper-text\" className={stubClass} />\n      </FormControl>\n    ));\n    const helperText = screen.getByTestId(\"helper-text\");\n\n    // assert\n    expect(helperText).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <FormHelperText data-testid=\"helper-text\" classList={{ [stubClass]: true }} />\n      </FormControl>\n    ));\n    const helperText = screen.getByTestId(\"helper-text\");\n\n    // assert\n    expect(helperText).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from formHelperTextStyles\", () => {\n    // arrange\n    const formHelperTextClass = formHelperTextStyles();\n\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <FormHelperText data-testid=\"helper-text\" />\n      </FormControl>\n    ));\n    const helperText = screen.getByTestId(\"helper-text\");\n\n    // assert\n    expect(helperText).toHaveClass(formHelperTextClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/form-control/__tests__/form-label.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { Input } from \"../../input/input\";\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { FormControl } from \"../form-control\";\nimport { formLabelStyles } from \"../form-control.styles\";\nimport { FormLabel } from \"../form-label\";\n\ndescribe(\"FormLabel\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <FormLabel data-testid=\"label\" />\n      </FormControl>\n    ));\n    const label = screen.getByTestId(\"label\");\n\n    // assert\n    expect(label).toBeInTheDocument();\n  });\n\n  it(\"should render <label> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <FormLabel data-testid=\"label\" />\n      </FormControl>\n    ));\n    const label = screen.getByTestId(\"label\");\n\n    // assert\n    expect(label).toBeInstanceOf(HTMLLabelElement);\n  });\n\n  it(\"should have default id from FormControl\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl id=\"email\">\n        <FormLabel data-testid=\"label\" />\n      </FormControl>\n    ));\n    const label = screen.getByTestId(\"label\");\n\n    // assert\n    expect(label).toHaveAttribute(\"id\", \"email-label\");\n  });\n\n  it(\"should have 'for' attribute set to the input id generated by FormControl\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <FormLabel data-testid=\"label\" />\n        <Input data-testid=\"input\" />\n      </FormControl>\n    ));\n    const label = screen.getByTestId(\"label\");\n    const input = screen.getByTestId(\"input\");\n\n    // assert\n    expect(label).toHaveAttribute(\"for\", input.id);\n  });\n\n  // it(\"should have 'data-focus' attribute when input is focused\", async () => {\n  //   // act\n  //   renderWithHopeProvider(() => (\n  //     <FormControl disabled>\n  //       <FormLabel data-testid=\"label\" />\n  //       <Input data-testid=\"input\" />\n  //     </FormControl>\n  //   ));\n  //   const label = screen.getByTestId(\"label\");\n\n  //   // simulate a `tab press` focusing the input\n  //   userEvent.tab();\n\n  //   // assert\n  //   expect(label).toHaveAttribute(\"data-focus\");\n  // });\n\n  it(\"should have 'data-disabled' attribute when FormControl is disabled\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl disabled>\n        <FormLabel data-testid=\"label\" />\n      </FormControl>\n    ));\n    const label = screen.getByTestId(\"label\");\n\n    // assert\n    expect(label).toHaveAttribute(\"data-disabled\");\n  });\n\n  it(\"should have 'data-invalid' attribute when FormControl is invalid\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl invalid>\n        <FormLabel data-testid=\"label\" />\n      </FormControl>\n    ));\n    const label = screen.getByTestId(\"label\");\n\n    // assert\n    expect(label).toHaveAttribute(\"data-invalid\");\n  });\n\n  it(\"should have 'data-readonly' attribute when FormControl is readOnly\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl readOnly>\n        <FormLabel data-testid=\"label\" />\n      </FormControl>\n    ));\n    const label = screen.getByTestId(\"label\");\n\n    // assert\n    expect(label).toHaveAttribute(\"data-readonly\");\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <FormLabel data-testid=\"label\" />\n      </FormControl>\n    ));\n    const label = screen.getByTestId(\"label\");\n\n    // assert\n    expect(label).toHaveClass(\"hope-form-label\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(FormLabel.toString()).toBe(\".hope-form-label\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <FormLabel data-testid=\"label\" class={stubClass} />\n      </FormControl>\n    ));\n    const label = screen.getByTestId(\"label\");\n\n    // assert\n    expect(label).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        {/* eslint-disable-next-line solid/no-react-specific-props */}\n        <FormLabel data-testid=\"label\" className={stubClass} />\n      </FormControl>\n    ));\n    const label = screen.getByTestId(\"label\");\n\n    // assert\n    expect(label).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <FormLabel data-testid=\"label\" classList={{ [stubClass]: true }} />\n      </FormControl>\n    ));\n    const label = screen.getByTestId(\"label\");\n\n    // assert\n    expect(label).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from formLabelStyles\", () => {\n    // arrange\n    const formLabelClass = formLabelStyles();\n\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <FormLabel data-testid=\"label\" />\n      </FormControl>\n    ));\n    const label = screen.getByTestId(\"label\");\n\n    // assert\n    expect(label).toHaveClass(formLabelClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/form-control/form-control.stories.tsx",
    "content": "import { For, Show } from \"solid-js\";\n\nimport { Input } from \"../input/input\";\nimport {\n  Select,\n  SelectContent,\n  SelectIcon,\n  SelectListbox,\n  SelectOption,\n  SelectOptionIndicator,\n  SelectOptionText,\n  SelectPlaceholder,\n  SelectTrigger,\n  SelectValue,\n} from \"../select\";\nimport { HopeWrapper } from \"../storybook-utils\";\nimport { Textarea } from \"../textarea/textarea\";\nimport { FormControl } from \"./form-control\";\nimport { FormErrorMessage } from \"./form-error-message\";\nimport { FormHelperText } from \"./form-helper-text\";\nimport { FormLabel } from \"./form-label\";\n\nexport default {\n  title: \"Data entry/FormControl\",\n  component: Input,\n  parameters: { layout: \"centered\" },\n  decorators: [\n    (Story: any) => (\n      <HopeWrapper>\n        <Story />\n      </HopeWrapper>\n    ),\n  ],\n  argTypes: {\n    required: {\n      control: { type: \"boolean\" },\n    },\n    disabled: {\n      control: { type: \"boolean\" },\n    },\n    invalid: {\n      control: { type: \"boolean\" },\n    },\n    readOnly: {\n      control: { type: \"boolean\" },\n    },\n  },\n  args: {\n    required: false,\n    disabled: false,\n    invalid: false,\n    readOnly: false,\n  },\n};\n\nexport const WithInput = (args: any) => (\n  <FormControl maxW={300} {...args}>\n    <FormLabel>Email address</FormLabel>\n    <Input type=\"email\" placeholder=\"Placeholder\" />\n    <Show\n      when={args.invalid}\n      fallback={<FormHelperText>We'll never share your email.</FormHelperText>}\n    >\n      <FormErrorMessage>An error occured</FormErrorMessage>\n    </Show>\n  </FormControl>\n);\nWithInput.storyName = \"With input\";\n\nexport const WithTextarea = (args: any) => (\n  <FormControl {...args}>\n    <FormLabel>Description</FormLabel>\n    <Textarea resize=\"vertical\" placeholder=\"Placeholder\" />\n    <Show when={args.invalid} fallback={<FormHelperText>Max 300 characters.</FormHelperText>}>\n      <FormErrorMessage>An error occured</FormErrorMessage>\n    </Show>\n  </FormControl>\n);\nWithTextarea.storyName = \"With textarea\";\n\nexport const WithSelect = (args: any) => (\n  <FormControl {...args}>\n    <FormLabel>Framework</FormLabel>\n    <Select>\n      <SelectTrigger maxW=\"300px\">\n        <SelectPlaceholder>Choose a framework</SelectPlaceholder>\n        <SelectValue />\n        <SelectIcon />\n      </SelectTrigger>\n      <SelectContent>\n        <SelectListbox>\n          <For each={[\"React\", \"Angular\", \"Vue\", \"Svelte\", \"Solid\"]}>\n            {item => (\n              <SelectOption value={item}>\n                <SelectOptionText>{item}</SelectOptionText>\n                <SelectOptionIndicator />\n              </SelectOption>\n            )}\n          </For>\n        </SelectListbox>\n      </SelectContent>\n    </Select>\n    <Show when={args.invalid} fallback={<FormHelperText>Choose SolidJS.</FormHelperText>}>\n      <FormErrorMessage>An error occured</FormErrorMessage>\n    </Show>\n  </FormControl>\n);\nWithSelect.storyName = \"With select\";\n"
  },
  {
    "path": "packages/solid/src/components/form-control/form-control.styles.ts",
    "content": "import { css } from \"../../styled-system/stitches.config\";\n\n/* -------------------------------------------------------------------------------------------------\n * FormControl\n * -----------------------------------------------------------------------------------------------*/\n\nexport const formControlStyles = css({\n  position: \"relative\",\n  width: \"$full\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * FormLabel\n * -----------------------------------------------------------------------------------------------*/\n\nexport const formLabelStyles = css({\n  display: \"inline-block\",\n\n  marginBottom: \"$1\",\n\n  color: \"$neutral12\",\n  fontWeight: \"$medium\",\n  fontSize: \"$sm\",\n  lineHeight: \"$5\",\n  textAlign: \"start\",\n\n  opacity: 1,\n\n  \"&[data-disabled]\": {\n    opacity: 0.4,\n    cursor: \"not-allowed\",\n  },\n});\n\nexport const requiredIndicatorStyles = css({\n  marginInlineStart: \"$1\",\n  color: \"$danger9\",\n  fontSize: \"$base\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * FormHelperText\n * -----------------------------------------------------------------------------------------------*/\n\nexport const formHelperTextStyles = css({\n  display: \"inline-block\",\n\n  marginTop: \"$1\",\n\n  color: \"$neutral11\",\n  fontWeight: \"$normal\",\n  fontSize: \"$sm\",\n  lineHeight: \"$5\",\n  textAlign: \"start\",\n\n  opacity: 1,\n\n  \"&[data-disabled]\": {\n    opacity: 0.4,\n    cursor: \"not-allowed\",\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * FormErrorMessage\n * -----------------------------------------------------------------------------------------------*/\n\nexport const formErrorMessageStyles = css({\n  display: \"inline-block\",\n\n  marginTop: \"$1\",\n\n  color: \"$danger9\",\n  fontWeight: \"$normal\",\n  fontSize: \"$sm\",\n  lineHeight: \"$5\",\n  textAlign: \"start\",\n\n  opacity: 1,\n\n  \"&[data-disabled]\": {\n    opacity: 0.4,\n    cursor: \"not-allowed\",\n  },\n});\n"
  },
  {
    "path": "packages/solid/src/components/form-control/form-control.tsx",
    "content": "import { Accessor, createContext, createUniqueId, splitProps, useContext } from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { SystemStyleObject } from \"../../styled-system/types\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { formControlStyles } from \"./form-control.styles\";\nimport { FormLabelOptions } from \"./form-label\";\n\nexport interface FormControlOptions {\n  /**\n   * The custom `id` to use for the form control. This is passed directly to the form element (e.g, Input).\n   * - The form element (e.g Input) gets the `id`\n   * - The form label id: `${id}-label`\n   * - The form error text id: `${id}-error-message`\n   * - The form helper text id: `${id}-helper-text`\n   */\n  id?: string;\n\n  /**\n   * If `true`, the form control will be required. This has 2 side effects:\n   * - The `FormLabel` will show a required indicator\n   * - The form element (e.g, Input) will have `aria-required` set to `true`\n   */\n  required?: boolean;\n\n  /**\n   * If `true`, the form control will be disabled. This has 2 side effects:\n   * - The `FormLabel` will have `data-disabled` attribute\n   * - The form element (e.g, Input) will be disabled\n   */\n  disabled?: boolean;\n\n  /**\n   * If `true`, the form control will be invalid. This has 2 side effects:\n   * - The `FormLabel` and `FormErrorMessage` will have `data-invalid` set to `true`\n   * - The form element (e.g, Input) will have `aria-invalid` set to `true`\n   */\n  invalid?: boolean;\n\n  /**\n   * If `true`, the form control will be readonly\n   */\n  readOnly?: boolean;\n}\n\nexport interface FormControlState extends FormControlOptions {\n  /**\n   * The custom `id` passed to the form label (e.g, FormLabel).\n   */\n  labelId: string;\n\n  /**\n   * The custom `id` passed to the form helper text (e.g, FormHelperText).\n   */\n  helperTextId: string;\n\n  /**\n   * The custom `id` passed to the form error message (e.g, FormErrorMessage).\n   */\n  errorMessageId: string;\n\n  /**\n   * Track whether the `FormHelperText` has been rendered.\n   * We use this to append its id the the `aria-describedby` of the `input`.\n   */\n  hasHelperText: boolean;\n\n  /**\n   * Track whether the `FormErrorMessage` has been rendered.\n   * We use this to append its id the the `aria-describedby` of the `input`.\n   */\n  hasErrorMessage: boolean;\n\n  /**\n   * Track whether the form element (e.g, `input`) has focus.\n   */\n  isFocused: boolean;\n\n  /**\n   * data attribute used in others `FormControl` related components\n   * to reflect that the form element (e.g, Input) is currently focused.\n   */\n  \"data-focus\"?: string;\n\n  /**\n   * data attribute used in others `FormControl` related components\n   * to reflect that the form element (e.g, Input) is currently disabled.\n   */\n  \"data-disabled\"?: string;\n\n  /**\n   * data attribute used in others `FormControl` related components\n   * to reflect that the form element (e.g, Input) is currently invalid.\n   */\n  \"data-invalid\"?: string;\n\n  /**\n   * data attribute used in others `FormControl` related components\n   * to reflect that the form element (e.g, Input) is currently readonly.\n   */\n  \"data-readonly\"?: string;\n}\n\nexport interface FormControlContextValue {\n  state: FormControlState;\n\n  /**\n   * Action to change form control state `hasHelperText`.\n   */\n  setHasHelperText: (value: boolean) => void;\n\n  /**\n   * Action to change form control state `hasErrorMessage`.\n   */\n  setHasErrorMessage: (value: boolean) => void;\n\n  /**\n   * Trigger when the field is focused.\n   */\n  onFocus: () => void;\n\n  /**\n   * Trigger when the field loose focus.\n   */\n  onBlur: () => void;\n}\n\nexport const FormControlContext = createContext<FormControlContextValue>();\n\nexport type FormControlProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, FormControlOptions>;\n\nexport interface FormControlStyleConfig {\n  baseStyle?: {\n    root?: SystemStyleObject;\n    label?: SystemStyleObject;\n    helperText?: SystemStyleObject;\n    errorMessage?: SystemStyleObject;\n  };\n  defaultProps?: {\n    label?: FormLabelOptions;\n  };\n}\n\nconst hopeFormControlClass = \"hope-form-control\";\n\nexport function FormControl<C extends ElementType = \"div\">(props: FormControlProps<C>) {\n  const defaultId = `hope-field-${createUniqueId()}`;\n\n  const theme = useStyleConfig().FormControl;\n\n  const [state, setState] = createStore<FormControlState>({\n    get id() {\n      return props.id ?? defaultId;\n    },\n    get labelId() {\n      return `${this.id}-label`;\n    },\n    get helperTextId() {\n      return `${this.id}-helper-text`;\n    },\n    get errorMessageId() {\n      return `${this.id}-error-message`;\n    },\n    get required() {\n      return props.required;\n    },\n    get disabled() {\n      return props.disabled;\n    },\n    get invalid() {\n      return props.invalid;\n    },\n    get readOnly() {\n      return props.readOnly;\n    },\n    get [\"data-focus\"]() {\n      return this.isFocused ? \"\" : undefined;\n    },\n    get [\"data-disabled\"]() {\n      return this.disabled ? \"\" : undefined;\n    },\n    get [\"data-invalid\"]() {\n      return this.invalid ? \"\" : undefined;\n    },\n    get [\"data-readonly\"]() {\n      return this.readOnly ? \"\" : undefined;\n    },\n    hasHelperText: false,\n    hasErrorMessage: false,\n    isFocused: false,\n  });\n\n  const [local, others] = splitProps(props, [\n    \"id\",\n    \"required\",\n    \"disabled\",\n    \"invalid\",\n    \"readOnly\",\n    \"class\",\n  ]);\n\n  const setHasHelperText = (value: boolean) => setState(\"hasHelperText\", value);\n\n  const setHasErrorMessage = (value: boolean) => setState(\"hasErrorMessage\", value);\n\n  const onFocus = () => setState(\"isFocused\", true);\n\n  const onBlur = () => setState(\"isFocused\", false);\n\n  const context: Accessor<FormControlContextValue> = () => ({\n    state,\n    setHasHelperText,\n    setHasErrorMessage,\n    onFocus,\n    onBlur,\n  });\n\n  const classes = () => classNames(local.class, hopeFormControlClass, formControlStyles());\n\n  return (\n    <FormControlContext.Provider value={context()}>\n      <Box role=\"group\" class={classes()} __baseStyle={theme?.baseStyle?.root} {...others} />\n    </FormControlContext.Provider>\n  );\n}\n\nFormControl.toString = () => createClassSelector(hopeFormControlClass);\n\nexport function useFormControlContext() {\n  return useContext(FormControlContext);\n}\n"
  },
  {
    "path": "packages/solid/src/components/form-control/form-error-message.tsx",
    "content": "import { onCleanup, onMount, Show, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useFormControlContext } from \"./form-control\";\nimport { formErrorMessageStyles } from \"./form-control.styles\";\n\nexport type FormErrorMessageProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeFormErrorMessageClass = \"hope-form-error-message\";\n\nexport function FormErrorMessage<C extends ElementType = \"div\">(props: FormErrorMessageProps<C>) {\n  const theme = useStyleConfig().FormControl;\n\n  const formControl = useFormControlContext();\n\n  const [local, others] = splitProps(props as FormErrorMessageProps<\"div\">, [\"ref\", \"id\", \"class\"]);\n\n  const id = () => local.id ?? formControl?.state.errorMessageId;\n\n  const classes = () =>\n    classNames(local.class, hopeFormErrorMessageClass, formErrorMessageStyles());\n\n  onMount(() => formControl?.setHasErrorMessage(true));\n  onCleanup(() => formControl?.setHasErrorMessage(false));\n\n  return (\n    <Show when={formControl?.state.invalid}>\n      <Box\n        aria-live=\"polite\"\n        id={id()}\n        class={classes()}\n        __baseStyle={theme?.baseStyle?.errorMessage}\n        data-disabled={formControl?.state[\"data-disabled\"]}\n        data-readonly={formControl?.state[\"data-readonly\"]}\n        {...others}\n      />\n    </Show>\n  );\n}\n\nFormErrorMessage.toString = () => createClassSelector(hopeFormErrorMessageClass);\n"
  },
  {
    "path": "packages/solid/src/components/form-control/form-helper-text.tsx",
    "content": "import { onCleanup, onMount, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useFormControlContext } from \"./form-control\";\nimport { formHelperTextStyles } from \"./form-control.styles\";\n\nexport type FormHelperTextProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeFormHelperTextClass = \"hope-form-helper-text\";\n\nexport function FormHelperText<C extends ElementType = \"div\">(props: FormHelperTextProps<C>) {\n  const theme = useStyleConfig().FormControl;\n\n  const formControl = useFormControlContext();\n\n  const [local, others] = splitProps(props as FormHelperTextProps<\"div\">, [\"ref\", \"id\", \"class\"]);\n\n  const id = () => local.id ?? formControl?.state.helperTextId;\n\n  const classes = () => classNames(local.class, hopeFormHelperTextClass, formHelperTextStyles());\n\n  onMount(() => formControl?.setHasHelperText(true));\n  onCleanup(() => formControl?.setHasHelperText(false));\n\n  return (\n    <Box\n      id={id()}\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.helperText}\n      data-disabled={formControl?.state[\"data-disabled\"]}\n      data-readonly={formControl?.state[\"data-readonly\"]}\n      {...others}\n    />\n  );\n}\n\nFormHelperText.toString = () => createClassSelector(hopeFormHelperTextClass);\n"
  },
  {
    "path": "packages/solid/src/components/form-control/form-label.tsx",
    "content": "import { mergeProps, Show, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useFormControlContext } from \"./form-control\";\nimport { formLabelStyles, requiredIndicatorStyles } from \"./form-control.styles\";\n\nexport interface FormLabelOptions {\n  withRequiredIndicator?: boolean;\n}\n\nexport type FormLabelProps<C extends ElementType = \"label\"> = HTMLHopeProps<C, FormLabelOptions>;\n\nconst hopeFormLabelClass = \"hope-form-label\";\n\nexport function FormLabel<C extends ElementType = \"label\">(props: FormLabelProps<C>) {\n  const theme = useStyleConfig().FormControl;\n\n  const formControl = useFormControlContext();\n\n  const defaultProps: FormLabelProps<\"label\"> = {\n    withRequiredIndicator: theme?.defaultProps?.label?.withRequiredIndicator ?? true,\n  };\n\n  const propsWithDefault: FormLabelProps<\"label\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault, [\n    \"id\",\n    \"for\",\n    \"class\",\n    \"children\",\n    \"withRequiredIndicator\",\n  ]);\n\n  const id = () => local.id ?? formControl?.state.labelId;\n  const htmlFor = () => local.for ?? formControl?.state.id;\n\n  const classes = () => classNames(local.class, hopeFormLabelClass, formLabelStyles());\n\n  return (\n    <hope.label\n      id={id()}\n      for={htmlFor()}\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.label}\n      data-focus={formControl?.state[\"data-focus\"]}\n      data-disabled={formControl?.state[\"data-disabled\"]}\n      data-invalid={formControl?.state[\"data-invalid\"]}\n      data-readonly={formControl?.state[\"data-readonly\"]}\n      {...others}\n    >\n      {local.children}\n      <Show when={formControl?.state.required && local.withRequiredIndicator}>\n        <span class={requiredIndicatorStyles()} role=\"presentation\" aria-hidden=\"true\">\n          *\n        </span>\n      </Show>\n    </hope.label>\n  );\n}\n\nFormLabel.toString = () => createClassSelector(hopeFormLabelClass);\n"
  },
  {
    "path": "packages/solid/src/components/form-control/index.ts",
    "content": "export * from \"./form-control\";\nexport * from \"./form-control.styles\";\nexport * from \"./form-error-message\";\nexport * from \"./form-helper-text\";\nexport * from \"./form-label\";\n"
  },
  {
    "path": "packages/solid/src/components/form-control/use-form-control.ts",
    "content": "import { createMemo, JSX } from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { chainHandlers } from \"../../utils/function\";\nimport { FormControlOptions, useFormControlContext } from \"./form-control\";\n\nexport interface UseFormControlProps<T extends HTMLElement> extends FormControlOptions {\n  \"aria-describedby\"?: string;\n  onFocus?: JSX.EventHandlerUnion<T, FocusEvent>;\n  onBlur?: JSX.EventHandlerUnion<T, FocusEvent>;\n}\n\nexport interface UseFormControlReturn<T extends HTMLElement> {\n  id?: string;\n  required?: boolean;\n  disabled?: boolean;\n  invalid?: boolean;\n  readOnly?: boolean;\n  \"aria-required\"?: boolean;\n  \"aria-disabled\"?: boolean;\n  \"aria-invalid\"?: boolean;\n  \"aria-readonly\"?: boolean;\n  \"aria-describedby\"?: string;\n  onFocus?: JSX.EventHandlerUnion<T, FocusEvent>;\n  onBlur?: JSX.EventHandlerUnion<T, FocusEvent>;\n}\n\n/**\n * Hook that provides the props that should be spread on to\n * input fields (`input`, `select`, `textarea`, etc.).\n *\n * It provides a convenient way to control a form fields, validation\n * and helper text.\n *\n * @internal\n */\nexport function useFormControl<T extends HTMLElement>(\n  props: UseFormControlProps<T>\n): UseFormControlReturn<T> {\n  const formControl = useFormControlContext();\n\n  const focusHandler = createMemo(() => {\n    return chainHandlers(formControl?.onFocus, props.onFocus);\n  });\n\n  const blurHandler = createMemo(() => {\n    return chainHandlers(formControl?.onBlur, props.onBlur);\n  });\n\n  const [state] = createStore<UseFormControlReturn<T>>({\n    get id() {\n      return props.id ?? formControl?.state.id;\n    },\n    get required() {\n      return props.required ?? formControl?.state.required;\n    },\n    get disabled() {\n      return props.disabled ?? formControl?.state.disabled;\n    },\n    get invalid() {\n      return props.invalid ?? formControl?.state.invalid;\n    },\n    get readOnly() {\n      return props.readOnly ?? formControl?.state.readOnly;\n    },\n    get [\"aria-required\"]() {\n      return this.required ? true : undefined;\n    },\n    get [\"aria-disabled\"]() {\n      return this.disabled ? true : undefined;\n    },\n    get [\"aria-invalid\"]() {\n      return this.invalid ? true : undefined;\n    },\n    get [\"aria-readonly\"]() {\n      return this.readOnly ? true : undefined;\n    },\n    get [\"aria-describedby\"]() {\n      const labelIds: string[] = props[\"aria-describedby\"] ? [props[\"aria-describedby\"]] : [];\n\n      // Error message must be described first in all scenarios.\n      if (formControl?.state.hasErrorMessage && formControl?.state.invalid) {\n        labelIds.push(formControl.state.errorMessageId);\n      }\n\n      if (formControl?.state.hasHelperText) {\n        labelIds.push(formControl.state.helperTextId);\n      }\n\n      return labelIds.join(\" \") || undefined;\n    },\n    get onFocus() {\n      return focusHandler;\n    },\n    get onBlur() {\n      return blurHandler;\n    },\n  });\n\n  return state as UseFormControlReturn<T>;\n}\n"
  },
  {
    "path": "packages/solid/src/components/grid/__tests__/grid-item.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { css } from \"../../../styled-system\";\nimport * as styledSystem from \"../../../styled-system/system\";\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { GridItem, GridItemOptions } from \"../grid-item\";\n\ndescribe(\"GridItem\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <GridItem data-testid=\"grid-item\">GridItem</GridItem>);\n    const gridItem = screen.getByTestId(\"grid-item\");\n\n    // assert\n    expect(gridItem).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <GridItem data-testid=\"grid-item\">GridItem</GridItem>);\n    const gridItem = screen.getByTestId(\"grid-item\");\n\n    // assert\n    expect(gridItem).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <GridItem data-testid=\"grid-item\" as=\"span\">\n        GridItem\n      </GridItem>\n    ));\n    const gridItem = screen.getByTestId(\"grid-item\");\n\n    // assert\n    expect(gridItem).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"GridItem\";\n\n    // act\n    renderWithHopeProvider(() => <GridItem data-testid=\"grid-item\">{children}</GridItem>);\n    const gridItem = screen.getByTestId(\"grid-item\");\n\n    // assert\n    expect(gridItem).toHaveTextContent(children);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <GridItem data-testid=\"grid-item\">GridItem</GridItem>);\n    const gridItem = screen.getByTestId(\"grid-item\");\n\n    // assert\n    expect(gridItem).toHaveClass(\"hope-grid-item\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(GridItem.toString()).toBe(\".hope-grid-item\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <GridItem data-testid=\"grid-item\" class={stubClass}>\n        GridItem\n      </GridItem>\n    ));\n    const gridItem = screen.getByTestId(\"grid-item\");\n\n    // assert\n    expect(gridItem).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <GridItem data-testid=\"grid-item\" className={stubClass}>\n        GridItem\n      </GridItem>\n    ));\n    const gridItem = screen.getByTestId(\"grid-item\");\n\n    // assert\n    expect(gridItem).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <GridItem data-testid=\"grid-item\" classList={{ [stubClass]: true }}>\n        GridItem\n      </GridItem>\n    ));\n    const gridItem = screen.getByTestId(\"grid-item\");\n\n    // assert\n    expect(gridItem).toHaveClass(stubClass);\n  });\n\n  it(\"should renders all the allowed shorthand style props\", () => {\n    // arrange\n    const shorthandProps: GridItemOptions = {\n      area: \"a\",\n      colSpan: \"full\",\n      colStart: \"1\",\n      colEnd: \"5\",\n      rowSpan: \"4\",\n      rowStart: \"1\",\n      rowEnd: \"5\",\n    };\n\n    const stubClassName = css({})();\n\n    jest.spyOn(styledSystem, \"createStyledSystemClass\").mockReturnValue(stubClassName);\n\n    // act\n    renderWithHopeProvider(() => <GridItem {...shorthandProps}>GridItem</GridItem>);\n\n    expect(styledSystem.createStyledSystemClass).toHaveBeenCalledWith(\n      expect.objectContaining({\n        gridArea: shorthandProps.area,\n        gridColumn: `1 / -1`, // beacause colSpan is `full`\n        gridColumnStart: shorthandProps.colStart,\n        gridColumnEnd: shorthandProps.colEnd,\n        gridRow: `span ${shorthandProps.rowSpan} / span ${shorthandProps.rowSpan}`,\n        gridRowStart: shorthandProps.rowStart,\n        gridRowEnd: shorthandProps.rowEnd,\n      }),\n      [undefined, undefined] // __baseStyles\n    );\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/grid/__tests__/grid.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { css } from \"../../../styled-system\";\nimport * as styledSystem from \"../../../styled-system/system\";\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { Grid, GridOptions } from \"../grid\";\n\ndescribe(\"Grid\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Grid data-testid=\"grid\">Grid</Grid>);\n    const grid = screen.getByTestId(\"grid\");\n\n    // assert\n    expect(grid).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <Grid data-testid=\"grid\">Grid</Grid>);\n    const grid = screen.getByTestId(\"grid\");\n\n    // assert\n    expect(grid).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <Grid data-testid=\"grid\" as=\"span\">\n        Grid\n      </Grid>\n    ));\n    const grid = screen.getByTestId(\"grid\");\n\n    // assert\n    expect(grid).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"Grid\";\n\n    // act\n    renderWithHopeProvider(() => <Grid data-testid=\"grid\">{children}</Grid>);\n    const grid = screen.getByTestId(\"grid\");\n\n    // assert\n    expect(grid).toHaveTextContent(children);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <Grid data-testid=\"grid\">Grid</Grid>);\n    const grid = screen.getByTestId(\"grid\");\n\n    // assert\n    expect(grid).toHaveClass(\"hope-grid\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(Grid.toString()).toBe(\".hope-grid\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Grid data-testid=\"grid\" class={stubClass}>\n        Grid\n      </Grid>\n    ));\n    const grid = screen.getByTestId(\"grid\");\n\n    // assert\n    expect(grid).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <Grid data-testid=\"grid\" className={stubClass}>\n        Grid\n      </Grid>\n    ));\n    const grid = screen.getByTestId(\"grid\");\n\n    // assert\n    expect(grid).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Grid data-testid=\"grid\" classList={{ [stubClass]: true }}>\n        Grid\n      </Grid>\n    ));\n    const grid = screen.getByTestId(\"grid\");\n\n    // assert\n    expect(grid).toHaveClass(stubClass);\n  });\n\n  it(\"should renders all the allowed shorthand style props\", () => {\n    // arrange\n    const shorthandProps: GridOptions = {\n      autoFlow: \"column\",\n      autoColumns: \"fr\",\n      autoRows: \"max\",\n      templateAreas: \"'a b b' 'a c d'\",\n      templateColumns: \"repeat(12, 1fr)\",\n      templateRows: \"repeat(4, 1fr)\",\n    };\n\n    const stubClassName = css({})();\n\n    jest.spyOn(styledSystem, \"createStyledSystemClass\").mockReturnValue(stubClassName);\n\n    // act\n    renderWithHopeProvider(() => <Grid {...shorthandProps}>Grid</Grid>);\n\n    // assert\n    expect(styledSystem.createStyledSystemClass).toHaveBeenCalledWith(\n      expect.objectContaining({\n        gridAutoFlow: shorthandProps.autoFlow,\n        gridAutoColumns: shorthandProps.autoColumns,\n        gridAutoRows: shorthandProps.autoRows,\n        gridTemplateAreas: shorthandProps.templateAreas,\n        gridTemplateColumns: shorthandProps.templateColumns,\n        gridTemplateRows: shorthandProps.templateRows,\n      }),\n      [undefined, undefined] // __baseStyles\n    );\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/grid/__tests__/simple-grid.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { css } from \"../../../styled-system\";\nimport * as styledSystem from \"../../../styled-system/system\";\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { SimpleGrid, SimpleGridOptions } from \"../simple-grid\";\n\ndescribe(\"SimpleGrid\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <SimpleGrid data-testid=\"simple-grid\">SimpleGrid</SimpleGrid>);\n    const simpleGrid = screen.getByTestId(\"simple-grid\");\n\n    // assert\n    expect(simpleGrid).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <SimpleGrid data-testid=\"simple-grid\">SimpleGrid</SimpleGrid>);\n    const simpleGrid = screen.getByTestId(\"simple-grid\");\n\n    // assert\n    expect(simpleGrid).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <SimpleGrid data-testid=\"simple-grid\" as=\"span\">\n        SimpleGrid\n      </SimpleGrid>\n    ));\n    const simpleGrid = screen.getByTestId(\"simple-grid\");\n\n    // assert\n    expect(simpleGrid).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"SimpleGrid\";\n\n    // act\n    renderWithHopeProvider(() => <SimpleGrid data-testid=\"simple-grid\">{children}</SimpleGrid>);\n    const simpleGrid = screen.getByTestId(\"simple-grid\");\n\n    // assert\n    expect(simpleGrid).toHaveTextContent(children);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <SimpleGrid data-testid=\"simple-grid\">SimpleGrid</SimpleGrid>);\n    const simpleGrid = screen.getByTestId(\"simple-grid\");\n\n    // assert\n    expect(simpleGrid).toHaveClass(\"hope-simple-grid\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(SimpleGrid.toString()).toBe(\".hope-simple-grid\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <SimpleGrid data-testid=\"simple-grid\" class={stubClass}>\n        SimpleGrid\n      </SimpleGrid>\n    ));\n    const simpleGrid = screen.getByTestId(\"simple-grid\");\n\n    // assert\n    expect(simpleGrid).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <SimpleGrid data-testid=\"simple-grid\" className={stubClass}>\n        SimpleGrid\n      </SimpleGrid>\n    ));\n    const simpleGrid = screen.getByTestId(\"simple-grid\");\n\n    // assert\n    expect(simpleGrid).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <SimpleGrid data-testid=\"simple-grid\" classList={{ [stubClass]: true }}>\n        SimpleGrid\n      </SimpleGrid>\n    ));\n    const simpleGrid = screen.getByTestId(\"simple-grid\");\n\n    // assert\n    expect(simpleGrid).toHaveClass(stubClass);\n  });\n\n  it(\"should renders all the allowed shorthand style props\", () => {\n    // arrange\n    const shorthandProps: SimpleGridOptions = {\n      autoFlow: \"column\",\n      autoColumns: \"fr\",\n      autoRows: \"max\",\n      templateAreas: \"'a b b' 'a c d'\",\n      templateColumns: \"repeat(12, 1fr)\",\n      templateRows: \"repeat(4, 1fr)\",\n    };\n\n    const stubClassName = css({})();\n\n    jest.spyOn(styledSystem, \"createStyledSystemClass\").mockReturnValue(stubClassName);\n\n    // act\n    renderWithHopeProvider(() => <SimpleGrid {...shorthandProps}>SimpleGrid</SimpleGrid>);\n\n    // assert\n    expect(styledSystem.createStyledSystemClass).toHaveBeenCalledWith(\n      expect.objectContaining({\n        gridAutoFlow: shorthandProps.autoFlow,\n        gridAutoColumns: shorthandProps.autoColumns,\n        gridAutoRows: shorthandProps.autoRows,\n        gridTemplateAreas: shorthandProps.templateAreas,\n        gridTemplateColumns: shorthandProps.templateColumns,\n        gridTemplateRows: shorthandProps.templateRows,\n      }),\n      [undefined, undefined] // __baseStyles\n    );\n  });\n\n  it(\"should apply templateColumns styles based on the minChildWidth prop\", () => {\n    // arrange\n    const stubMinChildWitdh = \"120px\";\n    const stubClassName = css({})();\n\n    jest.spyOn(styledSystem, \"createStyledSystemClass\").mockReturnValue(stubClassName);\n\n    // act\n    renderWithHopeProvider(() => (\n      <SimpleGrid minChildWidth={stubMinChildWitdh}>SimpleGrid</SimpleGrid>\n    ));\n\n    // assert\n    expect(styledSystem.createStyledSystemClass).toHaveBeenCalledWith(\n      expect.objectContaining({\n        gridTemplateColumns: `repeat(auto-fit, minmax(${stubMinChildWitdh}, 1fr))`,\n      }),\n      [undefined, undefined] // __baseStyles\n    );\n  });\n\n  it(\"should convert minChildWidth number to pixels when applying templateColumns styles\", () => {\n    // arrange\n    const stubMinChildWitdh = 120;\n    const stubClassName = css({})();\n\n    jest.spyOn(styledSystem, \"createStyledSystemClass\").mockReturnValue(stubClassName);\n\n    // act\n    renderWithHopeProvider(() => (\n      <SimpleGrid minChildWidth={stubMinChildWitdh}>SimpleGrid</SimpleGrid>\n    ));\n\n    // assert\n    expect(styledSystem.createStyledSystemClass).toHaveBeenCalledWith(\n      expect.objectContaining({\n        gridTemplateColumns: `repeat(auto-fit, minmax(${stubMinChildWitdh}px, 1fr))`,\n      }),\n      [undefined, undefined] // __baseStyles\n    );\n  });\n\n  it(\"should apply templateColumns styles based on the columns prop\", () => {\n    // arrange\n    const stubColumns = 12;\n    const stubClassName = css({})();\n\n    jest.spyOn(styledSystem, \"createStyledSystemClass\").mockReturnValue(stubClassName);\n\n    // act\n    renderWithHopeProvider(() => <SimpleGrid columns={stubColumns}>SimpleGrid</SimpleGrid>);\n\n    // assert\n    expect(styledSystem.createStyledSystemClass).toHaveBeenCalledWith(\n      expect.objectContaining({\n        gridTemplateColumns: `repeat(${stubColumns}, minmax(0, 1fr))`,\n      }),\n      [undefined, undefined] // __baseStyles\n    );\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/grid/grid-item.tsx",
    "content": "import { Property } from \"csstype\";\nimport { splitProps } from \"solid-js\";\n\nimport { ResponsiveProps, ResponsiveValue } from \"../../styled-system/types\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { mapKeys } from \"../../utils/function\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\n\ntype GridSpanValue = string | number | \"auto\" | \"full\";\n\nexport type GridItemOptions = ResponsiveProps<{\n  area?: Property.GridArea;\n  colSpan?: GridSpanValue;\n  colStart?: Property.GridColumnStart;\n  colEnd?: Property.GridColumnEnd;\n  rowSpan?: GridSpanValue;\n  rowStart?: Property.GridRowStart;\n  rowEnd?: Property.GridRowEnd;\n}>;\n\nexport type GridItemProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, GridItemOptions>;\n\n/**\n * Utility function to apply a column or row span to the GridItem.\n */\nfunction spanFn(span?: ResponsiveValue<GridSpanValue>) {\n  if (span === null || span === undefined) {\n    return;\n  }\n\n  return mapKeys(span, value => {\n    switch (value) {\n      case \"auto\":\n        return \"auto\";\n      case \"full\":\n        return \"1 / -1\";\n      default:\n        return `span ${value} / span ${value}`;\n    }\n  });\n}\n\nconst hopeGridItemClass = \"hope-grid-item\";\n\n/**\n * Component used as a child of Grid to control the span, and start positions within the grid\n */\nexport function GridItem<C extends ElementType = \"div\">(props: GridItemProps<C>) {\n  const [local, others] = splitProps(props, [\n    \"class\",\n    \"area\",\n    \"colSpan\",\n    \"colStart\",\n    \"colEnd\",\n    \"rowSpan\",\n    \"rowStart\",\n    \"rowEnd\",\n  ]);\n\n  const classes = () => classNames(local.class, hopeGridItemClass);\n\n  return (\n    <Box\n      class={classes()}\n      gridArea={local.area}\n      gridColumn={spanFn(local.colSpan)}\n      gridRow={spanFn(local.rowSpan)}\n      gridColumnStart={local.colStart}\n      gridColumnEnd={local.colEnd}\n      gridRowStart={local.rowStart}\n      gridRowEnd={local.rowEnd}\n      {...others}\n    />\n  );\n}\n\nGridItem.toString = () => createClassSelector(hopeGridItemClass);\n"
  },
  {
    "path": "packages/solid/src/components/grid/grid.tsx",
    "content": "import { Property } from \"csstype\";\nimport { splitProps } from \"solid-js\";\n\nimport { ResponsiveProps } from \"../../styled-system/types\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\n\nexport type GridOptions = ResponsiveProps<{\n  autoFlow?: Property.GridAutoFlow;\n  autoColumns?: Property.GridAutoColumns;\n  autoRows?: Property.GridAutoRows;\n  templateAreas?: Property.GridTemplateAreas;\n  templateColumns?: Property.GridTemplateColumns;\n  templateRows?: Property.GridTemplateRows;\n}>;\n\nexport type GridProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, GridOptions>;\n\nconst hopeGridClass = \"hope-grid\";\n\n/**\n * Hope UI component used to create grid layouts.\n * It renders a `div` with `display: grid` and comes with helpful style shorthand.\n */\nexport function Grid<C extends ElementType = \"div\">(props: GridProps<C>) {\n  const [local, others] = splitProps(props, [\n    \"class\",\n    \"autoFlow\",\n    \"autoColumns\",\n    \"autoRows\",\n    \"templateAreas\",\n    \"templateColumns\",\n    \"templateRows\",\n  ]);\n\n  const classes = () => classNames(local.class, hopeGridClass);\n\n  return (\n    <Box\n      class={classes()}\n      display=\"grid\"\n      gridAutoFlow={local.autoFlow}\n      gridAutoColumns={local.autoColumns}\n      gridAutoRows={local.autoRows}\n      gridTemplateAreas={local.templateAreas}\n      gridTemplateColumns={local.templateColumns}\n      gridTemplateRows={local.templateRows}\n      {...others}\n    />\n  );\n}\n\nGrid.toString = () => createClassSelector(hopeGridClass);\n"
  },
  {
    "path": "packages/solid/src/components/grid/index.ts",
    "content": "export * from \"./grid\";\nexport * from \"./grid-item\";\nexport * from \"./simple-grid\";\n"
  },
  {
    "path": "packages/solid/src/components/grid/simple-grid.tsx",
    "content": "import { Property } from \"csstype\";\nimport { splitProps } from \"solid-js\";\n\nimport { ResponsiveValue, SizeScaleValue } from \"../../styled-system/types\";\nimport { mapResponsive } from \"../../styled-system/utils\";\nimport { isNull, isNumber } from \"../../utils/assertion\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { Grid, GridOptions } from \"./grid\";\n\nexport interface SimpleGridOptions extends GridOptions {\n  /**\n   * The width at which child elements will break into columns.\n   * Pass a number for pixel values or a string for any other valid CSS length.\n   */\n  minChildWidth?: ResponsiveValue<Property.MinWidth<SizeScaleValue> | number>;\n\n  /**\n   * The number of columns\n   */\n  columns?: ResponsiveValue<number>;\n}\n\nexport type SimpleGridProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, SimpleGridOptions>;\n\nconst hopeSimpleGridClass = \"hope-simple-grid\";\n\nfunction toPx(n: string | number) {\n  return isNumber(n) ? `${n}px` : n;\n}\n\nfunction widthToColumns(width: any) {\n  return mapResponsive(width, value =>\n    isNull(value) ? null : `repeat(auto-fit, minmax(${toPx(value)}, 1fr))`\n  );\n}\n\nfunction countToColumns(count: any) {\n  return mapResponsive(count, value => (isNull(value) ? null : `repeat(${value}, minmax(0, 1fr))`));\n}\n\n/**\n * SimpleGrid make its easy to create responsive grid layouts.\n */\nexport function SimpleGrid<C extends ElementType = \"div\">(props: SimpleGridProps<C>) {\n  const [local, others] = splitProps(props, [\"class\", \"minChildWidth\", \"columns\"]);\n\n  const classes = () => classNames(local.class, hopeSimpleGridClass);\n\n  const templateColumns = () => {\n    return local.minChildWidth\n      ? widthToColumns(local.minChildWidth)\n      : countToColumns(local.columns);\n  };\n\n  return <Grid class={classes()} templateColumns={templateColumns()} {...others} />;\n}\n\nSimpleGrid.toString = () => createClassSelector(hopeSimpleGridClass);\n"
  },
  {
    "path": "packages/solid/src/components/heading/heading.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css } from \"../../styled-system/stitches.config\";\nimport { textStyles } from \"../text/text.styles\";\n\nexport const headingStyles = css(textStyles, {\n  fontWeight: \"$semibold\",\n});\n\nexport type HeadingVariants = VariantProps<typeof headingStyles>;\n"
  },
  {
    "path": "packages/solid/src/components/heading/heading.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../test-utils\";\nimport { Heading, HeadingProps } from \"./heading\";\nimport { headingStyles } from \"./heading.styles\";\n\ndescribe(\"Heading\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Heading data-testid=\"heading\">Heading</Heading>);\n    const heading = screen.getByTestId(\"heading\");\n\n    // assert\n    expect(heading).toBeInTheDocument();\n  });\n\n  it(\"should render <h2> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <Heading data-testid=\"heading\">Heading</Heading>);\n    const heading = screen.getByTestId(\"heading\");\n\n    // assert\n    expect(heading).toBeInstanceOf(HTMLHeadingElement);\n  });\n\n  it(\"should render <h> tag based on the level prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <Heading data-testid=\"heading\" level=\"3\">\n        Heading\n      </Heading>\n    ));\n    const heading = screen.getByTestId(\"heading\");\n\n    // assert\n    expect(heading).toBeInstanceOf(HTMLHeadingElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <Heading data-testid=\"heading\" as=\"span\">\n        Heading\n      </Heading>\n    ));\n    const heading = screen.getByTestId(\"heading\");\n\n    // assert\n    expect(heading).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"Heading\";\n\n    // act\n    renderWithHopeProvider(() => <Heading data-testid=\"heading\">{children}</Heading>);\n    const heading = screen.getByTestId(\"heading\");\n\n    // assert\n    expect(heading).toHaveTextContent(children);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <Heading data-testid=\"heading\">Heading</Heading>);\n    const heading = screen.getByTestId(\"heading\");\n\n    // assert\n    expect(heading).toHaveClass(\"hope-heading\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(Heading.toString()).toBe(\".hope-heading\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Heading data-testid=\"heading\" class={stubClass}>\n        Heading\n      </Heading>\n    ));\n    const heading = screen.getByTestId(\"heading\");\n\n    // assert\n    expect(heading).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Heading data-testid=\"heading\" class={stubClass}>\n        Heading\n      </Heading>\n    ));\n    const heading = screen.getByTestId(\"heading\");\n\n    // assert\n    expect(heading).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Heading data-testid=\"heading\" classList={{ [stubClass]: true }}>\n        Heading\n      </Heading>\n    ));\n    const heading = screen.getByTestId(\"heading\");\n\n    // assert\n    expect(heading).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from variants prop\", () => {\n    // arrange\n    const variantProps: HeadingProps<\"h2\"> = {\n      size: \"4xl\",\n    };\n\n    const headingClass = headingStyles(variantProps);\n\n    // act\n    renderWithHopeProvider(() => (\n      <Heading data-testid=\"heading\" {...variantProps}>\n        Heading\n      </Heading>\n    ));\n    const heading = screen.getByTestId(\"heading\");\n\n    // assert\n    expect(heading).toHaveClass(headingClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/heading/heading.tsx",
    "content": "import { mergeProps, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps, SinglePartComponentStyleConfig } from \"../types\";\nimport { headingStyles, HeadingVariants } from \"./heading.styles\";\n\ntype HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6 | \"1\" | \"2\" | \"3\" | \"4\" | \"5\" | \"6\";\n\ninterface HeadingOptions extends HeadingVariants {\n  /**\n   * The level of heading to be rendered. For example `3` will render an h3.\n   */\n  level?: HeadingLevel;\n}\n\nexport type HeadingProps<C extends ElementType = \"h2\"> = HTMLHopeProps<C, HeadingOptions>;\n\nexport type HeadingStyleConfig = SinglePartComponentStyleConfig<HeadingOptions>;\n\nconst hopeHeadingClass = \"hope-heading\";\n\n/**\n * Headings are used for rendering headlines.\n * It renders an <h2> tag by default.\n */\nexport function Heading<C extends ElementType = \"h2\">(props: HeadingProps<C>) {\n  const theme = useStyleConfig().Heading;\n\n  const defaultProps: HeadingProps<\"h2\"> = {\n    as: \"h2\",\n    level: theme?.defaultProps?.level,\n    size: theme?.defaultProps?.size,\n  };\n\n  const propsWithDefault: HeadingProps<\"h2\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault, [\"class\", \"as\", \"level\", \"size\"]);\n\n  const classes = () =>\n    classNames(local.class, hopeHeadingClass, headingStyles({ size: local.size }));\n\n  // create an `h` tag with the level or return the `as` prop\n  const asProp = () => (local.level ? (`h${local.level}` as ElementType) : local.as);\n\n  return <Box as={asProp()} class={classes()} __baseStyle={theme?.baseStyle} {...others} />;\n}\n\nHeading.toString = () => createClassSelector(hopeHeadingClass);\n"
  },
  {
    "path": "packages/solid/src/components/heading/index.ts",
    "content": "export * from \"./heading\";\nexport * from \"./heading.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/icon/create-icon.tsx",
    "content": "import { JSX } from \"solid-js\";\n\nimport { createClassSelector } from \"../../utils/css\";\nimport { ElementType } from \"../types\";\nimport { hopeIconClass, Icon, IconProps } from \"./icon\";\n\ninterface CreateIconOptions {\n  /**\n   * The icon `svg` viewBox\n   * @default \"0 0 24 24\"\n   */\n  viewBox?: string;\n\n  // `path` needs to be a function that return JSX because in SolidJS JSX create real DOM element.\n  // So if `path` is just a JSX.Element, the same generated DOM element will be moved to the next call of the component that use it.\n  /**\n   * A function that return the `svg` path or group element\n   * @type () => JSX.Element | JSX.Element[]\n   */\n  path: () => JSX.Element | JSX.Element[];\n\n  /**\n   * Default props automatically passed to the component; overwriteable\n   */\n  defaultProps?: IconProps<\"svg\">;\n}\n\nexport function createIcon(options: CreateIconOptions) {\n  const { viewBox = \"0 0 24 24\", defaultProps = {} } = options;\n\n  const IconComponent = <C extends ElementType = \"svg\">(props: IconProps<C>) => {\n    return (\n      <Icon viewBox={viewBox} {...defaultProps} {...props}>\n        {options.path}\n      </Icon>\n    );\n  };\n\n  IconComponent.toString = () => createClassSelector(hopeIconClass);\n\n  return IconComponent;\n}\n"
  },
  {
    "path": "packages/solid/src/components/icon/icon.styles.ts",
    "content": "import { css } from \"../../styled-system/stitches.config\";\n\nexport const iconStyles = css({\n  display: \"inline-block\",\n  flexShrink: 0,\n  boxSize: \"1em\",\n  color: \"currentColor\",\n  lineHeight: \"1em\",\n  verticalAlign: \"middle\",\n});\n"
  },
  {
    "path": "packages/solid/src/components/icon/icon.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { IconCheckCircleSolid } from \"../icons/IconCheckCircleSolid\";\nimport { renderWithHopeProvider } from \"../test-utils\";\nimport { Icon } from \"./icon\";\nimport { iconStyles } from \"./icon.styles\";\n\ndescribe(\"Icon\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Icon data-testid=\"icon\" as={IconCheckCircleSolid} />);\n    const icon = screen.getByTestId(\"icon\");\n\n    // assert\n    expect(icon).toBeInTheDocument();\n  });\n\n  it(\"should render <svg> tag with children\", () => {\n    // arrange\n    const path = (\n      <g fill=\"none\">\n        <path\n          fill-rule=\"evenodd\"\n          clip-rule=\"evenodd\"\n          d=\"M10 2a1 1 0 0 1 1 1v1a1 1 0 1 1-2 0V3a1 1 0 0 1 1-1zm4 8a4 4 0 1 1-8 0a4 4 0 0 1 8 0zm-.464 4.95l.707.707a1 1 0 0 0 1.414-1.414l-.707-.707a1 1 0 0 0-1.414 1.414zm2.12-10.607a1 1 0 0 1 0 1.414l-.706.707a1 1 0 1 1-1.414-1.414l.707-.707a1 1 0 0 1 1.414 0zM17 11a1 1 0 1 0 0-2h-1a1 1 0 1 0 0 2h1zm-7 4a1 1 0 0 1 1 1v1a1 1 0 1 1-2 0v-1a1 1 0 0 1 1-1zM5.05 6.464A1 1 0 1 0 6.465 5.05l-.708-.707a1 1 0 0 0-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 0 1-1.414-1.414l.707-.707a1 1 0 0 1 1.414 1.414zM4 11a1 1 0 1 0 0-2H3a1 1 0 0 0 0 2h1z\"\n          fill=\"currentColor\"\n        ></path>\n      </g>\n    );\n\n    // act\n    renderWithHopeProvider(() => (\n      <Icon data-testid=\"icon\" viewBox=\"0 0 20 20\">\n        {path}\n      </Icon>\n    ));\n    const icon = screen.getByTestId(\"icon\");\n\n    // assert\n    expect(icon).toBeInstanceOf(SVGElement);\n    expect(icon.querySelector(\"g\")).toBe(path);\n  });\n\n  // it(\"should render svg component provided with the as prop\", () => {\n  //   // act\n  //   renderWithHopeProvider(() => <Icon data-testid=\"icon\" as={IconCheckCircle} />);\n  //   const icon = screen.getByTestId(\"icon\");\n\n  //   // assert\n  //   expect(icon).toBe(<IconCheckCircle />);\n  // });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <Icon data-testid=\"icon\" as={IconCheckCircleSolid} />);\n    const icon = screen.getByTestId(\"icon\");\n\n    // assert\n    expect(icon).toHaveClass(\"hope-icon\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(Icon.toString()).toBe(\".hope-icon\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Icon class={stubClass} data-testid=\"icon\" as={IconCheckCircleSolid} />\n    ));\n    const icon = screen.getByTestId(\"icon\");\n\n    // assert\n    expect(icon).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <Icon className={stubClass} data-testid=\"icon\" as={IconCheckCircleSolid} />\n    ));\n\n    const icon = screen.getByTestId(\"icon\");\n\n    // assert\n    expect(icon).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Icon classList={{ [stubClass]: true }} data-testid=\"icon\" as={IconCheckCircleSolid} />\n    ));\n    const icon = screen.getByTestId(\"icon\");\n\n    // assert\n    expect(icon).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from iconStyles\", () => {\n    // arrange\n    const iconClass = iconStyles();\n\n    // act\n    renderWithHopeProvider(() => <Icon data-testid=\"icon\" as={IconCheckCircleSolid} />);\n    const icon = screen.getByTestId(\"icon\");\n\n    // assert\n    expect(icon).toHaveClass(iconClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/icon/icon.tsx",
    "content": "import { mergeProps, Show, splitProps } from \"solid-js\";\n\nimport { isString } from \"../../utils/assertion\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { iconStyles } from \"./icon.styles\";\n\nconst fallbackIcon = {\n  viewBox: \"0 0 24 24\",\n  path: () => (\n    <path\n      stroke=\"currentColor\"\n      stroke-linecap=\"round\"\n      stroke-linejoin=\"round\"\n      stroke-width=\"2\"\n      d=\"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z\"\n    />\n  ),\n};\n\nexport type IconProps<C extends ElementType = \"svg\"> = HTMLHopeProps<C>;\n\nexport const hopeIconClass = \"hope-icon\";\n\nexport function Icon<C extends ElementType = \"svg\">(props: IconProps<C>) {\n  const defaultProps: IconProps<\"svg\"> = {\n    viewBox: fallbackIcon.viewBox,\n  };\n\n  const propsWithDefault: IconProps<\"svg\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault, [\"as\", \"class\", \"children\", \"viewBox\"]);\n\n  const classes = () => classNames(local.class, hopeIconClass, iconStyles());\n\n  /**\n   * If the `as` prop is a component (ex: if you're using an icon library).\n   * Note: anyone passing the `as` prop, should manage the `viewBox` from the external component\n   */\n  const shouldRenderComponent = () => local.as && !isString(local.as);\n\n  return (\n    <Show\n      when={shouldRenderComponent()}\n      fallback={\n        <hope.svg class={classes()} viewBox={local.viewBox} {...others}>\n          <Show when={local.children} fallback={fallbackIcon.path}>\n            {local.children}\n          </Show>\n        </hope.svg>\n      }\n    >\n      <Box as={local.as} class={classes()} {...others} />\n    </Show>\n  );\n}\n\nIcon.toString = () => createClassSelector(hopeIconClass);\n"
  },
  {
    "path": "packages/solid/src/components/icon/index.ts",
    "content": "export * from \"./create-icon\";\nexport * from \"./icon\";\nexport * from \"./icon.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/icon-button/icon-button.stories.tsx",
    "content": "import { action } from \"@storybook/addon-actions\";\nimport { JSX } from \"solid-js\";\n\nimport { HopeWrapper } from \"../storybook-utils\";\nimport { IconButton } from \"./icon-button\";\n\nfunction IconCart(props: JSX.SvgSVGAttributes<SVGSVGElement>) {\n  return (\n    <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width=\"1em\"\n      height=\"1em\"\n      viewBox=\"0 0 20 20\"\n      preserveAspectRatio=\"xMidYMid meet\"\n      {...props}\n    >\n      <g fill=\"none\">\n        <path\n          d=\"M3 1a1 1 0 0 0 0 2h1.22l.305 1.222a.997.997 0 0 0 .01.042l1.358 5.43l-.893.892C3.74 11.846 4.632 14 6.414 14H15a1 1 0 0 0 0-2H6.414l1-1H14a1 1 0 0 0 .894-.553l3-6A1 1 0 0 0 17 3H6.28l-.31-1.243A1 1 0 0 0 5 1H3z\"\n          fill=\"currentColor\"\n        ></path>\n        <path d=\"M16 16.5a1.5 1.5 0 1 1-3 0a1.5 1.5 0 0 1 3 0z\" fill=\"currentColor\"></path>\n        <path d=\"M6.5 18a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3z\" fill=\"currentColor\"></path>\n      </g>\n    </svg>\n  );\n}\n\nexport default {\n  title: \"General/IconButton\",\n  component: IconButton,\n  parameters: { layout: \"centered\" },\n  decorators: [\n    (Story: any) => (\n      <HopeWrapper>\n        <div style={{ display: \"flex\", \"justify-content\": \"center\", width: \"90vw\" }}>\n          <Story />\n        </div>\n      </HopeWrapper>\n    ),\n  ],\n  argTypes: {\n    variant: {\n      control: { type: \"select\" },\n      options: [\"solid\", \"subtle\", \"outline\", \"dashed\", \"ghost\", \"default\"],\n    },\n    colorScheme: {\n      control: { type: \"select\" },\n      options: [\"primary\", \"neutral\", \"success\", \"info\", \"warning\", \"danger\"],\n    },\n    size: {\n      control: { type: \"select\" },\n      options: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\"],\n    },\n    compact: {\n      control: { type: \"boolean\" },\n    },\n    loading: {\n      control: { type: \"boolean\" },\n    },\n    disabled: {\n      control: { type: \"boolean\" },\n    },\n    \"aria-label\": {\n      control: \"text\",\n    },\n  },\n  args: {\n    variant: \"solid\",\n    colorScheme: \"primary\",\n    size: \"md\",\n    compact: false,\n    loading: false,\n    disabled: false,\n    \"aria-label\": \"Add to cart\",\n  },\n};\n\nexport const Default = (args: any) => (\n  <IconButton icon={<IconCart />} onClick={action(\"clicked\")} {...args} />\n);\nDefault.storyName = \"IconButton\";\n"
  },
  {
    "path": "packages/solid/src/components/icon-button/icon-button.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { buttonStyles } from \"../button/button.styles\";\nimport { IconCheckCircleSolid } from \"../icons/IconCheckCircleSolid\";\nimport { renderWithHopeProvider } from \"../test-utils\";\nimport { IconButton, IconButtonOptions } from \"./icon-button\";\n\ndescribe(\"IconButton\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <IconButton aria-label=\"User\" icon={<IconCheckCircleSolid />} />);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toBeInTheDocument();\n  });\n\n  it(\"should render <button> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <IconButton aria-label=\"User\" icon={<IconCheckCircleSolid />} />);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toBeInstanceOf(HTMLButtonElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <IconButton as=\"a\" aria-label=\"User\" icon={<IconCheckCircleSolid />} />\n    ));\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toBeInstanceOf(HTMLAnchorElement);\n  });\n\n  it(\"should have type=button\", () => {\n    // act\n    renderWithHopeProvider(() => <IconButton aria-label=\"User\" icon={<IconCheckCircleSolid />} />);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveAttribute(\"type\", \"button\");\n  });\n\n  it(\"should have role=button\", () => {\n    // act\n    renderWithHopeProvider(() => <IconButton aria-label=\"User\" icon={<IconCheckCircleSolid />} />);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveAttribute(\"role\", \"button\");\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <IconButton aria-label=\"User\" icon={<IconCheckCircleSolid />} />);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveClass(\"hope-icon-button\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(IconButton.toString()).toBe(\".hope-icon-button\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <IconButton class={stubClass} aria-label=\"User\" icon={<IconCheckCircleSolid />} />\n    ));\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <IconButton className={stubClass} aria-label=\"User\" icon={<IconCheckCircleSolid />} />\n    ));\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <IconButton\n        classList={{ [stubClass]: true }}\n        aria-label=\"User\"\n        icon={<IconCheckCircleSolid />}\n      />\n    ));\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from buttonStyles\", () => {\n    // arrange\n    const buttonClass = buttonStyles();\n\n    // act\n    renderWithHopeProvider(() => <IconButton aria-label=\"User\" icon={<IconCheckCircleSolid />} />);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveClass(buttonClass.className);\n  });\n\n  it(\"should have stitches generated class from variants prop\", () => {\n    // arrange\n    const variantProps: Omit<IconButtonOptions, \"aria-label\" | \"icon\"> = {\n      variant: \"subtle\",\n      colorScheme: \"success\",\n      size: \"lg\",\n      compact: true,\n      loading: false,\n    };\n    const buttonClass = buttonStyles(variantProps);\n\n    // act\n    renderWithHopeProvider(() => (\n      <IconButton {...variantProps} aria-label=\"User\" icon={<IconCheckCircleSolid />} />\n    ));\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveClass(buttonClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/icon-button/icon-button.tsx",
    "content": "import { JSX, Show, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Button, ButtonOptions } from \"../button/button\";\nimport { hopeIconButtonClass } from \"../button/button.styles\";\nimport { useButtonGroupContext } from \"../button/button-group\";\nimport { ElementType, HTMLHopeProps, SinglePartComponentStyleConfig } from \"../types\";\n\nexport interface IconButtonOptions\n  extends Omit<\n    ButtonOptions,\n    \"loadingText\" | \"loaderPlacement\" | \"leftIcon\" | \"rightIcon\" | \"iconSpacing\" | \"fullWidth\"\n  > {\n  /**\n   * A11y: A label that describes the button\n   */\n  \"aria-label\": string;\n\n  /**\n   * The icon to be used in the button.\n   */\n  icon: JSX.Element;\n}\n\nexport type IconButtonStyleConfig = SinglePartComponentStyleConfig<\n  Pick<IconButtonOptions, \"variant\" | \"colorScheme\" | \"size\">\n>;\n\nexport type IconButtonProps<C extends ElementType = \"button\"> = HTMLHopeProps<C, IconButtonOptions>;\n\n/**\n * IconButton composes the Button component except that it renders only an icon.\n * Since IconButton only renders an icon, you must pass the aria-label prop, so screen readers can give meaning to the button.\n */\nexport function IconButton<C extends ElementType = \"button\">(props: IconButtonProps<C>) {\n  const theme = useStyleConfig().IconButton;\n\n  const buttonGroupContext = useButtonGroupContext();\n\n  const [local, others] = splitProps(props, [\n    \"class\",\n    \"children\",\n    \"icon\",\n    \"variant\",\n    \"colorScheme\",\n    \"size\",\n    \"disabled\",\n  ]);\n\n  const variant = () =>\n    local.variant ?? buttonGroupContext?.state.variant ?? theme?.defaultProps?.variant ?? \"solid\";\n\n  const colorScheme = () => {\n    return (\n      local.colorScheme ??\n      buttonGroupContext?.state.colorScheme ??\n      theme?.defaultProps?.colorScheme ??\n      \"primary\"\n    );\n  };\n\n  const size = () =>\n    local.size ?? buttonGroupContext?.state.size ?? theme?.defaultProps?.size ?? \"md\";\n\n  const disabled = () => local.disabled ?? buttonGroupContext?.state.disabled;\n\n  const classes = () => classNames(local.class, hopeIconButtonClass);\n\n  return (\n    <Button\n      class={classes()}\n      __baseStyle={theme?.baseStyle}\n      variant={variant()}\n      colorScheme={colorScheme()}\n      size={size()}\n      disabled={disabled()}\n      {...others}\n    >\n      <Show when={local.icon} fallback={local.children}>\n        {local.icon}\n      </Show>\n    </Button>\n  );\n}\n\nIconButton.toString = () => createClassSelector(hopeIconButtonClass);\n"
  },
  {
    "path": "packages/solid/src/components/icon-button/index.ts",
    "content": "export * from \"./icon-button\";\n"
  },
  {
    "path": "packages/solid/src/components/icons/IconCaretDown.tsx",
    "content": "import { createIcon } from \"../icon/create-icon\";\n\n// radix-icon-caret-down\nexport const IconCaretDown = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M4.18179 6.18181C4.35753 6.00608 4.64245 6.00608 4.81819 6.18181L7.49999 8.86362L10.1818 6.18181C10.3575 6.00608 10.6424 6.00608 10.8182 6.18181C10.9939 6.35755 10.9939 6.64247 10.8182 6.81821L7.81819 9.81821C7.73379 9.9026 7.61934 9.95001 7.49999 9.95001C7.38064 9.95001 7.26618 9.9026 7.18179 9.81821L4.18179 6.81821C4.00605 6.64247 4.00605 6.35755 4.18179 6.18181Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "packages/solid/src/components/icons/IconCheck.tsx",
    "content": "import { createIcon } from \"../icon/create-icon\";\n\n// radix-icon-check\nexport const IconCheck = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <g fill=\"none\">\n      <path\n        d=\"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z\"\n        fill=\"currentColor\"\n        fill-rule=\"evenodd\"\n        clip-rule=\"evenodd\"\n      ></path>\n    </g>\n  ),\n});\n"
  },
  {
    "path": "packages/solid/src/components/icons/IconCheckCircleSolid.tsx",
    "content": "import { createIcon } from \"../icon/create-icon\";\n\n// carbon-checkmark-filled\nexport const IconCheckCircleSolid = createIcon({\n  viewBox: \"0 0 32 32\",\n  path: () => (\n    <>\n      <path\n        fill=\"currentColor\"\n        d=\"M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2Zm-2 19.59l-5-5L10.59 15L14 18.41L21.41 11l1.596 1.586Z\"\n      />\n      <path fill=\"none\" d=\"m14 21.591l-5-5L10.591 15L14 18.409L21.41 11l1.595 1.585L14 21.591z\" />\n    </>\n  ),\n});\n"
  },
  {
    "path": "packages/solid/src/components/icons/IconClose.tsx",
    "content": "import { createIcon } from \"../icon/create-icon\";\n\n// maki-cross\nexport const IconClose = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      fill=\"currentColor\"\n      d=\"M2.64 1.27L7.5 6.13l4.84-4.84A.92.92 0 0 1 13 1a1 1 0 0 1 1 1a.9.9 0 0 1-.27.66L8.84 7.5l4.89 4.89A.9.9 0 0 1 14 13a1 1 0 0 1-1 1a.92.92 0 0 1-.69-.27L7.5 8.87l-4.85 4.85A.92.92 0 0 1 2 14a1 1 0 0 1-1-1a.9.9 0 0 1 .27-.66L6.16 7.5L1.27 2.61A.9.9 0 0 1 1 2a1 1 0 0 1 1-1c.24.003.47.1.64.27z\"\n    />\n  ),\n});\n"
  },
  {
    "path": "packages/solid/src/components/icons/IconCloseSmall.tsx",
    "content": "import { createIcon } from \"../icon/create-icon\";\n\n// radix-icon-cross-2\nexport const IconCloseSmall = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <g fill=\"none\">\n      <path\n        d=\"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z\"\n        fill=\"currentColor\"\n        fill-rule=\"evenodd\"\n        clip-rule=\"evenodd\"\n      ></path>\n    </g>\n  ),\n});\n"
  },
  {
    "path": "packages/solid/src/components/icons/IconCrossCircle.tsx",
    "content": "import { createIcon } from \"../icon/create-icon\";\n\n// radix-icon-cross-circled\nexport const IconCrossCircle = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <g fill=\"none\">\n      <path\n        d=\"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z\"\n        fill=\"currentColor\"\n        fill-rule=\"evenodd\"\n        clip-rule=\"evenodd\"\n      ></path>\n    </g>\n  ),\n});\n"
  },
  {
    "path": "packages/solid/src/components/icons/IconExclamationCircleSolid.tsx",
    "content": "import { createIcon } from \"../icon/create-icon\";\n\n// carbon-warning-filled\nexport const IconExclamationCircleSolid = createIcon({\n  viewBox: \"0 0 32 32\",\n  path: () => (\n    <path\n      fill=\"currentColor\"\n      d=\"M16 2C8.3 2 2 8.3 2 16s6.3 14 14 14s14-6.3 14-14S23.7 2 16 2zm-1.1 6h2.2v11h-2.2V8zM16 25c-.8 0-1.5-.7-1.5-1.5S15.2 22 16 22s1.5.7 1.5 1.5S16.8 25 16 25z\"\n    />\n  ),\n});\n"
  },
  {
    "path": "packages/solid/src/components/icons/IconExclamationTriangleSolid.tsx",
    "content": "import { createIcon } from \"../icon/create-icon\";\n\n// carbon-warning-alt-filled\nexport const IconExclamationTriangleSolid = createIcon({\n  viewBox: \"0 0 32 32\",\n  path: () => (\n    <path\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n      d=\"M29.4898 29.8706C29.3402 29.9548 29.1713 29.9991 28.9996 29.9993H2.99961C2.82787 29.9991 2.65905 29.9548 2.5094 29.8706C2.35976 29.7864 2.23433 29.665 2.14521 29.5182C2.05608 29.3713 2.00626 29.2041 2.00055 29.0325C1.99485 28.8608 2.03344 28.6907 2.1126 28.5382L15.1126 3.53821C15.1971 3.37598 15.3245 3.23999 15.4808 3.14514C15.6372 3.05017 15.8167 3 15.9996 3C16.1825 3 16.362 3.05017 16.5184 3.14514C16.6748 3.23999 16.8021 3.37598 16.8866 3.53821L29.8866 28.5382C29.9658 28.6907 30.0044 28.8608 29.9986 29.0325C29.9929 29.2041 29.9431 29.3713 29.854 29.5182C29.7649 29.665 29.6395 29.7864 29.4898 29.8706ZM16.0016 6.16919V6.17029H15.9976V6.16919H16.0016ZM15.9996 25.9993C15.7029 25.9993 15.4129 25.9113 15.1662 25.7465C14.9196 25.5817 14.7273 25.3474 14.6138 25.0734C14.5996 25.0391 14.5867 25.0044 14.5752 24.9694C14.4942 24.724 14.4778 24.4613 14.5284 24.2067C14.5863 23.9156 14.7292 23.6484 14.9389 23.4386C14.9652 23.4124 14.9923 23.3872 15.0202 23.3632C15.2159 23.1945 15.4524 23.0787 15.707 23.0281C15.7433 23.0209 15.7799 23.015 15.8165 23.0105C16.0723 22.979 16.3326 23.014 16.572 23.1129L16.5736 23.1135C16.8477 23.2271 17.082 23.4193 17.2468 23.6659C17.2674 23.6968 17.2868 23.7283 17.305 23.7604C17.4322 23.9852 17.4996 24.2397 17.4996 24.4993C17.4996 24.8971 17.3416 25.2787 17.0603 25.5599C16.7789 25.8413 16.3974 25.9993 15.9996 25.9993ZM17.1246 20.9993H14.8746V11.9993H17.1246V20.9993Z\"\n    />\n  ),\n});\n"
  },
  {
    "path": "packages/solid/src/components/icons/IconInfoCircleSolid.tsx",
    "content": "import { createIcon } from \"../icon/create-icon\";\n\n// carbon-information-filled\nexport const IconInfoCircleSolid = createIcon({\n  viewBox: \"0 0 32 32\",\n  path: () => (\n    <>\n      <path\n        fill=\"none\"\n        d=\"M16 8a1.5 1.5 0 1 1-1.5 1.5A1.5 1.5 0 0 1 16 8Zm4 13.875h-2.875v-8H13v2.25h1.875v5.75H12v2.25h8Z\"\n      />\n      <path\n        fill=\"currentColor\"\n        d=\"M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2Zm0 6a1.5 1.5 0 1 1-1.5 1.5A1.5 1.5 0 0 1 16 8Zm4 16.125h-8v-2.25h2.875v-5.75H13v-2.25h4.125v8H20Z\"\n      />\n    </>\n  ),\n});\n"
  },
  {
    "path": "packages/solid/src/components/icons/IconSelector.tsx",
    "content": "import { createIcon } from \"../icon/create-icon\";\n\n// radix-icon-caret-sort\nexport const IconSelector = createIcon({\n  viewBox: \"0 0 15 15\",\n  path: () => (\n    <path\n      d=\"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z\"\n      fill=\"currentColor\"\n      fill-rule=\"evenodd\"\n      clip-rule=\"evenodd\"\n    />\n  ),\n});\n"
  },
  {
    "path": "packages/solid/src/components/icons/IconSpinner.tsx",
    "content": "import { createIcon } from \"../icon/create-icon\";\n\nexport const IconSpinner = createIcon({\n  path: () => (\n    <g fill=\"none\">\n      <path\n        opacity=\".2\"\n        fill-rule=\"evenodd\"\n        clip-rule=\"evenodd\"\n        d=\"M12 19a7 7 0 1 0 0-14a7 7 0 0 0 0 14zm0 3c5.523 0 10-4.477 10-10S17.523 2 12 2S2 6.477 2 12s4.477 10 10 10z\"\n        fill=\"currentColor\"\n      />\n      <path d=\"M2 12C2 6.477 6.477 2 12 2v3a7 7 0 0 0-7 7H2z\" fill=\"currentColor\" />\n    </g>\n  ),\n});\n"
  },
  {
    "path": "packages/solid/src/components/image/image.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../test-utils\";\nimport { Image } from \"./image\";\n\nconst src = \"https://image.xyz/source\";\nconst fallbackSrc = \"https://image.xyz/placeholder\";\n\ndescribe(\"Image\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Image data-testid=\"image\" src={src} />);\n    const image = screen.getByTestId(\"image\");\n\n    // assert\n    expect(image).toBeInTheDocument();\n  });\n\n  it(\"should render <img> tag\", () => {\n    // act\n    renderWithHopeProvider(() => <Image data-testid=\"image\" src={src} />);\n    const image = screen.getByTestId(\"image\");\n\n    // assert\n    expect(image).toBeInstanceOf(HTMLImageElement);\n  });\n\n  it(\"renders placeholder first, before image load\", async () => {\n    // act\n    renderWithHopeProvider(() => <Image data-testid=\"image\" src={src} fallbackSrc={fallbackSrc} />);\n    const image = screen.getByTestId(\"image\");\n\n    // assert\n    expect(image).toHaveAttribute(\"src\", fallbackSrc);\n  });\n\n  it(\"renders image if there is no fallback behavior defined\", async () => {\n    // act\n    renderWithHopeProvider(() => <Image data-testid=\"image\" src={src} />);\n    const image = screen.getByTestId(\"image\");\n\n    // assert\n    expect(image).toHaveAttribute(\"src\", src);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <Image data-testid=\"image\" src={src} />);\n    const image = screen.getByTestId(\"image\");\n\n    // assert\n    expect(image).toHaveClass(\"hope-image\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(Image.toString()).toBe(\".hope-image\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => <Image data-testid=\"image\" class={stubClass} src={src} />);\n    const image = screen.getByTestId(\"image\");\n\n    // assert\n    expect(image).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <Image data-testid=\"image\" className={stubClass} src={src} />\n    ));\n    const image = screen.getByTestId(\"image\");\n\n    // assert\n    expect(image).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Image data-testid=\"image\" classList={{ [stubClass]: true }} src={src} />\n    ));\n    const image = screen.getByTestId(\"image\");\n\n    // assert\n    expect(image).toHaveClass(stubClass);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/image/image.tsx",
    "content": "import { Property } from \"csstype\";\nimport { createMemo, JSX, Show, splitProps } from \"solid-js\";\n\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { OverrideProps } from \"../../utils/types\";\nimport { Box } from \"../box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { createImageLoadingStatus, CreateImageLoadingStatusProps } from \"./image.utils\";\n\ninterface ImageOptions {\n  /**\n   * The native HTML `width` attribute to the passed to the `img`\n   */\n  htmlWidth?: string | number;\n\n  /**\n   * The native HTML `height` attribute to the passed to the `img`\n   */\n  htmlHeight?: string | number;\n\n  /**\n   * Fallback image `src` to show if image is loading or image fails.\n   *\n   * Note 🚨: We recommend you use a local image.\n   */\n  fallbackSrc?: string;\n\n  /**\n   * Fallback element to show if image is loading or image fails.\n   */\n  fallback?: JSX.Element;\n\n  /**\n   * The image loading strategy.\n   */\n  loading?: \"eager\" | \"lazy\";\n\n  /**\n   * How the image to fit within its bounds.\n   * It maps to css `object-fit` property.\n   */\n  fit?: Property.ObjectFit;\n\n  /**\n   * How to align the image within its bounds.\n   * It maps to css `object-position` property.\n   */\n  align?: Property.ObjectPosition;\n\n  /**\n   * If `true`, opt out of the `fallbackSrc` logic and use as `img`.\n   */\n  ignoreFallback?: boolean;\n}\n\nexport type ImageProps<C extends ElementType = \"img\"> = OverrideProps<\n  HTMLHopeProps<C, ImageOptions>,\n  CreateImageLoadingStatusProps\n>;\n\nconst hopeImageClass = \"hope-image\";\n\n/**\n * Image renders an image with support for fallbacks\n */\nexport function Image<C extends ElementType = \"img\">(props: ImageProps<C>) {\n  const [local, loadEventProps, others] = splitProps(\n    props as ImageProps<\"img\">,\n    [\n      \"class\",\n      \"htmlWidth\",\n      \"htmlHeight\",\n      \"fallbackSrc\",\n      \"fallback\",\n      \"src\",\n      \"srcSet\",\n      \"align\",\n      \"fit\",\n      \"loading\",\n      \"ignoreFallback\",\n      \"crossOrigin\",\n    ],\n    [\"onError\", \"onLoad\"]\n  );\n\n  const shouldIgnore = () => {\n    return (\n      local.loading != null || // Defer to native `img` tag if `loading` prop is passed.\n      local.ignoreFallback ||\n      (local.fallbackSrc === undefined && local.fallback === undefined) // if the user doesn't provide any kind of fallback we should ignore it.\n    );\n  };\n\n  const status = createMemo(() =>\n    createImageLoadingStatus({ ...props, ignoreFallback: shouldIgnore() })\n  );\n\n  const sharedProps = () => ({\n    objectFit: local.fit,\n    objectPosition: local.align,\n    width: local.htmlWidth,\n    height: local.htmlHeight,\n    ...(shouldIgnore() ? loadEventProps : {}),\n    ...others,\n  });\n\n  const classes = () => classNames(local.class, hopeImageClass);\n\n  return (\n    <Show\n      when={status()() === \"loaded\"}\n      fallback={\n        <Show\n          when={local.fallback}\n          fallback={\n            <Box\n              as=\"img\"\n              src={local.fallbackSrc}\n              class=\"hope-image__placeholder\"\n              {...sharedProps}\n            />\n          }\n        >\n          {local.fallback}\n        </Show>\n      }\n    >\n      <Box\n        as=\"img\"\n        src={local.src}\n        srcSet={local.srcSet}\n        crossOrigin={local.crossOrigin}\n        loading={local.loading}\n        class={classes()}\n        {...sharedProps}\n      />\n    </Show>\n  );\n}\n\nImage.toString = () => createClassSelector(hopeImageClass);\n"
  },
  {
    "path": "packages/solid/src/components/image/image.utils.ts",
    "content": "import { createEffect, createRenderEffect, createSignal, onCleanup } from \"solid-js\";\n\nimport { callHandler } from \"../../utils/function\";\nimport { PropsOf } from \"../types\";\n\ntype NativeImageProps = PropsOf<\"img\">;\n\nexport interface CreateImageLoadingStatusProps {\n  /**\n   * The image `src` attribute.\n   */\n  src?: string;\n\n  /**\n   * The image `srcset` attribute.\n   */\n  srcSet?: string;\n\n  /**\n   * The image `sizes` attribute.\n   */\n  sizes?: string;\n\n  /**\n   * A callback for when the image `src` has been loaded.\n   */\n  onLoad?: NativeImageProps[\"onLoad\"];\n\n  /**\n   * A callback for when there was an error loading the image `src`.\n   */\n  onError?: NativeImageProps[\"onError\"];\n\n  /**\n   * If `true`, opt out of the `fallbackSrc` logic and use as `img`.\n   */\n  ignoreFallback?: boolean;\n\n  /**\n   * The key used to set the crossOrigin on the HTMLImageElement into which the image will be loaded.\n   * This tells the browser to request cross-origin access when trying to download the image data.\n   */\n  crossOrigin?: NativeImageProps[\"crossOrigin\"];\n\n  /**\n   * The image loading strategy.\n   */\n  loading?: NativeImageProps[\"loading\"];\n}\n\ntype Status = \"loading\" | \"failed\" | \"pending\" | \"loaded\";\n\ntype ImageEvent = Event & {\n  currentTarget: HTMLImageElement;\n  target: Element;\n};\n\n/**\n * Custom hook that loads an image in the browser,\n * and let's us know the `status` so we can show image\n * fallback if it is still `pending`.\n *\n * @returns the status of the image loading progress\n *\n * @example\n *\n * ```jsx\n * function App(){\n *   const status = createImage({ src: \"image.png\" })\n *   return status() === \"loaded\" ? <img src=\"image.png\" /> : <Placeholder />\n * }\n * ```\n */\nexport function createImageLoadingStatus(props: CreateImageLoadingStatusProps) {\n  const [statusState, setStatusState] = createSignal<Status>(\"pending\");\n\n  // If user opts out of the fallback/placeholder logic, let's just return 'loaded'.\n  const status = () => (props.ignoreFallback ? \"loaded\" : statusState());\n\n  let imageRef: HTMLImageElement | null = null;\n\n  const flush = () => {\n    if (imageRef) {\n      imageRef.onload = null;\n      imageRef.onerror = null;\n      imageRef = null;\n    }\n  };\n\n  const load = () => {\n    if (!props.src) {\n      return;\n    }\n\n    flush();\n\n    const img = new Image();\n    img.src = props.src;\n\n    if (props.crossOrigin) {\n      img.crossOrigin = props.crossOrigin;\n    }\n\n    if (props.srcSet) {\n      img.srcset = props.srcSet;\n    }\n\n    if (props.sizes) {\n      img.sizes = props.sizes;\n    }\n\n    if (props.loading) {\n      img.loading = props.loading;\n    }\n\n    img.onload = event => {\n      flush();\n      setStatusState(\"loaded\");\n      callHandler(props.onLoad, event as unknown as ImageEvent);\n    };\n\n    img.onerror = error => {\n      flush();\n      setStatusState(\"failed\");\n      callHandler(props.onError, error as any);\n    };\n\n    imageRef = img;\n  };\n\n  createEffect(() => {\n    setStatusState(props.src ? \"loading\" : \"pending\");\n  });\n\n  createRenderEffect(() => {\n    // If user opts out of the fallback/placeholder logic, let's bail out.\n    if (props.ignoreFallback) {\n      return undefined;\n    }\n\n    if (statusState() === \"loading\") {\n      load();\n    }\n\n    onCleanup(() => {\n      flush();\n    });\n  });\n\n  return status;\n}\n"
  },
  {
    "path": "packages/solid/src/components/image/index.ts",
    "content": "export * from \"./image\";\n"
  },
  {
    "path": "packages/solid/src/components/index.ts",
    "content": "export * from \"./accordion\";\nexport * from \"./alert\";\nexport * from \"./anchor\";\nexport * from \"./aspect-ratio\";\nexport * from \"./async-button\";\nexport * from \"./avatar\";\nexport * from \"./badge\";\nexport * from \"./box\";\nexport * from \"./breadcrumb\";\nexport * from \"./button\";\nexport * from \"./center\";\nexport * from \"./checkbox\";\nexport * from \"./circular-progress\";\nexport * from \"./close-button\";\nexport * from \"./collapse\";\nexport * from \"./container\";\nexport * from \"./divider\";\nexport * from \"./drawer\";\nexport * from \"./factory\";\nexport * from \"./flex\";\nexport * from \"./form-control\";\nexport * from \"./grid\";\nexport * from \"./heading\";\nexport * from \"./icon\";\nexport * from \"./icon-button\";\nexport * from \"./image\";\nexport * from \"./input\";\nexport * from \"./kbd\";\nexport * from \"./list\";\nexport * from \"./menu\";\nexport * from \"./modal\";\nexport * from \"./notification\";\nexport * from \"./popover\";\nexport * from \"./progress\";\nexport * from \"./radio\";\nexport * from \"./select\";\nexport * from \"./simple-select\";\nexport * from \"./skeleton\";\nexport * from \"./spacer\";\nexport * from \"./spinner\";\nexport * from \"./stack\";\nexport * from \"./switch\";\nexport * from \"./table\";\nexport * from \"./tabs\";\nexport * from \"./tag\";\nexport * from \"./text\";\nexport * from \"./textarea\";\nexport * from \"./tooltip\";\nexport * from \"./types\";\n"
  },
  {
    "path": "packages/solid/src/components/input/__tests__/input-addon.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { IconInfoCircleSolid } from \"../../icons/IconInfoCircleSolid\";\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { inputAddonStyles, InputAddonVariants } from \"../input.styles\";\nimport { InputAddon, InputLeftAddon, InputRightAddon } from \"../input-addon\";\nimport * as inputGroupModule from \"../input-group\";\n\nconst InputGroup = inputGroupModule.InputGroup;\n\nconst inputGroupContextMock: inputGroupModule.InputGroupContextValue = {\n  state: {\n    variant: \"outline\",\n    size: \"md\",\n    hasLeftElement: false,\n    hasRightElement: false,\n    hasLeftAddon: false,\n    hasRightAddon: false,\n  },\n  setHasLeftElement: jest.fn(),\n  setHasRightElement: jest.fn(),\n  setHasLeftAddon: jest.fn(),\n  setHasRightAddon: jest.fn(),\n};\n\ndescribe(\"InputAddon\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputAddon data-testid=\"input-addon\">\n          <IconInfoCircleSolid />\n        </InputAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputAddon data-testid=\"input-addon\">\n          <IconInfoCircleSolid />\n        </InputAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided by the 'as' prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputAddon data-testid=\"input-addon\" as=\"span\">\n          <IconInfoCircleSolid />\n        </InputAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputAddon data-testid=\"input-addon\" class={stubClass}>\n          <IconInfoCircleSolid />\n        </InputAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        {/* eslint-disable-next-line solid/no-react-specific-props */}\n        <InputAddon data-testid=\"input-addon\" className={stubClass}>\n          <IconInfoCircleSolid />\n        </InputAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputAddon data-testid=\"input-addon\" classList={{ [stubClass]: true }}>\n          <IconInfoCircleSolid />\n        </InputAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from variant props\", () => {\n    // arrange\n    const variantProps: InputAddonVariants = {\n      placement: \"left\",\n      variant: \"filled\",\n      size: \"lg\",\n    };\n\n    const inputAddonClass = inputAddonStyles(variantProps);\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputAddon data-testid=\"input-addon\" {...variantProps}>\n          <IconInfoCircleSolid />\n        </InputAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toHaveClass(inputAddonClass.className);\n  });\n});\n\ndescribe(\"InputLeftAddon\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputLeftAddon data-testid=\"input-addon\">\n          <IconInfoCircleSolid />\n        </InputLeftAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputLeftAddon data-testid=\"input-addon\">\n          <IconInfoCircleSolid />\n        </InputLeftAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided by the 'as' prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputLeftAddon data-testid=\"input-addon\" as=\"span\">\n          <IconInfoCircleSolid />\n        </InputLeftAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should call inputGroupContext 'setHasLeftAddon' on mount\", () => {\n    // arrange\n    jest.spyOn(inputGroupModule, \"useInputGroupContext\").mockReturnValue(inputGroupContextMock);\n\n    const stubContext = inputGroupModule.useInputGroupContext();\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputLeftAddon>\n          <IconInfoCircleSolid />\n        </InputLeftAddon>\n      </InputGroup>\n    ));\n\n    // assert\n    expect(stubContext?.setHasLeftAddon).toHaveBeenCalledWith(true);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputLeftAddon data-testid=\"input-addon\">\n          <IconInfoCircleSolid />\n        </InputLeftAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toHaveClass(\"hope-input-left-addon\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(InputLeftAddon.toString()).toBe(\".hope-input-left-addon\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputLeftAddon data-testid=\"input-addon\" class={stubClass}>\n          <IconInfoCircleSolid />\n        </InputLeftAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        {/* eslint-disable-next-line solid/no-react-specific-props */}\n        <InputLeftAddon data-testid=\"input-addon\" className={stubClass}>\n          <IconInfoCircleSolid />\n        </InputLeftAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputLeftAddon data-testid=\"input-addon\" classList={{ [stubClass]: true }}>\n          <IconInfoCircleSolid />\n        </InputLeftAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from inputAddonStyles with 'placement=left'\", () => {\n    // arrange\n    const inputAddonClass = inputAddonStyles({\n      placement: \"left\",\n    });\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputLeftAddon data-testid=\"input-addon\">\n          <IconInfoCircleSolid />\n        </InputLeftAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toHaveClass(inputAddonClass.className);\n  });\n});\n\ndescribe(\"InputRightAddon\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputRightAddon data-testid=\"input-addon\">\n          <IconInfoCircleSolid />\n        </InputRightAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputRightAddon data-testid=\"input-addon\">\n          <IconInfoCircleSolid />\n        </InputRightAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided by the 'as' prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputRightAddon data-testid=\"input-addon\" as=\"span\">\n          <IconInfoCircleSolid />\n        </InputRightAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should call inputGroupContext 'setHasRightAddon' on mount\", () => {\n    // arrange\n    jest.spyOn(inputGroupModule, \"useInputGroupContext\").mockReturnValue(inputGroupContextMock);\n\n    const stubContext = inputGroupModule.useInputGroupContext();\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputRightAddon>\n          <IconInfoCircleSolid />\n        </InputRightAddon>\n      </InputGroup>\n    ));\n\n    // assert\n    expect(stubContext?.setHasRightAddon).toHaveBeenCalledWith(true);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputRightAddon data-testid=\"input-addon\">\n          <IconInfoCircleSolid />\n        </InputRightAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toHaveClass(\"hope-input-right-addon\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(InputRightAddon.toString()).toBe(\".hope-input-right-addon\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputRightAddon data-testid=\"input-addon\" class={stubClass}>\n          <IconInfoCircleSolid />\n        </InputRightAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        {/* eslint-disable-next-line solid/no-react-specific-props */}\n        <InputRightAddon data-testid=\"input-addon\" className={stubClass}>\n          <IconInfoCircleSolid />\n        </InputRightAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputRightAddon data-testid=\"input-addon\" classList={{ [stubClass]: true }}>\n          <IconInfoCircleSolid />\n        </InputRightAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from inputAddonStyles with 'placement=right'\", () => {\n    // arrange\n    const inputAddonClass = inputAddonStyles({\n      placement: \"right\",\n    });\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputRightAddon data-testid=\"input-addon\">\n          <IconInfoCircleSolid />\n        </InputRightAddon>\n      </InputGroup>\n    ));\n    const inputAddon = screen.getByTestId(\"input-addon\");\n\n    // assert\n    expect(inputAddon).toHaveClass(inputAddonClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/input/__tests__/input-element.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { IconCheckCircleSolid } from \"../../icons/IconCheckCircleSolid\";\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { inputElementStyles, InputElementVariants } from \"../input.styles\";\nimport { InputElement, InputLeftElement, InputRightElement } from \"../input-element\";\nimport * as inputGroupModule from \"../input-group\";\n\nconst InputGroup = inputGroupModule.InputGroup;\n\nconst inputGroupContextMock: inputGroupModule.InputGroupContextValue = {\n  state: {\n    variant: \"outline\",\n    size: \"md\",\n    hasLeftElement: false,\n    hasRightElement: false,\n    hasLeftAddon: false,\n    hasRightAddon: false,\n  },\n  setHasLeftElement: jest.fn(),\n  setHasRightElement: jest.fn(),\n  setHasLeftAddon: jest.fn(),\n  setHasRightAddon: jest.fn(),\n};\n\ndescribe(\"InputElement\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputElement data-testid=\"input-element\">\n          <IconCheckCircleSolid />\n        </InputElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputElement data-testid=\"input-element\">\n          <IconCheckCircleSolid />\n        </InputElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided by the 'as' prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputElement data-testid=\"input-element\" as=\"span\">\n          <IconCheckCircleSolid />\n        </InputElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputElement data-testid=\"input-element\" class={stubClass}>\n          <IconCheckCircleSolid />\n        </InputElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        {/* eslint-disable-next-line solid/no-react-specific-props */}\n        <InputElement data-testid=\"input-element\" className={stubClass}>\n          <IconCheckCircleSolid />\n        </InputElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputElement data-testid=\"input-element\" classList={{ [stubClass]: true }}>\n          <IconCheckCircleSolid />\n        </InputElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from variant props\", () => {\n    // arrange\n    const variantProps: InputElementVariants = {\n      placement: \"left\",\n      size: \"lg\",\n    };\n\n    const inputElementClass = inputElementStyles(variantProps);\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputElement data-testid=\"input-element\" {...variantProps}>\n          <IconCheckCircleSolid />\n        </InputElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toHaveClass(inputElementClass.className);\n  });\n});\n\ndescribe(\"InputLeftElement\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputLeftElement data-testid=\"input-element\">\n          <IconCheckCircleSolid />\n        </InputLeftElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputLeftElement data-testid=\"input-element\">\n          <IconCheckCircleSolid />\n        </InputLeftElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided by the 'as' prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputLeftElement data-testid=\"input-element\" as=\"span\">\n          <IconCheckCircleSolid />\n        </InputLeftElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should call inputGroupContext 'setHasLeftElement' on mount\", () => {\n    // arrange\n    jest.spyOn(inputGroupModule, \"useInputGroupContext\").mockReturnValue(inputGroupContextMock);\n\n    const stubContext = inputGroupModule.useInputGroupContext();\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputLeftElement>\n          <IconCheckCircleSolid />\n        </InputLeftElement>\n      </InputGroup>\n    ));\n\n    // assert\n    expect(stubContext?.setHasLeftElement).toHaveBeenCalledWith(true);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputLeftElement data-testid=\"input-element\">\n          <IconCheckCircleSolid />\n        </InputLeftElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toHaveClass(\"hope-input-left-element\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(InputLeftElement.toString()).toBe(\".hope-input-left-element\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputLeftElement data-testid=\"input-element\" class={stubClass}>\n          <IconCheckCircleSolid />\n        </InputLeftElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        {/* eslint-disable-next-line solid/no-react-specific-props */}\n        <InputLeftElement data-testid=\"input-element\" className={stubClass}>\n          <IconCheckCircleSolid />\n        </InputLeftElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputLeftElement data-testid=\"input-element\" classList={{ [stubClass]: true }}>\n          <IconCheckCircleSolid />\n        </InputLeftElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from inputElementStyles with 'placement=left'\", () => {\n    // arrange\n    const inputElementClass = inputElementStyles({\n      placement: \"left\",\n    });\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputLeftElement data-testid=\"input-element\">\n          <IconCheckCircleSolid />\n        </InputLeftElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toHaveClass(inputElementClass.className);\n  });\n});\n\ndescribe(\"InputRightElement\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputRightElement data-testid=\"input-element\">\n          <IconCheckCircleSolid />\n        </InputRightElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputRightElement data-testid=\"input-element\">\n          <IconCheckCircleSolid />\n        </InputRightElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided by the 'as' prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputRightElement data-testid=\"input-element\" as=\"span\">\n          <IconCheckCircleSolid />\n        </InputRightElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should call inputGroupContext 'setHasRightElement' on mount\", () => {\n    // arrange\n    jest.spyOn(inputGroupModule, \"useInputGroupContext\").mockReturnValue(inputGroupContextMock);\n\n    const stubContext = inputGroupModule.useInputGroupContext();\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputRightElement>\n          <IconCheckCircleSolid />\n        </InputRightElement>\n      </InputGroup>\n    ));\n\n    // assert\n    expect(stubContext?.setHasRightElement).toHaveBeenCalledWith(true);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputRightElement data-testid=\"input-element\">\n          <IconCheckCircleSolid />\n        </InputRightElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toHaveClass(\"hope-input-right-element\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(InputRightElement.toString()).toBe(\".hope-input-right-element\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputRightElement data-testid=\"input-element\" class={stubClass}>\n          <IconCheckCircleSolid />\n        </InputRightElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        {/* eslint-disable-next-line solid/no-react-specific-props */}\n        <InputRightElement data-testid=\"input-element\" className={stubClass}>\n          <IconCheckCircleSolid />\n        </InputRightElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputRightElement data-testid=\"input-element\" classList={{ [stubClass]: true }}>\n          <IconCheckCircleSolid />\n        </InputRightElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from inputElementStyles with 'placement=right'\", () => {\n    // arrange\n    const inputElementClass = inputElementStyles({\n      placement: \"right\",\n    });\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup>\n        <InputRightElement data-testid=\"input-element\">\n          <IconCheckCircleSolid />\n        </InputRightElement>\n      </InputGroup>\n    ));\n    const inputElement = screen.getByTestId(\"input-element\");\n\n    // assert\n    expect(inputElement).toHaveClass(inputElementClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/input/__tests__/input-group.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { Input } from \"..\";\nimport { inputGroupStyles } from \"../input.styles\";\nimport { InputGroup } from \"../input-group\";\n\ndescribe(\"InputGroup\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup data-testid=\"input-group\">\n        <Input />\n      </InputGroup>\n    ));\n    const inputGroup = screen.getByTestId(\"input-group\");\n\n    // assert\n    expect(inputGroup).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup data-testid=\"input-group\">\n        <Input />\n      </InputGroup>\n    ));\n    const inputGroup = screen.getByTestId(\"input-group\");\n\n    // assert\n    expect(inputGroup).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided by the 'as' prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup data-testid=\"input-group\" as=\"span\">\n        <Input />\n      </InputGroup>\n    ));\n    const inputGroup = screen.getByTestId(\"input-group\");\n\n    // assert\n    expect(inputGroup).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup data-testid=\"input-group\">\n        <Input />\n      </InputGroup>\n    ));\n    const inputGroup = screen.getByTestId(\"input-group\");\n\n    // assert\n    expect(inputGroup).toHaveClass(\"hope-input-group\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(InputGroup.toString()).toBe(\".hope-input-group\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup data-testid=\"input-group\" class={stubClass}>\n        <Input />\n      </InputGroup>\n    ));\n    const inputGroup = screen.getByTestId(\"input-group\");\n\n    // assert\n    expect(inputGroup).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      //eslint-disable-next-line solid/no-react-specific-props\n      <InputGroup data-testid=\"input-group\" className={stubClass}>\n        <Input />\n      </InputGroup>\n    ));\n    const inputGroup = screen.getByTestId(\"input-group\");\n\n    // assert\n    expect(inputGroup).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup data-testid=\"input-group\" classList={{ [stubClass]: true }}>\n        <Input />\n      </InputGroup>\n    ));\n    const inputGroup = screen.getByTestId(\"input-group\");\n\n    // assert\n    expect(inputGroup).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from inputGroupStyles\", () => {\n    // arrange\n    const inputGroupClass = inputGroupStyles();\n\n    // act\n    renderWithHopeProvider(() => (\n      <InputGroup data-testid=\"input-group\">\n        <Input />\n      </InputGroup>\n    ));\n    const inputGroup = screen.getByTestId(\"input-group\");\n\n    // assert\n    expect(inputGroup).toHaveClass(inputGroupClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/input/__tests__/input.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { FormControl, FormErrorMessage, FormHelperText } from \"../..\";\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { Input } from \"../input\";\nimport { baseInputResetStyles, inputStyles } from \"../input.styles\";\n\ndescribe(\"Input\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Input data-testid=\"input\" />);\n    const input = screen.getByTestId(\"input\");\n\n    // assert\n    expect(input).toBeInTheDocument();\n  });\n\n  it(\"should render <input> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <Input data-testid=\"input\" />);\n    const input = screen.getByTestId(\"input\");\n\n    // assert\n    expect(input).toBeInstanceOf(HTMLInputElement);\n  });\n\n  it(\"should have default id from FormControl\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <Input data-testid=\"input\" />\n      </FormControl>\n    ));\n    const input = screen.getByTestId(\"input\");\n\n    // assert\n    expect(input).toHaveAttribute(\"id\", expect.stringMatching(/^hope-field-(.+)/));\n  });\n\n  it(\"should have 'aria-required' and 'required' attribute when FormControl is required\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl required>\n        <Input data-testid=\"input\" />\n      </FormControl>\n    ));\n    const input = screen.getByTestId(\"input\");\n\n    // assert\n    expect(input).toHaveAttribute(\"required\");\n    expect(input).toHaveAttribute(\"aria-required\", \"true\");\n  });\n\n  it(\"should have 'disabled' attribute when FormControl is disabled\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl disabled>\n        <Input data-testid=\"input\" />\n      </FormControl>\n    ));\n    const input = screen.getByTestId(\"input\");\n\n    // assert\n    expect(input).toHaveAttribute(\"disabled\");\n  });\n\n  it(\"should have 'aria-invalid' attribute when FormControl is invalid\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl invalid>\n        <Input data-testid=\"input\" />\n      </FormControl>\n    ));\n    const input = screen.getByTestId(\"input\");\n\n    // assert\n    expect(input).toHaveAttribute(\"aria-invalid\", \"true\");\n  });\n\n  it(\"should have 'aria-readonly' and 'readOnly' attribute when FormControl is readOnly\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl readOnly>\n        <Input data-testid=\"input\" />\n      </FormControl>\n    ));\n    const input = screen.getByTestId(\"input\");\n\n    // assert\n    expect(input).toHaveAttribute(\"readOnly\");\n    expect(input).toHaveAttribute(\"aria-readonly\", \"true\");\n  });\n\n  it(\"should have 'aria-describedby' attribute with FormHelperText id generated from FormControl\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <Input data-testid=\"input\" />\n        <FormHelperText data-testid=\"helper-text\">Helper text</FormHelperText>\n      </FormControl>\n    ));\n    const input = screen.getByTestId(\"input\");\n    const helperText = screen.getByTestId(\"helper-text\");\n\n    // assert\n    expect(input).toHaveAttribute(\"aria-describedby\", helperText.id);\n  });\n\n  it(\"should have 'aria-describedby' attribute with FormErrorMessage id first when FormControl is invalid\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl invalid>\n        <Input data-testid=\"input\" />\n        <FormHelperText data-testid=\"helper-text\">Helper text</FormHelperText>\n        <FormErrorMessage data-testid=\"error-message\">Error message</FormErrorMessage>\n      </FormControl>\n    ));\n    const input = screen.getByTestId(\"input\");\n    const helperText = screen.getByTestId(\"helper-text\");\n    const errorMessage = screen.getByTestId(\"error-message\");\n\n    // assert\n    expect(input).toHaveAttribute(\"aria-describedby\", `${errorMessage.id} ${helperText.id}`);\n  });\n\n  it(\"should have 'aria-required' and 'required' attribute when Input is required\", () => {\n    // act\n    renderWithHopeProvider(() => <Input data-testid=\"input\" required />);\n    const input = screen.getByTestId(\"input\");\n\n    // assert\n    expect(input).toHaveAttribute(\"required\");\n    expect(input).toHaveAttribute(\"aria-required\", \"true\");\n  });\n\n  it(\"should have 'disabled' attribute when Input is disabled\", () => {\n    // act\n    renderWithHopeProvider(() => <Input data-testid=\"input\" disabled />);\n    const input = screen.getByTestId(\"input\");\n\n    // assert\n    expect(input).toHaveAttribute(\"disabled\");\n  });\n\n  it(\"should have 'aria-invalid' attribute when Input is invalid\", () => {\n    // act\n    renderWithHopeProvider(() => <Input data-testid=\"input\" invalid />);\n    const input = screen.getByTestId(\"input\");\n\n    // assert\n    expect(input).toHaveAttribute(\"aria-invalid\", \"true\");\n  });\n\n  it(\"should have 'aria-readonly' and 'readOnly' attribute when Input is readOnly\", () => {\n    // act\n    renderWithHopeProvider(() => <Input data-testid=\"input\" readOnly />);\n    const input = screen.getByTestId(\"input\");\n\n    // assert\n    expect(input).toHaveAttribute(\"readOnly\");\n    expect(input).toHaveAttribute(\"aria-readonly\", \"true\");\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <Input data-testid=\"input\" />);\n    const input = screen.getByTestId(\"input\");\n\n    // assert\n    expect(input).toHaveClass(\"hope-input\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(Input.toString()).toBe(\".hope-input\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => <Input data-testid=\"input\" class={stubClass} />);\n    const input = screen.getByTestId(\"input\");\n\n    // assert\n    expect(input).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    // eslint-disable-next-line solid/no-react-specific-props\n    renderWithHopeProvider(() => <Input data-testid=\"input\" className={stubClass} />);\n    const input = screen.getByTestId(\"input\");\n\n    // assert\n    expect(input).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => <Input data-testid=\"input\" classList={{ [stubClass]: true }} />);\n    const input = screen.getByTestId(\"input\");\n\n    // assert\n    expect(input).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from baseInputResetStyles and inputStyles\", () => {\n    // arrange\n    const baseInputResetClass = baseInputResetStyles();\n    const inputClass = inputStyles();\n\n    // act\n    renderWithHopeProvider(() => <Input data-testid=\"input\" />);\n    const input = screen.getByTestId(\"input\");\n\n    // assert\n    expect(input).toHaveClass(baseInputResetClass.className);\n    expect(input).toHaveClass(inputClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/input/index.ts",
    "content": "export * from \"./input\";\nexport * from \"./input.styles\";\nexport * from \"./input-addon\";\nexport * from \"./input-element\";\nexport * from \"./input-group\";\n"
  },
  {
    "path": "packages/solid/src/components/input/input-addon.tsx",
    "content": "import { onCleanup, onMount, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { inputAddonStyles, InputAddonVariants } from \"./input.styles\";\nimport { useInputGroupContext } from \"./input-group\";\n\nexport type InputAddonProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, InputAddonVariants>;\n\nexport function InputAddon<C extends ElementType = \"div\">(props: InputAddonProps<C>) {\n  const theme = useStyleConfig().Input;\n\n  const [local, variantProps, others] = splitProps(\n    props,\n    [\"class\"],\n    [\"placement\", \"variant\", \"size\"]\n  );\n\n  const classes = () => classNames(local.class, inputAddonStyles(variantProps));\n\n  return <Box class={classes()} __baseStyle={theme?.baseStyle?.addon} {...others} />;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * InputLeftAddon\n * -----------------------------------------------------------------------------------------------*/\n\nexport type InputLeftAddonProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeInputLeftAddonClass = \"hope-input-left-addon\";\n\nexport function InputLeftAddon<C extends ElementType = \"div\">(props: InputLeftAddonProps<C>) {\n  const inputGroup = useInputGroupContext();\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeInputLeftAddonClass);\n\n  onMount(() => inputGroup?.setHasLeftAddon(true));\n  onCleanup(() => inputGroup?.setHasLeftAddon(false));\n\n  return (\n    <InputAddon\n      class={classes()}\n      placement=\"left\"\n      variant={inputGroup?.state.variant ?? \"outline\"}\n      size={inputGroup?.state.size ?? \"md\"}\n      {...others}\n    />\n  );\n}\n\nInputLeftAddon.toString = () => createClassSelector(hopeInputLeftAddonClass);\n\n/* -------------------------------------------------------------------------------------------------\n * inputRightAddon\n * -----------------------------------------------------------------------------------------------*/\n\nexport type InputRightAddonProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeInputRightAddonClass = \"hope-input-right-addon\";\n\nexport function InputRightAddon<C extends ElementType = \"div\">(props: InputRightAddonProps<C>) {\n  const inputGroup = useInputGroupContext();\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeInputRightAddonClass);\n\n  onMount(() => inputGroup?.setHasRightAddon(true));\n  onCleanup(() => inputGroup?.setHasRightAddon(false));\n\n  return (\n    <InputAddon\n      class={classes()}\n      placement=\"right\"\n      variant={inputGroup?.state.variant ?? \"outline\"}\n      size={inputGroup?.state.size ?? \"md\"}\n      {...others}\n    />\n  );\n}\n\nInputRightAddon.toString = () => createClassSelector(hopeInputRightAddonClass);\n"
  },
  {
    "path": "packages/solid/src/components/input/input-element.tsx",
    "content": "import { onCleanup, onMount, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { inputElementStyles, InputElementVariants } from \"./input.styles\";\nimport { useInputGroupContext } from \"./input-group\";\n\nexport type InputElementProps<C extends ElementType = \"div\"> = HTMLHopeProps<\n  C,\n  InputElementVariants\n>;\n\nexport function InputElement<C extends ElementType = \"div\">(props: InputElementProps<C>) {\n  const theme = useStyleConfig().Input;\n\n  const [local, variantProps, others] = splitProps(props, [\"class\"], [\"placement\", \"size\"]);\n\n  const classes = () => classNames(local.class, inputElementStyles(variantProps));\n\n  return <Box class={classes()} __baseStyle={theme?.baseStyle?.element} {...others} />;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * InputLeftElement\n * -----------------------------------------------------------------------------------------------*/\n\nexport type InputLeftElementProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeInputLeftElementClass = \"hope-input-left-element\";\n\nexport function InputLeftElement<C extends ElementType = \"div\">(props: InputLeftElementProps<C>) {\n  const inputGroup = useInputGroupContext();\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeInputLeftElementClass);\n\n  onMount(() => inputGroup?.setHasLeftElement(true));\n  onCleanup(() => inputGroup?.setHasLeftElement(false));\n\n  return (\n    <InputElement\n      class={classes()}\n      placement=\"left\"\n      size={inputGroup?.state.size ?? \"md\"}\n      {...others}\n    />\n  );\n}\n\nInputLeftElement.toString = () => createClassSelector(hopeInputLeftElementClass);\n\n/* -------------------------------------------------------------------------------------------------\n * InputRightElement\n * -----------------------------------------------------------------------------------------------*/\n\nexport type InputRightElementProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeInputRightElementClass = \"hope-input-right-element\";\n\nexport function InputRightElement<C extends ElementType = \"div\">(props: InputRightElementProps<C>) {\n  const inputGroup = useInputGroupContext();\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeInputRightElementClass);\n\n  onMount(() => inputGroup?.setHasRightElement(true));\n  onCleanup(() => inputGroup?.setHasRightElement(false));\n\n  return (\n    <InputElement\n      class={classes()}\n      placement=\"right\"\n      size={inputGroup?.state.size ?? \"md\"}\n      {...others}\n    />\n  );\n}\n\nInputRightElement.toString = () => createClassSelector(hopeInputRightElementClass);\n"
  },
  {
    "path": "packages/solid/src/components/input/input-group.tsx",
    "content": "import { createContext, splitProps, useContext } from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { inputGroupStyles, InputVariants } from \"./input.styles\";\n\nexport type ThemeableInputGroupOptions = Pick<InputVariants, \"variant\" | \"size\">;\n\nexport type InputGroupState = Required<ThemeableInputGroupOptions> & {\n  hasLeftElement: boolean;\n  hasRightElement: boolean;\n  hasLeftAddon: boolean;\n  hasRightAddon: boolean;\n};\n\nexport interface InputGroupContextValue {\n  state: InputGroupState;\n  setHasLeftElement: (value: boolean) => void;\n  setHasRightElement: (value: boolean) => void;\n  setHasLeftAddon: (value: boolean) => void;\n  setHasRightAddon: (value: boolean) => void;\n}\n\nexport type InputGroupProps<C extends ElementType = \"div\"> = HTMLHopeProps<\n  C,\n  ThemeableInputGroupOptions\n>;\n\nconst InputGroupContext = createContext<InputGroupContextValue>();\n\nexport function useInputGroupContext() {\n  return useContext(InputGroupContext);\n}\n\nconst hopeInputGroupClass = \"hope-input-group\";\n\nexport function InputGroup<C extends ElementType = \"div\">(props: InputGroupProps<C>) {\n  const theme = useStyleConfig().Input;\n\n  const [state, setState] = createStore<InputGroupState>({\n    get variant() {\n      return props.variant ?? theme?.defaultProps?.group?.variant ?? \"outline\";\n    },\n    get size() {\n      return props.size ?? theme?.defaultProps?.group?.size ?? \"md\";\n    },\n    hasLeftElement: false,\n    hasRightElement: false,\n    hasLeftAddon: false,\n    hasRightAddon: false,\n  });\n\n  const [local, others] = splitProps(props, [\"variant\", \"size\", \"class\"]);\n\n  const classes = () => classNames(local.class, hopeInputGroupClass, inputGroupStyles());\n\n  const setHasLeftElement = (value: boolean) => setState(\"hasLeftElement\", value);\n  const setHasRightElement = (value: boolean) => setState(\"hasRightElement\", value);\n  const setHasLeftAddon = (value: boolean) => setState(\"hasLeftAddon\", value);\n  const setHasRightAddon = (value: boolean) => setState(\"hasRightAddon\", value);\n\n  const context: InputGroupContextValue = {\n    state,\n    setHasLeftElement,\n    setHasRightElement,\n    setHasLeftAddon,\n    setHasRightAddon,\n  };\n\n  return (\n    <InputGroupContext.Provider value={context}>\n      <Box class={classes()} __baseStyle={theme?.baseStyle?.group} {...others} />\n    </InputGroupContext.Provider>\n  );\n}\n\nInputGroup.toString = () => createClassSelector(hopeInputGroupClass);\n"
  },
  {
    "path": "packages/solid/src/components/input/input.stories.tsx",
    "content": "import { createIcon } from \"../icon/create-icon\";\nimport { Icon } from \"../icon/icon\";\nimport { VStack } from \"../stack\";\nimport { HopeWrapper } from \"../storybook-utils\";\nimport { Input } from \"./input\";\nimport { InputLeftAddon, InputRightAddon } from \"./input-addon\";\nimport { InputLeftElement, InputRightElement } from \"./input-element\";\nimport { InputGroup } from \"./input-group\";\n\nconst IconSearch = createIcon({\n  path: () => (\n    <g fill=\"none\" stroke=\"currentColor\">\n      <path\n        stroke-linecap=\"round\"\n        stroke-linejoin=\"round\"\n        stroke-width=\"2\"\n        d=\"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z\"\n      />\n    </g>\n  ),\n});\n\nfunction MdiPhoneIcon() {\n  return (\n    <Icon color=\"$neutral9\">\n      <path\n        d=\"M6.62 10.79c1.44 2.83 3.76 5.15 6.59 6.59l2.2-2.2c.28-.28.67-.36 1.02-.25c1.12.37 2.32.57 3.57.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57c.11.35.03.74-.25 1.02l-2.2 2.2z\"\n        fill=\"currentColor\"\n      ></path>\n    </Icon>\n  );\n}\n\nfunction MdiCheckIcon() {\n  return (\n    <Icon color=\"$success9\">\n      <path d=\"M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59L21 7z\" fill=\"currentColor\"></path>\n    </Icon>\n  );\n}\n\nexport default {\n  title: \"Data entry/Input\",\n  component: Input,\n  parameters: { layout: \"centered\" },\n  decorators: [\n    (Story: any) => (\n      <HopeWrapper>\n        <Story />\n      </HopeWrapper>\n    ),\n  ],\n  argTypes: {\n    variant: {\n      control: { type: \"select\" },\n      options: [\"outline\", \"filled\", \"unstyled\"],\n    },\n    size: {\n      control: { type: \"select\" },\n      options: [\"xs\", \"sm\", \"md\", \"lg\"],\n    },\n    invalid: {\n      control: { type: \"boolean\" },\n    },\n    disabled: {\n      control: { type: \"boolean\" },\n    },\n    required: {\n      control: { type: \"boolean\" },\n    },\n    readOnly: {\n      control: { type: \"boolean\" },\n    },\n    placeholder: {\n      control: { type: \"text\" },\n    },\n  },\n  args: {\n    variant: \"outline\",\n    size: \"md\",\n    invalid: false,\n    disabled: false,\n    required: false,\n    readOnly: false,\n    placeholder: \"Placeholder\",\n  },\n};\n\nexport const Default = (args: any) => <Input {...args} />;\n\nexport const WithElement = (args: any) => (\n  <VStack spacing=\"$4\">\n    <InputGroup variant={args.variant} size={args.size}>\n      <InputLeftElement pointerEvents=\"none\">\n        <MdiPhoneIcon />\n      </InputLeftElement>\n      <Input placeholder={args.placeholder} disabled={args.disabled} invalid={args.invalid} />\n    </InputGroup>\n    <InputGroup variant={args.variant} size={args.size}>\n      <Input placeholder={args.placeholder} disabled={args.disabled} invalid={args.invalid} />\n      <InputRightElement pointerEvents=\"none\">\n        <MdiCheckIcon />\n      </InputRightElement>\n    </InputGroup>\n    <InputGroup variant={args.variant} size={args.size}>\n      <InputLeftElement pointerEvents=\"none\">\n        <MdiPhoneIcon />\n      </InputLeftElement>\n      <Input placeholder={args.placeholder} disabled={args.disabled} invalid={args.invalid} />\n      <InputRightElement pointerEvents=\"none\">\n        <MdiCheckIcon />\n      </InputRightElement>\n    </InputGroup>\n  </VStack>\n);\nWithElement.storyName = \"With element\";\n\nexport const WithAddon = (args: any) => (\n  <VStack spacing=\"$4\">\n    <InputGroup variant={args.variant} size={args.size}>\n      <InputLeftAddon>+33</InputLeftAddon>\n      <Input placeholder={args.placeholder} disabled={args.disabled} invalid={args.invalid} />\n    </InputGroup>\n    <InputGroup variant={args.variant} size={args.size}>\n      <Input placeholder={args.placeholder} disabled={args.disabled} invalid={args.invalid} />\n      <InputRightAddon>\n        <IconSearch />\n      </InputRightAddon>\n    </InputGroup>\n    <InputGroup variant={args.variant} size={args.size}>\n      <InputLeftAddon>http://</InputLeftAddon>\n      <Input placeholder={args.placeholder} disabled={args.disabled} invalid={args.invalid} />\n      <InputRightAddon>.com</InputRightAddon>\n    </InputGroup>\n  </VStack>\n);\nWithAddon.storyName = \"With addon\";\n"
  },
  {
    "path": "packages/solid/src/components/input/input.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css } from \"../../styled-system/stitches.config\";\nimport { SystemStyleObject } from \"../../styled-system/types\";\n\ninterface InputSizeVariantConfig {\n  fontSize: string;\n  lineHeight: string;\n  minHeight: string;\n}\n\nfunction createInputSizeVariant(config: InputSizeVariantConfig): SystemStyleObject {\n  return {\n    minHeight: config.minHeight,\n    fontSize: config.fontSize,\n    lineHeight: config.lineHeight,\n  };\n}\n\nconst inputSizes = {\n  xs: createInputSizeVariant({ fontSize: \"$xs\", lineHeight: \"$4\", minHeight: \"$6\" }),\n  sm: createInputSizeVariant({ fontSize: \"$sm\", lineHeight: \"$5\", minHeight: \"$8\" }),\n  md: createInputSizeVariant({ fontSize: \"$base\", lineHeight: \"$6\", minHeight: \"$10\" }),\n  lg: createInputSizeVariant({ fontSize: \"$lg\", lineHeight: \"$7\", minHeight: \"$12\" }),\n};\n\n/* -------------------------------------------------------------------------------------------------\n * CSS reset for text inputs, textarea\n * -----------------------------------------------------------------------------------------------*/\n\nconst commonOutlineAndFilledStyles: SystemStyleObject = {\n  \"&:disabled\": {\n    opacity: 0.4,\n    cursor: \"not-allowed\",\n  },\n\n  \"&:focus\": {\n    boxShadow: \"0 0 0 3px $colors$primary5\",\n    borderColor: \"$primary8\",\n  },\n\n  \"&[aria-invalid=true]\": {\n    borderColor: \"$danger8\",\n  },\n\n  \"&[aria-invalid=true]:focus\": {\n    boxShadow: \"0 0 0 3px $colors$danger5\",\n  },\n};\n\nexport const baseInputResetStyles = css({\n  appearance: \"none\",\n\n  position: \"relative\",\n\n  width: \"100%\",\n  minWidth: 0,\n\n  outline: \"none\",\n\n  borderRadius: \"$sm\",\n\n  backgroundColor: \"transparent\",\n\n  padding: 0,\n\n  color: \"$neutral12\",\n  fontSize: \"$base\",\n  lineHeight: \"$base\",\n\n  transition: \"color 250ms, border-color 250ms, background-color 250ms, box-shadow 250ms\",\n\n  \"&[readonly]\": {\n    boxShadow: \"none !important\",\n    userSelect: \"all\",\n    cursor: \"default\",\n  },\n\n  \"&::placeholder\": {\n    color: \"$neutral9\",\n    opacity: 1,\n  },\n\n  variants: {\n    variant: {\n      outline: {\n        border: \"1px solid $neutral7\",\n        backgroundColor: \"transparent\",\n\n        \"&:hover\": {\n          borderColor: \"$neutral8\",\n        },\n\n        ...commonOutlineAndFilledStyles,\n      },\n      filled: {\n        border: \"1px solid transparent\",\n        backgroundColor: \"$neutral3\",\n\n        \"&:hover, &:focus\": {\n          backgroundColor: \"$neutral4\",\n        },\n\n        ...commonOutlineAndFilledStyles,\n      },\n      unstyled: {\n        border: \"1px solid transparent\",\n        backgroundColor: \"transparent\",\n      },\n    },\n    size: {\n      ...inputSizes,\n    },\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Input\n * -----------------------------------------------------------------------------------------------*/\n\ninterface VariantAndSizeCompoundVariantConfig {\n  variant: string;\n  size: string;\n  paddingX: string | number;\n  paddingWithElement: string | number;\n}\n\nfunction createVariantAndSizeCompoundVariant(config: VariantAndSizeCompoundVariantConfig) {\n  return [\n    {\n      variant: config.variant,\n      size: config.size,\n      css: { px: config.paddingX },\n    },\n    {\n      withLeftElement: true,\n      variant: config.variant,\n      size: config.size,\n      css: { paddingInlineStart: config.paddingWithElement },\n    },\n    {\n      withRightElement: true,\n      variant: config.variant,\n      size: config.size,\n      css: { paddingInlineEnd: config.paddingWithElement },\n    },\n  ];\n}\n\nexport const inputStyles = css(baseInputResetStyles, {\n  variants: {\n    withLeftElement: {\n      true: {},\n    },\n    withRightElement: {\n      true: {},\n    },\n    withLeftAddon: {\n      true: {\n        borderLeftRadius: 0,\n      },\n    },\n    withRightAddon: {\n      true: {\n        borderRightRadius: 0,\n      },\n    },\n  },\n  compoundVariants: [\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - outline + size\n     * -----------------------------------------------------------------------------------------------*/\n    ...createVariantAndSizeCompoundVariant({\n      variant: \"outline\",\n      size: \"xs\",\n      paddingX: \"$2\",\n      paddingWithElement: \"$6\",\n    }),\n    ...createVariantAndSizeCompoundVariant({\n      variant: \"outline\",\n      size: \"sm\",\n      paddingX: \"$2_5\",\n      paddingWithElement: \"$8\",\n    }),\n    ...createVariantAndSizeCompoundVariant({\n      variant: \"outline\",\n      size: \"md\",\n      paddingX: \"$3\",\n      paddingWithElement: \"$10\",\n    }),\n    ...createVariantAndSizeCompoundVariant({\n      variant: \"outline\",\n      size: \"lg\",\n      paddingX: \"$4\",\n      paddingWithElement: \"$12\",\n    }),\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - filled + size\n     * -----------------------------------------------------------------------------------------------*/\n    ...createVariantAndSizeCompoundVariant({\n      variant: \"filled\",\n      size: \"xs\",\n      paddingX: \"$2\",\n      paddingWithElement: \"$6\",\n    }),\n    ...createVariantAndSizeCompoundVariant({\n      variant: \"filled\",\n      size: \"sm\",\n      paddingX: \"$2_5\",\n      paddingWithElement: \"$8\",\n    }),\n    ...createVariantAndSizeCompoundVariant({\n      variant: \"filled\",\n      size: \"md\",\n      paddingX: \"$3\",\n      paddingWithElement: \"$10\",\n    }),\n    ...createVariantAndSizeCompoundVariant({\n      variant: \"filled\",\n      size: \"lg\",\n      paddingX: \"$4\",\n      paddingWithElement: \"$12\",\n    }),\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - unstyled + size\n     * -----------------------------------------------------------------------------------------------*/\n    ...createVariantAndSizeCompoundVariant({\n      variant: \"unstyled\",\n      size: \"xs\",\n      paddingX: 0,\n      paddingWithElement: \"$6\",\n    }),\n    ...createVariantAndSizeCompoundVariant({\n      variant: \"unstyled\",\n      size: \"sm\",\n      paddingX: 0,\n      paddingWithElement: \"$8\",\n    }),\n    ...createVariantAndSizeCompoundVariant({\n      variant: \"unstyled\",\n      size: \"md\",\n      paddingX: 0,\n      paddingWithElement: \"$10\",\n    }),\n    ...createVariantAndSizeCompoundVariant({\n      variant: \"unstyled\",\n      size: \"lg\",\n      paddingX: 0,\n      paddingWithElement: \"$12\",\n    }),\n  ],\n});\n\nexport type InputVariants = VariantProps<typeof inputStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * InputGroup\n * -----------------------------------------------------------------------------------------------*/\n\nexport const inputGroupStyles = css({\n  position: \"relative\",\n  display: \"flex\",\n  width: \"100%\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * InputElement\n * -----------------------------------------------------------------------------------------------*/\n\nexport const inputElementStyles = css({\n  position: \"absolute\",\n  top: \"0\",\n\n  zIndex: 2,\n\n  display: \"flex\",\n  alignItems: \"center\",\n  justifyContent: \"center\",\n\n  variants: {\n    placement: {\n      left: { insetInlineStart: \"0\" },\n      right: { insetInlineEnd: \"0\" },\n    },\n    size: {\n      xs: {\n        ...inputSizes.xs,\n        width: inputSizes.xs.minHeight,\n      },\n      sm: {\n        ...inputSizes.sm,\n        width: inputSizes.sm.minHeight,\n      },\n      md: {\n        ...inputSizes.md,\n        width: inputSizes.md.minHeight,\n      },\n      lg: {\n        ...inputSizes.lg,\n        width: inputSizes.lg.minHeight,\n      },\n    },\n  },\n});\n\nexport type InputElementVariants = VariantProps<typeof inputElementStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * InputAddon\n * -----------------------------------------------------------------------------------------------*/\n\ninterface InputAddonVariantAndSizeCompoundVariantConfig {\n  variant: string;\n  size: string;\n  paddingX: string | number;\n}\n\nfunction createInputAddonVariantAndSizeCompoundVariant(\n  config: InputAddonVariantAndSizeCompoundVariantConfig\n) {\n  return {\n    variant: config.variant,\n    size: config.size,\n    css: { px: config.paddingX },\n  };\n}\n\nexport const inputAddonStyles = css({\n  display: \"flex\",\n  alignItems: \"center\",\n  flex: \"0 0 auto\",\n\n  width: \"auto\",\n\n  whiteSpace: \"nowrap\",\n\n  variants: {\n    placement: {\n      left: {\n        marginEnd: \"-1px\",\n      },\n      right: {\n        marginStart: \"-1px\",\n      },\n    },\n    variant: {\n      outline: {\n        borderRadius: \"$sm\",\n        border: \"1px solid $neutral7\",\n        backgroundColor: \"$neutral3\",\n        color: \"$neutral12\",\n      },\n      filled: {\n        borderRadius: \"$sm\",\n        border: \"1px solid transparent\",\n        backgroundColor: \"$neutral3\",\n        color: \"$neutral12\",\n      },\n      unstyled: {\n        border: \"1px solid transparent\",\n        backgroundColor: \"transparent\",\n      },\n    },\n    size: {\n      ...inputSizes,\n    },\n  },\n  compoundVariants: [\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - outline + placement\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"outline\",\n      placement: \"left\",\n      css: {\n        borderRightRadius: 0,\n        borderInlineEndColor: \"transparent\",\n      },\n    },\n    {\n      variant: \"outline\",\n      placement: \"right\",\n      css: {\n        borderLeftRadius: 0,\n        borderInlineStartColor: \"transparent\",\n      },\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - filled + placement\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"filled\",\n      placement: \"left\",\n      css: {\n        borderStartEndRadius: 0,\n        borderEndEndRadius: 0,\n        borderInlineEndColor: \"transparent\",\n      },\n    },\n    {\n      variant: \"filled\",\n      placement: \"right\",\n      css: {\n        borderStartStartRadius: 0,\n        borderEndStartRadius: 0,\n        borderInlineStartColor: \"transparent\",\n      },\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - outline + size\n     * -----------------------------------------------------------------------------------------------*/\n    createInputAddonVariantAndSizeCompoundVariant({\n      variant: \"outline\",\n      size: \"xs\",\n      paddingX: \"$2\",\n    }),\n    createInputAddonVariantAndSizeCompoundVariant({\n      variant: \"outline\",\n      size: \"sm\",\n      paddingX: \"$2_5\",\n    }),\n    createInputAddonVariantAndSizeCompoundVariant({\n      variant: \"outline\",\n      size: \"md\",\n      paddingX: \"$3\",\n    }),\n    createInputAddonVariantAndSizeCompoundVariant({\n      variant: \"outline\",\n      size: \"lg\",\n      paddingX: \"$4\",\n    }),\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - filled + size\n     * -----------------------------------------------------------------------------------------------*/\n    createInputAddonVariantAndSizeCompoundVariant({\n      variant: \"filled\",\n      size: \"xs\",\n      paddingX: \"$2\",\n    }),\n    createInputAddonVariantAndSizeCompoundVariant({\n      variant: \"filled\",\n      size: \"sm\",\n      paddingX: \"$2_5\",\n    }),\n    createInputAddonVariantAndSizeCompoundVariant({\n      variant: \"filled\",\n      size: \"md\",\n      paddingX: \"$3\",\n    }),\n    createInputAddonVariantAndSizeCompoundVariant({\n      variant: \"filled\",\n      size: \"lg\",\n      paddingX: \"$4\",\n    }),\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - unstyled + size\n     * -----------------------------------------------------------------------------------------------*/\n    createInputAddonVariantAndSizeCompoundVariant({\n      variant: \"unstyled\",\n      size: \"xs\",\n      paddingX: 0,\n    }),\n    createInputAddonVariantAndSizeCompoundVariant({\n      variant: \"unstyled\",\n      size: \"sm\",\n      paddingX: 0,\n    }),\n    createInputAddonVariantAndSizeCompoundVariant({\n      variant: \"unstyled\",\n      size: \"md\",\n      paddingX: 0,\n    }),\n    createInputAddonVariantAndSizeCompoundVariant({\n      variant: \"unstyled\",\n      size: \"lg\",\n      paddingX: 0,\n    }),\n  ],\n});\n\nexport type InputAddonVariants = VariantProps<typeof inputAddonStyles>;\n"
  },
  {
    "path": "packages/solid/src/components/input/input.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { SystemStyleObject } from \"../../styled-system/types\";\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { useFormControl } from \"../form-control/use-form-control\";\nimport { HTMLHopeProps } from \"../types\";\nimport { inputStyles, InputVariants } from \"./input.styles\";\nimport { ThemeableInputGroupOptions, useInputGroupContext } from \"./input-group\";\n\ntype ThemeableInputOptions = Pick<InputVariants, \"variant\" | \"size\">;\n\ninterface InputOptions extends ThemeableInputOptions {\n  /**\n   * If `true`, the input will have `aria-invalid` set to `true`.\n   */\n  invalid?: boolean;\n\n  /**\n   * The native HTML `size` attribute to be passed to the `input`.\n   */\n  htmlSize?: string | number;\n}\n\nexport type InputProps = Omit<HTMLHopeProps<\"input\", InputOptions>, \"as\">;\n\nexport interface InputStyleConfig {\n  baseStyle?: {\n    input?: SystemStyleObject;\n    group?: SystemStyleObject;\n    element?: SystemStyleObject;\n    addon?: SystemStyleObject;\n  };\n  defaultProps?: {\n    input?: ThemeableInputOptions;\n    group?: ThemeableInputGroupOptions;\n  };\n}\n\nconst hopeInputClass = \"hope-input\";\n\nexport function Input(props: InputProps) {\n  const theme = useStyleConfig().Input;\n\n  const inputGroup = useInputGroupContext();\n\n  const formControlProps = useFormControl<HTMLInputElement>(props);\n\n  const [local, others] = splitProps(props, [\"class\", \"htmlSize\", \"variant\", \"size\"]);\n\n  const classes = () =>\n    classNames(\n      local.class,\n      hopeInputClass,\n      inputStyles({\n        variant:\n          local.variant ??\n          inputGroup?.state.variant ??\n          theme?.defaultProps?.input?.variant ??\n          \"outline\",\n        size: local.size ?? inputGroup?.state.size ?? theme?.defaultProps?.input?.size ?? \"md\",\n        withLeftElement: inputGroup?.state.hasLeftElement ?? false,\n        withRightElement: inputGroup?.state.hasRightElement ?? false,\n        withLeftAddon: inputGroup?.state.hasLeftAddon ?? false,\n        withRightAddon: inputGroup?.state.hasRightAddon ?? false,\n      })\n    );\n\n  return (\n    <hope.input\n      type=\"text\"\n      class={classes()}\n      size={local.htmlSize}\n      __baseStyle={theme?.baseStyle?.input}\n      {...formControlProps}\n      {...others}\n    />\n  );\n}\n\nInput.toString = () => createClassSelector(hopeInputClass);\n"
  },
  {
    "path": "packages/solid/src/components/kbd/index.ts",
    "content": "export * from \"./kbd\";\nexport * from \"./kbd.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/kbd/kbd.styles.ts",
    "content": "import { css } from \"../../styled-system/stitches.config\";\n\nexport const kbdStyles = css({\n  borderRadius: \"$md\",\n  borderColor: \"$neutral7\",\n  borderWidth: \"1px\",\n  borderBottomWidth: \"3px\",\n\n  backgroundColor: \"$neutral2\",\n\n  px: \"0.4em\",\n\n  fontFamily: \"$mono\",\n  fontSize: \"0.8em\",\n  fontWeight: \"$bold\",\n  lineHeight: \"$normal\",\n  whiteSpace: \"nowrap\",\n});\n"
  },
  {
    "path": "packages/solid/src/components/kbd/kbd.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps, SinglePartComponentStyleConfig } from \"../types\";\nimport { kbdStyles } from \"./kbd.styles\";\n\nexport type KbdStyleConfig = SinglePartComponentStyleConfig<void>;\n\nexport type KbdProps<C extends ElementType = \"kbd\"> = HTMLHopeProps<C>;\n\nconst hopeKbdClass = \"hope-kbd\";\n\n/**\n * Semantic component to render a keyboard shortcut within an application.\n */\nexport function Kbd<C extends ElementType = \"kbd\">(props: KbdProps<C>) {\n  const theme = useStyleConfig().Kbd;\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeKbdClass, kbdStyles());\n\n  return <hope.kbd class={classes()} __baseStyle={theme?.baseStyle} {...others} />;\n}\n\nKbd.toString = () => createClassSelector(hopeKbdClass);\n"
  },
  {
    "path": "packages/solid/src/components/list/index.ts",
    "content": "export * from \"./list\";\nexport * from \"./list.styles\";\nexport * from \"./list-icon\";\nexport * from \"./list-item\";\n"
  },
  {
    "path": "packages/solid/src/components/list/list-icon.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Icon, IconProps } from \"../icon/icon\";\nimport { ElementType } from \"../types\";\nimport { listIconStyles } from \"./list.styles\";\n\nconst hopeListIconClass = \"hope-list__icon\";\n\n/**\n * ListIcon is used to render an icon beside the list item text.\n */\nexport function ListIcon<C extends ElementType = \"svg\">(props: IconProps<C>) {\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeListIconClass, listIconStyles());\n\n  return <Icon role=\"presentation\" class={classes()} verticalAlign=\"text-bottom\" {...others} />;\n}\n\nListIcon.toString = () => createClassSelector(hopeListIconClass);\n"
  },
  {
    "path": "packages/solid/src/components/list/list-item.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\n\nexport type ListItemProps<C extends ElementType = \"li\"> = HTMLHopeProps<C>;\n\nconst hopeListItemClass = \"hope-list__item\";\n\n/**\n * ListItem is used to render a list item, it renders a `<li>` by default.\n */\nexport function ListItem<C extends ElementType = \"li\">(props: ListItemProps<C>) {\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeListItemClass);\n\n  return <hope.li class={classes()} {...others} />;\n}\n\nListItem.toString = () => createClassSelector(hopeListItemClass);\n"
  },
  {
    "path": "packages/solid/src/components/list/list.styles.ts",
    "content": "import { css } from \"../../styled-system/stitches.config\";\n\n/* -------------------------------------------------------------------------------------------------\n * List\n * -----------------------------------------------------------------------------------------------*/\n\nexport const listStyles = css({\n  listStyleType: \"none\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * ListIcon\n * -----------------------------------------------------------------------------------------------*/\n\nexport const listIconStyles = css({\n  marginEnd: \"0.5rem\",\n});\n"
  },
  {
    "path": "packages/solid/src/components/list/list.tsx",
    "content": "import { Property } from \"csstype\";\nimport { splitProps } from \"solid-js\";\n\nimport { MarginProps } from \"../../styled-system/props/margin\";\nimport { ResponsiveValue } from \"../../styled-system/types\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { listStyles } from \"./list.styles\";\n\ninterface ListOptions {\n  /**\n   * Short hand for the `list-style-type` css property.\n   */\n  styleType?: Property.ListStyleType;\n\n  /**\n   * Short hand for the `list-style-position` css property.\n   */\n  stylePosition?: Property.ListStylePosition;\n\n  /**\n   * The space between each list item.\n   */\n  spacing?: ResponsiveValue<MarginProps[\"margin\"]>;\n}\n\nexport type ListProps<C extends ElementType = \"ul\"> = HTMLHopeProps<C, ListOptions>;\n\nconst hopeListClass = \"hope-list\";\n\nconst descendentSelector = \"& > *:not(style) ~ *:not(style)\";\n\n/**\n * List is used to display list items, it renders a `<ul>` by default.\n */\nexport function List<C extends ElementType = \"ul\">(props: ListProps<C>) {\n  const [local, others] = splitProps(props, [\"class\", \"styleType\", \"stylePosition\", \"spacing\"]);\n\n  const spacingStyle = () => (local.spacing ? { [descendentSelector]: { mt: local.spacing } } : {});\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeListClass,\n      listStyles({\n        css: {\n          listStyleType: local.styleType,\n          listStylePosition: local.stylePosition,\n          ...spacingStyle(),\n        },\n      })\n    );\n  };\n\n  return <hope.ul role=\"list\" class={classes()} {...others} />;\n}\n\nList.toString = () => createClassSelector(hopeListClass);\n\n/* -------------------------------------------------------------------------------------------------\n * OrderedList\n * -----------------------------------------------------------------------------------------------*/\n\nconst hopeOrderedListClass = \"hope-ordered-list\";\n\nexport function OrderedList<C extends ElementType = \"ol\">(props: ListProps<C>) {\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeOrderedListClass);\n\n  return <List as=\"ol\" class={classes()} styleType=\"decimal\" marginStart=\"1em\" {...others} />;\n}\n\nOrderedList.toString = () => createClassSelector(hopeOrderedListClass);\n\n/* -------------------------------------------------------------------------------------------------\n * UnorderedList\n * -----------------------------------------------------------------------------------------------*/\n\nconst hopeUnorderedListClass = \"hope-unordered-list\";\n\nexport function UnorderedList<C extends ElementType = \"ul\">(props: ListProps<C>) {\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeUnorderedListClass);\n\n  return <List as=\"ul\" class={classes()} styleType=\"initial\" marginStart=\"1em\" {...others} />;\n}\n\nUnorderedList.toString = () => createClassSelector(hopeUnorderedListClass);\n"
  },
  {
    "path": "packages/solid/src/components/menu/index.ts",
    "content": "export * from \"./menu\";\nexport * from \"./menu.styles\";\nexport * from \"./menu-content\";\nexport * from \"./menu-group\";\nexport * from \"./menu-item\";\nexport * from \"./menu-label\";\nexport * from \"./menu-trigger\";\n"
  },
  {
    "path": "packages/solid/src/components/menu/menu-content.tsx",
    "content": "import { children, createEffect, createSignal, on, Show, splitProps } from \"solid-js\";\nimport { Portal } from \"solid-js/web\";\nimport { Transition } from \"solid-transition-group\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { isFunction } from \"../../utils/assertion\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ClickOutside } from \"../click-outside/click-outside\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useMenuContext } from \"./menu\";\nimport { menuContentStyles, menuTransitionName } from \"./menu.styles\";\n\nexport type MenuContentProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeMenuContentClass = \"hope-menu__content\";\n\n/**\n * The component that pops out when the menu is open.\n */\nexport function MenuContent<C extends ElementType = \"div\">(props: MenuContentProps<C>) {\n  const theme = useStyleConfig().Menu;\n\n  const menuContext = useMenuContext();\n\n  const [local, others] = splitProps(props as MenuContentProps<\"div\">, [\n    \"ref\",\n    \"class\",\n    \"children\",\n  ]);\n\n  /**\n   * Internal state to handle menu content portal `mounted` state.\n   * Dirty hack since solid-transition-group doesn't work with Portal.\n   */\n  const [isPortalMounted, setIsPortalMounted] = createSignal(false);\n\n  createEffect(\n    on(\n      () => menuContext.state.opened,\n      () => {\n        if (menuContext.state.opened) {\n          // mount portal when state `opened` is true.\n          setIsPortalMounted(true);\n        } else {\n          // unmount portal instantly when there is no menu transition.\n          menuContext.state.motionPreset === \"none\" && setIsPortalMounted(false);\n        }\n      }\n    )\n  );\n\n  // For smooth transition, unmount portal only after menu's content exit transition is done.\n  const unmountPortal = () => setIsPortalMounted(false);\n\n  // hack to force children `MenuItem` to mount and register themself to the menu.\n  const resolvedChildren = children(() => local.children);\n\n  const assignContentRef = (el: HTMLDivElement) => {\n    menuContext.assignContentRef(el);\n\n    if (isFunction(local.ref)) {\n      local.ref(el);\n    } else {\n      // eslint-disable-next-line solid/reactivity\n      local.ref = el;\n    }\n  };\n\n  const onClickOutside = (event: Event) => {\n    menuContext.onContentClickOutside(event.target as HTMLElement);\n  };\n\n  const classes = () => classNames(local.class, hopeMenuContentClass, menuContentStyles());\n\n  const transitionName = () => {\n    switch (menuContext.state.motionPreset) {\n      case \"scale-top-left\":\n        return menuTransitionName.scaleTopLeft;\n      case \"scale-top-right\":\n        return menuTransitionName.scaleTopRight;\n      case \"scale-bottom-left\":\n        return menuTransitionName.scaleBottomLeft;\n      case \"scale-bottom-right\":\n        return menuTransitionName.scaleBottomRight;\n      case \"none\":\n        return \"hope-none\";\n    }\n  };\n\n  return (\n    <Show when={isPortalMounted()}>\n      <Portal>\n        <Transition name={transitionName()} appear onAfterExit={unmountPortal}>\n          <Show when={menuContext.state.opened}>\n            <ClickOutside onClickOutside={onClickOutside}>\n              <Box\n                role=\"menu\"\n                tabindex=\"-1\"\n                ref={assignContentRef}\n                id={menuContext.state.menuContentId}\n                aria-activedescendant={menuContext.state.activeDescendantId}\n                aria-labelledby={menuContext.state.triggerId}\n                aria-orientation=\"vertical\"\n                class={classes()}\n                __baseStyle={theme?.baseStyle?.content}\n                onMouseLeave={menuContext.onContentMouseLeave}\n                {...others}\n              >\n                {resolvedChildren()}\n              </Box>\n            </ClickOutside>\n          </Show>\n        </Transition>\n      </Portal>\n    </Show>\n  );\n}\n\nMenuContent.toString = () => createClassSelector(hopeMenuContentClass);\n"
  },
  {
    "path": "packages/solid/src/components/menu/menu-group.tsx",
    "content": "import { createContext, createSignal, splitProps, useContext } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { menuGroupStyles } from \"./menu.styles\";\n\nexport interface MenuGroupContextValue {\n  setAriaLabelledBy: (id: string) => void;\n}\n\nconst MenuGroupContext = createContext<MenuGroupContextValue>();\n\nexport type MenuGroupProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeMenuGroupClass = \"hope-menu__group\";\n\n/**\n * Component used to group multiple menu item.\n */\nexport function MenuGroup<C extends ElementType = \"div\">(props: MenuGroupProps<C>) {\n  const theme = useStyleConfig().Menu;\n\n  const [ariaLabelledBy, setAriaLabelledBy] = createSignal<string>();\n\n  const [local, others] = splitProps(props as MenuGroupProps<\"div\">, [\"class\", \"children\"]);\n\n  const classes = () => classNames(local.class, hopeMenuGroupClass, menuGroupStyles());\n\n  const context: MenuGroupContextValue = {\n    setAriaLabelledBy,\n  };\n\n  return (\n    <MenuGroupContext.Provider value={context}>\n      <Box\n        role=\"group\"\n        aria-labelledby={ariaLabelledBy()}\n        class={classes()}\n        __baseStyle={theme?.baseStyle?.group}\n        {...others}\n      >\n        {local.children}\n      </Box>\n    </MenuGroupContext.Provider>\n  );\n}\n\nMenuGroup.toString = () => createClassSelector(hopeMenuGroupClass);\n\nexport function useMenuGroupContext() {\n  return useContext(MenuGroupContext);\n}\n"
  },
  {
    "path": "packages/solid/src/components/menu/menu-item.tsx",
    "content": "import {\n  Accessor,\n  createEffect,\n  createSignal,\n  createUniqueId,\n  JSX,\n  onMount,\n  Show,\n  splitProps,\n} from \"solid-js\";\n\nimport { MarginProps } from \"../../styled-system/props/margin\";\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { isFunction } from \"../../utils/assertion\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useMenuContext } from \"./menu\";\nimport {\n  menuItemCommandStyles,\n  menuItemIconWrapperStyles,\n  menuItemStyles,\n  menuItemTextStyles,\n  MenuItemVariants,\n} from \"./menu.styles\";\nimport { MenuItemData } from \"./menu.utils\";\n\ntype MenuItemOptions = Partial<Omit<MenuItemData, \"key\">> &\n  MenuItemVariants & {\n    /**\n     * The icon to display next to the menu item text.\n     */\n    icon?: JSX.Element;\n\n    /**\n     * The space between the icon and the menu item text.\n     */\n    iconSpacing?: MarginProps[\"marginRight\"];\n\n    /**\n     * Right-aligned label text content, useful for displaying hotkeys.\n     */\n    command?: string;\n\n    /**\n     * The space between the command and the menu item text.\n     */\n    commandSpacing?: MarginProps[\"marginLeft\"];\n  };\n\nexport type MenuItemProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, MenuItemOptions>;\n\nconst hopeMenuItemClass = \"hope-menu__item\";\nconst hopeMenuItemIconWrapperClass = \"hope-menu__item__icon-wrapper\";\nconst hopeMenuItemTextClass = \"hope-menu__item__text\";\nconst hopeMenuItemCommandClass = \"hope-menu__item__command\";\n\n/**\n * The component that contains a menu item.\n */\nexport function MenuItem<C extends ElementType = \"div\">(props: MenuItemProps<C>) {\n  const key = createUniqueId();\n\n  const theme = useStyleConfig().Menu;\n\n  const menuContext = useMenuContext();\n\n  const [index, setIndex] = createSignal<number>(-1);\n\n  let itemRef: HTMLDivElement | undefined;\n\n  const [local, others] = splitProps(props as MenuItemProps<\"div\">, [\n    \"ref\",\n    \"class\",\n    \"children\",\n    \"colorScheme\",\n    \"icon\",\n    \"iconSpacing\",\n    \"command\",\n    \"commandSpacing\",\n    \"textValue\",\n    \"disabled\",\n    \"closeOnSelect\",\n    \"onSelect\",\n    \"onClick\",\n  ]);\n\n  const itemData: Accessor<MenuItemData> = () => ({\n    key,\n    textValue: local.textValue ?? itemRef?.textContent ?? \"\",\n    disabled: !!local.disabled,\n    closeOnSelect:\n      local.closeOnSelect != null ? !!local.closeOnSelect : menuContext.state.closeOnSelect,\n    onSelect: local.onSelect,\n  });\n\n  const id = () => `${menuContext.state.itemIdPrefix}-${index()}`;\n  const isActiveDescendant = () => menuContext.isItemActiveDescendant(index());\n\n  const assignItemRef = (el: HTMLDivElement) => {\n    itemRef = el;\n\n    if (isFunction(local.ref)) {\n      local.ref(el);\n    } else {\n      // eslint-disable-next-line solid/reactivity\n      local.ref = el;\n    }\n  };\n\n  const onItemClick = (event: MouseEvent) => {\n    event.stopPropagation();\n    menuContext.onItemClick(index());\n  };\n\n  const onItemMouseMove = (event: MouseEvent) => {\n    if (local.disabled) {\n      menuContext.onItemMouseMove(-1);\n    }\n\n    if (isActiveDescendant() || local.disabled) {\n      event.preventDefault();\n      event.stopPropagation();\n      return;\n    }\n\n    menuContext.onItemMouseMove(index());\n  };\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeMenuItemClass,\n      menuItemStyles({\n        colorScheme: local.colorScheme,\n      })\n    );\n  };\n\n  const iconWrapperClasses = () => {\n    return classNames(hopeMenuItemIconWrapperClass, menuItemIconWrapperStyles());\n  };\n\n  const textClasses = () => {\n    return classNames(hopeMenuItemTextClass, menuItemTextStyles());\n  };\n\n  const commandClasses = () => {\n    return classNames(hopeMenuItemCommandClass, menuItemCommandStyles());\n  };\n\n  onMount(() => {\n    setIndex(menuContext.registerItem(itemData()));\n  });\n\n  createEffect(() => {\n    if (isActiveDescendant() && itemRef) {\n      menuContext.scrollToItem(itemRef);\n    }\n  });\n\n  return (\n    <Box\n      ref={assignItemRef}\n      role=\"menuitem\"\n      id={id()}\n      data-active={isActiveDescendant() ? \"\" : undefined}\n      data-disabled={local.disabled ? \"\" : undefined}\n      data-group\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.item}\n      onClick={onItemClick}\n      onMouseMove={onItemMouseMove}\n      onMouseDown={menuContext.onItemMouseDown}\n      {...others}\n    >\n      <Show when={local.icon}>\n        <hope.span\n          aria-hidden=\"true\"\n          class={iconWrapperClasses()}\n          __baseStyle={theme?.baseStyle?.itemIconWrapper}\n          mr={local.iconSpacing ?? \"0.5rem\"}\n        >\n          {local.icon}\n        </hope.span>\n      </Show>\n      <Show when={local.children}>\n        <hope.span class={textClasses()} __baseStyle={theme?.baseStyle?.itemText}>\n          {local.children}\n        </hope.span>\n      </Show>\n      <Show when={local.command}>\n        <hope.span\n          class={commandClasses()}\n          __baseStyle={theme?.baseStyle?.itemCommand}\n          ml={local.commandSpacing ?? \"0.5rem\"}\n        >\n          {local.command}\n        </hope.span>\n      </Show>\n    </Box>\n  );\n}\n\nMenuItem.toString = () => createClassSelector(hopeMenuItemClass);\n"
  },
  {
    "path": "packages/solid/src/components/menu/menu-label.tsx",
    "content": "import { createUniqueId, onMount, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useMenuContext } from \"./menu\";\nimport { menuLabelStyles } from \"./menu.styles\";\nimport { useMenuGroupContext } from \"./menu-group\";\n\nexport type MenuLabelProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeMenuLabelClass = \"hope-menu__label\";\n\n/**\n * Component used to render the label of a group.\n */\nexport function MenuLabel<C extends ElementType = \"div\">(props: MenuLabelProps<C>) {\n  const defaultIdSuffix = createUniqueId();\n\n  const theme = useStyleConfig().Menu;\n\n  const menuContext = useMenuContext();\n  const menuGroupContext = useMenuGroupContext();\n\n  const [local, others] = splitProps(props as MenuLabelProps<\"div\">, [\"class\", \"id\"]);\n\n  const id = () => local.id ?? `${menuContext.state.labelIdPrefix}-${defaultIdSuffix}`;\n\n  const classes = () => classNames(local.class, hopeMenuLabelClass, menuLabelStyles());\n\n  onMount(() => {\n    menuGroupContext?.setAriaLabelledBy(id());\n  });\n\n  return <Box id={id()} class={classes()} __baseStyle={theme?.baseStyle?.label} {...others} />;\n}\n\nMenuLabel.toString = () => createClassSelector(hopeMenuLabelClass);\n"
  },
  {
    "path": "packages/solid/src/components/menu/menu-trigger.tsx",
    "content": "import { JSX, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { isFunction } from \"../../utils/assertion\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { chainHandlers } from \"../../utils/function\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useMenuContext } from \"./menu\";\nimport { menuTriggerStyles } from \"./menu.styles\";\n\nexport type MenuTriggerProps<C extends ElementType = \"button\"> = HTMLHopeProps<C>;\n\nconst hopeMenuTriggerClass = \"hope-menu__trigger\";\n\n/**\n * The trigger that toggles the menu.\n */\nexport function MenuTrigger<C extends ElementType = \"button\">(props: MenuTriggerProps<C>) {\n  const theme = useStyleConfig().Menu;\n\n  const menuContext = useMenuContext();\n\n  const [local, others] = splitProps(props as MenuTriggerProps<\"button\">, [\n    \"ref\",\n    \"class\",\n    \"onClick\",\n    \"onKeyDown\",\n    \"onBlur\",\n  ]);\n\n  const assignTriggerRef = (el: HTMLButtonElement) => {\n    menuContext.assignTriggerRef(el);\n\n    if (isFunction(local.ref)) {\n      local.ref(el);\n    } else {\n      // eslint-disable-next-line solid/reactivity\n      local.ref = el;\n    }\n  };\n\n  const onClick: JSX.EventHandlerUnion<HTMLButtonElement, MouseEvent> = event => {\n    chainHandlers(menuContext.onTriggerClick, local.onClick)(event);\n  };\n\n  const onKeyDown: JSX.EventHandlerUnion<HTMLButtonElement, KeyboardEvent> = event => {\n    chainHandlers(menuContext.onTriggerKeyDown, local.onKeyDown)(event);\n  };\n\n  const onBlur: JSX.EventHandlerUnion<HTMLButtonElement, FocusEvent> = event => {\n    chainHandlers(menuContext.onTriggerBlur, local.onBlur)(event);\n  };\n\n  const classes = () => classNames(local.class, hopeMenuTriggerClass, menuTriggerStyles());\n\n  return (\n    <hope.button\n      ref={assignTriggerRef}\n      id={menuContext.state.triggerId}\n      type=\"button\"\n      aria-haspopup=\"menu\"\n      aria-controls={menuContext.state.menuContentId}\n      aria-expanded={menuContext.state.opened}\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.trigger}\n      onClick={onClick}\n      onKeyDown={onKeyDown}\n      onBlur={onBlur}\n      {...others}\n    />\n  );\n}\n\nMenuTrigger.toString = () => createClassSelector(hopeMenuTriggerClass);\n"
  },
  {
    "path": "packages/solid/src/components/menu/menu.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { SystemStyleObject } from \"../../styled-system\";\nimport { css, globalCss } from \"../../styled-system/stitches.config\";\n\n/* -------------------------------------------------------------------------------------------------\n * Menu - solid-transition-group classes\n * -----------------------------------------------------------------------------------------------*/\n\nexport const menuTransitionName = {\n  scaleTopLeft: \"hope-menu-scale-top-left-transition\",\n  scaleTopRight: \"hope-menu-scale-top-right-transition\",\n  scaleBottomLeft: \"hope-menu-scale-bottom-left-transition\",\n  scaleBottomRight: \"hope-menu-scale-bottom-right-transition\",\n};\n\nfunction createMenuScaleTransition(name: string, transformOrigin: string) {\n  return {\n    [`.${name}-enter, .${name}-exit-to`]: {\n      opacity: 0,\n      transform: \"scale(0.8)\",\n    },\n    [`.${name}-enter-to, .${name}-exit`]: {\n      opacity: 1,\n      transform: \"scale(1)\",\n    },\n    [`.${name}-enter-active`]: {\n      transformOrigin,\n      transitionProperty: \"opacity, transform\",\n      transitionDuration: \"200ms\",\n      transitionTimingFunction: \"ease-out\",\n    },\n    [`.${name}-exit-active`]: {\n      transformOrigin,\n      transitionProperty: \"opacity, transform\",\n      transitionDuration: \"100ms\",\n      transitionTimingFunction: \"ease-in\",\n    },\n  };\n}\n\nexport const menuTransitionStyles = globalCss({\n  ...createMenuScaleTransition(menuTransitionName.scaleTopLeft, \"top left\"),\n  ...createMenuScaleTransition(menuTransitionName.scaleTopRight, \"top right\"),\n  ...createMenuScaleTransition(menuTransitionName.scaleBottomLeft, \"bottom left\"),\n  ...createMenuScaleTransition(menuTransitionName.scaleBottomRight, \"bottom right\"),\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Menu - trigger\n * -----------------------------------------------------------------------------------------------*/\n\nexport const menuTriggerStyles = css({\n  appearance: \"none\",\n  display: \"inline-flex\",\n  alignItems: \"center\",\n  outline: \"none\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Menu - content (the floating panel)\n * -----------------------------------------------------------------------------------------------*/\n\nexport const menuContentStyles = css({\n  zIndex: \"$dropdown\",\n  position: \"absolute\",\n  left: 0,\n  top: \"100%\",\n\n  display: \"flex\",\n  flexDirection: \"column\",\n  minWidth: \"$56\",\n  overflowY: \"auto\",\n\n  outline: \"none\",\n\n  margin: 0,\n\n  boxShadow: \"$md\",\n  border: \"1px solid $colors$neutral7\",\n  borderRadius: \"$sm\",\n  backgroundColor: \"$loContrast\",\n\n  px: 0,\n  py: \"$1\",\n\n  \"&:focus\": {\n    outline: \"none\",\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Menu - group\n * -----------------------------------------------------------------------------------------------*/\n\nexport const menuGroupStyles = css({});\n\n/* -------------------------------------------------------------------------------------------------\n * Menu - label\n * -----------------------------------------------------------------------------------------------*/\n\nexport const menuLabelStyles = css({\n  display: \"flex\",\n  alignItems: \"center\",\n\n  mx: \"$1\",\n\n  py: \"$2\",\n  px: \"$3\",\n\n  color: \"$neutral11\",\n  fontSize: \"$xs\",\n  fontWeight: \"$medium\",\n  lineHeight: \"$4\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Menu - item\n * -----------------------------------------------------------------------------------------------*/\n\nfunction createColorVariant(config: { color: string; bgColorActive: string }): SystemStyleObject {\n  return {\n    color: config.color,\n\n    [`&[data-active]`]: {\n      backgroundColor: config.bgColorActive,\n    },\n  };\n}\n\nexport const menuItemStyles = css({\n  position: \"relative\",\n\n  display: \"flex\",\n  alignItems: \"center\",\n\n  mx: \"$1\",\n\n  borderRadius: \"$sm\",\n\n  py: \"$2\",\n  px: \"$3\",\n\n  fontSize: \"$base\",\n  fontWeight: \"$normal\",\n  lineHeight: \"$6\",\n\n  cursor: \"pointer\",\n  userSelect: \"none\",\n\n  transition: \"color 250ms, background-color 250ms\",\n\n  \"&[data-disabled]\": {\n    color: \"$neutral8\",\n    cursor: \"not-allowed\",\n  },\n\n  variants: {\n    colorScheme: {\n      primary: createColorVariant({ color: \"$primary11\", bgColorActive: \"$primary3\" }),\n      accent: createColorVariant({ color: \"$accent11\", bgColorActive: \"$accent3\" }),\n      neutral: createColorVariant({ color: \"$neutral12\", bgColorActive: \"$neutral4\" }),\n      success: createColorVariant({ color: \"$success11\", bgColorActive: \"$success3\" }),\n      info: createColorVariant({ color: \"$info11\", bgColorActive: \"$info3\" }),\n      warning: createColorVariant({ color: \"$warning11\", bgColorActive: \"$warning3\" }),\n      danger: createColorVariant({ color: \"$danger11\", bgColorActive: \"$danger3\" }),\n    },\n  },\n\n  defaultVariants: {\n    colorScheme: \"neutral\",\n  },\n});\n\nexport type MenuItemVariants = VariantProps<typeof menuItemStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * Menu - item icon wrapper\n * -----------------------------------------------------------------------------------------------*/\n\nexport const menuItemIconWrapperStyles = css({\n  display: \"inline-flex\",\n  alignItems: \"center\",\n  justifyContent: \"center\",\n  flexShrink: 0,\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Menu - item text\n * -----------------------------------------------------------------------------------------------*/\n\nexport const menuItemTextStyles = css({\n  flexGrow: 1,\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Menu - item command\n * -----------------------------------------------------------------------------------------------*/\n\nexport const menuItemCommandStyles = css({\n  flexShrink: 0,\n\n  color: \"$neutral11\",\n  fontSize: \"$sm\",\n  lineHeight: \"$none\",\n});\n"
  },
  {
    "path": "packages/solid/src/components/menu/menu.tsx",
    "content": "import type { Placement } from \"@floating-ui/dom\";\nimport { autoUpdate, computePosition, flip, offset, shift } from \"@floating-ui/dom\";\nimport {\n  Accessor,\n  createContext,\n  createSignal,\n  createUniqueId,\n  JSX,\n  Show,\n  useContext,\n} from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { SystemStyleObject } from \"../../styled-system/types\";\nimport {\n  contains,\n  getRelatedTarget,\n  isScrollable,\n  maintainScrollVisibility,\n} from \"../../utils/dom\";\nimport { isChildrenFunction } from \"../../utils/solid\";\nimport {\n  getActionFromKey,\n  getIndexByLetter,\n  getUpdatedIndex,\n  MenuActions,\n  MenuItemData,\n} from \"./menu.utils\";\n\ntype MenuMotionPreset =\n  | \"scale-top-left\"\n  | \"scale-top-right\"\n  | \"scale-bottom-left\"\n  | \"scale-bottom-right\"\n  | \"none\";\n\ntype MenuChildrenRenderProp = (props: { opened: Accessor<boolean> }) => JSX.Element;\n\ninterface ThemeableMenuOptions {\n  /**\n   * If `true`, the menu will close when a menu item is selected.\n   */\n  closeOnSelect?: boolean;\n\n  /**\n   * Offset between the menu content and the reference (trigger) element.\n   */\n  offset?: number;\n\n  /**\n   * Placement of the menu content.\n   */\n  placement?: Placement;\n\n  /**\n   * Menu content opening/closing transition.\n   */\n  motionPreset?: MenuMotionPreset;\n}\n\nexport interface MenuProps extends ThemeableMenuOptions {\n  /**\n   * The `id` of the menu.\n   */\n  id?: string;\n\n  /**\n   * Children of the menu.\n   */\n  children?: JSX.Element | MenuChildrenRenderProp;\n}\n\ninterface MenuState {\n  /**\n   * If `true`, the menu will be open.\n   */\n  opened: boolean;\n\n  /**\n   * If `true`, the menu will close when a menu item is clicked.\n   */\n  closeOnSelect: boolean;\n\n  /**\n   * The id of the current `aria-activedescendent` element.\n   */\n  activeDescendantId?: string;\n\n  /**\n   * The `id` of the `MenuTrigger`.\n   */\n  triggerId: string;\n\n  /**\n   * The `id` of the `MenuContent`.\n   */\n  menuContentId: string;\n\n  /**\n   * The prefix of the group labels (`MenuLabel`) `id`.\n   */\n  labelIdPrefix: string;\n\n  /**\n   * The prefix of the menutiems (`MenuItem`) `id`.\n   */\n  itemIdPrefix: string;\n\n  /**\n   * The list of available item.\n   */\n  items: MenuItemData[];\n\n  /**\n   * Menu opening/closing transition.\n   */\n  motionPreset?: MenuMotionPreset;\n\n  /**\n   * Index of the active `MenuItem`.\n   */\n  activeIndex: number;\n\n  /**\n   * If `true`, prevent the blur event when clicking a `MenuItem`.\n   */\n  ignoreBlur: boolean;\n\n  /**\n   * The string to search for in the `MenuContent`.\n   */\n  searchString: string;\n\n  /**\n   * The timeout id of the search functionnality.\n   */\n  searchTimeoutId?: number;\n}\n\n/**\n * The wrapper component that provides context for all its children.\n */\nexport function Menu(props: MenuProps) {\n  const defaultBaseId = `hope-menu-${createUniqueId()}`;\n\n  const theme = useStyleConfig().Menu;\n\n  const [_items, _setItems] = createSignal<Array<MenuItemData>>([]);\n\n  const [state, setState] = createStore<MenuState>({\n    get triggerId() {\n      return props.id ?? `${defaultBaseId}-trigger`;\n    },\n    get menuContentId() {\n      return `${defaultBaseId}-content`;\n    },\n    get labelIdPrefix() {\n      return `${defaultBaseId}-label`;\n    },\n    get itemIdPrefix() {\n      return `${defaultBaseId}-item`;\n    },\n    get activeDescendantId() {\n      return this.opened ? `${this.itemIdPrefix}-${this.activeIndex}` : undefined;\n    },\n    get closeOnSelect() {\n      return props.closeOnSelect ?? theme?.defaultProps?.root?.closeOnSelect ?? true;\n    },\n    get motionPreset() {\n      if (props.motionPreset) {\n        return props.motionPreset;\n      }\n\n      if (theme?.defaultProps?.root?.motionPreset) {\n        return theme?.defaultProps?.root?.motionPreset;\n      }\n\n      if (props.placement?.startsWith(\"top\")) {\n        return \"scale-bottom-left\";\n      }\n\n      return \"scale-top-left\";\n    },\n    get items() {\n      return _items();\n    },\n    opened: false,\n    activeIndex: 0,\n    ignoreBlur: false,\n    searchString: \"\",\n    searchTimeoutId: undefined,\n  });\n\n  // element refs\n  let triggerRef: HTMLButtonElement | undefined;\n  let contentRef: HTMLDivElement | undefined;\n\n  let cleanupContentAutoUpdate: (() => void) | undefined;\n\n  const updateContentPosition = async () => {\n    if (!triggerRef || !contentRef) {\n      return;\n    }\n\n    const { x, y } = await computePosition(triggerRef, contentRef, {\n      placement: props.placement ?? theme?.defaultProps?.root?.placement ?? \"bottom-start\",\n      middleware: [offset(props.offset ?? theme?.defaultProps?.root?.offset ?? 5), flip(), shift()],\n    });\n\n    if (!contentRef) {\n      return;\n    }\n\n    Object.assign(contentRef.style, {\n      left: `${Math.round(x)}px`,\n      top: `${Math.round(y)}px`,\n    });\n  };\n\n  const getSearchString = (char: string) => {\n    // reset typing timeout and start new timeout\n    // this allows us to make multiple-letter matches, like a native select\n    if (state.searchTimeoutId) {\n      window.clearTimeout(state.searchTimeoutId);\n    }\n\n    const searchTimeoutId = window.setTimeout(() => {\n      setState(\"searchString\", \"\");\n    }, 500);\n\n    setState(\"searchTimeoutId\", searchTimeoutId);\n\n    // add most recent letter to saved search string\n    setState(\"searchString\", searchString => (searchString += char));\n\n    return state.searchString;\n  };\n\n  const onItemChange = (index: number) => {\n    setState(\"activeIndex\", index);\n  };\n\n  const isItemDisabledCallback = (index: number) => {\n    return state.items[index].disabled;\n  };\n\n  const selectItem = (index: number) => {\n    onItemChange(index);\n\n    const menuItem = state.items[index];\n\n    menuItem.onSelect?.();\n\n    if (menuItem.closeOnSelect) {\n      updateOpeningState(false);\n    } else {\n      // if we don't close the menu on select, ensure to bring back focus to the `MenuTrigger` in order to keep keyboard navigation working.\n      focusTrigger();\n    }\n  };\n\n  const focusTrigger = () => {\n    triggerRef?.focus();\n  };\n\n  const onTriggerBlur = (event: FocusEvent) => {\n    // if the blur was provoked by an element inside the trigger, ignore it\n    if (contains(triggerRef, getRelatedTarget(event))) {\n      return;\n    }\n\n    // do not do blur action if ignoreBlur flag has been set\n    if (state.ignoreBlur) {\n      setState(\"ignoreBlur\", false);\n      return;\n    }\n\n    if (state.opened) {\n      updateOpeningState(false, false);\n    }\n  };\n\n  const onTriggerClick = () => {\n    updateOpeningState(!state.opened, false);\n  };\n\n  const onTriggerKeyDown = (event: KeyboardEvent) => {\n    const { key } = event;\n\n    const max = state.items.length - 1;\n    const action = getActionFromKey(event, state.opened);\n\n    switch (action) {\n      case MenuActions.Last:\n      case MenuActions.First:\n      case MenuActions.Next:\n      case MenuActions.Previous:\n        event.preventDefault();\n        return onItemChange(\n          getUpdatedIndex({\n            currentIndex: state.activeIndex,\n            maxIndex: max,\n            initialAction: action,\n            isItemDisabled: isItemDisabledCallback,\n          })\n        );\n\n      case MenuActions.SelectAndClose:\n        event.preventDefault();\n        selectItem(state.activeIndex);\n        return;\n\n      case MenuActions.Close:\n        event.preventDefault();\n        return updateOpeningState(false);\n\n      case MenuActions.Type:\n        return onTriggerType(key);\n\n      case MenuActions.Open:\n        event.preventDefault();\n        return updateOpeningState(true);\n\n      case MenuActions.OpenAndFocusLast:\n        event.preventDefault();\n        return updateOpeningState(true, true, true);\n    }\n  };\n\n  const onTriggerType = (letter: string) => {\n    // open the listbox if it is closed\n    updateOpeningState(true);\n\n    // find the index of the first matching option\n    const searchString = getSearchString(letter);\n    const searchIndex = getIndexByLetter(\n      state.items as MenuItemData[],\n      searchString,\n      state.activeIndex + 1\n    );\n\n    // if a match was found, go to it\n    if (searchIndex >= 0) {\n      onItemChange(searchIndex);\n    }\n\n    // if no matches, clear the timeout and search string\n    else {\n      window.clearTimeout(state.searchTimeoutId);\n      setState(\"searchString\", \"\");\n    }\n  };\n\n  const onItemClick = (index: number) => {\n    // if item is disabled ensure to bring back focus to the `MenuTrigger` in order to keep keyboard navigation working.\n    if (state.items[index].disabled) {\n      focusTrigger();\n      return;\n    }\n\n    selectItem(index);\n  };\n\n  const onItemMouseMove = (index: number) => {\n    // if index is already the active one, do nothing\n    if (state.activeIndex === index) {\n      return;\n    }\n\n    onItemChange(index);\n  };\n\n  const onItemMouseDown = () => {\n    // Clicking an item will cause a blur event,\n    // but we don't want to perform the default keyboard blur action\n    setState(\"ignoreBlur\", true);\n  };\n\n  const scheduleContentPositionAutoUpdate = () => {\n    if (state.opened) {\n      updateContentPosition();\n\n      // schedule auto update of the content position.\n      if (triggerRef && contentRef) {\n        cleanupContentAutoUpdate = autoUpdate(triggerRef, contentRef, updateContentPosition);\n      }\n    } else {\n      cleanupContentAutoUpdate?.();\n    }\n  };\n\n  const updateOpeningState = (opened: boolean, callFocus = true, lastItemActive = false) => {\n    if (state.opened === opened) {\n      return;\n    }\n\n    setState(\"opened\", opened);\n\n    setState(\"activeIndex\", lastItemActive ? state.items.length - 1 : 0);\n\n    scheduleContentPositionAutoUpdate();\n\n    // move focus back to the button, if needed.\n    callFocus && focusTrigger();\n  };\n\n  const onContentMouseLeave = () => {\n    onItemChange(-1);\n  };\n\n  const onContentClickOutside = (target: HTMLElement) => {\n    // clicking inside the trigger is not considered an \"outside click\"\n    if (contains(triggerRef, target)) {\n      return;\n    }\n\n    updateOpeningState(false, false);\n  };\n\n  const isItemActiveDescendant = (index: number) => {\n    return index === state.activeIndex;\n  };\n\n  const assignTriggerRef = (el: HTMLButtonElement) => {\n    triggerRef = el;\n  };\n\n  const assignContentRef = (el: HTMLDivElement) => {\n    contentRef = el;\n  };\n\n  const scrollToItem = (optionRef: HTMLDivElement) => {\n    if (!contentRef) {\n      return;\n    }\n\n    // ensure the new item is in view\n    if (isScrollable(contentRef)) {\n      maintainScrollVisibility(optionRef, contentRef);\n    }\n  };\n\n  const registerItem = (itemData: MenuItemData) => {\n    const index = state.items.findIndex(item => item.key === itemData.key);\n\n    // do not register the same item twice.\n    if (index != -1) {\n      return index;\n    }\n\n    // In Solid ^1.4.0 state.options is not up to date after setState call\n\n    // setState(\"items\", prev => [...prev, itemData]);\n    // return state.items.length - 1;\n\n    const updatedItems = _setItems(prev => [...prev, itemData]);\n\n    return updatedItems.length - 1;\n  };\n\n  const openedAccessor = () => state.opened;\n\n  const context: MenuContextValue = {\n    state: state as MenuState,\n    isItemActiveDescendant,\n    assignTriggerRef,\n    assignContentRef,\n    registerItem,\n    scrollToItem,\n    onTriggerBlur,\n    onTriggerClick,\n    onTriggerKeyDown,\n    onContentMouseLeave,\n    onContentClickOutside,\n    onItemClick,\n    onItemMouseMove,\n    onItemMouseDown,\n  };\n\n  return (\n    <MenuContext.Provider value={context}>\n      <Show when={isChildrenFunction(props)} fallback={props.children as JSX.Element}>\n        {(props.children as MenuChildrenRenderProp)?.({ opened: openedAccessor })}\n      </Show>\n    </MenuContext.Provider>\n  );\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ninterface MenuContextValue {\n  state: MenuState;\n\n  /**\n   * Check if the item is the current active-descendant by comparing its index with the active index.\n   */\n  isItemActiveDescendant: (index: number) => boolean;\n\n  /**\n   * Callback to assign the `MenuTrigger` ref.\n   */\n  assignTriggerRef: (el: HTMLButtonElement) => void;\n\n  /**\n   * Callback to assign the `MenuContent` ref.\n   */\n  assignContentRef: (el: HTMLDivElement) => void;\n\n  /**\n   * Scroll to the active item.\n   */\n  scrollToItem: (itemRef: HTMLDivElement) => void;\n\n  /**\n   * Callback to notify the context that a `MenuItem` is mounted.\n   * @return The index of the item.\n   */\n  registerItem: (itemData: MenuItemData) => number;\n\n  /**\n   * Callback invoked when the `MenuTrigger` loose focus.\n   */\n  onTriggerBlur: (event: FocusEvent) => void;\n\n  /**\n   * Callback invoked when the user click on the `MenuTrigger`.\n   */\n  onTriggerClick: (event: MouseEvent) => void;\n\n  /**\n   * Callback invoked when the user trigger the `MenuTrigger` with keyboard.\n   */\n  onTriggerKeyDown: (event: KeyboardEvent) => void;\n\n  /**\n   * Callback invoked when the user click on a `MenuItem`.\n   */\n  onItemClick: (index: number) => void;\n\n  /**\n   * Callback invoked when the user cursor move on a `MenuItem`.\n   */\n  onItemMouseMove: (index: number) => void;\n\n  /**\n   * Callback invoked when the user click on a `MenuItem`.\n   */\n  onItemMouseDown: () => void;\n\n  /**\n   * Callback invoked when the user click outside the `MenuContent`.\n   */\n  onContentClickOutside: (target: HTMLElement) => void;\n\n  /**\n   * Callback invoked when the user cursor leave the `MenuContent`.\n   */\n  onContentMouseLeave: () => void;\n}\n\nconst MenuContext = createContext<MenuContextValue>();\n\nexport function useMenuContext() {\n  const context = useContext(MenuContext);\n\n  if (!context) {\n    throw new Error(\"[Hope UI]: useMenuContext must be used within a `<Menu />` component\");\n  }\n\n  return context;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * StyleConfig\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface MenuStyleConfig {\n  baseStyle?: {\n    trigger?: SystemStyleObject;\n    content?: SystemStyleObject;\n    group?: SystemStyleObject;\n    label?: SystemStyleObject;\n    item?: SystemStyleObject;\n    itemText?: SystemStyleObject;\n    itemIconWrapper?: SystemStyleObject;\n    itemCommand?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: ThemeableMenuOptions;\n  };\n}\n"
  },
  {
    "path": "packages/solid/src/components/menu/menu.utils.ts",
    "content": "export interface MenuItemData {\n  /**\n   * A key that uniquely identify the menu item.\n   */\n  key: string;\n\n  /**\n   * Optional text used for typeahead purposes.\n   * By default the typeahead behavior will use the `.textContent` of the `MenuItem`.\n   * Use this when the content is complex, or you have non-textual content inside.\n   */\n  textValue: string;\n\n  /**\n   * If `true`, the item will be disabled.\n   */\n  disabled: boolean;\n\n  /**\n   * If `true`, the menu will close when the menu item is selected.\n   */\n  closeOnSelect: boolean;\n\n  /**\n   * Event handler called when the user selects an item (via mouse or keyboard).\n   */\n  onSelect?: () => void;\n}\n\ninterface GetUpdatedIndexParams {\n  /**\n   * The current active index.\n   */\n  currentIndex: number;\n\n  /**\n   * The index of the last item.\n   */\n  maxIndex: number;\n\n  /**\n   * The initialy performed action.\n   */\n  initialAction: MenuActions;\n\n  /**\n   * Callback invoked to check if an item at a given index is diabled or not.\n   */\n  isItemDisabled: (index: number) => boolean;\n}\n\n/**\n * List of named menu actions\n */\nexport enum MenuActions {\n  Close,\n  SelectAndClose,\n  First,\n  Last,\n  Next,\n  Open,\n  OpenAndFocusLast,\n  Previous,\n  Select,\n  Type,\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Helper functions\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Filter an array of items against an input string.\n * @return an array of items that begin with the filter string, case-independent.\n */\nfunction filterItems(items: MenuItemData[] = [], filter: string, exclude: string[] = []) {\n  return items.filter(item => {\n    if (item.disabled) {\n      return false;\n    }\n\n    const matches = item.textValue.toLowerCase().indexOf(filter.toLowerCase()) === 0;\n    return matches && exclude.indexOf(item.textValue) < 0;\n  });\n}\n\n/**\n * Return the index of an item from an array of items, based on a search string\n * if the filter is multiple iterations of the same letter (e.g \"aaa\"), then cycle through first-letter matches\n */\nexport function getIndexByLetter(items: MenuItemData[], filter: string, startIndex = 0) {\n  const orderedItems = [...items.slice(startIndex), ...items.slice(0, startIndex)];\n  const firstMatch = filterItems(orderedItems, filter)[0];\n  const allSameLetter = (array: string[]) => array.every(letter => letter === array[0]);\n\n  // first check if there is an exact match for the typed string\n  if (firstMatch) {\n    return items.indexOf(firstMatch);\n  }\n\n  // if the same letter is being repeated, cycle through first-letter matches\n  else if (allSameLetter(filter.split(\"\"))) {\n    const matches = filterItems(orderedItems, filter[0]);\n    return items.indexOf(matches[0]);\n  }\n\n  // if no matches, return -1\n  else {\n    return -1;\n  }\n}\n\n/**\n * Map a key press to an action.\n */\nexport function getActionFromKey(event: KeyboardEvent, menuOpen: boolean) {\n  const { key, altKey, ctrlKey, metaKey } = event;\n  const openKeys = [\"ArrowDown\", \"Enter\", \" \"]; // all keys that will do the default open action\n\n  // handle opening when closed\n  if (!menuOpen && openKeys.includes(key)) {\n    return MenuActions.Open;\n  }\n\n  // handle openeing when closed and arrow up is pressed\n  if (!menuOpen && key === \"ArrowUp\") {\n    return MenuActions.OpenAndFocusLast;\n  }\n\n  // home and end move the selected item when open or closed\n  if (key === \"Home\") {\n    return MenuActions.First;\n  }\n  if (key === \"End\") {\n    return MenuActions.Last;\n  }\n\n  // handle typing characters when open or closed\n  if (\n    key === \"Backspace\" ||\n    key === \"Clear\" ||\n    (key.length === 1 && key !== \" \" && !altKey && !ctrlKey && !metaKey)\n  ) {\n    return MenuActions.Type;\n  }\n\n  // handle keys when open\n  if (menuOpen) {\n    if (key === \"ArrowDown\") {\n      return MenuActions.Next;\n    } else if (key === \"ArrowUp\") {\n      return MenuActions.Previous;\n    } else if (key === \"Escape\") {\n      return MenuActions.Close;\n    } else if (key === \"Enter\" || key === \" \") {\n      return MenuActions.SelectAndClose;\n    }\n  }\n}\n\n/**\n * Get an updated item index after performing an action\n */\nfunction calculateActiveIndex(currentIndex: number, maxIndex: number, action: MenuActions) {\n  switch (action) {\n    case MenuActions.First:\n      return 0;\n    case MenuActions.Last:\n      return maxIndex;\n    case MenuActions.Previous:\n      return currentIndex - 1 < 0 ? maxIndex : currentIndex - 1;\n    case MenuActions.Next:\n      return currentIndex + 1 > maxIndex ? 0 : currentIndex + 1;\n    default:\n      return currentIndex;\n  }\n}\n\n/**\n * Get an updated item index after performing an action, ignoring \"disabled\" item.\n */\nexport function getUpdatedIndex(params: GetUpdatedIndexParams) {\n  const { currentIndex, maxIndex, initialAction, isItemDisabled: isItemDisabled } = params;\n\n  let nextIndex = calculateActiveIndex(currentIndex, maxIndex, initialAction);\n\n  while (isItemDisabled(nextIndex)) {\n    let nextAction = initialAction;\n    const isNextIndexFirst = nextIndex === 0;\n    const isNextIndexLast = nextIndex === maxIndex;\n\n    // If first item is disabled move down until find an enabled item.\n    if (initialAction === MenuActions.First) {\n      nextAction = MenuActions.Next;\n    }\n\n    // If last item is disabled move up until find an enabled item.\n    if (initialAction === MenuActions.Last) {\n      nextAction = MenuActions.Previous;\n    }\n\n    // If all previous items are disabled, don't move.\n    if (initialAction === MenuActions.Previous && isNextIndexFirst) {\n      nextIndex = currentIndex;\n      break;\n    }\n\n    // If all next items are disabled, don't move.\n    if (initialAction === MenuActions.Next && isNextIndexLast) {\n      nextIndex = currentIndex;\n      break;\n    }\n\n    nextIndex = calculateActiveIndex(nextIndex, maxIndex, nextAction);\n  }\n\n  return nextIndex;\n}\n"
  },
  {
    "path": "packages/solid/src/components/modal/create-modal.ts",
    "content": "// import { clearAllBodyScrollLocks, disableBodyScroll } from \"body-scroll-lock\";\nimport { createFocusTrap, FocusTrap } from \"focus-trap\";\nimport {\n  addScrollableSelector,\n  clearQueueScrollLocks,\n  disablePageScroll,\n  enablePageScroll,\n  removeScrollableSelector,\n} from \"scroll-lock\";\nimport { JSX, onCleanup, onMount } from \"solid-js\";\n\nimport { chainHandlers } from \"../../utils/function\";\nimport { useModalContext } from \"./modal\";\nimport { ModalContentProps } from \"./modal-content\";\n\nexport type CreateModalProps = Pick<ModalContentProps, \"onClick\">;\n\ninterface CreateModalReturn {\n  assignContainerRef: (el: HTMLDivElement) => void;\n  ariaLabelledBy: () => string | undefined;\n  ariaDescribedBy: () => string | undefined;\n  onDialogClick: JSX.EventHandler<HTMLElement, MouseEvent>;\n}\n\n/**\n * Modal hook that manages all the logic for the modal dialog widget.\n */\nexport function createModal(props: CreateModalProps): CreateModalReturn {\n  const modalContext = useModalContext();\n\n  let containerRef: HTMLDivElement | undefined;\n  let focusTrap: FocusTrap | undefined;\n\n  const assignContainerRef = (el: HTMLDivElement) => {\n    containerRef = el;\n  };\n\n  const ariaLabelledBy = () => {\n    return modalContext.state.headerMounted ? modalContext.state.headerId : undefined;\n  };\n\n  const ariaDescribedBy = () => {\n    return modalContext.state.bodyMounted ? modalContext.state.bodyId : undefined;\n  };\n\n  const onDialogClick: JSX.EventHandlerUnion<HTMLElement, MouseEvent> = event => {\n    chainHandlers(props.onClick, e => e.stopPropagation())(event);\n  };\n\n  const dialogSelector = () => `[id='${modalContext.state.dialogId}']`;\n  const childOfDialogSelector = () => `${dialogSelector()} *`;\n\n  const enableFocusTrapAndScrollLock = () => {\n    if (!containerRef) {\n      return;\n    }\n\n    if (modalContext.state.trapFocus) {\n      focusTrap = createFocusTrap(containerRef, {\n        initialFocus: modalContext.state.initialFocus,\n        fallbackFocus: dialogSelector(),\n        allowOutsideClick: true,\n      });\n\n      focusTrap.activate();\n    }\n\n    if (modalContext.state.blockScrollOnMount) {\n      addScrollableSelector(childOfDialogSelector());\n      disablePageScroll(containerRef);\n\n      // disableBodyScroll(containerRef, {\n      //   allowTouchMove: el => {\n      //     if (!containerRef || containerRef === el) {\n      //       return false;\n      //     }\n      //     // allow touchmove only if `el` is a child of `container`\n      //     return containerRef.contains(el);\n      //   },\n      //   reserveScrollBarGap: modalContext.state.preserveScrollBarGap,\n      // });\n    }\n  };\n\n  const disableFocusTrapAndScrollLock = () => {\n    focusTrap?.deactivate();\n\n    removeScrollableSelector(childOfDialogSelector());\n    clearQueueScrollLocks();\n    enablePageScroll();\n\n    //clearAllBodyScrollLocks();\n  };\n\n  onMount(() => {\n    enableFocusTrapAndScrollLock();\n  });\n\n  onCleanup(() => {\n    disableFocusTrapAndScrollLock();\n  });\n\n  return {\n    assignContainerRef,\n    ariaLabelledBy,\n    ariaDescribedBy,\n    onDialogClick,\n  };\n}\n"
  },
  {
    "path": "packages/solid/src/components/modal/index.ts",
    "content": "export * from \"./modal\";\nexport * from \"./modal.styles\";\nexport * from \"./modal-body\";\nexport * from \"./modal-close-button\";\nexport * from \"./modal-content\";\nexport * from \"./modal-footer\";\nexport * from \"./modal-header\";\nexport * from \"./modal-overlay\";\n"
  },
  {
    "path": "packages/solid/src/components/modal/modal-body.tsx",
    "content": "import { onCleanup, onMount, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useModalContext } from \"./modal\";\nimport { modalBodyStyles } from \"./modal.styles\";\n\nexport type ModalBodyProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeModalBodyClass = \"hope-modal__body\";\n\n/**\n * ModalBody houses the main content of the modal.\n */\nexport function ModalBody<C extends ElementType = \"div\">(props: ModalBodyProps<C>) {\n  const theme = useStyleConfig().Modal;\n\n  const modalContext = useModalContext();\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeModalBodyClass,\n      modalBodyStyles({\n        scrollBehavior: modalContext.state.scrollBehavior,\n      })\n    );\n  };\n\n  /**\n   * Notify the modal context if this component was rendered or used\n   * so we can append `aria-describedby` automatically\n   */\n  onMount(() => modalContext.setBodyMounted(true));\n  onCleanup(() => modalContext.setBodyMounted(false));\n\n  return (\n    <Box\n      class={classes()}\n      id={modalContext.state.bodyId}\n      __baseStyle={theme?.baseStyle?.body}\n      {...others}\n    />\n  );\n}\n\nModalBody.toString = () => createClassSelector(hopeModalBodyClass);\n"
  },
  {
    "path": "packages/solid/src/components/modal/modal-close-button.tsx",
    "content": "import { JSX, mergeProps, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { chainHandlers } from \"../../utils/function\";\nimport { CloseButton, CloseButtonProps } from \"../close-button/close-button\";\nimport { useModalContext } from \"./modal\";\nimport { modalCloseButtonStyles } from \"./modal.styles\";\n\nconst hopeModalCloseButtonClass = \"hope-modal__close-button\";\n\n/**\n * ModalCloseButton is used closes the modal.\n *\n * You don't need to pass the `onClick` to it, it reads the\n * `onClose` action from the modal context.\n */\nexport function ModalCloseButton(props: CloseButtonProps) {\n  const theme = useStyleConfig().Modal;\n\n  const modalContext = useModalContext();\n\n  const defaultProps: CloseButtonProps = {\n    \"aria-label\": theme?.defaultProps?.closeButton?.[\"aria-label\"] ?? \"Close modal\",\n    size: theme?.defaultProps?.closeButton?.size ?? \"md\",\n    icon: theme?.defaultProps?.closeButton?.icon,\n  };\n\n  const propsWithDefaults = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefaults, [\"class\", \"onClick\"]);\n\n  const classes = () =>\n    classNames(local.class, hopeModalCloseButtonClass, modalCloseButtonStyles());\n\n  const onClick: JSX.EventHandlerUnion<HTMLButtonElement, MouseEvent> = event => {\n    chainHandlers(local.onClick, e => {\n      e.stopPropagation();\n      modalContext.onClose();\n    })(event);\n  };\n\n  return (\n    <CloseButton\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.closeButton}\n      onClick={onClick}\n      {...others}\n    />\n  );\n}\n\nModalCloseButton.toString = () => createClassSelector(hopeModalCloseButtonClass);\n"
  },
  {
    "path": "packages/solid/src/components/modal/modal-content.tsx",
    "content": "import { Show, splitProps } from \"solid-js\";\nimport { Transition } from \"solid-transition-group\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { createModal } from \"./create-modal\";\nimport { useModalContext } from \"./modal\";\nimport { modalContainerStyles, modalDialogStyles, modalTransitionName } from \"./modal.styles\";\n\nexport type ModalContentProps<C extends ElementType = \"section\"> = HTMLHopeProps<C>;\n\nconst hopeModalContainerClass = \"hope-modal__content-container\";\nconst hopeModalContentClass = \"hope-modal__content\";\n\n/**\n * Container for the modal dialog's content.\n */\nexport function ModalContent<C extends ElementType = \"section\">(props: ModalContentProps<C>) {\n  const theme = useStyleConfig().Modal;\n\n  const modalContext = useModalContext();\n\n  const [local, others] = splitProps(props as ModalContentProps<\"section\">, [\n    \"ref\",\n    \"class\",\n    \"role\",\n    \"aria-labelledby\",\n    \"aria-describedby\",\n    \"onClick\",\n  ]);\n\n  const { assignContainerRef, ariaLabelledBy, ariaDescribedBy, onDialogClick } = createModal(local);\n\n  const containerClasses = () => {\n    const containerClass = modalContainerStyles({\n      centered: modalContext.state.centered,\n      scrollBehavior: modalContext.state.scrollBehavior,\n    });\n\n    return classNames(hopeModalContainerClass, containerClass);\n  };\n\n  const dialogClasses = () => {\n    const dialogClass = modalDialogStyles({\n      size: modalContext.state.size,\n      scrollBehavior: modalContext.state.scrollBehavior,\n    });\n\n    return classNames(local.class, hopeModalContentClass, dialogClass);\n  };\n\n  const transitionName = () => {\n    switch (modalContext.state.motionPreset) {\n      case \"fade-in-bottom\":\n        return modalTransitionName.fadeInBottom;\n      case \"scale\":\n        return modalTransitionName.scale;\n      case \"none\":\n        return \"hope-none\";\n    }\n  };\n\n  return (\n    <Transition name={transitionName()} appear onAfterExit={modalContext.unmountPortal}>\n      <Show when={modalContext.state.opened}>\n        <Box\n          ref={assignContainerRef}\n          class={containerClasses()}\n          tabIndex={-1}\n          onMouseDown={modalContext.onMouseDown}\n          onKeyDown={modalContext.onKeyDown}\n          onClick={modalContext.onOverlayClick}\n        >\n          <hope.section\n            class={dialogClasses()}\n            __baseStyle={theme?.baseStyle?.content}\n            id={modalContext.state.dialogId}\n            role={local.role ?? \"dialog\"}\n            tabIndex={-1}\n            aria-modal={true}\n            aria-labelledby={ariaLabelledBy()}\n            aria-describedby={ariaDescribedBy()}\n            onClick={onDialogClick}\n            {...others}\n          />\n        </Box>\n      </Show>\n    </Transition>\n  );\n}\n\nModalContent.toString = () => createClassSelector(hopeModalContentClass);\n"
  },
  {
    "path": "packages/solid/src/components/modal/modal-footer.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { modalFooterStyles } from \"./modal.styles\";\n\nexport type ModalFooterProps<C extends ElementType = \"footer\"> = HTMLHopeProps<C>;\n\nconst hopeModalFooterClass = \"hope-modal__footer\";\n\n/**\n * ModalFooter houses the action buttons of the modal.\n */\nexport function ModalFooter<C extends ElementType = \"footer\">(props: ModalFooterProps<C>) {\n  const theme = useStyleConfig().Modal;\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeModalFooterClass, modalFooterStyles());\n\n  return <Box class={classes()} __baseStyle={theme?.baseStyle?.footer} {...others} />;\n}\n\nModalFooter.toString = () => createClassSelector(hopeModalFooterClass);\n"
  },
  {
    "path": "packages/solid/src/components/modal/modal-header.tsx",
    "content": "import { onCleanup, onMount, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useModalContext } from \"./modal\";\nimport { modalHeaderStyles } from \"./modal.styles\";\n\nexport type ModalHeaderProps<C extends ElementType = \"header\"> = HTMLHopeProps<C>;\n\nconst hopeModalHeaderClass = \"hope-modal__header\";\n\n/**\n * ModalHeader houses the title of the modal.\n */\nexport function ModalHeader<C extends ElementType = \"header\">(props: ModalHeaderProps<C>) {\n  const theme = useStyleConfig().Modal;\n\n  const modalContext = useModalContext();\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeModalHeaderClass, modalHeaderStyles());\n\n  /**\n   * Notify the modal context if this component was rendered or used\n   * so we can append `aria-labelledby` automatically\n   */\n  onMount(() => modalContext.setHeaderMounted(true));\n  onCleanup(() => modalContext.setHeaderMounted(false));\n\n  return (\n    <Box\n      class={classes()}\n      id={modalContext.state.headerId}\n      __baseStyle={theme?.baseStyle?.header}\n      {...others}\n    />\n  );\n}\n\nModalHeader.toString = () => createClassSelector(hopeModalHeaderClass);\n"
  },
  {
    "path": "packages/solid/src/components/modal/modal-overlay.tsx",
    "content": "import { Show, splitProps } from \"solid-js\";\nimport { Transition } from \"solid-transition-group\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useModalContext } from \"./modal\";\nimport { modalOverlayStyles, modalTransitionName } from \"./modal.styles\";\n\nexport type ModalOverlayProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeModalOverlayClass = \"hope-modal__overlay\";\n\n/**\n * ModalOverlay renders a backdrop behind the modal.\n */\nexport function ModalOverlay<C extends ElementType = \"div\">(props: ModalOverlayProps<C>) {\n  const theme = useStyleConfig().Modal;\n\n  const modalContext = useModalContext();\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeModalOverlayClass, modalOverlayStyles());\n\n  const transitionName = () => {\n    return modalContext.state.motionPreset === \"none\" ? \"hope-none\" : modalTransitionName.fade;\n  };\n\n  return (\n    <Transition name={transitionName()} appear>\n      <Show when={modalContext.state.opened}>\n        <Box class={classes()} __baseStyle={theme?.baseStyle?.overlay} {...others} />\n      </Show>\n    </Transition>\n  );\n}\n\nModalOverlay.toString = () => createClassSelector(hopeModalOverlayClass);\n"
  },
  {
    "path": "packages/solid/src/components/modal/modal.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css, globalCss } from \"../../styled-system/stitches.config\";\n\n/* -------------------------------------------------------------------------------------------------\n * Modal - solid-transition-group classes\n * -----------------------------------------------------------------------------------------------*/\n\nexport const modalTransitionName = {\n  fade: \"hope-modal-fade-transition\",\n  fadeInBottom: \"hope-modal-fade-in-bottom-transition\",\n  scale: \"hope-modal-scale-transition\",\n};\n\nexport const modalTransitionStyles = globalCss({\n  /* fade */\n  [`.${modalTransitionName.fade}-enter, .${modalTransitionName.fade}-exit-to`]: {\n    opacity: 0,\n  },\n  [`.${modalTransitionName.fade}-enter-to, .${modalTransitionName.fade}-exit`]: {\n    opacity: 1,\n  },\n  [`.${modalTransitionName.fade}-enter-active`]: {\n    transition: \"opacity 300ms ease-out\",\n  },\n  [`.${modalTransitionName.fade}-exit-active`]: {\n    transition: \"opacity 200ms ease-in\",\n  },\n\n  /* fade-in-bottom */\n  [`.${modalTransitionName.fadeInBottom}-enter, .${modalTransitionName.fadeInBottom}-exit-to`]: {\n    opacity: 0,\n    transform: \"translateY(16px)\",\n  },\n  [`.${modalTransitionName.fadeInBottom}-enter-to, .${modalTransitionName.fadeInBottom}-exit`]: {\n    opacity: 1,\n    transform: \"translateY(0)\",\n  },\n  [`.${modalTransitionName.fadeInBottom}-enter-active`]: {\n    transitionProperty: \"opacity, transform\",\n    transitionDuration: \"300ms\",\n    transitionTimingFunction: \"ease-out\",\n  },\n  [`.${modalTransitionName.fadeInBottom}-exit-active`]: {\n    transitionProperty: \"opacity, transform\",\n    transitionDuration: \"200ms\",\n    transitionTimingFunction: \"ease-in\",\n  },\n\n  /* scale */\n  [`.${modalTransitionName.scale}-enter, .${modalTransitionName.scale}-exit-to`]: {\n    opacity: 0,\n    transform: \"scale(0.95)\",\n  },\n  [`.${modalTransitionName.scale}-enter-to, .${modalTransitionName.scale}-exit`]: {\n    opacity: 1,\n    transform: \"scale(1)\",\n  },\n  [`.${modalTransitionName.scale}-enter-active`]: {\n    transitionProperty: \"opacity, transform\",\n    transitionDuration: \"300ms\",\n    transitionTimingFunction: \"ease-out\",\n  },\n  [`.${modalTransitionName.scale}-exit-active`]: {\n    transitionProperty: \"opacity, transform\",\n    transitionDuration: \"200ms\",\n    transitionTimingFunction: \"ease-in\",\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Modal - overlay\n * -----------------------------------------------------------------------------------------------*/\n\nexport const modalOverlayStyles = css({\n  zIndex: \"$overlay\",\n\n  position: \"fixed\",\n  top: 0,\n  left: 0,\n\n  width: \"100vw\",\n  height: \"100vh\",\n\n  backgroundColor: \"hsl(0 0% 0% / 65%)\", //\"$blackAlpha11\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Modal - container\n * -----------------------------------------------------------------------------------------------*/\n\nexport const baseModalContainerStyles = css({\n  zIndex: \"$modal\",\n  position: \"fixed\",\n  top: 0,\n  left: 0,\n\n  display: \"flex\",\n\n  width: \"100vw\",\n  height: \"100vh\",\n  \"@supports(height: -webkit-fill-available)\": {\n    height: \"-webkit-fill-available\",\n  },\n\n  outline: \"none\",\n\n  \"&:focus\": {\n    outline: \"none\",\n  },\n});\n\nexport const modalContainerStyles = css(baseModalContainerStyles, {\n  justifyContent: \"center\",\n\n  variants: {\n    centered: {\n      true: {\n        alignItems: \"center\",\n      },\n      false: {\n        alignItems: \"flex-start\",\n      },\n    },\n    scrollBehavior: {\n      inside: {\n        overflow: \"hidden\",\n      },\n      outside: {\n        overflow: \"auto\",\n      },\n    },\n  },\n});\n\nexport type ModalContainerVariants = VariantProps<typeof modalContainerStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * Modal - dialog (content)\n * -----------------------------------------------------------------------------------------------*/\n\nexport const baseDialogStyles = css({\n  zIndex: \"$modal\",\n  position: \"relative\",\n\n  display: \"flex\",\n  flexDirection: \"column\",\n\n  width: \"100%\",\n\n  outline: \"none\",\n  boxShadow: \"$lg\",\n  backgroundColor: \"$loContrast\",\n\n  color: \"inherit\",\n\n  \"&:focus\": {\n    outline: \"none\",\n  },\n});\n\nexport const modalDialogStyles = css(baseDialogStyles, {\n  justifyContent: \"center\",\n  my: \"3.75rem\",\n  borderRadius: \"$sm\",\n\n  variants: {\n    size: {\n      xs: {\n        maxWidth: \"$xs\",\n      },\n      sm: {\n        maxWidth: \"$sm\",\n      },\n      md: {\n        maxWidth: \"$md\",\n      },\n      lg: {\n        maxWidth: \"$lg\",\n      },\n      xl: {\n        maxWidth: \"$xl\",\n      },\n      \"2xl\": {\n        maxWidth: \"$2xl\",\n      },\n      \"3xl\": {\n        maxWidth: \"$3xl\",\n      },\n      \"4xl\": {\n        maxWidth: \"$4xl\",\n      },\n      \"5xl\": {\n        maxWidth: \"$5xl\",\n      },\n      \"6xl\": {\n        maxWidth: \"$6xl\",\n      },\n      \"7xl\": {\n        maxWidth: \"$7xl\",\n      },\n      \"8xl\": {\n        maxWidth: \"$8xl\",\n      },\n      full: {\n        maxWidth: \"100vw\",\n        minHeight: \"100vh\",\n        \"@supports(min-height: -webkit-fill-available)\": {\n          minHeight: \"-webkit-fill-available\",\n        },\n        my: 0,\n        borderRadius: \"$none\",\n      },\n    },\n    scrollBehavior: {\n      inside: {\n        maxHeight: \"calc(100% - 7.5rem)\",\n      },\n      outside: {\n        maxHeight: \"none\",\n      },\n    },\n  },\n});\n\nexport type ModalDialogVariants = VariantProps<typeof modalDialogStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * Modal - header\n * -----------------------------------------------------------------------------------------------*/\n\nexport const modalHeaderStyles = css({\n  flex: 0,\n  pt: \"$5\",\n  px: \"$5\",\n  pb: \"$3\",\n  fontSize: \"$lg\",\n  fontWeight: \"$medium\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Modal - body\n * -----------------------------------------------------------------------------------------------*/\n\nexport const modalBodyStyles = css({\n  flex: 1,\n  px: \"$5\",\n  py: \"$2\",\n\n  variants: {\n    scrollBehavior: {\n      inside: {\n        overflow: \"auto\",\n      },\n      outside: {\n        overflow: undefined,\n      },\n    },\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Modal - footer\n * -----------------------------------------------------------------------------------------------*/\n\nexport const modalFooterStyles = css({\n  display: \"flex\",\n  alignItems: \"center\",\n  justifyContent: \"flex-end\",\n  pt: \"$3\",\n  px: \"$5\",\n  pb: \"$5\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Modal - close button\n * -----------------------------------------------------------------------------------------------*/\n\nexport const modalCloseButtonStyles = css({\n  position: \"absolute\",\n  top: \"$4\",\n  insetInlineEnd: \"$4\",\n});\n"
  },
  {
    "path": "packages/solid/src/components/modal/modal.tsx",
    "content": "import {\n  createContext,\n  createEffect,\n  createSignal,\n  createUniqueId,\n  JSX,\n  Show,\n  useContext,\n} from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\nimport { Portal } from \"solid-js/web\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { SystemStyleObject } from \"../../styled-system/types\";\nimport { ThemeableCloseButtonOptions } from \"../close-button/close-button\";\nimport { ModalContainerVariants, ModalDialogVariants } from \"./modal.styles\";\n\ntype ModalMotionPreset = \"fade-in-bottom\" | \"scale\" | \"none\";\n\nexport interface ModalProps extends ModalContainerVariants, ModalDialogVariants {\n  /**\n   * If `true`, the modal will be open.\n   */\n  opened: boolean;\n\n  /**\n   * Callback invoked to close the modal.\n   */\n  onClose: () => void;\n\n  /**\n   * The `id` of the modal dialog\n   */\n  id?: string;\n\n  /**\n   * If `true`, the modal will close when the overlay is clicked\n   */\n  closeOnOverlayClick?: boolean;\n\n  /**\n   * If `true`, the modal will close when the `Esc` key is pressed\n   */\n  closeOnEsc?: boolean;\n\n  /**\n   * If `false`, focus lock will be disabled completely.\n   *\n   * This is useful in situations where you still need to interact with\n   * other surrounding elements.\n   *\n   * 🚨Warning: We don't recommend doing this because it hurts the\n   * accessibility of the modal, based on WAI-ARIA specifications.\n   */\n  trapFocus?: boolean;\n\n  /**\n   * A query selector string targeting the element to receive focus when the modal opens.\n   */\n  initialFocus?: string;\n\n  /**\n   * If `true`, scrolling will be disabled on the `body` when the modal opens.\n   */\n  blockScrollOnMount?: boolean;\n\n  /**\n   * If `true`, a `padding-right` will be applied to the body element\n   * that's equal to the width of the scrollbar.\n   *\n   * This can help prevent some unpleasant flickering effect\n   * and content adjustment when the modal opens\n   */\n  preserveScrollBarGap?: boolean;\n\n  /**\n   * Modal opening/closing transition.\n   */\n  motionPreset?: ModalMotionPreset;\n\n  /**\n   * Children of the Modal\n   */\n  children?: JSX.Element;\n\n  /**\n   * Callback fired when the overlay is clicked.\n   */\n  onOverlayClick?: () => void;\n\n  /**\n   * Callback fired when the escape key is pressed and focus is within modal\n   */\n  onEsc?: () => void;\n}\n\ntype ThemeableModalOptions = Pick<\n  ModalProps,\n  | \"scrollBehavior\"\n  | \"centered\"\n  | \"motionPreset\"\n  | \"size\"\n  | \"blockScrollOnMount\"\n  | \"closeOnEsc\"\n  | \"closeOnOverlayClick\"\n  | \"preserveScrollBarGap\"\n  | \"trapFocus\"\n>;\n\ninterface ModalState\n  extends Required<\n      Pick<\n        ModalProps,\n        | \"opened\"\n        | \"motionPreset\"\n        | \"size\"\n        | \"centered\"\n        | \"scrollBehavior\"\n        | \"closeOnOverlayClick\"\n        | \"closeOnEsc\"\n        | \"trapFocus\"\n        | \"blockScrollOnMount\"\n        | \"preserveScrollBarGap\"\n      >\n    >,\n    Pick<ModalProps, \"initialFocus\"> {\n  /**\n   * The `id` of the modal dialog\n   */\n  dialogId: string;\n\n  /**\n   * The `id` of the modal dialog header\n   */\n  headerId: string;\n\n  /**\n   * The `id` of the modal dialog body\n   */\n  bodyId: string;\n\n  /**\n   * If `true`, notify that the modal header component is rendered\n   */\n  headerMounted: boolean;\n\n  /**\n   * If `true`, notify that the modal body component is rendered\n   */\n  bodyMounted: boolean;\n}\n\n/**\n * Modal provides context, theming, and accessibility properties\n * to all other modal components.\n *\n * It doesn't render any DOM node.\n */\nexport function Modal(props: ModalProps) {\n  const defaultDialogId = `hope-modal-${createUniqueId()}`;\n\n  const theme = useStyleConfig().Modal;\n\n  const [state, setState] = createStore<ModalState>({\n    headerMounted: false,\n    bodyMounted: false,\n    get opened() {\n      return props.opened;\n    },\n    get dialogId() {\n      return props.id ?? defaultDialogId;\n    },\n    get headerId() {\n      return `${this.dialogId}--header`;\n    },\n    get bodyId() {\n      return `${this.dialogId}--body`;\n    },\n    get initialFocus() {\n      return props.initialFocus;\n    },\n    get motionPreset() {\n      return props.motionPreset ?? theme?.defaultProps?.root?.motionPreset ?? \"scale\";\n    },\n    get size() {\n      return props.size ?? theme?.defaultProps?.root?.size ?? \"md\";\n    },\n    get centered() {\n      return props.centered ?? theme?.defaultProps?.root?.centered ?? false;\n    },\n    get scrollBehavior() {\n      return props.scrollBehavior ?? theme?.defaultProps?.root?.scrollBehavior ?? \"outside\";\n    },\n    get closeOnOverlayClick() {\n      return props.closeOnOverlayClick ?? theme?.defaultProps?.root?.closeOnOverlayClick ?? true;\n    },\n    get closeOnEsc() {\n      return props.closeOnEsc ?? theme?.defaultProps?.root?.closeOnEsc ?? true;\n    },\n    get trapFocus() {\n      return props.trapFocus ?? theme?.defaultProps?.root?.trapFocus ?? true;\n    },\n    get blockScrollOnMount() {\n      return props.blockScrollOnMount ?? theme?.defaultProps?.root?.blockScrollOnMount ?? true;\n    },\n    get preserveScrollBarGap() {\n      return props.preserveScrollBarGap ?? theme?.defaultProps?.root?.preserveScrollBarGap ?? false;\n    },\n  });\n\n  /**\n   * Internal state to handle modal portal `mounted` state.\n   * Dirty hack since solid-transition-group doesn't work with Portal.\n   */\n  const [isPortalMounted, setIsPortalMounted] = createSignal(false);\n\n  createEffect(() => {\n    if (state.opened) {\n      // mount portal when state `opened` is true.\n      setIsPortalMounted(true);\n    } else {\n      // unmount portal instantly when there is no modal transition.\n      state.motionPreset === \"none\" && setIsPortalMounted(false);\n    }\n  });\n\n  // For smooth transition, unmount portal only after modal's content exit transition is done.\n  const unmountPortal = () => setIsPortalMounted(false);\n\n  const onClose = () => props.onClose();\n  const setHeaderMounted = (value: boolean) => setState(\"headerMounted\", value);\n  const setBodyMounted = (value: boolean) => setState(\"bodyMounted\", value);\n\n  let mouseDownTarget: EventTarget | null = null;\n\n  const onMouseDown = (event: MouseEvent) => {\n    mouseDownTarget = event.target;\n  };\n\n  const onKeyDown = (event: KeyboardEvent) => {\n    if (event.key === \"Escape\") {\n      event.stopPropagation();\n\n      if (state.closeOnEsc) {\n        onClose();\n      }\n\n      props.onEsc?.();\n    }\n  };\n\n  const onOverlayClick = (event: MouseEvent) => {\n    event.stopPropagation();\n    /**\n     * Prevent the modal from closing when user\n     * start dragging from the content, and release drag outside the content.\n     *\n     * Because it is technically not a considered \"click outside\".\n     */\n    if (mouseDownTarget !== event.target) {\n      return;\n    }\n\n    if (state.closeOnOverlayClick) {\n      onClose();\n    }\n\n    props.onOverlayClick?.();\n  };\n\n  const context: ModalContextValue = {\n    state,\n    unmountPortal,\n    onClose,\n    onMouseDown,\n    onKeyDown,\n    onOverlayClick,\n    setHeaderMounted,\n    setBodyMounted,\n  };\n\n  return (\n    <Show when={isPortalMounted()}>\n      <ModalContext.Provider value={context}>\n        <Portal>{props.children}</Portal>\n      </ModalContext.Provider>\n    </Show>\n  );\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface ModalContextValue {\n  state: ModalState;\n\n  /**\n   * Callback invoked to close the modal.\n   */\n  onClose: () => void;\n\n  /**\n   * Callback invoked when the overlay is clicked.\n   */\n  onOverlayClick: (event: MouseEvent) => void;\n\n  /**\n   * Callback invoked when a `mouseDown` is fired on the modal container.\n   */\n  onMouseDown: (event: MouseEvent) => void;\n\n  /**\n   * Callback invoked when a `keyDown` is fired on the modal container.\n   */\n  onKeyDown: (event: KeyboardEvent) => void;\n\n  /**\n   * Callback function to unmount the modal's portal.\n   */\n  unmountPortal: () => void;\n\n  /**\n   * Callback function to set if the modal header is mounted\n   */\n  setHeaderMounted: (value: boolean) => void;\n\n  /**\n   * Callback function to set if the modal body is mounted\n   */\n  setBodyMounted: (value: boolean) => void;\n}\n\nconst ModalContext = createContext<ModalContextValue>();\n\nexport function useModalContext() {\n  const context = useContext(ModalContext);\n\n  if (!context) {\n    throw new Error(\"[Hope UI]: useModalContext must be used within a `<Modal />` component\");\n  }\n\n  return context;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * StyleConfig\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface ModalStyleConfig {\n  baseStyle?: {\n    overlay?: SystemStyleObject;\n    content?: SystemStyleObject;\n    closeButton?: SystemStyleObject;\n    header?: SystemStyleObject;\n    body?: SystemStyleObject;\n    footer?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: ThemeableModalOptions;\n    closeButton?: ThemeableCloseButtonOptions;\n  };\n}\n"
  },
  {
    "path": "packages/solid/src/components/notification/index.ts",
    "content": "export * from \"./notification\";\nexport * from \"./notification.service\";\nexport * from \"./notification.styles\";\nexport * from \"./notification-description\";\nexport * from \"./notification-icon\";\nexport * from \"./notification-title\";\nexport * from \"./notifications-provider\";\n"
  },
  {
    "path": "packages/solid/src/components/notification/notification-container.tsx",
    "content": "import { Match, onCleanup, onMount, Show, splitProps, Switch } from \"solid-js\";\n\nimport { CloseButton } from \"../close-button/close-button\";\nimport { Flex } from \"../flex/flex\";\nimport { IconSpinner } from \"../icons/IconSpinner\";\nimport { VStack } from \"../stack/stack\";\nimport { HTMLHopeProps } from \"../types\";\nimport { Notification } from \"./notification\";\nimport { notificationLoaderStyles } from \"./notification.styles\";\nimport { NotificationConfig } from \"./notification.types\";\nimport { NotificationDescription } from \"./notification-description\";\nimport { NotificationIcon } from \"./notification-icon\";\nimport { NotificationTitle } from \"./notification-title\";\nimport { useNotificationsProviderContext } from \"./notifications-provider.context\";\n\ntype NotificationContainerOptions = Omit<NotificationConfig, \"onClose\">;\n\nexport type NotificationContainerProps = HTMLHopeProps<\"div\", NotificationContainerOptions>;\n\n/**\n * The container for a notification.\n * It renders the default Hope UI designed notification or a custom one if the `render` prop is passed.\n */\nexport function NotificationContainer(props: NotificationContainerProps) {\n  const notificationsProviderContext = useNotificationsProviderContext();\n\n  const [local] = splitProps(props, [\n    \"render\",\n    \"id\",\n    \"status\",\n    \"title\",\n    \"description\",\n    \"duration\",\n    \"persistent\",\n    \"closable\",\n    \"loading\",\n    \"onMouseEnter\",\n    \"onMouseLeave\",\n  ]);\n\n  let closeDelayId: number | undefined;\n\n  const clearCloseDelay = () => {\n    if (closeDelayId) {\n      window.clearTimeout(closeDelayId);\n    }\n  };\n\n  const closeNotification = () => {\n    clearCloseDelay();\n\n    notificationsProviderContext.hideNotification(local.id);\n  };\n\n  const closeWithDelay = () => {\n    if (local.persistent || local.duration == null) {\n      return;\n    }\n\n    closeDelayId = window.setTimeout(closeNotification, local.duration);\n  };\n\n  const showIcon = () => {\n    return local.status && !local.loading;\n  };\n\n  onMount(() => {\n    closeWithDelay();\n  });\n\n  onCleanup(() => {\n    clearCloseDelay();\n  });\n\n  return (\n    <Show\n      when={local.render}\n      fallback={\n        <Notification\n          status={local.status}\n          pr={local.closable ? \"$9\" : \"$3\"}\n          onMouseEnter={clearCloseDelay}\n          onMouseLeave={closeWithDelay}\n        >\n          <Show when={showIcon()}>\n            <NotificationIcon mr=\"$2_5\" />\n          </Show>\n          <Show when={local.loading}>\n            <IconSpinner\n              color=\"$primary10\"\n              boxSize=\"$8\"\n              mr=\"$2_5\"\n              class={notificationLoaderStyles()}\n            />\n          </Show>\n          <Switch>\n            <Match when={local.title && local.description}>\n              <VStack alignItems=\"flex-start\" spacing=\"$1\">\n                <NotificationTitle>{local.title}</NotificationTitle>\n                <NotificationDescription>{local.description}</NotificationDescription>\n              </VStack>\n            </Match>\n            <Match when={local.title}>\n              <NotificationTitle>{local.title}</NotificationTitle>\n            </Match>\n            <Match when={local.description}>\n              <NotificationDescription>{local.description}</NotificationDescription>\n            </Match>\n          </Switch>\n          <Show when={local.closable}>\n            <CloseButton\n              size=\"sm\"\n              position=\"absolute\"\n              top=\"$1_5\"\n              right=\"$1_5\"\n              onClick={closeNotification}\n            />\n          </Show>\n        </Notification>\n      }\n    >\n      <Flex\n        w=\"$full\"\n        justifyContent=\"flex-end\"\n        onMouseEnter={clearCloseDelay}\n        onMouseLeave={closeWithDelay}\n      >\n        {local.render?.({\n          id: local.id,\n          close: closeNotification,\n        })}\n      </Flex>\n    </Show>\n  );\n}\n"
  },
  {
    "path": "packages/solid/src/components/notification/notification-description.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { notificationDescriptionStyles } from \"./notification.styles\";\n\nexport type NotificationDescriptionProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeNotificationDescriptionClass = \"hope-notification__description\";\n\nexport function NotificationDescription<C extends ElementType = \"div\">(\n  props: NotificationDescriptionProps<C>\n) {\n  const theme = useStyleConfig().Notification;\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () =>\n    classNames(local.class, hopeNotificationDescriptionClass, notificationDescriptionStyles());\n\n  return <Box class={classes()} __baseStyle={theme?.baseStyle?.description} {...others} />;\n}\n\nNotificationDescription.toString = () => createClassSelector(hopeNotificationDescriptionClass);\n"
  },
  {
    "path": "packages/solid/src/components/notification/notification-icon.tsx",
    "content": "import { mergeProps, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Icon, IconProps } from \"../icon/icon\";\nimport { IconCheckCircleSolid } from \"../icons/IconCheckCircleSolid\";\nimport { IconExclamationCircleSolid } from \"../icons/IconExclamationCircleSolid\";\nimport { IconExclamationTriangleSolid } from \"../icons/IconExclamationTriangleSolid\";\nimport { IconInfoCircleSolid } from \"../icons/IconInfoCircleSolid\";\nimport { ElementType } from \"../types\";\nimport { useNotificationContext } from \"./notification\";\nimport { notificationIconStyles } from \"./notification.styles\";\n\nexport type NotificationIconProps<C extends ElementType = \"svg\"> = IconProps<C>;\n\nconst hopeNotificationIconClass = \"hope-notification__icon\";\n\nexport function NotificationIcon<C extends ElementType = \"svg\">(props: NotificationIconProps<C>) {\n  const theme = useStyleConfig().Notification;\n  const { status } = useNotificationContext();\n\n  const defaultProps: NotificationIconProps<\"svg\"> = {\n    boxSize: \"$7\",\n  };\n\n  const propsWithDefault: NotificationIconProps<\"svg\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault, [\"as\", \"class\"]);\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeNotificationIconClass,\n      notificationIconStyles({\n        status: status(),\n      })\n    );\n  };\n\n  const icon = () => {\n    if (local.as) {\n      return local.as as ElementType;\n    }\n\n    switch (status()) {\n      case \"success\":\n        return IconCheckCircleSolid;\n      case \"info\":\n        return IconInfoCircleSolid;\n      case \"warning\":\n        return IconExclamationTriangleSolid;\n      case \"danger\":\n        return IconExclamationCircleSolid;\n    }\n  };\n\n  return <Icon as={icon()} class={classes()} __baseStyle={theme?.baseStyle?.icon} {...others} />;\n}\n\nNotificationIcon.toString = () => createClassSelector(hopeNotificationIconClass);\n"
  },
  {
    "path": "packages/solid/src/components/notification/notification-title.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { notificationTitleStyles } from \"./notification.styles\";\n\nexport type NotificationTitleProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeNotificationTitleClass = \"hope-notification__title\";\n\nexport function NotificationTitle<C extends ElementType = \"div\">(props: NotificationTitleProps<C>) {\n  const theme = useStyleConfig().Notification;\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () =>\n    classNames(local.class, hopeNotificationTitleClass, notificationTitleStyles());\n\n  return <Box class={classes()} __baseStyle={theme?.baseStyle?.title} {...others} />;\n}\n\nNotificationTitle.toString = () => createClassSelector(hopeNotificationTitleClass);\n"
  },
  {
    "path": "packages/solid/src/components/notification/notification.events.ts",
    "content": "type ValueOf<T> = T[keyof T];\n\nexport const NOTIFICATIONS_EVENTS = {\n  show: \"hope-ui:show-notification\",\n  update: \"hope-ui:update-notification\",\n  hide: \"hope-ui:hide-notification\",\n  clear: \"hope-ui:clear-notifications\",\n  clearQueue: \"hope-ui:clear-notifications-queue\",\n} as const;\n\nexport function createEvent(type: ValueOf<typeof NOTIFICATIONS_EVENTS>, detail?: any) {\n  return new CustomEvent(type, { detail });\n}\n"
  },
  {
    "path": "packages/solid/src/components/notification/notification.service.ts",
    "content": "import { createEvent, NOTIFICATIONS_EVENTS } from \"./notification.events\";\nimport { NotificationConfig, ShowNotificationProps } from \"./notification.types\";\n\nfunction show(config: ShowNotificationProps) {\n  window.dispatchEvent(createEvent(NOTIFICATIONS_EVENTS.show, config));\n}\n\nfunction update(config: NotificationConfig & { id: string }) {\n  window.dispatchEvent(createEvent(NOTIFICATIONS_EVENTS.update, config));\n}\n\nfunction hide(id: string) {\n  window.dispatchEvent(createEvent(NOTIFICATIONS_EVENTS.hide, id));\n}\n\nfunction clear() {\n  window.dispatchEvent(createEvent(NOTIFICATIONS_EVENTS.clear));\n}\n\nfunction clearQueue() {\n  window.dispatchEvent(createEvent(NOTIFICATIONS_EVENTS.clearQueue));\n}\n\nexport const notificationService = {\n  show,\n  update,\n  hide,\n  clear,\n  clearQueue,\n};\n"
  },
  {
    "path": "packages/solid/src/components/notification/notification.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { spin } from \"../../styled-system/keyframes\";\nimport { css, globalCss } from \"../../styled-system/stitches.config\";\n\n/* -------------------------------------------------------------------------------------------------\n * Notification - solid-transition-group classes\n * -----------------------------------------------------------------------------------------------*/\n\nexport const notificationTransitionName = {\n  slideInTop: \"hope-notification-slide-in-top-transition\",\n  slideInRight: \"hope-notification-slide-in-right-transition\",\n  slideInBottom: \"hope-notification-slide-in-bottom-transition\",\n  slideInLeft: \"hope-notification-slide-in-left-transition\",\n};\n\nfunction createNotificationSlideTransition(config: {\n  name: string;\n  enterTransform: string;\n  leaveTransform: string;\n}) {\n  return {\n    [`.${config.name}-enter, .${config.name}-exit-to`]: {\n      opacity: 0,\n      transform: config.enterTransform,\n    },\n    [`.${config.name}-enter-to, .${config.name}-exit`]: {\n      opacity: 1,\n      transform: config.leaveTransform,\n    },\n    [`.${config.name}-enter-active`]: {\n      transitionProperty: \"opacity, transform\",\n      transitionTimingFunction: \"cubic-bezier(.51,.3,0,1.21)\",\n      transitionDuration: \"300ms\",\n    },\n    [`.${config.name}-exit-active`]: {\n      transitionProperty: \"opacity, transform\",\n      transitionTimingFunction: \"ease-in\",\n      transitionDuration: \"200ms\",\n    },\n  };\n}\n\nexport const notificationTransitionStyles = globalCss({\n  ...createNotificationSlideTransition({\n    name: notificationTransitionName.slideInTop,\n    enterTransform: \"translateY(-100%)\",\n    leaveTransform: \"translateY(0)\",\n  }),\n  ...createNotificationSlideTransition({\n    name: notificationTransitionName.slideInRight,\n    enterTransform: \"translateX(100%)\",\n    leaveTransform: \"translateX(0)\",\n  }),\n  ...createNotificationSlideTransition({\n    name: notificationTransitionName.slideInBottom,\n    enterTransform: \"translateY(100%)\",\n    leaveTransform: \"translateY(0)\",\n  }),\n  ...createNotificationSlideTransition({\n    name: notificationTransitionName.slideInLeft,\n    enterTransform: \"translateX(-100%)\",\n    leaveTransform: \"translateX(0)\",\n  }),\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Notification - list (contains the list of notifcations)\n * -----------------------------------------------------------------------------------------------*/\n\nexport const notificationListStyles = css({\n  position: \"fixed\",\n  zIndex: \"$notification\",\n\n  display: \"flex\",\n  flexDirection: \"column\",\n  alignItems: \"flex-end\",\n  gap: \"$4\",\n\n  width: \"calc(100% - 32px)\",\n  maxWidth: \"$md\",\n\n  variants: {\n    placement: {\n      \"top-start\": {\n        top: \"$4\",\n        left: \"$4\",\n      },\n      top: {\n        top: \"$4\",\n        left: \"50%\",\n        transform: \"translateX(-50%)\",\n      },\n      \"top-end\": {\n        top: \"$4\",\n        right: \"$4\",\n      },\n      \"bottom-start\": {\n        bottom: \"$4\",\n        left: \"$4\",\n      },\n      bottom: {\n        bottom: \"$4\",\n        left: \"50%\",\n        transform: \"translateX(-50%)\",\n      },\n      \"bottom-end\": {\n        bottom: \"$4\",\n        right: \"$4\",\n      },\n    },\n  },\n\n  defaultVariants: {\n    placement: \"top-end\",\n  },\n});\n\nexport type NotificationListVariants = VariantProps<typeof notificationListStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * Notification\n * -----------------------------------------------------------------------------------------------*/\n\nexport const notificationStyles = css({\n  position: \"relative\",\n  display: \"flex\",\n  alignItems: \"center\",\n\n  width: \"100%\",\n  maxWidth: \"$md\",\n\n  borderRadius: \"$sm\",\n  border: \"1px solid $colors$neutral5\",\n\n  boxShadow: \"$lg\",\n\n  backgroundColor: \"$loContrast\",\n\n  padding: \"$3\",\n\n  fontSize: \"$sm\",\n  lineHeight: \"$5\",\n\n  variants: {\n    status: {\n      success: {},\n      info: {},\n      warning: {},\n      danger: {},\n    },\n  },\n});\n\nexport type NotificationVariants = VariantProps<typeof notificationStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * Notification - loader\n * -----------------------------------------------------------------------------------------------*/\n\nexport const notificationLoaderStyles = css({\n  animation: `1s linear infinite ${spin}`,\n});\n\n/* -------------------------------------------------------------------------------------------------\n * NotificationIcon\n * -----------------------------------------------------------------------------------------------*/\n\nexport const notificationIconStyles = css({\n  flexShrink: 0,\n\n  variants: {\n    status: {\n      success: { color: \"$success9\" },\n      info: { color: \"$info9\" },\n      warning: { color: \"$warning9\" },\n      danger: { color: \"$danger9\" },\n    },\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * NotificationTitle\n * -----------------------------------------------------------------------------------------------*/\n\nexport const notificationTitleStyles = css({\n  fontWeight: \"$medium\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * NotificationDescription\n * -----------------------------------------------------------------------------------------------*/\n\nexport const notificationDescriptionStyles = css({\n  display: \"inline-block\",\n  color: \"$neutral11\",\n});\n"
  },
  {
    "path": "packages/solid/src/components/notification/notification.tsx",
    "content": "import { Accessor, createContext, mergeProps, splitProps, useContext } from \"solid-js\";\n\nimport { SystemStyleObject } from \"../../styled-system/types\";\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { notificationStyles, NotificationVariants } from \"./notification.styles\";\n\ntype ThemeableNotificationOptions = NotificationVariants;\n\nexport type NotificationProps<C extends ElementType = \"div\"> = HTMLHopeProps<\n  C,\n  NotificationVariants\n>;\n\nconst hopeNotificationClass = \"hope-notification\";\n\nexport function Notification<C extends ElementType = \"div\">(props: NotificationProps<C>) {\n  const theme = useStyleConfig().Notification;\n\n  const defaultProps: NotificationProps<\"div\"> = {};\n\n  const propsWithDefault: NotificationProps<\"div\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault, [\"class\", \"status\"]);\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeNotificationClass,\n      notificationStyles({\n        status: local.status,\n      })\n    );\n  };\n\n  const statusAccessor = () => local.status;\n\n  const context: NotificationContextValue = {\n    status: statusAccessor,\n  };\n\n  return (\n    <NotificationContext.Provider value={context}>\n      <Box role=\"alert\" class={classes()} __baseStyle={theme?.baseStyle?.root} {...others} />\n    </NotificationContext.Provider>\n  );\n}\n\nNotification.toString = () => createClassSelector(hopeNotificationClass);\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ntype NotificationContextValue = {\n  status: Accessor<NotificationVariants[\"status\"]>;\n};\n\nconst NotificationContext = createContext<NotificationContextValue>();\n\nexport function useNotificationContext() {\n  const context = useContext(NotificationContext);\n\n  if (!context) {\n    throw new Error(\n      \"[Hope UI]: useNotificationContext must be used within an `<Notification />` component\"\n    );\n  }\n\n  return context;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * StyleConfig\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface NotificationStyleConfig {\n  baseStyle?: {\n    root?: SystemStyleObject;\n    icon?: SystemStyleObject;\n    title?: SystemStyleObject;\n    description?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: ThemeableNotificationOptions;\n  };\n}\n"
  },
  {
    "path": "packages/solid/src/components/notification/notification.types.ts",
    "content": "import { JSX } from \"solid-js\";\n\nimport { NotificationVariants } from \"./notification.styles\";\n\nexport interface NotificationConfigRenderProps {\n  /**\n   * The `id` of the notification.\n   */\n  id: string;\n\n  /**\n   * The function to close the notification.\n   */\n  close: () => void;\n}\n\nexport interface NotificationConfig {\n  /**\n   * The id of the notification, used to update and remove notification.\n   * By default, a unique id is generated for each notification.\n   */\n  id: string;\n\n  /**\n   * The status of the notification.\n   */\n  status?: NotificationVariants[\"status\"];\n\n  /**\n   * The title of the notification.\n   */\n  title?: string;\n\n  /**\n   * The description of the notification.\n   */\n  description?: string;\n\n  /**\n   * The delay (in ms) before the notification hides.\n   */\n  duration?: number;\n\n  /**\n   * If `true`, duration will be ignored and the notification will never dismiss.\n   */\n  persistent?: boolean;\n\n  /**\n   * If `true`, the notification will show a close button.\n   */\n  closable?: boolean;\n\n  /**\n   * If `true`, the notification will show a loader.\n   */\n  loading?: boolean;\n\n  /**\n   * Callback function to run side effects after the notification has closed.\n   */\n  onClose?: (id: string) => void;\n\n  /**\n   * Render a custom component.\n   * It will receive the notification `id` and a `close` function as render props.\n   */\n  render?: (props: NotificationConfigRenderProps) => JSX.Element;\n}\n\nexport type ShowNotificationProps = Partial<NotificationConfig>;\n"
  },
  {
    "path": "packages/solid/src/components/notification/notifications-provider.context.ts",
    "content": "import { Accessor, createContext, useContext } from \"solid-js\";\n\nimport { NotificationConfig } from \"./notification.types\";\n\nexport interface NotificationsProviderContextValue {\n  /**\n   * All currently displayed notifications.\n   */\n  notifications: Accessor<NotificationConfig[]>;\n\n  /**\n   * All pending notifications.\n   */\n  queue: Accessor<NotificationConfig[]>;\n\n  /**\n   * Show a notification.\n   */\n  showNotification(config: NotificationConfig): string;\n\n  /**\n   * Update a notification for a given `id`.\n   */\n  updateNotification(id: string, config: NotificationConfig): void;\n\n  /**\n   * Hide a notification.\n   */\n  hideNotification(id: string): void;\n\n  /**\n   * Remove all notifications.\n   * (displayed and from the queue)\n   */\n  clear(): void;\n\n  /**\n   * Remove all pending notifications for the queue only.\n   */\n  clearQueue(): void;\n}\n\nexport const NotificationsProviderContext = createContext<NotificationsProviderContextValue>();\n\nexport function useNotificationsProviderContext() {\n  const context = useContext(NotificationsProviderContext);\n\n  if (!context) {\n    throw new Error(\n      \"[Hope UI]: useNotificationsProviderContext must be used within a `<NotificationsProvider />` component\"\n    );\n  }\n\n  return context;\n}\n"
  },
  {
    "path": "packages/solid/src/components/notification/notifications-provider.tsx",
    "content": "import {\n  Accessor,\n  createMemo,\n  createUniqueId,\n  For,\n  JSX,\n  onCleanup,\n  onMount,\n  splitProps,\n} from \"solid-js\";\nimport { Portal } from \"solid-js/web\";\nimport { TransitionGroup } from \"solid-transition-group\";\n\nimport { createQueue } from \"../../hooks/create-queue\";\nimport { PositionProps } from \"../../styled-system/props/position\";\nimport { classNames } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { NOTIFICATIONS_EVENTS } from \"./notification.events\";\nimport {\n  notificationListStyles,\n  NotificationListVariants,\n  notificationTransitionName,\n} from \"./notification.styles\";\nimport { NotificationConfig, ShowNotificationProps } from \"./notification.types\";\nimport { NotificationContainer } from \"./notification-container\";\nimport {\n  NotificationsProviderContext,\n  NotificationsProviderContextValue,\n} from \"./notifications-provider.context\";\n\ninterface NotificationsProviderProps extends NotificationListVariants {\n  /**\n   * Maximum amount of notifications displayed at a time,\n   * other new notifications will be added to queue.\n   */\n  limit?: number;\n\n  /**\n   * The delay (in ms) before the notification hides.\n   */\n  duration?: number;\n\n  /**\n   * If `true`, duration will be ignored and notifications will never dismiss.\n   */\n  persistent?: boolean;\n\n  /**\n   * If `true`, notifications will show a close button.\n   */\n  closable?: boolean;\n\n  /**\n   * The `z-index` css property of all notifications.\n   */\n  zIndex?: PositionProps[\"zIndex\"];\n\n  /**\n   * The children of the notifications provider.\n   */\n  children: JSX.Element;\n}\n\nconst hopeNotificationListClass = \"hope-notification__list\";\n\nconst DEFAULT_NOTIFICATION_DURATION = 5_000;\n\n/**\n * Context provider for the notification system.\n */\nexport function NotificationsProvider(props: NotificationsProviderProps) {\n  const [local] = splitProps(props, [\n    \"children\",\n    \"placement\",\n    \"duration\",\n    \"persistent\",\n    \"closable\",\n    \"limit\",\n    \"zIndex\",\n  ]);\n\n  const notificationQueue = createMemo(() => {\n    return createQueue<NotificationConfig>({\n      initialValues: [],\n      limit: local.limit ?? 10,\n    });\n  });\n\n  const finalPlacement: Accessor<NotificationsProviderProps[\"placement\"]> = () =>\n    local.placement ?? \"top-end\";\n\n  const notificationsAccessor = () => notificationQueue().state.current();\n\n  const queueAccessor = () => notificationQueue().state.queue();\n\n  const showNotification = (notification: ShowNotificationProps) => {\n    const id = notification.id ?? `hope-notification-${createUniqueId()}`;\n    const persistent = notification.persistent ?? local.persistent ?? false;\n    const duration = notification.duration ?? local.duration ?? DEFAULT_NOTIFICATION_DURATION;\n    const closable = notification.closable ?? local.closable ?? true;\n\n    notificationQueue().update(notifications => {\n      if (notification.id && notifications.some(n => n.id === notification.id)) {\n        return notifications;\n      }\n\n      const newNotification: NotificationConfig = {\n        ...notification,\n        id,\n        persistent,\n        duration,\n        closable,\n      };\n\n      return [...notifications, newNotification];\n    });\n\n    return id;\n  };\n\n  const updateNotification = (id: string, notification: NotificationConfig) => {\n    notificationQueue().update(notifications => {\n      const index = notifications.findIndex(n => n.id === id);\n\n      if (index === -1) {\n        return notifications;\n      }\n\n      const newNotifications = [...notifications];\n      newNotifications[index] = notification;\n\n      return newNotifications;\n    });\n  };\n\n  const hideNotification = (id: string) => {\n    notificationQueue().update(notifications => {\n      return notifications.filter(notification => {\n        if (notification.id === id) {\n          notification.onClose?.(notification.id);\n          return false;\n        }\n\n        return true;\n      });\n    });\n  };\n\n  const clear = () => notificationQueue().update(() => []);\n\n  const clearQueue = () => notificationQueue().clearQueue();\n\n  const classes = () => {\n    return classNames(\n      hopeNotificationListClass,\n      notificationListStyles({\n        placement: finalPlacement(),\n      })\n    );\n  };\n\n  const transitionName = () => {\n    switch (finalPlacement()) {\n      case \"top-start\":\n        return notificationTransitionName.slideInLeft;\n      case \"top\":\n        return notificationTransitionName.slideInTop;\n      case \"top-end\":\n        return notificationTransitionName.slideInRight;\n      case \"bottom-start\":\n        return notificationTransitionName.slideInLeft;\n      case \"bottom\":\n        return notificationTransitionName.slideInBottom;\n      case \"bottom-end\":\n        return notificationTransitionName.slideInRight;\n      default:\n        return notificationTransitionName.slideInRight;\n    }\n  };\n\n  const context: NotificationsProviderContextValue = {\n    notifications: notificationsAccessor,\n    queue: queueAccessor,\n    showNotification,\n    updateNotification,\n    hideNotification,\n    clear,\n    clearQueue,\n  };\n\n  const showHandler = (event: any) => showNotification(event.detail);\n  const updateHandler = (event: any) => updateNotification(event.detail.id, event.detail);\n  const hideHandler = (event: any) => hideNotification(event.detail);\n\n  onMount(() => {\n    window.addEventListener(NOTIFICATIONS_EVENTS.show, showHandler);\n    window.addEventListener(NOTIFICATIONS_EVENTS.update, updateHandler);\n    window.addEventListener(NOTIFICATIONS_EVENTS.hide, hideHandler);\n    window.addEventListener(NOTIFICATIONS_EVENTS.clear, clear);\n    window.addEventListener(NOTIFICATIONS_EVENTS.clearQueue, clearQueue);\n  });\n\n  onCleanup(() => {\n    window.removeEventListener(NOTIFICATIONS_EVENTS.show, showHandler);\n    window.removeEventListener(NOTIFICATIONS_EVENTS.update, updateHandler);\n    window.removeEventListener(NOTIFICATIONS_EVENTS.hide, hideHandler);\n    window.removeEventListener(NOTIFICATIONS_EVENTS.clear, clear);\n    window.removeEventListener(NOTIFICATIONS_EVENTS.clearQueue, clearQueue);\n  });\n\n  return (\n    <NotificationsProviderContext.Provider value={context}>\n      <Portal>\n        <Box class={classes()} zIndex={local.zIndex}>\n          <TransitionGroup name={transitionName()}>\n            <For each={context.notifications()}>\n              {notification => <NotificationContainer {...notification} />}\n            </For>\n          </TransitionGroup>\n        </Box>\n      </Portal>\n      {local.children}\n    </NotificationsProviderContext.Provider>\n  );\n}\n"
  },
  {
    "path": "packages/solid/src/components/popover/index.ts",
    "content": "export * from \"./popover\";\nexport * from \"./popover.styles\";\nexport * from \"./popover-anchor\";\nexport * from \"./popover-arrow\";\nexport * from \"./popover-body\";\nexport * from \"./popover-close-button\";\nexport * from \"./popover-content\";\nexport * from \"./popover-footer\";\nexport * from \"./popover-header\";\nexport * from \"./popover-trigger\";\n"
  },
  {
    "path": "packages/solid/src/components/popover/popover-anchor.tsx",
    "content": "import { splitProps } from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\n\nimport { isFunction } from \"../../utils/assertion\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { usePopoverContext } from \"./popover\";\n\n/**\n * PopoverAnchor is the element used as the positioning reference for the popover.\n */\nexport function PopoverAnchor<C extends ElementType>(props: HTMLHopeProps<C>) {\n  const popoverContext = usePopoverContext();\n\n  const [local, others] = splitProps(props as HTMLHopeProps<ElementType>, [\"ref\", \"as\"]);\n\n  const assignRef = (el: HTMLElement) => {\n    popoverContext.assignAnchorRef(el);\n\n    if (isFunction(local.ref)) {\n      local.ref(el);\n    } else {\n      // eslint-disable-next-line solid/reactivity\n      local.ref = el;\n    }\n  };\n\n  return <Dynamic component={local.as} ref={assignRef} {...others} />;\n}\n"
  },
  {
    "path": "packages/solid/src/components/popover/popover-arrow.tsx",
    "content": "import { createMemo, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { usePopoverContext } from \"./popover\";\nimport { popoverArrowStyles, PopoverArrowVariants } from \"./popover.styles\";\n\nexport type PopoverArrowProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopePopoverArrowClass = \"hope-popover__arrow\";\n\nexport function PopoverArrow<C extends ElementType = \"div\">(props: PopoverArrowProps<C>) {\n  const theme = useStyleConfig().Popover;\n\n  const popoverContext = usePopoverContext();\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const placement = createMemo(() => {\n    return popoverContext.state.finalPlacement.split(\n      \"-\"\n    )[0] as PopoverArrowVariants[\"popoverPlacement\"];\n  });\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopePopoverArrowClass,\n      popoverArrowStyles({\n        popoverPlacement: placement(),\n      })\n    );\n  };\n\n  return (\n    <Box\n      ref={popoverContext.assignArrowRef}\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.arrow}\n      {...others}\n    />\n  );\n}\n\nPopoverArrow.toString = () => createClassSelector(hopePopoverArrowClass);\n"
  },
  {
    "path": "packages/solid/src/components/popover/popover-body.tsx",
    "content": "import { onCleanup, onMount, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { usePopoverContext } from \"./popover\";\nimport { popoverBodyStyles } from \"./popover.styles\";\n\nexport type PopoverBodyProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopePopoverBodyClass = \"hope-popover__body\";\n\n/**\n * PopoverBody is the main content area for the popover.\n * It should contain at least one interactive element.\n */\nexport function PopoverBody<C extends ElementType = \"div\">(props: PopoverBodyProps<C>) {\n  const theme = useStyleConfig().Popover;\n\n  const popoverContext = usePopoverContext();\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopePopoverBodyClass, popoverBodyStyles());\n\n  /**\n   * Notify the popover context if this component was rendered or used\n   * so we can append `aria-describedby` automatically\n   */\n  onMount(() => popoverContext.setBodyMounted(true));\n  onCleanup(() => popoverContext.setBodyMounted(false));\n\n  return (\n    <Box\n      class={classes()}\n      id={popoverContext.state.bodyId}\n      __baseStyle={theme?.baseStyle?.body}\n      {...others}\n    />\n  );\n}\n\nPopoverBody.toString = () => createClassSelector(hopePopoverBodyClass);\n"
  },
  {
    "path": "packages/solid/src/components/popover/popover-close-button.tsx",
    "content": "import { JSX, mergeProps, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { chainHandlers } from \"../../utils/function\";\nimport { CloseButton, CloseButtonProps } from \"../close-button/close-button\";\nimport { usePopoverContext } from \"./popover\";\nimport { popoverCloseButtonStyles } from \"./popover.styles\";\n\nconst hopePopoverCloseButtonClass = \"hope-popover__close-button\";\n\n/**\n * PopoverCloseButton is used closes the popover.\n *\n * You don't need to pass the `onClick` to it, it gets the\n * `close` action from the popover context.\n */\nexport function PopoverCloseButton(props: CloseButtonProps) {\n  const theme = useStyleConfig().Popover;\n\n  const popoverContext = usePopoverContext();\n\n  const defaultProps: CloseButtonProps = {\n    \"aria-label\": theme?.defaultProps?.closeButton?.[\"aria-label\"] ?? \"Close popover\",\n    size: theme?.defaultProps?.closeButton?.size ?? \"sm\",\n    icon: theme?.defaultProps?.closeButton?.icon,\n  };\n\n  const propsWithDefaults = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefaults, [\"class\", \"onClick\"]);\n\n  const classes = () =>\n    classNames(local.class, hopePopoverCloseButtonClass, popoverCloseButtonStyles());\n\n  const onClick: JSX.EventHandlerUnion<HTMLButtonElement, MouseEvent> = event => {\n    chainHandlers(local.onClick, e => {\n      e.stopPropagation();\n      popoverContext.closeWithDelay();\n    })(event);\n  };\n\n  return (\n    <CloseButton\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.closeButton}\n      onClick={onClick}\n      {...others}\n    />\n  );\n}\n\nPopoverCloseButton.toString = () => createClassSelector(hopePopoverCloseButtonClass);\n"
  },
  {
    "path": "packages/solid/src/components/popover/popover-content.tsx",
    "content": "import { createEffect, createSignal, JSX, Show, splitProps } from \"solid-js\";\nimport { isServer, Portal } from \"solid-js/web\";\nimport { Transition } from \"solid-transition-group\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { isFunction } from \"../../utils/assertion\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { callHandler, chainHandlers } from \"../../utils/function\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { usePopoverContext } from \"./popover\";\nimport { popoverContentStyles, popoverTransitionName } from \"./popover.styles\";\n\nexport type PopoverContentProps<C extends ElementType = \"section\"> = HTMLHopeProps<C>;\n\nconst hopePopoverContentClass = \"hope-popover__content\";\n\n/**\n * The popover content container.\n */\nexport function PopoverContent<C extends ElementType = \"section\">(props: PopoverContentProps<C>) {\n  const theme = useStyleConfig().Popover;\n\n  const popoverContext = usePopoverContext();\n\n  /**\n   * Internal state to handle popover portal `mounted` state.\n   * Dirty hack since solid-transition-group doesn't work with Portal.\n   */\n  const [isPortalMounted, setIsPortalMounted] = createSignal(false);\n\n  const [local, others] = splitProps(props as PopoverContentProps<\"section\">, [\n    \"ref\",\n    \"class\",\n    \"onKeyDown\",\n    \"onFocusOut\",\n    \"onMouseEnter\",\n    \"onMouseLeave\",\n  ]);\n\n  const assignRef = (el: HTMLElement) => {\n    popoverContext.assignPopoverRef(el);\n\n    if (isFunction(local.ref)) {\n      local.ref(el);\n    } else {\n      // eslint-disable-next-line solid/reactivity\n      local.ref = el;\n    }\n  };\n\n  const closeOnKeyDown = (event: KeyboardEvent) => {\n    if (popoverContext.state.closeOnEsc && event.key === \"Escape\") {\n      popoverContext.closeWithDelay();\n    }\n  };\n\n  const onKeyDown: JSX.EventHandlerUnion<HTMLElement, KeyboardEvent> = event => {\n    chainHandlers(local.onKeyDown, closeOnKeyDown)(event);\n  };\n\n  const onFocusOut: JSX.EventHandlerUnion<HTMLElement, FocusEvent> = event => {\n    chainHandlers(local.onFocusOut, popoverContext.onPopoverFocusOut)(event);\n  };\n\n  const onMouseEnter: JSX.EventHandlerUnion<HTMLElement, MouseEvent> = event => {\n    callHandler(local.onMouseEnter, event);\n\n    popoverContext.setIsHovering(true);\n  };\n\n  const onMouseLeave: JSX.EventHandlerUnion<HTMLElement, MouseEvent> = event => {\n    callHandler(local.onMouseLeave, event);\n\n    popoverContext.onPopoverMouseLeave();\n  };\n\n  const afterPopoverEnterTransition = () => {\n    if (isServer) {\n      return;\n    }\n\n    document.addEventListener(\"keydown\", closeOnKeyDown);\n\n    popoverContext.afterPopoverOpen();\n  };\n\n  const afterPopoverExitTransition = () => {\n    document.removeEventListener(\"keydown\", closeOnKeyDown);\n\n    popoverContext.afterPopoverClose();\n\n    // For smooth transition, unmount portal only after popover's content exit transition is done.\n    setIsPortalMounted(false);\n  };\n\n  const popoverClasses = () => {\n    return classNames(local.class, hopePopoverContentClass, popoverContentStyles());\n  };\n\n  const transitionName = () => {\n    switch (popoverContext.state.motionPreset) {\n      case \"scale\":\n        return popoverTransitionName.scale;\n      case \"none\":\n        return \"hope-none\";\n    }\n  };\n\n  createEffect(() => {\n    if (popoverContext.state.opened) {\n      // mount portal when state `opened` is true.\n      setIsPortalMounted(true);\n    } else {\n      // unmount portal instantly when there is no popover transition.\n      popoverContext.state.motionPreset === \"none\" && setIsPortalMounted(false);\n    }\n  });\n\n  return (\n    <Show when={isPortalMounted()}>\n      <Portal>\n        <Transition\n          name={transitionName()}\n          appear\n          onBeforeEnter={popoverContext.updatePopoverPosition}\n          onAfterEnter={afterPopoverEnterTransition}\n          onAfterExit={afterPopoverExitTransition}\n        >\n          <Show when={popoverContext.state.opened}>\n            <hope.section\n              ref={assignRef}\n              tabIndex={-1}\n              id={popoverContext.state.contentId}\n              role={popoverContext.state.triggerOnHover ? \"tooltip\" : \"dialog\"}\n              aria-labelledby={\n                popoverContext.state.headerMounted ? popoverContext.state.headerId : undefined\n              }\n              aria-describedby={\n                popoverContext.state.bodyMounted ? popoverContext.state.bodyId : undefined\n              }\n              class={popoverClasses()}\n              __baseStyle={theme?.baseStyle?.content}\n              onKeyDown={onKeyDown}\n              onFocusOut={onFocusOut}\n              onMouseEnter={popoverContext.state.triggerOnHover ? onMouseEnter : undefined}\n              onMouseLeave={popoverContext.state.triggerOnHover ? onMouseLeave : undefined}\n              {...others}\n            />\n          </Show>\n        </Transition>\n      </Portal>\n    </Show>\n  );\n}\n\nPopoverContent.toString = () => createClassSelector(hopePopoverContentClass);\n"
  },
  {
    "path": "packages/solid/src/components/popover/popover-footer.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { popoverFooterStyles } from \"./popover.styles\";\n\nexport type PopoverFooterProps<C extends ElementType = \"footer\"> = HTMLHopeProps<C>;\n\nconst hopePopoverFooterClass = \"hope-popover__footer\";\n\n/**\n * PopoverFooter houses the action buttons of the popover.\n */\nexport function PopoverFooter<C extends ElementType = \"footer\">(props: PopoverFooterProps<C>) {\n  const theme = useStyleConfig().Popover;\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopePopoverFooterClass, popoverFooterStyles());\n\n  return <Box class={classes()} __baseStyle={theme?.baseStyle?.footer} {...others} />;\n}\n\nPopoverFooter.toString = () => createClassSelector(hopePopoverFooterClass);\n"
  },
  {
    "path": "packages/solid/src/components/popover/popover-header.tsx",
    "content": "import { onCleanup, onMount, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { usePopoverContext } from \"./popover\";\nimport { popoverHeaderStyles } from \"./popover.styles\";\n\nexport type PopoverHeaderProps<C extends ElementType = \"header\"> = HTMLHopeProps<C>;\n\nconst hopePopoverHeaderClass = \"hope-popover__header\";\n\n/**\n * PopoverHeader is the accessible header or label\n * for the popover's content and it is first announced by screenreaders.\n */\nexport function PopoverHeader<C extends ElementType = \"header\">(props: PopoverHeaderProps<C>) {\n  const theme = useStyleConfig().Popover;\n\n  const popoverContext = usePopoverContext();\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopePopoverHeaderClass, popoverHeaderStyles());\n\n  /**\n   * Notify the popover context if this component was rendered or used\n   * so we can append `aria-labelledby` automatically\n   */\n  onMount(() => popoverContext.setHeaderMounted(true));\n  onCleanup(() => popoverContext.setHeaderMounted(false));\n\n  return (\n    <Box\n      class={classes()}\n      id={popoverContext.state.headerId}\n      __baseStyle={theme?.baseStyle?.header}\n      {...others}\n    />\n  );\n}\n\nPopoverHeader.toString = () => createClassSelector(hopePopoverHeaderClass);\n"
  },
  {
    "path": "packages/solid/src/components/popover/popover-trigger.tsx",
    "content": "import { JSX, splitProps } from \"solid-js\";\n\nimport { isFunction } from \"../../utils/assertion\";\nimport { callHandler, chainHandlers } from \"../../utils/function\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { usePopoverContext } from \"./popover\";\n\nexport type PopoverTriggerProps<C extends ElementType = \"button\"> = HTMLHopeProps<C>;\n\n/**\n * PopoverTrigger opens the popover's content.\n * It must be an interactive element.\n * It renders a `button` by edfault.\n */\nexport function PopoverTrigger<C extends ElementType = \"button\">(props: PopoverTriggerProps<C>) {\n  const popoverContext = usePopoverContext();\n\n  const [local, others] = splitProps(props as PopoverTriggerProps<ElementType>, [\n    \"ref\",\n    \"onClick\",\n    \"onKeyDown\",\n    \"onFocus\",\n    \"onBlur\",\n    \"onMouseEnter\",\n    \"onMouseLeave\",\n  ]);\n\n  const assignTriggerRef = (el: HTMLElement) => {\n    popoverContext.assignTriggerRef(el);\n\n    if (isFunction(local.ref)) {\n      local.ref(el);\n    } else {\n      // eslint-disable-next-line solid/reactivity\n      local.ref = el;\n    }\n  };\n\n  const onClick: JSX.EventHandlerUnion<HTMLElement, MouseEvent> = event => {\n    callHandler(local.onClick, event);\n\n    popoverContext.state.opened ? popoverContext.closeWithDelay() : popoverContext.openWithDelay();\n  };\n\n  const onKeyDown: JSX.EventHandlerUnion<HTMLElement, KeyboardEvent> = event => {\n    callHandler(local.onKeyDown, event);\n\n    if (event.key === \"Escape\") {\n      popoverContext.closeWithDelay();\n    }\n  };\n\n  const onFocus: JSX.EventHandlerUnion<HTMLElement, FocusEvent> = event => {\n    callHandler(local.onFocus, event);\n\n    popoverContext.openWithDelay();\n  };\n\n  const onBlur: JSX.EventHandlerUnion<HTMLElement, FocusEvent> = event => {\n    chainHandlers(local.onBlur, popoverContext.onTriggerBlur)(event);\n  };\n\n  const onMouseEnter: JSX.EventHandlerUnion<HTMLElement, MouseEvent> = event => {\n    callHandler(local.onMouseEnter, event);\n\n    popoverContext.setIsHovering(true);\n    popoverContext.openWithDelay();\n  };\n\n  const onMouseLeave: JSX.EventHandlerUnion<HTMLElement, MouseEvent> = event => {\n    callHandler(local.onMouseLeave, event);\n\n    popoverContext.onTriggerMouseLeave();\n  };\n\n  return (\n    <hope.button\n      ref={assignTriggerRef}\n      id={popoverContext.state.triggerId}\n      type=\"button\"\n      aria-haspopup=\"dialog\"\n      aria-controls={popoverContext.state.contentId}\n      aria-expanded={popoverContext.state.opened}\n      onClick={popoverContext.state.triggerOnClick ? onClick : undefined}\n      onKeyDown={popoverContext.state.triggerOnHover ? onKeyDown : undefined}\n      onFocus={popoverContext.state.triggerOnHover ? onFocus : undefined}\n      onBlur={popoverContext.state.triggerOnHover ? onBlur : undefined}\n      onMouseEnter={popoverContext.state.triggerOnHover ? onMouseEnter : undefined}\n      onMouseLeave={popoverContext.state.triggerOnHover ? onMouseLeave : undefined}\n      {...others}\n    />\n  );\n}\n"
  },
  {
    "path": "packages/solid/src/components/popover/popover.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css, globalCss } from \"../../styled-system/stitches.config\";\n\n/* -------------------------------------------------------------------------------------------------\n * Popover - solid-transition-group classes\n * -----------------------------------------------------------------------------------------------*/\n\nexport const popoverTransitionName = {\n  scale: \"hope-popover-scale-transition\",\n};\n\nexport const popoverTransitionStyles = globalCss({\n  /* scale */\n  [`.${popoverTransitionName.scale}-enter, .${popoverTransitionName.scale}-exit-to`]: {\n    opacity: 0,\n    transform: \"scale(0.95)\",\n  },\n  [`.${popoverTransitionName.scale}-enter-to, .${popoverTransitionName.scale}-exit`]: {\n    opacity: 1,\n    transform: \"scale(1)\",\n  },\n  [`.${popoverTransitionName.scale}-enter-active`]: {\n    transitionProperty: \"opacity, transform\",\n    transitionDuration: \"300ms\",\n    transitionTimingFunction: \"ease\",\n  },\n  [`.${popoverTransitionName.scale}-exit-active`]: {\n    transitionProperty: \"opacity, transform\",\n    transitionDuration: \"200ms\",\n    transitionTimingFunction: \"ease-in-out\",\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Popover - content\n * -----------------------------------------------------------------------------------------------*/\n\nexport const popoverContentStyles = css({\n  zIndex: \"$popover\",\n  position: \"absolute\",\n\n  display: \"flex\",\n  flexDirection: \"column\",\n  justifyContent: \"center\",\n\n  width: \"100%\",\n  maxWidth: \"$xs\",\n\n  outline: \"none\",\n\n  boxShadow: \"$md\",\n  border: \"1px solid $colors$neutral7\",\n  borderRadius: \"$sm\",\n  backgroundColor: \"$loContrast\",\n\n  color: \"inherit\",\n\n  \"&:focus\": {\n    outline: \"none\",\n    //boxShadow: \"$outline\",\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Popover - header\n * -----------------------------------------------------------------------------------------------*/\n\nexport const popoverHeaderStyles = css({\n  display: \"flex\",\n  alignItems: \"center\",\n  flex: 0,\n\n  borderColor: \"inherit\",\n  borderBottomWidth: \"1px\",\n\n  px: \"$3\",\n  py: \"$2\",\n\n  fontSize: \"$base\",\n  fontWeight: \"$medium\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Popover - body\n * -----------------------------------------------------------------------------------------------*/\n\nexport const popoverBodyStyles = css({\n  flex: 1,\n\n  px: \"$3\",\n  py: \"$2\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Popover - footer\n * -----------------------------------------------------------------------------------------------*/\n\nexport const popoverFooterStyles = css({\n  display: \"flex\",\n  alignItems: \"center\",\n\n  borderColor: \"inherit\",\n  borderTopWidth: \"1px\",\n\n  px: \"$3\",\n  py: \"$2\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Popover - close button\n * -----------------------------------------------------------------------------------------------*/\n\nexport const popoverCloseButtonStyles = css({\n  position: \"absolute\",\n  top: \"$2\",\n  insetInlineEnd: \"$2\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Popover - arrow\n * -----------------------------------------------------------------------------------------------*/\n\nexport const popoverArrowStyles = css({\n  zIndex: \"$popover\",\n  position: \"absolute\",\n\n  boxSize: \"8px\",\n\n  borderWidth: \"1px\",\n  borderStyle: \"solid\",\n  borderColor: \"inherit\",\n\n  backgroundColor: \"inherit\",\n\n  transform: \"rotate(45deg)\",\n\n  variants: {\n    popoverPlacement: {\n      left: {\n        borderLeft: 0,\n        borderBottom: 0,\n      },\n      top: {\n        borderLeft: 0,\n        borderTop: 0,\n      },\n      right: {\n        borderTop: 0,\n        borderRight: 0,\n      },\n      bottom: {\n        borderRight: 0,\n        borderBottom: 0,\n      },\n    },\n  },\n});\n\nexport type PopoverArrowVariants = VariantProps<typeof popoverArrowStyles>;\n"
  },
  {
    "path": "packages/solid/src/components/popover/popover.tsx",
    "content": "import type { Placement } from \"@floating-ui/dom\";\nimport {\n  arrow,\n  autoUpdate,\n  computePosition,\n  flip,\n  hide,\n  inline,\n  offset,\n  shift,\n} from \"@floating-ui/dom\";\nimport { createFocusTrap, FocusTrap } from \"focus-trap\";\nimport {\n  Accessor,\n  createContext,\n  createUniqueId,\n  JSX,\n  onCleanup,\n  Show,\n  useContext,\n} from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\nimport { isServer } from \"solid-js/web\";\n\nimport { SystemStyleObject } from \"../../styled-system/types\";\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { contains, getRelatedTarget } from \"../../utils/dom\";\nimport { isChildrenFunction } from \"../../utils/solid\";\nimport { isFocusable } from \"../../utils/tabbable\";\nimport { ThemeableCloseButtonOptions } from \"../close-button/close-button\";\n\ninterface PopoverChildrenRenderPropParams {\n  opened: Accessor<boolean>;\n  onClose: () => void;\n}\n\ntype PopoverChildrenRenderProp = (props: PopoverChildrenRenderPropParams) => JSX.Element;\n\ntype PopoverMotionPreset = \"scale\" | \"none\";\n\nexport interface PopoverProps {\n  /**\n   * Placement of the popover\n   */\n  placement?: Placement;\n\n  /**\n   * Offset between the popover and the reference (trigger) element.\n   */\n  offset?: number;\n\n  /**\n   * The amount of padding to apply when the popover might go off screen.\n   * @see https://floating-ui.com/docs/shift\n   */\n  shiftPadding?: number;\n\n  /**\n   * The id of the popover content.\n   */\n  id?: string;\n\n  /**\n   * If `true`, the popover will be shown.\n   * (in controlled mode)\n   */\n  opened?: boolean;\n\n  /**\n   * If `true`, the popover will be initially shown\n   * (in uncontrolled mode)\n   */\n  defaultOpened?: boolean;\n\n  /**\n   * The interaction that triggers the popover.\n   *\n   * `hover` - means the popover will open when you hover with mouse or\n   * focus with keyboard on the popover trigger\n   *\n   * `click` - means the popover will open on click or\n   * press `Enter` to `Space` on keyboard\n   */\n  triggerMode?: \"hover\" | \"click\";\n\n  /**\n   * If `true`, apply floating-ui `inline` middleware.\n   * Useful for inline reference elements that span over multiple lines, such as hyperlinks or range selections.\n   */\n  inline?: boolean;\n\n  /**\n   * The padding between the arrow and the edges of the popover.\n   */\n  arrowPadding?: number;\n\n  /**\n   * Delay (in ms) before showing the popover\n   */\n  openDelay?: number;\n\n  /**\n   * Delay (in ms) before hiding the popover\n   */\n  closeDelay?: number;\n\n  /**\n   * If `true`, the popover will close when the user blur out it by clicking outside or tabbing out\n   */\n  closeOnBlur?: boolean;\n\n  /**\n   * If `true`, the popover will close when the user hit the `Esc` key.\n   */\n  closeOnEsc?: boolean;\n\n  /**\n   * If `true`, the focus will be locked into the popover.\n   */\n  trapFocus?: boolean;\n\n  /**\n   * A query selector string targeting the element to receive focus when the popover opens.\n   */\n  initialFocus?: string;\n\n  /**\n   * Popover opening/closing transition.\n   */\n  motionPreset?: PopoverMotionPreset;\n\n  /**\n   * Children of the popover.\n   */\n  children?: JSX.Element | PopoverChildrenRenderProp;\n\n  /**\n   * Callback fired when the popover opens.\n   */\n  onOpen?: () => void;\n\n  /**\n   * Callback fired when the popover closes.\n   */\n  onClose?: () => void;\n}\n\ntype ThemeablePopoverOptions = Pick<\n  PopoverProps,\n  | \"placement\"\n  | \"offset\"\n  | \"arrowPadding\"\n  | \"openDelay\"\n  | \"closeDelay\"\n  | \"motionPreset\"\n  | \"closeOnEsc\"\n  | \"closeOnBlur\"\n  | \"trapFocus\"\n>;\n\ninterface PopoverState\n  extends Required<\n      Pick<\n        PopoverProps,\n        | \"triggerMode\"\n        | \"offset\"\n        | \"inline\"\n        | \"arrowPadding\"\n        | \"openDelay\"\n        | \"closeDelay\"\n        | \"opened\"\n        | \"motionPreset\"\n        | \"closeOnBlur\"\n        | \"closeOnEsc\"\n        | \"trapFocus\"\n      >\n    >,\n    Pick<PopoverProps, \"initialFocus\"> {\n  /**\n   * If `true`, the popover will be shown.\n   * (in uncontrolled mode)\n   */\n  _opened: boolean;\n\n  /**\n   * If `true`, the popover is in controlled mode.\n   * (have opened, onOpen and onClose prop)\n   */\n  isControlled: boolean;\n\n  /**\n   * If `true`, the popover trigger or content is hovered.\n   */\n  isHovering: boolean;\n\n  /**\n   * If `true`, the trigger mode is `click`.\n   */\n  triggerOnClick: boolean;\n\n  /**\n   * If `true`, the trigger mode is `hover`.\n   */\n  triggerOnHover: boolean;\n\n  /**\n   * The inital popover placement that you requested.\n   */\n  initialPlacement: Placement;\n\n  /**\n   * The final popover placement after all floating-ui middleware has been applied.\n   */\n  finalPlacement: Placement;\n\n  /**\n   * The `id` of the popover trigger.\n   */\n  triggerId: string;\n\n  /**\n   * The `id` of the popover content.\n   */\n  contentId: string;\n\n  /**\n   * The `id` of the popover content header.\n   */\n  headerId: string;\n\n  /**\n   * The `id` of the popover content body.\n   */\n  bodyId: string;\n\n  /**\n   * If `true`, notify that the popover header component is rendered.\n   */\n  headerMounted: boolean;\n\n  /**\n   * If `true`, notify that the popover body component is rendered.\n   */\n  bodyMounted: boolean;\n}\n\n/**\n * Popover provides context, theming, and accessibility properties\n * to all other popover components.\n *\n * It doesn't render any DOM node.\n */\nexport function Popover(props: PopoverProps) {\n  const defaultContentId = `hope-popover-${createUniqueId()}`;\n\n  const theme = useStyleConfig().Popover;\n\n  const [state, setState] = createStore<PopoverState>({\n    // eslint-disable-next-line solid/reactivity\n    _opened: !!props.defaultOpened,\n    isHovering: false,\n    headerMounted: false,\n    bodyMounted: false,\n    finalPlacement: \"bottom\",\n    get isControlled() {\n      return props.opened !== undefined;\n    },\n    get opened() {\n      return this.isControlled ? !!props.opened : this._opened;\n    },\n    get contentId() {\n      return props.id ?? defaultContentId;\n    },\n    get triggerId() {\n      return `${this.contentId}--trigger`;\n    },\n    get headerId() {\n      return `${this.contentId}--header`;\n    },\n    get bodyId() {\n      return `${this.contentId}--body`;\n    },\n    get triggerMode() {\n      return props.triggerMode ?? \"click\";\n    },\n    get triggerOnClick() {\n      return this.triggerMode === \"click\";\n    },\n    get triggerOnHover() {\n      return this.triggerMode === \"hover\";\n    },\n    get initialFocus() {\n      return props.initialFocus;\n    },\n    get inline() {\n      return props.inline ?? false;\n    },\n    get initialPlacement() {\n      return props.placement ?? theme?.defaultProps?.root?.placement ?? \"bottom\";\n    },\n    get offset() {\n      return props.offset ?? theme?.defaultProps?.root?.offset ?? 8;\n    },\n    get arrowPadding() {\n      return props.arrowPadding ?? theme?.defaultProps?.root?.arrowPadding ?? 8;\n    },\n    get openDelay() {\n      return props.openDelay ?? theme?.defaultProps?.root?.openDelay ?? 0;\n    },\n    get closeDelay() {\n      return props.closeDelay ?? theme?.defaultProps?.root?.closeDelay ?? 100;\n    },\n    get motionPreset() {\n      return props.motionPreset ?? theme?.defaultProps?.root?.motionPreset ?? \"scale\";\n    },\n    get closeOnBlur() {\n      return props.closeOnBlur ?? theme?.defaultProps?.root?.closeOnBlur ?? true;\n    },\n    get closeOnEsc() {\n      return props.closeOnEsc ?? theme?.defaultProps?.root?.closeOnEsc ?? true;\n    },\n    get trapFocus() {\n      return props.trapFocus ?? theme?.defaultProps?.root?.trapFocus ?? false;\n    },\n  });\n\n  let anchorRef: HTMLElement | undefined;\n  let triggerRef: HTMLElement | undefined;\n  let popoverRef: HTMLElement | undefined;\n  let arrowRef: HTMLElement | undefined;\n\n  let focusTrap: FocusTrap | undefined;\n\n  let enterTimeoutId: number | undefined;\n  let exitTimeoutId: number | undefined;\n\n  let cleanupPopoverAutoUpdate: (() => void) | undefined;\n\n  const popoverSelector = () => `[id='${state.contentId}']`;\n\n  const assignAnchorRef = (el: HTMLElement) => {\n    anchorRef = el;\n  };\n\n  const assignTriggerRef = (el: HTMLElement) => {\n    triggerRef = el;\n  };\n\n  const assignPopoverRef = (el: HTMLElement) => {\n    popoverRef = el;\n  };\n\n  const assignArrowRef = (el: HTMLElement) => {\n    arrowRef = el;\n  };\n\n  async function updatePopoverPosition() {\n    const referenceElement = anchorRef ?? triggerRef;\n\n    if (!referenceElement || !popoverRef) {\n      return;\n    }\n\n    const middleware = [offset(state.offset)];\n\n    if (state.inline) {\n      middleware.push(inline());\n    }\n\n    middleware.push(flip());\n    middleware.push(shift({ padding: props.shiftPadding }));\n\n    if (arrowRef) {\n      middleware.push(arrow({ element: arrowRef, padding: state.arrowPadding }));\n    }\n\n    middleware.push(hide());\n\n    const { x, y, placement, middlewareData } = await computePosition(\n      referenceElement,\n      popoverRef,\n      {\n        placement: state.initialPlacement,\n        middleware,\n      }\n    );\n\n    if (placement !== state.finalPlacement) {\n      setState(\"finalPlacement\", placement);\n    }\n\n    if (!popoverRef) {\n      return;\n    }\n\n    const referenceHidden = middlewareData.hide?.referenceHidden;\n\n    Object.assign(popoverRef.style, {\n      left: `${Math.round(x)}px`,\n      top: `${Math.round(y)}px`,\n      visibility: referenceHidden ? \"hidden\" : \"visible\",\n    });\n\n    if (!arrowRef) {\n      return;\n    }\n\n    const arrowX = middlewareData.arrow?.x;\n    const arrowY = middlewareData.arrow?.y;\n\n    const staticSide = {\n      top: \"bottom\",\n      right: \"left\",\n      bottom: \"top\",\n      left: \"right\",\n    }[placement.split(\"-\")[0]] as string;\n\n    // Used to put half of the arrow outside of the popover.\n    const arrowOffset = `${(Math.round(arrowRef.clientWidth / 2) + 1) * -1}px`;\n\n    Object.assign(arrowRef.style, {\n      left: arrowX != null ? `${Math.round(arrowX)}px` : \"\",\n      top: arrowY != null ? `${Math.round(arrowY)}px` : \"\",\n      right: \"\",\n      bottom: \"\",\n      [staticSide]: arrowOffset,\n    });\n  }\n\n  const onOpen = () => {\n    if (!state.isControlled) {\n      setState(\"_opened\", true);\n    }\n\n    props.onOpen?.();\n    updatePopoverPosition();\n  };\n\n  const onClose = () => {\n    if (!state.isControlled) {\n      setState(\"_opened\", false);\n    }\n\n    props.onClose?.();\n  };\n\n  const closeIfNotHover = () => {\n    !state.isHovering && onClose();\n  };\n\n  const openWithDelay = () => {\n    enterTimeoutId = window.setTimeout(onOpen, state.openDelay);\n  };\n\n  const closeWithDelay = () => {\n    if (enterTimeoutId) {\n      window.clearTimeout(enterTimeoutId);\n    }\n\n    exitTimeoutId = window.setTimeout(onClose, state.closeDelay);\n  };\n\n  const setupPopoverAutoUpdate = () => {\n    if (isServer) {\n      return;\n    }\n\n    const referenceElement = anchorRef ?? triggerRef;\n\n    if (!referenceElement || !popoverRef) {\n      return;\n    }\n\n    // schedule auto update of the popover position\n    cleanupPopoverAutoUpdate = autoUpdate(referenceElement, popoverRef, updatePopoverPosition);\n  };\n\n  const focusInitialElement = () => {\n    if (!state.initialFocus) {\n      popoverRef?.focus();\n      return;\n    }\n\n    const initialFocusRef = document.querySelector(state.initialFocus) as HTMLElement | null;\n    initialFocusRef && isFocusable(initialFocusRef) && initialFocusRef?.focus();\n  };\n\n  const onTriggerBlur: JSX.EventHandlerUnion<HTMLElement, FocusEvent> = event => {\n    const relatedTarget = getRelatedTarget(event);\n    const isValidBlur = !contains(popoverRef, relatedTarget);\n\n    if (state.opened && state.closeOnBlur && isValidBlur) {\n      closeWithDelay();\n    }\n  };\n\n  const onTriggerMouseLeave = () => {\n    setIsHovering(false);\n\n    if (enterTimeoutId) {\n      window.clearTimeout(enterTimeoutId);\n    }\n\n    exitTimeoutId = window.setTimeout(closeIfNotHover, state.closeDelay);\n  };\n\n  const onPopoverFocusOut: JSX.EventHandlerUnion<HTMLElement, FocusEvent> = event => {\n    const relatedTarget = getRelatedTarget(event);\n    const targetIsPopover = contains(popoverRef, relatedTarget);\n    const targetIsTrigger = contains(triggerRef, relatedTarget);\n    const isValidBlur = !targetIsPopover && !targetIsTrigger;\n\n    if (state.opened && state.closeOnBlur && isValidBlur) {\n      closeWithDelay();\n    }\n  };\n\n  // For now it's the same code but might change in the future.\n  const onPopoverMouseLeave = onTriggerMouseLeave;\n\n  const afterPopoverOpen = () => {\n    // schedule auto update of the tooltip position\n    setupPopoverAutoUpdate();\n\n    if (state.trapFocus && popoverRef) {\n      focusTrap = createFocusTrap(popoverRef, {\n        initialFocus: state.initialFocus,\n        fallbackFocus: popoverSelector(),\n        allowOutsideClick: false,\n      });\n\n      focusTrap.activate();\n    } else {\n      focusInitialElement();\n    }\n  };\n\n  const afterPopoverClose = () => {\n    focusTrap?.deactivate();\n    cleanupPopoverAutoUpdate?.();\n  };\n\n  const setIsHovering = (value: boolean) => setState(\"isHovering\", value);\n  const setHeaderMounted = (value: boolean) => setState(\"headerMounted\", value);\n  const setBodyMounted = (value: boolean) => setState(\"bodyMounted\", value);\n\n  const openedAccessor = () => state.opened;\n\n  onCleanup(() => {\n    window.clearTimeout(enterTimeoutId);\n    window.clearTimeout(exitTimeoutId);\n  });\n\n  const context: PopoverContextValue = {\n    state: state as PopoverState,\n    assignAnchorRef,\n    assignTriggerRef,\n    assignPopoverRef,\n    assignArrowRef,\n    openWithDelay,\n    closeWithDelay,\n    onTriggerBlur,\n    onTriggerMouseLeave,\n    onPopoverFocusOut,\n    onPopoverMouseLeave,\n    updatePopoverPosition,\n    afterPopoverOpen,\n    afterPopoverClose,\n    setIsHovering,\n    setHeaderMounted,\n    setBodyMounted,\n  };\n\n  return (\n    <PopoverContext.Provider value={context}>\n      <Show when={isChildrenFunction(props)} fallback={props.children as JSX.Element}>\n        {(props.children as PopoverChildrenRenderProp)?.({\n          opened: openedAccessor,\n          onClose: closeWithDelay,\n        })}\n      </Show>\n    </PopoverContext.Provider>\n  );\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ninterface PopoverContextValue {\n  state: PopoverState;\n\n  /**\n   * Callback to assign the popover anchor ref.\n   */\n  assignAnchorRef: (el: HTMLElement) => void;\n\n  /**\n   * Callback to assign the popover trigger ref.\n   */\n  assignTriggerRef: (el: HTMLElement) => void;\n\n  /**\n   * Callback to assign the popover content ref.\n   */\n  assignPopoverRef: (el: HTMLElement) => void;\n\n  /**\n   * Callback to assign the popover arrow ref.\n   */\n  assignArrowRef: (el: HTMLElement) => void;\n\n  /**\n   * Callback function to open the popover.\n   */\n  openWithDelay: () => void;\n\n  /**\n   * Callback function to close the popover.\n   */\n  closeWithDelay: () => void;\n\n  /**\n   * Callback function to set if the popover trigger or content is hovered.\n   */\n  setIsHovering: (value: boolean) => void;\n\n  /**\n   * Callback function to set if the popover header is mounted.\n   */\n  setHeaderMounted: (value: boolean) => void;\n\n  /**\n   * Callback function to set if the popover body is mounted.\n   */\n  setBodyMounted: (value: boolean) => void;\n\n  /**\n   * Callback function to update the popover position.\n   */\n  updatePopoverPosition: () => void;\n\n  /**\n   * Callback invoked after the popover content appears.\n   */\n  afterPopoverOpen: () => void;\n\n  /**\n   * Callback invoked after the popover content disappears.\n   */\n  afterPopoverClose: () => void;\n\n  /**\n   * Callback invoked when the mouse leaves the popover trigger.\n   */\n  onTriggerMouseLeave: () => void;\n\n  /**\n   * Callback invoked when the mouse leaves the popover content.\n   */\n  onPopoverMouseLeave: () => void;\n\n  /**\n   * Callback invoked when the popover trigger loses focus.\n   */\n  onTriggerBlur: JSX.EventHandlerUnion<HTMLElement, FocusEvent>;\n\n  /**\n   * Callback invoked when the focus moves out of the popover content.\n   */\n  onPopoverFocusOut: JSX.EventHandlerUnion<HTMLElement, FocusEvent>;\n}\n\nconst PopoverContext = createContext<PopoverContextValue>();\n\nexport function usePopoverContext() {\n  const context = useContext(PopoverContext);\n\n  if (!context) {\n    throw new Error(\"[Hope UI]: usePopoverContext must be used within a `<Popover />` component\");\n  }\n\n  return context;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * StyleConfig\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface PopoverStyleConfig {\n  baseStyle?: {\n    content?: SystemStyleObject;\n    arrow?: SystemStyleObject;\n    closeButton?: SystemStyleObject;\n    header?: SystemStyleObject;\n    body?: SystemStyleObject;\n    footer?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: ThemeablePopoverOptions;\n    closeButton?: ThemeableCloseButtonOptions;\n  };\n}\n"
  },
  {
    "path": "packages/solid/src/components/progress/index.ts",
    "content": "export * from \"./progress\";\nexport * from \"./progress.styles\";\nexport * from \"./progress-indicator\";\nexport * from \"./progress-label\";\n"
  },
  {
    "path": "packages/solid/src/components/progress/progress-indicator.tsx",
    "content": "import { mergeProps, splitProps } from \"solid-js\";\n\nimport { ColorProps } from \"../../styled-system/props/color\";\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useProgressContext } from \"./progress\";\nimport { progressIndicatorStyles, ProgressIndicatorVariants } from \"./progress.styles\";\n\nexport interface ThemeableProgressIndicatorOptions\n  extends Omit<ProgressIndicatorVariants, \"indeterminate\"> {\n  /**\n   * The color of the progress indicator.\n   */\n  color?: ColorProps[\"color\"];\n}\n\ntype ProgressIndicatorOptions = ThemeableProgressIndicatorOptions;\n\nexport type ProgressIndicatorProps<C extends ElementType = \"div\"> = HTMLHopeProps<\n  C,\n  ProgressIndicatorOptions\n>;\n\nconst hopeProgressIndicatorClass = \"hope-progress__indicator\";\n\n/**\n * ProgressIndicator (Linear)\n *\n * The progress component that visually indicates the current level of the progress bar.\n * It applies `background-color` and changes its width.\n */\nexport function ProgressIndicator<C extends ElementType = \"div\">(props: ProgressIndicatorProps<C>) {\n  const theme = useStyleConfig().Progress;\n\n  const progressContext = useProgressContext();\n\n  const defaultProps: ProgressIndicatorProps<\"div\"> = {\n    color: \"$primary9\",\n  };\n\n  const propsWithDefault: ProgressIndicatorProps<\"div\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault, [\"class\", \"color\", \"striped\", \"animated\"]);\n\n  const backgroundStyles = () => {\n    if (progressContext.state.indeterminate) {\n      return {\n        backgroundImage: `linear-gradient(to right, transparent 0%, ${local.color} 50%, transparent 100%)`,\n      };\n    }\n\n    return { backgroundColor: local.color };\n  };\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeProgressIndicatorClass,\n      progressIndicatorStyles({\n        striped: local.striped,\n        animated: local.animated,\n        indeterminate: progressContext.state.indeterminate === true ? true : false, // ensure a boolean is passed so compound variants works correctly\n        css: {\n          ...backgroundStyles(),\n          width: `${progressContext.state.percent}%`,\n        },\n      })\n    );\n  };\n\n  return <Box class={classes()} __baseStyle={theme?.baseStyle?.indicator} {...others} />;\n}\n\nProgressIndicator.toString = () => createClassSelector(hopeProgressIndicatorClass);\n"
  },
  {
    "path": "packages/solid/src/components/progress/progress-label.tsx",
    "content": "import { Show, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useProgressContext } from \"./progress\";\nimport { progressLabelStyles } from \"./progress.styles\";\n\nexport type ProgressLabelProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeProgressLabelClass = \"hope-progress__label\";\n\n/**\n * ProgressLabel is used to show the numeric value of the progress.\n */\nexport function ProgressLabel<C extends ElementType = \"div\">(props: ProgressLabelProps<C>) {\n  const theme = useStyleConfig().Progress;\n\n  const progressContext = useProgressContext();\n\n  const [local, others] = splitProps(props, [\"class\", \"children\"]);\n\n  const classes = () => classNames(local.class, hopeProgressLabelClass, progressLabelStyles());\n\n  return (\n    <Box class={classes()} __baseStyle={theme?.baseStyle?.label} {...others}>\n      <Show when={local.children} fallback={progressContext.state.ariaValueText}>\n        {local.children}\n      </Show>\n    </Box>\n  );\n}\n\nProgressLabel.toString = () => createClassSelector(hopeProgressLabelClass);\n"
  },
  {
    "path": "packages/solid/src/components/progress/progress.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css, keyframes } from \"../../styled-system/stitches.config\";\n\n/* -------------------------------------------------------------------------------------------------\n * Progress - keyframes\n * -----------------------------------------------------------------------------------------------*/\n\nconst indeterminateProgress = keyframes({\n  \"0%\": { left: \"-40%\" },\n  \"100%\": { left: \"100%\" },\n});\n\nconst stripe = keyframes({\n  from: { backgroundPosition: \"1rem 0\" },\n  to: { backgroundPosition: \"0 0\" },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Progress\n * -----------------------------------------------------------------------------------------------*/\n\nexport const progressStyles = css({\n  position: \"relative\",\n  overflow: \"hidden\",\n\n  variants: {\n    size: {\n      xs: {\n        height: \"$1\",\n        fontSize: \"4px\",\n      },\n      sm: {\n        height: \"$2\",\n        fontSize: \"6px\",\n      },\n      md: {\n        height: \"$3\",\n        fontSize: \"8px\",\n      },\n      lg: {\n        height: \"$4\",\n        fontSize: \"10px\",\n      },\n    },\n  },\n});\n\nexport type ProgressVariants = VariantProps<typeof progressStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * Progress - indicator\n * -----------------------------------------------------------------------------------------------*/\n\nexport const progressIndicatorStyles = css({\n  position: \"relative\",\n  height: \"100%\",\n\n  transition: \"width 600ms ease\",\n\n  variants: {\n    striped: {\n      true: {},\n    },\n    animated: {\n      true: {},\n    },\n    indeterminate: {\n      true: {\n        position: \"absolute\",\n        willChange: \"left\",\n        minWidth: \"50%\",\n        animation: `${indeterminateProgress} 1200ms ease infinite normal none running`,\n      },\n    },\n  },\n\n  compoundVariants: [\n    {\n      indeterminate: false,\n      striped: true,\n      css: {\n        backgroundImage:\n          \"linear-gradient(45deg, $colors$progressStripe 25%, transparent 25%, transparent 50%, $colors$progressStripe 50%,  $colors$progressStripe 75%, transparent 75%, transparent)\",\n        backgroundSize: \"1rem 1rem\",\n      },\n    },\n    {\n      indeterminate: false,\n      striped: true,\n      animated: true,\n      css: {\n        animation: `${stripe} 750ms linear infinite`,\n      },\n    },\n  ],\n});\n\nexport type ProgressIndicatorVariants = VariantProps<typeof progressIndicatorStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * Progress - label\n * -----------------------------------------------------------------------------------------------*/\n\nexport const progressLabelStyles = css({\n  position: \"absolute\",\n  top: \"50%\",\n  left: \"50%\",\n\n  width: \"100%\",\n\n  color: \"$neutral12\",\n  lineHeight: \"$none\",\n  fontWeight: \"$bold\",\n  textAlign: \"center\",\n\n  transform: \"translate(-50%, -50%)\",\n});\n"
  },
  {
    "path": "packages/solid/src/components/progress/progress.tsx",
    "content": "import { createContext, mergeProps, splitProps, useContext } from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { ColorProps } from \"../../styled-system/props/color\";\nimport { SystemStyleObject } from \"../../styled-system/types\";\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { isFunction } from \"../../utils/assertion\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { valueToPercent } from \"../../utils/number\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { progressStyles, ProgressVariants } from \"./progress.styles\";\nimport { ThemeableProgressIndicatorOptions } from \"./progress-indicator\";\n\nexport interface ProgressState {\n  /**\n   * Minimum value defining 'no progress' (must be lower than 'max')\n   */\n  min: number;\n\n  /**\n   * Maximum value defining 100% progress made (must be higher than 'min')\n   */\n  max: number;\n\n  /**\n   * Current progress (must be between min/max)\n   */\n  value: number;\n\n  /**\n   * If `true`, the progress will be indeterminate and the `value` prop will be ignored.\n   */\n  indeterminate: boolean;\n\n  /**\n   * The percentage of progress based on value, min and max.\n   */\n  percent: number;\n\n  /**\n   * The human readable text alternative of aria-valuenow.\n   */\n  ariaValueText?: string;\n\n  /**\n   * A function that returns the desired valueText to use in place of the value\n   */\n  getValueText?: (value: number, percent: number) => string;\n}\n\ninterface ThemeableProgressOptions extends ProgressVariants {\n  /**\n   * The color of the progress track.\n   */\n  trackColor?: ColorProps[\"color\"];\n}\n\ninterface ProgressOptions\n  extends ThemeableProgressOptions,\n    Partial<Omit<ProgressState, \"percent\" | \"ariaValueText\">> {\n  /**\n   * The desired valueText to use in place of the value\n   */\n  valueText?: string;\n}\n\nexport type ProgressProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, ProgressOptions>;\n\nexport interface ProgressStyleConfig {\n  baseStyle?: {\n    root?: SystemStyleObject;\n    indicator?: SystemStyleObject;\n    label?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: ThemeableProgressOptions;\n    indicator?: ThemeableProgressIndicatorOptions;\n  };\n}\n\ninterface ProgressContextValue {\n  state: ProgressState;\n}\n\nconst ProgressContext = createContext<ProgressContextValue>();\n\nconst hopeProgressClass = \"hope-progress\";\n\n/**\n * Progress (Linear)\n *\n * Progress is used to display the progress status for a task that takes a long\n * time or consists of several steps.\n *\n * It includes accessible attributes to help assistive technologies understand\n * and speak the progress values.\n */\nexport function Progress<C extends ElementType = \"div\">(props: ProgressProps<C>) {\n  const theme = useStyleConfig().Progress;\n\n  const [state] = createStore<ProgressState>({\n    get min() {\n      return props.min ?? 0;\n    },\n    get max() {\n      return props.max ?? 100;\n    },\n    get value() {\n      return props.value ?? 0;\n    },\n    get percent() {\n      return valueToPercent(this.value, this.min, this.max);\n    },\n    get indeterminate() {\n      return props.indeterminate ?? false;\n    },\n    get ariaValueText() {\n      if (this.indeterminate) {\n        return undefined;\n      }\n\n      if (isFunction(this.getValueText)) {\n        return this.getValueText(this.value, this.percent);\n      }\n\n      return props.valueText ?? `${this.percent}%`;\n    },\n    get getValueText() {\n      return props.getValueText;\n    },\n  });\n\n  const defaultProps: ProgressProps<\"div\"> = {\n    size: theme?.defaultProps?.root?.size ?? \"md\",\n    trackColor: theme?.defaultProps?.root?.trackColor ?? \"$neutral4\",\n  };\n\n  const propsWithDefault: ProgressProps<\"div\"> = mergeProps(defaultProps, props);\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  const [local, _, others] = splitProps(\n    propsWithDefault,\n    [\"class\", \"size\", \"trackColor\"],\n    [\"min\", \"max\", \"value\", \"indeterminate\", \"valueText\", \"getValueText\"]\n  );\n\n  const classes = () => {\n    return classNames(local.class, hopeProgressClass, progressStyles({ size: local.size }));\n  };\n\n  const context: ProgressContextValue = {\n    state,\n  };\n\n  return (\n    <ProgressContext.Provider value={context}>\n      <Box\n        role=\"progressbar\"\n        data-indeterminate={state.indeterminate ? \"\" : undefined}\n        aria-valuemin={state.min}\n        aria-valuemax={state.max}\n        aria-valuenow={state.indeterminate ? undefined : state.value}\n        aria-valuetext={state.ariaValueText}\n        class={classes()}\n        __baseStyle={theme?.baseStyle?.root}\n        backgroundColor={local.trackColor}\n        {...others}\n      />\n    </ProgressContext.Provider>\n  );\n}\n\nProgress.toString = () => createClassSelector(hopeProgressClass);\n\nexport function useProgressContext() {\n  const context = useContext(ProgressContext);\n\n  if (!context) {\n    throw new Error(\"[Hope UI]: useProgressContext must be used within a `<Progress />` component\");\n  }\n\n  return context;\n}\n"
  },
  {
    "path": "packages/solid/src/components/radio/index.ts",
    "content": "export * from \"./radio\";\nexport * from \"./radio.styles\";\nexport * from \"./radio-group\";\n"
  },
  {
    "path": "packages/solid/src/components/radio/radio-group.tsx",
    "content": "import { createContext, createUniqueId, JSX, splitProps, useContext } from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { ThemeableRadioOptions } from \"./radio\";\n\ninterface RadioGroupOptions extends ThemeableRadioOptions {\n  /**\n   * The `name` attribute forwarded to each `radio` element.\n   */\n  name?: string;\n\n  /**\n   * The value of the radio to be `checked`.\n   * (in controlled mode)\n   */\n  value?: string | number;\n\n  /**\n   * The value of the radio to be `checked` initially.\n   * (in uncontrolled mode)\n   */\n  defaultValue?: string | number;\n\n  /**\n   * If `true`, all wrapped radio inputs will be marked as required,\n   * and `required` attribute will be added.\n   */\n  required?: boolean;\n\n  /**\n   * If `true`, all wrapped radio inputs will be disabled.\n   */\n  disabled?: boolean;\n\n  /**\n   * If `true`, all wrapped radio inputs will have `aria-invalid` set to `true`.\n   */\n  invalid?: boolean;\n\n  /**\n   * If `true`, all wrapped radio inputs will be readonly.\n   */\n  readOnly?: boolean;\n\n  /**\n   * Callback invoked once a radio is checked.\n   * @param value the value of the checked radio\n   */\n  onChange?: (value: string) => void;\n}\n\nexport type RadioGroupProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, RadioGroupOptions>;\n\ninterface RadioGroupState extends Omit<RadioGroupOptions, \"name\" | \"onChange\"> {\n  /**\n   * The `name` attribute forwarded to each `radio` element.\n   */\n  name: string;\n\n  /**\n   * The value of the radio to be `checked`.\n   * (in uncontrolled mode)\n   */\n  _value?: string | number;\n\n  /**\n   * If `true`, the radio group is in controlled mode.\n   * (have value and onChange props)\n   */\n  isControlled: boolean;\n}\n\nconst hopeRadioGroupClass = \"hope-radio-group\";\n\n/**\n * RadioGroup provides context for all its radio childrens.\n */\nexport function RadioGroup<C extends ElementType = \"div\">(props: RadioGroupProps<C>) {\n  const defaultRadioName = `hope-radio-group-${createUniqueId()}--radio`;\n\n  const theme = useStyleConfig().Radio;\n\n  const [state, setState] = createStore<RadioGroupState>({\n    // eslint-disable-next-line solid/reactivity\n    _value: props.defaultValue,\n    get isControlled() {\n      return props.value !== undefined;\n    },\n    get value() {\n      return this.isControlled ? props.value : this._value;\n    },\n    get name() {\n      return props.name ?? defaultRadioName;\n    },\n    get required() {\n      return props.required;\n    },\n    get disabled() {\n      return props.disabled;\n    },\n    get invalid() {\n      return props.invalid;\n    },\n    get readOnly() {\n      return props.readOnly;\n    },\n    get variant() {\n      return props.variant ?? theme?.defaultProps?.group?.variant;\n    },\n    get colorScheme() {\n      return props.colorScheme ?? theme?.defaultProps?.group?.colorScheme;\n    },\n    get size() {\n      return props.size ?? theme?.defaultProps?.group?.size;\n    },\n  });\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  const [local, _, others] = splitProps(\n    props,\n    [\"class\", \"onChange\"],\n    [\"value\", \"defaultValue\", \"name\", \"required\", \"disabled\", \"readOnly\", \"invalid\"]\n  );\n\n  const onChange: JSX.EventHandlerUnion<HTMLInputElement, Event> = event => {\n    const value = (event.target as HTMLInputElement).value;\n\n    setState(\"_value\", value);\n\n    local.onChange?.(String(value));\n  };\n\n  const classes = () => classNames(local.class, hopeRadioGroupClass);\n\n  const context: RadioGroupContextValue = {\n    state,\n    onChange,\n  };\n\n  return (\n    <RadioGroupContext.Provider value={context}>\n      <Box role=\"radiogroup\" class={classes()} __baseStyle={theme?.baseStyle?.group} {...others} />\n    </RadioGroupContext.Provider>\n  );\n}\n\nRadioGroup.toString = () => createClassSelector(hopeRadioGroupClass);\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ninterface RadioGroupContextValue {\n  state: RadioGroupState;\n\n  /**\n   * The callback invoked when the checked state of a `Radio` in `RadioGroup` changes.\n   */\n  onChange: JSX.EventHandlerUnion<HTMLInputElement, Event>;\n}\n\nconst RadioGroupContext = createContext<RadioGroupContextValue>();\n\nexport function useRadioGroupContext() {\n  return useContext(RadioGroupContext);\n}\n"
  },
  {
    "path": "packages/solid/src/components/radio/radio.stories.tsx",
    "content": "import { createSignal } from \"solid-js\";\n\nimport { Button, RadioGroup } from \"..\";\nimport { HStack, VStack } from \"../stack/stack\";\nimport { HopeWrapper } from \"../storybook-utils\";\nimport { Radio } from \"./radio\";\n\nexport default {\n  title: \"Data entry/Radio\",\n  component: Radio,\n  parameters: { layout: \"centered\" },\n  decorators: [\n    (Story: any) => (\n      <HopeWrapper>\n        <Story />\n      </HopeWrapper>\n    ),\n  ],\n  argTypes: {\n    variant: {\n      control: { type: \"select\" },\n      options: [\"outline\", \"filled\"],\n    },\n    colorScheme: {\n      control: { type: \"select\" },\n      options: [\"primary\", \"neutral\", \"success\", \"info\", \"warning\", \"danger\"],\n    },\n    size: {\n      control: { type: \"select\" },\n      options: [\"sm\", \"md\", \"lg\"],\n    },\n    labelPlacement: {\n      control: { type: \"select\" },\n      options: [\"start\", \"end\"],\n    },\n    invalid: {\n      control: { type: \"boolean\" },\n    },\n    disabled: {\n      control: { type: \"boolean\" },\n    },\n    required: {\n      control: { type: \"boolean\" },\n    },\n    readOnly: {\n      control: { type: \"boolean\" },\n    },\n  },\n  args: {\n    variant: \"outline\",\n    colorScheme: \"primary\",\n    size: \"md\",\n    labelPlacement: \"end\",\n    invalid: false,\n    disabled: false,\n    required: false,\n    readOnly: false,\n  },\n};\n\nexport const Default = (args: any) => {\n  const [fruit, setFruit] = createSignal(\"\");\n\n  const onChange = (event: Event) => {\n    setFruit((event.target as HTMLInputElement).value);\n  };\n\n  return (\n    <VStack spacing=\"$5\">\n      <Button onClick={() => setFruit(\"apple\")}>Select Apple (current: {fruit()})</Button>\n      <HStack spacing=\"$5\">\n        <Radio\n          name=\"fruit\"\n          value=\"peach\"\n          checked={fruit() === \"peach\"}\n          onChange={onChange}\n          {...args}\n        >\n          Peach\n        </Radio>\n        <Radio\n          name=\"fruit\"\n          value=\"apple\"\n          checked={fruit() === \"apple\"}\n          onChange={onChange}\n          {...args}\n        >\n          Apple\n        </Radio>\n        <Radio\n          name=\"fruit\"\n          value=\"orange\"\n          checked={fruit() === \"orange\"}\n          onChange={onChange}\n          {...args}\n        >\n          Orange\n        </Radio>\n      </HStack>\n    </VStack>\n  );\n};\n\nexport const WithRadioGroup = (args: any) => {\n  const [fruit, setFruit] = createSignal(\"orange\");\n\n  const onChange = (value: string) => {\n    setFruit(value);\n  };\n\n  return (\n    <VStack spacing=\"$5\">\n      <Button onClick={() => setFruit(\"apple\")}>Select Apple (current: {fruit()})</Button>\n      <RadioGroup name=\"fruit\" onChange={onChange} value={fruit()} {...args}>\n        <HStack spacing=\"$5\">\n          <Radio value=\"peach\">Peach</Radio>\n          <Radio value=\"apple\">Apple</Radio>\n          <Radio value=\"orange\">Orange</Radio>\n        </HStack>\n      </RadioGroup>\n      <RadioGroup defaultValue=\"apple\" {...args}>\n        <HStack spacing=\"$5\">\n          <Radio value=\"peach\">Peach</Radio>\n          <Radio value=\"apple\">Apple</Radio>\n          <Radio value=\"orange\">Orange</Radio>\n        </HStack>\n      </RadioGroup>\n    </VStack>\n  );\n};\nWithRadioGroup.storyName = \"With RadioGroup\";\n"
  },
  {
    "path": "packages/solid/src/components/radio/radio.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css } from \"../../styled-system/stitches.config\";\nimport {\n  toggleControlLabelStyles,\n  toggleControlStyles,\n  toggleWrapperStyles,\n} from \"../checkbox/checkbox.styles\";\n\n/* -------------------------------------------------------------------------------------------------\n * Radio - wrapper\n * -----------------------------------------------------------------------------------------------*/\n\nexport const radioWrapperStyles = css(toggleWrapperStyles, {\n  variants: {\n    labelPlacement: {\n      start: {\n        flexDirection: \"row-reverse\",\n      },\n      end: {\n        flexDirection: \"row\",\n      },\n    },\n  },\n});\n\nexport type RadioWrapperVariants = VariantProps<typeof radioWrapperStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * Radio - label\n * -----------------------------------------------------------------------------------------------*/\n\nexport const radioLabelStyles = css(toggleControlLabelStyles);\n\n/* -------------------------------------------------------------------------------------------------\n * Radio - control\n * -----------------------------------------------------------------------------------------------*/\n\nexport const radioControlStyles = css(toggleControlStyles, {\n  borderRadius: \"$full\",\n\n  \"&[data-checked]::before\": {\n    content: \"\",\n    display: \"inline-block\",\n    position: \"relative\",\n    boxSize: \"calc(50% + 1px)\", // beacause of the 1px border\n    borderRadius: \"$full\",\n    backgroundColor: \"$loContrast\",\n  },\n});\n\nexport type RadioControlVariants = VariantProps<typeof radioControlStyles>;\n"
  },
  {
    "path": "packages/solid/src/components/radio/radio.tsx",
    "content": "import { createContext, createUniqueId, JSX, Show, splitProps, useContext } from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { SystemStyleObject } from \"../../styled-system/types\";\nimport { visuallyHiddenStyles } from \"../../styled-system/utils\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { callHandler, chainHandlers } from \"../../utils/function\";\nimport { isChildrenFunction } from \"../../utils/solid\";\nimport { hope } from \"../factory\";\nimport { useFormControlContext } from \"../form-control/form-control\";\nimport { useFormControl } from \"../form-control/use-form-control\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport {\n  radioControlStyles,\n  RadioControlVariants,\n  radioLabelStyles,\n  radioWrapperStyles,\n  RadioWrapperVariants,\n} from \"./radio.styles\";\nimport { useRadioGroupContext } from \"./radio-group\";\n\ntype RadioChildrenRenderProp = (props: { checked: boolean }) => JSX.Element;\n\nexport type ThemeableRadioOptions = RadioWrapperVariants & RadioControlVariants;\n\ninterface RadioOptions extends ThemeableRadioOptions {\n  /**\n   * The ref to be passed to the internal <input> tag.\n   */\n  ref?: HTMLInputElement | ((el: HTMLInputElement) => void);\n\n  /**\n   * The id to be passed to the internal <input> tag.\n   */\n  id?: string;\n\n  /**\n   * The name to be passed to the internal <input> tag.\n   */\n  name?: string;\n\n  /**\n   * The value to be used in the radio input.\n   * This is the value that will be returned on form submission.\n   */\n  value?: string | number;\n\n  /**\n   * If `true`, the radio will be checked.\n   * You'll need to pass `onChange` to update its value (since it is now controlled)\n   */\n  checked?: boolean;\n\n  /**\n   * If `true`, the radio will be initially checked.\n   */\n  defaultChecked?: boolean;\n\n  /**\n   * If `true`, the radio input is marked as required,\n   * and `required` attribute will be added\n   */\n  required?: boolean;\n\n  /**\n   * If `true`, the radio will be disabled\n   */\n  disabled?: boolean;\n\n  /**\n   * If `true`, the input will have `aria-invalid` set to `true`\n   */\n  invalid?: boolean;\n\n  /**\n   * If `true`, the radio will be readonly\n   */\n  readOnly?: boolean;\n\n  /**\n   * The children of the radio.\n   */\n  children?: JSX.Element | RadioChildrenRenderProp;\n\n  /**\n   * The callback invoked when the checked state of the radio changes.\n   */\n  onChange?: JSX.EventHandlerUnion<HTMLInputElement, Event>;\n\n  /**\n   * The callback invoked when the radio is focused\n   */\n  onFocus?: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>;\n\n  /**\n   * The callback invoked when the radio is blurred (loses focus)\n   */\n  onBlur?: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>;\n}\n\nexport type RadioProps<C extends ElementType = \"label\"> = HTMLHopeProps<C, RadioOptions>;\n\ninterface RadioState extends Required<ThemeableRadioOptions> {\n  /**\n   * The `checked` state of the radio.\n   * (In uncontrolled mode)\n   */\n  _checked: boolean;\n\n  /**\n   * If `true`, the radio is in controlled mode.\n   * (have checked and onChange props)\n   */\n  isControlled: boolean;\n\n  /**\n   * If `true`, the radio is currently focused.\n   */\n  isFocused: boolean;\n\n  /**\n   * The `checked` state of the radio.\n   * (In controlled mode)\n   */\n  checked: boolean;\n\n  /**\n   * The value to be used in the radio input.\n   * This is the value that will be returned on form submission.\n   */\n  value?: string | number;\n\n  /**\n   * The id of the input field in a radio.\n   */\n  id?: string;\n\n  /**\n   * The name of the input field in a radio.\n   */\n  name?: string;\n\n  /**\n   * If `true`, the radio input is marked as required,\n   * and `required` attribute will be added\n   */\n  required?: boolean;\n\n  /**\n   * If `true`, the radio will be disabled\n   */\n  disabled?: boolean;\n\n  /**\n   * If `true`, the input will have `aria-invalid` set to `true`\n   */\n  invalid?: boolean;\n\n  /**\n   * If `true`, the radio will be readonly\n   */\n  readOnly?: boolean;\n\n  \"aria-required\"?: boolean;\n  \"aria-disabled\"?: boolean;\n  \"aria-invalid\"?: boolean;\n  \"aria-readonly\"?: boolean;\n  \"aria-label\"?: string;\n  \"aria-labelledby\"?: string;\n  \"aria-describedby\"?: string;\n\n  \"data-focus\"?: string;\n  \"data-checked\"?: string;\n  \"data-required\"?: string;\n  \"data-disabled\"?: string;\n  \"data-invalid\"?: string;\n  \"data-readonly\"?: string;\n}\n\nconst hopeRadioClass = \"hope-radio\";\nconst hopeRadioInputClass = \"hope-radio__input\";\nconst hopeRadioControlClass = \"hope-radio__control\";\nconst hopeRadioLabelClass = \"hope-radio__label\";\n\n/**\n * The component that provides context for all part of a `radio`.\n * It act as a container and renders a `label` with a visualy hidden `input[type=radio]`.\n */\nexport function Radio<C extends ElementType = \"label\">(props: RadioProps<C>) {\n  const defaultId = `hope-radio-${createUniqueId()}`;\n\n  const theme = useStyleConfig().Radio;\n\n  const formControlContext = useFormControlContext();\n  const radioGroupContext = useRadioGroupContext();\n\n  const formControlProps = useFormControl<HTMLInputElement>(props);\n\n  const [state, setState] = createStore<RadioState>({\n    // eslint-disable-next-line solid/reactivity\n    _checked: !!props.defaultChecked,\n    isFocused: false,\n    get isControlled() {\n      return props.checked !== undefined;\n    },\n    get checked() {\n      if (radioGroupContext) {\n        const radioGroupValue = radioGroupContext.state.value;\n        return radioGroupValue != null ? String(props.value) === String(radioGroupValue) : false;\n      }\n\n      // Not in a RadioGroup\n      return this.isControlled ? !!props.checked : this._checked;\n    },\n    get variant() {\n      return (\n        props.variant ??\n        radioGroupContext?.state?.variant ??\n        theme?.defaultProps?.root?.variant ??\n        \"outline\"\n      );\n    },\n    get colorScheme() {\n      return (\n        props.colorScheme ??\n        radioGroupContext?.state?.colorScheme ??\n        theme?.defaultProps?.root?.colorScheme ??\n        \"primary\"\n      );\n    },\n    get size() {\n      return (\n        props.size ?? radioGroupContext?.state?.size ?? theme?.defaultProps?.root?.size ?? \"md\"\n      );\n    },\n    get labelPlacement() {\n      return (\n        props.labelPlacement ??\n        radioGroupContext?.state?.labelPlacement ??\n        theme?.defaultProps?.root?.labelPlacement ??\n        \"end\"\n      );\n    },\n    get id() {\n      if (formControlContext && !radioGroupContext) {\n        return formControlProps.id;\n      }\n\n      return props.id ?? defaultId;\n    },\n    get name() {\n      return props.name ?? radioGroupContext?.state.name;\n    },\n    get value() {\n      return props.value;\n    },\n    get required() {\n      return formControlProps.required ?? radioGroupContext?.state.required;\n    },\n    get disabled() {\n      return formControlProps.disabled ?? radioGroupContext?.state.disabled;\n    },\n    get invalid() {\n      return formControlProps.invalid ?? radioGroupContext?.state.invalid;\n    },\n    get readOnly() {\n      return formControlProps.readOnly ?? radioGroupContext?.state.readOnly;\n    },\n    get [\"aria-required\"]() {\n      return this.required ? true : undefined;\n    },\n    get [\"aria-disabled\"]() {\n      return this.disabled ? true : undefined;\n    },\n    get [\"aria-invalid\"]() {\n      return this.invalid ? true : undefined;\n    },\n    get [\"aria-readonly\"]() {\n      return this.readOnly ? true : undefined;\n    },\n    get [\"aria-label\"]() {\n      return props[\"aria-label\"];\n    },\n    get [\"aria-labelledby\"]() {\n      return props[\"aria-labelledby\"];\n    },\n    get [\"aria-describedby\"]() {\n      return props[\"aria-describedby\"];\n    },\n    get [\"data-focus\"]() {\n      return this.isFocused ? \"\" : undefined;\n    },\n    get [\"data-checked\"]() {\n      return this.checked ? \"\" : undefined;\n    },\n    get [\"data-required\"]() {\n      return this.required ? \"\" : undefined;\n    },\n    get [\"data-disabled\"]() {\n      return this.disabled ? \"\" : undefined;\n    },\n    get [\"data-invalid\"]() {\n      return this.invalid ? \"\" : undefined;\n    },\n    get [\"data-readonly\"]() {\n      return this.readOnly ? \"\" : undefined;\n    },\n  });\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  const [local, _, others] = splitProps(\n    props as RadioProps<\"label\">,\n    [\"class\", \"children\", \"ref\", \"tabIndex\", \"onChange\"],\n    [\n      \"variant\",\n      \"colorScheme\",\n      \"size\",\n      \"labelPlacement\",\n      \"id\",\n      \"name\",\n      \"value\",\n      \"checked\",\n      \"defaultChecked\",\n      \"required\",\n      \"disabled\",\n      \"invalid\",\n      \"readOnly\",\n      \"onFocus\",\n      \"onBlur\",\n    ]\n  );\n\n  const onChange: JSX.EventHandlerUnion<HTMLInputElement, Event> = event => {\n    if (state.readOnly || state.disabled) {\n      event.preventDefault();\n      return;\n    }\n\n    if (!state.isControlled) {\n      const target = event.target as HTMLInputElement;\n      setState(\"_checked\", target.checked);\n    }\n\n    chainHandlers(radioGroupContext?.onChange, local.onChange)(event);\n  };\n\n  const onFocus: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent> = event => {\n    setState(\"isFocused\", true);\n    callHandler(formControlProps.onFocus, event);\n  };\n\n  const onBlur: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent> = event => {\n    setState(\"isFocused\", false);\n    callHandler(formControlProps.onBlur, event);\n  };\n\n  const wrapperClasses = () => {\n    return classNames(\n      local.class,\n      hopeRadioClass,\n      radioWrapperStyles({\n        size: state.size,\n        labelPlacement: state.labelPlacement,\n      })\n    );\n  };\n\n  const inputClasses = () => classNames(hopeRadioInputClass, visuallyHiddenStyles());\n\n  const controlClasses = () => {\n    return classNames(\n      hopeRadioControlClass,\n      radioControlStyles({\n        variant: state.variant,\n        colorScheme: state.colorScheme,\n        size: state.size,\n      })\n    );\n  };\n\n  const labelClasses = () => {\n    return classNames(hopeRadioLabelClass, radioLabelStyles());\n  };\n\n  const context: RadioContextValue = {\n    state,\n    onChange,\n    onFocus,\n    onBlur,\n  };\n\n  return (\n    <RadioContext.Provider value={context}>\n      <hope.label\n        class={wrapperClasses()}\n        __baseStyle={theme?.baseStyle?.root}\n        for={state.id}\n        data-group\n        data-focus={state[\"data-focus\"]}\n        data-checked={state[\"data-checked\"]}\n        data-required={state[\"data-required\"]}\n        data-disabled={state[\"data-disabled\"]}\n        data-invalid={state[\"data-invalid\"]}\n        data-readonly={state[\"data-readonly\"]}\n        {...others}\n      >\n        {/* eslint-disable-next-line jsx-a11y/role-supports-aria-props */}\n        <input\n          type=\"radio\"\n          class={inputClasses()}\n          ref={local.ref}\n          tabIndex={local.tabIndex}\n          value={state.value}\n          id={state.id}\n          name={state.name}\n          checked={state.checked}\n          required={state.required}\n          disabled={state.disabled}\n          readOnly={state.readOnly}\n          onChange={onChange}\n          onFocus={onFocus}\n          onBlur={onBlur}\n          aria-required={state[\"aria-required\"]}\n          aria-disabled={state[\"aria-disabled\"]}\n          aria-invalid={state[\"aria-invalid\"]}\n          aria-readonly={state[\"aria-readonly\"]}\n          aria-label={state[\"aria-label\"]}\n          aria-labelledby={state[\"aria-labelledby\"]}\n          aria-describedby={state[\"aria-describedby\"]}\n        />\n        <hope.span\n          aria-hidden={true}\n          class={controlClasses()}\n          __baseStyle={theme?.baseStyle?.control}\n          data-focus={state[\"data-focus\"]}\n          data-checked={state[\"data-checked\"]}\n          data-required={state[\"data-required\"]}\n          data-disabled={state[\"data-disabled\"]}\n          data-invalid={state[\"data-invalid\"]}\n          data-readonly={state[\"data-readonly\"]}\n          {...others}\n        />\n        <hope.span\n          class={labelClasses()}\n          __baseStyle={theme?.baseStyle?.label}\n          data-focus={state[\"data-focus\"]}\n          data-checked={state[\"data-checked\"]}\n          data-required={state[\"data-required\"]}\n          data-disabled={state[\"data-disabled\"]}\n          data-invalid={state[\"data-invalid\"]}\n          data-readonly={state[\"data-readonly\"]}\n        >\n          <Show when={isChildrenFunction(local)} fallback={local.children as JSX.Element}>\n            {(local.children as RadioChildrenRenderProp)?.({ checked: state.checked })}\n          </Show>\n        </hope.span>\n      </hope.label>\n    </RadioContext.Provider>\n  );\n}\n\nRadio.toString = () => createClassSelector(hopeRadioClass);\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ninterface RadioContextValue\n  extends Required<Pick<RadioOptions, \"onChange\" | \"onFocus\" | \"onBlur\">> {\n  state: RadioState;\n}\n\nconst RadioContext = createContext<RadioContextValue>();\n\nexport function useRadioContext() {\n  const context = useContext(RadioContext);\n\n  if (!context) {\n    throw new Error(\"[Hope UI]: useRadioContext must be used within a `<Radio />` component\");\n  }\n\n  return context;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * StyleConfig\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface RadioStyleConfig {\n  baseStyle?: {\n    root?: SystemStyleObject;\n    group?: SystemStyleObject;\n    control?: SystemStyleObject;\n    label?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: ThemeableRadioOptions;\n    group?: ThemeableRadioOptions;\n  };\n}\n"
  },
  {
    "path": "packages/solid/src/components/select/index.ts",
    "content": "export * from \"./select\";\nexport * from \"./select.styles\";\nexport * from \"./select-content\";\nexport * from \"./select-icon\";\nexport * from \"./select-label\";\nexport * from \"./select-listbox\";\nexport * from \"./select-optgroup\";\nexport * from \"./select-option\";\nexport * from \"./select-option-indicator\";\nexport * from \"./select-option-text\";\nexport * from \"./select-placeholder\";\nexport * from \"./select-tag\";\nexport * from \"./select-tag-close-button\";\nexport * from \"./select-trigger\";\nexport * from \"./select-value\";\n"
  },
  {
    "path": "packages/solid/src/components/select/select-content.tsx",
    "content": "import { children, createEffect, createSignal, on, Show, splitProps } from \"solid-js\";\nimport { Portal } from \"solid-js/web\";\nimport { Transition } from \"solid-transition-group\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { isFunction } from \"../../utils/assertion\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ClickOutside } from \"../click-outside/click-outside\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useSelectContext } from \"./select\";\nimport { selectContentStyles, selectTransitionName } from \"./select.styles\";\n\nexport type SelectContentProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeSelectContentClass = \"hope-select__content\";\n\n/**\n * The component that pops out when the select is open.\n */\nexport function SelectContent<C extends ElementType = \"div\">(props: SelectContentProps<C>) {\n  const theme = useStyleConfig().Select;\n\n  const selectContext = useSelectContext();\n\n  const [local, others] = splitProps(props as SelectContentProps<\"div\">, [\n    \"ref\",\n    \"class\",\n    \"children\",\n  ]);\n\n  /**\n   * Internal state to handle select content portal `mounted` state.\n   * Dirty hack since solid-transition-group doesn't work with Portal.\n   */\n  const [isPortalMounted, setIsPortalMounted] = createSignal(false);\n\n  createEffect(\n    on(\n      () => selectContext.state.opened,\n      () => {\n        if (selectContext.state.opened) {\n          // mount portal when state `opened` is true.\n          setIsPortalMounted(true);\n        } else {\n          // unmount portal instantly when there is no menu transition.\n          selectContext.state.motionPreset === \"none\" && setIsPortalMounted(false);\n        }\n      }\n    )\n  );\n\n  // For smooth transition, unmount portal only after select's content exit transition is done.\n  const unmountPortal = () => setIsPortalMounted(false);\n\n  const classes = () => classNames(local.class, hopeSelectContentClass, selectContentStyles());\n\n  // hack to force children `SelectOption` to mount and register themself to the select.\n  const resolvedChildren = children(() => local.children);\n\n  const assignContentRef = (el: HTMLDivElement) => {\n    selectContext.assignContentRef(el);\n\n    if (isFunction(local.ref)) {\n      local.ref(el);\n    } else {\n      // eslint-disable-next-line solid/reactivity\n      local.ref = el;\n    }\n  };\n\n  const onClickOutside = (event: Event) => {\n    selectContext.onContentClickOutside(event.target as HTMLElement);\n  };\n\n  const transitionName = () => {\n    switch (selectContext.state.motionPreset) {\n      case \"fade-in-top\":\n        return selectTransitionName.fadeInTop;\n      case \"none\":\n        return \"hope-none\";\n    }\n  };\n\n  return (\n    <Show when={isPortalMounted()}>\n      <Portal>\n        <Transition name={transitionName()} appear onAfterExit={unmountPortal}>\n          <Show when={selectContext.state.opened}>\n            <ClickOutside onClickOutside={onClickOutside}>\n              <Box\n                ref={assignContentRef}\n                class={classes()}\n                __baseStyle={theme?.baseStyle?.content}\n                {...others}\n              >\n                {resolvedChildren()}\n              </Box>\n            </ClickOutside>\n          </Show>\n        </Transition>\n      </Portal>\n    </Show>\n  );\n}\n\nSelectContent.toString = () => createClassSelector(hopeSelectContentClass);\n"
  },
  {
    "path": "packages/solid/src/components/select/select-icon.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { IconSelector } from \"../icons/IconSelector\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useSelectContext } from \"./select\";\nimport { selectIconStyles } from \"./select.styles\";\n\ninterface SelectIconOptions {\n  /**\n   * If `true`, the icon will rotate when the select is open.\n   */\n  rotateOnOpen?: boolean;\n}\n\ntype SelectIconProps<C extends ElementType = \"svg\"> = HTMLHopeProps<C, SelectIconOptions>;\n\nconst hopeSelectIconClass = \"hope-select__icon\";\n\n/**\n * A small icon often displayed next to the value as a visual affordance for the fact it can be open.\n */\nexport function SelectIcon<C extends ElementType = \"svg\">(props: SelectIconProps<C>) {\n  const theme = useStyleConfig().Select;\n\n  const selectContext = useSelectContext();\n\n  const [local, others] = splitProps(props, [\"class\", \"rotateOnOpen\"]);\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeSelectIconClass,\n      selectIconStyles(\n        local.rotateOnOpen\n          ? {\n              opened: selectContext.state.opened,\n            }\n          : undefined\n      )\n    );\n  };\n\n  return (\n    <IconSelector aria-hidden class={classes()} __baseStyle={theme?.baseStyle?.icon} {...others} />\n  );\n}\n\nSelectIcon.toString = () => createClassSelector(hopeSelectIconClass);\n"
  },
  {
    "path": "packages/solid/src/components/select/select-label.tsx",
    "content": "import { createUniqueId, onMount, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useSelectContext } from \"./select\";\nimport { selectLabelStyles } from \"./select.styles\";\nimport { useSelectOptGroupContext } from \"./select-optgroup\";\n\nexport type SelectLabelProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeSelectLabelClass = \"hope-select__label\";\n\n/**\n * Component used to render the label of a group.\n */\nexport function SelectLabel<C extends ElementType = \"div\">(props: SelectLabelProps<C>) {\n  const defaultIdSuffix = createUniqueId();\n\n  const theme = useStyleConfig().Select;\n\n  const selectContext = useSelectContext();\n  const selectOptGroupContext = useSelectOptGroupContext();\n\n  const [local, others] = splitProps(props as SelectLabelProps<\"div\">, [\"class\", \"id\"]);\n\n  const id = () => local.id ?? `${selectContext.state.labelIdPrefix}-${defaultIdSuffix}`;\n\n  const classes = () => classNames(local.class, hopeSelectLabelClass, selectLabelStyles());\n\n  onMount(() => {\n    selectOptGroupContext?.setAriaLabelledBy(id());\n  });\n\n  return <Box id={id()} class={classes()} __baseStyle={theme?.baseStyle?.label} {...others} />;\n}\n\nSelectLabel.toString = () => createClassSelector(hopeSelectLabelClass);\n"
  },
  {
    "path": "packages/solid/src/components/select/select-listbox.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { isFunction } from \"../../utils/assertion\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useSelectContext } from \"./select\";\nimport { selectListboxStyles } from \"./select.styles\";\n\nexport type SelectListboxProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeSelectListboxClass = \"hope-select__listbox\";\n\n/**\n * The scrolling viewport that contains all of the options.\n */\nexport function SelectListbox<C extends ElementType = \"div\">(props: SelectListboxProps<C>) {\n  const theme = useStyleConfig().Select;\n\n  const selectContext = useSelectContext();\n\n  const [local, others] = splitProps(props as SelectListboxProps<\"div\">, [\"ref\", \"class\"]);\n\n  const classes = () => classNames(local.class, hopeSelectListboxClass, selectListboxStyles());\n\n  const assignListboxRef = (el: HTMLDivElement) => {\n    selectContext.assignListboxRef(el);\n\n    if (isFunction(local.ref)) {\n      local.ref(el);\n    } else {\n      // eslint-disable-next-line solid/reactivity\n      local.ref = el;\n    }\n  };\n\n  const onMouseDown = (event: MouseEvent) => {\n    // Prevent select trigger from loosing focus and close the listbox.\n    event.preventDefault();\n  };\n\n  return (\n    <Box\n      ref={assignListboxRef}\n      role=\"listbox\"\n      tabindex=\"-1\"\n      id={selectContext.state.listboxId}\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.listbox}\n      onMouseLeave={selectContext.onListboxMouseLeave}\n      onMouseDown={onMouseDown}\n      {...others}\n    />\n  );\n}\n\nSelectListbox.toString = () => createClassSelector(hopeSelectListboxClass);\n"
  },
  {
    "path": "packages/solid/src/components/select/select-optgroup.tsx",
    "content": "import { createContext, createSignal, splitProps, useContext } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { selectOptGroupStyles } from \"./select.styles\";\n\nexport interface SelectOptGroupContextValue {\n  setAriaLabelledBy: (id: string) => void;\n}\n\nconst SelectOptGroupContext = createContext<SelectOptGroupContextValue>();\n\nexport type SelectOptGroupProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeSelectOptGroupClass = \"hope-select__optgroup\";\n\n/**\n * Component used to group multiple options.\n */\nexport function SelectOptGroup<C extends ElementType = \"div\">(props: SelectOptGroupProps<C>) {\n  const theme = useStyleConfig().Select;\n\n  const [ariaLabelledBy, setAriaLabelledBy] = createSignal<string>();\n\n  const [local, others] = splitProps(props, [\"class\", \"children\"]);\n\n  const classes = () => classNames(local.class, hopeSelectOptGroupClass, selectOptGroupStyles());\n\n  const context: SelectOptGroupContextValue = {\n    setAriaLabelledBy,\n  };\n\n  return (\n    <SelectOptGroupContext.Provider value={context}>\n      <Box\n        role=\"group\"\n        aria-labelledby={ariaLabelledBy()}\n        class={classes()}\n        __baseStyle={theme?.baseStyle?.optgroup}\n        {...others}\n      >\n        {local.children}\n      </Box>\n    </SelectOptGroupContext.Provider>\n  );\n}\n\nSelectOptGroup.toString = () => createClassSelector(hopeSelectOptGroupClass);\n\nexport function useSelectOptGroupContext() {\n  return useContext(SelectOptGroupContext);\n}\n"
  },
  {
    "path": "packages/solid/src/components/select/select-option-indicator.tsx",
    "content": "import { Show, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { IconCheck } from \"../icons/IconCheck\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { selectOptionIndicatorStyles } from \"./select.styles\";\nimport { useSelectOptionContext } from \"./select-option\";\n\nexport type SelectOptionIndicatorProps<C extends ElementType = \"span\"> = HTMLHopeProps<C>;\n\nconst hopeSelectOptionIndicatorClass = \"hope-select__option-indicator\";\n\n/**\n * Visual indicator rendered when the option is selected.\n */\nexport function SelectOptionIndicator<C extends ElementType = \"span\">(\n  props: SelectOptionIndicatorProps<C>\n) {\n  const theme = useStyleConfig().Select;\n\n  const selectOptionContext = useSelectOptionContext();\n\n  const [local, others] = splitProps(props, [\"class\", \"children\"]);\n\n  const classes = () =>\n    classNames(local.class, hopeSelectOptionIndicatorClass, selectOptionIndicatorStyles());\n\n  return (\n    <Show when={selectOptionContext.selected()}>\n      <hope.span class={classes()} __baseStyle={theme?.baseStyle?.optionIndicator} {...others}>\n        <Show when={local.children} fallback={<IconCheck aria-hidden=\"true\" boxSize=\"$5\" />}>\n          {local.children}\n        </Show>\n      </hope.span>\n    </Show>\n  );\n}\n\nSelectOptionIndicator.toString = () => createClassSelector(hopeSelectOptionIndicatorClass);\n"
  },
  {
    "path": "packages/solid/src/components/select/select-option-text.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { selectOptionTextStyles } from \"./select.styles\";\n\nexport type SelectOptionTextProps<C extends ElementType = \"span\"> = HTMLHopeProps<C>;\n\nconst hopeSelectOptionTextClass = \"hope-select__option-text\";\n\n/**\n * The textual part of the option.\n */\nexport function SelectOptionText<C extends ElementType = \"span\">(props: SelectOptionTextProps<C>) {\n  const theme = useStyleConfig().Select;\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () =>\n    classNames(local.class, hopeSelectOptionTextClass, selectOptionTextStyles());\n\n  return <hope.span class={classes()} __baseStyle={theme?.baseStyle?.optionText} {...others} />;\n}\n\nSelectOptionText.toString = () => createClassSelector(hopeSelectOptionTextClass);\n"
  },
  {
    "path": "packages/solid/src/components/select/select-option.tsx",
    "content": "import {\n  Accessor,\n  createContext,\n  createEffect,\n  createSignal,\n  onMount,\n  splitProps,\n  useContext,\n} from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { isFunction } from \"../../utils/assertion\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useSelectContext } from \"./select\";\nimport { selectOptionStyles } from \"./select.styles\";\nimport { SelectOptionData } from \"./select.utils\";\n\nexport interface SelectOptionContextValue {\n  selected: Accessor<boolean>;\n}\n\nconst SelectOptionContext = createContext<SelectOptionContextValue>();\n\ntype SelectOptionOptions = Required<Pick<SelectOptionData, \"value\">> &\n  Partial<Pick<SelectOptionData, \"textValue\" | \"disabled\">>;\n\nexport type SelectOptionProps<C extends ElementType = \"div\"> = HTMLHopeProps<\n  C,\n  SelectOptionOptions\n>;\n\nconst hopeSelectOptionClass = \"hope-select__option\";\n\n/**\n * The component that contains a select option.\n */\nexport function SelectOption<C extends ElementType = \"div\">(props: SelectOptionProps<C>) {\n  const theme = useStyleConfig().Select;\n\n  const selectContext = useSelectContext();\n\n  const [index, setIndex] = createSignal<number>(-1);\n\n  let optionRef: HTMLDivElement | undefined;\n\n  const [local, others] = splitProps(props as SelectOptionProps<\"div\">, [\n    \"ref\",\n    \"class\",\n    \"value\",\n    \"textValue\",\n    \"disabled\",\n  ]);\n\n  const optionData: Accessor<SelectOptionData> = () => ({\n    value: local.value,\n    textValue: local.textValue ?? optionRef?.textContent ?? String(local.value),\n    disabled: !!local.disabled,\n  });\n\n  const id = () => `${selectContext.state.optionIdPrefix}-${index()}`;\n  const isSelected = () => selectContext.isOptionSelected(optionData());\n  const isActiveDescendant = () => selectContext.isOptionActiveDescendant(index());\n\n  const classes = () => {\n    return classNames(local.class, hopeSelectOptionClass, selectOptionStyles());\n  };\n\n  const assignOptionRef = (el: HTMLDivElement) => {\n    optionRef = el;\n\n    if (isFunction(local.ref)) {\n      local.ref(el);\n    } else {\n      // eslint-disable-next-line solid/reactivity\n      local.ref = el;\n    }\n  };\n\n  const onOptionClick = (event: MouseEvent) => {\n    event.stopPropagation();\n    selectContext.onOptionClick(index());\n  };\n\n  const onOptionMouseMove = (event: MouseEvent) => {\n    if (local.disabled) {\n      selectContext.onOptionMouseMove(-1);\n    }\n\n    if (isActiveDescendant() || local.disabled) {\n      event.preventDefault();\n      event.stopPropagation();\n      return;\n    }\n\n    selectContext.onOptionMouseMove(index());\n  };\n\n  const context: SelectOptionContextValue = {\n    selected: isSelected,\n  };\n\n  onMount(() => {\n    setIndex(selectContext.registerOption(optionData()));\n  });\n\n  createEffect(() => {\n    if (isActiveDescendant() && optionRef) {\n      selectContext.scrollToOption(optionRef);\n    }\n  });\n\n  return (\n    <SelectOptionContext.Provider value={context}>\n      <Box\n        ref={assignOptionRef}\n        role=\"option\"\n        id={id()}\n        aria-selected={isSelected()}\n        data-active={isActiveDescendant() ? \"\" : undefined}\n        data-disabled={local.disabled ? \"\" : undefined}\n        data-group\n        class={classes()}\n        __baseStyle={theme?.baseStyle?.option}\n        onClick={onOptionClick}\n        onMouseMove={onOptionMouseMove}\n        onMouseDown={selectContext.onOptionMouseDown}\n        {...others}\n      />\n    </SelectOptionContext.Provider>\n  );\n}\n\nSelectOption.toString = () => createClassSelector(hopeSelectOptionClass);\n\nexport function useSelectOptionContext() {\n  const context = useContext(SelectOptionContext);\n\n  if (!context) {\n    throw new Error(\n      \"[Hope UI]: useSelectOptionContext must be used within a `<Select.Option />` component\"\n    );\n  }\n\n  return context;\n}\n"
  },
  {
    "path": "packages/solid/src/components/select/select-placeholder.tsx",
    "content": "import { Show, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useSelectContext } from \"./select\";\nimport { selectPlaceholderStyles } from \"./select.styles\";\n\nconst hopeSelectPlaceholderClass = \"hope-select__placeholder\";\n\nexport type SelectPlaceholderProps<C extends ElementType = \"span\"> = HTMLHopeProps<C>;\n\n/**\n * Component used to display a placeholder when no option is selected.\n */\nexport function SelectPlaceholder<C extends ElementType = \"span\">(\n  props: SelectPlaceholderProps<C>\n) {\n  const theme = useStyleConfig().Select;\n\n  const selectContext = useSelectContext();\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () =>\n    classNames(local.class, hopeSelectPlaceholderClass, selectPlaceholderStyles());\n\n  return (\n    <Show when={!selectContext.state.hasSelectedOptions}>\n      <hope.span class={classes()} __baseStyle={theme?.baseStyle?.placeholder} {...others} />\n    </Show>\n  );\n}\n\nSelectPlaceholder.toString = () => createClassSelector(hopeSelectPlaceholderClass);\n"
  },
  {
    "path": "packages/solid/src/components/select/select-tag-close-button.tsx",
    "content": "import { Show, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { IconCloseSmall } from \"../icons/IconCloseSmall\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { selectTagCloseButtonStyles } from \"./select.styles\";\n\nexport type SelectTagCloseButtonProps<C extends ElementType = \"button\"> = HTMLHopeProps<C>;\n\nconst hopeSelectTagCloseButtonClass = \"hope-select__tag-close-button\";\n\n/**\n * The close button that sit inside a `SelectTag`.\n * Used to remove an option in a multi-select.\n */\nexport function SelectTagCloseButton<C extends ElementType = \"button\">(\n  props: SelectTagCloseButtonProps<C>\n) {\n  const theme = useStyleConfig().Select;\n\n  const [local, others] = splitProps(props, [\"class\", \"children\"]);\n\n  const classes = () =>\n    classNames(local.class, hopeSelectTagCloseButtonClass, selectTagCloseButtonStyles());\n\n  return (\n    <hope.button\n      role=\"button\"\n      type=\"button\"\n      aria-label=\"Delete\"\n      tabIndex=\"-1\"\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.tagCloseButton}\n      {...others}\n    >\n      <Show when={local.children} fallback={<IconCloseSmall />}>\n        {local.children}\n      </Show>\n    </hope.button>\n  );\n}\n\nSelectTagCloseButton.toString = () => createClassSelector(hopeSelectTagCloseButtonClass);\n"
  },
  {
    "path": "packages/solid/src/components/select/select-tag.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useSelectContext } from \"./select\";\nimport { selectTagStyles, SelectTagVariants } from \"./select.styles\";\n\nexport type SelectTagProps<C extends ElementType = \"span\"> = HTMLHopeProps<C, SelectTagVariants>;\n\nconst hopeSelectTagClass = \"hope-select__tag\";\n\n/**\n * Tag representing a selected value in a multi-select.\n */\nexport function SelectTag<C extends ElementType = \"span\">(props: SelectTagProps<C>) {\n  const theme = useStyleConfig().Select;\n\n  const selectContext = useSelectContext();\n\n  const [local, others] = splitProps(props, [\"class\", \"size\", \"variant\"]);\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeSelectTagClass,\n      selectTagStyles({\n        size: local.size ?? selectContext.state.size ?? \"md\",\n        variant:\n          local.variant ?? selectContext.state.variant === \"filled\"\n            ? \"outline\"\n            : \"subtle\" ?? \"subtle\",\n      })\n    );\n  };\n\n  return <hope.span class={classes()} __baseStyle={theme?.baseStyle?.tag} {...others} />;\n}\n\nSelectTag.toString = () => createClassSelector(hopeSelectTagClass);\n"
  },
  {
    "path": "packages/solid/src/components/select/select-trigger.tsx",
    "content": "import { JSX, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { isFunction } from \"../../utils/assertion\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { chainHandlers } from \"../../utils/function\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useSelectContext } from \"./select\";\nimport { selectTriggerStyles } from \"./select.styles\";\n\nexport type SelectTriggerProps<C extends ElementType = \"button\"> = HTMLHopeProps<C>;\n\nconst hopeSelectTriggerClass = \"hope-select__trigger\";\n\n/**\n * The trigger that toggles the select.\n */\nexport function SelectTrigger<C extends ElementType = \"button\">(props: SelectTriggerProps<C>) {\n  const theme = useStyleConfig().Select;\n\n  const selectContext = useSelectContext();\n\n  const [local, others] = splitProps(props as SelectTriggerProps<\"button\">, [\n    \"ref\",\n    \"class\",\n    \"onClick\",\n    \"onKeyDown\",\n    \"onFocus\",\n    \"onBlur\",\n  ]);\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeSelectTriggerClass,\n      selectTriggerStyles({\n        variant: selectContext.state.variant,\n        size: selectContext.state.size,\n      })\n    );\n  };\n\n  const assignTriggerRef = (el: HTMLButtonElement) => {\n    selectContext.assignTriggerRef(el);\n\n    if (isFunction(local.ref)) {\n      local.ref(el);\n    } else {\n      // eslint-disable-next-line solid/reactivity\n      local.ref = el;\n    }\n  };\n\n  const onClick: JSX.EventHandlerUnion<HTMLButtonElement, MouseEvent> = event => {\n    chainHandlers(selectContext.onTriggerClick, local.onClick)(event);\n  };\n\n  const onKeyDown: JSX.EventHandlerUnion<HTMLButtonElement, KeyboardEvent> = event => {\n    chainHandlers(selectContext.onTriggerKeyDown, local.onKeyDown)(event);\n  };\n\n  const onFocus: JSX.EventHandlerUnion<HTMLButtonElement, FocusEvent> = event => {\n    chainHandlers(selectContext.formControlProps.onFocus, local.onFocus)(event);\n  };\n\n  const onBlur: JSX.EventHandlerUnion<HTMLButtonElement, FocusEvent> = event => {\n    chainHandlers(\n      selectContext.onTriggerBlur,\n      selectContext.formControlProps.onBlur,\n      local.onBlur\n    )(event);\n  };\n\n  return (\n    <hope.button\n      ref={assignTriggerRef}\n      id={selectContext.state.triggerId}\n      disabled={selectContext.state.disabled}\n      role=\"combobox\"\n      type=\"button\"\n      tabindex=\"0\"\n      aria-haspopup=\"listbox\"\n      aria-activedescendant={selectContext.state.activeDescendantId}\n      aria-controls={selectContext.state.listboxId}\n      aria-expanded={selectContext.state.opened}\n      aria-required={selectContext.formControlProps[\"aria-required\"]}\n      aria-invalid={selectContext.formControlProps[\"aria-invalid\"]}\n      aria-readonly={selectContext.formControlProps[\"aria-readonly\"]}\n      aria-describedby={selectContext.formControlProps[\"aria-describedby\"]}\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.trigger}\n      onClick={onClick}\n      onKeyDown={onKeyDown}\n      onFocus={onFocus}\n      onBlur={onBlur}\n      {...others}\n    />\n  );\n}\n\nSelectTrigger.toString = () => createClassSelector(hopeSelectTriggerClass);\n"
  },
  {
    "path": "packages/solid/src/components/select/select-value.tsx",
    "content": "import { children, For, JSX, Show, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { isChildrenFunction } from \"../../utils/solid\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useSelectContext } from \"./select\";\nimport { selectMultiValueStyles, selectSingleValueStyles } from \"./select.styles\";\nimport { SelectOptionData } from \"./select.utils\";\nimport { SelectTag } from \"./select-tag\";\nimport { SelectTagCloseButton } from \"./select-tag-close-button\";\n\ntype SelectValueChildrenRenderProp = (props: {\n  selectedOptions: SelectOptionData[];\n}) => JSX.Element;\n\ninterface SelectValueOptions {\n  children?: JSX.Element | SelectValueChildrenRenderProp;\n}\n\nexport type SelectValueProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, SelectValueOptions>;\n\nconst hopeSelectValueClass = \"hope-select__value\";\n\n/**\n * The part that reflects the selected value.\n */\nexport function SelectValue<C extends ElementType = \"div\">(props: SelectValueProps<C>) {\n  const theme = useStyleConfig().Select;\n\n  const selectContext = useSelectContext();\n\n  const [local, others] = splitProps(props as SelectValueProps<\"div\">, [\"class\", \"children\"]);\n\n  const singleValueClasses = () =>\n    classNames(local.class, hopeSelectValueClass, selectSingleValueStyles());\n\n  const multiValueClasses = () => {\n    return classNames(\n      local.class,\n      hopeSelectValueClass,\n      selectMultiValueStyles({ size: selectContext.state.size })\n    );\n  };\n\n  const onTagCloseButtonClick = (event: MouseEvent, option: SelectOptionData) => {\n    event.preventDefault();\n    event.stopPropagation();\n\n    selectContext.unselectOption(option);\n  };\n\n  const resolvedChildren = children(() => {\n    if (isChildrenFunction(local)) {\n      return (local.children as SelectValueChildrenRenderProp)?.({\n        selectedOptions: selectContext.state.selectedOptions,\n      });\n    }\n\n    return local.children as JSX.Element;\n  });\n\n  return (\n    <Show when={selectContext.state.hasSelectedOptions}>\n      <Show when={!resolvedChildren()} fallback={resolvedChildren()}>\n        <Show\n          when={selectContext.state.multiple}\n          fallback={\n            <Box\n              class={singleValueClasses()}\n              __baseStyle={theme?.baseStyle?.singleValue}\n              {...others}\n            >\n              {selectContext.state.selectedOptions[0].textValue}\n            </Box>\n          }\n        >\n          <Box class={multiValueClasses()} __baseStyle={theme?.baseStyle?.multiValue} {...others}>\n            <For each={selectContext.state.selectedOptions}>\n              {option => (\n                <SelectTag>\n                  <span>{option.textValue}</span>\n                  <SelectTagCloseButton\n                    onClick={(e: MouseEvent) => onTagCloseButtonClick(e, option)}\n                  />\n                </SelectTag>\n              )}\n            </For>\n          </Box>\n        </Show>\n      </Show>\n    </Show>\n  );\n}\n\nSelectValue.toString = () => createClassSelector(hopeSelectValueClass);\n"
  },
  {
    "path": "packages/solid/src/components/select/select.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css, globalCss } from \"../../styled-system/stitches.config\";\nimport { baseInputResetStyles } from \"../input/input.styles\";\n\n/* -------------------------------------------------------------------------------------------------\n * Select - solid-transition-group classes\n * -----------------------------------------------------------------------------------------------*/\n\nexport const selectTransitionName = {\n  fadeInTop: \"hope-select-fade-in-top-transition\",\n};\n\nexport const selectTransitionStyles = globalCss({\n  /* fade-in-top */\n  [`.${selectTransitionName.fadeInTop}-enter, .${selectTransitionName.fadeInTop}-exit-to`]: {\n    opacity: 0,\n    transform: \"translateY(-16px)\",\n  },\n  [`.${selectTransitionName.fadeInTop}-enter-to, .${selectTransitionName.fadeInTop}-exit`]: {\n    opacity: 1,\n    transform: \"translateY(0)\",\n  },\n  [`.${selectTransitionName.fadeInTop}-enter-active`]: {\n    transitionProperty: \"opacity, transform\",\n    transitionDuration: \"200ms\",\n    transitionTimingFunction: \"ease-out\",\n  },\n  [`.${selectTransitionName.fadeInTop}-exit-active`]: {\n    transitionProperty: \"opacity, transform\",\n    transitionDuration: \"100ms\",\n    transitionTimingFunction: \"ease-in\",\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Select - trigger\n * -----------------------------------------------------------------------------------------------*/\n\nfunction createVariantAndSizeCompoundVariants(\n  variant: string,\n  paddingStart?: string | number,\n  paddingEnd?: string | number\n) {\n  return Object.entries({\n    xs: {\n      start: paddingStart ?? \"$2\",\n      end: paddingEnd ?? \"$1\",\n    },\n    sm: {\n      start: paddingStart ?? \"$2_5\",\n      end: paddingEnd ?? \"$1_5\",\n    },\n    md: {\n      start: paddingStart ?? \"$3\",\n      end: paddingEnd ?? \"$2\",\n    },\n    lg: {\n      start: paddingStart ?? \"$4\",\n      end: paddingEnd ?? \"$3\",\n    },\n  }).map(([key, value]) => ({\n    variant: variant,\n    size: key,\n    css: {\n      paddingInlineStart: value.start,\n      paddingInlineEnd: value.end,\n    },\n  }));\n}\n\nexport const selectTriggerStyles = css(baseInputResetStyles, {\n  appearance: \"none\",\n\n  display: \"inline-flex\",\n  alignItems: \"center\",\n\n  outline: \"none\",\n\n  cursor: \"pointer\",\n\n  \"&:focus\": {\n    outline: \"none\",\n  },\n\n  compoundVariants: [\n    ...createVariantAndSizeCompoundVariants(\"outline\"),\n    ...createVariantAndSizeCompoundVariants(\"filled\"),\n    ...createVariantAndSizeCompoundVariants(\"unstyled\", 0, 0),\n  ],\n});\n\nexport type SelectTriggerVariants = VariantProps<typeof selectTriggerStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * Select - trigger - single value\n * -----------------------------------------------------------------------------------------------*/\n\nexport const selectSingleValueStyles = css({\n  flexGrow: 1,\n  flexShrink: 1,\n\n  textAlign: \"start\",\n  overflow: \"hidden\",\n  textOverflow: \"ellipsis\",\n  whiteSpace: \"nowrap\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Select - trigger - multi value\n * -----------------------------------------------------------------------------------------------*/\n\nexport const selectMultiValueStyles = css({\n  display: \"inline-flex\",\n  alignItems: \"center\",\n  justifyContent: \"flex-start\",\n  flexWrap: \"wrap\",\n  flexGrow: 1,\n  flexShrink: 1,\n\n  variants: {\n    size: {\n      xs: {\n        gap: \"$0_5\",\n        py: \"$0_5\",\n      },\n      sm: {\n        gap: \"$1\",\n        py: \"$1\",\n      },\n      md: {\n        gap: \"$1_5\",\n        py: \"$1_5\",\n      },\n      lg: {\n        gap: \"$2\",\n        py: \"$2\",\n      },\n    },\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Select - trigger - tag\n * -----------------------------------------------------------------------------------------------*/\n\nexport const selectTagStyles = css({\n  display: \"inline-flex\",\n  justifyContent: \"center\",\n  alignItems: \"center\",\n  gap: \"$0_5\",\n\n  borderRadius: \"$sm\",\n\n  py: 0,\n  pl: \"$2\",\n\n  lineHeight: \"$none\",\n\n  variants: {\n    variant: {\n      subtle: {\n        backgroundColor: \"$neutral4\",\n        color: \"$neutral12\",\n      },\n      outline: {\n        border: \"1px solid $colors$neutral7\",\n        backgroundColor: \"$loContrast\",\n        color: \"$neutral12\",\n      },\n    },\n    size: {\n      xs: {\n        height: \"$4\",\n        fontSize: \"$2xs\",\n      },\n      sm: {\n        height: \"$5\",\n        fontSize: \"$xs\",\n      },\n      md: {\n        height: \"$6\",\n        fontSize: \"$sm\",\n      },\n      lg: {\n        height: \"$7\",\n        fontSize: \"$base\",\n      },\n    },\n  },\n});\n\nexport type SelectTagVariants = VariantProps<typeof selectTagStyles>;\n\nexport const selectTagCloseButtonStyles = css({\n  appearance: \"none\",\n\n  display: \"inline-flex\",\n  justifyContent: \"center\",\n  alignItems: \"center\",\n\n  height: \"100%\",\n\n  outline: \"none\",\n  borderRightRadius: \"$sm\",\n\n  backgroundColor: \"transparent\",\n\n  px: \"$1\",\n\n  color: \"inherit\",\n  lineHeight: \"$none\",\n  textDecoration: \"none\",\n\n  cursor: \"pointer\",\n  userSelect: \"none\",\n  transition: \"color 250ms, background-color 250ms, box-shadow 250ms\",\n\n  \"&:hover\": {\n    backgroundColor: \"$neutral7\",\n  },\n\n  \"&:focus\": {\n    outline: \"none\",\n    boxShadow: \"$outline\",\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Select - trigger - placeholder\n * -----------------------------------------------------------------------------------------------*/\n\nexport const selectPlaceholderStyles = css(selectSingleValueStyles, {\n  color: \"$neutral9\",\n  opacity: 1,\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Select - trigger - dropdown icon\n * -----------------------------------------------------------------------------------------------*/\n\nexport const selectIconStyles = css({\n  flexGrow: 0,\n  flexShrink: 0,\n\n  marginInlineStart: \"auto\",\n\n  color: \"$neutral11\",\n  fontSize: \"1.25em\",\n  pointerEvents: \"none\",\n\n  transition: \"transform 250ms\",\n  transformOrigin: \"center\",\n\n  variants: {\n    opened: {\n      true: {\n        transform: \"rotate(-180deg)\",\n      },\n    },\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Select - content (the floating panel)\n * -----------------------------------------------------------------------------------------------*/\n\nexport const selectContentStyles = css({\n  zIndex: \"$dropdown\",\n  position: \"absolute\",\n  left: 0,\n  top: \"100%\",\n\n  display: \"flex\",\n  flexDirection: \"column\",\n  width: \"100%\",\n  overflow: \"hidden\",\n\n  margin: 0,\n\n  boxShadow: \"$md\",\n  border: \"1px solid $colors$neutral7\",\n  borderRadius: \"$sm\",\n  backgroundColor: \"$loContrast\",\n\n  padding: 0,\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Select - listbox\n * -----------------------------------------------------------------------------------------------*/\n\nexport const selectListboxStyles = css({\n  position: \"relative\",\n  display: \"flex\",\n  flexDirection: \"column\",\n  maxHeight: \"$60\",\n  width: \"100%\",\n  overflowY: \"auto\",\n\n  margin: 0,\n  padding: \"$1\", //0,\n\n  listStyle: \"none\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Select - optgroup\n * -----------------------------------------------------------------------------------------------*/\n\nexport const selectOptGroupStyles = css({});\n\n/* -------------------------------------------------------------------------------------------------\n * Select - label\n * -----------------------------------------------------------------------------------------------*/\n\nexport const selectLabelStyles = css({\n  display: \"flex\",\n  alignItems: \"center\",\n\n  py: \"$2\",\n  px: \"$3\",\n\n  color: \"$neutral11\",\n  fontSize: \"$xs\",\n  lineHeight: \"$4\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Select - option\n * -----------------------------------------------------------------------------------------------*/\n\nexport const selectOptionStyles = css({\n  position: \"relative\",\n\n  display: \"flex\",\n  alignItems: \"center\",\n\n  borderRadius: \"$sm\",\n\n  color: \"$neutral12\",\n  fontSize: \"$base\",\n  fontWeight: \"$normal\",\n  lineHeight: \"$6\",\n\n  cursor: \"pointer\",\n  userSelect: \"none\",\n\n  \"&[data-disabled]\": {\n    color: \"$neutral8\",\n    cursor: \"not-allowed\",\n  },\n\n  [`&[data-active]`]: {\n    backgroundColor: \"$neutral4\",\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Select - option text\n * -----------------------------------------------------------------------------------------------*/\n\nexport const selectOptionTextStyles = css({\n  display: \"inline-flex\",\n  alignItems: \"center\",\n\n  py: \"$2\",\n  paddingInlineStart: \"$3\",\n  paddingInlineEnd: \"$6\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Select - option indicator\n * -----------------------------------------------------------------------------------------------*/\n\nexport const selectOptionIndicatorStyles = css({\n  position: \"absolute\",\n  top: 0,\n  bottom: 0,\n  right: 0,\n\n  display: \"flex\",\n  alignItems: \"center\",\n\n  paddingInlineEnd: \"$3\",\n\n  color: \"$primary10\",\n  pointerEvents: \"none\",\n});\n"
  },
  {
    "path": "packages/solid/src/components/select/select.tsx",
    "content": "import { autoUpdate, computePosition, flip, offset, shift, size } from \"@floating-ui/dom\";\nimport {\n  createContext,\n  createEffect,\n  createSignal,\n  createUniqueId,\n  JSX,\n  on,\n  useContext,\n} from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { SystemStyleObject } from \"../../styled-system\";\nimport { isArray } from \"../../utils/assertion\";\nimport {\n  contains,\n  getRelatedTarget,\n  isScrollable,\n  maintainScrollVisibility,\n} from \"../../utils/dom\";\nimport { useFormControl, UseFormControlReturn } from \"../form-control/use-form-control\";\nimport { SelectTriggerVariants } from \"./select.styles\";\nimport {\n  getActionFromKey,\n  getIndexByLetter,\n  getUpdatedIndex,\n  isOptionEqual,\n  SelectActions,\n  SelectOptionData,\n} from \"./select.utils\";\n\ntype SelectMotionPreset = \"fade-in-top\" | \"none\";\n\ntype Value = any | any[];\n\ninterface ThemeableSelectOptions extends SelectTriggerVariants {\n  /**\n   * Offset between the listbox and the reference (trigger) element.\n   */\n  offset?: number;\n\n  /**\n   * Select content opening/closing transition.\n   */\n  motionPreset?: SelectMotionPreset;\n}\n\nexport interface SelectProps extends ThemeableSelectOptions {\n  /**\n   * The `id` of the internal select element.\n   */\n  id?: string;\n\n  /**\n   * Children of the select.\n   */\n  children?: JSX.Element;\n\n  /**\n   * If `true`, allow multi-selection.\n   */\n  multiple?: boolean;\n\n  /**\n   * The value of the select.\n   * (in controlled mode)\n   */\n  value?: Value;\n\n  /**\n   * The value of the select when initially rendered.\n   * (in uncontrolled mode)\n   */\n  defaultValue?: Value;\n\n  /**\n   * If `true`, the select will be required.\n   */\n  required?: boolean;\n\n  /**\n   * If `true`, the select will be disabled.\n   */\n  disabled?: boolean;\n\n  /**\n   * If `true`, the select will have `aria-invalid` set to `true`.\n   */\n  invalid?: boolean;\n\n  /**\n   * If `true`, the select will be readonly.\n   */\n  readOnly?: boolean;\n\n  /**\n   * A11y: id of the element that provides additional description to the select.\n   */\n  \"aria-describedby\"?: string;\n\n  /**\n   * Callback invoked when the selected value changes.\n   * (in controlled mode)\n   */\n  onChange?: (value: Value) => void;\n\n  /**\n   * Callback invoked when the select trigger gain focus.\n   */\n  onFocus?: JSX.EventHandlerUnion<HTMLButtonElement, FocusEvent>;\n\n  /**\n   * Callback invoked when the select trigger loose focus.\n   */\n  onBlur?: JSX.EventHandlerUnion<HTMLButtonElement, FocusEvent>;\n}\n\ntype SelectState = Required<Pick<SelectProps, \"variant\" | \"size\">> &\n  Pick<SelectProps, \"multiple\" | \"value\" | \"invalid\" | \"disabled\" | \"motionPreset\"> & {\n    /**\n     * If `true`, the select has options selected.\n     */\n    hasSelectedOptions: boolean;\n\n    /**\n     * The id of the current `aria-activedescendent` element.\n     */\n    activeDescendantId?: string;\n\n    /**\n     * If `true`, the select is in controlled mode.\n     */\n    isControlled: boolean;\n\n    /**\n     * The `id` of the internal select element.\n     * Also used as a prefix for other components ids.\n     */\n    baseId: string;\n\n    /**\n     * The `id` of the `SelectTrigger`.\n     */\n    triggerId: string;\n\n    /**\n     * The `id` of the `SelectListbox`.\n     */\n    listboxId: string;\n\n    /**\n     * The prefix of the group labels (`SelectLabel`) `id`.\n     */\n    labelIdPrefix: string;\n\n    /**\n     * The prefix of the options (`SelectOption`) `id`.\n     */\n    optionIdPrefix: string;\n\n    /**\n     * The list of available option.\n     */\n    options: SelectOptionData[];\n\n    /**\n     * The list of selected option.\n     */\n    selectedOptions: SelectOptionData[];\n\n    /**\n     * If `true`, the select will be open.\n     */\n    opened: boolean;\n\n    /**\n     * Index of the active `SelectOption`.\n     */\n    activeIndex: number;\n\n    /**\n     * If `true`, prevent the blur event when clicking a `SelectOption`.\n     */\n    ignoreBlur: boolean;\n\n    /**\n     * The string to search for in the `SelectListbox`.\n     */\n    searchString: string;\n\n    /**\n     * The timeout id of the search functionnality.\n     */\n    searchTimeoutId?: number;\n  };\n\n/**\n * The wrapper component that provides context for all its children.\n */\nexport function Select(props: SelectProps) {\n  const defaultBaseId = `hope-select-${createUniqueId()}`;\n\n  const theme = useStyleConfig().Select;\n\n  const formControlProps = useFormControl<HTMLButtonElement>(props);\n\n  const [initialized, setInitialized] = createSignal(false);\n  const [_options, _setOptions] = createSignal<Array<SelectOptionData>>([]);\n\n  const [state, setState] = createStore<SelectState>({\n    get isControlled() {\n      return props.value !== undefined;\n    },\n    get value() {\n      if (this.isControlled) {\n        return props.value;\n      }\n\n      if (this.multiple) {\n        return this.selectedOptions.map((option: SelectOptionData) => option.value);\n      }\n\n      return this.selectedOptions[0].value ?? undefined;\n    },\n    get multiple() {\n      return props.multiple;\n    },\n    get baseId() {\n      return props.id ?? formControlProps.id ?? defaultBaseId;\n    },\n    get triggerId() {\n      return `${this.baseId}-trigger`;\n    },\n    get listboxId() {\n      return `${this.baseId}-listbox`;\n    },\n    get labelIdPrefix() {\n      return `${this.baseId}-label`;\n    },\n    get optionIdPrefix() {\n      return `${this.baseId}-option`;\n    },\n    get disabled() {\n      return props.disabled ?? formControlProps.disabled;\n    },\n    get invalid() {\n      return props.invalid ?? formControlProps.invalid;\n    },\n    get variant() {\n      return props.variant ?? theme?.defaultProps?.root?.variant ?? \"outline\";\n    },\n    get size() {\n      return props.size ?? theme?.defaultProps?.root?.size ?? \"md\";\n    },\n    get motionPreset() {\n      return props.motionPreset ?? theme?.defaultProps?.root?.motionPreset ?? \"fade-in-top\";\n    },\n    get activeDescendantId() {\n      return this.opened ? `${this.optionIdPrefix}-${this.activeIndex}` : undefined;\n    },\n    get hasSelectedOptions() {\n      return this.selectedOptions.length > 0;\n    },\n    get options() {\n      return _options();\n    },\n    selectedOptions: [],\n    opened: false,\n    activeIndex: 0,\n    ignoreBlur: false,\n    searchString: \"\",\n    searchTimeoutId: undefined,\n  });\n\n  // element refs\n  let triggerRef: HTMLButtonElement | undefined;\n  let contentRef: HTMLDivElement | undefined;\n  let listboxRef: HTMLDivElement | undefined;\n\n  let cleanupContentAutoUpdate: (() => void) | undefined;\n\n  const updateContentPosition = async () => {\n    if (!triggerRef || !contentRef) {\n      return;\n    }\n\n    const { x, y } = await computePosition(triggerRef, contentRef, {\n      placement: \"bottom\",\n      middleware: [\n        offset(props.offset ?? theme?.defaultProps?.root?.offset ?? 5),\n        flip(),\n        shift(),\n        size({\n          apply({ reference }) {\n            if (!contentRef) {\n              return;\n            }\n\n            Object.assign(contentRef.style, {\n              width: `${reference.width}px`,\n            });\n          },\n        }),\n      ],\n    });\n\n    if (!contentRef) {\n      return;\n    }\n\n    Object.assign(contentRef.style, {\n      left: `${Math.round(x)}px`,\n      top: `${Math.round(y)}px`,\n    });\n  };\n\n  const getSearchString = (char: string) => {\n    // reset typing timeout and start new timeout\n    // this allows us to make multiple-letter matches, like a native select\n    if (state.searchTimeoutId) {\n      window.clearTimeout(state.searchTimeoutId);\n    }\n\n    const searchTimeoutId = window.setTimeout(() => {\n      setState(\"searchString\", \"\");\n    }, 500);\n\n    setState(\"searchTimeoutId\", searchTimeoutId);\n\n    // add most recent letter to saved search string\n    setState(\"searchString\", searchString => (searchString += char));\n\n    return state.searchString;\n  };\n\n  const focusTrigger = () => {\n    triggerRef?.focus();\n  };\n\n  const getDefaultSelectedValues = () => {\n    if (state.isControlled) {\n      if (props.value == null) {\n        return [];\n      }\n\n      return isArray(props.value) ? props.value : [props.value];\n    } else {\n      if (props.defaultValue == null) {\n        return [];\n      }\n\n      return isArray(props.defaultValue) ? props.defaultValue : [props.defaultValue];\n    }\n  };\n\n  const initSelectedOptions = () => {\n    if (initialized()) {\n      return;\n    }\n\n    const selectedOptions = getDefaultSelectedValues()\n      .map(value => state.options.find(option => option.value === value))\n      .filter(Boolean);\n\n    setState(\"selectedOptions\", prev => [...prev, ...selectedOptions]);\n\n    setInitialized(true);\n  };\n\n  const onOptionChange = (index: number) => {\n    setState(\"activeIndex\", index);\n  };\n\n  const isOptionSelected = (option: SelectOptionData) => {\n    if (state.selectedOptions.length <= 0) {\n      return false;\n    }\n\n    if (state.multiple) {\n      return !!state.selectedOptions.find(selectedOption => isOptionEqual(option, selectedOption));\n    } else {\n      return isOptionEqual(option, state.selectedOptions[0]);\n    }\n  };\n\n  const removeFromSelectedOptions = (selectedOption: SelectOptionData) => {\n    setState(\"selectedOptions\", prev =>\n      prev.filter(option => !isOptionEqual(selectedOption, option))\n    );\n  };\n\n  const setSelectedOptions = (index: number) => {\n    const newSelectedOption = state.options[index];\n\n    if (state.multiple) {\n      if (isOptionSelected(newSelectedOption)) {\n        removeFromSelectedOptions(newSelectedOption);\n      } else {\n        setState(\"selectedOptions\", prev => [...prev, newSelectedOption]);\n      }\n    } else {\n      setState(\"selectedOptions\", [newSelectedOption]);\n    }\n  };\n\n  const getSelectedValue = () => {\n    if (state.multiple) {\n      return state.selectedOptions.map(item => item.value);\n    } else {\n      return state.selectedOptions[0].value ?? undefined;\n    }\n  };\n\n  const selectOption = (index: number) => {\n    onOptionChange(index);\n\n    setSelectedOptions(index);\n\n    props.onChange?.(getSelectedValue());\n  };\n\n  const unselectOption = (selectedOption: SelectOptionData) => {\n    removeFromSelectedOptions(selectedOption);\n\n    props.onChange?.(getSelectedValue());\n\n    focusTrigger();\n  };\n\n  const isOptionDisabledCallback = (index: number) => {\n    return state.options[index].disabled;\n  };\n\n  const onTriggerBlur = (event: FocusEvent) => {\n    // if the blur was provoked by an element inside the trigger, ignore it\n    if (contains(triggerRef, getRelatedTarget(event))) {\n      return;\n    }\n\n    // do not do blur action if ignoreBlur flag has been set\n    if (state.ignoreBlur) {\n      setState(\"ignoreBlur\", false);\n      return;\n    }\n\n    if (state.opened) {\n      updateOpeningState(false, false);\n    }\n  };\n\n  const onTriggerClick = () => {\n    if (formControlProps.readOnly) {\n      return;\n    }\n\n    updateOpeningState(!state.opened, false);\n  };\n\n  const onTriggerKeyDown = (event: KeyboardEvent) => {\n    if (formControlProps.readOnly) {\n      return;\n    }\n\n    const { key } = event;\n\n    // In multi-select, backspace unselect the last option\n    if (state.hasSelectedOptions && state.multiple && key === \"Backspace\") {\n      unselectOption(state.selectedOptions[state.selectedOptions.length - 1]);\n      return;\n    }\n\n    const max = state.options.length - 1;\n    const action = getActionFromKey(event, state.opened);\n\n    switch (action) {\n      case SelectActions.Last:\n      case SelectActions.First:\n        updateOpeningState(true);\n      // intentional fallthrough\n      case SelectActions.Next:\n      case SelectActions.Previous:\n        event.preventDefault();\n        return onOptionChange(\n          getUpdatedIndex({\n            currentIndex: state.activeIndex,\n            maxIndex: max,\n            initialAction: action,\n            isOptionDisabled: isOptionDisabledCallback,\n          })\n        );\n\n      case SelectActions.SelectAndClose:\n        event.preventDefault();\n        selectOption(state.activeIndex);\n        return state.multiple ? undefined : updateOpeningState(false); // don't close in multi-select.\n\n      case SelectActions.Close:\n        event.preventDefault();\n        return updateOpeningState(false);\n\n      case SelectActions.Type:\n        return onTriggerType(key);\n\n      case SelectActions.Open:\n        event.preventDefault();\n        return updateOpeningState(true);\n    }\n  };\n\n  const onTriggerType = (letter: string) => {\n    if (formControlProps.readOnly) {\n      return;\n    }\n\n    // open the listbox if it is closed\n    updateOpeningState(true);\n\n    // find the index of the first matching option\n    const searchString = getSearchString(letter);\n    const searchIndex = getIndexByLetter(\n      state.options as SelectOptionData[],\n      searchString,\n      state.activeIndex + 1\n    );\n\n    // if a match was found, go to it\n    if (searchIndex >= 0) {\n      onOptionChange(searchIndex);\n    }\n\n    // if no matches, clear the timeout and search string\n    else {\n      window.clearTimeout(state.searchTimeoutId);\n      setState(\"searchString\", \"\");\n    }\n  };\n\n  const onOptionClick = (index: number) => {\n    // if option is disabled ensure to bring back focus to the `SelectTrigger` in order to keep keyboard navigation working.\n    if (state.options[index].disabled) {\n      focusTrigger();\n      return;\n    }\n\n    selectOption(index);\n\n    if (state.multiple) {\n      // don't close on multi-select and ensure to bring back focus to the `SelectTrigger` in order to keep keyboard navigation working.\n      focusTrigger();\n    } else {\n      updateOpeningState(false);\n    }\n  };\n\n  const onOptionMouseMove = (index: number) => {\n    // if index is already the active one, do nothing\n    if (state.activeIndex === index) {\n      return;\n    }\n\n    onOptionChange(index);\n  };\n\n  const onOptionMouseDown = () => {\n    // Clicking an option will cause a blur event,\n    // but we don't want to perform the default keyboard blur action\n    setState(\"ignoreBlur\", true);\n  };\n\n  const setDefaultActiveOption = () => {\n    // focus on first selected option or the first one.\n    if (state.selectedOptions.length > 0) {\n      setState(\n        \"activeIndex\",\n        state.options.findIndex(option => isOptionSelected(option))\n      );\n    } else {\n      setState(\"activeIndex\", 0);\n    }\n  };\n\n  const scheduleContentPositionAutoUpdate = () => {\n    if (state.opened) {\n      updateContentPosition();\n\n      // schedule auto update of the content position.\n      if (triggerRef && contentRef) {\n        cleanupContentAutoUpdate = autoUpdate(triggerRef, contentRef, updateContentPosition);\n      }\n    } else {\n      cleanupContentAutoUpdate?.();\n    }\n  };\n\n  const updateOpeningState = (opened: boolean, callFocus = true) => {\n    if (state.opened === opened) {\n      return;\n    }\n\n    setState(\"opened\", opened);\n\n    setDefaultActiveOption();\n\n    scheduleContentPositionAutoUpdate();\n\n    // move focus back to the button, if needed.\n    callFocus && focusTrigger();\n  };\n\n  const onListboxMouseLeave = () => {\n    onOptionChange(-1);\n  };\n\n  const onContentClickOutside = (target: HTMLElement) => {\n    // clicking inside the trigger is not considered an \"outside click\"\n    if (contains(triggerRef, target)) {\n      return;\n    }\n\n    updateOpeningState(false, false);\n  };\n\n  const isOptionActiveDescendant = (index: number) => {\n    return index === state.activeIndex;\n  };\n\n  const assignTriggerRef = (el: HTMLButtonElement) => {\n    triggerRef = el;\n  };\n\n  const assignContentRef = (el: HTMLDivElement) => {\n    contentRef = el;\n  };\n\n  const assignListboxRef = (el: HTMLDivElement) => {\n    listboxRef = el;\n  };\n\n  const scrollToOption = (optionRef: HTMLElement) => {\n    if (!listboxRef) {\n      return;\n    }\n\n    // ensure the new option is in view\n    if (isScrollable(listboxRef)) {\n      maintainScrollVisibility(optionRef, listboxRef);\n    }\n  };\n\n  const registerOption = (optionData: SelectOptionData) => {\n    const index = state.options.findIndex(option => isOptionEqual(option, optionData));\n\n    // do not register the same option twice\n    if (index != -1) {\n      return index;\n    }\n\n    // In Solid ^1.4.0 state.options is not up to date after setState call\n\n    // setState(\"options\", prev => [...prev, optionData]);\n    // return state.options.length - 1;\n\n    const updatedOptions = _setOptions(prev => [...prev, optionData]);\n\n    return updatedOptions.length - 1;\n  };\n\n  createEffect(\n    on(\n      () => state.options,\n      () => initSelectedOptions(),\n      { defer: true }\n    )\n  );\n\n  createEffect(\n    on(\n      () => props.value,\n      () => {\n        if (!state.isControlled) {\n          return;\n        }\n\n        const controlledValues = isArray(props.value) ? props.value : [props.value];\n\n        const selectedOptions = controlledValues\n          .map(value => state.options.find(option => option.value === value))\n          .filter(Boolean);\n\n        setState(\"selectedOptions\", selectedOptions);\n      },\n      { defer: true }\n    )\n  );\n\n  createEffect(\n    on(\n      () => state.opened,\n      newValue => {\n        if (!newValue) {\n          return;\n        }\n\n        // Use a micro task so the listbox is visible when trying to scroll to selected option.\n        setTimeout(() => {\n          const firstSelectedOption = listboxRef?.querySelector(\n            \"[role='option'][aria-selected='true']\"\n          ) as HTMLDivElement;\n\n          if (firstSelectedOption) {\n            scrollToOption(firstSelectedOption);\n          }\n        }, 0);\n      }\n    )\n  );\n\n  const context: SelectContextValue = {\n    state: state as SelectState,\n    isOptionSelected,\n    unselectOption,\n    isOptionActiveDescendant,\n    formControlProps,\n    assignTriggerRef,\n    assignContentRef,\n    assignListboxRef,\n    registerOption,\n    scrollToOption,\n    onContentClickOutside,\n    onTriggerBlur,\n    onTriggerClick,\n    onTriggerKeyDown,\n    onOptionClick,\n    onOptionMouseMove,\n    onOptionMouseDown,\n    onListboxMouseLeave,\n  };\n\n  return <SelectContext.Provider value={context}>{props.children}</SelectContext.Provider>;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SelectContextValue {\n  state: SelectState;\n\n  /**\n   * Props that should be spread on the select trigger to support embedding in `FormControl`.\n   */\n  formControlProps: UseFormControlReturn<HTMLButtonElement>;\n\n  /**\n   * Check if the option is a selected one.\n   */\n  isOptionSelected: (option: SelectOptionData) => boolean;\n\n  /**\n   * Check if the option is the current active-descendant by comparing its index with the active index.\n   */\n  isOptionActiveDescendant: (index: number) => boolean;\n\n  /**\n   * Callback to assign the `SelectTrigger` ref.\n   */\n  assignTriggerRef: (el: HTMLButtonElement) => void;\n\n  /**\n   * Callback to assign the `SelectContent` ref.\n   */\n  assignContentRef: (el: HTMLDivElement) => void;\n\n  /**\n   * Callback to assign the `SelectListbox` ref.\n   */\n  assignListboxRef: (el: HTMLDivElement) => void;\n\n  /**\n   * Scroll to the active option.\n   */\n  scrollToOption: (optionRef: HTMLElement) => void;\n\n  /**\n   * Register a `SelectOption` to the context.\n   * @return The index of the option.\n   */\n  registerOption: (optionData: SelectOptionData) => number;\n\n  /**\n   * Callback to remove an option from the selected options.\n   */\n  unselectOption: (optionData: SelectOptionData) => void;\n\n  /**\n   * Callback invoked when the user click outside the `SelectContent`.\n   */\n  onContentClickOutside: (target: HTMLElement) => void;\n\n  /**\n   * Callback invoked when the `SelectTrigger` loose focus.\n   */\n  onTriggerBlur: (event: FocusEvent) => void;\n\n  /**\n   * Callback invoked when the user click on the `SelectTrigger`.\n   */\n  onTriggerClick: (event: MouseEvent) => void;\n\n  /**\n   * Callback invoked when the user trigger the `SelectTrigger` with keyboard.\n   */\n  onTriggerKeyDown: (event: KeyboardEvent) => void;\n\n  /**\n   * Callback invoked when the user click on a `SelectOption`.\n   */\n  onOptionClick: (index: number) => void;\n\n  /**\n   * Callback invoked when the user cursor move on a `SelectOption`.\n   */\n  onOptionMouseMove: (index: number) => void;\n\n  /**\n   * Callback invoked when the user click on a `SelectOption`.\n   */\n  onOptionMouseDown: () => void;\n\n  /**\n   * Callback invoked when the user cursor leave the `SelectListbox`.\n   */\n  onListboxMouseLeave: () => void;\n}\n\nconst SelectContext = createContext<SelectContextValue>();\n\nexport function useSelectContext() {\n  const context = useContext(SelectContext);\n\n  if (!context) {\n    throw new Error(\"[Hope UI]: useSelectContext must be used within a `<Select />` component\");\n  }\n\n  return context;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * StyleConfig\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface SelectStyleConfig {\n  baseStyle?: {\n    trigger?: SystemStyleObject;\n    placeholder?: SystemStyleObject;\n    singleValue?: SystemStyleObject;\n    multiValue?: SystemStyleObject;\n    tag?: SystemStyleObject;\n    tagCloseButton?: SystemStyleObject;\n    icon?: SystemStyleObject;\n    content?: SystemStyleObject;\n    listbox?: SystemStyleObject;\n    optgroup?: SystemStyleObject;\n    label?: SystemStyleObject;\n    option?: SystemStyleObject;\n    optionText?: SystemStyleObject;\n    optionIndicator?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: ThemeableSelectOptions;\n  };\n}\n"
  },
  {
    "path": "packages/solid/src/components/select/select.utils.ts",
    "content": "export interface SelectOptionData {\n  /**\n   * The value to use when the option is selected.\n   */\n  value: string | number;\n\n  /**\n   * Optional text used for typeahead purposes.\n   * By default the typeahead behavior will use the `.textContent` of the `SelectOption`.\n   * Use this when the content is complex, or you have non-textual content inside.\n   */\n  textValue: string;\n\n  /**\n   * If `true`, the option will be disabled.\n   */\n  disabled: boolean;\n}\n\ninterface GetUpdatedIndexParams {\n  /**\n   * The current active index.\n   */\n  currentIndex: number;\n\n  /**\n   * The index of the last option.\n   */\n  maxIndex: number;\n\n  /**\n   * The initialy performed action.\n   */\n  initialAction: SelectActions;\n\n  /**\n   * Callback invoked to check if an option at a given index is diabled or not.\n   */\n  isOptionDisabled: (index: number) => boolean;\n}\n\n/**\n * List of named combobox actions\n */\nexport enum SelectActions {\n  Close,\n  SelectAndClose,\n  First,\n  Last,\n  Next,\n  Open,\n  Previous,\n  Select,\n  Type,\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Helper functions\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Filter an array of options against an input string.\n * @return an array of options that begin with the filter string, case-independent.\n */\nfunction filterOptions(options: SelectOptionData[] = [], filter: string, exclude: string[] = []) {\n  return options.filter(option => {\n    if (option.disabled) {\n      return false;\n    }\n\n    const matches = option.textValue.toLowerCase().indexOf(filter.toLowerCase()) === 0;\n    return matches && exclude.indexOf(option.textValue) < 0;\n  });\n}\n\n/**\n * Return the index of an option from an array of options, based on a search string\n * if the filter is multiple iterations of the same letter (e.g \"aaa\"), then cycle through first-letter matches\n */\nexport function getIndexByLetter(options: SelectOptionData[], filter: string, startIndex = 0) {\n  const orderedOptions = [...options.slice(startIndex), ...options.slice(0, startIndex)];\n  const firstMatch = filterOptions(orderedOptions, filter)[0];\n  const allSameLetter = (array: string[]) => array.every(letter => letter === array[0]);\n\n  // first check if there is an exact match for the typed string\n  if (firstMatch) {\n    return options.indexOf(firstMatch);\n  }\n\n  // if the same letter is being repeated, cycle through first-letter matches\n  else if (allSameLetter(filter.split(\"\"))) {\n    const matches = filterOptions(orderedOptions, filter[0]);\n    return options.indexOf(matches[0]);\n  }\n\n  // if no matches, return -1\n  else {\n    return -1;\n  }\n}\n\n/**\n * Map a key press to an action.\n */\nexport function getActionFromKey(event: KeyboardEvent, menuOpen: boolean) {\n  const { key, altKey, ctrlKey, metaKey } = event;\n  const openKeys = [\"ArrowDown\", \"ArrowUp\", \"Enter\", \" \"]; // all keys that will do the default open action\n\n  // handle opening when closed\n  if (!menuOpen && openKeys.includes(key)) {\n    return SelectActions.Open;\n  }\n\n  // home and end move the selected option when open or closed\n  if (key === \"Home\" || key === \"PageUp\") {\n    return SelectActions.First;\n  }\n  if (key === \"End\" || key === \"PageDown\") {\n    return SelectActions.Last;\n  }\n\n  // handle typing characters when open or closed\n  if (\n    key === \"Backspace\" ||\n    key === \"Clear\" ||\n    (key.length === 1 && key !== \" \" && !altKey && !ctrlKey && !metaKey)\n  ) {\n    return SelectActions.Type;\n  }\n\n  // handle keys when open\n  if (menuOpen) {\n    if (key === \"ArrowUp\" && altKey) {\n      return SelectActions.SelectAndClose;\n    } else if (key === \"ArrowDown\" && !altKey) {\n      return SelectActions.Next;\n    } else if (key === \"ArrowUp\") {\n      return SelectActions.Previous;\n    } else if (key === \"Escape\") {\n      return SelectActions.Close;\n    } else if (key === \"Enter\" || key === \" \") {\n      return SelectActions.SelectAndClose;\n    }\n  }\n}\n\n/**\n * Get an updated option index after performing an action\n */\nfunction calculateActiveIndex(currentIndex: number, maxIndex: number, action: SelectActions) {\n  switch (action) {\n    case SelectActions.First:\n      return 0;\n    case SelectActions.Last:\n      return maxIndex;\n    case SelectActions.Previous:\n      return Math.max(0, currentIndex - 1);\n    case SelectActions.Next:\n      return Math.min(maxIndex, currentIndex + 1);\n    default:\n      return currentIndex;\n  }\n}\n\n/**\n * Get an updated option index after performing an action, ignoring \"disabled\" option.\n */\nexport function getUpdatedIndex(params: GetUpdatedIndexParams) {\n  const { currentIndex, maxIndex, initialAction, isOptionDisabled } = params;\n\n  let nextIndex = calculateActiveIndex(currentIndex, maxIndex, initialAction);\n\n  while (isOptionDisabled(nextIndex)) {\n    let nextAction = initialAction;\n    const isNextIndexFirst = nextIndex === 0;\n    const isNextIndexLast = nextIndex === maxIndex;\n\n    // If first option is disabled move down until find an enabled option.\n    if (initialAction === SelectActions.First) {\n      nextAction = SelectActions.Next;\n    }\n\n    // If last option is disabled move up until find an enabled option.\n    if (initialAction === SelectActions.Last) {\n      nextAction = SelectActions.Previous;\n    }\n\n    // If all previous options are disabled, don't move.\n    if (initialAction === SelectActions.Previous && isNextIndexFirst) {\n      nextIndex = currentIndex;\n      break;\n    }\n\n    // If all next options are disabled, don't move.\n    if (initialAction === SelectActions.Next && isNextIndexLast) {\n      nextIndex = currentIndex;\n      break;\n    }\n\n    nextIndex = calculateActiveIndex(nextIndex, maxIndex, nextAction);\n  }\n\n  return nextIndex;\n}\n\n/**\n * Check if two options are equal.\n */\nexport function isOptionEqual(a: SelectOptionData, b: SelectOptionData): boolean {\n  return String(a.value) === String(b.value);\n}\n"
  },
  {
    "path": "packages/solid/src/components/simple-select/index.ts",
    "content": "export * from \"./simple-option\";\nexport * from \"./simple-select\";\n"
  },
  {
    "path": "packages/solid/src/components/simple-select/simple-option.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport {\n  SelectOption,\n  SelectOptionIndicator,\n  SelectOptionProps,\n  SelectOptionText,\n} from \"../select\";\nimport { ElementType } from \"../types\";\n\n/**\n * A simple abstraction built on top of `SelectOption`.\n * Use this if you don't need to customize every parts of `SelectOption` and want a simpler API.\n */\nexport function SimpleOption<C extends ElementType = \"div\">(props: SelectOptionProps<C>) {\n  const [local, others] = splitProps(props, [\"children\", \"value\"]);\n\n  return (\n    <SelectOption value={local.value} {...others}>\n      <SelectOptionText>{local.children}</SelectOptionText>\n      <SelectOptionIndicator />\n    </SelectOption>\n  );\n}\n"
  },
  {
    "path": "packages/solid/src/components/simple-select/simple-select.tsx",
    "content": "import { Show, splitProps } from \"solid-js\";\n\nimport {\n  Select,\n  SelectContent,\n  SelectIcon,\n  SelectListbox,\n  SelectPlaceholder,\n  SelectProps,\n  SelectTrigger,\n  SelectValue,\n} from \"../select\";\nimport { HTMLHopeProps } from \"../types\";\n\ninterface SimpleSelectOptions extends SelectProps {\n  /**\n   * The placeholder to display when no option is selected.\n   */\n  placeholder?: string;\n}\n\nexport type SimpleSelectProps = HTMLHopeProps<\"button\", SimpleSelectOptions>;\n\n/**\n * A simple abstraction built on top of `Select`.\n * Use this if you don't need to customize every parts of `Select` and want a simpler API.\n */\nexport function SimpleSelect(props: SimpleSelectProps) {\n  const [local, selectProps, others] = splitProps(\n    props,\n    [\"children\", \"placeholder\"],\n    [\n      \"variant\",\n      \"size\",\n      \"offset\",\n      \"id\",\n      \"multiple\",\n      \"value\",\n      \"defaultValue\",\n      \"required\",\n      \"disabled\",\n      \"invalid\",\n      \"readOnly\",\n      \"onChange\",\n      \"onFocus\",\n      \"onBlur\",\n    ]\n  );\n\n  return (\n    <Select {...selectProps}>\n      <SelectTrigger {...others}>\n        <Show when={local.placeholder}>\n          <SelectPlaceholder>{local.placeholder}</SelectPlaceholder>\n        </Show>\n        <SelectValue />\n        <SelectIcon />\n      </SelectTrigger>\n      <SelectContent>\n        <SelectListbox>{local.children}</SelectListbox>\n      </SelectContent>\n    </Select>\n  );\n}\n"
  },
  {
    "path": "packages/solid/src/components/skeleton/index.ts",
    "content": "export * from \"./skeleton\";\nexport * from \"./skeleton.styles\";\nexport * from \"./skeleton-circle\";\nexport * from \"./skeleton-text\";\n"
  },
  {
    "path": "packages/solid/src/components/skeleton/skeleton-circle.tsx",
    "content": "import { SizeProps } from \"../../styled-system/props/size\";\nimport { createClassSelector } from \"../../utils/css\";\nimport { OverrideProps } from \"../../utils/types\";\nimport { ElementType } from \"../types\";\nimport { hopeSkeletonClass, Skeleton, SkeletonProps } from \"./skeleton\";\n\ninterface SkeletonCircleOptions {\n  /**\n   * The size of the circle.\n   */\n  size?: SizeProps[\"boxSize\"];\n}\n\nexport type SkeletonCircleProps<C extends ElementType = \"div\"> = OverrideProps<\n  SkeletonProps<C>,\n  SkeletonCircleOptions\n>;\n\nexport function SkeletonCircle<C extends ElementType = \"div\">(props: SkeletonCircleProps<C>) {\n  return <Skeleton borderRadius=\"$full\" boxSize={props.size ?? \"2rem\"} {...props} />;\n}\n\nSkeletonCircle.toString = () => createClassSelector(hopeSkeletonClass);\n"
  },
  {
    "path": "packages/solid/src/components/skeleton/skeleton-text.tsx",
    "content": "import { createMemo, Index, mergeProps, Show, splitProps } from \"solid-js\";\n\nimport { GridLayoutProps } from \"../../styled-system/props/grid\";\nimport { SizeProps } from \"../../styled-system/props/size\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { range } from \"../../utils/function\";\nimport { OverrideProps } from \"../../utils/types\";\nimport { Box } from \"../box/box\";\nimport { ElementType } from \"../types\";\nimport { hopeSkeletonClass, Skeleton, SkeletonProps } from \"./skeleton\";\n\ninterface SkeletonTextOptions {\n  /**\n   * The number of skeleton text lines.\n   */\n  noOfLines?: number;\n\n  /**\n   * The space between each skeleton text line.\n   */\n  spacing?: GridLayoutProps[\"gap\"];\n\n  /**\n   * The height of each skeleton text line.\n   */\n  skeletonHeight?: SizeProps[\"height\"];\n}\n\nexport type SkeletonTextProps<C extends ElementType = \"div\"> = OverrideProps<\n  SkeletonProps<C>,\n  SkeletonTextOptions\n>;\n\nexport function SkeletonText<C extends ElementType = \"div\">(props: SkeletonTextProps<C>) {\n  const defaultProps: SkeletonTextProps<\"div\"> = {\n    noOfLines: 3,\n    spacing: \"0.5rem\",\n    skeletonHeight: \"0.5rem\",\n  };\n\n  const propsWithDefault: SkeletonTextProps<\"div\"> = mergeProps(defaultProps, props);\n  const [local, skeletonProps, others] = splitProps(\n    propsWithDefault,\n    [\"class\", \"children\", \"noOfLines\", \"spacing\", \"skeletonHeight\"],\n    [\"startColor\", \"endColor\", \"loaded\", \"speed\", \"fadeDuration\", \"borderRadius\", \"rounded\"]\n  );\n\n  const noOfLines = () => local.noOfLines ?? 3;\n\n  const numbers = createMemo(() => range(noOfLines()));\n\n  const getWidth = (index: number) => {\n    if (noOfLines() > 1) {\n      return index === numbers().length - 1 ? \"80%\" : \"100%\";\n    }\n\n    return \"100%\";\n  };\n\n  const classes = () => {\n    return classNames(local.class, \"hope-skeleton__group\");\n  };\n\n  return (\n    <Show\n      when={skeletonProps.loaded}\n      fallback={\n        <Box class={classes()} d=\"flex\" flexDirection=\"column\" gap={local.spacing} {...others}>\n          <Index each={numbers()}>\n            {(_, index) => (\n              <Skeleton width={getWidth(index)} height={local.skeletonHeight} {...skeletonProps} />\n            )}\n          </Index>\n        </Box>\n      }\n    >\n      <Skeleton class={local.class} {...skeletonProps} {...others}>\n        {local.children}\n      </Skeleton>\n    </Show>\n  );\n}\n\nSkeletonText.toString = () => createClassSelector(hopeSkeletonClass);\n"
  },
  {
    "path": "packages/solid/src/components/skeleton/skeleton.styles.ts",
    "content": "import { css, keyframes } from \"../../styled-system/stitches.config\";\n\nconst skeletonColorFade = keyframes({\n  from: {\n    borderColor: \"$$startColor\",\n    background: \"$$startColor\",\n  },\n  to: {\n    borderColor: \"$$endColor\",\n    background: \"$$endColor\",\n  },\n});\n\nexport const skeletonStyles = css({\n  $$startColor: \"$colors$neutral2\",\n  $$endColor: \"$colors$neutral8\",\n\n  opacity: \"0.7\",\n\n  borderRadius: \"2px\",\n  borderColor: \"$$startColor\",\n\n  boxShadow: \"$none\",\n\n  background: \"$$endColor\",\n  backgroundClip: \"padding-box\",\n\n  color: \"transparent\",\n\n  cursor: \"default\",\n  pointerEvents: \"none\",\n  userSelect: \"none\",\n\n  animationTimingFunction: \"linear\",\n  animationIterationCount: \"infinite\",\n  animationDirection: \"alternate\",\n  animationName: `${skeletonColorFade()}`,\n\n  \"&::before, &::after, *\": {\n    visibility: \"hidden\",\n  },\n});\n"
  },
  {
    "path": "packages/solid/src/components/skeleton/skeleton.tsx",
    "content": "import { Property } from \"csstype\";\nimport { createEffect, createSignal, mergeProps, on, Show, splitProps } from \"solid-js\";\n\nimport { fadeIn } from \"../../styled-system/keyframes\";\nimport { ColorProps } from \"../../styled-system/props/color\";\nimport { colorTokenToCssVar } from \"../../styled-system/utils\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { skeletonStyles } from \"./skeleton.styles\";\n\n/* -------------------------------------------------------------------------------------------------\n * Skeleton\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SkeletonOptions {\n  /**\n   * The color at the animation start.\n   */\n  startColor?: ColorProps[\"backgroundColor\"];\n\n  /**\n   * The color at the animation end.\n   */\n  endColor?: ColorProps[\"backgroundColor\"];\n\n  /**\n   * The animation speed in CSS unit.\n   */\n  speed?: Property.AnimationDuration;\n\n  /**\n   * The loaded children fadeIn animation duration in CSS unit.\n   */\n  fadeDuration?: Property.AnimationDuration;\n\n  /**\n   * If `true`, it'll render its children with a nice fade animation.\n   */\n  loaded?: boolean;\n}\n\nexport type SkeletonProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, SkeletonOptions>;\n\nexport const hopeSkeletonClass = \"hope-skeleton\";\n\nexport function Skeleton<C extends ElementType = \"div\">(props: SkeletonProps<C>) {\n  // Animation when the content is loaded\n  const [loadedAnimation, setLoadedAnimation] = createSignal(\"none\");\n\n  const defaultProps: SkeletonProps<\"div\"> = {\n    speed: \"800ms\",\n    fadeDuration: \"400ms\",\n  };\n\n  const propsWithDefault: SkeletonProps<\"div\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault, [\n    \"class\",\n    \"startColor\",\n    \"endColor\",\n    \"loaded\",\n    \"speed\",\n    \"fadeDuration\",\n  ]);\n\n  const skeletonClasses = () => {\n    return classNames(\n      local.class,\n      hopeSkeletonClass,\n      local.loaded\n        ? undefined\n        : skeletonStyles({\n            css: {\n              $$startColor: colorTokenToCssVar(local.startColor ?? \"$neutral2\"),\n              $$endColor: colorTokenToCssVar(local.endColor ?? \"$neutral8\"),\n              animationDuration: local.speed,\n            },\n          })\n    );\n  };\n\n  // The animation only applies when `loaded` goes from false to true.\n  createEffect(\n    on(\n      () => local.loaded,\n      (_, prev) => setLoadedAnimation(prev === true ? \"none\" : `${fadeIn()} ${local.fadeDuration}`),\n      { defer: true }\n    )\n  );\n\n  return (\n    <Show when={local.loaded} fallback={<Box class={skeletonClasses()} {...others} />}>\n      <Box class={skeletonClasses()} animation={loadedAnimation()} {...others} />\n    </Show>\n  );\n}\n\nSkeleton.toString = () => createClassSelector(hopeSkeletonClass);\n"
  },
  {
    "path": "packages/solid/src/components/spacer/index.ts",
    "content": "export * from \"./spacer\";\nexport * from \"./spacer.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/spacer/spacer.styles.ts",
    "content": "import { css } from \"../../styled-system/stitches.config\";\n\nexport const spacerStyles = css({\n  flex: 1,\n  justifySelf: \"stretch\",\n  alignSelf: \"stretch\",\n});\n"
  },
  {
    "path": "packages/solid/src/components/spacer/spacer.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../test-utils\";\nimport { Spacer } from \"./spacer\";\nimport { spacerStyles } from \"./spacer.styles\";\n\ndescribe(\"Spacer\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Spacer data-testid=\"spacer\">Spacer</Spacer>);\n    const spacer = screen.getByTestId(\"spacer\");\n\n    // assert\n    expect(spacer).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <Spacer data-testid=\"spacer\">Spacer</Spacer>);\n    const spacer = screen.getByTestId(\"spacer\");\n\n    // assert\n    expect(spacer).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <Spacer data-testid=\"spacer\" as=\"span\">\n        Spacer\n      </Spacer>\n    ));\n    const spacer = screen.getByTestId(\"spacer\");\n\n    // assert\n    expect(spacer).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"Spacer\";\n\n    // act\n    renderWithHopeProvider(() => <Spacer data-testid=\"spacer\">{children}</Spacer>);\n    const spacer = screen.getByTestId(\"spacer\");\n\n    // assert\n    expect(spacer).toHaveTextContent(children);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <Spacer data-testid=\"spacer\">Spacer</Spacer>);\n    const spacer = screen.getByTestId(\"spacer\");\n\n    // assert\n    expect(spacer).toHaveClass(\"hope-spacer\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(Spacer.toString()).toBe(\".hope-spacer\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Spacer data-testid=\"spacer\" class={stubClass}>\n        Spacer\n      </Spacer>\n    ));\n    const spacer = screen.getByTestId(\"spacer\");\n\n    // assert\n    expect(spacer).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <Spacer data-testid=\"spacer\" className={stubClass}>\n        Spacer\n      </Spacer>\n    ));\n    const spacer = screen.getByTestId(\"spacer\");\n\n    // assert\n    expect(spacer).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Spacer data-testid=\"spacer\" classList={{ [stubClass]: true }}>\n        Spacer\n      </Spacer>\n    ));\n    const spacer = screen.getByTestId(\"spacer\");\n\n    // assert\n    expect(spacer).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from spacerStyles\", () => {\n    // arrange\n    const spacerClass = spacerStyles();\n\n    // act\n    renderWithHopeProvider(() => <Spacer data-testid=\"spacer\">Spacer</Spacer>);\n    const spacer = screen.getByTestId(\"spacer\");\n\n    // assert\n    expect(spacer).toHaveClass(spacerClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/spacer/spacer.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { spacerStyles } from \"./spacer.styles\";\n\nexport type SpacerProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeSpacerClass = \"hope-spacer\";\n\n/**\n * A flexible flex spacer that expands along the major axis of its containing flex layout.\n * It renders a `div` by default, and takes up any available space.\n */\nexport function Spacer<C extends ElementType = \"div\">(props: SpacerProps<C>) {\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeSpacerClass, spacerStyles());\n\n  return <Box class={classes()} {...others} />;\n}\n\nSpacer.toString = () => createClassSelector(hopeSpacerClass);\n"
  },
  {
    "path": "packages/solid/src/components/spinner/index.ts",
    "content": "export * from \"./spinner\";\nexport * from \"./spinner.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/spinner/spinner.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { spin } from \"../../styled-system/keyframes\";\nimport { css } from \"../../styled-system/stitches.config\";\n\nexport const spinnerStyles = css({\n  display: \"inline-block\",\n\n  borderColor: \"currentColor\",\n  borderStyle: \"solid\",\n  borderRadius: \"$full\",\n  borderWidth: \"2px\",\n  borderBottomColor: \"transparent\",\n  borderLeftColor: \"transparent\",\n\n  animationName: `${spin}`,\n  animationDuration: \"0.45s\",\n  animationTimingFunction: \"linear\",\n  animationIterationCount: \"infinite\",\n\n  variants: {\n    size: {\n      xs: {\n        boxSize: \"0.75rem\",\n      },\n      sm: {\n        boxSize: \"1rem\",\n      },\n      md: {\n        boxSize: \"1.5rem\",\n      },\n      lg: {\n        boxSize: \"2rem\",\n      },\n      xl: {\n        boxSize: \"3rem\",\n      },\n    },\n  },\n});\n\nexport type SpinnerVariants = VariantProps<typeof spinnerStyles>;\n"
  },
  {
    "path": "packages/solid/src/components/spinner/spinner.tsx",
    "content": "import { Property } from \"csstype\";\nimport { mergeProps, Show, splitProps } from \"solid-js\";\n\nimport { BorderProps } from \"../../styled-system/props/border\";\nimport { ColorProps } from \"../../styled-system/props/color\";\nimport { visuallyHiddenStyles } from \"../../styled-system/utils\";\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps, SinglePartComponentStyleConfig } from \"../types\";\nimport { spinnerStyles, SpinnerVariants } from \"./spinner.styles\";\n\ninterface SpinnerOptions extends SpinnerVariants {\n  /**\n   * The color of the spinner\n   */\n  color?: ColorProps[\"color\"];\n\n  /**\n   * The color of the empty area in the spinner\n   */\n  emptyColor?: ColorProps[\"color\"];\n\n  /**\n   * The thickness of the spinner\n   * @example\n   * ```jsx\n   * <Spinner thickness=\"4px\"/>\n   * ```\n   */\n  thickness?: BorderProps[\"borderWidth\"];\n\n  /**\n   * The speed of the spinner.\n   * @example\n   * ```jsx\n   * <Spinner speed=\"0.2s\"/>\n   * ```\n   */\n  speed?: Property.TransitionDuration;\n\n  /**\n   * For accessibility, it is important to add a fallback loading text.\n   * This text will be visible to screen readers.\n   */\n  label?: string;\n}\n\nexport type SpinnerProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, SpinnerOptions>;\n\nexport type SpinnerStyleConfig = SinglePartComponentStyleConfig<SpinnerOptions>;\n\nconst hopeSpinnerClass = \"hope-spinner\";\n\nexport function Spinner<C extends ElementType = \"div\">(props: SpinnerProps<C>) {\n  const theme = useStyleConfig().Spinner;\n\n  const defaultProps: SpinnerProps<\"div\"> = {\n    label: theme?.defaultProps?.label ?? \"Loading...\",\n    size: theme?.defaultProps?.size ?? \"md\",\n    emptyColor: theme?.defaultProps?.emptyColor,\n    color: theme?.defaultProps?.color,\n    thickness: theme?.defaultProps?.thickness,\n    speed: theme?.defaultProps?.speed,\n  };\n\n  const propsWithDefault: SpinnerProps<\"div\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault, [\n    \"class\",\n    \"children\",\n    \"label\",\n    \"size\",\n    \"emptyColor\",\n    \"color\",\n    \"thickness\",\n    \"speed\",\n  ]);\n\n  const classes = () =>\n    classNames(\n      local.class,\n      hopeSpinnerClass,\n      spinnerStyles({\n        size: local.size,\n        css: {\n          color: local.color,\n          borderWidth: local.thickness,\n          borderBottomColor: local.emptyColor,\n          borderLeftColor: local.emptyColor,\n          animationDuration: local.speed,\n        },\n      })\n    );\n\n  return (\n    <Box class={classes()} {...others}>\n      <Show when={local.label}>\n        <span class={visuallyHiddenStyles()}>{local.label}</span>\n      </Show>\n    </Box>\n  );\n}\n\nSpinner.toString = () => createClassSelector(hopeSpinnerClass);\n"
  },
  {
    "path": "packages/solid/src/components/stack/index.ts",
    "content": "export * from \"./stack\";\nexport * from \"./stack.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/stack/stack.styles.ts",
    "content": "import { css } from \"../../styled-system/stitches.config\";\n\nexport const stackStyles = css({\n  display: \"flex\",\n});\n"
  },
  {
    "path": "packages/solid/src/components/stack/stack.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { css } from \"../../styled-system/stitches.config\";\nimport * as styledSystem from \"../../styled-system/system\";\nimport { renderWithHopeProvider } from \"../test-utils\";\nimport { HStack, HStackOptions, Stack, VStack, VStackOptions } from \"./stack\";\n\ndescribe(\"Stack\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Stack data-testid=\"stack\">Stack</Stack>);\n    const stack = screen.getByTestId(\"stack\");\n\n    // assert\n    expect(stack).toBeInTheDocument();\n  });\n\n  it(\"should render <div> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <Stack data-testid=\"stack\">Stack</Stack>);\n    const stack = screen.getByTestId(\"stack\");\n\n    // assert\n    expect(stack).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <Stack data-testid=\"stack\" as=\"span\">\n        Stack\n      </Stack>\n    ));\n    const stack = screen.getByTestId(\"stack\");\n\n    // assert\n    expect(stack).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"Stack\";\n\n    // act\n    renderWithHopeProvider(() => <Stack data-testid=\"stack\">{children}</Stack>);\n    const stack = screen.getByTestId(\"stack\");\n\n    // assert\n    expect(stack).toHaveTextContent(children);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <Stack data-testid=\"stack\">Stack</Stack>);\n    const stack = screen.getByTestId(\"stack\");\n\n    // assert\n    expect(stack).toHaveClass(\"hope-stack\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(Stack.toString()).toBe(\".hope-stack\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Stack data-testid=\"stack\" class={stubClass}>\n        Stack\n      </Stack>\n    ));\n    const stack = screen.getByTestId(\"stack\");\n\n    // assert\n    expect(stack).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <Stack data-testid=\"stack\" className={stubClass}>\n        Stack\n      </Stack>\n    ));\n    const stack = screen.getByTestId(\"stack\");\n\n    // assert\n    expect(stack).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Stack data-testid=\"stack\" classList={{ [stubClass]: true }}>\n        Stack\n      </Stack>\n    ));\n    const stack = screen.getByTestId(\"stack\");\n\n    // assert\n    expect(stack).toHaveClass(stubClass);\n  });\n});\n\ndescribe(\"VStack\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should have flexDirection set to column\", () => {\n    // arrange\n    const stubClassName = css({})();\n\n    jest.spyOn(styledSystem, \"createStyledSystemClass\").mockReturnValue(stubClassName);\n\n    // act\n    renderWithHopeProvider(() => <VStack>VStack</VStack>);\n\n    // assert\n    expect(styledSystem.createStyledSystemClass).toHaveBeenCalledWith(\n      expect.objectContaining({\n        flexDirection: \"column\",\n      }),\n      [undefined, undefined] // __baseStyles\n    );\n  });\n\n  it(\"should pass spacing prop to <Stack /> rowGap prop\", () => {\n    // arrange\n    const variantProps: VStackOptions = {\n      spacing: \"4\",\n    };\n\n    const stubClassName = css({})();\n\n    jest.spyOn(styledSystem, \"createStyledSystemClass\").mockReturnValue(stubClassName);\n\n    // act\n    renderWithHopeProvider(() => <VStack {...variantProps}>VStack</VStack>);\n\n    // assert\n    expect(styledSystem.createStyledSystemClass).toHaveBeenCalledWith(\n      expect.objectContaining({\n        rowGap: variantProps.spacing,\n      }),\n      [undefined, undefined] // __baseStyles\n    );\n  });\n});\n\ndescribe(\"HStack\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should have flexDirection set to row\", () => {\n    // arrange\n    const stubClassName = css({})();\n\n    jest.spyOn(styledSystem, \"createStyledSystemClass\").mockReturnValue(stubClassName);\n\n    // act\n    renderWithHopeProvider(() => <HStack>HStack</HStack>);\n\n    // assert\n    expect(styledSystem.createStyledSystemClass).toHaveBeenCalledWith(\n      expect.objectContaining({\n        flexDirection: \"row\",\n      }),\n      [undefined, undefined] // __baseStyles\n    );\n  });\n\n  it(\"should pass spacing prop to <Stack /> columnGap prop\", () => {\n    // arrange\n    const variantProps: HStackOptions = {\n      spacing: \"4\",\n    };\n\n    const stubClassName = css({})();\n\n    jest.spyOn(styledSystem, \"createStyledSystemClass\").mockReturnValue(stubClassName);\n\n    // act\n    renderWithHopeProvider(() => <HStack {...variantProps}>HStack</HStack>);\n\n    // assert\n    expect(styledSystem.createStyledSystemClass).toHaveBeenCalledWith(\n      expect.objectContaining({\n        columnGap: variantProps.spacing,\n      }),\n      [undefined, undefined] // __baseStyles\n    );\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/stack/stack.tsx",
    "content": "import { Property } from \"csstype\";\nimport { splitProps } from \"solid-js\";\n\nimport { ResponsiveProps, SpaceScaleValue } from \"../../styled-system/types\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { stackStyles } from \"./stack.styles\";\n\nexport type StackOptions = ResponsiveProps<{\n  direction?: Property.FlexDirection;\n  wrap?: Property.FlexWrap;\n  spacing?: Property.Gap<SpaceScaleValue> | number;\n}>;\n\nexport type StackProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, StackOptions>;\n\nconst hopeStackClass = \"hope-stack\";\n\n/**\n * Stack is a layout component that makes it easy to stack elements together and apply a space between them.\n *\n * Foundation of <VStack /> and <HStack /> components.\n */\nexport function Stack<C extends ElementType = \"div\">(props: StackProps<C>) {\n  const [local, others] = splitProps(props, [\"class\", \"direction\", \"wrap\", \"spacing\"]);\n\n  const classes = () => classNames(local.class, hopeStackClass, stackStyles());\n\n  return (\n    <Box\n      class={classes()}\n      flexDirection={local.direction}\n      flexWrap={local.wrap}\n      gap={local.spacing}\n      {...others}\n    />\n  );\n}\n\nStack.toString = () => createClassSelector(hopeStackClass);\n\n/* -------------------------------------------------------------------------------------------------\n * HStack\n * -----------------------------------------------------------------------------------------------*/\n\nexport type HStackOptions = ResponsiveProps<{\n  spacing?: Property.ColumnGap<SpaceScaleValue> | number;\n}>;\n\nexport type HStackProps<C extends ElementType = \"div\"> = StackProps<C> & HStackOptions;\n\n/**\n * A view that arranges its children in a horizontal line.\n */\nexport function HStack<C extends ElementType = \"div\">(props: HStackProps<C>) {\n  const [local, others] = splitProps(props, [\"spacing\"]);\n\n  return <Stack direction=\"row\" alignItems=\"center\" columnGap={local.spacing} {...others} />;\n}\n\nHStack.toString = () => createClassSelector(hopeStackClass);\n\n/* -------------------------------------------------------------------------------------------------\n * VStack\n * -----------------------------------------------------------------------------------------------*/\n\nexport type VStackOptions = ResponsiveProps<{\n  spacing?: Property.RowGap<SpaceScaleValue> | number;\n}>;\n\nexport type VStackProps<C extends ElementType = \"div\"> = StackProps<C> & VStackOptions;\n\n/**\n * A view that arranges its children in a vertical line.\n */\nexport function VStack<C extends ElementType = \"div\">(props: VStackProps<C>) {\n  const [local, others] = splitProps(props, [\"spacing\"]);\n\n  return <Stack direction=\"column\" alignItems=\"center\" rowGap={local.spacing} {...others} />;\n}\n\nVStack.toString = () => createClassSelector(hopeStackClass);\n"
  },
  {
    "path": "packages/solid/src/components/storybook-utils.tsx",
    "content": "/* eslint-disable solid/reactivity */\nimport { addons } from \"@storybook/addons\";\nimport { JSX, onCleanup, onMount } from \"solid-js\";\n\nimport { HopeProvider, useColorMode } from \"../hope-provider\";\n\nconst channel = addons.getChannel();\n\n/**\n * Utility component to sync Hope UI color mode with storybook-color-mode addon.\n */\nfunction ColorModeWrapper(props: { children?: JSX.Element }) {\n  const { setColorMode } = useColorMode();\n\n  const listener = (isDark: boolean) => setColorMode(isDark ? \"dark\" : \"light\");\n\n  onMount(() => {\n    channel.on(\"DARK_MODE\", listener);\n  });\n\n  onCleanup(() => {\n    channel.off(\"DARK_MODE\", listener);\n  });\n\n  return props.children;\n}\n\nexport function HopeWrapper(props: { children?: JSX.Element }) {\n  return (\n    <HopeProvider>\n      <ColorModeWrapper>{props.children}</ColorModeWrapper>\n    </HopeProvider>\n  );\n}\n"
  },
  {
    "path": "packages/solid/src/components/switch/index.ts",
    "content": "export * from \"./switch\";\nexport * from \"./switch.styles\";\nexport * from \"./switch-primitive\";\nexport * from \"./switch-primitive-thumb\";\n"
  },
  {
    "path": "packages/solid/src/components/switch/switch-primitive-thumb.tsx",
    "content": "import { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useSwitchPrimitivehContext } from \"./switch-primitive\";\n\nexport type SwitchPrimitiveThumbProps<C extends ElementType = \"span\"> = HTMLHopeProps<C>;\n\n/**\n * The thumb that is used to visually indicate whether the switch is on or off.\n * You can style this element directly, or you can use it as a wrapper to put an icon into, or both.\n */\nexport function SwitchPrimitiveThumb<C extends ElementType = \"span\">(\n  props: SwitchPrimitiveThumbProps<C>\n) {\n  const switchPrimitiveContext = useSwitchPrimitivehContext();\n\n  return (\n    <hope.span\n      aria-hidden={true}\n      data-focus={switchPrimitiveContext.state[\"data-focus\"]}\n      data-checked={switchPrimitiveContext.state[\"data-checked\"]}\n      data-required={switchPrimitiveContext.state[\"data-required\"]}\n      data-disabled={switchPrimitiveContext.state[\"data-disabled\"]}\n      data-invalid={switchPrimitiveContext.state[\"data-invalid\"]}\n      data-readonly={switchPrimitiveContext.state[\"data-readonly\"]}\n      {...props}\n    />\n  );\n}\n"
  },
  {
    "path": "packages/solid/src/components/switch/switch-primitive.tsx",
    "content": "import {\n  Accessor,\n  createContext,\n  createUniqueId,\n  JSX,\n  Show,\n  splitProps,\n  useContext,\n} from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { visuallyHiddenStyles } from \"../../styled-system/utils\";\nimport { isFunction } from \"../../utils\";\nimport { classNames } from \"../../utils/css\";\nimport { callHandler } from \"../../utils/function\";\nimport { hope } from \"../factory\";\nimport { useFormControl } from \"../form-control/use-form-control\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\n\ntype SwitchPrimitiveChildrenRenderProp = (props: {\n  state: Accessor<SwitchPrimitiveState>;\n}) => JSX.Element;\n\ninterface SwitchPrimitiveOptions {\n  /**\n   * The ref to be passed to the internal <input> tag.\n   */\n  ref?: HTMLInputElement | ((el: HTMLInputElement) => void);\n\n  /**\n   * The id to be passed to the internal <input> tag.\n   */\n  id?: string;\n\n  /**\n   * The css class to be passed to the internal <input> tag.\n   */\n  inputClass?: string;\n\n  /**\n   * The name to be passed to the internal <input> tag.\n   */\n  name?: string;\n\n  /**\n   * The value to be used in the switch input.\n   * This is the value that will be returned on form submission.\n   */\n  value?: string | number;\n\n  /**\n   * If `true`, the switch will be checked.\n   * You'll need to pass `onChange` to update its value (since it is now controlled)\n   */\n  checked?: boolean;\n\n  /**\n   * If `true`, the switch will be initially checked.\n   */\n  defaultChecked?: boolean;\n\n  /**\n   * If `true`, the switch input is marked as required,\n   * and `required` attribute will be added\n   */\n  required?: boolean;\n\n  /**\n   * If `true`, the switch will be disabled\n   */\n  disabled?: boolean;\n\n  /**\n   * If `true`, the input will have `aria-invalid` set to `true`\n   */\n  invalid?: boolean;\n\n  /**\n   * If `true`, the switch will be readonly\n   */\n  readOnly?: boolean;\n\n  /**\n   * The children of the switch.\n   */\n  children?: JSX.Element | SwitchPrimitiveChildrenRenderProp;\n\n  /**\n   * The callback invoked when the checked state of the switch changes.\n   */\n  onChange?: JSX.EventHandlerUnion<HTMLInputElement, Event>;\n\n  /**\n   * The callback invoked when the switch is focused\n   */\n  onFocus?: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>;\n\n  /**\n   * The callback invoked when the switch is blurred (loses focus)\n   */\n  onBlur?: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent>;\n}\n\nexport type SwitchPrimitiveProps<C extends ElementType = \"label\"> = HTMLHopeProps<\n  C,\n  SwitchPrimitiveOptions\n>;\n\ninterface SwitchPrimitiveState {\n  /**\n   * The `checked` state of the switch.\n   * (In uncontrolled mode)\n   */\n  _checked: boolean;\n\n  /**\n   * If `true`, the switch is in controlled mode.\n   * (have checked and onChange props)\n   */\n  isControlled: boolean;\n\n  /**\n   * If `true`, the switch is currently focused.\n   */\n  isFocused: boolean;\n\n  /**\n   * The `checked` state of the switch.\n   * (In controlled mode)\n   */\n  checked: boolean;\n\n  /**\n   * The value to be used in the switch input.\n   * This is the value that will be returned on form submission.\n   */\n  value?: string | number;\n\n  /**\n   * The id of the input field in a switch.\n   */\n  id?: string;\n\n  /**\n   * The name of the input field in a switch.\n   */\n  name?: string;\n\n  /**\n   * If `true`, the switch input is marked as required,\n   * and `required` attribute will be added\n   */\n  required?: boolean;\n\n  /**\n   * If `true`, the switch will be disabled\n   */\n  disabled?: boolean;\n\n  /**\n   * If `true`, the input will have `aria-invalid` set to `true`\n   */\n  invalid?: boolean;\n\n  /**\n   * If `true`, the switch will be readonly\n   */\n  readOnly?: boolean;\n\n  \"aria-required\"?: boolean;\n  \"aria-disabled\"?: boolean;\n  \"aria-invalid\"?: boolean;\n  \"aria-readonly\"?: boolean;\n\n  \"data-focus\"?: string;\n  \"data-checked\"?: string;\n  \"data-required\"?: string;\n  \"data-disabled\"?: string;\n  \"data-invalid\"?: string;\n  \"data-readonly\"?: string;\n}\n\n/**\n * Contains all the parts of a switch.\n * It renders a `label` with a visualy hidden `input[type=checkbox][role=switch]`.\n * You can style this element directly, or you can use it as a wrapper to put other components into, or both.\n */\nexport function SwitchPrimitive<C extends ElementType = \"label\">(props: SwitchPrimitiveProps<C>) {\n  const defaultId = `hope-switch-${createUniqueId()}`;\n\n  const formControlProps = useFormControl<HTMLInputElement>(props);\n\n  const [state, setState] = createStore<SwitchPrimitiveState>({\n    // eslint-disable-next-line solid/reactivity\n    _checked: !!props.defaultChecked,\n    isFocused: false,\n    get isControlled() {\n      return props.checked !== undefined;\n    },\n    get checked() {\n      return this.isControlled ? !!props.checked : this._checked;\n    },\n    get id() {\n      return formControlProps.id ?? defaultId;\n    },\n    get name() {\n      return props.name;\n    },\n    get value() {\n      return props.value;\n    },\n    get required() {\n      return formControlProps.required;\n    },\n    get disabled() {\n      return formControlProps.disabled;\n    },\n    get invalid() {\n      return formControlProps.invalid;\n    },\n    get readOnly() {\n      return formControlProps.readOnly;\n    },\n    get [\"aria-required\"]() {\n      return this.required ? true : undefined;\n    },\n    get [\"aria-disabled\"]() {\n      return this.disabled ? true : undefined;\n    },\n    get [\"aria-invalid\"]() {\n      return this.invalid ? true : undefined;\n    },\n    get [\"aria-readonly\"]() {\n      return this.readOnly ? true : undefined;\n    },\n    get [\"data-focus\"]() {\n      return this.isFocused ? \"\" : undefined;\n    },\n    get [\"data-checked\"]() {\n      return this.checked ? \"\" : undefined;\n    },\n    get [\"data-required\"]() {\n      return this.required ? \"\" : undefined;\n    },\n    get [\"data-disabled\"]() {\n      return this.disabled ? \"\" : undefined;\n    },\n    get [\"data-invalid\"]() {\n      return this.invalid ? \"\" : undefined;\n    },\n    get [\"data-readonly\"]() {\n      return this.readOnly ? \"\" : undefined;\n    },\n  });\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  const [local, _, others] = splitProps(\n    props as SwitchPrimitiveProps<\"label\">,\n    [\n      \"inputClass\",\n      \"children\",\n      \"ref\",\n      \"tabIndex\",\n      \"aria-label\",\n      \"aria-labelledby\",\n      \"aria-describedby\",\n      \"onChange\",\n    ],\n    [\n      \"id\",\n      \"name\",\n      \"value\",\n      \"checked\",\n      \"defaultChecked\",\n      \"required\",\n      \"disabled\",\n      \"invalid\",\n      \"readOnly\",\n      \"onFocus\",\n      \"onBlur\",\n    ]\n  );\n\n  const onChange: JSX.EventHandlerUnion<HTMLInputElement, Event> = event => {\n    if (state.readOnly || state.disabled) {\n      event.preventDefault();\n      return;\n    }\n\n    if (!state.isControlled) {\n      const target = event.target as HTMLInputElement;\n      setState(\"_checked\", target.checked);\n    }\n\n    callHandler(local.onChange, event);\n  };\n\n  const onFocus: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent> = event => {\n    setState(\"isFocused\", true);\n    callHandler(formControlProps.onFocus, event);\n  };\n\n  const onBlur: JSX.EventHandlerUnion<HTMLInputElement, FocusEvent> = event => {\n    setState(\"isFocused\", false);\n    callHandler(formControlProps.onBlur, event);\n  };\n\n  const inputClasses = () => classNames(local.inputClass, visuallyHiddenStyles());\n\n  const stateAccessor = () => state;\n\n  const context: SwitchPrimitiveContextValue = {\n    state,\n  };\n\n  return (\n    <SwitchPrimitiveContext.Provider value={context}>\n      <hope.label\n        for={state.id}\n        data-group\n        data-focus={state[\"data-focus\"]}\n        data-checked={state[\"data-checked\"]}\n        data-required={state[\"data-required\"]}\n        data-disabled={state[\"data-disabled\"]}\n        data-invalid={state[\"data-invalid\"]}\n        data-readonly={state[\"data-readonly\"]}\n        {...others}\n      >\n        <input\n          type=\"checkbox\"\n          role=\"switch\"\n          class={inputClasses()}\n          ref={local.ref}\n          tabIndex={local.tabIndex}\n          value={state.value}\n          id={state.id}\n          name={state.name}\n          checked={state.checked}\n          required={state.required}\n          disabled={state.disabled}\n          readOnly={state.readOnly}\n          onChange={onChange}\n          onFocus={onFocus}\n          onBlur={onBlur}\n          aria-required={state[\"aria-required\"]}\n          aria-disabled={state[\"aria-disabled\"]}\n          aria-invalid={state[\"aria-invalid\"]}\n          aria-readonly={state[\"aria-readonly\"]}\n          aria-label={local[\"aria-label\"]}\n          aria-labelledby={local[\"aria-labelledby\"]}\n          aria-describedby={local[\"aria-describedby\"]}\n        />\n        <Show when={isFunction(local.children)} fallback={local.children as JSX.Element}>\n          {(local.children as SwitchPrimitiveChildrenRenderProp)?.({ state: stateAccessor })}\n        </Show>\n      </hope.label>\n    </SwitchPrimitiveContext.Provider>\n  );\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ninterface SwitchPrimitiveContextValue {\n  state: SwitchPrimitiveState;\n}\n\nconst SwitchPrimitiveContext = createContext<SwitchPrimitiveContextValue>();\n\nexport function useSwitchPrimitivehContext() {\n  const context = useContext(SwitchPrimitiveContext);\n\n  if (!context) {\n    throw new Error(\n      \"[Hope UI]: useSwitchPrimitivehContext must be used within a `<SwitchPrimitive />` component\"\n    );\n  }\n\n  return context;\n}\n"
  },
  {
    "path": "packages/solid/src/components/switch/switch.stories.tsx",
    "content": "import { createSignal } from \"solid-js\";\n\nimport { Button } from \"..\";\nimport { HStack, VStack } from \"../stack/stack\";\nimport { HopeWrapper } from \"../storybook-utils\";\nimport { Switch } from \"./switch\";\n\nexport default {\n  title: \"Data entry/Switch\",\n  component: Switch,\n  parameters: { layout: \"centered\" },\n  decorators: [\n    (Story: any) => (\n      <HopeWrapper>\n        <Story />\n      </HopeWrapper>\n    ),\n  ],\n  argTypes: {\n    variant: {\n      control: { type: \"select\" },\n      options: [\"outline\", \"filled\"],\n    },\n    colorScheme: {\n      control: { type: \"select\" },\n      options: [\"primary\", \"neutral\", \"success\", \"info\", \"warning\", \"danger\"],\n    },\n    size: {\n      control: { type: \"select\" },\n      options: [\"sm\", \"md\", \"lg\"],\n    },\n    labelPlacement: {\n      control: { type: \"select\" },\n      options: [\"start\", \"end\"],\n    },\n    invalid: {\n      control: { type: \"boolean\" },\n    },\n    disabled: {\n      control: { type: \"boolean\" },\n    },\n    required: {\n      control: { type: \"boolean\" },\n    },\n    readOnly: {\n      control: { type: \"boolean\" },\n    },\n  },\n  args: {\n    variant: \"filled\",\n    colorScheme: \"primary\",\n    size: \"md\",\n    labelPlacement: \"start\",\n    invalid: false,\n    disabled: false,\n    required: false,\n    readOnly: false,\n  },\n};\n\nexport const Default = (args: any) => {\n  const [checked, setChecked] = createSignal(false);\n\n  const onChange = (event: Event) => {\n    setChecked((event.target as HTMLInputElement).checked);\n  };\n\n  return (\n    <VStack spacing=\"$5\">\n      <Button onClick={() => setChecked(prev => !prev)}>\n        Toggle controlled switch ({checked().toString()})\n      </Button>\n      <HStack spacing=\"$5\">\n        <Switch {...args} checked={checked()} onChange={onChange}>\n          Controlled\n        </Switch>\n        <Switch {...args}>Uncontrolled</Switch>\n      </HStack>\n    </VStack>\n  );\n};\nDefault.storyName = \"Switch\";\n"
  },
  {
    "path": "packages/solid/src/components/switch/switch.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css } from \"../../styled-system/stitches.config\";\nimport {\n  toggleControlLabelStyles,\n  toggleControlStyles,\n  toggleWrapperStyles,\n} from \"../checkbox/checkbox.styles\";\n\n/* -------------------------------------------------------------------------------------------------\n * Switch - wrapper\n * -----------------------------------------------------------------------------------------------*/\n\nexport const switchWrapperStyles = css(toggleWrapperStyles, {\n  variants: {\n    labelPlacement: {\n      start: {\n        flexDirection: \"row\",\n      },\n      end: {\n        flexDirection: \"row-reverse\",\n      },\n    },\n  },\n});\n\nexport type SwitchWrapperVariants = VariantProps<typeof switchWrapperStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * Switch - label\n * -----------------------------------------------------------------------------------------------*/\n\nexport const switchLabelStyles = css(toggleControlLabelStyles);\n\n/* -------------------------------------------------------------------------------------------------\n * Switch - control\n * -----------------------------------------------------------------------------------------------*/\n\nexport const switchControlStyles = css(toggleControlStyles, {\n  borderRadius: \"$full\",\n\n  transition: \"background-color 250ms, border-color 250ms, box-shadow 250ms\",\n\n  // Switch trackball\n  \"&::before\": {\n    content: \"''\",\n    position: \"absolute\",\n    top: \"2px\",\n    left: \"2px\",\n    zIndex: \"1\",\n    borderRadius: \"$full\",\n    boxShadow: \"$sm\",\n    transition: \"250ms\",\n  },\n\n  variants: {\n    variant: {\n      outline: {\n        \"&::before\": {\n          backgroundColor: \"$neutral7\",\n        },\n\n        \"&[data-checked]::before\": {\n          backgroundColor: \"$loContrast\",\n        },\n      },\n      filled: {\n        \"&::before\": {\n          backgroundColor: \"$loContrast\",\n        },\n      },\n    },\n    size: {\n      sm: {\n        height: \"16px\",\n        width: \"26px\",\n\n        \"&::before\": {\n          boxSize: \"10px\",\n        },\n\n        \"&[data-checked]::before\": {\n          transform: \"translateX(10px)\",\n        },\n      },\n      md: {\n        columnGap: \"2px\",\n        height: \"20px\",\n        width: \"34px\",\n\n        \"&::before\": {\n          boxSize: \"14px\",\n        },\n\n        \"&[data-checked]::before\": {\n          transform: \"translateX(14px)\",\n        },\n      },\n      lg: {\n        columnGap: \"4px\",\n        height: \"28px\",\n        width: \"50px\",\n\n        \"&::before\": {\n          boxSize: \"22px\",\n        },\n\n        \"&[data-checked]::before\": {\n          transform: \"translateX(22px)\",\n        },\n      },\n    },\n  },\n});\n\nexport type SwitchControlVariants = VariantProps<typeof switchControlStyles>;\n"
  },
  {
    "path": "packages/solid/src/components/switch/switch.tsx",
    "content": "import { JSX, mergeProps, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { SystemStyleObject } from \"../../styled-system/types\";\nimport { OverrideProps } from \"../../utils\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType } from \"../types\";\nimport {\n  switchControlStyles,\n  SwitchControlVariants,\n  switchLabelStyles,\n  switchWrapperStyles,\n  SwitchWrapperVariants,\n} from \"./switch.styles\";\nimport { SwitchPrimitive, SwitchPrimitiveProps } from \"./switch-primitive\";\n\ntype ThemeableSwitchOptions = SwitchWrapperVariants & SwitchControlVariants;\n\ninterface SwitchOptions extends ThemeableSwitchOptions {\n  /**\n   * The children of the switch.\n   */\n  children?: JSX.Element;\n}\n\nexport type SwitchProps<C extends ElementType = \"label\"> = OverrideProps<\n  SwitchPrimitiveProps<C>,\n  SwitchOptions\n>;\n\nconst hopeSwitchClass = \"hope-switch\";\nconst hopeSwitchInputClass = \"hope-checkbox__input\";\nconst hopeSwitchControlClass = \"hope-switch__control\";\nconst hopeSwitchLabelClass = \"hope-switch__label\";\n\n/**\n * Switches allow users to turn an individual option on or off.\n * They are usually used to activate or deactivate a specific setting.\n */\nexport function Switch<C extends ElementType = \"label\">(props: SwitchProps<C>) {\n  const theme = useStyleConfig().Switch;\n\n  const defaultProps: SwitchProps<\"label\"> = {\n    variant: theme?.defaultProps?.root?.variant ?? \"filled\",\n    colorScheme: theme?.defaultProps?.root?.colorScheme ?? \"primary\",\n    size: theme?.defaultProps?.root?.size ?? \"md\",\n    labelPlacement: theme?.defaultProps?.root?.labelPlacement ?? \"start\",\n  };\n\n  const propsWitDefault: SwitchProps<\"label\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWitDefault, [\n    \"children\",\n    \"class\",\n    \"variant\",\n    \"colorScheme\",\n    \"size\",\n    \"labelPlacement\",\n  ]);\n\n  const wrapperClasses = () => {\n    return classNames(\n      local.class,\n      hopeSwitchClass,\n      switchWrapperStyles({\n        size: local.size,\n        labelPlacement: local.labelPlacement,\n      })\n    );\n  };\n\n  const controlClasses = () => {\n    return classNames(\n      hopeSwitchControlClass,\n      switchControlStyles({\n        variant: local.variant,\n        colorScheme: local.colorScheme,\n        size: local.size,\n      })\n    );\n  };\n\n  const labelClasses = () => {\n    return classNames(hopeSwitchLabelClass, switchLabelStyles());\n  };\n\n  return (\n    <SwitchPrimitive\n      class={wrapperClasses()}\n      inputClass={hopeSwitchInputClass}\n      __baseStyle={theme?.baseStyle?.root}\n      {...others}\n    >\n      {({ state }) => (\n        <>\n          <hope.span\n            class={labelClasses()}\n            __baseStyle={theme?.baseStyle?.label}\n            data-focus={state()[\"data-focus\"]}\n            data-checked={state()[\"data-checked\"]}\n            data-required={state()[\"data-required\"]}\n            data-disabled={state()[\"data-disabled\"]}\n            data-invalid={state()[\"data-invalid\"]}\n            data-readonly={state()[\"data-readonly\"]}\n          >\n            {local.children}\n          </hope.span>\n          <hope.span\n            aria-hidden={true}\n            class={controlClasses()}\n            __baseStyle={theme?.baseStyle?.control}\n            data-focus={state()[\"data-focus\"]}\n            data-checked={state()[\"data-checked\"]}\n            data-required={state()[\"data-required\"]}\n            data-disabled={state()[\"data-disabled\"]}\n            data-invalid={state()[\"data-invalid\"]}\n            data-readonly={state()[\"data-readonly\"]}\n          />\n        </>\n      )}\n    </SwitchPrimitive>\n  );\n}\n\nSwitch.toString = () => createClassSelector(hopeSwitchClass);\n\n/* -------------------------------------------------------------------------------------------------\n * StyleConfig\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface SwitchStyleConfig {\n  baseStyle?: {\n    root?: SystemStyleObject;\n    control?: SystemStyleObject;\n    label?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: ThemeableSwitchOptions;\n  };\n}\n"
  },
  {
    "path": "packages/solid/src/components/table/index.ts",
    "content": "export * from \"./table\";\nexport * from \"./table.styles\";\nexport * from \"./table-caption\";\nexport * from \"./tbody\";\nexport * from \"./td\";\nexport * from \"./tfoot\";\nexport * from \"./th\";\nexport * from \"./thead\";\nexport * from \"./tr\";\n"
  },
  {
    "path": "packages/solid/src/components/table/table-caption.tsx",
    "content": "import { mergeProps, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useTableContext } from \"./table\";\nimport { tableCaptionStyles, TableCaptionVariants } from \"./table.styles\";\n\nexport type ThemeableTableCaptionOptions = Pick<TableCaptionVariants, \"placement\">;\n\nexport type TableCaptionProps<C extends ElementType = \"caption\"> = HTMLHopeProps<\n  C,\n  ThemeableTableCaptionOptions\n>;\n\nconst hopeTableCaptionClass = \"hope-table-caption\";\n\nexport function TableCaption<C extends ElementType = \"caption\">(props: TableCaptionProps<C>) {\n  const theme = useStyleConfig().Table;\n\n  const tableContext = useTableContext();\n\n  const defaultProps: TableCaptionProps<\"caption\"> = {\n    placement: theme?.defaultProps?.caption?.placement ?? \"bottom\",\n  };\n\n  const propsWithDefault: TableCaptionProps<\"caption\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault, [\"class\", \"placement\"]);\n\n  const classes = () =>\n    classNames(\n      local.class,\n      hopeTableCaptionClass,\n      tableCaptionStyles({\n        dense: tableContext.dense,\n        placement: local.placement,\n      })\n    );\n\n  return <hope.caption class={classes()} __baseStyle={theme?.baseStyle?.caption} {...others} />;\n}\n\nTableCaption.toString = () => createClassSelector(hopeTableCaptionClass);\n"
  },
  {
    "path": "packages/solid/src/components/table/table.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css } from \"../../styled-system/stitches.config\";\nimport { SystemStyleObject } from \"../../styled-system/types\";\n\n/* -------------------------------------------------------------------------------------------------\n * Table\n * -----------------------------------------------------------------------------------------------*/\n\nexport const tableStyles = css({\n  width: \"100%\",\n  borderCollapse: \"collapse\",\n  fontVariantNumeric: \"lining-nums tabular-nums\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Table - caption\n * -----------------------------------------------------------------------------------------------*/\n\nexport const tableCaptionStyles = css({\n  px: \"$6\",\n  py: \"$4\",\n\n  color: \"$neutral11\",\n  fontSize: \"$sm\",\n  fontWeight: \"$medium\",\n  lineHeight: \"$5\",\n  textAlign: \"center\",\n\n  variants: {\n    dense: {\n      true: {\n        px: \"$4\",\n        py: \"$3\",\n        fontSize: \"$xs\",\n        lineHeight: \"$4\",\n      },\n    },\n    placement: {\n      top: {\n        captionSide: \"top\",\n      },\n      bottom: {\n        captionSide: \"bottom\",\n      },\n    },\n  },\n});\n\nexport type TableCaptionVariants = VariantProps<typeof tableCaptionStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * Table - tbody\n * -----------------------------------------------------------------------------------------------*/\n\nfunction createStripedStyles(stripedRow: \"odd\" | \"even\"): SystemStyleObject {\n  return {\n    \"& td\": {\n      borderBottomWidth: 0,\n    },\n    \"& tr:last-of-type td\": {\n      borderBottomWidth: \"1px\",\n    },\n    [`& tr:nth-of-type(${stripedRow}) td`]: {\n      backgroundColor: \"$neutral3\",\n    },\n  };\n}\n\nexport const tableBodyStyles = css({\n  variants: {\n    striped: {\n      odd: createStripedStyles(\"odd\"),\n      even: createStripedStyles(\"even\"),\n    },\n    highlightOnHover: {\n      true: {\n        \"& tr:hover td\": {\n          backgroundColor: \"$neutral4\",\n        },\n      },\n    },\n  },\n  compoundVariants: [\n    {\n      striped: \"odd\",\n      highlightOnHover: true,\n      css: {\n        \"& tr:nth-of-type(odd):hover td\": {\n          backgroundColor: \"$neutral4\",\n        },\n      },\n    },\n    {\n      striped: \"even\",\n      highlightOnHover: true,\n      css: {\n        \"& tr:nth-of-type(even):hover td\": {\n          backgroundColor: \"$neutral4\",\n        },\n      },\n    },\n  ],\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Table - tfoot\n * -----------------------------------------------------------------------------------------------*/\n\nexport const tableFootStyles = css({\n  \"& tr:last-of-type th\": {\n    borderBottomWidth: 0,\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Table - th\n * -----------------------------------------------------------------------------------------------*/\n\nexport const tableColumnHeaderStyles = css({\n  borderBottom: \"1px solid $colors$neutral6\",\n\n  px: \"$6\",\n  py: \"$3\",\n\n  fontSize: \"$xs\",\n  fontWeight: \"$semibold\",\n  lineHeight: \"$4\",\n  letterSpacing: \"$wider\",\n  textAlign: \"start\",\n  textTransform: \"uppercase\",\n\n  variants: {\n    dense: {\n      true: {\n        px: \"$4\",\n        py: \"$1_5\",\n      },\n    },\n    numeric: {\n      true: {\n        textAlign: \"end\",\n      },\n    },\n  },\n});\n\nexport type TableColumnHeaderVariants = VariantProps<typeof tableColumnHeaderStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * Table - td\n * -----------------------------------------------------------------------------------------------*/\n\nexport const tableCellStyles = css({\n  borderBottom: \"1px solid $colors$neutral6\",\n\n  px: \"$6\",\n  py: \"$4\",\n\n  fontSize: \"$base\",\n  lineHeight: \"$6\",\n  textAlign: \"start\",\n\n  transition: \"background-color 250ms\",\n\n  variants: {\n    dense: {\n      true: {\n        px: \"$4\",\n        py: \"$2\",\n        fontSize: \"$sm\",\n        lineHeight: \"$5\",\n      },\n    },\n    numeric: {\n      true: {\n        textAlign: \"end\",\n      },\n    },\n  },\n});\n\nexport type TableCellVariants = VariantProps<typeof tableCellStyles>;\n"
  },
  {
    "path": "packages/solid/src/components/table/table.tsx",
    "content": "import { createContext, splitProps, useContext } from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { SystemStyleObject } from \"../../styled-system/types\";\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { tableStyles } from \"./table.styles\";\nimport { ThemeableTableCaptionOptions } from \"./table-caption\";\n\nexport interface TableContextValue {\n  /**\n   * Set a neutral background color on odd or even row of table.\n   */\n  striped?: \"odd\" | \"even\";\n\n  /**\n   * If `true`, row will have less padding.\n   */\n  dense: boolean;\n\n  /**\n   * If `true`, row will have hover color.\n   */\n  highlightOnHover: boolean;\n}\n\nexport type TableOptions = Partial<TableContextValue>;\n\nexport type TableProps<C extends ElementType = \"table\"> = HTMLHopeProps<C, TableOptions>;\n\nexport interface TableStyleConfig {\n  baseStyle?: {\n    root?: SystemStyleObject;\n    caption?: SystemStyleObject;\n    thead?: SystemStyleObject;\n    tbody?: SystemStyleObject;\n    tfoot?: SystemStyleObject;\n    tr?: SystemStyleObject;\n    th?: SystemStyleObject;\n    td?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: TableOptions;\n    caption?: ThemeableTableCaptionOptions;\n  };\n}\n\nconst TableContext = createContext<TableContextValue>();\n\nconst hopeTableClass = \"hope-table\";\n\nexport function Table<C extends ElementType = \"table\">(props: TableProps<C>) {\n  const theme = useStyleConfig().Table;\n\n  const [state] = createStore<TableContextValue>({\n    get striped() {\n      return props.striped ?? theme?.defaultProps?.root?.striped;\n    },\n    get dense() {\n      return props.dense ?? theme?.defaultProps?.root?.dense ?? false;\n    },\n    get highlightOnHover() {\n      return props.highlightOnHover ?? theme?.defaultProps?.root?.highlightOnHover ?? false;\n    },\n  });\n\n  const [local, others] = splitProps(props, [\"class\", \"striped\", \"dense\", \"highlightOnHover\"]);\n\n  const classes = () => classNames(local.class, hopeTableClass, tableStyles(state));\n\n  return (\n    <TableContext.Provider value={state}>\n      <Box\n        as=\"table\"\n        role=\"table\"\n        class={classes()}\n        __baseStyle={theme?.baseStyle?.root}\n        {...others}\n      />\n    </TableContext.Provider>\n  );\n}\n\nTable.toString = () => createClassSelector(hopeTableClass);\n\nexport function useTableContext() {\n  const context = useContext(TableContext);\n\n  if (!context) {\n    throw new Error(\"[Hope UI]: useTableContext must be used within a `<Table/>` component\");\n  }\n\n  return context;\n}\n"
  },
  {
    "path": "packages/solid/src/components/table/tbody.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useTableContext } from \"./table\";\nimport { tableBodyStyles } from \"./table.styles\";\n\nexport type TbodyProps<C extends ElementType = \"tbody\"> = HTMLHopeProps<C>;\n\nconst hopeTbodyClass = \"hope-tbody\";\n\nexport function Tbody<C extends ElementType = \"tbody\">(props: TbodyProps<C>) {\n  const theme = useStyleConfig().Table;\n\n  const tableContext = useTableContext();\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () =>\n    classNames(\n      local.class,\n      hopeTbodyClass,\n      tableBodyStyles({\n        striped: tableContext.striped,\n        highlightOnHover: tableContext.highlightOnHover,\n      })\n    );\n\n  return (\n    <Box\n      as=\"tbody\"\n      role=\"rowgroup\"\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.tbody}\n      {...others}\n    />\n  );\n}\n\nTbody.toString = () => createClassSelector(hopeTbodyClass);\n"
  },
  {
    "path": "packages/solid/src/components/table/td.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useTableContext } from \"./table\";\nimport { tableCellStyles, TableCellVariants } from \"./table.styles\";\n\nexport type TdProps<C extends ElementType = \"td\"> = HTMLHopeProps<\n  C,\n  Pick<TableCellVariants, \"numeric\">\n>;\n\nconst hopeTdClass = \"hope-td\";\n\nexport function Td<C extends ElementType = \"td\">(props: TdProps<C>) {\n  const theme = useStyleConfig().Table;\n\n  const tableContext = useTableContext();\n\n  const [local, others] = splitProps(props, [\"class\", \"numeric\"]);\n\n  const classes = () =>\n    classNames(\n      local.class,\n      hopeTdClass,\n      tableCellStyles({\n        dense: tableContext.dense,\n        numeric: local.numeric,\n      })\n    );\n\n  return (\n    <Box as=\"td\" role=\"cell\" class={classes()} __baseStyle={theme?.baseStyle?.td} {...others} />\n  );\n}\n\nTd.toString = () => createClassSelector(hopeTdClass);\n"
  },
  {
    "path": "packages/solid/src/components/table/tfoot.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { tableFootStyles } from \"./table.styles\";\n\nexport type TfootProps<C extends ElementType = \"tfoot\"> = HTMLHopeProps<C>;\n\nconst hopeTfootClass = \"hope-tfoot\";\n\nexport function Tfoot<C extends ElementType = \"tfoot\">(props: TfootProps<C>) {\n  const theme = useStyleConfig().Table;\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeTfootClass, tableFootStyles());\n\n  return (\n    <Box\n      as=\"tfoot\"\n      role=\"rowgroup\"\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.tfoot}\n      {...others}\n    />\n  );\n}\n\nTfoot.toString = () => createClassSelector(hopeTfootClass);\n"
  },
  {
    "path": "packages/solid/src/components/table/th.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useTableContext } from \"./table\";\nimport { tableColumnHeaderStyles, TableColumnHeaderVariants } from \"./table.styles\";\n\nexport type ThProps<C extends ElementType = \"th\"> = HTMLHopeProps<\n  C,\n  Pick<TableColumnHeaderVariants, \"numeric\">\n>;\n\nconst hopeThClass = \"hope-th\";\n\nexport function Th<C extends ElementType = \"th\">(props: ThProps<C>) {\n  const theme = useStyleConfig().Table;\n\n  const tableContext = useTableContext();\n\n  const [local, others] = splitProps(props, [\"class\", \"numeric\"]);\n\n  const classes = () =>\n    classNames(\n      local.class,\n      hopeThClass,\n      tableColumnHeaderStyles({\n        dense: tableContext.dense,\n        numeric: local.numeric,\n      })\n    );\n\n  return (\n    <Box\n      as=\"th\"\n      role=\"columnheader\"\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.th}\n      {...others}\n    />\n  );\n}\n\nTh.toString = () => createClassSelector(hopeThClass);\n"
  },
  {
    "path": "packages/solid/src/components/table/thead.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\n\nexport type TheadProps<C extends ElementType = \"thead\"> = HTMLHopeProps<C>;\n\nconst hopeTheadClass = \"hope-thead\";\n\nexport function Thead<C extends ElementType = \"thead\">(props: TheadProps<C>) {\n  const theme = useStyleConfig().Table;\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeTheadClass);\n\n  return (\n    <Box\n      as=\"thead\"\n      role=\"rowgroup\"\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.thead}\n      {...others}\n    />\n  );\n}\n\nThead.toString = () => createClassSelector(hopeTheadClass);\n"
  },
  {
    "path": "packages/solid/src/components/table/tr.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\n\nexport type TrProps<C extends ElementType = \"tr\"> = HTMLHopeProps<C>;\n\nconst hopeTrClass = \"hope-tr\";\n\nexport function Tr<C extends ElementType = \"tr\">(props: TrProps<C>) {\n  const theme = useStyleConfig().Table;\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeTrClass);\n\n  return (\n    <Box as=\"tr\" role=\"row\" class={classes()} __baseStyle={theme?.baseStyle?.tr} {...others} />\n  );\n}\n\nTr.toString = () => createClassSelector(hopeTrClass);\n"
  },
  {
    "path": "packages/solid/src/components/tabs/index.ts",
    "content": "export * from \"./tab\";\nexport * from \"./tab-list\";\nexport * from \"./tab-panel\";\nexport * from \"./tabs\";\nexport * from \"./tabs.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/tabs/tab-list.tsx",
    "content": "import { Accessor, createMemo, JSX, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { normalizeEventKey } from \"../../utils/dom\";\nimport { callHandler } from \"../../utils/function\";\nimport { EventKeyMap } from \"../../utils/types\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useTabsContext } from \"./tabs\";\nimport { tabListStyles } from \"./tabs.styles\";\n\nexport type TabListProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeTabListClass = \"hope-tabs__tablist\";\n\n/**\n * TabList is used to manage a list of tab buttons. It renders a `div` by default,\n * and is responsible of the keyboard interaction between tabs.\n */\nexport function TabList<C extends ElementType = \"div\">(props: TabListProps<C>) {\n  const theme = useStyleConfig().Tabs;\n\n  const tabsContext = useTabsContext();\n\n  const [local, others] = splitProps(props as TabListProps<\"div\">, [\"class\", \"onKeyDown\"]);\n\n  const isHorizontal = () => tabsContext.state.orientation === \"horizontal\";\n  const isVertical = () => tabsContext.state.orientation === \"vertical\";\n\n  const onArrowLeftKeyDown = () => isHorizontal() && tabsContext.focusPrevTab();\n  const onArrowRightKeyDown = () => isHorizontal() && tabsContext.focusNextTab();\n  const onArrowDownKeyDown = () => isVertical() && tabsContext.focusNextTab();\n  const onArrowUpKeyDown = () => isVertical() && tabsContext.focusPrevTab();\n\n  const keyMap: Accessor<EventKeyMap> = createMemo(() => ({\n    ArrowLeft: onArrowLeftKeyDown,\n    ArrowRight: onArrowRightKeyDown,\n    ArrowDown: onArrowDownKeyDown,\n    ArrowUp: onArrowUpKeyDown,\n    Home: tabsContext.focusFirstTab,\n    End: tabsContext.focusLastTab,\n  }));\n\n  const onKeyDown: JSX.EventHandlerUnion<HTMLDivElement, KeyboardEvent> = event => {\n    callHandler(local.onKeyDown, event);\n\n    const eventKey = normalizeEventKey(event);\n\n    const action = keyMap()[eventKey];\n\n    if (action) {\n      event.preventDefault();\n      callHandler(action, event);\n    }\n  };\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeTabListClass,\n      tabListStyles({\n        alignment: tabsContext.state.alignment,\n        orientation: tabsContext.state.orientation,\n        variant: tabsContext.state.variant,\n      })\n    );\n  };\n\n  return (\n    <Box\n      role=\"tablist\"\n      aria-orientation={tabsContext.state.orientation}\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.tabList}\n      onKeyDown={onKeyDown}\n      {...others}\n    />\n  );\n}\n\nTabList.toString = () => createClassSelector(hopeTabListClass);\n"
  },
  {
    "path": "packages/solid/src/components/tabs/tab-panel.tsx",
    "content": "import { children, createSignal, Show, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { isFunction } from \"../../utils/assertion\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useTabsContext } from \"./tabs\";\nimport { tabPanelStyles } from \"./tabs.styles\";\n\nexport type TabPanelProps<C extends ElementType = \"div\"> = HTMLHopeProps<C>;\n\nconst hopeTabPanelClass = \"hope-tabs__tab-panel\";\n\n/**\n * TabPanel is used to render the content for a specific tab.\n */\nexport function TabPanel<C extends ElementType = \"div\">(props: TabPanelProps<C>) {\n  const theme = useStyleConfig().Tabs;\n\n  const tabsContext = useTabsContext();\n\n  const [index, setIndex] = createSignal(-1);\n\n  const [local, others] = splitProps(props as TabPanelProps<\"div\">, [\"ref\", \"class\", \"children\"]);\n\n  const isSelected = () => tabsContext.isSelectedIndex(index());\n\n  const tabId = () => tabsContext.getTabId(index());\n\n  const tabPanelId = () => tabsContext.getTabPanelId(index());\n\n  const assignTabPanelRef = (el: HTMLDivElement) => {\n    setIndex(tabsContext.registerTabPanel(el));\n\n    if (isFunction(local.ref)) {\n      local.ref(el);\n    } else {\n      // eslint-disable-next-line solid/reactivity\n      local.ref = el;\n    }\n  };\n\n  const resolvedChildren = children(() => local.children);\n\n  const classes = () => {\n    return classNames(local.class, hopeTabPanelClass, tabPanelStyles());\n  };\n\n  return (\n    <Box\n      ref={assignTabPanelRef}\n      role=\"tabpanel\"\n      tabIndex=\"0\"\n      id={tabPanelId()}\n      aria-labelledby={tabId()}\n      hidden={!isSelected()}\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.tabPanel}\n      {...others}\n    >\n      <Show when={isSelected()}>\n        <Show when={tabsContext.state.keepAlive} fallback={local.children}>\n          {resolvedChildren()}\n        </Show>\n      </Show>\n    </Box>\n  );\n}\n\nTabPanel.toString = () => createClassSelector(hopeTabPanelClass);\n"
  },
  {
    "path": "packages/solid/src/components/tabs/tab.tsx",
    "content": "import { createSignal, JSX, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { isFunction } from \"../../utils/assertion\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { callHandler } from \"../../utils/function\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useTabsContext } from \"./tabs\";\nimport { tabStyles } from \"./tabs.styles\";\n\ninterface TabOptions {\n  /**\n   * The `id` of the tab-panel activated by this tab.\n   */\n  panelId?: string;\n}\n\nexport type TabProps<C extends ElementType = \"button\"> = HTMLHopeProps<C, TabOptions>;\n\nconst hopeTabClass = \"hope-tabs__tab\";\n\n/**\n * Tab button used to activate a specific tab panel. It renders a `button` by default.\n */\nexport function Tab<C extends ElementType = \"button\">(props: TabProps<C>) {\n  const theme = useStyleConfig().Tabs;\n\n  const tabsContext = useTabsContext();\n\n  const [index, setIndex] = createSignal(-1);\n\n  const [local, others] = splitProps(props as TabProps<\"button\">, [\n    \"ref\",\n    \"class\",\n    \"disabled\",\n    \"onClick\",\n    \"onFocus\",\n  ]);\n\n  const isSelected = () => tabsContext.isSelectedIndex(index());\n\n  const tabId = () => tabsContext.getTabId(index());\n\n  const tabPanelId = () => tabsContext.getTabPanelId(index());\n\n  const assignTabRef = (el: HTMLButtonElement) => {\n    setIndex(tabsContext.registerTab(el));\n\n    if (isFunction(local.ref)) {\n      local.ref(el);\n    } else {\n      // eslint-disable-next-line solid/reactivity\n      local.ref = el;\n    }\n  };\n\n  const onClick: JSX.EventHandlerUnion<HTMLButtonElement, MouseEvent> = event => {\n    tabsContext.setSelectedIndex(index());\n\n    callHandler(local.onClick, event);\n  };\n\n  const onFocus: JSX.EventHandlerUnion<HTMLButtonElement, FocusEvent> = event => {\n    tabsContext.setSelectedIndex(index());\n\n    callHandler(local.onFocus, event);\n  };\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeTabClass,\n      tabStyles({\n        orientation: tabsContext.state.orientation,\n        variant: tabsContext.state.variant,\n        colorScheme: tabsContext.state.colorScheme,\n        size: tabsContext.state.size,\n        fitted: tabsContext.state.fitted,\n      })\n    );\n  };\n\n  return (\n    <hope.button\n      ref={assignTabRef}\n      role=\"tab\"\n      type=\"button\"\n      id={tabId()}\n      tabIndex={isSelected() ? 0 : -1}\n      disabled={local.disabled}\n      aria-selected={isSelected()}\n      aria-controls={tabPanelId()}\n      class={classes()}\n      __baseStyle={theme?.baseStyle?.tab}\n      onClick={onClick}\n      onFocus={onFocus}\n      {...others}\n    />\n  );\n}\n\nTab.toString = () => createClassSelector(hopeTabClass);\n"
  },
  {
    "path": "packages/solid/src/components/tabs/tabs.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css } from \"../../styled-system/stitches.config\";\nimport { SystemStyleObject } from \"../../styled-system/types\";\n\n/* -------------------------------------------------------------------------------------------------\n * Tabs\n * -----------------------------------------------------------------------------------------------*/\n\nexport const tabsStyles = css({\n  variants: {\n    orientation: {\n      horizontal: {\n        display: \"block\",\n      },\n      vertical: {\n        display: \"flex\",\n      },\n    },\n  },\n});\n\nexport type TabsVariants = VariantProps<typeof tabsStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * TabList\n * -----------------------------------------------------------------------------------------------*/\n\nexport const tabListStyles = css({\n  display: \"flex\",\n\n  color: \"$neutral11\",\n  fontWeight: \"$normal\",\n\n  variants: {\n    variant: {\n      underline: {\n        borderWidth: 0,\n        borderStyle: \"solid\",\n        borderColor: \"$neutral7\",\n      },\n      outline: {\n        borderStyle: \"solid\",\n        borderColor: \"$neutral7\",\n      },\n      cards: {\n        borderStyle: \"solid\",\n        borderColor: \"$neutral7\",\n      },\n      pills: {\n        gap: \"$1_5\",\n      },\n    },\n    alignment: {\n      start: {\n        justifyContent: \"flex-start\",\n      },\n      end: {\n        justifyContent: \"flex-end\",\n      },\n      center: {\n        justifyContent: \"center\",\n      },\n      apart: {\n        justifyContent: \"space-between\",\n      },\n    },\n    orientation: {\n      horizontal: {\n        flexDirection: \"row\",\n      },\n      vertical: {\n        flexDirection: \"column\",\n      },\n    },\n  },\n  compoundVariants: [\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - underline + orientation\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"underline\",\n      orientation: \"horizontal\",\n      css: {\n        borderBottomWidth: \"1px\",\n      },\n    },\n    {\n      variant: \"underline\",\n      orientation: \"vertical\",\n      css: {\n        borderInlineEndWidth: \"1px\",\n      },\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - outline + orientation\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"outline\",\n      orientation: \"horizontal\",\n      css: {\n        mb: \"-1px\",\n        borderBottomWidth: \"1px\",\n      },\n    },\n    {\n      variant: \"outline\",\n      orientation: \"vertical\",\n      css: {\n        marginInlineEnd: \"-1px\",\n        borderInlineEndWidth: \"1px\",\n      },\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - cards + orientation\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"cards\",\n      orientation: \"horizontal\",\n      css: {\n        mb: \"-1px\",\n        borderBottomWidth: \"1px\",\n      },\n    },\n    {\n      variant: \"cards\",\n      orientation: \"vertical\",\n      css: {\n        marginInlineEnd: \"-1px\",\n        borderInlineEndWidth: \"1px\",\n      },\n    },\n  ],\n});\n\nexport type TabListVariants = VariantProps<typeof tabListStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * Tab\n * -----------------------------------------------------------------------------------------------*/\n\nfunction createSelectedColorVariant(color: string): SystemStyleObject {\n  return {\n    \"&[aria-selected='true']\": {\n      color,\n    },\n  };\n}\n\nfunction createPillsAndColorVariant(config: {\n  color: string;\n  bgColor: string;\n  bgColorHover: string;\n}): SystemStyleObject {\n  return {\n    \"&[aria-selected='true']\": {\n      color: config.color,\n      backgroundColor: config.bgColor,\n    },\n\n    \"&[aria-selected='true']:hover\": {\n      backgroundColor: config.bgColorHover,\n    },\n  };\n}\n\nexport const tabStyles = css({\n  appearance: \"none\",\n\n  display: \"flex\",\n  alignItems: \"center\",\n  justifyContent: \"center\",\n\n  outline: \"none\",\n\n  border: \"$none\",\n  backgroundColor: \"transparent\",\n\n  px: \"$4\",\n\n  color: \"inherit\",\n  fontWeight: \"inherit\",\n\n  cursor: \"pointer\",\n\n  transitionProperty:\n    \"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform\",\n  transitionDuration: \"250ms\",\n\n  \"&:focus\": {\n    zIndex: 1,\n    outline: \"none\",\n    boxShadow: \"$outline\",\n  },\n\n  \"&:disabled\": {\n    opacity: 0.4,\n    cursor: \"not-allowed\",\n  },\n\n  variants: {\n    variant: {\n      underline: {\n        borderWidth: 0,\n        borderStyle: \"solid\",\n        borderColor: \"transparent\",\n\n        \"&[aria-selected='true']\": {\n          borderColor: \"currentColor\",\n        },\n\n        \"&:active\": {\n          backgroundColor: \"$neutral4\",\n        },\n      },\n      outline: {\n        borderWidth: \"1px\",\n        borderStyle: \"solid\",\n        borderColor: \"transparent\",\n\n        \"&[aria-selected='true']\": {\n          borderColor: \"inherit\",\n        },\n      },\n      cards: {\n        borderWidth: \"1px\",\n        borderStyle: \"solid\",\n        borderColor: \"inherit\",\n        backgroundColor: \"$neutral3\",\n\n        \"&[aria-selected='true']\": {\n          borderColor: \"inherit\",\n          backgroundColor: \"$loContrast\",\n        },\n      },\n      pills: {\n        borderRadius: \"$sm\",\n\n        \"&:hover\": {\n          backgroundColor: \"$neutral3\",\n        },\n\n        \"&:hover:disabled\": {\n          backgroundColor: \"transparent\",\n        },\n      },\n    },\n    colorScheme: {\n      primary: {},\n      accent: {},\n      neutral: {},\n      success: {},\n      info: {},\n      warning: {},\n      danger: {},\n    },\n    size: {\n      sm: {\n        py: \"$1\",\n        fontSize: \"$sm\",\n      },\n      md: {\n        py: \"$2\",\n        fontSize: \"$base\",\n      },\n      lg: {\n        py: \"$3\",\n        fontSize: \"$lg\",\n      },\n    },\n    orientation: {\n      horizontal: {},\n      vertical: {},\n    },\n    fitted: {\n      true: {\n        flex: 1,\n      },\n    },\n  },\n  compoundVariants: [\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - underline + colorScheme\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"underline\",\n      colorScheme: \"primary\",\n      css: createSelectedColorVariant(\"$primary11\"),\n    },\n    {\n      variant: \"underline\",\n      colorScheme: \"accent\",\n      css: createSelectedColorVariant(\"$accent11\"),\n    },\n    {\n      variant: \"underline\",\n      colorScheme: \"neutral\",\n      css: createSelectedColorVariant(\"$neutral12\"),\n    },\n    {\n      variant: \"underline\",\n      colorScheme: \"success\",\n      css: createSelectedColorVariant(\"$success11\"),\n    },\n    {\n      variant: \"underline\",\n      colorScheme: \"info\",\n      css: createSelectedColorVariant(\"$info11\"),\n    },\n    {\n      variant: \"underline\",\n      colorScheme: \"warning\",\n      css: createSelectedColorVariant(\"$warning11\"),\n    },\n    {\n      variant: \"underline\",\n      colorScheme: \"danger\",\n      css: createSelectedColorVariant(\"$danger11\"),\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - outline + colorScheme\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"outline\",\n      colorScheme: \"primary\",\n      css: createSelectedColorVariant(\"$primary11\"),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"accent\",\n      css: createSelectedColorVariant(\"$accent11\"),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"neutral\",\n      css: createSelectedColorVariant(\"$neutral12\"),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"success\",\n      css: createSelectedColorVariant(\"$success11\"),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"info\",\n      css: createSelectedColorVariant(\"$info11\"),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"warning\",\n      css: createSelectedColorVariant(\"$warning11\"),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"danger\",\n      css: createSelectedColorVariant(\"$danger11\"),\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - cards + colorScheme\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"cards\",\n      colorScheme: \"primary\",\n      css: createSelectedColorVariant(\"$primary11\"),\n    },\n    {\n      variant: \"cards\",\n      colorScheme: \"accent\",\n      css: createSelectedColorVariant(\"$accent11\"),\n    },\n    {\n      variant: \"cards\",\n      colorScheme: \"neutral\",\n      css: createSelectedColorVariant(\"$neutral12\"),\n    },\n    {\n      variant: \"cards\",\n      colorScheme: \"success\",\n      css: createSelectedColorVariant(\"$success11\"),\n    },\n    {\n      variant: \"cards\",\n      colorScheme: \"info\",\n      css: createSelectedColorVariant(\"$info11\"),\n    },\n    {\n      variant: \"cards\",\n      colorScheme: \"warning\",\n      css: createSelectedColorVariant(\"$warning11\"),\n    },\n    {\n      variant: \"cards\",\n      colorScheme: \"danger\",\n      css: createSelectedColorVariant(\"$danger11\"),\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - pills + colorScheme\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"pills\",\n      colorScheme: \"primary\",\n      css: createPillsAndColorVariant({\n        color: \"$primary11\",\n        bgColor: \"$primary3\",\n        bgColorHover: \"$primary4\",\n      }),\n    },\n    {\n      variant: \"pills\",\n      colorScheme: \"accent\",\n      css: createPillsAndColorVariant({\n        color: \"$accent11\",\n        bgColor: \"$accent3\",\n        bgColorHover: \"$accent4\",\n      }),\n    },\n    {\n      variant: \"pills\",\n      colorScheme: \"neutral\",\n      css: createPillsAndColorVariant({\n        color: \"$neutral12\",\n        bgColor: \"$neutral3\",\n        bgColorHover: \"$neutral4\",\n      }),\n    },\n    {\n      variant: \"pills\",\n      colorScheme: \"success\",\n      css: createPillsAndColorVariant({\n        color: \"$success11\",\n        bgColor: \"$success3\",\n        bgColorHover: \"$success4\",\n      }),\n    },\n    {\n      variant: \"pills\",\n      colorScheme: \"info\",\n      css: createPillsAndColorVariant({\n        color: \"$info11\",\n        bgColor: \"$info3\",\n        bgColorHover: \"$info4\",\n      }),\n    },\n    {\n      variant: \"pills\",\n      colorScheme: \"warning\",\n      css: createPillsAndColorVariant({\n        color: \"$warning11\",\n        bgColor: \"$warning3\",\n        bgColorHover: \"$warning4\",\n      }),\n    },\n    {\n      variant: \"pills\",\n      colorScheme: \"danger\",\n      css: createPillsAndColorVariant({\n        color: \"$danger11\",\n        bgColor: \"$danger3\",\n        bgColorHover: \"$danger4\",\n      }),\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - underline + orientation\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"underline\",\n      orientation: \"horizontal\",\n      css: {\n        borderBottomWidth: \"2px\",\n        marginBottom: \"-1px\",\n      },\n    },\n    {\n      variant: \"underline\",\n      orientation: \"vertical\",\n      css: {\n        borderInlineEndWidth: \"2px\",\n        marginInlineEnd: \"-1px\",\n      },\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - outline + orientation\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"outline\",\n      orientation: \"horizontal\",\n      css: {\n        mb: \"-1px\",\n        borderTopRadius: \"$sm\",\n\n        \"&[aria-selected='true']\": {\n          borderBottomColor: \"$loContrast\",\n        },\n      },\n    },\n    {\n      variant: \"outline\",\n      orientation: \"vertical\",\n      css: {\n        marginInlineEnd: \"-1px\",\n        borderStartRadius: \"$radii$sm\",\n\n        \"&[aria-selected='true']\": {\n          borderInlineEndColor: \"$colors$loContrast\",\n        },\n      },\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - cards + orientation\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"cards\",\n      orientation: \"horizontal\",\n      css: {\n        mb: \"-1px\",\n        borderBottomWidth: \"1px\",\n\n        \"&:not(:last-of-type)\": {\n          marginInlineEnd: \"-1px\",\n        },\n\n        \"&[aria-selected='true']\": {\n          borderTopColor: \"currentColor\",\n          borderBottomColor: \"transparent\",\n        },\n      },\n    },\n    {\n      variant: \"cards\",\n      orientation: \"vertical\",\n      css: {\n        marginInlineEnd: \"-1px\",\n        borderInlineEndWidth: \"1px\",\n\n        \"&:not(:last-of-type)\": {\n          mb: \"-1px\",\n        },\n\n        \"&[aria-selected='true']\": {\n          borderInlineStartColor: \"currentColor\",\n          borderInlineEndColor: \"transparent\",\n        },\n      },\n    },\n  ],\n});\n\nexport type TabVariants = VariantProps<typeof tabStyles>;\n\n/* -------------------------------------------------------------------------------------------------\n * TabPanel\n * -----------------------------------------------------------------------------------------------*/\n\nexport const tabPanelStyles = css({\n  outline: \"none\",\n  padding: \"$4\",\n});\n"
  },
  {
    "path": "packages/solid/src/components/tabs/tabs.tsx",
    "content": "import {\n  createContext,\n  createMemo,\n  createSignal,\n  createUniqueId,\n  splitProps,\n  useContext,\n} from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { SystemStyleObject } from \"../../styled-system/types\";\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { getNextIndex, getPrevIndex } from \"../../utils/number\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { TabListVariants, tabsStyles, TabVariants } from \"./tabs.styles\";\n\ntype ThemeableTabsOptions = Pick<TabListVariants, \"alignment\"> &\n  Omit<TabVariants, \"orientation\"> & {\n    /**\n     * If `true`, the content of inactive tab panels stays mounted when unselected.\n     */\n    keepAlive?: boolean;\n  };\n\ninterface TabsOptions extends ThemeableTabsOptions {\n  /**\n   * The orientation of the tab list.\n   */\n  orientation?: \"horizontal\" | \"vertical\";\n\n  /**\n   * The index of the selected tab.\n   * (in controlled mode)\n   */\n  index?: number;\n\n  /**\n   * The initial index of the selected tab.\n   * (in uncontrolled mode)\n   */\n  defaultIndex?: number;\n\n  /**\n   * The id of the tabs component.\n   */\n  id?: string;\n\n  /**\n   * Callback invoked when the index changes.\n   * (in controlled mode)\n   */\n  onChange?: (index: number) => void;\n}\n\nexport type TabsProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, TabsOptions>;\n\ninterface TabsState extends Required<TabVariants> {\n  /**\n   * The index of the selected tab.\n   * (In uncontrolled mode)\n   */\n  _selectedIndex: number;\n\n  /**\n   * If `true`, the tabs is in controlled mode.\n   * (have index and onChange props)\n   */\n  isControlled: boolean;\n\n  /**\n   * The index of the selected tab.\n   * (in controlled mode)\n   */\n  selectedIndex: number;\n\n  /**\n   * The base id used as prefix for tab and tab-panel ids.\n   */\n  baseId: string;\n\n  /**\n   * If `true`, the content of inactive tab panels stays mounted when unselected.\n   */\n  keepAlive: boolean;\n\n  /**\n   * The orientation of the tab list.\n   */\n  orientation: \"horizontal\" | \"vertical\";\n\n  /**\n   * The alignment of tabs in the tablist.\n   */\n  alignment: TabListVariants[\"alignment\"];\n\n  /**\n   * All tab nodes.\n   */\n  //tabs: Array<HTMLButtonElement>;\n\n  /**\n   * All tab panel nodes.\n   */\n  //tabPanels: Array<HTMLElement>;\n}\n\nconst hopeTabsClass = \"hope-tabs\";\n\n/**\n * Tabs provides context and logic for all tabs components.\n */\nexport function Tabs<C extends ElementType = \"div\">(props: TabsProps<C>) {\n  const defaultBaseId = `hope-tabs-${createUniqueId()}`;\n\n  const theme = useStyleConfig().Tabs;\n\n  const [tabs, setTabs] = createSignal<Array<HTMLButtonElement>>([]);\n  const [tabPanels, setTabPanels] = createSignal<Array<HTMLElement>>([]);\n\n  const [state, setState] = createStore<TabsState>({\n    // eslint-disable-next-line solid/reactivity\n    _selectedIndex: props.defaultIndex ?? 0,\n    //tabs: [],\n    //tabPanels: [],\n    get isControlled() {\n      return props.index !== undefined;\n    },\n    get selectedIndex() {\n      return this.isControlled ? props.index : this._selectedIndex;\n    },\n    get baseId() {\n      return props.id ?? defaultBaseId;\n    },\n    get orientation() {\n      return props.orientation ?? \"horizontal\";\n    },\n    get keepAlive() {\n      return props.keepAlive ?? theme?.defaultProps?.root?.keepAlive ?? false;\n    },\n    get alignment() {\n      return props.alignment ?? theme?.defaultProps?.root?.alignment ?? \"start\";\n    },\n    get variant() {\n      return props.variant ?? theme?.defaultProps?.root?.variant ?? \"underline\";\n    },\n    get colorScheme() {\n      return props.colorScheme ?? theme?.defaultProps?.root?.colorScheme ?? \"primary\";\n    },\n    get size() {\n      return props.size ?? theme?.defaultProps?.root?.size ?? \"md\";\n    },\n    get fitted() {\n      return props.fitted ?? theme?.defaultProps?.root?.fitted ?? false;\n    },\n  });\n\n  // eslint-disable-next-line @typescript-eslint/no-unused-vars\n  const [local, _, others] = splitProps(\n    props,\n    [\"class\", \"onChange\"],\n    [\n      \"index\",\n      \"defaultIndex\",\n      \"keepAlive\",\n      \"alignment\",\n      \"orientation\",\n      \"variant\",\n      \"colorScheme\",\n      \"size\",\n      \"fitted\",\n    ]\n  );\n\n  const reverseTabs = createMemo(() => tabs().slice().reverse());\n\n  const setSelectedIndex = (index: number) => {\n    setState(\"_selectedIndex\", index);\n\n    local.onChange?.(index);\n  };\n\n  const isSelectedIndex = (index: number) => {\n    return index === state.selectedIndex;\n  };\n\n  const getTabId = (index: number) => {\n    return `${state.baseId}--tab-${index}`;\n  };\n\n  const getTabPanelId = (index: number) => {\n    return `${state.baseId}--tabpanel-${index}`;\n  };\n\n  const registerTab = (node: HTMLButtonElement) => {\n    return setTabs(prev => [...prev, node]).length - 1;\n  };\n\n  const registerTabPanel = (node: HTMLElement) => {\n    return setTabPanels(prev => [...prev, node]).length - 1;\n  };\n\n  const focusNextTab = () => {\n    const lastIndex = tabs().length - 1;\n    let nextIndex = getNextIndex(state.selectedIndex, lastIndex, true);\n    let nextTab = tabs()[nextIndex];\n\n    while (nextTab.disabled) {\n      nextIndex = getNextIndex(nextIndex, lastIndex, true);\n      nextTab = tabs()[nextIndex];\n    }\n\n    nextTab.focus();\n  };\n\n  const focusPrevTab = () => {\n    const lastIndex = tabs().length - 1;\n    let prevIndex = getPrevIndex(state.selectedIndex, lastIndex, true);\n    let prevTab = tabs()[prevIndex];\n\n    while (prevTab.disabled) {\n      prevIndex = getPrevIndex(prevIndex, lastIndex, true);\n      prevTab = tabs()[prevIndex];\n    }\n\n    prevTab.focus();\n  };\n\n  const focusFirstTab = () => {\n    tabs()\n      .find(tab => !tab.disabled)\n      ?.focus();\n  };\n\n  const focusLastTab = () => {\n    reverseTabs()\n      .find(tab => !tab.disabled)\n      ?.focus();\n  };\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeTabsClass,\n      tabsStyles({\n        orientation: state.orientation,\n      })\n    );\n  };\n\n  const context: TabsContextValue = {\n    state: state as TabsState,\n    setSelectedIndex,\n    isSelectedIndex,\n    getTabId,\n    getTabPanelId,\n    registerTab,\n    registerTabPanel,\n    focusPrevTab,\n    focusNextTab,\n    focusFirstTab,\n    focusLastTab,\n  };\n\n  return (\n    <TabsContext.Provider value={context}>\n      <Box class={classes()} __baseStyle={theme?.baseStyle?.root} {...others} />\n    </TabsContext.Provider>\n  );\n}\n\nTabs.toString = () => createClassSelector(hopeTabsClass);\n\n/* -------------------------------------------------------------------------------------------------\n * Context\n * -----------------------------------------------------------------------------------------------*/\n\ninterface TabsContextValue {\n  state: TabsState;\n\n  /**\n   * Callback to set the active tab index.\n   */\n  setSelectedIndex: (index: number) => void;\n\n  /**\n   * Return `true` if the given index is the selected one.\n   */\n  isSelectedIndex: (index: number) => boolean;\n\n  /**\n   * Return the tab `id` of the given index.\n   */\n  getTabId: (index: number) => string;\n\n  /**\n   * Return the tab panel `id` of the given index.\n   */\n  getTabPanelId: (index: number) => string;\n\n  /**\n   * Register a `Tab` to the context.\n   * @return The index of the tab.\n   */\n  registerTab: (node: HTMLButtonElement) => number;\n\n  /**\n   * Register a `TabPanel` to the context.\n   * @return The index of the tab panel.\n   */\n  registerTabPanel: (node: HTMLElement) => number;\n\n  /**\n   * Focus the previous non disabled tab.\n   */\n  focusPrevTab: () => void;\n\n  /**\n   * Focus the next non disabled tab.\n   */\n  focusNextTab: () => void;\n\n  /**\n   * Focus the first non disabled tab.\n   */\n  focusFirstTab: () => void;\n\n  /**\n   * Focus the last non disabled tab.\n   */\n  focusLastTab: () => void;\n}\n\nconst TabsContext = createContext<TabsContextValue>();\n\nexport function useTabsContext() {\n  const context = useContext(TabsContext);\n\n  if (!context) {\n    throw new Error(\"[Hope UI]: useTabsContext must be used within a `<Tabs />` component\");\n  }\n\n  return context;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * StyleConfig\n * -----------------------------------------------------------------------------------------------*/\n\nexport interface TabsStyleConfig {\n  baseStyle?: {\n    root?: SystemStyleObject;\n    tabList?: SystemStyleObject;\n    tab?: SystemStyleObject;\n    tabPanel?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: ThemeableTabsOptions;\n  };\n}\n"
  },
  {
    "path": "packages/solid/src/components/tag/__tests__/tag-close-button.test.tsx",
    "content": "import { JSX } from \"solid-js\";\nimport { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { Tag } from \"../tag\";\nimport { tagCloseButtonStyles } from \"../tag.styles\";\nimport { TagCloseButton } from \"../tag-close-button\";\n\nfunction renderWithTagContext(callback: () => JSX.Element) {\n  return renderWithHopeProvider(() => <Tag>{callback()}</Tag>);\n}\n\ndescribe(\"TagCloseButton\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithTagContext(() => <TagCloseButton aria-label=\"Close\" />);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toBeInTheDocument();\n  });\n\n  it(\"should render <button> tag by default\", () => {\n    // act\n    renderWithTagContext(() => <TagCloseButton aria-label=\"Close\" />);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toBeInstanceOf(HTMLButtonElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithTagContext(() => <TagCloseButton as=\"a\" aria-label=\"Close\" />);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toBeInstanceOf(HTMLAnchorElement);\n  });\n\n  it(\"should have type=button\", () => {\n    // act\n    renderWithTagContext(() => <TagCloseButton aria-label=\"Close\" />);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveAttribute(\"type\", \"button\");\n  });\n\n  it(\"should have role=button\", () => {\n    // act\n    renderWithTagContext(() => <TagCloseButton aria-label=\"Close\" />);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveAttribute(\"role\", \"button\");\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithTagContext(() => <TagCloseButton aria-label=\"Close\" />);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveClass(\"hope-tag-close-button\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(TagCloseButton.toString()).toBe(\".hope-tag-close-button\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithTagContext(() => <TagCloseButton class={stubClass} aria-label=\"Close\" />);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithTagContext(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <TagCloseButton className={stubClass} aria-label=\"Close\" />\n    ));\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithTagContext(() => (\n      <TagCloseButton classList={{ [stubClass]: true }} aria-label=\"Close\" />\n    ));\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from tagCloseButtonStyles\", () => {\n    // arrange\n    const tagCloseButtonClass = tagCloseButtonStyles();\n\n    // act\n    renderWithTagContext(() => <TagCloseButton aria-label=\"Close\" />);\n    const button = screen.getByRole(\"button\");\n\n    // assert\n    expect(button).toHaveClass(tagCloseButtonClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/tag/__tests__/tag-icon.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { IconCheckCircleSolid } from \"../../icons/IconCheckCircleSolid\";\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { tagLeftIconStyles, tagRightIconStyles } from \"../tag.styles\";\nimport { TagLeftIcon, TagRightIcon } from \"../tag-icon\";\n\ndescribe(\"TagLeftIcon\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <TagLeftIcon data-testid=\"tag-left-icon\" as={IconCheckCircleSolid} />\n    ));\n    const tagLeftIcon = screen.getByTestId(\"tag-left-icon\");\n\n    // assert\n    expect(tagLeftIcon).toBeInTheDocument();\n  });\n\n  it(\"should render content provided by the 'as' prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <TagLeftIcon data-testid=\"tag-left-icon\" as={IconCheckCircleSolid} />\n    ));\n    const tagLeftIcon = screen.getByTestId(\"tag-left-icon\");\n\n    // assert\n    expect(tagLeftIcon).toBeInstanceOf(SVGElement);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <TagLeftIcon data-testid=\"tag-left-icon\" as={IconCheckCircleSolid} />\n    ));\n    const tagLeftIcon = screen.getByTestId(\"tag-left-icon\");\n\n    // assert\n    expect(tagLeftIcon).toHaveClass(\"hope-tag-left-icon\");\n  });\n\n  it(\"should return semantic hope class of <Icon/> as css selector when calling toString()\", () => {\n    expect(TagLeftIcon.toString()).toBe(\".hope-tag-left-icon\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <TagLeftIcon data-testid=\"tag-left-icon\" class={stubClass} as={IconCheckCircleSolid} />\n    ));\n    const tagLeftIcon = screen.getByTestId(\"tag-left-icon\");\n\n    // assert\n    expect(tagLeftIcon).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <TagLeftIcon data-testid=\"tag-left-icon\" className={stubClass} as={IconCheckCircleSolid} />\n    ));\n    const tagLeftIcon = screen.getByTestId(\"tag-left-icon\");\n\n    // assert\n    expect(tagLeftIcon).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <TagLeftIcon\n        data-testid=\"tag-left-icon\"\n        classList={{ [stubClass]: true }}\n        as={IconCheckCircleSolid}\n      />\n    ));\n    const tagLeftIcon = screen.getByTestId(\"tag-left-icon\");\n\n    // assert\n    expect(tagLeftIcon).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from tagLeftIconStyles\", () => {\n    // arrange\n    const tagLeftIconClass = tagLeftIconStyles();\n\n    // act\n    renderWithHopeProvider(() => (\n      <TagLeftIcon data-testid=\"tag-left-icon\" as={IconCheckCircleSolid} />\n    ));\n    const tagLeftIcon = screen.getByTestId(\"tag-left-icon\");\n\n    // assert\n    expect(tagLeftIcon).toHaveClass(tagLeftIconClass.className);\n  });\n});\n\ndescribe(\"TagRightIcon\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <TagRightIcon data-testid=\"tag-right-icon\" as={IconCheckCircleSolid} />\n    ));\n    const tagRightIcon = screen.getByTestId(\"tag-right-icon\");\n\n    // assert\n    expect(tagRightIcon).toBeInTheDocument();\n  });\n\n  it(\"should render content provided by the 'as' prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <TagRightIcon data-testid=\"tag-right-icon\" as={IconCheckCircleSolid} />\n    ));\n    const tagRightIcon = screen.getByTestId(\"tag-right-icon\");\n\n    // assert\n    expect(tagRightIcon).toBeInstanceOf(SVGElement);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <TagRightIcon data-testid=\"tag-right-icon\" as={IconCheckCircleSolid} />\n    ));\n    const tagRightIcon = screen.getByTestId(\"tag-right-icon\");\n\n    // assert\n    expect(tagRightIcon).toHaveClass(\"hope-tag-right-icon\");\n  });\n\n  it(\"should return semantic hope class of <Icon/> as css selector when calling toString()\", () => {\n    expect(TagRightIcon.toString()).toBe(\".hope-tag-right-icon\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <TagRightIcon data-testid=\"tag-right-icon\" class={stubClass} as={IconCheckCircleSolid} />\n    ));\n    const tagRightIcon = screen.getByTestId(\"tag-right-icon\");\n\n    // assert\n    expect(tagRightIcon).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <TagRightIcon data-testid=\"tag-right-icon\" className={stubClass} as={IconCheckCircleSolid} />\n    ));\n    const tagRightIcon = screen.getByTestId(\"tag-right-icon\");\n\n    // assert\n    expect(tagRightIcon).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <TagRightIcon\n        data-testid=\"tag-right-icon\"\n        classList={{ [stubClass]: true }}\n        as={IconCheckCircleSolid}\n      />\n    ));\n    const tagRightIcon = screen.getByTestId(\"tag-right-icon\");\n\n    // assert\n    expect(tagRightIcon).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from tagRightIconStyles\", () => {\n    // arrange\n    const tagRightIconClass = tagRightIconStyles();\n\n    // act\n    renderWithHopeProvider(() => (\n      <TagRightIcon data-testid=\"tag-right-icon\" as={IconCheckCircleSolid} />\n    ));\n    const tagRightIcon = screen.getByTestId(\"tag-right-icon\");\n\n    // assert\n    expect(tagRightIcon).toHaveClass(tagRightIconClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/tag/__tests__/tag-label.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { tagLabelStyles } from \"../tag.styles\";\nimport { TagLabel } from \"../tag-label\";\n\ndescribe(\"TagLabel\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <TagLabel data-testid=\"tag-label\">TagLabel</TagLabel>);\n    const tagLabel = screen.getByTestId(\"tag-label\");\n\n    // assert\n    expect(tagLabel).toBeInTheDocument();\n  });\n\n  it(\"should render <span> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <TagLabel data-testid=\"tag-label\">TagLabel</TagLabel>);\n    const tagLabel = screen.getByTestId(\"tag-label\");\n\n    // assert\n    expect(tagLabel).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <TagLabel data-testid=\"tag-label\" as=\"p\">\n        TagLabel\n      </TagLabel>\n    ));\n    const tagLabel = screen.getByTestId(\"tag-label\");\n\n    // assert\n    expect(tagLabel).toBeInstanceOf(HTMLParagraphElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"TagLabel\";\n\n    // act\n    renderWithHopeProvider(() => <TagLabel data-testid=\"tag-label\">{children}</TagLabel>);\n    const tagLabel = screen.getByTestId(\"tag-label\");\n\n    // assert\n    expect(tagLabel).toHaveTextContent(children);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <TagLabel data-testid=\"tag-label\">TagLabel</TagLabel>);\n    const tagLabel = screen.getByTestId(\"tag-label\");\n\n    // assert\n    expect(tagLabel).toHaveClass(\"hope-tag-label\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(TagLabel.toString()).toBe(\".hope-tag-label\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <TagLabel data-testid=\"tag-label\" class={stubClass}>\n        TagLabel\n      </TagLabel>\n    ));\n    const tagLabel = screen.getByTestId(\"tag-label\");\n\n    // assert\n    expect(tagLabel).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <TagLabel data-testid=\"tag-label\" className={stubClass}>\n        TagLabel\n      </TagLabel>\n    ));\n    const tagLabel = screen.getByTestId(\"tag-label\");\n\n    // assert\n    expect(tagLabel).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <TagLabel data-testid=\"tag-label\" classList={{ [stubClass]: true }}>\n        TagLabel\n      </TagLabel>\n    ));\n    const tagLabel = screen.getByTestId(\"tag-label\");\n\n    // assert\n    expect(tagLabel).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from tagLabelStyles\", () => {\n    // arrange\n    const tagLabelClass = tagLabelStyles();\n\n    // act\n    renderWithHopeProvider(() => <TagLabel data-testid=\"tag-label\">Tag</TagLabel>);\n    const tagLabel = screen.getByTestId(\"tag-label\");\n\n    // assert\n    expect(tagLabel).toHaveClass(tagLabelClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/tag/__tests__/tag.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../../test-utils\";\nimport { Tag } from \"../tag\";\nimport { tagStyles, TagVariants } from \"../tag.styles\";\n\ndescribe(\"Tag\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Tag data-testid=\"tag\">Tag</Tag>);\n    const tag = screen.getByTestId(\"tag\");\n\n    // assert\n    expect(tag).toBeInTheDocument();\n  });\n\n  it(\"should render <span> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <Tag data-testid=\"tag\">Tag</Tag>);\n    const tag = screen.getByTestId(\"tag\");\n\n    // assert\n    expect(tag).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <Tag data-testid=\"tag\" as=\"div\">\n        Tag\n      </Tag>\n    ));\n    const tag = screen.getByTestId(\"tag\");\n\n    // assert\n    expect(tag).toBeInstanceOf(HTMLDivElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"Tag\";\n\n    // act\n    renderWithHopeProvider(() => <Tag data-testid=\"tag\">{children}</Tag>);\n    const tag = screen.getByTestId(\"tag\");\n\n    // assert\n    expect(tag).toHaveTextContent(children);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <Tag data-testid=\"tag\">Tag</Tag>);\n    const tag = screen.getByTestId(\"tag\");\n\n    // assert\n    expect(tag).toHaveClass(\"hope-tag\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(Tag.toString()).toBe(\".hope-tag\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Tag data-testid=\"tag\" class={stubClass}>\n        Tag\n      </Tag>\n    ));\n    const tag = screen.getByTestId(\"tag\");\n\n    // assert\n    expect(tag).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <Tag data-testid=\"tag\" className={stubClass}>\n        Tag\n      </Tag>\n    ));\n    const tag = screen.getByTestId(\"tag\");\n\n    // assert\n    expect(tag).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Tag data-testid=\"tag\" classList={{ [stubClass]: true }}>\n        Tag\n      </Tag>\n    ));\n    const tag = screen.getByTestId(\"tag\");\n\n    // assert\n    expect(tag).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from variants prop\", () => {\n    // arrange\n    const variantProps: TagVariants = {\n      variant: \"subtle\",\n      colorScheme: \"success\",\n      size: \"lg\",\n    };\n    const tagClass = tagStyles(variantProps);\n\n    // act\n    renderWithHopeProvider(() => (\n      <Tag data-testid=\"tag\" {...variantProps}>\n        Tag\n      </Tag>\n    ));\n    const tag = screen.getByTestId(\"tag\");\n\n    // assert\n    expect(tag).toHaveClass(tagClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/tag/index.ts",
    "content": "export * from \"./tag\";\nexport * from \"./tag.styles\";\nexport * from \"./tag-close-button\";\nexport * from \"./tag-icon\";\nexport * from \"./tag-label\";\n"
  },
  {
    "path": "packages/solid/src/components/tag/tag-close-button.tsx",
    "content": "import { mergeProps, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { IconCloseSmall } from \"../icons/IconCloseSmall\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { useTagContext } from \"./tag\";\nimport { tagCloseButtonStyles } from \"./tag.styles\";\n\ninterface TagCloseButtonOptions {\n  \"aria-label\"?: string;\n}\n\nexport type TagCloseButtonProps<C extends ElementType = \"button\"> = HTMLHopeProps<\n  C,\n  TagCloseButtonOptions\n>;\n\nconst hopeTagCloseButtonClass = \"hope-tag-close-button\";\n\n/**\n * TagCloseButton is used to close \"remove\" the tag\n */\nexport function TagCloseButton<C extends ElementType = \"button\">(props: TagCloseButtonProps<C>) {\n  const theme = useStyleConfig().Tag;\n\n  const tagContext = useTagContext();\n\n  const defaultProps: TagCloseButtonProps<\"button\"> = {\n    type: \"button\",\n    role: \"button\",\n    \"aria-label\": \"Close\",\n  };\n\n  const propsWithDefault = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault as TagCloseButtonProps<\"button\">, [\n    \"class\",\n    \"children\",\n  ]);\n\n  const classes = () =>\n    classNames(\n      local.class,\n      hopeTagCloseButtonClass,\n      tagCloseButtonStyles({\n        size: tagContext.size(),\n      })\n    );\n\n  return (\n    <hope.button class={classes()} __baseStyle={theme?.baseStyle?.closeButton} {...others}>\n      <IconCloseSmall />\n    </hope.button>\n  );\n}\n\nTagCloseButton.toString = () => createClassSelector(hopeTagCloseButtonClass);\n"
  },
  {
    "path": "packages/solid/src/components/tag/tag-icon.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Icon, IconProps } from \"../icon/icon\";\nimport { ElementType } from \"../types\";\nimport { tagLeftIconStyles, tagRightIconStyles } from \"./tag.styles\";\n\n/* -------------------------------------------------------------------------------------------------\n * TagLeftIcon\n * -----------------------------------------------------------------------------------------------*/\n\nexport type TagLeftIconProps<C extends ElementType = \"svg\"> = IconProps<C>;\n\nconst hopeTagLeftIconClass = \"hope-tag-left-icon\";\n\nexport function TagLeftIcon<C extends ElementType = \"svg\">(props: TagLeftIconProps<C>) {\n  const theme = useStyleConfig().Tag;\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeTagLeftIconClass, tagLeftIconStyles());\n\n  return <Icon class={classes()} __baseStyle={theme?.baseStyle?.icon} {...others} />;\n}\n\nTagLeftIcon.toString = () => createClassSelector(hopeTagLeftIconClass);\n\n/* -------------------------------------------------------------------------------------------------\n * TagRightIcon\n * -----------------------------------------------------------------------------------------------*/\n\nexport type TagRightIconProps<C extends ElementType = \"svg\"> = IconProps<C>;\n\nconst hopeTagRightIconClass = \"hope-tag-right-icon\";\n\nexport function TagRightIcon<C extends ElementType = \"svg\">(props: TagRightIconProps<C>) {\n  const theme = useStyleConfig().Tag;\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeTagRightIconClass, tagRightIconStyles());\n\n  return <Icon class={classes()} __baseStyle={theme?.baseStyle?.icon} {...others} />;\n}\n\nTagRightIcon.toString = () => createClassSelector(hopeTagRightIconClass);\n"
  },
  {
    "path": "packages/solid/src/components/tag/tag-label.tsx",
    "content": "import { splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { tagLabelStyles } from \"./tag.styles\";\n\nexport type TagLabelProps<C extends ElementType = \"span\"> = HTMLHopeProps<C>;\n\nconst hopeTagLabelClass = \"hope-tag-label\";\n\nexport function TagLabel<C extends ElementType = \"span\">(props: TagLabelProps<C>) {\n  const theme = useStyleConfig().Tag;\n\n  const [local, others] = splitProps(props, [\"class\"]);\n\n  const classes = () => classNames(local.class, hopeTagLabelClass, tagLabelStyles());\n\n  return <hope.span class={classes()} __baseStyle={theme?.baseStyle?.label} {...others} />;\n}\n\nTagLabel.toString = () => createClassSelector(hopeTagLabelClass);\n"
  },
  {
    "path": "packages/solid/src/components/tag/tag.stories.tsx",
    "content": "import { action } from \"@storybook/addon-actions\";\n\nimport { IconInfoCircleSolid } from \"../icons/IconInfoCircleSolid\";\nimport { HStack } from \"../stack/stack\";\nimport { HopeWrapper } from \"../storybook-utils\";\nimport { Tag } from \"./tag\";\nimport { TagCloseButton } from \"./tag-close-button\";\nimport { TagLeftIcon, TagRightIcon } from \"./tag-icon\";\nimport { TagLabel } from \"./tag-label\";\n\nexport default {\n  title: \"Data display/Tag\",\n  component: Tag,\n  parameters: { layout: \"centered\" },\n  decorators: [\n    (Story: any) => (\n      <HopeWrapper>\n        <Story />\n      </HopeWrapper>\n    ),\n  ],\n  argTypes: {\n    variant: {\n      control: { type: \"select\" },\n      options: [\"solid\", \"subtle\", \"outline\", \"dot\"],\n    },\n    colorScheme: {\n      control: { type: \"select\" },\n      options: [\"primary\", \"neutral\", \"success\", \"info\", \"warning\", \"danger\"],\n    },\n    size: {\n      control: { type: \"select\" },\n      options: [\"sm\", \"md\", \"lg\"],\n    },\n    children: {\n      control: \"text\",\n    },\n  },\n  args: {\n    variant: \"subtle\",\n    colorScheme: \"primary\",\n    size: \"sm\",\n    children: \"Tag\",\n  },\n};\n\nexport const Default = (args: any) => <Tag {...args} />;\n\nexport const WithIcon = (args: any) => (\n  <HStack spacing=\"$4\">\n    <Tag {...args}>\n      <TagLeftIcon as={IconInfoCircleSolid} />\n      <TagLabel>Tag</TagLabel>\n    </Tag>\n    <Tag {...args}>\n      <TagLabel>Tag</TagLabel>\n      <TagRightIcon as={IconInfoCircleSolid} />\n    </Tag>\n  </HStack>\n);\nWithIcon.storyName = \"With icon\";\n\nexport const WithCloseButton = (args: any) => (\n  <Tag {...args}>\n    <TagLabel>Tag</TagLabel>\n    <TagCloseButton onClick={action(\"clicked close button\")} />\n  </Tag>\n);\nWithCloseButton.storyName = \"With close button\";\nWithCloseButton.args = { children: \"Close\" };\n"
  },
  {
    "path": "packages/solid/src/components/tag/tag.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css } from \"../../styled-system/stitches.config\";\nimport { SystemStyleObject } from \"../../styled-system/types\";\n\n/* -------------------------------------------------------------------------------------------------\n * TagRightIcon & TagLeftIcon\n * -----------------------------------------------------------------------------------------------*/\n\nexport const tagRightIconStyles = css({\n  marginInlineStart: \"$2\",\n});\n\nexport const tagLeftIconStyles = css({\n  marginInlineEnd: \"$2\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * TagLabel\n * -----------------------------------------------------------------------------------------------*/\n\nexport const tagLabelStyles = css({\n  noOfLines: 1,\n});\n\n/* -------------------------------------------------------------------------------------------------\n * TagCloseButton\n * -----------------------------------------------------------------------------------------------*/\n\nexport const tagCloseButtonStyles = css({\n  appearance: \"none\",\n  position: \"relative\",\n\n  display: \"inline-flex\",\n  justifyContent: \"center\",\n  alignItems: \"center\",\n\n  outline: \"none\",\n  border: \"1px solid transparent\",\n  borderRadius: \"$full\",\n\n  backgroundColor: \"transparent\",\n\n  padding: \"0\",\n\n  lineHeight: \"$none\",\n  textDecoration: \"none\",\n  color: \"inherit\",\n\n  cursor: \"pointer\",\n  userSelect: \"none\",\n  transition: \"color 250ms, background-color 250ms, opacity 250ms, box-shadow 250ms\",\n\n  \"&:focus\": {\n    outline: \"none\",\n    boxShadow: \"$outline\",\n  },\n\n  \"&:disabled\": {\n    border: \"1px solid transparent\",\n    backgroundColor: \"transparent\",\n    color: \"$neutral3\",\n    cursor: \"not-allowed\",\n  },\n\n  variants: {\n    size: {\n      sm: {\n        marginInlineStart: \"0.35rem\",\n        marginInlineEnd: \"-3px\",\n      },\n      md: {\n        marginInlineStart: \"$1_5\",\n        marginInlineEnd: \"calc(0.15rem * -1)\",\n      },\n      lg: {\n        marginInlineStart: \"$1_5\",\n        marginInlineEnd: \"calc($1 * -1)\",\n      },\n    },\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Tag\n * -----------------------------------------------------------------------------------------------*/\n\ninterface TagSizeVariantConfig {\n  height: string;\n  paddingX: string;\n  fontSize: string;\n  lineHeight: string;\n  closeButtonSize: string;\n}\n\nfunction createTagSizeVariant(config: TagSizeVariantConfig): SystemStyleObject {\n  return {\n    height: config.height,\n    py: 0,\n    px: config.paddingX,\n    fontSize: config.fontSize,\n    lineHeight: config.lineHeight,\n\n    [`& .${tagCloseButtonStyles}`]: {\n      boxSize: config.closeButtonSize,\n    },\n  };\n}\n\ninterface TagSolidCompoundVariantConfig {\n  color: string;\n  bgColor: string;\n  closeButtonBgColorHover: string;\n}\n\nfunction createTagSolidCompoundVariant(config: TagSolidCompoundVariantConfig): SystemStyleObject {\n  return {\n    backgroundColor: config.bgColor,\n    color: config.color,\n\n    [`& .${tagCloseButtonStyles}:not(:disabled):hover`]: {\n      backgroundColor: config.closeButtonBgColorHover,\n    },\n  };\n}\n\ninterface TagSubtleCompoundVariantConfig {\n  color: string;\n  bgColor: string;\n  closeButtonBgColorHover: string;\n}\n\nfunction createTagSubtleCompoundVariant(config: TagSubtleCompoundVariantConfig): SystemStyleObject {\n  return {\n    backgroundColor: config.bgColor,\n    color: config.color,\n\n    [`& .${tagCloseButtonStyles}:not(:disabled):hover`]: {\n      backgroundColor: config.closeButtonBgColorHover,\n    },\n  };\n}\n\ninterface TagOutlineCompoundVariantConfig {\n  color: string;\n  borderColor: string;\n  closeButtonBgColorHover: string;\n}\n\nfunction createTagOutlineCompoundVariant(\n  config: TagOutlineCompoundVariantConfig\n): SystemStyleObject {\n  return {\n    borderColor: config.borderColor,\n    color: config.color,\n\n    [`& .${tagCloseButtonStyles}:not(:disabled):hover`]: {\n      backgroundColor: config.closeButtonBgColorHover,\n    },\n  };\n}\n\nfunction createTagDotAndSizeCompoundVariant(size: string): SystemStyleObject {\n  return {\n    \"&::before,  &::after\": {\n      boxSize: size,\n    },\n\n    \"&::before\": {\n      marginRight: size,\n    },\n\n    \"&::after\": {\n      marginLeft: size,\n    },\n  };\n}\n\nexport const tagStyles = css({\n  display: \"inline-flex\",\n  justifyContent: \"center\",\n  alignItems: \"center\",\n\n  borderRadius: \"$full\",\n\n  fontWeight: \"$medium\",\n  lineHeight: \"$none\",\n\n  variants: {\n    variant: {\n      solid: {\n        border: \"1px solid transparent\",\n        color: \"white\",\n      },\n      subtle: {\n        border: \"1px solid transparent\",\n      },\n      outline: {\n        borderStyle: \"solid\",\n        borderWidth: \"1px\",\n        backgroundColor: \"transparent\",\n      },\n      dot: {\n        border: \"1px solid $neutral7\",\n        backgroundColor: \"transparent\",\n        color: \"$neutral12\",\n\n        \"&::before,  &::after\": {\n          content: \"''\",\n          borderRadius: \"$full\",\n        },\n\n        \"&::before\": {\n          display: \"block\",\n        },\n\n        \"&::after\": {\n          display: \"none\",\n        },\n\n        [`& .${tagCloseButtonStyles}:not(:disabled):hover`]: {\n          backgroundColor: \"$neutral4\",\n        },\n\n        [`& .${tagCloseButtonStyles}:not(:disabled):active`]: {\n          backgroundColor: \"$neutral5\",\n        },\n      },\n    },\n    colorScheme: {\n      primary: {},\n      accent: {},\n      neutral: {},\n      success: {},\n      info: {},\n      warning: {},\n      danger: {},\n    },\n    size: {\n      sm: createTagSizeVariant({\n        height: \"$5\",\n        paddingX: \"$2\",\n        fontSize: \"$xs\",\n        lineHeight: \"$4\",\n        closeButtonSize: \"$4\",\n      }),\n      md: createTagSizeVariant({\n        height: \"$6\",\n        paddingX: \"$2\",\n        fontSize: \"$sm\",\n        lineHeight: \"$5\",\n        closeButtonSize: \"$5\",\n      }),\n      lg: createTagSizeVariant({\n        height: \"$8\",\n        paddingX: \"$3\",\n        fontSize: \"$base\",\n        lineHeight: \"$6\",\n        closeButtonSize: \"$6\",\n      }),\n    },\n    dotPlacement: {\n      start: {},\n      end: {},\n    },\n  },\n  compoundVariants: [\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - solid + color\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"solid\",\n      colorScheme: \"primary\",\n      css: createTagSolidCompoundVariant({\n        color: \"white\",\n        bgColor: \"$primary9\",\n        closeButtonBgColorHover: \"$primary10\",\n      }),\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"accent\",\n      css: createTagSolidCompoundVariant({\n        color: \"white\",\n        bgColor: \"$accent9\",\n        closeButtonBgColorHover: \"$accent10\",\n      }),\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"neutral\",\n      css: createTagSolidCompoundVariant({\n        color: \"white\",\n        bgColor: \"$neutral9\",\n        closeButtonBgColorHover: \"$neutral11\",\n      }),\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"success\",\n      css: createTagSolidCompoundVariant({\n        color: \"white\",\n        bgColor: \"$success9\",\n        closeButtonBgColorHover: \"$success10\",\n      }),\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"info\",\n      css: createTagSolidCompoundVariant({\n        color: \"white\",\n        bgColor: \"$info9\",\n        closeButtonBgColorHover: \"$info10\",\n      }),\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"warning\",\n      css: createTagSolidCompoundVariant({\n        color: \"$blackAlpha12\",\n        bgColor: \"$warning9\",\n        closeButtonBgColorHover: \"$warning10\",\n      }),\n    },\n    {\n      variant: \"solid\",\n      colorScheme: \"danger\",\n      css: createTagSolidCompoundVariant({\n        color: \"white\",\n        bgColor: \"$danger9\",\n        closeButtonBgColorHover: \"$danger10\",\n      }),\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - subtle + color\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"subtle\",\n      colorScheme: \"primary\",\n      css: createTagSubtleCompoundVariant({\n        color: \"$primary11\",\n        bgColor: \"$primary4\",\n        closeButtonBgColorHover: \"$primary6\",\n      }),\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"accent\",\n      css: createTagSubtleCompoundVariant({\n        color: \"$accent11\",\n        bgColor: \"$accent4\",\n        closeButtonBgColorHover: \"$accent6\",\n      }),\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"neutral\",\n      css: createTagSubtleCompoundVariant({\n        color: \"$neutral12\",\n        bgColor: \"$neutral4\",\n        closeButtonBgColorHover: \"$neutral7\",\n      }),\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"success\",\n      css: createTagSubtleCompoundVariant({\n        color: \"$success11\",\n        bgColor: \"$success4\",\n        closeButtonBgColorHover: \"$success6\",\n      }),\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"info\",\n      css: createTagSubtleCompoundVariant({\n        color: \"$info11\",\n        bgColor: \"$info4\",\n        closeButtonBgColorHover: \"$info6\",\n      }),\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"warning\",\n      css: createTagSubtleCompoundVariant({\n        color: \"$warning11\",\n        bgColor: \"$warning4\",\n        closeButtonBgColorHover: \"$warning6\",\n      }),\n    },\n    {\n      variant: \"subtle\",\n      colorScheme: \"danger\",\n      css: createTagSubtleCompoundVariant({\n        color: \"$danger11\",\n        bgColor: \"$danger4\",\n        closeButtonBgColorHover: \"$danger6\",\n      }),\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - outline + color\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"outline\",\n      colorScheme: \"primary\",\n      css: createTagOutlineCompoundVariant({\n        color: \"$primary11\",\n        borderColor: \"$primary7\",\n        closeButtonBgColorHover: \"$primary4\",\n      }),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"accent\",\n      css: createTagOutlineCompoundVariant({\n        color: \"$accent11\",\n        borderColor: \"$accent7\",\n        closeButtonBgColorHover: \"$accent4\",\n      }),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"neutral\",\n      css: createTagOutlineCompoundVariant({\n        color: \"$neutral12\",\n        borderColor: \"$neutral7\",\n        closeButtonBgColorHover: \"$neutral4\",\n      }),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"success\",\n      css: createTagOutlineCompoundVariant({\n        color: \"$success11\",\n        borderColor: \"$success7\",\n        closeButtonBgColorHover: \"$success4\",\n      }),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"info\",\n      css: createTagOutlineCompoundVariant({\n        color: \"$info11\",\n        borderColor: \"$info7\",\n        closeButtonBgColorHover: \"$info4\",\n      }),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"warning\",\n      css: createTagOutlineCompoundVariant({\n        color: \"$warning11\",\n        borderColor: \"$warning7\",\n        closeButtonBgColorHover: \"$warning4\",\n      }),\n    },\n    {\n      variant: \"outline\",\n      colorScheme: \"danger\",\n      css: createTagOutlineCompoundVariant({\n        color: \"$danger11\",\n        borderColor: \"$danger7\",\n        closeButtonBgColorHover: \"$danger4\",\n      }),\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - dot + color\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"dot\",\n      colorScheme: \"primary\",\n      css: {\n        \"&::before, &::after\": {\n          backgroundColor: \"$primary9\",\n        },\n      },\n    },\n    {\n      variant: \"dot\",\n      colorScheme: \"accent\",\n      css: {\n        \"&::before, &::after\": {\n          backgroundColor: \"$accent9\",\n        },\n      },\n    },\n    {\n      variant: \"dot\",\n      colorScheme: \"neutral\",\n      css: {\n        \"&::before, &::after\": {\n          backgroundColor: \"$neutral9\",\n        },\n      },\n    },\n    {\n      variant: \"dot\",\n      colorScheme: \"success\",\n      css: {\n        \"&::before, &::after\": {\n          backgroundColor: \"$success9\",\n        },\n      },\n    },\n    {\n      variant: \"dot\",\n      colorScheme: \"info\",\n      css: {\n        \"&::before, &::after\": {\n          backgroundColor: \"$info9\",\n        },\n      },\n    },\n    {\n      variant: \"dot\",\n      colorScheme: \"warning\",\n      css: {\n        \"&::before, &::after\": {\n          backgroundColor: \"$warning9\",\n        },\n      },\n    },\n    {\n      variant: \"dot\",\n      colorScheme: \"danger\",\n      css: {\n        \"&::before, &::after\": {\n          backgroundColor: \"$danger9\",\n        },\n      },\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - dot + size\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"dot\",\n      size: \"sm\",\n      css: createTagDotAndSizeCompoundVariant(\"$1_5\"),\n    },\n    {\n      variant: \"dot\",\n      size: \"md\",\n      css: createTagDotAndSizeCompoundVariant(\"$2\"),\n    },\n    {\n      variant: \"dot\",\n      size: \"lg\",\n      css: createTagDotAndSizeCompoundVariant(\"$2_5\"),\n    },\n\n    /* -------------------------------------------------------------------------------------------------\n     * Variant - dot + dot placement\n     * -----------------------------------------------------------------------------------------------*/\n    {\n      variant: \"dot\",\n      dotPlacement: \"start\",\n      css: {\n        \"&::before\": {\n          display: \"block\",\n        },\n\n        \"&::after\": {\n          display: \"none\",\n        },\n      },\n    },\n\n    {\n      variant: \"dot\",\n      dotPlacement: \"end\",\n      css: {\n        \"&::before\": {\n          display: \"none\",\n        },\n\n        \"&::after\": {\n          display: \"block\",\n        },\n      },\n    },\n  ],\n});\n\nexport type TagVariants = VariantProps<typeof tagStyles>;\n"
  },
  {
    "path": "packages/solid/src/components/tag/tag.tsx",
    "content": "import { Accessor, createContext, mergeProps, splitProps, useContext } from \"solid-js\";\n\nimport { SystemStyleObject } from \"../../styled-system/types\";\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps } from \"../types\";\nimport { tagStyles, TagVariants } from \"./tag.styles\";\n\ntype ThemeableTagOptions = Pick<TagVariants, \"variant\" | \"colorScheme\" | \"size\" | \"dotPlacement\">;\n\nexport interface TagStyleConfig {\n  baseStyle?: {\n    root?: SystemStyleObject;\n    icon?: SystemStyleObject;\n    label?: SystemStyleObject;\n    closeButton?: SystemStyleObject;\n  };\n  defaultProps?: {\n    root?: ThemeableTagOptions;\n  };\n}\n\nexport type TagProps<C extends ElementType = \"span\"> = HTMLHopeProps<C, TagVariants>;\n\nconst hopeTagClass = \"hope-tag\";\n\ninterface TagContextValue {\n  size: Accessor<TagVariants[\"size\"]>;\n}\n\nconst TagContext = createContext<TagContextValue>();\n\n/**\n * Tag component is used for items that need to be labeled, categorized,\n * or organized using keywords that describe them.\n */\nexport function Tag<C extends ElementType = \"span\">(props: TagProps<C>) {\n  const theme = useStyleConfig().Tag;\n\n  const defaultProps: TagProps<\"span\"> = {\n    variant: theme?.defaultProps?.root?.variant ?? \"subtle\",\n    colorScheme: theme?.defaultProps?.root?.colorScheme ?? \"neutral\",\n    size: theme?.defaultProps?.root?.size ?? \"md\",\n  };\n\n  const propsWithDefault: TagProps<\"span\"> = mergeProps(defaultProps, props);\n  const [local, variantProps, others] = splitProps(\n    propsWithDefault,\n    [\"class\"],\n    [\"variant\", \"colorScheme\", \"size\", \"dotPlacement\"]\n  );\n\n  const classes = () => classNames(local.class, hopeTagClass, tagStyles(variantProps));\n\n  const tagSize = () => variantProps.size;\n\n  const context: TagContextValue = {\n    size: tagSize,\n  };\n\n  return (\n    <TagContext.Provider value={context}>\n      <hope.span class={classes()} __baseStyle={theme?.baseStyle?.root} {...others} />\n    </TagContext.Provider>\n  );\n}\n\nTag.toString = () => createClassSelector(hopeTagClass);\n\nexport function useTagContext() {\n  const context = useContext(TagContext);\n\n  if (!context) {\n    throw new Error(\"[Hope UI]: useTagContext must be used within a `<Tag />` component\");\n  }\n\n  return context;\n}\n"
  },
  {
    "path": "packages/solid/src/components/test-utils.tsx",
    "content": "import { JSX } from \"solid-js\";\nimport { render } from \"solid-testing-library\";\n\nimport { HopeProvider, HopeThemeConfig } from \"../hope-provider\";\n\nexport function renderWithHopeProvider(callback: () => JSX.Element, config: HopeThemeConfig = {}) {\n  return render(() => <HopeProvider config={config}>{callback}</HopeProvider>);\n}\n"
  },
  {
    "path": "packages/solid/src/components/text/index.ts",
    "content": "export * from \"./text\";\nexport * from \"./text.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/text/text.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css } from \"../../styled-system/stitches.config\";\n\nexport const textStyles = css({\n  variants: {\n    size: {\n      xs: {\n        fontSize: \"$xs\",\n        lineHeight: \"$4\",\n      },\n      sm: {\n        fontSize: \"$sm\",\n        lineHeight: \"$5\",\n      },\n      base: {\n        fontSize: \"$base\",\n        lineHeight: \"$6\",\n      },\n      lg: {\n        fontSize: \"$lg\",\n        lineHeight: \"$7\",\n      },\n      xl: {\n        fontSize: \"$xl\",\n        lineHeight: \"$7\",\n      },\n      \"2xl\": {\n        fontSize: \"$2xl\",\n        lineHeight: \"$8\",\n      },\n      \"3xl\": {\n        fontSize: \"$3xl\",\n        lineHeight: \"$9\",\n      },\n      \"4xl\": {\n        fontSize: \"$4xl\",\n        lineHeight: \"$10\",\n      },\n      \"5xl\": {\n        fontSize: \"$5xl\",\n        lineHeight: \"$none\",\n      },\n      \"6xl\": {\n        fontSize: \"$6xl\",\n        lineHeight: \"$none\",\n      },\n      \"7xl\": {\n        fontSize: \"$7xl\",\n        lineHeight: \"$none\",\n      },\n      \"8xl\": {\n        fontSize: \"$8xl\",\n        lineHeight: \"$none\",\n      },\n      \"9xl\": {\n        fontSize: \"$9xl\",\n        lineHeight: \"$none\",\n      },\n    },\n  },\n});\n\nexport type TextVariants = VariantProps<typeof textStyles>;\n"
  },
  {
    "path": "packages/solid/src/components/text/text.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { renderWithHopeProvider } from \"../test-utils\";\nimport { Text, TextProps } from \"./text\";\nimport { textStyles } from \"./text.styles\";\n\ndescribe(\"Text\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Text data-testid=\"text\">Text</Text>);\n    const text = screen.getByTestId(\"text\");\n\n    // assert\n    expect(text).toBeInTheDocument();\n  });\n\n  it(\"should render <p> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <Text data-testid=\"text\">Text</Text>);\n    const text = screen.getByTestId(\"text\");\n\n    // assert\n    expect(text).toBeInstanceOf(HTMLParagraphElement);\n  });\n\n  it(\"should render tag provided with the as prop\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <Text data-testid=\"text\" as=\"span\">\n        Text\n      </Text>\n    ));\n    const text = screen.getByTestId(\"text\");\n\n    // assert\n    expect(text).toBeInstanceOf(HTMLSpanElement);\n  });\n\n  it(\"should render children\", () => {\n    // arrange\n    const children = \"Text\";\n\n    // act\n    renderWithHopeProvider(() => <Text data-testid=\"text\">{children}</Text>);\n    const text = screen.getByTestId(\"text\");\n\n    // assert\n    expect(text).toHaveTextContent(children);\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <Text data-testid=\"text\">Text</Text>);\n    const text = screen.getByTestId(\"text\");\n\n    // assert\n    expect(text).toHaveClass(\"hope-text\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(Text.toString()).toBe(\".hope-text\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Text data-testid=\"text\" class={stubClass}>\n        Text\n      </Text>\n    ));\n    const text = screen.getByTestId(\"text\");\n\n    // assert\n    expect(text).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      // eslint-disable-next-line solid/no-react-specific-props\n      <Text data-testid=\"text\" className={stubClass}>\n        Text\n      </Text>\n    ));\n    const text = screen.getByTestId(\"text\");\n\n    // assert\n    expect(text).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Text data-testid=\"text\" classList={{ [stubClass]: true }}>\n        Text\n      </Text>\n    ));\n    const text = screen.getByTestId(\"text\");\n\n    // assert\n    expect(text).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from variants prop\", () => {\n    // arrange\n    const props: TextProps<\"p\"> = {\n      size: \"4xl\",\n    };\n\n    const textClass = textStyles(props);\n\n    // act\n    renderWithHopeProvider(() => (\n      <Text data-testid=\"text\" {...props}>\n        Text\n      </Text>\n    ));\n    const text = screen.getByTestId(\"text\");\n\n    // assert\n    expect(text).toHaveClass(textClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/text/text.tsx",
    "content": "import { mergeProps, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { hope } from \"../factory\";\nimport { ElementType, HTMLHopeProps, SinglePartComponentStyleConfig } from \"../types\";\nimport { textStyles, TextVariants } from \"./text.styles\";\n\nexport type TextProps<C extends ElementType = \"p\"> = HTMLHopeProps<C, TextVariants>;\n\nexport type TextStyleConfig = SinglePartComponentStyleConfig<TextVariants>;\n\nconst hopeTextClass = \"hope-text\";\n\n/**\n * Text component is the used to render text and paragraphs within an interface.\n * It renders a <p> tag by default.\n */\nexport function Text<C extends ElementType = \"p\">(props: TextProps<C>) {\n  const theme = useStyleConfig().Text;\n\n  const defaultProps: TextProps<\"p\"> = {\n    size: theme?.defaultProps?.size,\n  };\n\n  const propsWithDefault: TextProps<\"p\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault, [\"class\", \"size\"]);\n\n  const classes = () => classNames(local.class, hopeTextClass, textStyles({ size: local.size }));\n\n  return <hope.p class={classes()} __baseStyle={theme?.baseStyle} {...others} />;\n}\n\nText.toString = () => createClassSelector(hopeTextClass);\n"
  },
  {
    "path": "packages/solid/src/components/textarea/index.ts",
    "content": "export * from \"./textarea\";\nexport * from \"./textarea.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/textarea/textarea.stories.tsx",
    "content": "import { HopeWrapper } from \"../storybook-utils\";\nimport { Textarea } from \"./textarea\";\n\nexport default {\n  title: \"Data entry/Textarea\",\n  component: Textarea,\n  parameters: { layout: \"centered\" },\n  decorators: [\n    (Story: any) => (\n      <HopeWrapper>\n        <Story />\n      </HopeWrapper>\n    ),\n  ],\n  argTypes: {\n    variant: {\n      control: { type: \"select\" },\n      options: [\"outline\", \"filled\", \"unstyled\"],\n    },\n    size: {\n      control: { type: \"select\" },\n      options: [\"xs\", \"sm\", \"md\", \"lg\"],\n    },\n    invalid: {\n      control: { type: \"boolean\" },\n    },\n    disabled: {\n      control: { type: \"boolean\" },\n    },\n    required: {\n      control: { type: \"boolean\" },\n    },\n    readOnly: {\n      control: { type: \"boolean\" },\n    },\n    placeholder: {\n      control: { type: \"text\" },\n    },\n  },\n  args: {\n    variant: \"outline\",\n    size: \"md\",\n    invalid: false,\n    disabled: false,\n    required: false,\n    readOnly: false,\n    placeholder: \"Placeholder\",\n  },\n};\n\nexport const Default = (args: any) => <Textarea {...args} />;\nDefault.storyName = \"Textarea\";\n"
  },
  {
    "path": "packages/solid/src/components/textarea/textarea.styles.ts",
    "content": "import { VariantProps } from \"@stitches/core\";\n\nimport { css } from \"../../styled-system/stitches.config\";\nimport { baseInputResetStyles } from \"../input/input.styles\";\n\nfunction createVariantAndSizeCompoundVariants(variant: string, paddingX?: string | number) {\n  return Object.entries({\n    xs: paddingX ?? \"$2\",\n    sm: paddingX ?? \"$2_5\",\n    md: paddingX ?? \"$3\",\n    lg: paddingX ?? \"$4\",\n  }).map(([key, value]) => ({\n    variant: variant,\n    size: key,\n    css: { px: value },\n  }));\n}\n\nexport const textareaStyles = css(baseInputResetStyles, {\n  minHeight: \"80px\",\n  py: \"$2\",\n\n  compoundVariants: [\n    ...createVariantAndSizeCompoundVariants(\"outline\"),\n    ...createVariantAndSizeCompoundVariants(\"filled\"),\n    ...createVariantAndSizeCompoundVariants(\"unstyled\", 0),\n  ],\n});\n\nexport type TextareaVariants = VariantProps<typeof textareaStyles>;\n"
  },
  {
    "path": "packages/solid/src/components/textarea/textarea.test.tsx",
    "content": "import { cleanup, screen } from \"solid-testing-library\";\n\nimport { FormErrorMessage, FormHelperText } from \"..\";\nimport { FormControl } from \"../form-control/form-control\";\nimport { baseInputResetStyles } from \"../input/input.styles\";\nimport { renderWithHopeProvider } from \"../test-utils\";\nimport { Textarea } from \"./textarea\";\nimport { textareaStyles } from \"./textarea.styles\";\n\ndescribe(\"Textarea\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should render\", () => {\n    // act\n    renderWithHopeProvider(() => <Textarea data-testid=\"textarea\" />);\n    const textarea = screen.getByTestId(\"textarea\");\n\n    // assert\n    expect(textarea).toBeInTheDocument();\n  });\n\n  it(\"should render <textarea> tag by default\", () => {\n    // act\n    renderWithHopeProvider(() => <Textarea data-testid=\"textarea\" />);\n    const textarea = screen.getByTestId(\"textarea\");\n\n    // assert\n    expect(textarea).toBeInstanceOf(HTMLTextAreaElement);\n  });\n\n  it(\"should have default id from FormControl\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <Textarea data-testid=\"textarea\" />\n      </FormControl>\n    ));\n    const textarea = screen.getByTestId(\"textarea\");\n\n    // assert\n    expect(textarea).toHaveAttribute(\"id\", expect.stringMatching(/^hope-field-(.+)/));\n  });\n\n  it(\"should have 'aria-required' and 'required' attribute when FormControl is required\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl required>\n        <Textarea data-testid=\"textarea\" />\n      </FormControl>\n    ));\n    const textarea = screen.getByTestId(\"textarea\");\n\n    // assert\n    expect(textarea).toHaveAttribute(\"required\");\n    expect(textarea).toHaveAttribute(\"aria-required\", \"true\");\n  });\n\n  it(\"should have 'disabled' attribute when FormControl is disabled\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl disabled>\n        <Textarea data-testid=\"textarea\" />\n      </FormControl>\n    ));\n    const textarea = screen.getByTestId(\"textarea\");\n\n    // assert\n    expect(textarea).toHaveAttribute(\"disabled\");\n  });\n\n  it(\"should have 'aria-invalid' attribute when FormControl is invalid\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl invalid>\n        <Textarea data-testid=\"textarea\" />\n      </FormControl>\n    ));\n    const textarea = screen.getByTestId(\"textarea\");\n\n    // assert\n    expect(textarea).toHaveAttribute(\"aria-invalid\", \"true\");\n  });\n\n  it(\"should have 'aria-readonly' and 'readOnly' attribute when FormControl is readOnly\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl readOnly>\n        <Textarea data-testid=\"textarea\" />\n      </FormControl>\n    ));\n    const textarea = screen.getByTestId(\"textarea\");\n\n    // assert\n    expect(textarea).toHaveAttribute(\"readOnly\");\n    expect(textarea).toHaveAttribute(\"aria-readonly\", \"true\");\n  });\n\n  it(\"should have 'aria-describedby' attribute with FormHelperText id generated from FormControl\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl>\n        <Textarea data-testid=\"textarea\" />\n        <FormHelperText data-testid=\"helper-text\">Helper text</FormHelperText>\n      </FormControl>\n    ));\n    const textarea = screen.getByTestId(\"textarea\");\n    const helperText = screen.getByTestId(\"helper-text\");\n\n    // assert\n    expect(textarea).toHaveAttribute(\"aria-describedby\", helperText.id);\n  });\n\n  it(\"should have 'aria-describedby' attribute with FormErrorMessage id first when FormControl is invalid\", () => {\n    // act\n    renderWithHopeProvider(() => (\n      <FormControl invalid>\n        <Textarea data-testid=\"textarea\" />\n        <FormHelperText data-testid=\"helper-text\">Helper text</FormHelperText>\n        <FormErrorMessage data-testid=\"error-message\">Error message</FormErrorMessage>\n      </FormControl>\n    ));\n    const textarea = screen.getByTestId(\"textarea\");\n    const helperText = screen.getByTestId(\"helper-text\");\n    const errorMessage = screen.getByTestId(\"error-message\");\n\n    // assert\n    expect(textarea).toHaveAttribute(\"aria-describedby\", `${errorMessage.id} ${helperText.id}`);\n  });\n\n  it(\"should have 'aria-required' and 'required' attribute when Textarea is required\", () => {\n    // act\n    renderWithHopeProvider(() => <Textarea data-testid=\"textarea\" required />);\n    const textarea = screen.getByTestId(\"textarea\");\n\n    // assert\n    expect(textarea).toHaveAttribute(\"required\");\n    expect(textarea).toHaveAttribute(\"aria-required\", \"true\");\n  });\n\n  it(\"should have 'disabled' attribute when Textarea is disabled\", () => {\n    // act\n    renderWithHopeProvider(() => <Textarea data-testid=\"textarea\" disabled />);\n    const textarea = screen.getByTestId(\"textarea\");\n\n    // assert\n    expect(textarea).toHaveAttribute(\"disabled\");\n  });\n\n  it(\"should have 'aria-invalid' attribute when Textarea is invalid\", () => {\n    // act\n    renderWithHopeProvider(() => <Textarea data-testid=\"textarea\" invalid />);\n    const textarea = screen.getByTestId(\"textarea\");\n\n    // assert\n    expect(textarea).toHaveAttribute(\"aria-invalid\", \"true\");\n  });\n\n  it(\"should have 'aria-readonly' and 'readOnly' attribute when Textarea is readOnly\", () => {\n    // act\n    renderWithHopeProvider(() => <Textarea data-testid=\"textarea\" readOnly />);\n    const textarea = screen.getByTestId(\"textarea\");\n\n    // assert\n    expect(textarea).toHaveAttribute(\"readOnly\");\n    expect(textarea).toHaveAttribute(\"aria-readonly\", \"true\");\n  });\n\n  it(\"should have semantic hope class\", () => {\n    // act\n    renderWithHopeProvider(() => <Textarea data-testid=\"textarea\" />);\n    const textarea = screen.getByTestId(\"textarea\");\n\n    // assert\n    expect(textarea).toHaveClass(\"hope-textarea\");\n  });\n\n  it(\"should return semantic hope class as css selector when calling toString()\", () => {\n    expect(Textarea.toString()).toBe(\".hope-textarea\");\n  });\n\n  it(\"should have class from class prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => <Textarea data-testid=\"textarea\" class={stubClass} />);\n    const textarea = screen.getByTestId(\"textarea\");\n\n    // assert\n    expect(textarea).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from className prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    // eslint-disable-next-line solid/no-react-specific-props\n    renderWithHopeProvider(() => <Textarea data-testid=\"textarea\" className={stubClass} />);\n    const textarea = screen.getByTestId(\"textarea\");\n\n    // assert\n    expect(textarea).toHaveClass(stubClass);\n  });\n\n  it(\"should have class from classList prop\", () => {\n    // arrange\n    const stubClass = \"stub\";\n\n    // act\n    renderWithHopeProvider(() => (\n      <Textarea data-testid=\"textarea\" classList={{ [stubClass]: true }} />\n    ));\n    const textarea = screen.getByTestId(\"textarea\");\n\n    // assert\n    expect(textarea).toHaveClass(stubClass);\n  });\n\n  it(\"should have stitches generated class from baseInputResetStyles and textareaStyles\", () => {\n    // arrange\n    const baseInputResetClass = baseInputResetStyles();\n    const textareaClass = textareaStyles();\n\n    // act\n    renderWithHopeProvider(() => <Textarea data-testid=\"textarea\" />);\n    const textarea = screen.getByTestId(\"textarea\");\n\n    // assert\n    expect(textarea).toHaveClass(baseInputResetClass.className);\n    expect(textarea).toHaveClass(textareaClass.className);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/components/textarea/textarea.tsx",
    "content": "import { mergeProps, splitProps } from \"solid-js\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { useFormControl } from \"../form-control/use-form-control\";\nimport { HTMLHopeProps, SinglePartComponentStyleConfig } from \"../types\";\nimport { textareaStyles, TextareaVariants } from \"./textarea.styles\";\n\nexport type TextareaStyleConfig = SinglePartComponentStyleConfig<TextareaVariants>;\n\ninterface TextareaOptions extends TextareaVariants {\n  /**\n   * If `true`, the textarea will have `aria-invalid` set to `true`\n   */\n  invalid?: boolean;\n}\n\nexport type TextareaProps = Omit<HTMLHopeProps<\"textarea\", TextareaOptions>, \"as\">;\n\nconst hopeTextareaClass = \"hope-textarea\";\n\nexport function Textarea(props: TextareaProps) {\n  const theme = useStyleConfig().Textarea;\n\n  const defaultProps: TextareaProps = {\n    variant: theme?.defaultProps?.variant ?? \"outline\",\n    size: theme?.defaultProps?.size ?? \"md\",\n  };\n\n  const propsWithDefault: TextareaProps = mergeProps(defaultProps, props);\n\n  const [local, others] = splitProps(propsWithDefault, [\"class\", \"variant\", \"size\"]);\n\n  const formControlProps = useFormControl<HTMLTextAreaElement>(props);\n\n  const classes = () => {\n    return classNames(\n      local.class,\n      hopeTextareaClass,\n      textareaStyles({\n        variant: local.variant,\n        size: local.size,\n      })\n    );\n  };\n\n  return (\n    <Box\n      as=\"textarea\"\n      class={classes()}\n      __baseStyle={theme?.baseStyle}\n      {...formControlProps}\n      {...others}\n    />\n  );\n}\n\nTextarea.toString = () => createClassSelector(hopeTextareaClass);\n"
  },
  {
    "path": "packages/solid/src/components/tooltip/index.ts",
    "content": "export * from \"./tooltip\";\nexport * from \"./tooltip.styles\";\n"
  },
  {
    "path": "packages/solid/src/components/tooltip/tooltip.styles.ts",
    "content": "import { css, globalCss } from \"../../styled-system/stitches.config\";\n\n/* -------------------------------------------------------------------------------------------------\n * Tooltip - solid-transition-group classes\n * -----------------------------------------------------------------------------------------------*/\n\nexport const tooltipTransitionName = {\n  scale: \"hope-tooltip-scale-transition\",\n};\n\nexport const tooltipTransitionStyles = globalCss({\n  /* scale */\n  [`.${tooltipTransitionName.scale}-enter, .${tooltipTransitionName.scale}-exit-to`]: {\n    opacity: 0,\n    transform: \"scale(0.90)\",\n  },\n  [`.${tooltipTransitionName.scale}-enter-to, .${tooltipTransitionName.scale}-exit`]: {\n    opacity: 1,\n    transform: \"scale(1)\",\n  },\n  [`.${tooltipTransitionName.scale}-enter-active`]: {\n    transitionProperty: \"opacity, transform\",\n    transitionDuration: \"200ms\",\n    transitionTimingFunction: \"ease\",\n  },\n  [`.${tooltipTransitionName.scale}-exit-active`]: {\n    transitionProperty: \"opacity, transform\",\n    transitionDuration: \"150ms\",\n    transitionTimingFunction: \"ease-in-out\",\n  },\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Tooltip\n * -----------------------------------------------------------------------------------------------*/\n\nexport const tooltipStyles = css({\n  zIndex: \"$tooltip\",\n  position: \"absolute\",\n\n  maxWidth: \"$96\",\n  boxShadow: \"$md\",\n  borderRadius: \"$sm\",\n  backgroundColor: \"$neutral12\",\n\n  px: \"$2\",\n  py: \"$1\",\n\n  color: \"$neutral1\",\n  fontSize: \"$sm\",\n  fontWeight: \"$normal\",\n  lineHeight: \"$4\",\n});\n\n/* -------------------------------------------------------------------------------------------------\n * Tooltip - arrow\n * -----------------------------------------------------------------------------------------------*/\n\nexport const tooltipArrowStyles = css({\n  zIndex: \"$tooltip\",\n  position: \"absolute\",\n  boxSize: \"8px\",\n  backgroundColor: \"inherit\",\n  transform: \"rotate(45deg)\",\n});\n"
  },
  {
    "path": "packages/solid/src/components/tooltip/tooltip.tsx",
    "content": "import type { Placement } from \"@floating-ui/dom\";\nimport {\n  arrow,\n  autoUpdate,\n  computePosition,\n  flip,\n  hide,\n  inline,\n  offset,\n  shift,\n} from \"@floating-ui/dom\";\nimport {\n  children,\n  createEffect,\n  createMemo,\n  createSignal,\n  createUniqueId,\n  JSX,\n  mergeProps,\n  onCleanup,\n  onMount,\n  Show,\n  splitProps,\n} from \"solid-js\";\nimport { isServer, Portal } from \"solid-js/web\";\nimport { Transition } from \"solid-transition-group\";\n\nimport { useStyleConfig } from \"../../hope-provider\";\nimport { isFunction } from \"../../utils/assertion\";\nimport { classNames, createClassSelector } from \"../../utils/css\";\nimport { Box } from \"../box/box\";\nimport { ElementType, HTMLHopeProps, SinglePartComponentStyleConfig } from \"../types\";\nimport { tooltipArrowStyles, tooltipStyles, tooltipTransitionName } from \"./tooltip.styles\";\n\nexport interface TooltipOptions {\n  /**\n   * Placement of the tooltip\n   */\n  placement?: Placement;\n\n  /**\n   * Offset between the tooltip and the reference (trigger) element.\n   */\n  offset?: number;\n\n  /**\n   * The id of the tooltip.\n   */\n  id?: string;\n\n  /**\n   * If `true`, the tooltip will be shown.\n   * (in controlled mode)\n   */\n  opened?: boolean;\n\n  /**\n   * If `true`, the tooltip will be initially shown\n   * (in uncontrolled mode)\n   */\n  defaultOpened?: boolean;\n\n  /**\n   * If `true`, apply floating-ui `inline` middleware.\n   * Useful for inline reference elements that span over multiple lines, such as hyperlinks or range selections.\n   */\n  inline?: boolean;\n\n  /**\n   * The label of the tooltip.\n   */\n  label?: JSX.Element;\n\n  /**\n   * The accessible, human friendly label to use for\n   * screen readers.\n   *\n   * If passed, tooltip will show the content `label`\n   * but expose only `aria-label` to assistive technologies\n   */\n  \"aria-label\"?: string;\n\n  /**\n   * If `true`, the tooltip will not show\n   */\n  disabled?: boolean;\n\n  /**\n   * If `true`, the tooltip will show an arrow tip\n   */\n  withArrow?: boolean;\n\n  /**\n   * Size of the arrow.\n   */\n  arrowSize?: number;\n\n  /**\n   * The padding between the arrow and the edges of the tooltip.\n   */\n  arrowPadding?: number;\n\n  /**\n   * Delay (in ms) before showing the tooltip\n   * @default 0ms\n   */\n  openDelay?: number;\n\n  /**\n   * Delay (in ms) before hiding the tooltip\n   * @default 0ms\n   */\n  closeDelay?: number;\n\n  /**\n   * If `true`, the tooltip will hide on click\n   */\n  closeOnClick?: boolean;\n\n  /**\n   * If `true`, the tooltip will hide while the mouse\n   * is down\n   */\n  closeOnMouseDown?: boolean;\n\n  /**\n   * Callback to run when the tooltip shows\n   */\n  onOpen?(): void;\n\n  /**\n   * Callback to run when the tooltip hides\n   */\n  onClose?(): void;\n}\n\ntype ThemeableTooltipOptions = Pick<\n  TooltipOptions,\n  | \"placement\"\n  | \"offset\"\n  | \"withArrow\"\n  | \"arrowSize\"\n  | \"arrowPadding\"\n  | \"openDelay\"\n  | \"closeDelay\"\n  | \"closeOnClick\"\n  | \"closeOnMouseDown\"\n>;\n\nexport type TooltipStyleConfig = SinglePartComponentStyleConfig<ThemeableTooltipOptions>;\n\nexport type TooltipProps<C extends ElementType = \"div\"> = HTMLHopeProps<C, TooltipOptions>;\n\nconst hopeTooltipClass = \"hope-tooltip\";\nconst hopeTooltipArrowClass = \"hope-tooltip__arrow\";\n\nexport function Tooltip<C extends ElementType = \"div\">(props: TooltipProps<C>) {\n  const defaultId = `hope-tooltip-${createUniqueId()}`;\n\n  const theme = useStyleConfig().Tooltip;\n\n  const defaultProps: TooltipProps<\"div\"> = {\n    id: defaultId,\n    placement: theme?.defaultProps?.placement ?? \"bottom\",\n    offset: theme?.defaultProps?.offset ?? 8,\n    withArrow: theme?.defaultProps?.withArrow ?? false,\n    arrowSize: theme?.defaultProps?.arrowSize ?? 8,\n    arrowPadding: theme?.defaultProps?.arrowPadding ?? 8,\n    openDelay: theme?.defaultProps?.openDelay ?? 0,\n    closeDelay: theme?.defaultProps?.closeDelay ?? 0,\n    closeOnClick: theme?.defaultProps?.closeOnClick ?? true,\n    closeOnMouseDown: theme?.defaultProps?.closeOnMouseDown ?? false,\n  };\n\n  const propsWithDefault: TooltipProps<\"div\"> = mergeProps(defaultProps, props);\n  const [local, others] = splitProps(propsWithDefault, [\n    \"class\",\n    \"children\",\n    \"id\",\n    \"label\",\n    \"opened\",\n    \"defaultOpened\",\n    \"inline\",\n    \"disabled\",\n    \"placement\",\n    \"offset\",\n    \"withArrow\",\n    \"arrowSize\",\n    \"arrowPadding\",\n    \"openDelay\",\n    \"closeDelay\",\n    \"closeOnClick\",\n    \"closeOnMouseDown\",\n    \"onOpen\",\n    \"onClose\",\n  ]);\n\n  // Internal state for uncontrolled tooltip.\n  // eslint-disable-next-line solid/reactivity\n  const [openedState, setOpenedState] = createSignal(!!local.defaultOpened);\n\n  const [isPortalMounted, setIsPortalMounted] = createSignal(false);\n\n  let tooltipElement: HTMLDivElement | undefined;\n  let arrowElement: HTMLDivElement | undefined;\n\n  let enterTimeoutId: number | undefined;\n  let exitTimeoutId: number | undefined;\n\n  const isControlled = () => local.opened !== undefined;\n  const opened = () => (isControlled() ? !!local.opened : openedState());\n\n  const tooltipClasses = () => classNames(local.class, hopeTooltipClass, tooltipStyles());\n  const arrowClasses = () => classNames(hopeTooltipArrowClass, tooltipArrowStyles());\n\n  let cleanupTooltipAutoUpdate: (() => void) | undefined;\n\n  const resolvedChildren = children(() => local.children);\n\n  const trigger = createMemo(() => {\n    let el = resolvedChildren() as Element;\n\n    // recursively resolve element\n    while (isFunction(el)) {\n      el = el();\n    }\n\n    return el;\n  });\n\n  async function updateTooltipPosition() {\n    const triggerElement = trigger();\n\n    if (!triggerElement || !tooltipElement) {\n      return;\n    }\n\n    const middleware = [offset(local.offset)];\n\n    if (local.inline) {\n      middleware.push(inline());\n    }\n\n    middleware.push(flip());\n    middleware.push(shift());\n\n    if (local.withArrow && arrowElement) {\n      middleware.push(arrow({ element: arrowElement, padding: local.arrowPadding }));\n    }\n\n    middleware.push(hide());\n\n    const { x, y, placement, middlewareData } = await computePosition(\n      triggerElement,\n      tooltipElement,\n      {\n        placement: local.placement,\n        middleware,\n      }\n    );\n\n    if (!tooltipElement) {\n      return;\n    }\n\n    const referenceHidden = middlewareData.hide?.referenceHidden;\n\n    Object.assign(tooltipElement.style, {\n      left: `${Math.round(x)}px`,\n      top: `${Math.round(y)}px`,\n      visibility: referenceHidden ? \"hidden\" : \"visible\",\n    });\n\n    if (!arrowElement) {\n      return;\n    }\n\n    const arrowX = middlewareData.arrow?.x;\n    const arrowY = middlewareData.arrow?.y;\n\n    const staticSide = {\n      top: \"bottom\",\n      right: \"left\",\n      bottom: \"top\",\n      left: \"right\",\n    }[placement.split(\"-\")[0]] as string;\n\n    // Used to put half of the arrow outside of the tooltip.\n    const arrowOffset = `${local.arrowSize ? Math.round(local.arrowSize / 2) * -1 : -4}px`;\n\n    Object.assign(arrowElement.style, {\n      left: arrowX != null ? `${Math.round(arrowX)}px` : \"\",\n      top: arrowY != null ? `${Math.round(arrowY)}px` : \"\",\n      right: \"\",\n      bottom: \"\",\n      [staticSide]: arrowOffset,\n    });\n  }\n\n  const onOpen = () => {\n    if (!isControlled()) {\n      setOpenedState(true);\n    }\n\n    local.onOpen?.();\n    updateTooltipPosition();\n  };\n\n  const onClose = () => {\n    if (!isControlled()) {\n      setOpenedState(false);\n    }\n\n    local.onClose?.();\n  };\n\n  const openWithDelay = () => {\n    if (!local.disabled) {\n      enterTimeoutId = window.setTimeout(onOpen, local.openDelay);\n    }\n  };\n\n  const closeWithDelay = () => {\n    if (enterTimeoutId) {\n      window.clearTimeout(enterTimeoutId);\n    }\n\n    exitTimeoutId = window.setTimeout(onClose, local.closeDelay);\n  };\n\n  const onClick = () => {\n    if (local.closeOnClick) {\n      closeWithDelay();\n    }\n  };\n\n  const onMouseDown = () => {\n    if (local.closeOnMouseDown) {\n      closeWithDelay();\n    }\n  };\n\n  const onKeyDown = (event: KeyboardEvent) => {\n    if (opened() && event.key === \"Escape\") {\n      closeWithDelay();\n    }\n  };\n\n  const addTriggerListeners = () => {\n    const triggerElement = trigger();\n\n    triggerElement.addEventListener(\"mouseenter\", openWithDelay);\n    triggerElement.addEventListener(\"focus\", openWithDelay);\n\n    triggerElement.addEventListener(\"click\", onClick);\n    triggerElement.addEventListener(\"mousedown\", onMouseDown);\n    triggerElement.addEventListener(\"mouseleave\", closeWithDelay);\n    triggerElement.addEventListener(\"blur\", closeWithDelay);\n  };\n\n  const removeTriggerListeners = () => {\n    const triggerElement = trigger();\n\n    triggerElement.removeEventListener(\"mouseenter\", openWithDelay);\n    triggerElement.removeEventListener(\"focus\", openWithDelay);\n\n    triggerElement.removeEventListener(\"click\", onClick);\n    triggerElement.removeEventListener(\"mousedown\", onMouseDown);\n    triggerElement.removeEventListener(\"mouseleave\", closeWithDelay);\n    triggerElement.removeEventListener(\"blur\", closeWithDelay);\n  };\n\n  const afterToolipEnterTransition = () => {\n    if (isServer || !tooltipElement) {\n      return;\n    }\n\n    document.addEventListener(\"keydown\", onKeyDown);\n\n    // schedule auto update of the tooltip position\n    cleanupTooltipAutoUpdate = autoUpdate(trigger(), tooltipElement, updateTooltipPosition);\n  };\n\n  const afterToolipExitTransition = () => {\n    document.removeEventListener(\"keydown\", onKeyDown);\n\n    cleanupTooltipAutoUpdate?.();\n\n    // For smooth transition, unmount portal only after tooltip exit transition is done.\n    setIsPortalMounted(false);\n  };\n\n  onMount(() => {\n    addTriggerListeners();\n  });\n\n  onCleanup(() => {\n    removeTriggerListeners();\n\n    window.clearTimeout(enterTimeoutId);\n    window.clearTimeout(exitTimeoutId);\n  });\n\n  createEffect(() => {\n    if (opened()) {\n      // mount portal only when `isTooltipVisible` is true.\n      setIsPortalMounted(true);\n\n      if (local.id) {\n        trigger().setAttribute(\"aria-describedby\", local.id);\n      }\n    } else {\n      trigger().removeAttribute(\"aria-describedby\");\n    }\n  });\n\n  return (\n    <>\n      {trigger}\n      <Show when={isPortalMounted()}>\n        <Portal>\n          <Transition\n            name={tooltipTransitionName.scale}\n            appear\n            onBeforeEnter={updateTooltipPosition}\n            onAfterEnter={afterToolipEnterTransition}\n            onAfterExit={afterToolipExitTransition}\n          >\n            <Show when={opened()}>\n              <Box\n                ref={tooltipElement}\n                role=\"tooltip\"\n                id={local.id}\n                class={tooltipClasses()}\n                __baseStyle={theme?.baseStyle}\n                {...others}\n              >\n                {local.label}\n                <Show when={local.withArrow}>\n                  <Box ref={arrowElement} class={arrowClasses()} boxSize={local.arrowSize} />\n                </Show>\n              </Box>\n            </Show>\n          </Transition>\n        </Portal>\n      </Show>\n    </>\n  );\n}\n\nTooltip.toString = () => createClassSelector(hopeTooltipClass);\n"
  },
  {
    "path": "packages/solid/src/components/types.ts",
    "content": "import { Component, ComponentProps, JSX, ParentProps } from \"solid-js\";\n\nimport { StyleProps } from \"../styled-system/system\";\nimport { SystemStyleObject } from \"../styled-system/types\";\nimport { OverrideProps } from \"../utils/types\";\n\n/**\n * All HTML and SVG elements.\n */\nexport type DOMElements = keyof JSX.IntrinsicElements;\n\n/**\n * Represent any HTML element or SolidJS component.\n */\nexport type ElementType<Props = any> = DOMElements | Component<Props>;\n\n/**\n * Take the props of the passed HTML element or component and returns its type.\n */\nexport type PropsOf<C extends ElementType> = ComponentProps<C>;\n\n/**\n * All SolidJS props that apply css classes.\n */\nexport interface ClassProps {\n  class?: string;\n  className?: string;\n  classList?: { [key: string]: boolean };\n}\n\n/**\n * Tag or component that should be used as root element.\n */\nexport interface AsProp<C extends ElementType> {\n  as?: C;\n}\n\n/**\n * Hope UI specific props.\n */\nexport type HopeProps = StyleProps & ClassProps & { __baseStyle?: SystemStyleObject };\n\n/**\n * Enhance props of a SolidJS component or JSX element with Hope UI props.\n */\nexport type HTMLHopeProps<C extends ElementType, AdditionalProps = {}> = OverrideProps<\n  ParentProps<PropsOf<C>>,\n  HopeProps & AdditionalProps & { as?: C }\n>;\n\n/**\n * A hope-enabled component that accept style props.\n */\nexport type HopeComponent<T extends ElementType, P = {}> = <C extends ElementType = T>(\n  props: HTMLHopeProps<C, P>\n) => JSX.Element;\n\n/**\n * All html and svg elements for hope components.\n * This is mostly for `hope.<element>` syntax.\n */\nexport type HTMLHopeComponents = {\n  [Tag in DOMElements]: HopeComponent<Tag>;\n};\n\nexport interface HopeFactoryStyleOptions<T extends ElementType> {\n  /**\n   * Base CSS class applied to the component.\n   * This class will be used when targeting the component in a css selector.\n   */\n  baseClass?: string;\n\n  /**\n   * Base style applied to the component.\n   */\n  baseStyle?: SystemStyleObject | ((props: HTMLHopeProps<T>) => SystemStyleObject);\n}\n\n/**\n * Factory function that converts non-hope components or jsx element\n * to hope-enabled components so you can pass style props to them.\n */\nexport type HopeFactory = <T extends ElementType>(\n  component: T,\n  styleOptions?: HopeFactoryStyleOptions<T>\n) => HopeComponent<T>;\n\n/**\n * Style configuration for Hope UI single-part component.\n */\nexport interface SinglePartComponentStyleConfig<Props> {\n  /**\n   * Style object for base or default style\n   */\n  baseStyle?: SystemStyleObject;\n\n  /**\n   * Default component props values.\n   */\n  defaultProps?: Props;\n}\n"
  },
  {
    "path": "packages/solid/src/hooks/create-disclosure/index.ts",
    "content": "import { createSignal, createUniqueId } from \"solid-js\";\n\nexport interface CreateDisclosureProps {\n  id?: string;\n  isOpen?: boolean;\n  defaultIsOpen?: boolean;\n  onOpen?(): void;\n  onClose?(): void;\n}\n\n/**\n * Custom hook used to help handle common open, close, or toggle scenarios.\n * It can be used to control component such as Modal, Drawer, etc.\n */\nexport function createDisclosure(props: CreateDisclosureProps = {}) {\n  const id = `disclosure-${createUniqueId()}`;\n\n  const [isOpenState, setIsOpenState] = createSignal(props.defaultIsOpen || false);\n\n  const isControlled = () => props.isOpen !== undefined;\n\n  const isOpen = () => (isControlled() ? !!props.isOpen : isOpenState());\n\n  const onClose = () => {\n    if (!isControlled()) {\n      setIsOpenState(false);\n    }\n\n    props.onClose?.();\n  };\n\n  const onOpen = () => {\n    if (!isControlled()) {\n      setIsOpenState(true);\n    }\n\n    props.onOpen?.();\n  };\n\n  const onToggle = () => {\n    isOpen() ? onClose() : onOpen();\n  };\n\n  const triggerProps = () => ({\n    \"aria-expanded\": isOpen(),\n    \"aria-controls\": id,\n  });\n\n  const disclosureProps = () => ({\n    id,\n    hidden: !isOpen(),\n  });\n\n  return {\n    isControlled,\n    isOpen,\n    onOpen,\n    onClose,\n    onToggle,\n    triggerProps,\n    disclosureProps,\n  };\n}\n"
  },
  {
    "path": "packages/solid/src/hooks/create-queue/create-queue.test.ts",
    "content": "import { createQueue } from \".\";\n\ndescribe(\"createQueue\", () => {\n  it(\"correctly distributes initial values when limit is not reached\", () => {\n    const { state } = createQueue({ initialValues: [1], limit: 2 });\n\n    expect(state.current()).toStrictEqual([1]);\n    expect(state.queue()).toStrictEqual([]);\n  });\n\n  it(\"correctly distributes initial values when limit is reached\", () => {\n    const { state } = createQueue({ initialValues: [1, 2, 3, 4, 5], limit: 2 });\n\n    expect(state.current()).toStrictEqual([1, 2]);\n    expect(state.queue()).toStrictEqual([3, 4, 5]);\n  });\n\n  it(\"adds items to the state when limit is not reached\", () => {\n    const { state, add } = createQueue({ initialValues: [1], limit: 2 });\n\n    add(2);\n\n    expect(state.current()).toStrictEqual([1, 2]);\n    expect(state.queue()).toStrictEqual([]);\n  });\n\n  it(\"adds items to the queue when limit is reached\", () => {\n    const { state, add } = createQueue({ initialValues: [1, 2], limit: 2 });\n\n    add(3, 4, 5);\n\n    expect(state.current()).toStrictEqual([1, 2]);\n    expect(state.queue()).toStrictEqual([3, 4, 5]);\n  });\n\n  it(\"correctly applies given update to state without queue\", () => {\n    const { state, update } = createQueue({ initialValues: [1, 2], limit: 3 });\n\n    update(state => state.filter(i => i % 2));\n\n    expect(state.current()).toStrictEqual([1]);\n    expect(state.queue()).toStrictEqual([]);\n  });\n\n  it(\"correctly applies given update to state with queue\", () => {\n    const { state, update } = createQueue({ initialValues: [1, 2, 3, 4, 5, 6, 7, 8], limit: 3 });\n\n    update(state => state.filter(i => i % 2));\n\n    expect(state.current()).toStrictEqual([1, 3, 5]);\n    expect(state.queue()).toStrictEqual([7]);\n  });\n\n  it(\"puts extra items to the queue if state has extra items after update\", () => {\n    const { state, update } = createQueue<number>({ initialValues: [], limit: 3 });\n\n    update(() => [1, 2, 3, 4, 5, 6, 7, 8]);\n\n    expect(state.current()).toStrictEqual([1, 2, 3]);\n    expect(state.queue()).toStrictEqual([4, 5, 6, 7, 8]);\n  });\n\n  it(\"cleans queue with cleanQueue handlers\", () => {\n    const { state, clearQueue } = createQueue({ initialValues: [1, 2, 3, 4], limit: 2 });\n\n    clearQueue();\n\n    expect(state.current()).toStrictEqual([1, 2]);\n    expect(state.queue()).toStrictEqual([]);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/hooks/create-queue/index.ts",
    "content": "import { Accessor, createSignal } from \"solid-js\";\n\ninterface CreateQueueProps<T> {\n  initialValues?: T[];\n  limit: number;\n}\n\ninterface CreateQueueState<T> {\n  current: Accessor<T[]>;\n  queue: Accessor<T[]>;\n  limit: Accessor<number>;\n}\n\ninterface CreateQueueReturn<T> {\n  state: CreateQueueState<T>;\n  add: (...items: T[]) => void;\n  update: (fn: (state: T[]) => T[]) => void;\n  clearQueue: () => void;\n}\n\nexport function createQueue<T>(props: CreateQueueProps<T>): CreateQueueReturn<T> {\n  const [currentState, setCurrentState] = createSignal(\n    props.initialValues?.slice(0, props.limit) ?? []\n  );\n\n  const [queue, setQueue] = createSignal(props.initialValues?.slice(props.limit) ?? []);\n\n  const limit = () => props.limit;\n\n  const add = (...items: T[]) => {\n    const results = [...currentState(), ...queue(), ...items];\n\n    setCurrentState(results.slice(0, limit()) as T[]);\n    setQueue(results.slice(limit()) as T[]);\n  };\n\n  const update = (fn: (state: T[]) => T[]) => {\n    const results = fn([...currentState(), ...queue()] as Array<T>);\n\n    setCurrentState(results.slice(0, limit()) as T[]);\n    setQueue(results.slice(limit()) as T[]);\n  };\n\n  const clearQueue = () => {\n    setQueue([]);\n  };\n\n  const state: CreateQueueState<T> = {\n    current: currentState,\n    queue,\n    limit,\n  };\n\n  return {\n    state,\n    add,\n    update,\n    clearQueue,\n  };\n}\n"
  },
  {
    "path": "packages/solid/src/hooks/index.ts",
    "content": "export * from \"./create-disclosure\";\nexport * from \"./use-click-outside\";\nexport * from \"./use-event\";\n"
  },
  {
    "path": "packages/solid/src/hooks/use-click-outside/index.ts",
    "content": "import { Accessor, onCleanup, onMount } from \"solid-js\";\nimport { createStore } from \"solid-js/store\";\n\nimport { getOwnerDocument, isValidEvent } from \"../../utils/dom\";\n\n// Thanks Chakra UI (https://github.com/chakra-ui/chakra-ui/blob/main/packages/hooks/src/use-outside-click.ts)\n\nexport interface UseClickOutsideProps {\n  /**\n   * The reference to a DOM element.\n   */\n  element: Accessor<HTMLElement | undefined>;\n\n  /**\n   * Function invoked when a click is triggered outside the referenced element.\n   */\n  handler?: (e: Event) => void;\n}\n\nexport function useClickOutside(props: UseClickOutsideProps) {\n  const [state, setState] = createStore({\n    isPointerDown: false,\n    ignoreEmulatedMouseEvents: false,\n  });\n\n  const onPointerDown: any = (e: PointerEvent) => {\n    if (isValidEvent(e, props.element())) {\n      setState(\"isPointerDown\", true);\n    }\n  };\n\n  const onMouseUp: any = (event: MouseEvent) => {\n    if (state.ignoreEmulatedMouseEvents) {\n      setState(\"ignoreEmulatedMouseEvents\", false);\n      return;\n    }\n\n    if (state.isPointerDown && props.handler && isValidEvent(event, props.element())) {\n      setState(\"isPointerDown\", false);\n      props.handler(event);\n    }\n  };\n\n  const onTouchEnd = (event: TouchEvent) => {\n    setState(\"ignoreEmulatedMouseEvents\", true);\n    if (props.handler && state.isPointerDown && isValidEvent(event, props.element())) {\n      setState(\"isPointerDown\", false);\n      props.handler(event);\n    }\n  };\n\n  onMount(() => {\n    const doc = getOwnerDocument(props.element());\n    doc.addEventListener(\"mousedown\", onPointerDown, true);\n    doc.addEventListener(\"mouseup\", onMouseUp, true);\n    doc.addEventListener(\"touchstart\", onPointerDown, true);\n    doc.addEventListener(\"touchend\", onTouchEnd, true);\n  });\n\n  onCleanup(() => {\n    const doc = getOwnerDocument(props.element());\n    doc.removeEventListener(\"mousedown\", onPointerDown, true);\n    doc.removeEventListener(\"mouseup\", onMouseUp, true);\n    doc.removeEventListener(\"touchstart\", onPointerDown, true);\n    doc.removeEventListener(\"touchend\", onTouchEnd, true);\n  });\n}\n"
  },
  {
    "path": "packages/solid/src/hooks/use-event/__tests__/index.spec.tsx",
    "content": "import { createSignal } from \"solid-js\";\nimport { cleanup, render, screen } from \"solid-testing-library\";\n\nimport { useEvent } from \"../\";\n\ndescribe(\"useEvent\", () => {\n  afterEach(() => {\n    jest.clearAllMocks();\n    cleanup();\n  });\n\n  it(\"should call handle\", () => {\n    let _event;\n    let _handle: any;\n    const addEventListener = jest.fn((event, handle) => {\n      _event = event;\n      _handle = handle;\n    });\n    const removeEventListener = jest.fn();\n    const elementMock: any = {\n      addEventListener,\n      removeEventListener,\n    };\n\n    const wrapper = render(() => {\n      const [state, setState] = createSignal(1);\n      useEvent({\n        element: elementMock,\n        eventName: \"click\",\n        handler: () => setState(value => value + 1),\n      });\n      return <div data-testid=\"element\">{state()}</div>;\n    });\n\n    expect(addEventListener).toBeCalled();\n    expect(_event).toBe(\"click\");\n    expect(typeof _handle).toBe(\"function\");\n    const element = screen.getByTestId(\"element\");\n    expect(element).toHaveTextContent(\"1\");\n    _handle();\n    expect(element).toHaveTextContent(\"2\");\n    _handle();\n    expect(element).toHaveTextContent(\"3\");\n\n    wrapper.unmount();\n    expect(removeEventListener).toBeCalled();\n    expect(removeEventListener).toBeCalledWith(_event, _handle);\n  });\n  it(\"should call handle once\", () => {\n    let _event;\n    let _handle: any;\n    const addEventListener = jest.fn((event, handle) => {\n      _event = event;\n      _handle = handle;\n    });\n    const removeEventListener = jest.fn();\n    const elementMock: any = {\n      addEventListener,\n      removeEventListener,\n    };\n\n    const wrapper = render(() => {\n      const [state, setState] = createSignal(1);\n      useEvent({\n        element: elementMock,\n        eventName: \"click\",\n        handler: () => setState(value => value + 1),\n        once: true,\n      });\n      return <div data-testid=\"element\">{state()}</div>;\n    });\n\n    expect(addEventListener).toBeCalled();\n    expect(_event).toBe(\"click\");\n    expect(typeof _handle).toBe(\"function\");\n    const element = screen.getByTestId(\"element\");\n    expect(element).toHaveTextContent(\"1\");\n    _handle();\n    expect(element).toHaveTextContent(\"2\");\n    _handle();\n    expect(element).toHaveTextContent(\"2\");\n\n    wrapper.unmount();\n    expect(removeEventListener).toBeCalled();\n    expect(removeEventListener).toBeCalledWith(_event, _handle);\n  });\n});\n"
  },
  {
    "path": "packages/solid/src/hooks/use-event/index.ts",
    "content": "import { createEffect, onCleanup } from \"solid-js\";\n\nexport interface UseElementEventProps<Key> {\n  element?: HTMLElement | Window | Document | undefined;\n  eventName?: Key;\n  handler?: (event: Event) => void;\n  capture?: boolean;\n  once?: boolean;\n  passive?: boolean;\n}\n\nexport function useEvent<Key extends string>(props: UseElementEventProps<Key>) {\n  let _once = false;\n  const onEmit = (event: Event) => {\n    const { once } = props;\n    if (once && _once) {\n      return;\n    }\n    _once = true;\n    props.handler?.(event);\n  };\n\n  const _active = (element: any, key?: Key, capture?: boolean, passive?: boolean) => {\n    if (key && element && element.addEventListener) {\n      element.addEventListener(key, onEmit, {\n        capture,\n        passive,\n      });\n    }\n  };\n\n  const active = () => {\n    const { element, eventName, capture, passive } = props;\n    _active(element, eventName, capture, passive);\n  };\n\n  const _inactive = (element: any, key?: Key) => {\n    if (key && element && element.removeEventListener) {\n      element.removeEventListener(key, onEmit);\n    }\n  };\n\n  const inactive = () => {\n    const { element, eventName } = props;\n    _inactive(element, eventName);\n  };\n\n  createEffect((prev: any) => {\n    const { element, eventName, capture, passive } = props;\n    if (prev) {\n      _inactive(prev.element, prev.eventName);\n    }\n    _active(element, eventName, capture, passive);\n    return {\n      element,\n      eventName,\n    };\n  });\n\n  onCleanup(() => {\n    const { element, eventName } = props;\n    _inactive(element, eventName);\n  });\n\n  return {\n    active,\n    inactive,\n  };\n}\n"
  },
  {
    "path": "packages/solid/src/hooks/use-event/use-event.stories.tsx",
    "content": "import { createSignal, onMount } from \"solid-js\";\n\nimport { HopeWrapper } from \"../../components/storybook-utils\";\nimport { useEvent } from \"./\";\n\nexport default {\n  title: \"Hooks/UseEvent\",\n  parameters: { layout: \"centered\" },\n  decorators: [\n    (Story: any) => (\n      <HopeWrapper>\n        <Story />\n      </HopeWrapper>\n    ),\n  ],\n};\n\nexport const Default = () => {\n  const [state, setState] = createSignal(1);\n  let element: any;\n  useEvent({\n    element: window,\n    eventName: \"resize\",\n    handler: () => setState(value => value + 1),\n  });\n  onMount(() => {\n    useEvent({\n      element,\n      eventName: \"click\",\n      handler: () => setState(value => value + 1),\n    });\n  });\n\n  return (\n    <div>\n      <div>{state()}</div>\n      <button ref={element}>emit</button>\n    </div>\n  );\n};\nDefault.storyName = \"Anchor\";\n"
  },
  {
    "path": "packages/solid/src/hope-provider.tsx",
    "content": "/* eslint-disable solid/reactivity */\nimport {\n  Accessor,\n  createContext,\n  createEffect,\n  createSignal,\n  mergeProps,\n  PropsWithChildren,\n  useContext,\n} from \"solid-js\";\n\nimport {\n  ColorMode,\n  getDefaultColorMode,\n  saveColorModeToLocalStorage,\n  syncBodyColorModeClassName,\n} from \"./color-mode\";\nimport { drawerTransitionStyles } from \"./components/drawer/drawer.styles\";\nimport { menuTransitionStyles } from \"./components/menu/menu.styles\";\nimport { modalTransitionStyles } from \"./components/modal/modal.styles\";\nimport { notificationTransitionStyles } from \"./components/notification/notification.styles\";\nimport { popoverTransitionStyles } from \"./components/popover/popover.styles\";\nimport { selectTransitionStyles } from \"./components/select/select.styles\";\nimport { tooltipTransitionStyles } from \"./components/tooltip/tooltip.styles\";\nimport { ThemeStyleConfig } from \"./style-config.types\";\nimport { globalResetStyles } from \"./styled-system/css-reset\";\nimport { HopeTheme, StitchesThemeConfig } from \"./styled-system/types\";\nimport { extendBaseTheme } from \"./styled-system/utils\";\n\n/**\n * Hope UI theme override configuration.\n */\nexport interface HopeThemeConfig {\n  initialColorMode?: ColorMode;\n  lightTheme?: StitchesThemeConfig;\n  darkTheme?: StitchesThemeConfig;\n  components?: ThemeStyleConfig;\n}\n\nexport interface HopeContextValue {\n  components: ThemeStyleConfig;\n  theme: Accessor<HopeTheme>;\n  colorMode: Accessor<ColorMode>;\n  setColorMode: (value: ColorMode) => void;\n  toggleColorMode: () => void;\n}\n\nexport const HopeContext = createContext<HopeContextValue>();\n\nexport type HopeProviderProps = PropsWithChildren<{\n  /**\n   * Hope UI theme configuration.\n   */\n  config?: HopeThemeConfig;\n\n  /**\n   * Whether CSS Reset should be applied.\n   */\n  enableCssReset?: boolean;\n}>;\n\n/**\n * Apply the styles needed for Hope UI components transitions.\n */\nfunction applyGlobalTransitionStyles() {\n  drawerTransitionStyles();\n  menuTransitionStyles();\n  modalTransitionStyles();\n  notificationTransitionStyles();\n  popoverTransitionStyles();\n  selectTransitionStyles();\n  tooltipTransitionStyles();\n}\n\nexport function HopeProvider(props: HopeProviderProps) {\n  const defaultProps: HopeProviderProps = {\n    enableCssReset: true,\n  };\n\n  props = mergeProps(defaultProps, props);\n\n  // Create themes\n  const lightTheme = extendBaseTheme(\"light\", props.config?.lightTheme ?? {});\n  const darkTheme = extendBaseTheme(\"dark\", props.config?.darkTheme ?? {});\n\n  // Get default context values\n  const defaultColorMode = getDefaultColorMode(props.config?.initialColorMode ?? \"light\");\n  const defaultTheme = defaultColorMode === \"dark\" ? darkTheme : lightTheme;\n\n  // Create context signals\n  const [colorMode, rawSetColorMode] = createSignal(defaultColorMode);\n  const [theme, setTheme] = createSignal(defaultTheme);\n\n  const isDarkMode = () => colorMode() === \"dark\";\n\n  const setColorMode = (value: ColorMode) => {\n    rawSetColorMode(value);\n    saveColorModeToLocalStorage(value);\n  };\n\n  const toggleColorMode = () => {\n    setColorMode(isDarkMode() ? \"light\" : \"dark\");\n  };\n\n  const context: HopeContextValue = {\n    components: props.config?.components ?? {},\n    theme,\n    colorMode,\n    setColorMode,\n    toggleColorMode,\n  };\n\n  createEffect(() => {\n    // When color mode changes, switch theme and update `document.body` theme class.\n    setTheme(isDarkMode() ? darkTheme : lightTheme);\n    syncBodyColorModeClassName(isDarkMode());\n  });\n\n  if (props.enableCssReset) {\n    globalResetStyles();\n  }\n\n  applyGlobalTransitionStyles();\n\n  return <HopeContext.Provider value={context}>{props.children}</HopeContext.Provider>;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * ThemeProvider - hooks\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Custom hook that reads from `HopeProvider` context\n * Returns an accessor for the current used theme.\n */\nexport function useTheme() {\n  const context = useContext(HopeContext);\n\n  if (!context) {\n    throw new Error(\"[Hope UI]: useTheme must be used within a HopeProvider\");\n  }\n\n  return context.theme;\n}\n\n/**\n * Custom hook that reads from `HopeProvider` context\n * Returns an accessor for the theme based components style config.\n */\nexport function useStyleConfig(): ThemeStyleConfig {\n  const context = useContext(HopeContext);\n\n  if (!context) {\n    throw new Error(\"[Hope UI]: useStyleConfig must be used within a HopeProvider\");\n  }\n\n  return context.components;\n}\n\n/* -------------------------------------------------------------------------------------------------\n * ColorMode - hooks\n * -----------------------------------------------------------------------------------------------*/\n\n/**\n * Custom hook that reads from `HopeProvider` context\n * Returns an accessor for the color mode and function to toggle it\n */\nexport function useColorMode(): Pick<\n  HopeContextValue,\n  \"colorMode\" | \"setColorMode\" | \"toggleColorMode\"\n> {\n  const context = useContext(HopeContext);\n\n  if (!context) {\n    throw new Error(\"[Hope UI]: useColorMode must be used within a HopeProvider\");\n  }\n\n  return {\n    colorMode: context.colorMode,\n    setColorMode: context.setColorMode,\n    toggleColorMode: context.toggleColorMode,\n  };\n}\n\n/**\n * Change value based on color mode.\n *\n * @param light the light mode value\n * @param dark the dark mode value\n * @return A derived signal based on the color mode.\n */\nexport function useColorModeValue<T = any>(light: T, dark: T) {\n  const { colorMode } = useColorMode();\n  return () => (colorMode() === \"dark\" ? dark : light);\n}\n"
  },
  {
    "path": "packages/solid/src/index.ts",
    "content": "export * from \"./color-mode\";\nexport * from \"./components\";\nexport * from \"./hooks\";\nexport * from \"./hope-provider\";\nexport * from \"./style-config.types\";\nexport * from \"./styled-system\";\nexport * from \"./utils\";\n"
  },
  {
    "path": "packages/solid/src/style-config.types.ts",
    "content": "import { AccordionStyleConfig } from \"./components/accordion/accordion\";\nimport { AlertStyleConfig } from \"./components/alert/alert\";\nimport { AnchorStyleConfig } from \"./components/anchor/anchor\";\nimport { AvatarStyleConfig } from \"./components/avatar/avatar\";\nimport { BadgeStyleConfig } from \"./components/badge/badge\";\nimport { BreadcrumbStyleConfig } from \"./components/breadcrumb/breadcrumb\";\nimport { ButtonStyleConfig } from \"./components/button/button\";\nimport { CheckboxStyleConfig } from \"./components/checkbox/checkbox\";\nimport { CircularProgressStyleConfig } from \"./components/circular-progress/circular-progress\";\nimport { CloseButtonStyleConfig } from \"./components/close-button/close-button\";\nimport { DrawerStyleConfig } from \"./components/drawer/drawer\";\nimport { FormControlStyleConfig } from \"./components/form-control/form-control\";\nimport { HeadingStyleConfig } from \"./components/heading/heading\";\nimport { IconButtonStyleConfig } from \"./components/icon-button/icon-button\";\nimport { InputStyleConfig } from \"./components/input/input\";\nimport { KbdStyleConfig } from \"./components/kbd/kbd\";\nimport { MenuStyleConfig } from \"./components/menu/menu\";\nimport { ModalStyleConfig } from \"./components/modal/modal\";\nimport { NotificationStyleConfig } from \"./components/notification/notification\";\nimport { PopoverStyleConfig } from \"./components/popover/popover\";\nimport { ProgressStyleConfig } from \"./components/progress/progress\";\nimport { RadioStyleConfig } from \"./components/radio/radio\";\nimport { SelectStyleConfig } from \"./components/select/select\";\nimport { SpinnerStyleConfig } from \"./components/spinner/spinner\";\nimport { SwitchStyleConfig } from \"./components/switch/switch\";\nimport { TableStyleConfig } from \"./components/table/table\";\nimport { TabsStyleConfig } from \"./components/tabs/tabs\";\nimport { TagStyleConfig } from \"./components/tag/tag\";\nimport { TextStyleConfig } from \"./components/text/text\";\nimport { TextareaStyleConfig } from \"./components/textarea/textarea\";\nimport { TooltipStyleConfig } from \"./components/tooltip/tooltip\";\n\nexport interface ThemeStyleConfig {\n  Accordion?: AccordionStyleConfig;\n  Alert?: AlertStyleConfig;\n  Anchor?: AnchorStyleConfig;\n  Avatar?: AvatarStyleConfig;\n  Badge?: BadgeStyleConfig;\n  Breadcrumb?: BreadcrumbStyleConfig;\n  Button?: ButtonStyleConfig;\n  Checkbox?: CheckboxStyleConfig;\n  CircularProgress?: CircularProgressStyleConfig;\n  CloseButton?: CloseButtonStyleConfig;\n  Drawer?: DrawerStyleConfig;\n  FormControl?: FormControlStyleConfig;\n  Heading?: HeadingStyleConfig;\n  IconButton?: IconButtonStyleConfig;\n  Input?: InputStyleConfig;\n  Kbd?: KbdStyleConfig;\n  Menu?: MenuStyleConfig;\n  Modal?: ModalStyleConfig;\n  Notification?: NotificationStyleConfig;\n  Popover?: PopoverStyleConfig;\n  Progress?: ProgressStyleConfig;\n  Radio?: RadioStyleConfig;\n  Select?: SelectStyleConfig;\n  Spinner?: SpinnerStyleConfig;\n  Switch?: SwitchStyleConfig;\n  Table?: TableStyleConfig;\n  Tabs?: TabsStyleConfig;\n  Tag?: TagStyleConfig;\n  Text?: TextStyleConfig;\n  Textarea?: TextareaStyleConfig;\n  Tooltip?: TooltipStyleConfig;\n}\n"
  },
  {
    "path": "packages/solid/src/styled-system/css-reset.ts",
    "content": "import { globalCss } from \"./stitches.config\";\n\n/**\n * Hope UI global css reset\n */\nexport const globalResetStyles = globalCss({\n  /* \n    1. Use a more-intuitive box-sizing model. \n    2. Set default border width and style to apply border props easily. \n  */\n  \"*, ::before, ::after\": {\n    boxSizing: \"border-box\" /* 1 */,\n    borderWidth: \"0\" /* 2  */,\n    borderStyle: \"solid\" /* 2  */,\n  },\n\n  /* Remove default margin. */\n  \"*\": {\n    margin: 0,\n  },\n\n  /* Allow percentage-based heights in the application. */\n  \"html, body\": {\n    height: \"100%\",\n  },\n\n  /* \n    1. Use theme `sans` font-family.\n    2. Use theme `base` line height.\n  */\n  html: {\n    fontFamily: \"$sans\" /* 1 */,\n    lineHeight: \"$base\" /* 2 */,\n    fontSize: \"16px\",\n  },\n\n  /* \n    1. Use theme `background` color for background-color.\n    2. Use theme `neutral` color for text. \n    3. Improve text rendering. \n  */\n  body: {\n    backgroundColor: \"$background\" /* 1 */,\n    color: \"$neutral12\" /* 2 */,\n    fontFamily: \"inherit\",\n    lineHeight: \"inherit\",\n    \"-webkit-font-smoothing\": \"antialiased\",\n    \"-moz-osx-font-smoothing\": \"grayscale\",\n  },\n\n  /* Headings are unstyled. */\n  \"h1, h2, h3, h4, h5, h6\": {\n    fontSize: \"inherit\",\n    fontWeight: \"inherit\",\n  },\n\n  /* Avoid text overflows. */\n  \"p, h1, h2, h3, h4, h5, h6\": {\n    overflowWrap: \"break-word\",\n  },\n\n  /* Improve media defaults. */\n  \"img, picture, video, canvas, svg\": {\n    display: \"block\",\n    maxWidth: \"100%\",\n  },\n\n  /* Remove built-in form typography styles. */\n  \"button, input, textarea, select, optgroup\": {\n    fontFamily: \"inherit\",\n    fontSize: \"100%\",\n  },\n\n  /* Buttons have a default outline. */\n  \"button:focus\": {\n    outline: \"5px auto -webkit-focus-ring-color\",\n  },\n\n  /* fieldset have no margin and padding. */\n  fieldset: {\n    margin: 0,\n    padding: 0,\n  },\n\n  /* List have no margin and padding. */\n  \"ol, ul\": {\n    margin: 0,\n    padding: 0,\n  },\n\n  /* Anchor are unstyled. */\n  a: {\n    backgroundColor: \"transparent\",\n    color: \"inherit\",\n    textDecoration: \"inherit\",\n  },\n});\n"
  },
  {
    "path": "packages/solid/src/styled-system/index.ts",
    "content": "export * from \"./stitches.config\";\nexport * from \"./types\";\n"
  },
  {
    "path": "packages/solid/src/styled-system/keyframes.ts",
    "content": "import { keyframes } from \"./stitches.config\";\n\nexport const spin = keyframes({\n  from: { transform: \"rotate(0deg)\" },\n  to: { transform: \"rotate(360deg)\" },\n});\n\nexport const fadeIn = keyframes({\n  from: { opacity: 0 },\n  to: { opacity: 1 },\n});\n"
  },
  {
    "path": "packages/solid/src/styled-system/media.ts",
    "content": "import { sizes } from \"./tokens/sizes\";\n\nexport const baseMedia = {\n  sm: `(min-width: ${sizes.containerSm})`,\n  md: `(min-width: ${sizes.containerMd})`,\n  lg: `(min-width: ${sizes.containerLg})`,\n  xl: `(min-width: ${sizes.containerXl})`,\n  \"2xl\": `(min-width: ${sizes.container2xl})`,\n  \"reduce-motion\": \"(prefers-reduced-motion: reduce)\",\n  light: \"(prefers-color-scheme: light)\",\n  dark: \"(prefers-color-scheme: dark)\",\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/props/border.ts",
    "content": "import { Property } from \"csstype\";\n\nimport { ColorScaleValue, KeysOf } from \"../types\";\n\n/**\n * Types for border CSS properties\n */\nexport type BorderProps = Partial<{\n  /**\n   * The CSS `border` property\n   */\n  border: Property.Border;\n\n  /**\n   * The CSS `border-width` property\n   */\n  borderWidth: Property.BorderWidth | number;\n\n  /**\n   * The CSS `border-style` property\n   */\n  borderStyle: Property.BorderStyle;\n\n  /**\n   * The CSS `border-color` property\n   */\n  borderColor: Property.BorderColor | ColorScaleValue;\n\n  /**\n   * The CSS `border-top` property\n   */\n  borderTop: Property.BorderTop;\n\n  /**\n   * The CSS `border-top-width` property\n   */\n  borderTopWidth: Property.BorderTopWidth | number;\n\n  /**\n   * The CSS `border-top-style` property\n   */\n  borderTopStyle: Property.BorderTopStyle;\n\n  /**\n   * The CSS `border-top-color` property\n   */\n  borderTopColor: Property.BorderTopColor | ColorScaleValue;\n\n  /**\n   * The CSS `border-right` property\n   */\n  borderRight: Property.BorderRight;\n\n  /**\n   * The CSS `border-right-width` property\n   */\n  borderRightWidth: Property.BorderRightWidth | number;\n\n  /**\n   * The CSS `border-right-style` property\n   */\n  borderRightStyle: Property.BorderRightStyle;\n\n  /**\n   * The CSS `border-right-color` property\n   */\n  borderRightColor: Property.BorderRightColor | ColorScaleValue;\n\n  /**\n   * The CSS `border-bottom` property\n   */\n  borderBottom: Property.BorderBottom;\n\n  /**\n   * The CSS `border-bottom-width` property\n   */\n  borderBottomWidth: Property.BorderBottomWidth | number;\n\n  /**\n   * The CSS `border-bottom-style` property\n   */\n  borderBottomStyle: Property.BorderBottomStyle;\n\n  /**\n   * The CSS `border-bottom-color` property\n   */\n  borderBottomColor: Property.BorderBottomColor | ColorScaleValue;\n\n  /**\n   * The CSS `border-left` property\n   */\n  borderLeft: Property.BorderLeft;\n\n  /**\n   * The CSS `border-left-width` property\n   */\n  borderLeftWidth: Property.BorderLeftWidth | number;\n\n  /**\n   * The CSS `border-left-style` property\n   */\n  borderLeftStyle: Property.BorderLeftStyle;\n\n  /**\n   * The CSS `border-left-color` property\n   */\n  borderLeftColor: Property.BorderLeftColor | ColorScaleValue;\n\n  /**\n   * The CSS `border-right` and `border-left` property\n   */\n  borderX: Property.BorderLeft;\n\n  /**\n   * The CSS `border-top` and `border-bottom` property\n   */\n  borderY: Property.BorderTop;\n}>;\n\n/**\n * Style prop names for border properties\n */\nexport const borderPropNames: KeysOf<BorderProps> = {\n  border: true,\n  borderWidth: true,\n  borderStyle: true,\n  borderColor: true,\n  borderTop: true,\n  borderTopWidth: true,\n  borderTopStyle: true,\n  borderTopColor: true,\n  borderRight: true,\n  borderRightWidth: true,\n  borderRightStyle: true,\n  borderRightColor: true,\n  borderBottom: true,\n  borderBottomWidth: true,\n  borderBottomStyle: true,\n  borderBottomColor: true,\n  borderLeft: true,\n  borderLeftWidth: true,\n  borderLeftStyle: true,\n  borderLeftColor: true,\n  borderX: true,\n  borderY: true,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/props/color.ts",
    "content": "import { Property } from \"csstype\";\n\nimport { ColorScaleValue, KeysOf } from \"../types\";\n\n/**\n * Types for color related CSS properties\n */\nexport type ColorProps = Partial<{\n  /**\n   * The CSS `color` property\n   */\n  color: Property.Color | ColorScaleValue;\n\n  /**\n   * The CSS `background` property\n   */\n  background: Property.Background<ColorScaleValue>;\n\n  /**\n   * The CSS `background` property\n   */\n  bg: Property.Background<ColorScaleValue>;\n\n  /**\n   * The CSS `background-color` property\n   */\n  backgroundColor: Property.BackgroundColor | ColorScaleValue;\n\n  /**\n   * The CSS `background-color` property\n   */\n  bgColor: Property.BackgroundColor | ColorScaleValue;\n\n  /**\n   * The CSS `opacity` property\n   */\n  opacity: Property.Opacity;\n}>;\n\n/**\n * Style prop names for color related properties\n */\nexport const colorPropNames: KeysOf<ColorProps> = {\n  color: true,\n  background: true,\n  bg: true,\n  backgroundColor: true,\n  bgColor: true,\n  opacity: true,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/props/css.ts",
    "content": "import { KeysOf, SystemStyleObject } from \"../types\";\n\n/**\n * The `css` prop allow you to override styles easily.\n * It’s like the style attribute, but it supports tokens, media queries, nesting and token-aware values.\n */\nexport type CSSProp = {\n  css?: SystemStyleObject;\n};\n\n/**\n * Style prop names for the `css` prop\n */\nexport const cssPropName: KeysOf<CSSProp> = { css: true };\n"
  },
  {
    "path": "packages/solid/src/styled-system/props/flexbox.ts",
    "content": "import { Property } from \"csstype\";\n\nimport { KeysOf } from \"../types\";\n\n/**\n * Types for CSS flexbox  properties\n */\nexport type FlexboxProps = Partial<{\n  /**\n   * The CSS `align-items` property.\n   *\n   * It defines the `align-self` value on all direct children as a group.\n   *\n   * - In Flexbox, it controls the alignment of items on the Cross Axis.\n   * - In Grid Layout, it controls the alignment of items on the Block Axis within their grid area.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/align-items)\n   */\n  alignItems: Property.AlignItems;\n\n  /**\n   * The CSS `align-content` property.\n   *\n   * It defines the distribution of space between and around\n   * content items along a flexbox's cross-axis or a grid's block axis.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/align-content)\n   */\n  alignContent: Property.AlignContent;\n\n  /**\n   * The CSS `align-self` property.\n   *\n   * It works like `align-items`, but applies only to a\n   * single flexbox item, instead of all of them.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/align-self)\n   */\n  alignSelf: Property.AlignSelf;\n\n  /**\n   * The CSS `justify-items` property.\n   *\n   * It defines the default `justify-self` for all items of the box,\n   * giving them all a default way of justifying each box\n   * along the appropriate axis.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/justify-items)\n   */\n  justifyItems: Property.JustifyItems;\n\n  /**\n   * The CSS `justify-content` property.\n   *\n   * It defines how the browser distributes space between and around content items\n   * along the main-axis of a flex container, and the inline axis of a grid container.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/justify-content)\n   */\n  justifyContent: Property.JustifyContent;\n\n  /**\n   * The CSS `justify-self` property.\n   *\n   * It defines the way a box is justified inside its\n   * alignment container along the appropriate axis.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/flex-flow)\n   */\n  justifySelf: Property.JustifySelf;\n\n  /**\n   * The CSS `flex-wrap` property.\n   *\n   * It defines whether flex items are forced onto one line or\n   * can wrap onto multiple lines. If wrapping is allowed,\n   * it sets the direction that lines are stacked.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/flex-wrap)\n   */\n  flexWrap: Property.FlexWrap;\n\n  /**\n   * The CSS `flex-direction` property.\n   *\n   * It defines how flex items are placed in the flex container\n   * defining the main axis and the direction (normal or reversed).\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/flex-direction)\n   */\n  flexDirection: Property.FlexDirection;\n\n  /**\n   * The CSS `flex` property.\n   *\n   * It defines how a flex item will grow or shrink\n   * to fit the space available in its flex container.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/flex)\n   */\n  flex: Property.Flex;\n\n  /**\n   * The CSS `flex-grow` property.\n   *\n   * It defines how much a flexbox item should grow\n   * if there's space available.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/flex-grow)\n   */\n  flexGrow: Property.FlexGrow;\n\n  /**\n   * The CSS `flex-shrink` property.\n   *\n   * It defines how much a flexbox item should shrink\n   * if there's not enough space available.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/flex-shrink)\n   */\n  flexShrink: Property.FlexShrink;\n\n  /**\n   * The CSS `flex-basis` property.\n   *\n   * It defines the initial main size of a flex item.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/flex-basis)\n   */\n  flexBasis: Property.FlexBasis;\n\n  /**\n   * The CSS `order` property.\n   *\n   * It defines the order to lay out an item in a flex or grid container.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/order)\n   */\n  order: Property.Order;\n}>;\n\n/**\n * Style prop names used in flexbox based components\n */\nexport const flexboxPropNames: KeysOf<FlexboxProps> = {\n  alignItems: true,\n  alignContent: true,\n  alignSelf: true,\n  justifyItems: true,\n  justifyContent: true,\n  justifySelf: true,\n  flexDirection: true,\n  flexWrap: true,\n  flex: true,\n  flexGrow: true,\n  flexShrink: true,\n  flexBasis: true,\n  order: true,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/props/grid.ts",
    "content": "import { Property } from \"csstype\";\n\nimport { KeysOf, SpaceScaleValue } from \"../types\";\n\n/**\n * Types for CSS grid properties\n */\nexport type GridLayoutProps = Partial<{\n  /**\n   * The CSS `grid-template` property.\n   *\n   * It is a shorthand property for defining grid columns, rows, and areas.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template)\n   */\n  gridTemplate: Property.GridTemplate;\n\n  /**\n   * The CSS `grid-template-columns` property\n   *\n   * It defines the line names and track sizing functions of the grid columns.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns)\n   */\n  gridTemplateColumns: Property.GridTemplateColumns;\n\n  /**\n   * The CSS `grid-template-rows` property.\n   *\n   * It defines the line names and track sizing functions of the grid rows.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-rows)\n   */\n  gridTemplateRows: Property.GridTemplateRows;\n\n  /**\n   * The CSS `grid-template-areas` property.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas)\n   */\n  gridTemplateAreas: Property.GridTemplateAreas;\n\n  /**\n   * The CSS `grid-areas` property.\n   *\n   * It specifies a grid item’s size and location within a grid by\n   * contributing a line, a span, or nothing (automatic)\n   * to its grid placement, thereby specifying the edges of its grid area.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area)\n   */\n  gridArea: Property.GridArea;\n\n  /**\n   * The CSS `grid-auto-flow` property\n   *\n   * It controls how the auto-placement algorithm works,\n   * specifying exactly how auto-placed items get flowed into the grid.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-flow)\n   */\n  gridAutoFlow: Property.GridAutoFlow;\n\n  /**\n   * The CSS `grid-auto-columns` property.\n   *\n   * It specifies the size of an implicitly-created grid column track or pattern of tracks.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-columns)\n   */\n  gridAutoColumns: Property.GridAutoColumns;\n\n  /**\n   * The CSS `grid-auto-rows` property.\n   *\n   * It specifies the size of an implicitly-created grid row track or pattern of tracks.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-auto-rows)\n   */\n  gridAutoRows: Property.GridAutoRows;\n\n  /**\n   * The CSS `grid-column` property.\n   *\n   * It specifies a grid item's size and location within a grid column\n   * by contributing a line, a span, or nothing (automatic) to its grid placement,\n   * thereby specifying the `inline-start` and `inline-end` edge of its grid area.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column)\n   */\n  gridColumn: Property.GridColumn;\n\n  /**\n   * The CSS `grid-column` property.\n   *\n   * It specifies a grid item’s start position within the grid column by\n   * contributing a line, a span, or nothing (automatic) to its grid placement\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-start)\n   */\n  gridColumnStart: Property.GridColumnStart;\n\n  /**\n   * The CSS `grid-column` property\n   *\n   * It specifies a grid item’s end position within the grid column by\n   * contributing a line, a span, or nothing (automatic) to its grid placement,\n   * thereby specifying the block-end edge of its grid area.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end)\n   */\n  gridColumnEnd: Property.GridColumnEnd;\n\n  /**\n   * The CSS `grid-row` property\n   *\n   * It specifies a grid item’s size and location within the grid row\n   * by contributing a line, a span, or nothing (automatic) to its grid placement,\n   * thereby specifying the `inline-start` and `inline-end` edge of its grid area.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row)\n   */\n  gridRow: Property.GridRow;\n\n  /**\n   * The CSS `grid-row-start` property\n   *\n   * It specifies a grid item’s start position within the grid row by\n   * contributing a line, a span, or nothing (automatic) to its grid placement,\n   * thereby specifying the `inline-start` edge of its grid area.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-start)\n   */\n  gridRowStart: Property.GridRowStart;\n\n  /**\n   * The CSS `grid-row-end` property\n   *\n   * It specifies a grid item’s end position within the grid row by\n   * contributing a line, a span, or nothing (automatic) to its grid placement,\n   * thereby specifying the `inline-end` edge of its grid area.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-end)\n   */\n  gridRowEnd: Property.GridRowEnd;\n\n  /**\n   * The CSS `place-items` property.\n   *\n   * It allows you to align items along both the block and\n   * inline directions at once (i.e. the align-items and justify-items properties)\n   * in a relevant layout system such as `Grid` or `Flex`.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/place-items)\n   */\n  placeItems: Property.PlaceItems;\n\n  /**\n   * The CSS `place-content` property.\n   *\n   * It allows you to align content along both the block and\n   * inline directions at once (i.e. the align-content and justify-content properties)\n   * in a relevant layout system such as Grid or Flexbox.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/place-content)\n   */\n  placeContent: Property.PlaceContent;\n\n  /**\n   * The CSS `place-self` property.\n   *\n   * It allows you to align an individual item in both the block and\n   * inline directions at once (i.e. the align-self and justify-self properties)\n   * in a relevant layout system such as Grid or Flexbox.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/place-self)\n   */\n  placeSelf: Property.PlaceSelf;\n\n  /**\n   * The CSS `gap` property.\n   *\n   * It defines the gap between items in both flex and\n   * grid contexts.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/gap)\n   */\n  gap: Property.Gap<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `row-gap` property.\n   *\n   * It sets the size of the gap (gutter) between an element's grid rows.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/row-gap)\n   */\n  rowGap: Property.RowGap<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `column-gap` property.\n   *\n   * It sets the size of the gap (gutter) between an element's columns.\n   *\n   * @see [Mozilla Docs](https://developer.mozilla.org/docs/Web/CSS/column-gap)\n   */\n  columnGap: Property.ColumnGap<SpaceScaleValue> | number;\n}>;\n\n/**\n * Style prop names used in CSS grid based components\n */\nexport const gridLayoutPropNames: KeysOf<GridLayoutProps> = {\n  gridTemplate: true,\n  gridTemplateColumns: true,\n  gridTemplateRows: true,\n  gridTemplateAreas: true,\n  gridArea: true,\n  gridRow: true,\n  gridRowStart: true,\n  gridRowEnd: true,\n  gridColumn: true,\n  gridColumnStart: true,\n  gridColumnEnd: true,\n  gridAutoFlow: true,\n  gridAutoColumns: true,\n  gridAutoRows: true,\n  placeItems: true,\n  placeContent: true,\n  placeSelf: true,\n  gap: true,\n  rowGap: true,\n  columnGap: true,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/props/interactivity.ts",
    "content": "import { Property } from \"csstype\";\n\nimport { ColorScaleValue, KeysOf } from \"../types\";\n\n/**\n * Types for interactivity CSS properties\n */\nexport type InteractivityProps = Partial<{\n  /**\n   * The CSS `appearance` property\n   */\n  appearance: Property.Appearance;\n\n  /**\n   * The CSS `user-select` property\n   */\n  userSelect: Property.UserSelect;\n\n  /**\n   * The CSS `pointer-events` property\n   */\n  pointerEvents: Property.PointerEvents;\n\n  /**\n   * The CSS `resize` property\n   */\n  resize: Property.Resize;\n\n  /**\n   * The CSS `cursor` property\n   */\n  cursor: Property.Cursor;\n\n  /**\n   * The CSS `outline` property\n   */\n  outline: Property.Outline<string | 0 | number>;\n\n  /**\n   * The CSS `outline-offset` property\n   */\n  outlineOffset: Property.OutlineOffset<string | 0 | number>;\n\n  /**\n   * The CSS `outline-color` property\n   */\n  outlineColor: Property.OutlineColor | ColorScaleValue;\n}>;\n\n/**\n * Style prop names for interactivity CSS related properties\n */\nexport const interactivityPropNames: KeysOf<InteractivityProps> = {\n  appearance: true,\n  userSelect: true,\n  pointerEvents: true,\n  resize: true,\n  cursor: true,\n  outline: true,\n  outlineOffset: true,\n  outlineColor: true,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/props/layout.ts",
    "content": "import { Property } from \"csstype\";\n\nimport { KeysOf } from \"../types\";\n\n/**\n * Types for layout related CSS properties\n */\nexport type LayoutProps = Partial<{\n  /**\n   * The CSS `display` property\n   */\n  display: Property.Display;\n\n  /**\n   * The CSS `display` property\n   */\n  d: Property.Display;\n\n  /**\n   * The CSS `vertical-align` property\n   */\n  verticalAlign: Property.VerticalAlign;\n\n  /**\n   * The CSS `overflow` property\n   */\n  overflow: Property.Overflow;\n\n  /**\n   * The CSS `overflow-x` property\n   */\n  overflowX: Property.OverflowX;\n\n  /**\n   * The CSS `overflow-y` property\n   */\n  overflowY: Property.OverflowY;\n\n  /**\n   * The CSS `object-fit` property\n   */\n  objectFit?: Property.ObjectFit;\n\n  /**\n   * The CSS `object-position` property\n   */\n  objectPosition?: Property.ObjectPosition;\n}>;\n\n/**\n * Style prop names for layout related properties\n */\nexport const layoutPropNames: KeysOf<LayoutProps> = {\n  display: true,\n  d: true,\n  verticalAlign: true,\n  overflow: true,\n  overflowX: true,\n  overflowY: true,\n  objectFit: true,\n  objectPosition: true,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/props/margin.ts",
    "content": "import { Property } from \"csstype\";\n\nimport { KeysOf, SpaceScaleValue } from \"../types\";\n\n/**\n * Types for margin CSS properties\n */\nexport type MarginProps = Partial<{\n  /**\n   * The CSS `margin` property\n   */\n  margin: Property.Margin<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `margin` property\n   */\n  m: Property.Margin<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `margin-top` property\n   */\n  marginTop: Property.MarginTop<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `margin-top` property\n   */\n  mt: Property.MarginTop<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `margin-right` property\n   */\n  marginRight: Property.MarginRight<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `margin-right` property\n   */\n  mr: Property.MarginRight<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `margin-inline-start`  property\n   */\n  marginStart: Property.MarginInlineStart<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `margin-inline-start`  property\n   */\n  ms: Property.MarginInlineStart<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `margin-bottom` property\n   */\n  marginBottom: Property.MarginBottom<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `margin-bottom` property\n   */\n  mb: Property.MarginBottom<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `margin-left`  property\n   */\n  marginLeft: Property.MarginLeft<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `margin-left`  property\n   */\n  ml: Property.MarginLeft<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `margin-inline-end`  property\n   */\n  marginEnd: Property.MarginInlineEnd<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `margin-inline-end`  property\n   */\n  me: Property.MarginInlineEnd<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `margin-inline-start` and `margin-inline-end` property\n   */\n  mx: Property.MarginInlineStart<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `margin-top` and `margin-bottom` property\n   */\n  my: Property.MarginTop<SpaceScaleValue> | number;\n}>;\n\n/**\n * Style prop names for margin properties\n */\nexport const marginPropNames: KeysOf<MarginProps> = {\n  margin: true,\n  m: true,\n  marginTop: true,\n  mt: true,\n  marginRight: true,\n  mr: true,\n  marginStart: true,\n  ms: true,\n  marginBottom: true,\n  mb: true,\n  marginLeft: true,\n  ml: true,\n  marginEnd: true,\n  me: true,\n  mx: true,\n  my: true,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/props/padding.ts",
    "content": "import { Property } from \"csstype\";\n\nimport { KeysOf, SpaceScaleValue } from \"../types\";\n\n/**\n * Types for padding CSS properties\n */\nexport type PaddingProps = Partial<{\n  /**\n   * The CSS `padding` property\n   */\n  padding: Property.Padding<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `padding` property\n   */\n  p: Property.Padding<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `padding-top` property\n   */\n  paddingTop: Property.PaddingTop<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `padding-top` property\n   */\n  pt: Property.PaddingTop<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `padding-right` property\n   */\n  paddingRight: Property.PaddingRight<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `padding-right` property\n   */\n  pr: Property.PaddingRight<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `padding-inline-start`  property\n   */\n  paddingStart: Property.PaddingInlineStart<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `padding-inline-start`  property\n   */\n  ps: Property.PaddingInlineStart<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `padding-bottom` property\n   */\n  paddingBottom: Property.PaddingBottom<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `padding-bottom` property\n   */\n  pb: Property.PaddingBottom<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `padding-left`  property\n   */\n  paddingLeft: Property.PaddingLeft<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `padding-left`  property\n   */\n  pl: Property.PaddingLeft<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `padding-inline-end`  property\n   */\n  paddingEnd: Property.PaddingInlineEnd<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `padding-inline-end`  property\n   */\n  pe: Property.PaddingInlineEnd<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `padding-inline-start` and `padding-inline-end` property\n   */\n  px: Property.PaddingInlineStart<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `padding-top` and `padding-bottom` property\n   */\n  py: Property.PaddingTop<SpaceScaleValue> | number;\n}>;\n\n/**\n * Style prop names for padding properties\n */\nexport const paddingPropNames: KeysOf<PaddingProps> = {\n  padding: true,\n  p: true,\n  paddingTop: true,\n  pt: true,\n  paddingRight: true,\n  pr: true,\n  paddingStart: true,\n  ps: true,\n  paddingBottom: true,\n  pb: true,\n  paddingLeft: true,\n  pl: true,\n  paddingEnd: true,\n  pe: true,\n  px: true,\n  py: true,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/props/position.ts",
    "content": "import { Property } from \"csstype\";\n\nimport { KeysOf, SpaceScaleValue, ZIndiceScaleValue } from \"../types\";\n\n/**\n * Types for position CSS properties\n */\nexport type PositionProps = Partial<{\n  /**\n   * The CSS `position` property\n   */\n  position: Property.Position;\n\n  /**\n   * The CSS `position` property\n   */\n  pos: Property.Position;\n\n  /**\n   * The CSS `z-index` property\n   */\n  zIndex: Property.ZIndex | ZIndiceScaleValue;\n\n  /**\n   * The CSS `top` property\n   */\n  top: Property.Top<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `right` property\n   */\n  right: Property.Right<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `bottom` property\n   */\n  bottom: Property.Bottom<SpaceScaleValue> | number;\n\n  /**\n   * The CSS `left` property\n   */\n  left: Property.Left<SpaceScaleValue> | number;\n}>;\n\n/**\n * Style prop names for position realted properties\n */\nexport const positionPropNames: KeysOf<PositionProps> = {\n  position: true,\n  pos: true,\n  zIndex: true,\n  top: true,\n  right: true,\n  bottom: true,\n  left: true,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/props/pseudo-selector.ts",
    "content": "import { PseudoSelector } from \"../stitches-utils/pseudo-selector\";\nimport { KeysOf, SystemStyleObject } from \"../types\";\n\n/**\n * Types for common CSS pseudo selectors\n */\nexport type PseudoSelectorProps = Partial<{\n  [k in keyof PseudoSelector]: SystemStyleObject;\n}>;\n\nexport const pseudoSelectorPropNames: KeysOf<PseudoSelectorProps> = {\n  _hover: true,\n  _active: true,\n  _focus: true,\n  _highlighted: true,\n  _focusWithin: true,\n  _focusVisible: true,\n  _disabled: true,\n  _readOnly: true,\n  _before: true,\n  _after: true,\n  _empty: true,\n  _expanded: true,\n  _checked: true,\n  _grabbed: true,\n  _pressed: true,\n  _invalid: true,\n  _valid: true,\n  _loading: true,\n  _selected: true,\n  _hidden: true,\n  _even: true,\n  _odd: true,\n  _first: true,\n  _last: true,\n  _notFirst: true,\n  _notLast: true,\n  _visited: true,\n  _activeLink: true,\n  _activeStep: true,\n  _indeterminate: true,\n  _groupHover: true,\n  _peerHover: true,\n  _groupFocus: true,\n  _peerFocus: true,\n  _groupFocusVisible: true,\n  _peerFocusVisible: true,\n  _groupActive: true,\n  _peerActive: true,\n  _groupSelected: true,\n  _peerSelected: true,\n  _groupDisabled: true,\n  _peerDisabled: true,\n  _groupInvalid: true,\n  _peerInvalid: true,\n  _groupChecked: true,\n  _peerChecked: true,\n  _groupFocusWithin: true,\n  _peerFocusWithin: true,\n  _peerPlaceholderShown: true,\n  _placeholder: true,\n  _placeholderShown: true,\n  _fullScreen: true,\n  _selection: true,\n  _mediaDark: true,\n  _mediaReduceMotion: true,\n  _dark: true,\n  _light: true,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/props/radii.ts",
    "content": "import { Property } from \"csstype\";\n\nimport { KeysOf, RadiiScaleValue } from \"../types\";\n\n/**\n * Types for radii related CSS properties\n */\nexport type RadiiProps = Partial<{\n  /**\n   * The CSS `border-radius` property\n   */\n  borderRadius: Property.BorderRadius<RadiiScaleValue> | number;\n\n  /**\n   * The CSS `border-top-left-radius` property\n   */\n  borderTopLeftRadius: Property.BorderTopLeftRadius<RadiiScaleValue> | number;\n\n  /**\n   * The CSS `border-top-right-radius` property\n   */\n  borderTopRightRadius: Property.BorderTopRightRadius<RadiiScaleValue> | number;\n\n  /**\n   * The CSS `border-bottom-right-radius`  property\n   */\n  borderBottomRightRadius: Property.BorderBottomRightRadius<RadiiScaleValue> | number;\n\n  /**\n   * The CSS  `border-bottom-left-radius` property\n   */\n  borderBottomLeftRadius: Property.BorderBottomLeftRadius<RadiiScaleValue> | number;\n\n  /**\n   * The CSS `border-top-left-radius` and `border-top-right-radius` property\n   */\n  borderTopRadius: Property.BorderTopLeftRadius<RadiiScaleValue> | number;\n\n  /**\n   * The CSS `border-top-right-radius` and `border-bottom-right-radius` property\n   */\n  borderRightRadius: Property.BorderTopRightRadius<RadiiScaleValue> | number;\n\n  /**\n   * The CSS `border-start-start-radius` and `border-end-start-radius` property\n   */\n  borderStartRadius: Property.BorderStartStartRadius<RadiiScaleValue> | number;\n\n  /**\n   * The CSS `border-bottom-right-radius` and `border-bottom-left-radius` property\n   */\n  borderBottomRadius: Property.BorderBottomLeftRadius<RadiiScaleValue> | number;\n\n  /**\n   * The CSS `border-top-left-radius` and `border-bottom-left-radius` property\n   */\n  borderLeftRadius: Property.BorderTopLeftRadius<RadiiScaleValue> | number;\n\n  /**\n   * The CSS `border-start-end-radius` and `border-end-end-radius` property\n   */\n  borderEndRadius: Property.BorderStartEndRadius<RadiiScaleValue> | number;\n\n  /**\n   * The CSS `border-radius` property\n   */\n  rounded: Property.BorderRadius<RadiiScaleValue> | number;\n\n  /**\n   * The CSS `border-top-left-radius` and `border-top-right-radius` property\n   */\n  roundedTop: Property.BorderTopLeftRadius<RadiiScaleValue> | number;\n\n  /**\n   * The CSS `border-top-right-radius` and `border-bottom-right-radius` property\n   */\n  roundedRight: Property.BorderTopRightRadius<RadiiScaleValue> | number;\n\n  /**\n   * The CSS `border-start-start-radius` and `border-end-start-radius` property\n   */\n  roundedStart: Property.BorderStartStartRadius<RadiiScaleValue> | number;\n\n  /**\n   * The CSS `border-bottom-right-radius` and `border-bottom-left-radius` property\n   */\n  roundedBottom: Property.BorderBottomLeftRadius<RadiiScaleValue> | number;\n\n  /**\n   * The CSS `border-top-left-radius` and `border-bottom-left-radius` property\n   */\n  roundedLeft: Property.BorderTopLeftRadius<RadiiScaleValue> | number;\n\n  /**\n   * The CSS `border-start-end-radius` and `border-end-end-radius` property\n   */\n  roundedEnd: Property.BorderStartEndRadius<RadiiScaleValue> | number;\n}>;\n\n/**\n * Style prop names for radii related CSS properties\n */\nexport const radiiPropNames: KeysOf<RadiiProps> = {\n  borderRadius: true,\n  borderTopRightRadius: true,\n  borderTopLeftRadius: true,\n  borderBottomRightRadius: true,\n  borderBottomLeftRadius: true,\n  borderTopRadius: true,\n  borderRightRadius: true,\n  borderStartRadius: true,\n  borderBottomRadius: true,\n  borderLeftRadius: true,\n  borderEndRadius: true,\n  rounded: true,\n  roundedTop: true,\n  roundedRight: true,\n  roundedStart: true,\n  roundedBottom: true,\n  roundedLeft: true,\n  roundedEnd: true,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/props/shadow.ts",
    "content": "import { Property } from \"csstype\";\n\nimport { KeysOf, ShadowScaleValue } from \"../types\";\n\n/**\n * Types for shadow CSS properties\n */\nexport type ShadowProps = Partial<{\n  /**\n   * The CSS `text-shadow` property\n   */\n  textShadow: Property.TextShadow | ShadowScaleValue;\n\n  /**\n   * The CSS `box-shadow` property\n   */\n  boxShadow: Property.BoxShadow | ShadowScaleValue;\n\n  /**\n   * The CSS `box-shadow` property\n   */\n  shadow: Property.BoxShadow | ShadowScaleValue;\n}>;\n\n/**\n * Style prop names for shadows properties\n */\nexport const shadowPropNames: KeysOf<ShadowProps> = {\n  textShadow: true,\n  boxShadow: true,\n  shadow: true,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/props/size.ts",
    "content": "import { Property } from \"csstype\";\n\nimport { KeysOf, SizeScaleValue } from \"../types\";\n\n/**\n * Types for size related CSS properties\n */\nexport type SizeProps = Partial<{\n  /**\n   * The CSS `width` property\n   */\n  width: Property.Width<SizeScaleValue> | number;\n\n  /**\n   * The CSS `width` property\n   */\n  w: Property.Width<SizeScaleValue> | number;\n\n  /**\n   * The CSS `min-width` property\n   */\n  minWidth: Property.MinWidth<SizeScaleValue> | number;\n\n  /**\n   * The CSS `min-width` property\n   */\n  minW: Property.MinWidth<SizeScaleValue> | number;\n\n  /**\n   * The CSS `max-width` property\n   */\n  maxWidth: Property.MaxWidth<SizeScaleValue> | number;\n\n  /**\n   * The CSS `max-width` property\n   */\n  maxW: Property.MaxWidth<SizeScaleValue> | number;\n\n  /**\n   * The CSS `height` property\n   */\n  height: Property.Height<SizeScaleValue> | number;\n\n  /**\n   * The CSS `height` property\n   */\n  h: Property.Height<SizeScaleValue> | number;\n\n  /**\n   * The CSS `min-height` property\n   */\n  minHeight: Property.MinHeight<SizeScaleValue> | number;\n\n  /**\n   * The CSS `min-height` property\n   */\n  minH: Property.MinHeight<SizeScaleValue> | number;\n\n  /**\n   * The CSS `max-height` property\n   */\n  maxHeight: Property.MaxHeight<SizeScaleValue> | number;\n\n  /**\n   * The CSS `max-height` property\n   */\n  maxH: Property.MaxHeight<SizeScaleValue> | number;\n\n  /**\n   * The CSS `width` and `height` property\n   */\n  boxSize: Property.Width<SizeScaleValue> | number;\n}>;\n\n/**\n * Style prop names for sizes properties\n */\nexport const sizePropNames: KeysOf<SizeProps> = {\n  width: true,\n  w: true,\n  minWidth: true,\n  minW: true,\n  maxWidth: true,\n  maxW: true,\n  height: true,\n  h: true,\n  minHeight: true,\n  minH: true,\n  maxHeight: true,\n  maxH: true,\n  boxSize: true,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/props/transform.ts",
    "content": "import { Property } from \"csstype\";\n\nimport { KeysOf, SizeScaleValue } from \"../types\";\n\n/**\n * Types for transform CSS properties.\n */\nexport type TransformProps = Partial<{\n  /**\n   * The CSS `transform` property.\n   */\n  transform: Property.Transform;\n\n  /**\n   * The CSS `transform-origin` property.\n   */\n  transformOrigin: Property.TransformOrigin<SizeScaleValue> | number;\n\n  /**\n   * The CSS `clip-path` property.\n   *\n   * It creates a clipping region that sets what part of an element should be shown.\n   */\n  clipPath: Property.ClipPath;\n}>;\n\n/**\n * Style prop names for transform CSS related properties.\n */\nexport const transformPropNames: KeysOf<TransformProps> = {\n  transform: true,\n  transformOrigin: true,\n  clipPath: true,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/props/transition.ts",
    "content": "import { Property } from \"csstype\";\n\nimport { KeysOf } from \"../types\";\n\n/**\n * Types for transition CSS properties\n */\nexport type TransitionProps = Partial<{\n  /**\n   * The CSS `transition` property\n   */\n  transition: Property.Transition;\n\n  /**\n   * The CSS `transition-property` property\n   */\n  transitionProperty: Property.TransitionProperty;\n\n  /**\n   * The CSS `transition-timing-function` property\n   */\n  transitionTimingFunction: Property.TransitionTimingFunction;\n\n  /**\n   * The CSS `transition-duration` property\n   */\n  transitionDuration: Property.TransitionDuration;\n\n  /**\n   * The CSS `transition-delay` property\n   */\n  transitionDelay: Property.TransitionDelay;\n\n  /**\n   * The CSS `animation` property\n   */\n  animation: Property.Animation;\n\n  /**\n   * The CSS `will-change` property\n   */\n  willChange: Property.WillChange;\n}>;\n\n/**\n * Style prop names for transition CSS related properties\n */\nexport const transitionPropNames: KeysOf<TransitionProps> = {\n  transition: true,\n  transitionProperty: true,\n  transitionTimingFunction: true,\n  transitionDuration: true,\n  transitionDelay: true,\n  animation: true,\n  willChange: true,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/props/typography.ts",
    "content": "import { Property } from \"csstype\";\n\nimport {\n  FontScaleValue,\n  FontSizeScaleValue,\n  FontWeightScaleValue,\n  KeysOf,\n  LetterSpacingScaleValue,\n  LineHeightScaleValue,\n} from \"../types\";\n\n/**\n * Types for typography related CSS properties\n */\nexport type TypographyProps = Partial<{\n  /**\n   * The CSS `font-family` property\n   */\n  fontFamily: Property.FontFamily | FontScaleValue;\n\n  /**\n   * The CSS `font-size` property\n   */\n  fontSize: Property.FontSize<FontSizeScaleValue> | number;\n\n  /**\n   * The CSS `font-weight` property\n   */\n  fontWeight: Property.FontWeight | FontWeightScaleValue | number;\n\n  /**\n   * The CSS `line-height` property\n   */\n  lineHeight: Property.LineHeight<LineHeightScaleValue> | string | number;\n\n  /**\n   * The CSS `letter-spacing` property\n   */\n  letterSpacing: Property.LetterSpacing<LetterSpacingScaleValue> | string | number;\n\n  /**\n   * The CSS `text-align` property\n   */\n  textAlign: Property.TextAlign;\n\n  /**\n   * The CSS `font-style` property\n   */\n  fontStyle: Property.FontStyle;\n\n  /**\n   * The CSS `text-transform` property\n   */\n  textTransform: Property.TextTransform;\n\n  /**\n   * The CSS `text-decoration` property\n   */\n  textDecoration: Property.TextDecoration;\n\n  /**\n   * Utility to visually truncating text after a fixed number of lines.\n   */\n  noOfLines: number | string;\n}>;\n\n/**\n * Style prop names used in typography properties\n */\nexport const typographyPropNames: KeysOf<TypographyProps> = {\n  fontFamily: true,\n  fontSize: true,\n  fontWeight: true,\n  lineHeight: true,\n  letterSpacing: true,\n  textAlign: true,\n  fontStyle: true,\n  textTransform: true,\n  textDecoration: true,\n  noOfLines: true,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/stitches-utils/background.ts",
    "content": "import type { PropertyValue } from \"@stitches/core\";\n\nexport const background = {\n  /**\n   * The CSS `background` property\n   */\n  bg: (value: PropertyValue<\"background\">) => ({ background: value }),\n\n  /**\n   * The CSS `background-color` property\n   */\n  bgColor: (value: PropertyValue<\"backgroundColor\">) => ({ backgroundColor: value }),\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/stitches-utils/border.ts",
    "content": "import type { PropertyValue } from \"@stitches/core\";\n\nexport const border = {\n  /**\n   * The CSS `border-right` and `border-left` property\n   */\n  borderX: (value: PropertyValue<\"borderLeft\">) => ({\n    borderLeft: value,\n    borderRight: value,\n  }),\n\n  /**\n   * The CSS `border-top` and `border-bottom` property\n   */\n  borderY: (value: PropertyValue<\"borderTop\">) => ({\n    borderTop: value,\n    borderBottom: value,\n  }),\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/stitches-utils/display.ts",
    "content": "import type { PropertyValue } from \"@stitches/core\";\n\nexport const display = {\n  /**\n   * The CSS `display` property\n   */\n  d: (value: PropertyValue<\"display\">) => ({ display: value }),\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/stitches-utils/index.ts",
    "content": "import { background } from \"./background\";\nimport { border } from \"./border\";\nimport { display } from \"./display\";\nimport { margin } from \"./margin\";\nimport { padding } from \"./padding\";\nimport { position } from \"./position\";\nimport { pseudoSelectors } from \"./pseudo-selector\";\nimport { radii } from \"./radii\";\nimport { shadow } from \"./shadow\";\nimport { size } from \"./size\";\nimport { typography } from \"./typography\";\n\nexport const utils = {\n  ...background,\n  ...border,\n  ...display,\n  ...position,\n  ...pseudoSelectors,\n  ...radii,\n  ...margin,\n  ...padding,\n  ...shadow,\n  ...size,\n  ...typography,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/stitches-utils/margin.ts",
    "content": "import type { PropertyValue } from \"@stitches/core\";\n\nexport const margin = {\n  /**\n   * The CSS `margin` property\n   */\n  m: (value: PropertyValue<\"margin\">) => ({ margin: value }),\n\n  /**\n   * The CSS `margin-top` property\n   */\n  mt: (value: PropertyValue<\"marginTop\">) => ({ marginTop: value }),\n\n  /**\n   * The CSS `margin-right` property\n   */\n  mr: (value: PropertyValue<\"marginRight\">) => ({ marginRight: value }),\n\n  /**\n   * The CSS `margin-inline-start` property\n   */\n  marginStart: (value: PropertyValue<\"marginInlineStart\">) => ({ marginInlineStart: value }),\n\n  /**\n   * The CSS `margin-inline-start` property\n   */\n  ms: (value: PropertyValue<\"marginInlineStart\">) => ({ marginInlineStart: value }),\n\n  /**\n   * The CSS `margin-bottom` property\n   */\n  mb: (value: PropertyValue<\"marginBottom\">) => ({ marginBottom: value }),\n\n  /**\n   * The CSS `margin-left`  property\n   */\n  ml: (value: PropertyValue<\"marginLeft\">) => ({ marginLeft: value }),\n\n  /**\n   * The CSS `margin-inline-end` property\n   */\n  marginEnd: (value: PropertyValue<\"marginInlineEnd\">) => ({ marginInlineEnd: value }),\n\n  /**\n   * The CSS `margin-inline-end` property\n   */\n  me: (value: PropertyValue<\"marginInlineEnd\">) => ({ marginInlineEnd: value }),\n\n  /**\n   * The CSS `margin-inline-start` and `margin-inline-end` property\n   */\n  mx: (value: PropertyValue<\"marginInlineStart\">) => ({\n    marginInlineStart: value,\n    marginInlineEnd: value,\n  }),\n\n  /**\n   * The CSS `margin-top` and `margin-bottom` property\n   */\n  my: (value: PropertyValue<\"marginTop\">) => ({ marginTop: value, marginBottom: value }),\n\n  /**\n   * Utility to space items in a horizontal stack\n   */\n  spaceX: (value: PropertyValue<\"marginLeft\">) => ({\n    \"& > * + *\": {\n      marginLeft: value,\n    },\n  }),\n\n  /**\n   * Utility to space items in a vertial stack\n   */\n  spaceY: (value: PropertyValue<\"marginTop\">) => ({\n    \"& > * + *\": {\n      marginTop: value,\n    },\n  }),\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/stitches-utils/padding.ts",
    "content": "import type { PropertyValue } from \"@stitches/core\";\n\nexport const padding = {\n  /**\n   * The CSS `padding` property\n   */\n  p: (value: PropertyValue<\"padding\">) => ({ padding: value }),\n\n  /**\n   * The CSS `padding-top` property\n   */\n  pt: (value: PropertyValue<\"paddingTop\">) => ({ paddingTop: value }),\n\n  /**\n   * The CSS `padding-right` property\n   */\n  pr: (value: PropertyValue<\"paddingRight\">) => ({ paddingRight: value }),\n\n  /**\n   * The CSS `padding-inline-start` property\n   */\n  paddingStart: (value: PropertyValue<\"paddingInlineStart\">) => ({ paddingInlineStart: value }),\n\n  /**\n   * The CSS `padding-inline-start` property\n   */\n  ps: (value: PropertyValue<\"paddingInlineStart\">) => ({ paddingInlineStart: value }),\n\n  /**\n   * The CSS `padding-bottom` property\n   */\n  pb: (value: PropertyValue<\"paddingBottom\">) => ({ paddingBottom: value }),\n\n  /**\n   * The CSS `padding-left`  property\n   */\n  pl: (value: PropertyValue<\"paddingLeft\">) => ({ paddingLeft: value }),\n\n  /**\n   * The CSS `padding-inline-end` property\n   */\n  pe: (value: PropertyValue<\"paddingInlineEnd\">) => ({ paddingInlineEnd: value }),\n\n  /**\n   * The CSS `padding-inline-end` property\n   */\n  paddingEnd: (value: PropertyValue<\"paddingInlineEnd\">) => ({ paddingInlineEnd: value }),\n\n  /**\n   * The CSS `padding-inline-start` and `padding-inline-end` property\n   */\n  px: (value: PropertyValue<\"paddingInlineStart\">) => ({\n    paddingInlineStart: value,\n    paddingInlineEnd: value,\n  }),\n\n  /**\n   * The CSS `padding-top` and `padding-bottom` property\n   */\n  py: (value: PropertyValue<\"paddingTop\">) => ({ paddingTop: value, paddingBottom: value }),\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/stitches-utils/position.ts",
    "content": "import type { PropertyValue } from \"@stitches/core\";\n\nexport const position = {\n  /**\n   * The CSS `position` property\n   */\n  pos: (value: PropertyValue<\"position\">) => ({ position: value }),\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/stitches-utils/pseudo-selector.ts",
    "content": "import type { CSS } from \"@stitches/core\";\n\nfunction createGroupSelector(...selectors: string[]): string {\n  return selectors\n    .map(item => `[role=group]${item} &, [data-group]${item} &, .group${item} &`)\n    .join(\", \");\n}\n\nfunction createPeerSelector(...selectors: string[]): string {\n  return selectors.map(item => `[data-peer]${item} ~ &, .peer${item} ~ &`).join(\", \");\n}\n\nexport const pseudoSelectors = {\n  /**\n   * Styles for CSS selector `&:hover`\n   */\n  _hover: (value: CSS) => ({\n    \"&:hover, &[data-hover]\": value,\n  }),\n\n  /**\n   * Styles for CSS Selector `&:active`\n   */\n  _active: (value: CSS) => ({\n    \"&:active, &[data-active]\": value,\n  }),\n\n  /**\n   * Styles for CSS selector `&:focus`\n   */\n  _focus: (value: CSS) => ({\n    \"&:focus, &[data-focus]\": value,\n  }),\n\n  /**\n   * Styles for the highlighted state.\n   */\n  _highlighted: (value: CSS) => ({\n    \"&[data-highlighted]\": value,\n  }),\n\n  /**\n   * Styles to apply when a child of this element has received focus\n   * - CSS Selector `&:focus-within`\n   */\n  _focusWithin: (value: CSS) => ({\n    \"&:focus-within\": value,\n  }),\n\n  /**\n   * Styles to apply when this element has received focus via tabbing\n   * - CSS Selector `&:focus-visible`\n   */\n  _focusVisible: (value: CSS) => ({\n    \"&:focus-visible\": value,\n  }),\n\n  /**\n   * Styles to apply when this element is disabled. The passed styles are applied to these CSS selectors:\n   * - `&[aria-disabled=true]`\n   * - `&:disabled`\n   * - `&[data-disabled]`\n   */\n  _disabled: (value: CSS) => ({\n    \"&[disabled], &[aria-disabled=true], &[data-disabled]\": value,\n  }),\n\n  /**\n   * Styles for CSS Selector `&:readonly`\n   */\n  _readOnly: (value: CSS) => ({\n    \"&[aria-readonly=true], &[readonly], &[data-readonly]\": value,\n  }),\n\n  /**\n   * Styles for CSS selector `&::before`\n   *\n   * NOTE:When using this, ensure the `content` is wrapped in a backtick.\n   * @example\n   * ```jsx\n   * <Box _before={{content:`\"\"` }}/>\n   * ```\n   */\n  _before: (value: CSS) => ({\n    \"&::before\": value,\n  }),\n\n  /**\n   * Styles for CSS selector `&::after`\n   *\n   * NOTE:When using this, ensure the `content` is wrapped in a backtick.\n   * @example\n   * ```jsx\n   * <Box _after={{content:`\"\"` }}/>\n   * ```\n   */\n  _after: (value: CSS) => ({\n    \"&::after\": value,\n  }),\n\n  /**\n   * Styles for CSS selector `&:empty`\n   */\n  _empty: (value: CSS) => ({\n    \"&:empty\": value,\n  }),\n\n  /**\n   * Styles to apply when the ARIA attribute `aria-expanded` is `true`\n   * - CSS selector `&[aria-expanded=true]`\n   */\n  _expanded: (value: CSS) => ({\n    \"&[aria-expanded=true], &[data-expanded]\": value,\n  }),\n\n  /**\n   * Styles to apply when the ARIA attribute `aria-checked` is `true`\n   * - CSS selector `&[aria-checked=true]`\n   */\n  _checked: (value: CSS) => ({\n    \"&[aria-checked=true], &[data-checked]\": value,\n  }),\n\n  /**\n   * Styles to apply when the ARIA attribute `aria-grabbed` is `true`\n   * - CSS selector `&[aria-grabbed=true]`\n   */\n  _grabbed: (value: CSS) => ({\n    \"&[aria-grabbed=true], &[data-grabbed]\": value,\n  }),\n\n  /**\n   * Styles for CSS Selector `&[aria-pressed=true]`\n   * Typically used to style the current \"pressed\" state of toggle buttons\n   */\n  _pressed: (value: CSS) => ({\n    \"&[aria-pressed=true], &[data-pressed]\": value,\n  }),\n\n  /**\n   * Styles to apply when the ARIA attribute `aria-invalid` is `true`\n   * - CSS selector `&[aria-invalid=true]`\n   */\n  _invalid: (value: CSS) => ({\n    \"&[aria-invalid=true], &[data-invalid]\": value,\n  }),\n\n  /**\n   * Styles for the valid state\n   * - CSS selector `&[data-valid], &[data-state=valid]`\n   */\n  _valid: (value: CSS) => ({\n    \"&[data-valid], &[data-state=valid]\": value,\n  }),\n\n  /**\n   * Styles for CSS Selector `&[aria-busy=true]` or `&[data-loading=true]`.\n   * Useful for styling loading states\n   */\n  _loading: (value: CSS) => ({\n    \"&[data-loading], &[aria-busy=true]\": value,\n  }),\n\n  /**\n   * Styles to apply when the ARIA attribute `aria-selected` is `true`\n   *\n   * - CSS selector `&[aria-selected=true]`\n   */\n  _selected: (value: CSS) => ({\n    \"&[aria-selected=true], &[data-selected]\": value,\n  }),\n\n  /**\n   * Styles for CSS Selector `[hidden=true]`\n   */\n  _hidden: (value: CSS) => ({\n    \"&[hidden], &[data-hidden]\": value,\n  }),\n\n  /**\n   * Styles for CSS Selector `&:nth-child(even)`\n   */\n  _even: (value: CSS) => ({\n    \"&:nth-of-type(even)\": value,\n  }),\n\n  /**\n   * Styles for CSS Selector `&:nth-child(odd)`\n   */\n  _odd: (value: CSS) => ({\n    \"&:nth-of-type(odd)\": value,\n  }),\n\n  /**\n   * Styles for CSS Selector `&:first-of-type`\n   */\n  _first: (value: CSS) => ({\n    \"&:first-of-type\": value,\n  }),\n\n  /**\n   * Styles for CSS Selector `&:last-of-type`\n   */\n  _last: (value: CSS) => ({\n    \"&:last-of-type\": value,\n  }),\n\n  /**\n   * Styles for CSS Selector `&:not(:first-of-type)`\n   */\n  _notFirst: (value: CSS) => ({\n    \"&:not(:first-of-type)\": value,\n  }),\n\n  /**\n   * Styles for CSS Selector `&:not(:last-of-type)`\n   */\n  _notLast: (value: CSS) => ({\n    \"&:not(:last-of-type)\": value,\n  }),\n\n  /**\n   * Styles for CSS Selector `&:visited`\n   */\n  _visited: (value: CSS) => ({\n    \"&:visited\": value,\n  }),\n\n  /**\n   * Used to style the active link in a navigation\n   * Styles for CSS Selector `&[aria-current=page]`\n   */\n  _activeLink: (value: CSS) => ({\n    \"&[aria-current=page]\": value,\n  }),\n\n  /**\n   * Used to style the current step within a process\n   * Styles for CSS Selector `&[aria-current=step]`\n   */\n  _activeStep: (value: CSS) => ({\n    \"&[aria-current=step]\": value,\n  }),\n\n  /**\n   * Styles to apply when the ARIA attribute `aria-checked` is `mixed`\n   * - CSS selector `&[aria-checked=mixed]`\n   */\n  _indeterminate: (value: CSS) => ({\n    \"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]\": value,\n  }),\n\n  /**\n   * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is hovered\n   */\n  _groupHover: (value: CSS) => ({\n    [createGroupSelector(\":hover\", \"[data-hover]\")]: value,\n  }),\n\n  /**\n   * Styles to apply when a sibling element with `.peer` or `data-peer` is hovered\n   */\n  _peerHover: (value: CSS) => ({\n    [createPeerSelector(\":hover\", \"[data-hover]\")]: value,\n  }),\n\n  /**\n   * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is focused\n   */\n  _groupFocus: (value: CSS) => ({\n    [createGroupSelector(\":focus\", \"[data-focus]\")]: value,\n  }),\n\n  /**\n   * Styles to apply when a sibling element with `.peer` or `data-peer` is focused\n   */\n  _peerFocus: (value: CSS) => ({\n    [createPeerSelector(\":focus\", \"[data-focus]\")]: value,\n  }),\n\n  /**\n   * Styles to apply when a parent element with `.group`, `data-group` or `role=group` has visible focus\n   */\n  _groupFocusVisible: (value: CSS) => ({\n    [createGroupSelector(\":focus-visible\")]: value,\n  }),\n\n  /**\n   * Styles to apply when a sibling element with `.peer`or `data-peer` has visible focus\n   */\n  _peerFocusVisible: (value: CSS) => ({\n    [createPeerSelector(\":focus-visible\")]: value,\n  }),\n\n  /**\n   * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is active\n   */\n  _groupActive: (value: CSS) => ({\n    [createGroupSelector(\":active\", \"[data-active]\")]: value,\n  }),\n\n  /**\n   * Styles to apply when a sibling element with `.peer` or `data-peer` is active\n   */\n  _peerActive: (value: CSS) => ({\n    [createPeerSelector(\":active\", \"[data-active]\")]: value,\n  }),\n\n  /**\n   * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is selected\n   */\n  _groupSelected: (value: CSS) => ({\n    [createGroupSelector(\"[aria-selected=true]\", \"[data-selected]\")]: value,\n  }),\n\n  /**\n   * Styles to apply when a sibling element with `.peer` or `data-peer` is selected\n   */\n  _peerSelected: (value: CSS) => ({\n    [createPeerSelector(\"[aria-selected=true]\", \"[data-selected]\")]: value,\n  }),\n\n  /**\n   * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is disabled\n   */\n  _groupDisabled: (value: CSS) => ({\n    [createGroupSelector(\":disabled\", \"[data-disabled]\")]: value,\n  }),\n\n  /**\n   *  Styles to apply when a sibling element with `.peer` or `data-peer` is disabled\n   */\n  _peerDisabled: (value: CSS) => ({\n    [createPeerSelector(\":disabled\", \"[data-disabled]\")]: value,\n  }),\n\n  /**\n   *  Styles to apply when a parent element with `.group`, `data-group` or `role=group` is invalid\n   */\n  _groupInvalid: (value: CSS) => ({\n    [createGroupSelector(\":invalid\", \"[data-invalid]\")]: value,\n  }),\n\n  /**\n   *  Styles to apply when a sibling element with `.peer` or `data-peer` is invalid\n   */\n  _peerInvalid: (value: CSS) => ({\n    [createPeerSelector(\":invalid\", \"[data-invalid]\")]: value,\n  }),\n\n  /**\n   * Styles to apply when a parent element with `.group`, `data-group` or `role=group` is checked\n   */\n  _groupChecked: (value: CSS) => ({\n    [createGroupSelector(\":checked\", \"[data-checked]\")]: value,\n  }),\n\n  /**\n   * Styles to apply when a sibling element with `.peer` or `data-peer` is checked\n   */\n  _peerChecked: (value: CSS) => ({\n    [createPeerSelector(\":checked\", \"[data-checked]\")]: value,\n  }),\n\n  /**\n   *  Styles to apply when a parent element with `.group`, `data-group` or `role=group` has focus within\n   */\n  _groupFocusWithin: (value: CSS) => ({\n    [createGroupSelector(\":focus-within\")]: value,\n  }),\n\n  /**\n   *  Styles to apply when a sibling element with `.peer` or `data-peer` has focus within\n   */\n  _peerFocusWithin: (value: CSS) => ({\n    [createPeerSelector(\":focus-within\")]: value,\n  }),\n\n  /**\n   * Styles to apply when a sibling element with `.peer` or `data-peer` has placeholder shown\n   */\n  _peerPlaceholderShown: (value: CSS) => ({\n    [createPeerSelector(\":placeholder-shown\")]: value,\n  }),\n\n  /**\n   * Styles for CSS Selector `&:placeholder-shown`.\n   */\n  _placeholder: (value: CSS) => ({\n    \"&::placeholder\": value,\n  }),\n\n  /**\n   * Styles for CSS Selector `&:placeholder-shown`.\n   */\n  _placeholderShown: (value: CSS) => ({\n    \"&:placeholder-shown\": value,\n  }),\n\n  /**\n   * Styles for CSS Selector `&:fullscreen`.\n   */\n  _fullScreen: (value: CSS) => ({\n    \"&:fullscreen\": value,\n  }),\n\n  /**\n   * Styles for CSS Selector `&::selection`\n   */\n  _selection: (value: CSS) => ({\n    \"&::selection\": value,\n  }),\n\n  /**\n   * Styles for CSS Selector `@media (prefers-color-scheme: dark)`\n   * It is used when the user has requested the system use a light or dark color theme.\n   */\n  _mediaDark: (value: CSS) => ({\n    \"@media (prefers-color-scheme: dark)\": value,\n  }),\n\n  /**\n   * Styles for CSS Selector `@media (prefers-reduced-motion: reduce)`\n   * It is used when the user has requested the system to reduce the amount of animations.\n   */\n  _mediaReduceMotion: (value: CSS) => ({\n    \"@media (prefers-reduced-motion: reduce)\": value,\n  }),\n\n  /**\n   * Styles for when dark theme is applied to any parent of\n   * this component or element.\n   */\n  _dark: (value: CSS) => ({\n    \".hope-ui-dark &\": value,\n  }),\n\n  /**\n   * Styles for when light theme is applied to any parent of\n   * this component or element.\n   */\n  _light: (value: CSS) => ({\n    \".hope-ui-light &\": value,\n  }),\n};\n\nexport type PseudoSelector = typeof pseudoSelectors;\n"
  },
  {
    "path": "packages/solid/src/styled-system/stitches-utils/radii.ts",
    "content": "import type { PropertyValue } from \"@stitches/core\";\n\nexport const radii = {\n  /**\n   * The CSS `border-top-left-radius` and `border-top-right-radius` property\n   */\n  borderTopRadius: (value: PropertyValue<\"borderTopLeftRadius\">) => ({\n    borderTopLeftRadius: value,\n    borderTopRightRadius: value,\n  }),\n\n  /**\n   * The CSS `border-top-right-radius` and `border-bottom-right-radius` property\n   */\n  borderRightRadius: (value: PropertyValue<\"borderTopRightRadius\">) => ({\n    borderTopRightRadius: value,\n    borderBottomRightRadius: value,\n  }),\n\n  /**\n   * The CSS `border-start-start-radius` and `border-end-start-radius` property\n   */\n  borderStartRadius: (value: PropertyValue<\"borderStartStartRadius\">) => ({\n    borderStartStartRadius: value,\n    borderEndStartRadius: value,\n  }),\n\n  /**\n   * The CSS `border-bottom-right-radius` and `border-bottom-left-radius` property\n   */\n  borderBottomRadius: (value: PropertyValue<\"borderBottomLeftRadius\">) => ({\n    borderBottomLeftRadius: value,\n    borderBottomRightRadius: value,\n  }),\n\n  /**\n   * The CSS `border-top-left-radius` and `border-bottom-left-radius` property\n   */\n  borderLeftRadius: (value: PropertyValue<\"borderTopLeftRadius\">) => ({\n    borderTopLeftRadius: value,\n    borderBottomLeftRadius: value,\n  }),\n\n  /**\n   * The CSS `border-start-end-radius` and `border-end-end-radius` property\n   */\n  borderEndRadius: (value: PropertyValue<\"borderStartEndRadius\">) => ({\n    borderStartEndRadius: value,\n    borderEndEndRadius: value,\n  }),\n\n  /**\n   * The CSS `border-radius` property\n   */\n  rounded: (value: PropertyValue<\"borderRadius\">) => ({\n    borderRadius: value,\n  }),\n\n  /**\n   * The CSS `border-top-left-radius` and `border-top-right-radius` property\n   */\n  roundedTop: (value: PropertyValue<\"borderTopLeftRadius\">) => ({\n    borderTopLeftRadius: value,\n    borderTopRightRadius: value,\n  }),\n\n  /**\n   * The CSS `border-top-right-radius` and `border-bottom-right-radius` property\n   */\n  roundedRight: (value: PropertyValue<\"borderTopRightRadius\">) => ({\n    borderTopRightRadius: value,\n    borderBottomRightRadius: value,\n  }),\n\n  /**\n   * The CSS `border-start-start-radius` and `border-end-start-radius` property\n   */\n  roundedStart: (value: PropertyValue<\"borderStartStartRadius\">) => ({\n    borderStartStartRadius: value,\n    borderEndStartRadius: value,\n  }),\n\n  /**\n   * The CSS `border-bottom-right-radius` and `border-bottom-left-radius` property\n   */\n  roundedBottom: (value: PropertyValue<\"borderBottomLeftRadius\">) => ({\n    borderBottomLeftRadius: value,\n    borderBottomRightRadius: value,\n  }),\n\n  /**\n   * The CSS `border-top-left-radius` and `border-bottom-left-radius` property\n   */\n  roundedLeft: (value: PropertyValue<\"borderTopLeftRadius\">) => ({\n    borderTopLeftRadius: value,\n    borderBottomLeftRadius: value,\n  }),\n\n  /**\n   * The CSS `border-start-end-radius` and `border-end-end-radius` property\n   */\n  roundedEnd: (value: PropertyValue<\"borderStartEndRadius\">) => ({\n    borderStartEndRadius: value,\n    borderEndEndRadius: value,\n  }),\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/stitches-utils/shadow.ts",
    "content": "import type { PropertyValue } from \"@stitches/core\";\n\nexport const shadow = {\n  /**\n   * The CSS `box-shadow` property\n   */\n  shadow: (value: PropertyValue<\"boxShadow\">) => ({ boxShadow: value }),\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/stitches-utils/size.ts",
    "content": "import type { PropertyValue } from \"@stitches/core\";\n\nexport const size = {\n  /**\n   * The CSS `width` property\n   */\n  w: (value: PropertyValue<\"width\">) => ({ width: value }),\n\n  /**\n   * The CSS `min-width` property\n   */\n  minW: (value: PropertyValue<\"minWidth\">) => ({ minWidth: value }),\n\n  /**\n   * The CSS `max-width` property\n   */\n  maxW: (value: PropertyValue<\"maxWidth\">) => ({ maxWidth: value }),\n\n  /**\n   * The CSS `height` property\n   */\n  h: (value: PropertyValue<\"height\">) => ({ height: value }),\n\n  /**\n   * The CSS `min-height` property\n   */\n  minH: (value: PropertyValue<\"minHeight\">) => ({ minHeight: value }),\n\n  /**\n   * The CSS `max-height` property\n   */\n  maxH: (value: PropertyValue<\"maxHeight\">) => ({ maxHeight: value }),\n\n  /**\n   * The CSS `width` and `height` property\n   */\n  boxSize: (value: PropertyValue<\"width\">) => ({ width: value, height: value }),\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/stitches-utils/typography.ts",
    "content": "export const typography = {\n  /**\n   * Utility to visually truncating text after a fixed number of lines.\n   */\n  noOfLines: (value: number | string) => ({\n    overflow: \"hidden\",\n    display: \"-webkit-box\",\n    \"-webkit-box-orient\": \"vertical\",\n    \"-webkit-line-clamp\": value,\n  }),\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/stitches.config.ts",
    "content": "import { createStitches, defaultThemeMap } from \"@stitches/core\";\n\nimport { baseMedia } from \"./media\";\nimport { utils } from \"./stitches-utils\";\nimport { baseThemeTokens } from \"./tokens\";\n\nexport const {\n  theme: baseTheme,\n  css,\n  globalCss,\n  config,\n  createTheme,\n  getCssText,\n  keyframes,\n} = createStitches({\n  prefix: \"hope\",\n  themeMap: {\n    ...defaultThemeMap,\n    borderWidth: \"sizes\",\n    borderTopWidth: \"sizes\",\n    borderRightWidth: \"sizes\",\n    borderBottomWidth: \"sizes\",\n    borderLeftWidth: \"sizes\",\n    strokeWidth: \"sizes\",\n  },\n  theme: baseThemeTokens,\n  media: baseMedia,\n  utils,\n});\n"
  },
  {
    "path": "packages/solid/src/styled-system/system.ts",
    "content": "import { borderPropNames, BorderProps } from \"./props/border\";\nimport { colorPropNames, ColorProps } from \"./props/color\";\nimport { CSSProp, cssPropName } from \"./props/css\";\nimport { flexboxPropNames, FlexboxProps } from \"./props/flexbox\";\nimport { gridLayoutPropNames, GridLayoutProps } from \"./props/grid\";\nimport { interactivityPropNames, InteractivityProps } from \"./props/interactivity\";\nimport { layoutPropNames, LayoutProps } from \"./props/layout\";\nimport { marginPropNames, MarginProps } from \"./props/margin\";\nimport { paddingPropNames, PaddingProps } from \"./props/padding\";\nimport { positionPropNames, PositionProps } from \"./props/position\";\nimport { pseudoSelectorPropNames, PseudoSelectorProps } from \"./props/pseudo-selector\";\nimport { radiiPropNames, RadiiProps } from \"./props/radii\";\nimport { shadowPropNames, ShadowProps } from \"./props/shadow\";\nimport { sizePropNames, SizeProps } from \"./props/size\";\nimport { transformPropNames, TransformProps } from \"./props/transform\";\nimport { transitionPropNames, TransitionProps } from \"./props/transition\";\nimport { typographyPropNames, TypographyProps } from \"./props/typography\";\nimport { css } from \"./stitches.config\";\nimport { KeysOf, ResponsiveProps, SystemStyleObject } from \"./types\";\nimport { toCssObject } from \"./utils\";\n\n/**\n * All styled system props.\n */\nexport type StyleProps = ResponsiveProps<\n  BorderProps &\n    ColorProps &\n    FlexboxProps &\n    GridLayoutProps &\n    InteractivityProps &\n    LayoutProps &\n    MarginProps &\n    PaddingProps &\n    PositionProps &\n    RadiiProps &\n    ShadowProps &\n    SizeProps &\n    TransformProps &\n    TransitionProps &\n    TypographyProps &\n    PseudoSelectorProps\n> &\n  CSSProp;\n\nexport const stylePropNames: KeysOf<StyleProps> = {\n  ...borderPropNames,\n  ...colorPropNames,\n  ...flexboxPropNames,\n  ...gridLayoutPropNames,\n  ...interactivityPropNames,\n  ...layoutPropNames,\n  ...marginPropNames,\n  ...paddingPropNames,\n  ...positionPropNames,\n  ...radiiPropNames,\n  ...shadowPropNames,\n  ...sizePropNames,\n  ...transformPropNames,\n  ...transitionPropNames,\n  ...typographyPropNames,\n  ...pseudoSelectorPropNames,\n  ...cssPropName,\n};\n\n/**\n * Base stitches css object of all Hope UI components.\n */\nconst styledSystemStyles = css({});\n\n/**\n * Generate a css class based on style props and optional `baseStyles`.\n * `baseStyles` objects should be declared in the order of desired style override.\n */\nexport function createStyledSystemClass(\n  props: StyleProps,\n  baseStyles?: Array<SystemStyleObject | undefined>\n) {\n  return styledSystemStyles({ css: toCssObject(props, baseStyles) });\n}\n\n/**\n * Take a props object and return only the keys that match a style prop.\n */\nexport function getUsedStylePropNames(props: Record<string | number, any>) {\n  return Object.keys(props).filter(key => key in stylePropNames) as Array<keyof StyleProps>;\n}\n"
  },
  {
    "path": "packages/solid/src/styled-system/tokens/colors.ts",
    "content": "/* -------------------------------------------------------------------------------------------------\n * Common to light and dark palette\n * -----------------------------------------------------------------------------------------------*/\n\n// Radix - BlackA\nconst blackAlpha = {\n  blackAlpha1: \"#00000003\",\n  blackAlpha2: \"#00000007\",\n  blackAlpha3: \"#0000000c\",\n  blackAlpha4: \"#00000012\",\n  blackAlpha5: \"#00000017\",\n  blackAlpha6: \"#0000001d\",\n  blackAlpha7: \"#00000024\",\n  blackAlpha8: \"#00000038\",\n  blackAlpha9: \"#00000070\",\n  blackAlpha10: \"#0000007a\",\n  blackAlpha11: \"#00000090\",\n  blackAlpha12: \"#000000e8\",\n};\n\n// Radix - WhiteA\nconst whiteAlpha = {\n  whiteAlpha1: \"#ffffff00\",\n  whiteAlpha2: \"#ffffff03\",\n  whiteAlpha3: \"#ffffff09\",\n  whiteAlpha4: \"#ffffff0e\",\n  whiteAlpha5: \"#ffffff16\",\n  whiteAlpha6: \"#ffffff20\",\n  whiteAlpha7: \"#ffffff2d\",\n  whiteAlpha8: \"#ffffff3f\",\n  whiteAlpha9: \"#ffffff62\",\n  whiteAlpha10: \"#ffffff72\",\n  whiteAlpha11: \"#ffffff97\",\n  whiteAlpha12: \"#ffffffeb\",\n};\n\nexport const commonColors = {\n  // transparent: \"transparent\",\n  // current: \"currentColor\",\n  // black: \"#000000\",\n  // white: \"#ffffff\",\n  ...blackAlpha,\n  ...whiteAlpha,\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Light palette\n * -----------------------------------------------------------------------------------------------*/\n\n// Radix - Cyan\nconst primary = {\n  primary1: \"#fafdfe\",\n  primary2: \"#f2fcfd\",\n  primary3: \"#e7f9fb\",\n  primary4: \"#d8f3f6\",\n  primary5: \"#c4eaef\",\n  primary6: \"#aadee6\",\n  primary7: \"#84cdda\",\n  primary8: \"#3db9cf\",\n  primary9: \"#05a2c2\",\n  primary10: \"#0894b3\",\n  primary11: \"#0c7792\",\n  primary12: \"#04313c\",\n};\n\n// Radix - Violet\nconst accent = {\n  accent1: \"#fdfcfe\",\n  accent2: \"#fbfaff\",\n  accent3: \"#f5f2ff\",\n  accent4: \"#ede9fe\",\n  accent5: \"#e4defc\",\n  accent6: \"#d7cff9\",\n  accent7: \"#c4b8f3\",\n  accent8: \"#aa99ec\",\n  accent9: \"#6e56cf\",\n  accent10: \"#644fc1\",\n  accent11: \"#5746af\",\n  accent12: \"#20134b\",\n};\n\n// Radix - Slate\nconst neutral = {\n  neutral1: \"#fbfcfd\",\n  neutral2: \"#f8f9fa\",\n  neutral3: \"#f1f3f5\",\n  neutral4: \"#eceef0\",\n  neutral5: \"#e6e8eb\",\n  neutral6: \"#dfe3e6\",\n  neutral7: \"#d7dbdf\",\n  neutral8: \"#c1c8cd\",\n  neutral9: \"#889096\",\n  neutral10: \"#7e868c\",\n  neutral11: \"#687076\",\n  neutral12: \"#11181c\",\n};\n\n// Radix - Green\nconst success = {\n  success1: \"#fbfefc\",\n  success2: \"#f2fcf5\",\n  success3: \"#e9f9ee\",\n  success4: \"#ddf3e4\",\n  success5: \"#ccebd7\",\n  success6: \"#b4dfc4\",\n  success7: \"#92ceac\",\n  success8: \"#5bb98c\",\n  success9: \"#30a46c\",\n  success10: \"#299764\",\n  success11: \"#18794e\",\n  success12: \"#153226\",\n};\n\n// Radix - Blue\nconst info = {\n  info1: \"#fbfdff\",\n  info2: \"#f5faff\",\n  info3: \"#edf6ff\",\n  info4: \"#e1f0ff\",\n  info5: \"#cee7fe\",\n  info6: \"#b7d9f8\",\n  info7: \"#96c7f2\",\n  info8: \"#5eb0ef\",\n  info9: \"#0091ff\",\n  info10: \"#0081f1\",\n  info11: \"#006adc\",\n  info12: \"#00254d\",\n};\n\n// Radix - Amber\nconst warning = {\n  warning1: \"#fefdfb\",\n  warning2: \"#fff9ed\",\n  warning3: \"#fff4d5\",\n  warning4: \"#ffecbc\",\n  warning5: \"#ffe3a2\",\n  warning6: \"#ffd386\",\n  warning7: \"#f3ba63\",\n  warning8: \"#ee9d2b\",\n  warning9: \"#ffb224\",\n  warning10: \"#ffa01c\",\n  warning11: \"#ad5700\",\n  warning12: \"#4e2009\",\n};\n\n// Radix - Red\nconst danger = {\n  danger1: \"#fffcfc\",\n  danger2: \"#fff8f8\",\n  danger3: \"#ffefef\",\n  danger4: \"#ffe5e5\",\n  danger5: \"#fdd8d8\",\n  danger6: \"#f9c6c6\",\n  danger7: \"#f3aeaf\",\n  danger8: \"#eb9091\",\n  danger9: \"#e5484d\",\n  danger10: \"#dc3d43\",\n  danger11: \"#cd2b31\",\n  danger12: \"#381316\",\n};\n\nconst semanticColors = {\n  loContrast: \"white\",\n  background: \"$loContrast\",\n  focusRing: \"#96c7f2\",\n  closeButtonHoverBackground: \"$blackAlpha4\",\n  closeButtonActiveBackground: \"$blackAlpha5\",\n  progressStripe: \"$whiteAlpha6\",\n};\n\nexport const lightColors = {\n  ...primary,\n  ...accent,\n  ...neutral,\n  ...success,\n  ...info,\n  ...warning,\n  ...danger,\n  ...semanticColors,\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Dark palette\n * -----------------------------------------------------------------------------------------------*/\n\n// Radix - Cyan dark\nconst primaryDark = {\n  primary1: \"#07191d\",\n  primary2: \"#061e24\",\n  primary3: \"#072830\",\n  primary4: \"#07303b\",\n  primary5: \"#073844\",\n  primary6: \"#064150\",\n  primary7: \"#045063\",\n  primary8: \"#00647d\",\n  primary9: \"#05a2c2\",\n  primary10: \"#00b1cc\",\n  primary11: \"#00c2d7\",\n  primary12: \"#e1f8fa\",\n};\n\n// Radix - Violet dark\nconst accentDark = {\n  accent1: \"#17151f\",\n  accent2: \"#1c172b\",\n  accent3: \"#251e40\",\n  accent4: \"#2c2250\",\n  accent5: \"#32275f\",\n  accent6: \"#392c72\",\n  accent7: \"#443592\",\n  accent8: \"#5842c3\",\n  accent9: \"#6e56cf\",\n  accent10: \"#7c66dc\",\n  accent11: \"#9e8cfc\",\n  accent12: \"#f1eefe\",\n};\n\n// Radix - Slate dark\nconst neutralDark = {\n  neutral1: \"#151718\",\n  neutral2: \"#1a1d1e\",\n  neutral3: \"#202425\",\n  neutral4: \"#26292b\",\n  neutral5: \"#2b2f31\",\n  neutral6: \"#313538\",\n  neutral7: \"#3a3f42\",\n  neutral8: \"#4c5155\",\n  neutral9: \"#697177\",\n  neutral10: \"#787f85\",\n  neutral11: \"#9ba1a6\",\n  neutral12: \"#ecedee\",\n};\n\n// Radix - Green dark\nconst successDark = {\n  success1: \"#0d1912\",\n  success2: \"#0c1f17\",\n  success3: \"#0f291e\",\n  success4: \"#113123\",\n  success5: \"#133929\",\n  success6: \"#164430\",\n  success7: \"#1b543a\",\n  success8: \"#236e4a\",\n  success9: \"#30a46c\",\n  success10: \"#3cb179\",\n  success11: \"#4cc38a\",\n  success12: \"#e5fbeb\",\n};\n\n// Radix - Blue dark\nconst infoDark = {\n  info1: \"#0f1720\",\n  info2: \"#0f1b2d\",\n  info3: \"#10243e\",\n  info4: \"#102a4c\",\n  info5: \"#0f3058\",\n  info6: \"#0d3868\",\n  info7: \"#0a4481\",\n  info8: \"#0954a5\",\n  info9: \"#0091ff\",\n  info10: \"#369eff\",\n  info11: \"#52a9ff\",\n  info12: \"#eaf6ff\",\n};\n\n// Radix - Amber dark\nconst warningDark = {\n  warning1: \"#1f1300\",\n  warning2: \"#271700\",\n  warning3: \"#341c00\",\n  warning4: \"#3f2200\",\n  warning5: \"#4a2900\",\n  warning6: \"#573300\",\n  warning7: \"#693f05\",\n  warning8: \"#824e00\",\n  warning9: \"#ffb224\",\n  warning10: \"#ffcb47\",\n  warning11: \"#f1a10d\",\n  warning12: \"#fef3dd\",\n};\n\n// Radix - Red dark\nconst dangerDark = {\n  danger1: \"#1f1315\",\n  danger2: \"#291415\",\n  danger3: \"#3c181a\",\n  danger4: \"#481a1d\",\n  danger5: \"#541b1f\",\n  danger6: \"#671e22\",\n  danger7: \"#822025\",\n  danger8: \"#aa2429\",\n  danger9: \"#e5484d\",\n  danger10: \"#f2555a\",\n  danger11: \"#ff6369\",\n  danger12: \"#feecee\",\n};\n\nconst semanticDarkColors = {\n  loContrast: \"$neutral1\",\n  background: \"$loContrast\",\n  focusRing: \"#0a4481\",\n  closeButtonHoverBackground: \"$whiteAlpha4\",\n  closeButtonActiveBackground: \"$whiteAlpha5\",\n  progressStripe: \"$blackAlpha6\",\n};\n\nexport const darkColors: typeof lightColors = {\n  ...primaryDark,\n  ...accentDark,\n  ...neutralDark,\n  ...successDark,\n  ...infoDark,\n  ...warningDark,\n  ...dangerDark,\n  ...semanticDarkColors,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/tokens/index.ts",
    "content": "import { commonColors, darkColors, lightColors } from \"./colors\";\nimport { radii } from \"./radii\";\nimport { darkShadows, shadows } from \"./shadows\";\nimport { sizes } from \"./sizes\";\nimport { space } from \"./space\";\nimport { fonts, fontSizes, fontWeights, letterSpacings, lineHeights } from \"./typography\";\nimport { zIndices } from \"./z-indices\";\n\n/**\n * Base stitches theme tokens - light mode\n */\nexport const baseThemeTokens = {\n  colors: {\n    ...commonColors,\n    ...lightColors,\n  },\n  space,\n  sizes,\n  fonts,\n  fontSizes,\n  fontWeights,\n  letterSpacings,\n  lineHeights,\n  radii,\n  shadows,\n  zIndices,\n};\n\n/**\n * Base stitches theme tokens - dark mode\n */\nexport const baseDarkThemeTokens = {\n  colors: darkColors,\n  shadows: darkShadows,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/tokens/radii.ts",
    "content": "export const radii = {\n  none: \"0\",\n  xs: \"0.125rem\",\n  sm: \"0.25rem\",\n  md: \"0.375rem\",\n  lg: \"0.5rem\",\n  xl: \"0.75rem\",\n  \"2xl\": \"1rem\",\n  \"3xl\": \"1.5rem\",\n  full: \"9999px\",\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/tokens/shadows.ts",
    "content": "export const shadows = {\n  none: \"0 0 #0000\",\n  xs: \"0 1px 2px 0 rgb(0 0 0 / 0.05)\",\n  sm: \"0 1px 3px 0 rgb(0 0 0 / 0.09), 0 1px 2px -1px rgb(0 0 0 / 0.1)\",\n  md: \"0 4px 6px -1px rgb(0 0 0 / 0.09), 0 2px 4px -2px rgb(0 0 0 / 0.1)\",\n  lg: \"0 10px 15px -3px rgb(0 0 0 / 0.09), 0 4px 6px -4px rgb(0 0 0 / 0.1)\",\n  xl: \"0 20px 25px -5px rgb(0 0 0 / 0.09), 0 8px 10px -6px rgb(0 0 0 / 0.1)\",\n  \"2xl\": \"0 25px 50px -12px rgb(0 0 0 / 0.24)\",\n  inner: \"inset 0 2px 4px 0 rgb(0 0 0 / 0.06)\",\n  outline: \"0 0 0 3px $colors$focusRing\",\n};\n\nexport const darkShadows = {\n  lg: \"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px\",\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/tokens/sizes.ts",
    "content": "import { space } from \"./space\";\n\nexport const sizes = {\n  ...space,\n  prose: \"65ch\",\n  max: \"max-content\",\n  min: \"min-content\",\n  full: \"100%\",\n  screenW: \"100vw\",\n  screenH: \"100vh\",\n  xs: \"20rem\",\n  sm: \"24rem\",\n  md: \"28rem\",\n  lg: \"32rem\",\n  xl: \"36rem\",\n  \"2xl\": \"42rem\",\n  \"3xl\": \"48rem\",\n  \"4xl\": \"56rem\",\n  \"5xl\": \"64rem\",\n  \"6xl\": \"72rem\",\n  \"7xl\": \"80rem\",\n  \"8xl\": \"90rem\",\n  containerSm: \"640px\",\n  containerMd: \"768px\",\n  containerLg: \"1024px\",\n  containerXl: \"1280px\",\n  container2xl: \"1536px\",\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/tokens/space.ts",
    "content": "export const space = {\n  px: \"1px\",\n  \"0_5\": \"0.125rem\",\n  \"1\": \"0.25rem\",\n  \"1_5\": \"0.375rem\",\n  \"2\": \"0.5rem\",\n  \"2_5\": \"0.625rem\",\n  \"3\": \"0.75rem\",\n  \"3_5\": \"0.875rem\",\n  \"4\": \"1rem\",\n  \"5\": \"1.25rem\",\n  \"6\": \"1.5rem\",\n  \"7\": \"1.75rem\",\n  \"8\": \"2rem\",\n  \"9\": \"2.25rem\",\n  \"10\": \"2.5rem\",\n  \"12\": \"3rem\",\n  \"14\": \"3.5rem\",\n  \"16\": \"4rem\",\n  \"20\": \"5rem\",\n  \"24\": \"6rem\",\n  \"28\": \"7rem\",\n  \"32\": \"8rem\",\n  \"36\": \"9rem\",\n  \"40\": \"10rem\",\n  \"44\": \"11rem\",\n  \"48\": \"12rem\",\n  \"52\": \"13rem\",\n  \"56\": \"14rem\",\n  \"60\": \"15rem\",\n  \"64\": \"16rem\",\n  \"72\": \"18rem\",\n  \"80\": \"20rem\",\n  \"96\": \"24rem\",\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/tokens/typography.ts",
    "content": "const fonts = {\n  sans: 'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\",\"Noto Color Emoji\"',\n  serif: 'ui-serif, Georgia, Cambria, \"Times New Roman\", Times, serif',\n  mono: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace',\n};\n\nconst fontSizes = {\n  \"2xs\": \"0.625rem\",\n  xs: \"0.75rem\",\n  sm: \"0.875rem\",\n  base: \"1rem\",\n  lg: \"1.125rem\",\n  xl: \"1.25rem\",\n  \"2xl\": \"1.5rem\",\n  \"3xl\": \"1.875rem\",\n  \"4xl\": \"2.25rem\",\n  \"5xl\": \"3rem\",\n  \"6xl\": \"3.75rem\",\n  \"7xl\": \"4.5rem\",\n  \"8xl\": \"6rem\",\n  \"9xl\": \"8rem\",\n};\n\nconst fontWeights = {\n  hairline: 100,\n  thin: 200,\n  light: 300,\n  normal: 400,\n  medium: 500,\n  semibold: 600,\n  bold: 700,\n  extrabold: 800,\n  black: 900,\n};\n\nconst lineHeights = {\n  normal: \"normal\",\n  none: 1,\n  shorter: 1.25,\n  short: 1.375,\n  base: 1.5,\n  tall: 1.625,\n  taller: 2,\n  \"3\": \".75rem\",\n  \"4\": \"1rem\",\n  \"5\": \"1.25rem\",\n  \"6\": \"1.5rem\",\n  \"7\": \"1.75rem\",\n  \"8\": \"2rem\",\n  \"9\": \"2.25rem\",\n  \"10\": \"2.5rem\",\n};\n\nconst letterSpacings = {\n  tighter: \"-0.05em\",\n  tight: \"-0.025em\",\n  normal: \"0\",\n  wide: \"0.025em\",\n  wider: \"0.05em\",\n  widest: \"0.1em\",\n};\n\nexport { fonts, fontSizes, fontWeights, letterSpacings, lineHeights };\n"
  },
  {
    "path": "packages/solid/src/styled-system/tokens/z-indices.ts",
    "content": "export const zIndices = {\n  hide: -1,\n  auto: \"auto\",\n  base: 0,\n  docked: 10,\n  sticky: 1000,\n  banner: 1100,\n  overlay: 1200,\n  modal: 1300,\n  dropdown: 1400,\n  popover: 1500,\n  tooltip: 1600,\n  skipLink: 1700,\n  notification: 1800,\n};\n"
  },
  {
    "path": "packages/solid/src/styled-system/types.ts",
    "content": "import { CSS, ScaleValue } from \"@stitches/core\";\n\nimport { BorderProps } from \"./props/border\";\nimport { ColorProps } from \"./props/color\";\nimport { CSSProp } from \"./props/css\";\nimport { FlexboxProps } from \"./props/flexbox\";\nimport { GridLayoutProps } from \"./props/grid\";\nimport { LayoutProps } from \"./props/layout\";\nimport { MarginProps } from \"./props/margin\";\nimport { PaddingProps } from \"./props/padding\";\nimport { PositionProps } from \"./props/position\";\nimport { PseudoSelectorProps } from \"./props/pseudo-selector\";\nimport { RadiiProps } from \"./props/radii\";\nimport { ShadowProps } from \"./props/shadow\";\nimport { SizeProps } from \"./props/size\";\nimport { TypographyProps } from \"./props/typography\";\nimport { baseTheme, config } from \"./stitches.config\";\nimport { baseThemeTokens } from \"./tokens\";\n\n/**\n * Hope UI - Stitches theme interface.\n */\nexport type HopeTheme = typeof baseTheme;\n\n/**\n * Stitches theme config interface.\n */\nexport type StitchesThemeConfig = {\n  [Scale in keyof typeof baseThemeTokens]?: {\n    [Token in keyof typeof baseThemeTokens[Scale]]?: boolean | number | string;\n  };\n} & {\n  [Scale in keyof typeof baseThemeTokens]?: {\n    [Token in string]: boolean | number | string;\n  };\n} & {\n  [Scale in string]: {\n    [Token in string]: boolean | number | string;\n  };\n};\n\n/**\n * Stitches config type.\n */\nexport type SystemConfig = typeof config;\n\n/**\n * Media interface based on the stitches media.\n */\nexport type SystemMedia = typeof config.media;\n\n/**\n * Style interface based on the stitches configuration.\n */\nexport type SystemStyleObject = CSS<SystemConfig>;\n\n/**\n * Stitches config `colors` scale value.\n */\nexport type ColorScaleValue = ScaleValue<\"colors\", SystemConfig>;\n\n/**\n * Stitches config `space` scale value.\n */\nexport type SpaceScaleValue = ScaleValue<\"space\", SystemConfig>;\n\n/**\n * Stitches config `sizes` scale value.\n */\nexport type SizeScaleValue = ScaleValue<\"sizes\", SystemConfig>;\n\n/**\n * Stitches config `fonts` scale value.\n */\nexport type FontScaleValue = ScaleValue<\"fonts\", SystemConfig>;\n\n/**\n * Stitches config `fontSizes` scale value.\n */\nexport type FontSizeScaleValue = ScaleValue<\"fontSizes\", SystemConfig>;\n\n/**\n * Stitches config `fontWeights` scale value.\n */\nexport type FontWeightScaleValue = ScaleValue<\"fontWeights\", SystemConfig>;\n\n/**\n * Stitches config `letterSpacings` scale value.\n */\nexport type LetterSpacingScaleValue = ScaleValue<\"letterSpacings\", SystemConfig>;\n\n/**\n * Stitches config `lineHeights` scale value.\n */\nexport type LineHeightScaleValue = ScaleValue<\"lineHeights\", SystemConfig>;\n\n/**\n * Stitches config `radii` scale value.\n */\nexport type RadiiScaleValue = ScaleValue<\"radii\", SystemConfig>;\n\n/**\n * Stitches config `shadows` scale value.\n */\nexport type ShadowScaleValue = ScaleValue<\"shadows\", SystemConfig>;\n\n/**\n * Stitches config `zIndices` scale value.\n */\nexport type ZIndiceScaleValue = ScaleValue<\"zIndices\", SystemConfig>;\n\n/**\n * Utility type to get an object containing all keys of another type\n */\nexport type KeysOf<T> = Record<keyof T, true>;\n\n/**\n * Utility to prefix keys of a type.\n */\nexport type Prefixed<K extends string, T> = `${K}${Extract<T, boolean | number | string>}`;\n\n/**\n * All system media css selectors\n */\nexport type SystemMediaCssSelector = Prefixed<\"@\", keyof SystemMedia>;\n\n/**\n * All breakpoint css selectors\n */\nexport type BreakpointCssSelector =\n  | \"@initial\"\n  | Exclude<SystemMediaCssSelector, \"@reduce-motion\" | \"@light\" | \"@dark\">;\n\n/**\n * Utility type to convert a given props type to a stitches responsive variant-like type.\n */\nexport type ResponsiveProps<Props> = {\n  [K in keyof Props]:\n    | Props[K]\n    | {\n        [KMedia in \"@initial\" | SystemMediaCssSelector]?: Props[K];\n      };\n};\n\n/**\n * Utility type to convert a given value type to a stitches responsive variant-like type.\n */\nexport type ResponsiveValue<T> =\n  | T\n  | {\n      [KMedia in \"@initial\" | SystemMediaCssSelector]?: T;\n    };\n\n/**\n * All style props types.\n */\nexport type StyleProps = ResponsiveProps<\n  BorderProps &\n    ColorProps &\n    FlexboxProps &\n    GridLayoutProps &\n    LayoutProps &\n    MarginProps &\n    PaddingProps &\n    PositionProps &\n    RadiiProps &\n    ShadowProps &\n    SizeProps &\n    TypographyProps &\n    PseudoSelectorProps\n> &\n  CSSProp;\n"
  },
  {
    "path": "packages/solid/src/styled-system/utils.ts",
    "content": "import merge from \"lodash.merge\";\n\nimport { colorModeClassNames } from \"../color-mode\";\nimport { isObject } from \"../utils/assertion\";\nimport { baseTheme, createTheme, css } from \"./stitches.config\";\nimport { StyleProps } from \"./system\";\nimport { baseDarkThemeTokens } from \"./tokens\";\nimport {\n  ResponsiveValue,\n  StitchesThemeConfig,\n  SystemMediaCssSelector,\n  SystemStyleObject,\n} from \"./types\";\n\n/**\n * Merge a source SystemStyleObject to both normal and responsive destination SystemStyleObject.\n * This function mutate the `destination` objects.\n */\nfunction mergeStyleObject(\n  sourceStyleObject: SystemStyleObject,\n  destStyleObject: SystemStyleObject,\n  destResponsiveStyleObject: Record<SystemMediaCssSelector, SystemStyleObject>\n) {\n  Object.entries(sourceStyleObject).forEach(([key, value]) => {\n    if (isObject(value)) {\n      if (key in destResponsiveStyleObject) {\n        // entry is a responsive css rule (ex: '@sm': {})\n        const atMediaRule = key as SystemMediaCssSelector;\n\n        destResponsiveStyleObject[atMediaRule] = {\n          ...destResponsiveStyleObject[atMediaRule],\n          ...value,\n        };\n      } else {\n        // entry is a normal css rule (ex: `.my-class: {}`, `&:hover: {}` or `_hover: {}`)\n        destStyleObject[key] = {\n          ...(destStyleObject[key] as SystemStyleObject),\n          ...value,\n        };\n      }\n    } else {\n      // entry is a normal css property declaration (ex: `color: value`)\n      destStyleObject[key] = value;\n    }\n  });\n}\n\n/**\n * Return a valid Stitches CSS object based on the given style props.\n * `baseStyles` objects should be declared in the order of desired style override.\n */\nexport function toCssObject(\n  props: StyleProps,\n  baseStyles?: Array<SystemStyleObject | undefined>\n): SystemStyleObject {\n  /**\n   * Destination object containing all non-responsive styles.\n   */\n  const destStyleObject: SystemStyleObject = {};\n\n  /**\n   * Destination object containing all responsive styles grouped by `@media` rule.\n   */\n  const destResponsiveStyleObject: Record<SystemMediaCssSelector, SystemStyleObject> = {\n    \"@sm\": {},\n    \"@md\": {},\n    \"@lg\": {},\n    \"@xl\": {},\n    \"@2xl\": {},\n    \"@reduce-motion\": {},\n    \"@light\": {},\n    \"@dark\": {},\n  };\n\n  // Add content of the `baseStyles` first to ensure css override works correctly.\n  baseStyles?.forEach(\n    styles => styles && mergeStyleObject(styles, destStyleObject, destResponsiveStyleObject)\n  );\n\n  // Add content of the `style props`\n  Object.entries(props).forEach(([prop, value]) => {\n    // don't add null or undefined style props\n    if (value === null || value === undefined) {\n      return;\n    }\n\n    if (prop === \"css\") {\n      return;\n    }\n\n    if (prop.startsWith(\"_\")) {\n      // entry is a pseudo prop\n      destStyleObject[prop] = value;\n    } else if (isObject(value)) {\n      // entry is a responsive prop\n      Object.keys(value).forEach(key => {\n        if (key === \"@initial\") {\n          // `@initial` prop is replaced by the normal css property declaration in the stitches `css` object.\n          destStyleObject[prop] = (value as any)[key];\n        } else if (key in destResponsiveStyleObject) {\n          const atMediaRule = key as SystemMediaCssSelector;\n\n          // group all prop with the same `@media` key in the same object as in the stitches `css` object.\n          destResponsiveStyleObject[atMediaRule] = {\n            ...destResponsiveStyleObject[atMediaRule],\n            [prop]: (value as any)[atMediaRule],\n          };\n        }\n      });\n    } else {\n      // entry is a normal css property declaration (ex: `color: value`)\n      destStyleObject[prop] = value;\n    }\n  });\n\n  // Add content of the `css` prop last to ensure css override works correctly.\n  props.css && mergeStyleObject(props.css, destStyleObject, destResponsiveStyleObject);\n\n  // spread responsive values last to ensure css override works correctly.\n  return { ...destStyleObject, ...destResponsiveStyleObject };\n}\n\n/**\n * Create new stitches dark or light theme.\n * @return a merged theme object containing the base stitches theme and the override values.\n *\n * @internal\n */\nexport function extendBaseTheme<T extends StitchesThemeConfig>(\n  type: \"light\" | \"dark\",\n  themeConfig: T\n) {\n  const isDark = type === \"dark\";\n\n  const className = isDark ? colorModeClassNames.dark : colorModeClassNames.light;\n\n  // If dark theme, we need to add base dark theme tokens which is not present in the base theme.\n  const finalConfig = isDark ? merge({}, baseDarkThemeTokens, themeConfig) : themeConfig;\n\n  const customTheme = createTheme(className, finalConfig);\n\n  return merge({}, baseTheme, customTheme);\n}\n\n/**\n * Map a responsive value to a new one\n */\nexport function mapResponsive(prop: ResponsiveValue<any>, mapper: (val: any) => any) {\n  if (isObject(prop)) {\n    return Object.keys(prop).reduce((result: Record<string, any>, key) => {\n      result[key] = mapper(prop[key]);\n      return result;\n    }, {});\n  }\n\n  if (prop != null) {\n    return mapper(prop);\n  }\n\n  return null;\n}\n\n/**\n * Return the css variable associated with the given token if exists, or the token itself otherwise.\n *\n * @example\n * \"$primary9\" -> \"var(--hope-colors-primary9)\"\n * \"tomato\" -> \"tomato\"\n */\nexport function colorTokenToCssVar(token: string): string {\n  if (!token.startsWith(\"$\")) {\n    return token;\n  }\n\n  return `var(--hope-colors-${token.substring(1)})`;\n}\n\n/**\n * Visually hide an element without hiding it from screen readers.\n */\nexport const visuallyHiddenStyles = css({\n  position: \"absolute\",\n  width: \"1px\",\n  height: \"1px\",\n  padding: \"0\",\n  margin: \"-1px\",\n  overflow: \"hidden\",\n  clip: \"rect(0, 0, 0, 0)\",\n  whiteSpace: \"nowrap\",\n  borderWidth: \"0\",\n});\n"
  },
  {
    "path": "packages/solid/src/utils/assertion.ts",
    "content": "export const __DEV__ = process.env.NODE_ENV !== \"production\";\n\nexport function isNumber(value: any): value is number {\n  return typeof value === \"number\";\n}\n\nexport function isArray<T>(value: any): value is Array<T> {\n  return Array.isArray(value);\n}\n\nexport function isObject(value: any): value is Record<string, any> {\n  const type = typeof value;\n  return value != null && (type === \"object\" || type === \"function\") && !isArray(value);\n}\n\nexport function isFunction<T extends Function = Function>(value: any): value is T {\n  return typeof value === \"function\";\n}\n\nexport function isNull(value: any): value is null {\n  return value == null;\n}\n\nexport function isString(value: any): value is string {\n  return Object.prototype.toString.call(value) === \"[object String]\";\n}\n\nexport function isUndefined(value: any): value is undefined {\n  return typeof value === \"undefined\" || value === undefined;\n}\n"
  },
  {
    "path": "packages/solid/src/utils/css.ts",
    "content": "/**\n * Return a CSS class selector based on the provided class name.\n */\nexport function createClassSelector(className: string) {\n  return `.${className}`;\n}\n\n/**\n * Return a single class names string from different css class.\n */\nexport function classNames(...classNames: Array<string | null | undefined>) {\n  return classNames.filter(Boolean).join(\" \");\n}\n"
  },
  {
    "path": "packages/solid/src/utils/dom.ts",
    "content": "import { EventKeys } from \"./types\";\n\nexport function isElement(el: any): el is Element {\n  return (\n    el != null && typeof el == \"object\" && \"nodeType\" in el && el.nodeType === Node.ELEMENT_NODE\n  );\n}\n\nexport function isHTMLElement(el: any): el is HTMLElement {\n  if (!isElement(el)) {\n    return false;\n  }\n\n  const win = el.ownerDocument.defaultView ?? window;\n  return el instanceof win.HTMLElement;\n}\n\nexport function getOwnerDocument(node?: Element | null): Document {\n  return isElement(node) ? node.ownerDocument ?? document : document;\n}\n\nexport function isValidEvent(event: any, element?: HTMLElement) {\n  const target = event.target as HTMLElement;\n\n  if (event.button > 0) {\n    return false;\n  }\n\n  // if the event target is no longer in the document\n  if (target) {\n    const doc = getOwnerDocument(target);\n    if (!doc.body.contains(target)) return false;\n  }\n\n  return !element?.contains(target);\n}\n\n/**\n * Get the normalized event key across all browsers\n */\nexport function normalizeEventKey(event: Pick<KeyboardEvent, \"key\" | \"keyCode\">) {\n  const { key, keyCode } = event;\n\n  const isArrowKey = keyCode >= 37 && keyCode <= 40 && key.indexOf(\"Arrow\") !== 0;\n\n  const eventKey = isArrowKey ? `Arrow${key}` : key;\n\n  return eventKey as EventKeys;\n}\n\nexport function getActiveElement(node?: HTMLElement) {\n  const doc = getOwnerDocument(node);\n  return doc?.activeElement as HTMLElement;\n}\n\nexport function contains(parent: HTMLElement | undefined, child: HTMLElement) {\n  if (!parent) {\n    return false;\n  }\n\n  return parent === child || parent.contains(child);\n}\n\nexport function getRelatedTarget(\n  event: Pick<FocusEvent, \"relatedTarget\" | \"target\" | \"currentTarget\">\n) {\n  const target = (event.target ?? event.currentTarget) as HTMLElement;\n  const activeElement = getActiveElement(target);\n  return (event.relatedTarget ?? activeElement) as HTMLElement;\n}\n\n/**\n * Check if an element is currently scrollable\n */\nexport function isScrollable(element: HTMLElement) {\n  return element && element.clientHeight < element.scrollHeight;\n}\n\n/**\n * Ensure a given child element is within the parent's visible scroll area\n * if the child is not visible, scroll the parent\n */\nexport function maintainScrollVisibility(activeElement: HTMLElement, scrollParent: HTMLElement) {\n  const { offsetHeight, offsetTop } = activeElement;\n  const { offsetHeight: parentOffsetHeight, scrollTop } = scrollParent;\n\n  const isAbove = offsetTop < scrollTop;\n  const isBelow = offsetTop + offsetHeight > scrollTop + parentOffsetHeight;\n\n  if (isAbove) {\n    scrollParent.scrollTo(0, offsetTop);\n  } else if (isBelow) {\n    scrollParent.scrollTo(0, offsetTop - parentOffsetHeight + offsetHeight);\n  }\n}\n"
  },
  {
    "path": "packages/solid/src/utils/function.ts",
    "content": "import { JSX } from \"solid-js\";\n\nimport { isFunction, isObject } from \"./assertion\";\n\n/**\n * Do nothing.\n */\nexport function noop() {\n  return;\n}\n\n/**\n * Cast a given value to another.\n */\nexport function cast<T>(value: any): T {\n  return value as T;\n}\n\n/**\n * Return a new object with mapper function applied to all keys of the initial object.\n */\nexport function mapKeys(prop: any, mapper: (val: any) => any) {\n  if (isObject(prop)) {\n    return Object.keys(prop).reduce((result, key) => {\n      result[key] = mapper(prop[key]);\n      return result;\n    }, {} as Record<string, any>);\n  }\n\n  if (prop !== null && prop !== undefined) {\n    return mapper(prop);\n  }\n\n  return null;\n}\n\n/**\n * Call the handler with the event.\n * Simpler way to call a JSX.EventHandlerUnion programmatically.\n */\nexport function callHandler<T, E extends Event>(\n  handler: JSX.EventHandlerUnion<T, E> | undefined,\n  event: E & {\n    currentTarget: T;\n    target: Element;\n  }\n) {\n  if (handler) {\n    if (isFunction(handler)) {\n      handler(event);\n    } else {\n      handler[0](handler[1], event);\n    }\n  }\n\n  return event?.defaultPrevented;\n}\n\n/**\n * Return a function that will call all handlers in the order they were chained with the same arguments.\n * Stop at the first `event.preventDefault()` call.\n */\nexport function chainHandlers<T, E extends Event>(\n  ...fns: Array<JSX.EventHandlerUnion<T, E> | undefined>\n) {\n  return function (\n    event: E & {\n      currentTarget: T;\n      target: Element;\n    }\n  ) {\n    fns.some(fn => {\n      return callHandler(fn, event);\n    });\n  };\n}\n\n/**\n * Return an array with the size of the provided range.\n */\nexport function range(count: number) {\n  return Array(count)\n    .fill(1)\n    .map((_, index) => index + 1);\n}\n"
  },
  {
    "path": "packages/solid/src/utils/index.ts",
    "content": "export * from \"./assertion\";\nexport * from \"./css\";\nexport * from \"./dom\";\nexport * from \"./function\";\nexport * from \"./number\";\nexport * from \"./object\";\nexport * from \"./solid\";\nexport * from \"./tabbable\";\nexport * from \"./types\";\n"
  },
  {
    "path": "packages/solid/src/utils/number.ts",
    "content": "/**\n * Convert a value to percentage based on lower and upper bound values\n *\n * @param value the value in number\n * @param min the minimum value\n * @param max the maximum value\n */\nexport function valueToPercent(value: number, min: number, max: number) {\n  return ((value - min) * 100) / (max - min);\n}\n\nexport function getNextIndex(current: number, last: number, loop: boolean) {\n  let next = current + 1;\n\n  if (next > last) {\n    next = loop ? 0 : last;\n  }\n\n  return next;\n}\n\nexport function getPrevIndex(current: number, last: number, loop: boolean) {\n  let next = current - 1;\n\n  if (next < 0) {\n    next = loop ? last : 0;\n  }\n\n  return next;\n}\n"
  },
  {
    "path": "packages/solid/src/utils/object.ts",
    "content": "import { noop } from \"./function\";\n\n/**\n * SSR: Graceful fallback for the `body` element\n */\nexport const mockBody = {\n  classList: { add: noop, remove: noop },\n};\n"
  },
  {
    "path": "packages/solid/src/utils/solid.ts",
    "content": "import { isFunction } from \"./assertion\";\n\nexport function isChildrenFunction(props: any): boolean {\n  const childrenProp = Object.getOwnPropertyDescriptor(props, \"children\");\n\n  if (childrenProp == null) {\n    return false;\n  }\n\n  return isFunction(childrenProp.value);\n}\n"
  },
  {
    "path": "packages/solid/src/utils/tabbable.ts",
    "content": "// Thanks https://github.com/reakit/reakit/blob/master/packages/reakit-utils/src/tabbable.ts\n\nimport { isHTMLElement } from \"./dom\";\n\nexport const hasTabIndex = (element: HTMLElement) => element.hasAttribute(\"tabindex\");\n\nexport function isHidden(element: HTMLElement) {\n  if (element.parentElement && isHidden(element.parentElement)) {\n    return true;\n  }\n\n  return element.hidden;\n}\n\nexport function isDisabled(element: HTMLElement) {\n  return (\n    Boolean(element.getAttribute(\"disabled\")) === true ||\n    Boolean(element.getAttribute(\"aria-disabled\")) === true\n  );\n}\n\nexport function isContentEditable(element: HTMLElement) {\n  const value = element.getAttribute(\"contenteditable\");\n  return value !== \"false\" && value != null;\n}\n\nexport function isFocusable(element: HTMLElement) {\n  if (!isHTMLElement(element) || isHidden(element) || isDisabled(element)) {\n    return false;\n  }\n\n  const { localName } = element;\n  const focusableTags = [\"input\", \"select\", \"textarea\", \"button\"];\n\n  if (focusableTags.indexOf(localName) >= 0) {\n    return true;\n  }\n\n  const others = {\n    a: () => element.hasAttribute(\"href\"),\n    audio: () => element.hasAttribute(\"controls\"),\n    video: () => element.hasAttribute(\"controls\"),\n  };\n\n  if (localName in others) {\n    return others[localName as keyof typeof others]();\n  }\n\n  if (isContentEditable(element)) {\n    return true;\n  }\n\n  return hasTabIndex(element);\n}\n"
  },
  {
    "path": "packages/solid/src/utils/types.ts",
    "content": "import { JSX } from \"solid-js\";\n\n/**\n * Allows for extending a set of props (`Source`) by an overriding set of props\n * (`Override`), ensuring that any duplicates are overridden by the overriding\n * set of props.\n */\nexport type OverrideProps<Source = {}, Override = {}> = Omit<Source, keyof Override> & Override;\n\nexport type EventKeys =\n  | \"ArrowDown\"\n  | \"ArrowUp\"\n  | \"ArrowLeft\"\n  | \"ArrowRight\"\n  | \"Enter\"\n  | \"Space\"\n  | \"Tab\"\n  | \"Backspace\"\n  | \"Control\"\n  | \"Meta\"\n  | \"Home\"\n  | \"End\"\n  | \"PageDown\"\n  | \"PageUp\"\n  | \"Delete\"\n  | \"Escape\"\n  | \" \"\n  | \"Shift\";\n\nexport type EventKeyMap = Partial<\n  Record<EventKeys, JSX.EventHandlerUnion<HTMLElement, KeyboardEvent>>\n>;\n"
  },
  {
    "path": "packages/solid/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig\",\n  \"compilerOptions\": {\n    \"emitDeclarationOnly\": true,\n    \"declaration\": true,\n    \"declarationMap\": true,\n    \"declarationDir\": \"dist\"\n  },\n  \"include\": [\"./src\"],\n  \"exclude\": [\"**/*.spec.*\", \"**/*.test.*\", \"**/*.stories.*\"]\n}\n"
  },
  {
    "path": "packages/solid/tsconfig.json",
    "content": "{\n  \"extends\": \"../../tsconfig.json\",\n  \"include\": [\"./src\", \"./dev\", \"vite.config.ts\", \"package.json\"],\n  \"exclude\": [\"node_modules\", \"./dist\"]\n}\n"
  },
  {
    "path": "packages/solid/vite.config.ts",
    "content": "import path from \"path\";\nimport { defineConfig } from \"vite\";\nimport dts from \"vite-plugin-dts\";\nimport solidPlugin from \"vite-plugin-solid\";\n\nimport pkg from \"./package.json\";\n\nexport default defineConfig({\n  plugins: [\n    solidPlugin(),\n    dts({\n      tsConfigFilePath: \"tsconfig.build.json\",\n      insertTypesEntry: true,\n      noEmitOnError: true,\n      skipDiagnostics: false,\n      logDiagnostics: true,\n    }),\n  ],\n  build: {\n    lib: {\n      entry: path.resolve(__dirname, \"src/index.ts\"),\n      formats: [\"es\", \"cjs\"],\n      fileName: format => (format === \"es\" ? \"index.mjs\" : \"index.cjs\"),\n    },\n    rollupOptions: {\n      external: [\n        ...Object.keys(pkg.dependencies),\n        ...Object.keys(pkg.peerDependencies),\n        \"solid-js\",\n        \"solid-js/web\",\n        \"solid-js/store\",\n      ],\n    },\n  },\n});\n"
  },
  {
    "path": "pnpm-workspace.yaml",
    "content": "packages:\n  - apps/*\n  - packages/*\n"
  },
  {
    "path": "tsconfig.eslint.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    // ensure that nobody can accidentally use this config for a build\n    \"noEmit\": true\n  },\n  \"include\": [\"packages\", \"apps\", \"jest.setup.ts\"],\n  \"exclude\": [\"node_modules\", \"**/dist\", \"**/build\"]\n}\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"esnext\",\n    \"module\": \"esnext\",\n    \"lib\": [\"dom\", \"dom.iterable\", \"esnext\", \"scripthost\"],\n    \"newLine\": \"LF\",\n    \"allowJs\": false,\n    \"allowSyntheticDefaultImports\": true,\n    \"esModuleInterop\": true,\n    \"forceConsistentCasingInFileNames\": true,\n    \"noFallthroughCasesInSwitch\": false,\n    \"isolatedModules\": true,\n    \"jsx\": \"preserve\",\n    \"jsxImportSource\": \"solid-js\",\n    \"moduleResolution\": \"Node\",\n    \"resolveJsonModule\": true,\n    \"skipLibCheck\": true,\n    \"strict\": true,\n    \"sourceMap\": true,\n    \"types\": [\"solid-js\", \"vite/client\", \"node\", \"jest\", \"@testing-library/jest-dom\"]\n  },\n  \"exclude\": [\"node_modules\"]\n}\n"
  },
  {
    "path": "turbo.json",
    "content": "{\n  \"$schema\": \"https://turborepo.org/schema.json\",\n  \"baseBranch\": \"origin/main\",\n  \"pipeline\": {\n    \"build\": {\n      \"dependsOn\": [\"^build\"],\n      \"outputs\": [\"dist/**\"]\n    },\n    \"test\": {\n      \"outputs\": [],\n      \"inputs\": [\"src/**/*.tsx\", \"src/**/*.ts\", \"test/**/*.ts\", \"test/**/*.tsx\"]\n    },\n    \"typecheck\": {\n      \"cache\": false\n    },\n    \"dev\": {\n      \"cache\": false\n    },\n    \"clean\": {\n      \"cache\": false\n    }\n  }\n}\n"
  },
  {
    "path": "vercel.json",
    "content": "{\n  \"routes\": [{ \"src\": \"/[^.]+\", \"dest\": \"/\", \"status\": 200 }]\n}\n"
  }
]