├── .gitignore
├── .npmrc
├── .vscode
└── settings.json
├── LICENSE
├── README.md
├── biome.json
├── examples
├── accordion
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── App.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── checkbox
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── App.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── combobox
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── MultipleExample.tsx
│ │ ├── SingleExample.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ ├── utils.tsx
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── command
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── MultiSelect.tsx
│ │ ├── SingleSelect.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ ├── utils.tsx
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── commandbar
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── App.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── context-menu
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── App.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── dialog
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── App.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── disclosure
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── App.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── dropdown-menu
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── App.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── feed
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── App.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── listbox
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── MultipleExample.tsx
│ │ ├── SingleExample.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ ├── utils.tsx
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── menu
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── App.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── popover
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── App.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── radiogroup
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── App.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── select
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── MultiSelect.tsx
│ │ ├── SingleSelect.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ ├── utils.tsx
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── tabs
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── App.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── toaster
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── App.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── toolbar
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ │ ├── App.tsx
│ │ ├── main.tsx
│ │ ├── style.css
│ │ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
└── transitions
│ ├── .gitignore
│ ├── favicon.svg
│ ├── index.html
│ ├── package.json
│ ├── postcss.config.js
│ ├── src
│ ├── App.tsx
│ ├── main.tsx
│ ├── style.css
│ └── vite-env.d.ts
│ ├── tailwind.config.js
│ ├── tsconfig.json
│ └── vite.config.js
├── images
├── banner.png
└── opengraph.png
├── lerna.json
├── package.json
├── packages
└── terracotta
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── pridepack.json
│ ├── src
│ ├── components
│ │ ├── accordion
│ │ │ ├── Accordion.ts
│ │ │ ├── AccordionButton.ts
│ │ │ ├── AccordionContext.ts
│ │ │ ├── AccordionHeader.ts
│ │ │ ├── AccordionItem.ts
│ │ │ ├── AccordionItemContext.ts
│ │ │ ├── AccordionPanel.ts
│ │ │ ├── index.ts
│ │ │ └── tags.ts
│ │ ├── alert-dialog
│ │ │ ├── AlertDialog.ts
│ │ │ ├── AlertDialogContext.ts
│ │ │ ├── AlertDialogDescription.ts
│ │ │ ├── AlertDialogOverlay.ts
│ │ │ ├── AlertDialogPanel.ts
│ │ │ ├── AlertDialogTitle.ts
│ │ │ ├── index.ts
│ │ │ └── tags.ts
│ │ ├── alert
│ │ │ └── index.ts
│ │ ├── button
│ │ │ └── index.ts
│ │ ├── checkbox
│ │ │ ├── Checkbox.ts
│ │ │ ├── CheckboxContext.ts
│ │ │ ├── CheckboxDescription.ts
│ │ │ ├── CheckboxIndicator.ts
│ │ │ ├── CheckboxLabel.ts
│ │ │ ├── index.ts
│ │ │ └── tags.ts
│ │ ├── color-scheme
│ │ │ └── index.ts
│ │ ├── combobox
│ │ │ ├── Combobox.ts
│ │ │ ├── ComboboxContext.ts
│ │ │ ├── ComboboxInput.ts
│ │ │ ├── ComboboxLabel.ts
│ │ │ ├── ComboboxOption.ts
│ │ │ ├── ComboboxOptions.ts
│ │ │ ├── index.ts
│ │ │ └── tags.ts
│ │ ├── command-bar
│ │ │ ├── CommandBar.ts
│ │ │ ├── CommandBarContext.ts
│ │ │ ├── CommandBarDescription.ts
│ │ │ ├── CommandBarOverlay.ts
│ │ │ ├── CommandBarPanel.ts
│ │ │ ├── CommandBarTitle.ts
│ │ │ ├── index.ts
│ │ │ └── tags.ts
│ │ ├── command
│ │ │ ├── Command.ts
│ │ │ ├── CommandContext.ts
│ │ │ ├── CommandInput.ts
│ │ │ ├── CommandLabel.ts
│ │ │ ├── CommandOption.ts
│ │ │ ├── CommandOptions.ts
│ │ │ ├── index.ts
│ │ │ └── tags.ts
│ │ ├── context-menu
│ │ │ ├── ContextMenu.ts
│ │ │ ├── ContextMenuBoundary.ts
│ │ │ ├── ContextMenuContext.ts
│ │ │ ├── ContextMenuOverlay.ts
│ │ │ ├── ContextMenuPanel.ts
│ │ │ ├── index.ts
│ │ │ └── tags.ts
│ │ ├── dialog
│ │ │ ├── Dialog.ts
│ │ │ ├── DialogContext.ts
│ │ │ ├── DialogDescription.ts
│ │ │ ├── DialogOverlay.ts
│ │ │ ├── DialogPanel.ts
│ │ │ ├── DialogTitle.ts
│ │ │ ├── index.ts
│ │ │ └── tags.ts
│ │ ├── disclosure
│ │ │ ├── Disclosure.ts
│ │ │ ├── DisclosureButton.ts
│ │ │ ├── DisclosureContext.ts
│ │ │ ├── DisclosurePanel.ts
│ │ │ ├── index.ts
│ │ │ └── tags.ts
│ │ ├── feed
│ │ │ ├── Feed.ts
│ │ │ ├── FeedArticle.ts
│ │ │ ├── FeedArticleContext.ts
│ │ │ ├── FeedArticleDescription.ts
│ │ │ ├── FeedArticleLabel.ts
│ │ │ ├── FeedContent.ts
│ │ │ ├── FeedContentContext.ts
│ │ │ ├── FeedContext.ts
│ │ │ ├── FeedLabel.ts
│ │ │ ├── index.ts
│ │ │ └── tags.ts
│ │ ├── listbox
│ │ │ ├── Listbox.ts
│ │ │ ├── ListboxButton.ts
│ │ │ ├── ListboxContext.ts
│ │ │ ├── ListboxLabel.ts
│ │ │ ├── ListboxOption.ts
│ │ │ ├── ListboxOptions.ts
│ │ │ ├── ListboxOptionsContext.ts
│ │ │ ├── index.ts
│ │ │ └── tags.ts
│ │ ├── menu
│ │ │ ├── Menu.ts
│ │ │ ├── MenuChild.ts
│ │ │ ├── MenuContext.ts
│ │ │ ├── MenuItem.ts
│ │ │ ├── index.ts
│ │ │ └── tags.ts
│ │ ├── popover
│ │ │ ├── Popover.ts
│ │ │ ├── PopoverButton.ts
│ │ │ ├── PopoverContext.ts
│ │ │ ├── PopoverOverlay.ts
│ │ │ ├── PopoverPanel.ts
│ │ │ ├── index.ts
│ │ │ └── tags.ts
│ │ ├── radio-group
│ │ │ ├── RadioGroup.ts
│ │ │ ├── RadioGroupContext.ts
│ │ │ ├── RadioGroupDescription.ts
│ │ │ ├── RadioGroupLabel.ts
│ │ │ ├── RadioGroupOption.ts
│ │ │ ├── RadioGroupRootContext.ts
│ │ │ ├── index.ts
│ │ │ └── tags.ts
│ │ ├── select
│ │ │ ├── Select.ts
│ │ │ ├── SelectContext.ts
│ │ │ ├── SelectOption.ts
│ │ │ ├── index.ts
│ │ │ └── tags.ts
│ │ ├── tabs
│ │ │ ├── Tab.ts
│ │ │ ├── TabGroup.ts
│ │ │ ├── TabGroupContext.ts
│ │ │ ├── TabList.ts
│ │ │ ├── TabListContext.ts
│ │ │ ├── TabPanel.ts
│ │ │ ├── index.ts
│ │ │ └── tags.ts
│ │ ├── toast
│ │ │ └── index.ts
│ │ ├── toggle
│ │ │ └── index.ts
│ │ ├── toolbar
│ │ │ └── index.ts
│ │ └── transition
│ │ │ └── index.ts
│ ├── index.ts
│ ├── states
│ │ ├── create-autocomplete-option-state.ts
│ │ ├── create-autocomplete-state.ts
│ │ ├── create-check-state.ts
│ │ ├── create-disclosure-state.ts
│ │ ├── create-input-state.ts
│ │ ├── create-select-option-state.ts
│ │ ├── create-select-state.ts
│ │ └── create-toggle-state.ts
│ └── utils
│ │ ├── Fragment.ts
│ │ ├── assert.ts
│ │ ├── create-dynamic.ts
│ │ ├── create-input-reader.ts
│ │ ├── create-show.ts
│ │ ├── create-type-ahead.ts
│ │ ├── create-unmountable.ts
│ │ ├── dynamic-prop.ts
│ │ ├── focus-navigation.ts
│ │ ├── focus-navigator.ts
│ │ ├── focus-query.ts
│ │ ├── focus-start-point.ts
│ │ ├── is-equal.ts
│ │ ├── namespace.ts
│ │ ├── state-props.ts
│ │ ├── types.ts
│ │ ├── use-event-listener.ts
│ │ ├── use-focus-start-point.ts
│ │ └── virtual-focus.ts
│ └── tsconfig.json
├── pnpm-lock.yaml
└── pnpm-workspace.yaml
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 |
8 | # Runtime data
9 | pids
10 | *.pid
11 | *.seed
12 | *.pid.lock
13 |
14 | # Directory for instrumented libs generated by jscoverage/JSCover
15 | lib-cov
16 |
17 | # Coverage directory used by tools like istanbul
18 | coverage
19 |
20 | # nyc test coverage
21 | .nyc_output
22 |
23 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
24 | .grunt
25 |
26 | # Bower dependency directory (https://bower.io/)
27 | bower_components
28 |
29 | # node-waf configuration
30 | .lock-wscript
31 |
32 | # Compiled binary addons (https://nodejs.org/api/addons.html)
33 | build/Release
34 |
35 | # Dependency directories
36 | node_modules/
37 | jspm_packages/
38 |
39 | # TypeScript v1 declaration files
40 | typings/
41 |
42 | # Optional npm cache directory
43 | .npm
44 |
45 | # Optional eslint cache
46 | .eslintcache
47 |
48 | # Optional REPL history
49 | .node_repl_history
50 |
51 | # Output of 'npm pack'
52 | *.tgz
53 |
54 | # Yarn Integrity file
55 | .yarn-integrity
56 |
57 | # dotenv environment variables file
58 | .env
59 |
60 | # parcel-bundler cache (https://parceljs.org/)
61 | .cache
62 |
63 | # next.js build output
64 | .next
65 |
66 | # nuxt.js build output
67 | .nuxt
68 |
69 | # vuepress build output
70 | .vuepress/dist
71 |
72 | # Serverless directories
73 | .serverless
74 |
75 | # FuseBox cache
76 | .fusebox/
77 |
78 | dist
79 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | strict-peer-dependencies=false
2 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "editor.defaultFormatter": "biomejs.biome",
3 | "[typescript]": {
4 | "editor.defaultFormatter": "biomejs.biome"
5 | },
6 | "[typescriptreact]": {
7 | "editor.defaultFormatter": "biomejs.biome"
8 | },
9 | "[javascript]": {
10 | "editor.defaultFormatter": "biomejs.biome"
11 | },
12 | "[json]": {
13 | "editor.defaultFormatter": "biomejs.biome"
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2025 Alexis Munsayac
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/examples/accordion/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/accordion/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/accordion/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/accordion/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "accordion-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/accordion/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/accordion/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import App from './App';
4 |
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
14 | );
15 | }
16 |
17 | const app = document.getElementById('app');
18 |
19 | if (app) {
20 | render(() => , app);
21 | }
22 |
--------------------------------------------------------------------------------
/examples/accordion/src/style.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
--------------------------------------------------------------------------------
/examples/accordion/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/accordion/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/accordion/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/accordion/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/checkbox/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/checkbox/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/checkbox/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/checkbox/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "checkbox-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/checkbox/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/checkbox/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import App from './App';
4 |
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
14 | );
15 | }
16 |
17 | const app = document.getElementById('app');
18 |
19 | if (app) {
20 | render(() => , app);
21 | }
22 |
--------------------------------------------------------------------------------
/examples/checkbox/src/style.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
--------------------------------------------------------------------------------
/examples/checkbox/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/checkbox/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/checkbox/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/checkbox/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/combobox/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/combobox/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/combobox/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/combobox/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "combobox-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/combobox/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/combobox/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import MultipleExample from './MultipleExample';
4 | import SingleExample from './SingleExample';
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
15 | );
16 | }
17 |
18 | const app = document.getElementById('app');
19 |
20 | if (app) {
21 | render(() => , app);
22 | }
23 |
--------------------------------------------------------------------------------
/examples/combobox/src/style.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 |
--------------------------------------------------------------------------------
/examples/combobox/src/utils.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 |
3 | export function CheckIcon(
4 | props: JSX.IntrinsicElements['svg'] & { title: string },
5 | ): JSX.Element {
6 | return (
7 |
22 | );
23 | }
24 |
25 | export function classNames(
26 | ...classes: (string | boolean | undefined)[]
27 | ): string {
28 | return classes.filter(Boolean).join(' ');
29 | }
30 |
--------------------------------------------------------------------------------
/examples/combobox/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/combobox/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/combobox/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/combobox/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/command/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/command/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/command/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/command/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "command-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/command/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/command/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import MultiSelect from './MultiSelect';
4 | import SingleSelect from './SingleSelect';
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
15 | );
16 | }
17 |
18 | const app = document.getElementById('app');
19 |
20 | if (app) {
21 | render(() => , app);
22 | }
23 |
--------------------------------------------------------------------------------
/examples/command/src/style.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 |
--------------------------------------------------------------------------------
/examples/command/src/utils.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 |
3 | export function CheckIcon(
4 | props: JSX.IntrinsicElements['svg'] & { title: string },
5 | ): JSX.Element {
6 | return (
7 |
22 | );
23 | }
24 |
25 | export function classNames(
26 | ...classes: (string | boolean | undefined)[]
27 | ): string {
28 | return classes.filter(Boolean).join(' ');
29 | }
30 |
--------------------------------------------------------------------------------
/examples/command/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/command/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/command/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/command/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/commandbar/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/commandbar/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/commandbar/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/commandbar/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "commandbar-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/commandbar/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/commandbar/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import App from './App';
4 |
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
14 | );
15 | }
16 |
17 | const app = document.getElementById('app');
18 |
19 | if (app) {
20 | render(() => , app);
21 | }
22 |
--------------------------------------------------------------------------------
/examples/commandbar/src/style.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 |
--------------------------------------------------------------------------------
/examples/commandbar/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/commandbar/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/commandbar/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/commandbar/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/context-menu/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/context-menu/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/context-menu/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/context-menu/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "context-menu-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/context-menu/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/context-menu/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import App from './App';
4 |
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
14 | );
15 | }
16 |
17 | const app = document.getElementById('app');
18 |
19 | if (app) {
20 | render(() => , app);
21 | }
22 |
--------------------------------------------------------------------------------
/examples/context-menu/src/style.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 |
--------------------------------------------------------------------------------
/examples/context-menu/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/context-menu/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/context-menu/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/context-menu/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/dialog/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/dialog/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/dialog/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/dialog/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dialog-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/dialog/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/dialog/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import App from './App';
4 |
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
14 | );
15 | }
16 |
17 | const app = document.getElementById('app');
18 |
19 | if (app) {
20 | render(() => , app);
21 | }
22 |
--------------------------------------------------------------------------------
/examples/dialog/src/style.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 |
--------------------------------------------------------------------------------
/examples/dialog/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/dialog/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/dialog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/dialog/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/disclosure/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/disclosure/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/disclosure/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/disclosure/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "disclosure-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/disclosure/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/disclosure/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import App from './App';
4 |
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
14 | );
15 | }
16 |
17 | const app = document.getElementById('app');
18 |
19 | if (app) {
20 | render(() => , app);
21 | }
22 |
--------------------------------------------------------------------------------
/examples/disclosure/src/style.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 |
--------------------------------------------------------------------------------
/examples/disclosure/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/disclosure/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/disclosure/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/disclosure/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/dropdown-menu/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/dropdown-menu/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/dropdown-menu/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/dropdown-menu/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "dropdown-menu-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/dropdown-menu/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/dropdown-menu/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import App from './App';
4 |
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
14 | );
15 | }
16 |
17 | const app = document.getElementById('app');
18 |
19 | if (app) {
20 | render(() => , app);
21 | }
22 |
--------------------------------------------------------------------------------
/examples/dropdown-menu/src/style.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 |
--------------------------------------------------------------------------------
/examples/dropdown-menu/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/dropdown-menu/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/dropdown-menu/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/dropdown-menu/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/feed/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/feed/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/feed/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/feed/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "feed-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/feed/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/feed/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import App from './App';
4 |
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
14 | );
15 | }
16 |
17 | const app = document.getElementById('app');
18 |
19 | if (app) {
20 | render(() => , app);
21 | }
22 |
--------------------------------------------------------------------------------
/examples/feed/src/style.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 |
--------------------------------------------------------------------------------
/examples/feed/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/feed/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/feed/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/feed/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/listbox/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/listbox/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/listbox/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/listbox/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "listbox-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/listbox/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/listbox/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import MultipleExample from './MultipleExample';
4 | import SingleExample from './SingleExample';
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
15 | );
16 | }
17 |
18 | const app = document.getElementById('app');
19 |
20 | if (app) {
21 | render(() => , app);
22 | }
23 |
--------------------------------------------------------------------------------
/examples/listbox/src/style.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 |
--------------------------------------------------------------------------------
/examples/listbox/src/utils.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 |
3 | export function CheckIcon(
4 | props: JSX.IntrinsicElements['svg'] & { title: string },
5 | ): JSX.Element {
6 | return (
7 |
22 | );
23 | }
24 |
25 | export function SelectorIcon(
26 | props: JSX.IntrinsicElements['svg'] & { title: string },
27 | ): JSX.Element {
28 | return (
29 |
44 | );
45 | }
46 |
47 | export function classNames(
48 | ...classes: (string | boolean | undefined)[]
49 | ): string {
50 | return classes.filter(Boolean).join(' ');
51 | }
52 |
--------------------------------------------------------------------------------
/examples/listbox/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/listbox/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/listbox/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/listbox/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/menu/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/menu/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/menu/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/menu/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "menu-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/menu/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/menu/src/App.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { Menu, MenuItem } from 'terracotta';
3 |
4 | function Separator(): JSX.Element {
5 | return (
6 |
9 | );
10 | }
11 |
12 | export default function App(): JSX.Element {
13 | return (
14 |
15 |
55 |
56 | );
57 | }
58 |
--------------------------------------------------------------------------------
/examples/menu/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import App from './App';
4 |
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
14 | );
15 | }
16 |
17 | const app = document.getElementById('app');
18 |
19 | if (app) {
20 | render(() => , app);
21 | }
22 |
--------------------------------------------------------------------------------
/examples/menu/src/style.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 |
--------------------------------------------------------------------------------
/examples/menu/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/menu/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/menu/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/menu/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/popover/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/popover/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/popover/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/popover/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "popover-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/popover/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/popover/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import App from './App';
4 |
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
14 | );
15 | }
16 |
17 | const app = document.getElementById('app');
18 |
19 | if (app) {
20 | render(() => , app);
21 | }
22 |
--------------------------------------------------------------------------------
/examples/popover/src/style.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 |
--------------------------------------------------------------------------------
/examples/popover/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/popover/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/popover/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/popover/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/radiogroup/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/radiogroup/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/radiogroup/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/radiogroup/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "radiogroup-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/radiogroup/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/radiogroup/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import App from './App';
4 |
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
14 | );
15 | }
16 |
17 | const app = document.getElementById('app');
18 |
19 | if (app) {
20 | render(() => , app);
21 | }
22 |
--------------------------------------------------------------------------------
/examples/radiogroup/src/style.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 |
--------------------------------------------------------------------------------
/examples/radiogroup/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/radiogroup/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/radiogroup/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/radiogroup/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/select/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/select/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/select/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/select/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "select-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/select/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/select/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import MultiSelect from './MultiSelect';
4 | import SingleSelect from './SingleSelect';
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
15 | );
16 | }
17 |
18 | const app = document.getElementById('app');
19 |
20 | if (app) {
21 | render(() => , app);
22 | }
23 |
--------------------------------------------------------------------------------
/examples/select/src/style.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 |
--------------------------------------------------------------------------------
/examples/select/src/utils.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 |
3 | export function CheckIcon(
4 | props: JSX.IntrinsicElements['svg'] & { title: string },
5 | ): JSX.Element {
6 | return (
7 |
22 | );
23 | }
24 |
25 | export function classNames(
26 | ...classes: (string | boolean | undefined)[]
27 | ): string {
28 | return classes.filter(Boolean).join(' ');
29 | }
30 |
--------------------------------------------------------------------------------
/examples/select/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/select/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/select/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/select/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/tabs/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/tabs/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/tabs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/tabs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tabs-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/tabs/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/tabs/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import App from './App';
4 |
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
14 | );
15 | }
16 |
17 | const app = document.getElementById('app');
18 |
19 | if (app) {
20 | render(() => , app);
21 | }
22 |
--------------------------------------------------------------------------------
/examples/tabs/src/style.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 |
--------------------------------------------------------------------------------
/examples/tabs/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/tabs/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/tabs/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/tabs/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/toaster/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/toaster/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/toaster/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/toaster/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "toaster-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/toaster/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/toaster/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import App from './App';
4 |
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
14 | );
15 | }
16 |
17 | const app = document.getElementById('app');
18 |
19 | if (app) {
20 | render(() => , app);
21 | }
22 |
--------------------------------------------------------------------------------
/examples/toaster/src/style.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 | body {
3 | overflow: hidden;
4 | }
5 |
--------------------------------------------------------------------------------
/examples/toaster/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/toaster/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/toaster/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/toaster/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/toolbar/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/toolbar/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/toolbar/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/toolbar/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "toolbar-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/toolbar/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/toolbar/src/App.tsx:
--------------------------------------------------------------------------------
1 | import { Toggle, Toolbar } from 'terracotta';
2 | import type { JSX } from 'solid-js';
3 | import { For, createSignal } from 'solid-js';
4 |
5 | function classNames(...classes: (string | boolean | undefined)[]): string {
6 | return classes.filter(Boolean).join(' ');
7 | }
8 |
9 | interface ToolbarOption {
10 | label: string;
11 | title: string;
12 | class: string;
13 | }
14 |
15 | const FONT_OPTIONS: ToolbarOption[] = [
16 | { label: 'B', title: 'Bold', class: 'font-bold' },
17 | { label: 'I', title: 'Italic', class: 'italic' },
18 | { label: 'U', title: 'Underlined', class: 'underline' },
19 | { label: 'S', title: 'Strike Through', class: 'line-through' },
20 | ];
21 |
22 | export default function App(): JSX.Element {
23 | return (
24 |
25 |
26 |
27 |
28 | {(item): JSX.Element => {
29 | const [checked, setChecked] = createSignal(false);
30 | return (
31 |
40 | {item.label}
41 |
42 | );
43 | }}
44 |
45 |
46 |
47 |
48 | );
49 | }
50 |
--------------------------------------------------------------------------------
/examples/toolbar/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import App from './App';
4 |
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
14 | );
15 | }
16 |
17 | const app = document.getElementById('app');
18 |
19 | if (app) {
20 | render(() => , app);
21 | }
22 |
--------------------------------------------------------------------------------
/examples/toolbar/src/style.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 |
--------------------------------------------------------------------------------
/examples/toolbar/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/toolbar/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/toolbar/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/toolbar/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/examples/transitions/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | dist
4 | dist-ssr
5 | *.local
--------------------------------------------------------------------------------
/examples/transitions/favicon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/examples/transitions/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Vite App
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/examples/transitions/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "transitions-example",
3 | "type": "module",
4 | "version": "1.0.6",
5 | "scripts": {
6 | "dev": "vite",
7 | "build": "vite build",
8 | "serve": "vite preview"
9 | },
10 | "devDependencies": {
11 | "@tailwindcss/postcss": "^4.0.14",
12 | "postcss": "^8.5.3",
13 | "typescript": "^5.8.2",
14 | "vite": "^6.2.1",
15 | "vite-plugin-solid": "^2.11.6"
16 | },
17 | "dependencies": {
18 | "solid-js": "^1.9.5",
19 | "tailwindcss": "^4.0.14",
20 | "terracotta": "1.0.6"
21 | },
22 | "private": true,
23 | "publishConfig": {
24 | "access": "restricted"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/transitions/postcss.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | plugins: {
3 | '@tailwindcss/postcss': {},
4 | },
5 | };
6 |
--------------------------------------------------------------------------------
/examples/transitions/src/App.tsx:
--------------------------------------------------------------------------------
1 | import { Transition } from 'terracotta';
2 | import type { JSX } from 'solid-js';
3 | import { createSignal } from 'solid-js';
4 |
5 | export default function App(): JSX.Element {
6 | const [isShowing, setIsShowing] = createSignal(true);
7 |
8 | return (
9 |
10 |
11 |
21 |
22 |
23 |
41 |
42 | );
43 | }
44 |
--------------------------------------------------------------------------------
/examples/transitions/src/main.tsx:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { render } from 'solid-js/web';
3 | import App from './App';
4 |
5 | import './style.css';
6 |
7 | function Root(): JSX.Element {
8 | return (
9 |
14 | );
15 | }
16 |
17 | const app = document.getElementById('app');
18 |
19 | if (app) {
20 | render(() => , app);
21 | }
22 |
--------------------------------------------------------------------------------
/examples/transitions/src/style.css:
--------------------------------------------------------------------------------
1 | @import "tailwindcss";
2 |
--------------------------------------------------------------------------------
/examples/transitions/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/examples/transitions/tailwind.config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | mode: 'jit',
3 | content: ['./src/**/*.tsx'],
4 | darkMode: 'class', // or 'media' or 'class'
5 | variants: {},
6 | plugins: [],
7 | };
8 |
--------------------------------------------------------------------------------
/examples/transitions/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "exclude": ["node_modules"],
3 | "include": ["src", "types"],
4 | "compilerOptions": {
5 | "module": "ESNext",
6 | "lib": ["ESNext", "DOM"],
7 | "importHelpers": true,
8 | "declaration": true,
9 | "sourceMap": true,
10 | "rootDir": "./src",
11 | "strict": true,
12 | "noUnusedLocals": true,
13 | "noUnusedParameters": true,
14 | "noImplicitReturns": true,
15 | "noFallthroughCasesInSwitch": true,
16 | "moduleResolution": "Bundler",
17 | "jsx": "preserve",
18 | "jsxImportSource": "solid-js",
19 | "esModuleInterop": true,
20 | "target": "ES2017"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/examples/transitions/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite';
2 | import solidPlugin from 'vite-plugin-solid';
3 |
4 | export default defineConfig({
5 | plugins: [solidPlugin()],
6 | });
7 |
--------------------------------------------------------------------------------
/images/banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lxsmnsyc/terracotta/af8e07eda13543406aebc23563c8c560cad6878f/images/banner.png
--------------------------------------------------------------------------------
/images/opengraph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lxsmnsyc/terracotta/af8e07eda13543406aebc23563c8c560cad6878f/images/opengraph.png
--------------------------------------------------------------------------------
/lerna.json:
--------------------------------------------------------------------------------
1 | {
2 | "npmClient": "npm",
3 | "packages": [
4 | "packages/*",
5 | "examples/*",
6 | "docs"
7 | ],
8 | "command": {
9 | "version": {
10 | "exact": true
11 | },
12 | "publish": {
13 | "allowBranch": [
14 | "main",
15 | "next"
16 | ],
17 | "registry": "https://registry.npmjs.org/"
18 | }
19 | },
20 | "version": "1.0.6",
21 | "$schema": "node_modules/lerna/schemas/lerna-schema.json"
22 | }
23 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "root",
3 | "private": true,
4 | "workspaces": ["packages/*", "examples/*", "docs"],
5 | "devDependencies": {
6 | "@biomejs/biome": "^1.9.4",
7 | "lerna": "^8.2.1",
8 | "typescript": "^5.8.2"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/packages/terracotta/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | lerna-debug.log*
8 |
9 | # Diagnostic reports (https://nodejs.org/api/report.html)
10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11 |
12 | # Runtime data
13 | pids
14 | *.pid
15 | *.seed
16 | *.pid.lock
17 |
18 | # Directory for instrumented libs generated by jscoverage/JSCover
19 | lib-cov
20 |
21 | # Coverage directory used by tools like istanbul
22 | coverage
23 | *.lcov
24 |
25 | # nyc test coverage
26 | .nyc_output
27 |
28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29 | .grunt
30 |
31 | # Bower dependency directory (https://bower.io/)
32 | bower_components
33 |
34 | # node-waf configuration
35 | .lock-wscript
36 |
37 | # Compiled binary addons (https://nodejs.org/api/addons.html)
38 | build/Release
39 |
40 | # Dependency directories
41 | node_modules/
42 | jspm_packages/
43 |
44 | # TypeScript v1 declaration files
45 | typings/
46 |
47 | # TypeScript cache
48 | *.tsbuildinfo
49 |
50 | # Optional npm cache directory
51 | .npm
52 |
53 | # Optional eslint cache
54 | .eslintcache
55 |
56 | # Microbundle cache
57 | .rpt2_cache/
58 | .rts2_cache_cjs/
59 | .rts2_cache_es/
60 | .rts2_cache_umd/
61 |
62 | # Optional REPL history
63 | .node_repl_history
64 |
65 | # Output of 'npm pack'
66 | *.tgz
67 |
68 | # Yarn Integrity file
69 | .yarn-integrity
70 |
71 | # dotenv environment variables file
72 | .env
73 | .env.production
74 | .env.development
75 |
76 | # parcel-bundler cache (https://parceljs.org/)
77 | .cache
78 |
79 | # Next.js build output
80 | .next
81 |
82 | # Nuxt.js build / generate output
83 | .nuxt
84 |
85 | # Gatsby files
86 | .cache/
87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js
88 | # https://nextjs.org/blog/next-9-1#public-directory-support
89 | # public
90 |
91 | # vuepress build output
92 | .vuepress/dist
93 |
94 | # Serverless directories
95 | .serverless/
96 |
97 | # FuseBox cache
98 | .fusebox/
99 |
100 | # DynamoDB Local files
101 | .dynamodb/
102 |
103 | # TernJS port file
104 | .tern-port
105 |
106 | .npmrc
107 |
--------------------------------------------------------------------------------
/packages/terracotta/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "terracotta",
3 | "version": "1.0.6",
4 | "type": "module",
5 | "description": "Headless UI for SolidJS",
6 | "repository": {
7 | "url": "https://github.com/lxsmnsyc/terracotta.git",
8 | "type": "git"
9 | },
10 | "homepage": "https://github.com/lxsmnsyc/terracotta/tree/main/packages/terracotta",
11 | "bugs": {
12 | "url": "https://github.com/lxsmnsyc/terracotta/issues"
13 | },
14 | "publishConfig": {
15 | "access": "public"
16 | },
17 | "author": "Alexis Munsayac",
18 | "private": false,
19 | "files": [
20 | "dist",
21 | "src"
22 | ],
23 | "engines": {
24 | "node": ">=10"
25 | },
26 | "license": "MIT",
27 | "keywords": [
28 | "pridepack",
29 | "solid-js",
30 | "headless-ui"
31 | ],
32 | "devDependencies": {
33 | "@types/node": "^22.13.10",
34 | "pridepack": "2.6.4",
35 | "solid-js": "^1.9.5",
36 | "tslib": "^2.7.0",
37 | "typescript": "^5.8.2"
38 | },
39 | "peerDependencies": {
40 | "solid-js": "^1.8"
41 | },
42 | "dependencies": {
43 | "solid-use": "^0.9.0"
44 | },
45 | "scripts": {
46 | "prepublishOnly": "pridepack clean && pridepack build",
47 | "build": "pridepack build",
48 | "type-check": "pridepack check",
49 | "clean": "pridepack clean",
50 | "watch": "pridepack watch"
51 | },
52 | "types": "./dist/types/index.d.ts",
53 | "main": "./dist/cjs/production/index.cjs",
54 | "module": "./dist/esm/production/index.mjs",
55 | "exports": {
56 | ".": {
57 | "types": "./dist/types/index.d.ts",
58 | "development": {
59 | "require": "./dist/cjs/development/index.cjs",
60 | "import": "./dist/esm/development/index.mjs"
61 | },
62 | "require": "./dist/cjs/production/index.cjs",
63 | "import": "./dist/esm/production/index.mjs"
64 | }
65 | },
66 | "typesVersions": {
67 | "*": {}
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/packages/terracotta/pridepack.json:
--------------------------------------------------------------------------------
1 | {
2 | "target": "es2018"
3 | }
4 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/accordion/AccordionContext.ts:
--------------------------------------------------------------------------------
1 | import { createContext, createUniqueId, useContext } from 'solid-js';
2 | import assert from '../../utils/assert';
3 | import FocusNavigator from '../../utils/focus-navigator';
4 |
5 | export const AccordionContext = createContext();
6 |
7 | export function useAccordionContext(componentName: string): FocusNavigator {
8 | const context = useContext(AccordionContext);
9 | assert(
10 | context,
11 | new Error(`<${componentName}> must be used inside a `),
12 | );
13 | return context;
14 | }
15 |
16 | export function createAccordionFocusNavigator(): FocusNavigator {
17 | return new FocusNavigator(createUniqueId());
18 | }
19 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/accordion/AccordionHeader.ts:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { createComponent, mergeProps } from 'solid-js';
3 | import { omitProps } from 'solid-use/props';
4 | import type { SelectOptionStateRenderProps } from '../../states/create-select-option-state';
5 | import {
6 | SelectOptionStateChild,
7 | useSelectOptionState,
8 | } from '../../states/create-select-option-state';
9 | import createDynamic from '../../utils/create-dynamic';
10 | import type {
11 | DynamicProps,
12 | HeadlessProps,
13 | ValidConstructor,
14 | } from '../../utils/dynamic-prop';
15 | import {
16 | createActiveState,
17 | createDisabledState,
18 | createExpandedState,
19 | createSelectedState,
20 | } from '../../utils/state-props';
21 | import { useAccordionItemContext } from './AccordionItemContext';
22 | import { ACCORDION_HEADER_TAG } from './tags';
23 |
24 | export type AccordionHeaderProps =
25 | HeadlessProps;
26 |
27 | export function AccordionHeader(
28 | props: AccordionHeaderProps,
29 | ): JSX.Element {
30 | useAccordionItemContext('AccordionHeader');
31 | const state = useSelectOptionState();
32 | return createDynamic(
33 | () => props.as || ('h3' as T),
34 | mergeProps(
35 | omitProps(props, ['as', 'children']),
36 | ACCORDION_HEADER_TAG,
37 | createDisabledState(() => state.disabled()),
38 | createSelectedState(() => state.isSelected()),
39 | createExpandedState(() => state.isSelected()),
40 | createActiveState(() => state.isActive()),
41 | {
42 | get children() {
43 | return createComponent(SelectOptionStateChild, {
44 | get children() {
45 | return props.children;
46 | },
47 | });
48 | },
49 | },
50 | ) as DynamicProps,
51 | );
52 | }
53 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/accordion/AccordionItemContext.ts:
--------------------------------------------------------------------------------
1 | import { createContext, useContext } from 'solid-js';
2 | import assert from '../../utils/assert';
3 |
4 | interface AccordionItemContextData {
5 | buttonID: string;
6 | panelID: string;
7 | }
8 |
9 | export const AccordionItemContext = createContext();
10 |
11 | export function useAccordionItemContext(
12 | componentName: string,
13 | ): AccordionItemContextData {
14 | const context = useContext(AccordionItemContext);
15 | assert(
16 | context,
17 | new Error(`<${componentName}> must be used inside a `),
18 | );
19 | return context;
20 | }
21 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/accordion/index.ts:
--------------------------------------------------------------------------------
1 | export * from './Accordion';
2 | export * from './AccordionButton';
3 | export * from './AccordionHeader';
4 | export * from './AccordionItem';
5 | export * from './AccordionPanel';
6 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/accordion/tags.ts:
--------------------------------------------------------------------------------
1 | import { createTag } from '../../utils/namespace';
2 |
3 | export const ACCORDION_TAG = createTag('accordion');
4 | export const ACCORDION_BUTTON_TAG = createTag('accordion-button');
5 | export const ACCORDION_HEADER_TAG = createTag('accordion-header');
6 | export const ACCORDION_ITEM_TAG = createTag('accordion-item');
7 | export const ACCORDION_PANEL_TAG = createTag('accordion-panel');
8 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/alert-dialog/AlertDialogContext.ts:
--------------------------------------------------------------------------------
1 | import { createContext, useContext } from 'solid-js';
2 | import assert from '../../utils/assert';
3 |
4 | interface AlertDialogContextData {
5 | ownerID: string;
6 | panelID: string;
7 | titleID: string;
8 | descriptionID: string;
9 | }
10 |
11 | export const AlertDialogContext = createContext();
12 |
13 | export function useAlertDialogContext(
14 | componentName: string,
15 | ): AlertDialogContextData {
16 | const context = useContext(AlertDialogContext);
17 | assert(
18 | context,
19 | new Error(`<${componentName}> must be used inside a `),
20 | );
21 | return context;
22 | }
23 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/alert-dialog/AlertDialogDescription.ts:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { createComponent, mergeProps } from 'solid-js';
3 | import { omitProps } from 'solid-use/props';
4 | import type { DisclosureStateRenderProps } from '../../states/create-disclosure-state';
5 | import {
6 | DisclosureStateChild,
7 | useDisclosureState,
8 | } from '../../states/create-disclosure-state';
9 | import createDynamic from '../../utils/create-dynamic';
10 | import type {
11 | DynamicProps,
12 | HeadlessProps,
13 | ValidConstructor,
14 | } from '../../utils/dynamic-prop';
15 | import {
16 | createDisabledState,
17 | createExpandedState,
18 | } from '../../utils/state-props';
19 | import { useAlertDialogContext } from './AlertDialogContext';
20 | import { ALERT_DIALOG_DESCRIPTION_TAG } from './tags';
21 |
22 | export type AlertDialogDescriptionProps =
23 | HeadlessProps;
24 |
25 | export function AlertDialogDescription(
26 | props: AlertDialogDescriptionProps,
27 | ): JSX.Element {
28 | const context = useAlertDialogContext('AlertDialogDescription');
29 | const state = useDisclosureState();
30 | return createDynamic(
31 | () => props.as || ('p' as T),
32 | mergeProps(
33 | omitProps(props, ['as', 'children']),
34 | ALERT_DIALOG_DESCRIPTION_TAG,
35 | {
36 | id: context.descriptionID,
37 | get children() {
38 | return createComponent(DisclosureStateChild, {
39 | get children() {
40 | return props.children;
41 | },
42 | });
43 | },
44 | },
45 | createDisabledState(() => state.disabled()),
46 | createExpandedState(() => state.isOpen()),
47 | ) as DynamicProps,
48 | );
49 | }
50 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/alert-dialog/AlertDialogTitle.ts:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { createComponent, mergeProps } from 'solid-js';
3 | import { omitProps } from 'solid-use/props';
4 | import type { DisclosureStateRenderProps } from '../../states/create-disclosure-state';
5 | import {
6 | DisclosureStateChild,
7 | useDisclosureState,
8 | } from '../../states/create-disclosure-state';
9 | import createDynamic from '../../utils/create-dynamic';
10 | import type {
11 | DynamicProps,
12 | HeadlessPropsWithRef,
13 | ValidConstructor,
14 | } from '../../utils/dynamic-prop';
15 | import {
16 | createDisabledState,
17 | createExpandedState,
18 | } from '../../utils/state-props';
19 | import { useAlertDialogContext } from './AlertDialogContext';
20 | import { ALERT_DIALOG_TITLE_TAG } from './tags';
21 |
22 | export type AlertDialogTitleProps =
23 | HeadlessPropsWithRef;
24 |
25 | export function AlertDialogTitle(
26 | props: AlertDialogTitleProps,
27 | ): JSX.Element {
28 | const context = useAlertDialogContext('AlertDialogTitle');
29 | const state = useDisclosureState();
30 |
31 | return createDynamic(
32 | () => props.as || ('h2' as T),
33 | mergeProps(
34 | omitProps(props, ['as', 'children']),
35 | ALERT_DIALOG_TITLE_TAG,
36 | {
37 | id: context.titleID,
38 | get children() {
39 | return createComponent(DisclosureStateChild, {
40 | get children() {
41 | return props.children;
42 | },
43 | });
44 | },
45 | },
46 | createDisabledState(() => state.disabled()),
47 | createExpandedState(() => state.isOpen()),
48 | ) as DynamicProps,
49 | );
50 | }
51 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/alert-dialog/index.ts:
--------------------------------------------------------------------------------
1 | export * from './AlertDialog';
2 | export * from './AlertDialogDescription';
3 | export * from './AlertDialogOverlay';
4 | export * from './AlertDialogPanel';
5 | export * from './AlertDialogTitle';
6 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/alert-dialog/tags.ts:
--------------------------------------------------------------------------------
1 | import { createTag } from '../../utils/namespace';
2 |
3 | export const ALERT_DIALOG_TAG = createTag('alert-dialog');
4 | export const ALERT_DIALOG_DESCRIPTION_TAG = createTag(
5 | 'alert-dialog-description',
6 | );
7 | export const ALERT_DIALOG_OVERLAY_TAG = createTag('alert-dialog-overlay');
8 | export const ALERT_DIALOG_PANEL_TAG = createTag('alert-dialog-panel');
9 | export const ALERT_DIALOG_TITLE_TAG = createTag('alert-dialog-title');
10 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/alert/index.ts:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { createUniqueId, mergeProps } from 'solid-js';
3 | import { omitProps } from 'solid-use/props';
4 | import createDynamic from '../../utils/create-dynamic';
5 | import type {
6 | DynamicProps,
7 | HeadlessProps,
8 | ValidConstructor,
9 | } from '../../utils/dynamic-prop';
10 | import { createTag } from '../../utils/namespace';
11 |
12 | const ALERT_TAG = createTag('alert');
13 |
14 | export type AlertProps = HeadlessProps;
15 |
16 | export function Alert(
17 | props: AlertProps,
18 | ): JSX.Element {
19 | const alertID = createUniqueId();
20 |
21 | return createDynamic(
22 | () => props.as || ('div' as T),
23 | mergeProps(
24 | {
25 | id: alertID,
26 | },
27 | omitProps(props, ['as']),
28 | ALERT_TAG,
29 | {
30 | role: 'alert',
31 | },
32 | ) as DynamicProps,
33 | );
34 | }
35 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/button/index.ts:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { createEffect, mergeProps } from 'solid-js';
3 | import { omitProps } from 'solid-use/props';
4 | import createDynamic from '../../utils/create-dynamic';
5 | import type {
6 | DynamicProps,
7 | HeadlessPropsWithRef,
8 | ValidConstructor,
9 | } from '../../utils/dynamic-prop';
10 | import { createForwardRef } from '../../utils/dynamic-prop';
11 | import { createTag } from '../../utils/namespace';
12 | import {
13 | createARIADisabledState,
14 | createDisabledState,
15 | } from '../../utils/state-props';
16 | import useEventListener from '../../utils/use-event-listener';
17 |
18 | const BUTTON_TAG = createTag('button');
19 |
20 | interface ButtonBaseProps {
21 | disabled?: boolean;
22 | }
23 |
24 | export type ButtonProps =
25 | HeadlessPropsWithRef;
26 |
27 | export function Button(
28 | props: ButtonProps,
29 | ): JSX.Element {
30 | const [internalRef, setInternalRef] = createForwardRef(props);
31 |
32 | createEffect(() => {
33 | const current = internalRef();
34 | if (current instanceof HTMLElement) {
35 | // This behavior is redundant for buttons
36 | if (current.tagName !== 'BUTTON') {
37 | useEventListener(current, 'keydown', e => {
38 | switch (e.key) {
39 | case 'Enter':
40 | case ' ': {
41 | current.click();
42 | break;
43 | }
44 | }
45 | });
46 | }
47 | }
48 | });
49 |
50 | return createDynamic(
51 | () => props.as || ('button' as T),
52 | mergeProps(
53 | {
54 | get tabindex() {
55 | return props.disabled ? -1 : 0;
56 | },
57 | role: 'button',
58 | },
59 | createDisabledState(() => props.disabled),
60 | createARIADisabledState(() => props.disabled),
61 | omitProps(props, ['as', 'ref']),
62 | BUTTON_TAG,
63 | {
64 | ref: setInternalRef,
65 | },
66 | ) as DynamicProps,
67 | );
68 | }
69 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/checkbox/CheckboxContext.ts:
--------------------------------------------------------------------------------
1 | import { createContext, useContext } from 'solid-js';
2 | import assert from '../../utils/assert';
3 |
4 | interface CheckboxContextData {
5 | ownerID: string;
6 | labelID: string;
7 | indicatorID: string;
8 | descriptionID: string;
9 | }
10 |
11 | export const CheckboxContext = createContext();
12 |
13 | export function useCheckboxContext(componentName: string): CheckboxContextData {
14 | const context = useContext(CheckboxContext);
15 | assert(
16 | context,
17 | new Error(`<${componentName}> must be used inside a `),
18 | );
19 | return context;
20 | }
21 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/checkbox/CheckboxDescription.ts:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { createComponent, mergeProps } from 'solid-js';
3 | import { omitProps } from 'solid-use/props';
4 | import type { CheckStateRenderProps } from '../../states/create-check-state';
5 | import {
6 | CheckStateChild,
7 | useCheckState,
8 | } from '../../states/create-check-state';
9 | import createDynamic from '../../utils/create-dynamic';
10 | import type {
11 | DynamicProps,
12 | HeadlessProps,
13 | ValidConstructor,
14 | } from '../../utils/dynamic-prop';
15 | import {
16 | createCheckedState,
17 | createDisabledState,
18 | } from '../../utils/state-props';
19 | import { useCheckboxContext } from './CheckboxContext';
20 | import { CHECKBOX_DESCRIPTION } from './tags';
21 |
22 | export type CheckboxDescriptionProps =
23 | HeadlessProps;
24 |
25 | export function CheckboxDescription(
26 | props: CheckboxDescriptionProps,
27 | ): JSX.Element {
28 | const context = useCheckboxContext('CheckboxDescription');
29 | const state = useCheckState();
30 | return createDynamic(
31 | () => props.as || ('p' as T),
32 | mergeProps(
33 | omitProps(props, ['as', 'children']),
34 | CHECKBOX_DESCRIPTION,
35 | {
36 | id: context.descriptionID,
37 | get children() {
38 | return createComponent(CheckStateChild, {
39 | get children() {
40 | return props.children;
41 | },
42 | });
43 | },
44 | },
45 | createDisabledState(() => state.disabled()),
46 | createCheckedState(() => state.checked()),
47 | ) as DynamicProps,
48 | );
49 | }
50 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/checkbox/CheckboxLabel.ts:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { createComponent, mergeProps } from 'solid-js';
3 | import { omitProps } from 'solid-use/props';
4 | import type { CheckStateRenderProps } from '../../states/create-check-state';
5 | import {
6 | CheckStateChild,
7 | useCheckState,
8 | } from '../../states/create-check-state';
9 | import createDynamic from '../../utils/create-dynamic';
10 | import type {
11 | DynamicProps,
12 | HeadlessProps,
13 | ValidConstructor,
14 | } from '../../utils/dynamic-prop';
15 | import {
16 | createCheckedState,
17 | createDisabledState,
18 | } from '../../utils/state-props';
19 | import { useCheckboxContext } from './CheckboxContext';
20 | import { CHECKBOX_LABEL } from './tags';
21 |
22 | export type CheckboxLabelProps =
23 | HeadlessProps;
24 |
25 | export function CheckboxLabel(
26 | props: CheckboxLabelProps,
27 | ): JSX.Element {
28 | const context = useCheckboxContext('CheckboxLabel');
29 | const state = useCheckState();
30 | return createDynamic(
31 | () => props.as || ('label' as T),
32 | mergeProps(
33 | omitProps(props, ['as', 'children']),
34 | CHECKBOX_LABEL,
35 | {
36 | id: context.labelID,
37 | for: context.indicatorID,
38 | get children() {
39 | return createComponent(CheckStateChild, {
40 | get children() {
41 | return props.children;
42 | },
43 | });
44 | },
45 | },
46 | createDisabledState(() => state.disabled()),
47 | createCheckedState(() => state.checked()),
48 | ) as DynamicProps,
49 | );
50 | }
51 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/checkbox/index.ts:
--------------------------------------------------------------------------------
1 | export * from './Checkbox';
2 | export * from './CheckboxDescription';
3 | export * from './CheckboxIndicator';
4 | export * from './CheckboxLabel';
5 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/checkbox/tags.ts:
--------------------------------------------------------------------------------
1 | import { createTag } from '../../utils/namespace';
2 |
3 | export const CHECKBOX_TAG = createTag('checkbox');
4 | export const CHECKBOX_DESCRIPTION = createTag('checkbox-description');
5 | export const CHECKBOX_INDICATOR = createTag('checkbox-indicator');
6 | export const CHECKBOX_LABEL = createTag('checkbox-label');
7 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/combobox/ComboboxContext.ts:
--------------------------------------------------------------------------------
1 | import { createContext, createUniqueId, useContext } from 'solid-js';
2 | import assert from '../../utils/assert';
3 | import FocusNavigator from '../../utils/focus-navigator';
4 | import { MATCHES_NODE } from '../../utils/namespace';
5 |
6 | interface ComboboxContextData {
7 | multiple?: boolean;
8 | controller: FocusNavigator;
9 | activeDescendant: string | undefined;
10 | selectedDescendant: string | undefined;
11 | inputID: string;
12 | labelID: string;
13 | optionsID: string;
14 | anchor?: HTMLElement | null;
15 | inputHovering: boolean;
16 | optionsHovering: boolean;
17 | }
18 |
19 | export const ComboboxContext = createContext();
20 |
21 | export function useComboboxContext(componentName: string): ComboboxContextData {
22 | const context = useContext(ComboboxContext);
23 | assert(
24 | context,
25 | new Error(`<${componentName}> must be used inside a `),
26 | );
27 | return context;
28 | }
29 |
30 | export function createComboboxOptionFocusNavigator(): FocusNavigator {
31 | return new FocusNavigator(createUniqueId(), {
32 | virtual: true,
33 | base: MATCHES_NODE,
34 | });
35 | }
36 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/combobox/ComboboxLabel.ts:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { mergeProps } from 'solid-js';
3 | import { omitProps } from 'solid-use/props';
4 | import { useAutocompleteState } from '../../states/create-autocomplete-state';
5 | import { useDisclosureState } from '../../states/create-disclosure-state';
6 | import createDynamic from '../../utils/create-dynamic';
7 | import type {
8 | DynamicProps,
9 | HeadlessProps,
10 | ValidConstructor,
11 | } from '../../utils/dynamic-prop';
12 | import {
13 | createDisabledState,
14 | createExpandedState,
15 | createHasActiveState,
16 | createHasQueryState,
17 | createHasSelectedState,
18 | } from '../../utils/state-props';
19 | import { useComboboxContext } from './ComboboxContext';
20 | import { COMBOBOX_LABEL_TAG } from './tags';
21 |
22 | export type ComboboxLabelProps =
23 | HeadlessProps;
24 |
25 | export function ComboboxLabel(
26 | props: ComboboxLabelProps,
27 | ): JSX.Element {
28 | const context = useComboboxContext('ComboboxLabel');
29 | const autocompleteState = useAutocompleteState();
30 | const disclosureState = useDisclosureState();
31 |
32 | return createDynamic(
33 | () => props.as || ('label' as T),
34 | mergeProps(
35 | omitProps(props, ['as']),
36 | COMBOBOX_LABEL_TAG,
37 | {
38 | id: context.labelID,
39 | },
40 | createDisabledState(() => autocompleteState.disabled()),
41 | createExpandedState(() => disclosureState.isOpen()),
42 | createHasSelectedState(() => autocompleteState.hasSelected()),
43 | createHasActiveState(() => autocompleteState.hasActive()),
44 | createHasQueryState(() => autocompleteState.hasQuery()),
45 | ) as DynamicProps,
46 | );
47 | }
48 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/combobox/index.ts:
--------------------------------------------------------------------------------
1 | export * from './Combobox';
2 | export * from './ComboboxInput';
3 | export * from './ComboboxLabel';
4 | export * from './ComboboxOption';
5 | export * from './ComboboxOptions';
6 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/combobox/tags.ts:
--------------------------------------------------------------------------------
1 | import { createTag } from '../../utils/namespace';
2 |
3 | export const COMBOBOX_TAG = createTag('combobox');
4 | export const COMBOBOX_INPUT_TAG = createTag('combobox-input');
5 | export const COMBOBOX_OPTIONS_TAG = createTag('combobox-options');
6 | export const COMBOBOX_OPTION_TAG = createTag('combobox-option');
7 | export const COMBOBOX_LABEL_TAG = createTag('combobox-label');
8 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/command-bar/CommandBarContext.ts:
--------------------------------------------------------------------------------
1 | import { createContext, useContext } from 'solid-js';
2 | import assert from '../../utils/assert';
3 |
4 | interface CommandBarContextData {
5 | ownerID: string;
6 | panelID: string;
7 | titleID: string;
8 | descriptionID: string;
9 | onOpen?: () => void;
10 | onClose?: () => void;
11 | }
12 |
13 | export const CommandBarContext = createContext();
14 |
15 | export function useCommandBarContext(
16 | componentName: string,
17 | ): CommandBarContextData {
18 | const context = useContext(CommandBarContext);
19 | assert(
20 | context,
21 | new Error(`<${componentName}> must be used inside a `),
22 | );
23 | return context;
24 | }
25 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/command-bar/CommandBarDescription.ts:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { createComponent, mergeProps } from 'solid-js';
3 | import { omitProps } from 'solid-use/props';
4 | import type { DisclosureStateRenderProps } from '../../states/create-disclosure-state';
5 | import {
6 | DisclosureStateChild,
7 | useDisclosureState,
8 | } from '../../states/create-disclosure-state';
9 | import createDynamic from '../../utils/create-dynamic';
10 | import type {
11 | DynamicProps,
12 | HeadlessProps,
13 | ValidConstructor,
14 | } from '../../utils/dynamic-prop';
15 | import {
16 | createDisabledState,
17 | createExpandedState,
18 | } from '../../utils/state-props';
19 | import { useCommandBarContext } from './CommandBarContext';
20 | import { COMMAND_BAR_DESCRIPTION_TAG } from './tags';
21 |
22 | export type CommandBarDescriptionProps =
23 | HeadlessProps;
24 |
25 | export function CommandBarDescription(
26 | props: CommandBarDescriptionProps,
27 | ): JSX.Element {
28 | const context = useCommandBarContext('CommandBarDescription');
29 | const state = useDisclosureState();
30 | return createDynamic(
31 | () => props.as || ('p' as T),
32 | mergeProps(
33 | omitProps(props, ['as', 'children']),
34 | COMMAND_BAR_DESCRIPTION_TAG,
35 | {
36 | id: context.descriptionID,
37 | get children() {
38 | return createComponent(DisclosureStateChild, {
39 | get children() {
40 | return props.children;
41 | },
42 | });
43 | },
44 | },
45 | createDisabledState(() => state.disabled()),
46 | createExpandedState(() => state.isOpen()),
47 | ) as DynamicProps,
48 | );
49 | }
50 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/command-bar/CommandBarOverlay.ts:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { createComponent, createEffect, mergeProps } from 'solid-js';
3 | import { omitProps } from 'solid-use/props';
4 | import type { DisclosureStateRenderProps } from '../../states/create-disclosure-state';
5 | import {
6 | DisclosureStateChild,
7 | useDisclosureState,
8 | } from '../../states/create-disclosure-state';
9 | import createDynamic from '../../utils/create-dynamic';
10 | import type {
11 | DynamicProps,
12 | HeadlessPropsWithRef,
13 | ValidConstructor,
14 | } from '../../utils/dynamic-prop';
15 | import { createForwardRef } from '../../utils/dynamic-prop';
16 | import {
17 | createDisabledState,
18 | createExpandedState,
19 | } from '../../utils/state-props';
20 | import useEventListener from '../../utils/use-event-listener';
21 | import { useCommandBarContext } from './CommandBarContext';
22 | import { COMMAND_BAR_OVERLAY_TAG } from './tags';
23 |
24 | export type CommandBarOverlayProps =
25 | HeadlessPropsWithRef;
26 |
27 | export function CommandBarOverlay(
28 | props: CommandBarOverlayProps,
29 | ): JSX.Element {
30 | useCommandBarContext('CommandBarOverlay');
31 | const state = useDisclosureState();
32 |
33 | const [internalRef, setInternalRef] = createForwardRef(props);
34 |
35 | createEffect(() => {
36 | const current = internalRef();
37 | if (current instanceof HTMLElement) {
38 | useEventListener(current, 'click', () => {
39 | state.close();
40 | });
41 | }
42 | });
43 |
44 | return createDynamic(
45 | () => props.as || ('div' as T),
46 | mergeProps(
47 | omitProps(props, ['as', 'children', 'ref']),
48 | COMMAND_BAR_OVERLAY_TAG,
49 | {
50 | ref: setInternalRef,
51 | get children() {
52 | return createComponent(DisclosureStateChild, {
53 | get children() {
54 | return props.children;
55 | },
56 | });
57 | },
58 | },
59 | createDisabledState(() => state.disabled()),
60 | createExpandedState(() => state.isOpen()),
61 | ) as DynamicProps,
62 | );
63 | }
64 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/command-bar/CommandBarTitle.ts:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { createComponent, mergeProps } from 'solid-js';
3 | import { omitProps } from 'solid-use/props';
4 | import type { DisclosureStateRenderProps } from '../../states/create-disclosure-state';
5 | import {
6 | DisclosureStateChild,
7 | useDisclosureState,
8 | } from '../../states/create-disclosure-state';
9 | import createDynamic from '../../utils/create-dynamic';
10 | import type {
11 | DynamicProps,
12 | HeadlessProps,
13 | ValidConstructor,
14 | } from '../../utils/dynamic-prop';
15 | import {
16 | createDisabledState,
17 | createExpandedState,
18 | } from '../../utils/state-props';
19 | import { useCommandBarContext } from './CommandBarContext';
20 | import { COMMAND_BAR_TITLE_TAG } from './tags';
21 |
22 | export type CommandBarTitleProps =
23 | HeadlessProps;
24 |
25 | export function CommandBarTitle(
26 | props: CommandBarTitleProps,
27 | ): JSX.Element {
28 | const context = useCommandBarContext('CommandBarTitle');
29 | const state = useDisclosureState();
30 | return createDynamic(
31 | () => props.as || ('h2' as T),
32 | mergeProps(
33 | omitProps(props, ['as', 'children']),
34 | COMMAND_BAR_TITLE_TAG,
35 | {
36 | id: context.titleID,
37 | get children() {
38 | return createComponent(DisclosureStateChild, {
39 | get children() {
40 | return props.children;
41 | },
42 | });
43 | },
44 | },
45 | createDisabledState(() => state.disabled()),
46 | createExpandedState(() => state.isOpen()),
47 | ) as DynamicProps,
48 | );
49 | }
50 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/command-bar/index.ts:
--------------------------------------------------------------------------------
1 | export * from './CommandBar';
2 | export * from './CommandBarDescription';
3 | export * from './CommandBarOverlay';
4 | export * from './CommandBarPanel';
5 | export * from './CommandBarTitle';
6 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/command-bar/tags.ts:
--------------------------------------------------------------------------------
1 | import { createTag } from '../../utils/namespace';
2 |
3 | export const COMMAND_BAR_TAG = createTag('command-bar');
4 | export const COMMAND_BAR_DESCRIPTION_TAG = createTag('command-bar-description');
5 | export const COMMAND_BAR_OVERLAY_TAG = createTag('command-bar-overlay');
6 | export const COMMAND_BAR_PANEL_TAG = createTag('command-bar-panel');
7 | export const COMMAND_BAR_TITLE_TAG = createTag('command-bar-title');
8 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/command/CommandContext.ts:
--------------------------------------------------------------------------------
1 | import { createContext, createUniqueId, useContext } from 'solid-js';
2 | import assert from '../../utils/assert';
3 | import FocusNavigator from '../../utils/focus-navigator';
4 | import { MATCHES_NODE } from '../../utils/namespace';
5 |
6 | interface CommandContextData {
7 | multiple: boolean;
8 | controller: FocusNavigator;
9 | activeDescendant: string | undefined;
10 | selectedDescendant: string | undefined;
11 | inputID: string;
12 | labelID: string;
13 | optionsID: string;
14 | anchor?: HTMLElement | null;
15 | optionsHovering: boolean;
16 | }
17 |
18 | export const CommandContext = createContext();
19 |
20 | export function useCommandContext(componentName: string): CommandContextData {
21 | const context = useContext(CommandContext);
22 | assert(
23 | context,
24 | new Error(`<${componentName}> must be used inside a `),
25 | );
26 | return context;
27 | }
28 |
29 | export function createCommandOptionFocusNavigator(): FocusNavigator {
30 | return new FocusNavigator(createUniqueId(), {
31 | virtual: true,
32 | base: MATCHES_NODE,
33 | });
34 | }
35 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/command/CommandLabel.ts:
--------------------------------------------------------------------------------
1 | import type { JSX } from 'solid-js';
2 | import { mergeProps } from 'solid-js';
3 | import { omitProps } from 'solid-use/props';
4 | import { useAutocompleteState } from '../../states/create-autocomplete-state';
5 | import createDynamic from '../../utils/create-dynamic';
6 | import type {
7 | DynamicProps,
8 | HeadlessProps,
9 | ValidConstructor,
10 | } from '../../utils/dynamic-prop';
11 | import {
12 | createDisabledState,
13 | createHasActiveState,
14 | createHasQueryState,
15 | createHasSelectedState,
16 | } from '../../utils/state-props';
17 | import { useCommandContext } from './CommandContext';
18 | import { COMMAND_LABEL_TAG } from './tags';
19 |
20 | export type CommandLabelProps =
21 | HeadlessProps;
22 |
23 | export function CommandLabel(
24 | props: CommandLabelProps,
25 | ): JSX.Element {
26 | const context = useCommandContext('CommandLabel');
27 | const state = useAutocompleteState();
28 |
29 | return createDynamic(
30 | () => props.as || ('label' as T),
31 | mergeProps(
32 | omitProps(props, ['as']),
33 | COMMAND_LABEL_TAG,
34 | {
35 | id: context.labelID,
36 | },
37 | createDisabledState(() => state.disabled()),
38 | createHasSelectedState(() => state.hasSelected()),
39 | createHasActiveState(() => state.hasActive()),
40 | createHasQueryState(() => state.hasQuery()),
41 | ) as DynamicProps,
42 | );
43 | }
44 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/command/index.ts:
--------------------------------------------------------------------------------
1 | export * from './Command';
2 | export * from './CommandInput';
3 | export * from './CommandLabel';
4 | export * from './CommandOption';
5 | export * from './CommandOptions';
6 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/command/tags.ts:
--------------------------------------------------------------------------------
1 | import { createTag } from '../../utils/namespace';
2 |
3 | export const COMMAND_TAG = createTag('command');
4 | export const COMMAND_INPUT_TAG = createTag('command-input');
5 | export const COMMAND_OPTIONS_TAG = createTag('command-options');
6 | export const COMMAND_OPTION_TAG = createTag('command-option');
7 | export const COMMAND_LABEL_TAG = createTag('command-label');
8 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/context-menu/ContextMenuContext.ts:
--------------------------------------------------------------------------------
1 | import { createContext, useContext } from 'solid-js';
2 | import assert from '../../utils/assert';
3 |
4 | interface ContextMenuContextData {
5 | ownerID: string;
6 | boundaryID: string;
7 | panelID: string;
8 | anchor?: HTMLElement | null;
9 | }
10 |
11 | export const ContextMenuContext = createContext();
12 |
13 | export function useContextMenuContext(
14 | componentName: string,
15 | ): ContextMenuContextData {
16 | const context = useContext(ContextMenuContext);
17 | assert(
18 | context,
19 | new Error(`<${componentName}> must be used inside a `),
20 | );
21 | return context;
22 | }
23 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/context-menu/index.ts:
--------------------------------------------------------------------------------
1 | export * from './ContextMenu';
2 | export * from './ContextMenuBoundary';
3 | export * from './ContextMenuOverlay';
4 | export * from './ContextMenuPanel';
5 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/context-menu/tags.ts:
--------------------------------------------------------------------------------
1 | import { createTag } from '../../utils/namespace';
2 |
3 | export const CONTEXT_MENU_TAG = createTag('context-menu');
4 | export const CONTEXT_MENU_BOUNDARY_TAG = createTag('context-menu-boundary');
5 | export const CONTEXT_MENU_OVERLAY_TAG = createTag('context-menu-overlay');
6 | export const CONTEXT_MENU_PANEL_TAG = createTag('context-menu-panel');
7 |
--------------------------------------------------------------------------------
/packages/terracotta/src/components/dialog/DialogContext.ts:
--------------------------------------------------------------------------------
1 | import { createContext, useContext } from 'solid-js';
2 | import assert from '../../utils/assert';
3 |
4 | interface DialogContextData {
5 | ownerID: string;
6 | panelID: string;
7 | titleID: string;
8 | descriptionID: string;
9 | }
10 |
11 | export const DialogContext = createContext();
12 |
13 | export function useDialogContext(componentName: string): DialogContextData {
14 | const context = useContext(DialogContext);
15 | assert(
16 | context,
17 | new Error(`<${componentName}> must be used inside a