shapes-ui 0.4.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug_report.yml +47 -0
- package/.github/ISSUE_TEMPLATE/config.yml +1 -0
- package/.github/ISSUE_TEMPLATE/feature_request.yml +31 -0
- package/.github/pull_request_template.md +14 -0
- package/.github/workflows/pr-preview.yml +75 -0
- package/.github/workflows/release.yml +8 -0
- package/CHANGELOG.md +30 -0
- package/CODE_OF_CONDUCT.md +41 -0
- package/CONTRIBUTING.md +52 -0
- package/README.md +18 -0
- package/SECURITY.md +0 -0
- package/content/components/accordion.mdx +13 -0
- package/content/components/alert-dialog.mdx +34 -0
- package/content/components/autocomplete.mdx +62 -0
- package/content/components/avatar.mdx +11 -0
- package/content/components/button.mdx +8 -0
- package/content/components/checkbox.mdx +11 -0
- package/content/components/collapsible.mdx +11 -0
- package/content/components/combobox.mdx +33 -0
- package/content/components/context-menu.mdx +29 -0
- package/content/components/dialog.mdx +33 -0
- package/content/components/drawer.mdx +38 -0
- package/content/components/field.mdx +23 -2
- package/content/components/fieldset.mdx +11 -1
- package/content/components/form.mdx +8 -0
- package/content/components/input.mdx +4 -0
- package/content/components/menu.mdx +27 -0
- package/content/components/menubar.mdx +31 -0
- package/content/components/meter.mdx +14 -0
- package/content/components/navigation-menu.mdx +28 -0
- package/content/components/number-field.mdx +25 -0
- package/content/components/popover.mdx +22 -0
- package/content/components/preview-card.mdx +14 -2
- package/content/components/progress.mdx +15 -1
- package/content/components/radio.mdx +31 -0
- package/content/components/scroll-area.mdx +23 -0
- package/content/components/select.mdx +57 -0
- package/content/components/separator.mdx +29 -0
- package/content/components/slider.mdx +52 -0
- package/content/components/switch.mdx +30 -0
- package/content/components/tabs.mdx +47 -0
- package/content/components/toast.mdx +70 -0
- package/content/components/toggle-group.mdx +37 -0
- package/content/components/toggle.mdx +46 -2
- package/content/components/toolbar.mdx +48 -0
- package/content/components/tooltip.mdx +38 -0
- package/content/docs/installation.mdx +30 -0
- package/content-collections.ts +65 -1
- package/dist/cli.js +947 -101
- package/examples/__index.tsx +320 -66
- package/examples/autocomplete-align.tsx +39 -0
- package/examples/autocomplete-controlled.tsx +44 -0
- package/examples/autocomplete-groups.tsx +65 -0
- package/examples/autocomplete-no-clear.tsx +40 -0
- package/examples/avatar-demo.tsx +3 -3
- package/examples/checkbox-demo.tsx +1 -1
- package/examples/checkbox-form.tsx +3 -3
- package/examples/field-custom-control.tsx +33 -9
- package/examples/form-demo.tsx +5 -10
- package/examples/input-group-with-button.tsx +1 -1
- package/examples/menu-advanced.tsx +1 -3
- package/examples/menu-align.tsx +19 -16
- package/examples/menu-checkbox.tsx +2 -3
- package/examples/menu-demo.tsx +1 -3
- package/examples/menu-group.tsx +1 -3
- package/examples/menu-radio.tsx +1 -3
- package/examples/menu-submenu.tsx +2 -3
- package/examples/meter-demo.tsx +10 -2
- package/examples/meter-flip.tsx +8 -8
- package/examples/meter-no-label.tsx +9 -2
- package/examples/meter-no-value.tsx +7 -8
- package/examples/radio-card.tsx +28 -0
- package/examples/radio-demo.tsx +19 -1
- package/examples/radio-description.tsx +26 -0
- package/examples/radio-orientation.tsx +21 -0
- package/examples/select-alignment.tsx +51 -0
- package/examples/select-demo.tsx +36 -1
- package/examples/select-disabled.tsx +38 -0
- package/examples/select-groups.tsx +54 -0
- package/examples/select-invalid.tsx +41 -0
- package/examples/select-scrollable.tsx +112 -0
- package/examples/separator-demo.tsx +13 -0
- package/examples/separator-horizontal.tsx +18 -0
- package/examples/slider-controlled.tsx +28 -0
- package/examples/slider-demo.tsx +3 -1
- package/examples/slider-disabled.tsx +7 -0
- package/examples/slider-edge.tsx +13 -0
- package/examples/slider-multiple.tsx +7 -0
- package/examples/slider-range.tsx +5 -0
- package/examples/slider-vertical.tsx +10 -0
- package/examples/switch-demo.tsx +19 -1
- package/examples/switch-disabled.tsx +20 -0
- package/examples/switch-sizes.tsx +24 -0
- package/examples/switch-with-label.tsx +16 -0
- package/examples/tabs-demo.tsx +14 -1
- package/examples/tabs-disabled.tsx +21 -0
- package/examples/tabs-line.tsx +18 -0
- package/examples/tabs-vertical.tsx +13 -0
- package/examples/toast-action.tsx +39 -0
- package/examples/toast-anchored.tsx +36 -0
- package/examples/toast-demo.tsx +27 -1
- package/examples/toast-positions.tsx +54 -0
- package/examples/toast-promise.tsx +51 -0
- package/examples/toast-stacked.tsx +30 -0
- package/examples/toast-timeout.tsx +43 -0
- package/examples/toast-update.tsx +38 -0
- package/examples/toast-variants.tsx +54 -0
- package/examples/toggle-controlled.tsx +20 -0
- package/examples/toggle-demo.tsx +7 -51
- package/examples/toggle-group-demo.tsx +19 -0
- package/examples/toggle-group-multiple.tsx +19 -0
- package/examples/toggle-icon-fill.tsx +12 -0
- package/examples/toolbar-demo.tsx +45 -21
- package/examples/toolbar-input-link.tsx +35 -0
- package/examples/toolbar-menu.tsx +53 -0
- package/examples/tooltip-demo.tsx +48 -0
- package/examples/tooltip-positions.tsx +60 -0
- package/package.json +19 -18
- package/public/base-ui.svg +1 -0
- package/public/r/drawer.json +1 -1
- package/public/r/field.json +1 -1
- package/public/r/meter.json +1 -1
- package/public/r/number-field.json +1 -1
- package/public/r/progress.json +1 -1
- package/public/r/radio.json +1 -1
- package/public/r/select.json +1 -1
- package/public/r/slider.json +1 -1
- package/public/r/switch.json +1 -1
- package/public/r/tabs.json +1 -1
- package/public/r/toast.json +2 -1
- package/public/r/toggle.json +1 -1
- package/public/r/toolbar.json +1 -1
- package/public/r/tooltip.json +15 -0
- package/src/assets/base-ui.svg +1 -0
- package/src/commands/add.ts +79 -38
- package/src/commands/cli.ts +50 -3
- package/src/commands/create.ts +262 -0
- package/src/commands/init.ts +45 -12
- package/src/commands/palette.ts +55 -0
- package/src/components/docs/layout/footer.tsx +2 -2
- package/src/components/docs/layout/header.tsx +7 -19
- package/src/components/docs/layout/mobile-menu.tsx +26 -78
- package/src/components/docs/layout/nav-list.tsx +27 -21
- package/src/components/docs/layout/page-header.tsx +52 -7
- package/src/components/docs/layout/split-layout.tsx +11 -9
- package/src/components/docs/layout/table-of-content.tsx +145 -0
- package/src/components/docs/markdown/components.tsx +142 -29
- package/src/components/docs/markdown/copy-button.tsx +41 -0
- package/src/components/docs/markdown/installation-block.tsx +5 -24
- package/src/components/docs/markdown/render-preview.tsx +1 -1
- package/src/components/ui/badge.tsx +1 -1
- package/src/components/ui/button-group.tsx +1 -1
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/drawer.tsx +1 -1
- package/src/components/ui/field.tsx +9 -28
- package/src/components/ui/form.tsx +1 -1
- package/src/components/ui/meter.tsx +12 -26
- package/src/components/ui/number-field.tsx +1 -1
- package/src/components/ui/radio.tsx +32 -19
- package/src/components/ui/scroll-area.tsx +11 -2
- package/src/components/ui/select.tsx +6 -6
- package/src/components/ui/slider.tsx +8 -5
- package/src/components/ui/switch.tsx +13 -17
- package/src/components/ui/tabs.tsx +23 -10
- package/src/components/ui/toast.tsx +190 -29
- package/src/components/ui/toggle.tsx +1 -1
- package/src/components/ui/toolbar.tsx +17 -4
- package/src/components/ui/tooltip.tsx +54 -0
- package/src/lib/docs-headings.ts +72 -0
- package/src/routeTree.gen.ts +60 -3
- package/src/routes/__root.tsx +3 -5
- package/src/routes/components.$slug.tsx +20 -4
- package/src/routes/docs.$slug.tsx +78 -0
- package/src/routes/docs.tsx +15 -0
- package/src/styles/styles.css +1 -1
- package/src/utils/cli-utils.ts +8 -8
- package/src/utils/dependency-installer.ts +30 -0
- package/src/utils/package-manager.ts +4 -4
- package/src/utils/palette.ts +666 -0
- package/src/utils/schema.ts +6 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report a reproducible bug in Shapes UI
|
|
3
|
+
title: "[Bug]: "
|
|
4
|
+
labels:
|
|
5
|
+
- bug
|
|
6
|
+
body:
|
|
7
|
+
- type: markdown
|
|
8
|
+
attributes:
|
|
9
|
+
value: |
|
|
10
|
+
Thanks for filing a bug report.
|
|
11
|
+
- type: input
|
|
12
|
+
id: summary
|
|
13
|
+
attributes:
|
|
14
|
+
label: Summary
|
|
15
|
+
description: Short description of the bug
|
|
16
|
+
placeholder: Button variant "ghost" has wrong text color
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
- type: textarea
|
|
20
|
+
id: steps
|
|
21
|
+
attributes:
|
|
22
|
+
label: Steps to reproduce
|
|
23
|
+
description: Exact steps so we can reproduce reliably
|
|
24
|
+
placeholder: |
|
|
25
|
+
1. Go to ...
|
|
26
|
+
2. Click ...
|
|
27
|
+
3. See error ...
|
|
28
|
+
validations:
|
|
29
|
+
required: true
|
|
30
|
+
- type: textarea
|
|
31
|
+
id: expected
|
|
32
|
+
attributes:
|
|
33
|
+
label: Expected behavior
|
|
34
|
+
validations:
|
|
35
|
+
required: true
|
|
36
|
+
- type: textarea
|
|
37
|
+
id: actual
|
|
38
|
+
attributes:
|
|
39
|
+
label: Actual behavior
|
|
40
|
+
validations:
|
|
41
|
+
required: true
|
|
42
|
+
- type: input
|
|
43
|
+
id: environment
|
|
44
|
+
attributes:
|
|
45
|
+
label: Environment
|
|
46
|
+
description: OS, browser, package manager, Node.js version
|
|
47
|
+
placeholder: macOS 15, Chrome 141, pnpm 9, Node 24
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Propose an improvement or new component
|
|
3
|
+
title: "[Feature]: "
|
|
4
|
+
labels:
|
|
5
|
+
- enhancement
|
|
6
|
+
body:
|
|
7
|
+
- type: input
|
|
8
|
+
id: problem
|
|
9
|
+
attributes:
|
|
10
|
+
label: Problem to solve
|
|
11
|
+
description: What problem are you trying to solve?
|
|
12
|
+
placeholder: I need a compact tooltip pattern for dense UIs
|
|
13
|
+
validations:
|
|
14
|
+
required: true
|
|
15
|
+
- type: textarea
|
|
16
|
+
id: proposal
|
|
17
|
+
attributes:
|
|
18
|
+
label: Proposed solution
|
|
19
|
+
description: Describe the API/UX you expect
|
|
20
|
+
validations:
|
|
21
|
+
required: true
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: alternatives
|
|
24
|
+
attributes:
|
|
25
|
+
label: Alternatives considered
|
|
26
|
+
description: Any alternatives or workarounds you tried?
|
|
27
|
+
- type: textarea
|
|
28
|
+
id: additional
|
|
29
|
+
attributes:
|
|
30
|
+
label: Additional context
|
|
31
|
+
description: Links, mockups, examples, prior art
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: PR Preview
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types:
|
|
6
|
+
- opened
|
|
7
|
+
- reopened
|
|
8
|
+
- synchronize
|
|
9
|
+
pull_request_target:
|
|
10
|
+
types:
|
|
11
|
+
- closed
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: pr-preview-${{ github.event.pull_request.number }}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
deploy-preview:
|
|
19
|
+
name: Deploy Preview
|
|
20
|
+
if: github.event_name == 'pull_request' && github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
permissions:
|
|
23
|
+
contents: read
|
|
24
|
+
pull-requests: write
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout Repo
|
|
27
|
+
uses: actions/checkout@v4
|
|
28
|
+
|
|
29
|
+
- name: Setup Node.js 24
|
|
30
|
+
uses: actions/setup-node@v4
|
|
31
|
+
with:
|
|
32
|
+
node-version: 24
|
|
33
|
+
|
|
34
|
+
- name: Install pnpm
|
|
35
|
+
uses: pnpm/action-setup@v3
|
|
36
|
+
with:
|
|
37
|
+
version: 9
|
|
38
|
+
|
|
39
|
+
- name: Install Dependencies
|
|
40
|
+
run: pnpm install --frozen-lockfile
|
|
41
|
+
|
|
42
|
+
- name: Deploy Preview Worker
|
|
43
|
+
uses: cloudflare/wrangler-action@v3
|
|
44
|
+
with:
|
|
45
|
+
wranglerVersion: "4"
|
|
46
|
+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
47
|
+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
48
|
+
command: "deploy --name shapes-ui-pr-${{ github.event.pull_request.number }}"
|
|
49
|
+
|
|
50
|
+
- name: Comment Preview URL
|
|
51
|
+
uses: marocchino/sticky-pull-request-comment@v2
|
|
52
|
+
with:
|
|
53
|
+
header: preview-url
|
|
54
|
+
message: |
|
|
55
|
+
Preview deployed
|
|
56
|
+
|
|
57
|
+
https://shapes-ui-pr-${{ github.event.pull_request.number }}.workers.dev
|
|
58
|
+
|
|
59
|
+
cleanup-preview:
|
|
60
|
+
name: Cleanup Preview
|
|
61
|
+
if: github.event_name == 'pull_request_target' && github.event.action == 'closed'
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
permissions:
|
|
64
|
+
contents: read
|
|
65
|
+
steps:
|
|
66
|
+
- name: Delete Preview Worker
|
|
67
|
+
uses: cloudflare/wrangler-action@v3
|
|
68
|
+
env:
|
|
69
|
+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
70
|
+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
71
|
+
with:
|
|
72
|
+
wranglerVersion: "4"
|
|
73
|
+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
74
|
+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
75
|
+
command: "delete shapes-ui-pr-${{ github.event.pull_request.number }} --force"
|
|
@@ -44,3 +44,11 @@ jobs:
|
|
|
44
44
|
title: "chore: version packages"
|
|
45
45
|
env:
|
|
46
46
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
47
|
+
|
|
48
|
+
- name: Deploy Production Worker
|
|
49
|
+
if: steps.changesets.outputs.published == 'true'
|
|
50
|
+
uses: cloudflare/wrangler-action@v3
|
|
51
|
+
with:
|
|
52
|
+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
53
|
+
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
54
|
+
command: deploy
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# shapes-ui
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- dd156b6: UI updates, introduced anatomy and usage component
|
|
8
|
+
- d5f5a73: updated docs components, added table of content, updated scripting
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 26c581e: Updated styles
|
|
13
|
+
|
|
14
|
+
## 0.5.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- 7d13a9b: Added tooltip and examples
|
|
19
|
+
- 798be1a: Updated component examples and styles
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- 357a7eb: Switch style and exmaple updates
|
|
24
|
+
- 43bfe67: Updated toolbar and examples
|
|
25
|
+
- bc2c06c: UPdated select and select examples
|
|
26
|
+
- 84e7508: Updated toggle and toggle group styles and examples
|
|
27
|
+
- 1c68cea: Updated slider component and examples
|
|
28
|
+
- 46d5f5d: Updated mobile nav to use drawer cmpoennt
|
|
29
|
+
- 8fc90b8: Updated toast ui and examples
|
|
30
|
+
- 33459d3: Updated examples and dependencies
|
|
31
|
+
- 8ce682c: Updated tabs styles and examples
|
|
32
|
+
|
|
3
33
|
## 0.4.2
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our pledge
|
|
4
|
+
|
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone.
|
|
6
|
+
|
|
7
|
+
## Our standards
|
|
8
|
+
|
|
9
|
+
Examples of behavior that contributes to a positive environment:
|
|
10
|
+
|
|
11
|
+
- Being respectful and constructive
|
|
12
|
+
- Giving and accepting feedback gracefully
|
|
13
|
+
- Focusing on what is best for the community
|
|
14
|
+
- Showing empathy toward other people
|
|
15
|
+
|
|
16
|
+
Examples of unacceptable behavior:
|
|
17
|
+
|
|
18
|
+
- Harassment, discrimination, or personal attacks
|
|
19
|
+
- Trolling, insulting, or derogatory comments
|
|
20
|
+
- Public or private intimidation
|
|
21
|
+
- Publishing others' private information without permission
|
|
22
|
+
|
|
23
|
+
## Enforcement responsibilities
|
|
24
|
+
|
|
25
|
+
Project maintainers are responsible for clarifying and enforcing standards of acceptable behavior.
|
|
26
|
+
|
|
27
|
+
## Scope
|
|
28
|
+
|
|
29
|
+
This Code of Conduct applies in project spaces and in public spaces when an individual is representing the project.
|
|
30
|
+
|
|
31
|
+
## Reporting
|
|
32
|
+
|
|
33
|
+
To report violations, contact:
|
|
34
|
+
|
|
35
|
+
- **Email:** conduct@shapes-ui.dev
|
|
36
|
+
|
|
37
|
+
All reports will be reviewed and investigated promptly and fairly.
|
|
38
|
+
|
|
39
|
+
## Enforcement
|
|
40
|
+
|
|
41
|
+
Maintainers may take any action they deem appropriate in response to unacceptable behavior, including warning or temporary/permanent ban from participation.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Contributing to Shapes UI
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in contributing.
|
|
4
|
+
|
|
5
|
+
## Development setup
|
|
6
|
+
|
|
7
|
+
- Use Node.js 24+
|
|
8
|
+
- Use pnpm 9+
|
|
9
|
+
|
|
10
|
+
Install dependencies:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pnpm install
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Run locally:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pnpm dev
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Common commands
|
|
23
|
+
|
|
24
|
+
- `pnpm dev` — start local dev server
|
|
25
|
+
- `pnpm test` — run tests
|
|
26
|
+
- `pnpm lint` — run lint checks
|
|
27
|
+
- `pnpm build` — build app
|
|
28
|
+
- `pnpm build:cli` — build CLI
|
|
29
|
+
- `pnpm gen:examples` — generate examples
|
|
30
|
+
- `pnpm gen:registry` — generate registry artifacts
|
|
31
|
+
|
|
32
|
+
## Pull requests
|
|
33
|
+
|
|
34
|
+
Before opening a PR:
|
|
35
|
+
|
|
36
|
+
1. Keep changes focused and scoped.
|
|
37
|
+
2. Run `pnpm test` and `pnpm lint`.
|
|
38
|
+
3. Update docs/examples when behaviour changes.
|
|
39
|
+
4. Add a changeset when a publishable package change is intended.
|
|
40
|
+
|
|
41
|
+
PRs get a preview deployment automatically.
|
|
42
|
+
|
|
43
|
+
## Release process
|
|
44
|
+
|
|
45
|
+
Releases are handled through Changesets:
|
|
46
|
+
|
|
47
|
+
- A release PR is created from changesets.
|
|
48
|
+
- Production deployment runs when the release is published.
|
|
49
|
+
|
|
50
|
+
## Reporting issues
|
|
51
|
+
|
|
52
|
+
Use the issue templates for bug reports and feature requests so maintainers can triage quickly.
|
package/README.md
CHANGED
|
@@ -1 +1,19 @@
|
|
|
1
1
|
# Shapes UI
|
|
2
|
+
|
|
3
|
+
## CLI
|
|
4
|
+
|
|
5
|
+
- Create a new app: `npx shapes-ui create my-app`
|
|
6
|
+
- Create and install deps: `npx shapes-ui create my-app --install`
|
|
7
|
+
- Full setup in one step: `npx shapes-ui create my-app --full`
|
|
8
|
+
- Full setup with style: `npx shapes-ui create my-app --full --style brutalist`
|
|
9
|
+
- Full setup with palette: `npx shapes-ui create my-app --full --palette emerald --contrast-mode dynamic`
|
|
10
|
+
- Full setup with paths: `npx shapes-ui create my-app --full --ui-path ./src/ui --css-path src/styles/globals.css`
|
|
11
|
+
- Initialize in an existing project: `npx shapes-ui init`
|
|
12
|
+
- Change palette later: `npx shapes-ui palette set rose --contrast-mode deterministic`
|
|
13
|
+
- Add specific components: `npx shapes-ui add button card`
|
|
14
|
+
- Add all components: `npx shapes-ui add --all`
|
|
15
|
+
|
|
16
|
+
## Community
|
|
17
|
+
|
|
18
|
+
- [Contributing guide](CONTRIBUTING.md)
|
|
19
|
+
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
package/SECURITY.md
ADDED
|
File without changes
|
|
@@ -10,6 +10,19 @@ description: Expandable sections that reveal content one at a time, or multiple
|
|
|
10
10
|
|
|
11
11
|
<InstallationBlock name="accordion" />
|
|
12
12
|
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
<UsageSection
|
|
16
|
+
from="@/components/ui/accordion"
|
|
17
|
+
imports={["Accordion", "AccordionItem", "AccordionTrigger", "AccordionPanel"]}
|
|
18
|
+
anatomy={`<Accordion>
|
|
19
|
+
<AccordionItem>
|
|
20
|
+
<AccordionTrigger />
|
|
21
|
+
<AccordionPanel />
|
|
22
|
+
</AccordionItem>
|
|
23
|
+
</Accordion>;`}
|
|
24
|
+
/>
|
|
25
|
+
|
|
13
26
|
## Examples
|
|
14
27
|
|
|
15
28
|
### Default
|
|
@@ -10,6 +10,40 @@ description: A modal dialog that interrupts the user with important content and
|
|
|
10
10
|
|
|
11
11
|
<InstallationBlock name="alert-dialog" />
|
|
12
12
|
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
<UsageSection
|
|
16
|
+
from="@/components/ui/alert-dialog"
|
|
17
|
+
imports={[
|
|
18
|
+
"AlertDialog",
|
|
19
|
+
"AlertDialogAction",
|
|
20
|
+
"AlertDialogCancel",
|
|
21
|
+
"AlertDialogPopup",
|
|
22
|
+
"AlertDialogDescription",
|
|
23
|
+
"AlertDialogFooter",
|
|
24
|
+
"AlertDialogHeader",
|
|
25
|
+
"AlertDialogMedia",
|
|
26
|
+
"AlertDialogOverlay",
|
|
27
|
+
"AlertDialogPortal",
|
|
28
|
+
"AlertDialogTitle",
|
|
29
|
+
"AlertDialogTrigger",
|
|
30
|
+
]}
|
|
31
|
+
anatomy={`<AlertDialog>
|
|
32
|
+
<AlertDialogTrigger />
|
|
33
|
+
<AlertDialogPopup>
|
|
34
|
+
<AlertDialogHeader>
|
|
35
|
+
<AlertDialogMedia />
|
|
36
|
+
<AlertDialogTitle />
|
|
37
|
+
<AlertDialogDescription />
|
|
38
|
+
</AlertDialogHeader>
|
|
39
|
+
<AlertDialogFooter>
|
|
40
|
+
<AlertDialogCancel />
|
|
41
|
+
<AlertDialogAction />
|
|
42
|
+
</AlertDialogFooter>
|
|
43
|
+
</AlertDialogPopup>
|
|
44
|
+
</AlertDialog>;`}
|
|
45
|
+
/>
|
|
46
|
+
|
|
13
47
|
## Examples
|
|
14
48
|
|
|
15
49
|
### Default
|
|
@@ -10,8 +10,70 @@ description: Input field with autocomplete functionality and dropdown list of fi
|
|
|
10
10
|
|
|
11
11
|
<InstallationBlock name="autocomplete" />
|
|
12
12
|
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
<UsageSection
|
|
16
|
+
from="@/components/ui/autocomplete"
|
|
17
|
+
imports={[
|
|
18
|
+
"Autocomplete",
|
|
19
|
+
"AutocompleteValue",
|
|
20
|
+
"AutocompleteInput",
|
|
21
|
+
"AutocompleteTrigger",
|
|
22
|
+
"AutocompleteClear",
|
|
23
|
+
"AutocompletePopup",
|
|
24
|
+
"AutocompleteItem",
|
|
25
|
+
"AutocompleteEmpty",
|
|
26
|
+
"AutocompleteList",
|
|
27
|
+
"AutocompleteGroup",
|
|
28
|
+
"AutocompleteGroupLabel",
|
|
29
|
+
"AutocompleteSeparator",
|
|
30
|
+
]}
|
|
31
|
+
anatomy={`<Autocomplete>
|
|
32
|
+
<AutocompleteInput />
|
|
33
|
+
<AutocompleteTrigger />
|
|
34
|
+
<AutocompleteClear />
|
|
35
|
+
<AutocompleteValue />
|
|
36
|
+
|
|
37
|
+
<AutocompletePopup>
|
|
38
|
+
<AutocompleteEmpty />
|
|
39
|
+
<AutocompleteList>
|
|
40
|
+
<AutocompleteGroup>
|
|
41
|
+
<AutocompleteGroupLabel />
|
|
42
|
+
<AutocompleteItem />
|
|
43
|
+
</AutocompleteGroup>
|
|
44
|
+
<AutocompleteSeparator />
|
|
45
|
+
</AutocompleteList>
|
|
46
|
+
</AutocompletePopup>
|
|
47
|
+
|
|
48
|
+
</Autocomplete>;`}
|
|
49
|
+
/>
|
|
50
|
+
|
|
13
51
|
## Examples
|
|
14
52
|
|
|
53
|
+
### Groups
|
|
54
|
+
|
|
55
|
+
Use grouped sections with labels and separators for larger lists.
|
|
56
|
+
|
|
57
|
+
<RenderPreview name="autocomplete-groups" />
|
|
58
|
+
|
|
59
|
+
### No Clear Button
|
|
60
|
+
|
|
61
|
+
Set `showClearButton={false}` to hide the clear action.
|
|
62
|
+
|
|
63
|
+
<RenderPreview name="autocomplete-no-clear" />
|
|
64
|
+
|
|
65
|
+
### Popup Alignment
|
|
66
|
+
|
|
67
|
+
Control popup position with `align`, `side`, and offset props.
|
|
68
|
+
|
|
69
|
+
<RenderPreview name="autocomplete-align" />
|
|
70
|
+
|
|
71
|
+
### Controlled Value
|
|
72
|
+
|
|
73
|
+
Use `value` and `onValueChange` to manage the selected value externally.
|
|
74
|
+
|
|
75
|
+
<RenderPreview name="autocomplete-controlled" />
|
|
76
|
+
|
|
15
77
|
### Demo
|
|
16
78
|
|
|
17
79
|
<RenderPreview name="autocomplete-demo" />
|
|
@@ -10,6 +10,17 @@ description: Profile image component with fallback for missing images or initial
|
|
|
10
10
|
|
|
11
11
|
<InstallationBlock name="avatar" />
|
|
12
12
|
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
<UsageSection
|
|
16
|
+
from="@/components/ui/avatar"
|
|
17
|
+
imports={["Avatar", "AvatarImage", "AvatarFallback"]}
|
|
18
|
+
anatomy={`<Avatar>
|
|
19
|
+
<AvatarImage src="" />
|
|
20
|
+
<AvatarFallback>LT</AvatarFallback>
|
|
21
|
+
</Avatar>;`}
|
|
22
|
+
/>
|
|
23
|
+
|
|
13
24
|
## Examples
|
|
14
25
|
|
|
15
26
|
### Demo
|
|
@@ -10,6 +10,14 @@ description: Composable buttons with predefined sizes and variants. Triggers eve
|
|
|
10
10
|
|
|
11
11
|
<InstallationBlock name="button" />
|
|
12
12
|
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
<UsageSection
|
|
16
|
+
from="@/components/ui/button"
|
|
17
|
+
imports={["Button", "buttonVariants"]}
|
|
18
|
+
anatomy={`<Button>Submit</Button>;`}
|
|
19
|
+
/>
|
|
20
|
+
|
|
13
21
|
## Examples
|
|
14
22
|
|
|
15
23
|
### Sizes
|
|
@@ -10,6 +10,17 @@ description: A control that allows users to toggle between checked and unchecked
|
|
|
10
10
|
|
|
11
11
|
<InstallationBlock name="checkbox" />
|
|
12
12
|
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
<UsageSection
|
|
16
|
+
from="@/components/ui/checkbox"
|
|
17
|
+
imports={["Checkbox"]}
|
|
18
|
+
anatomy={`<label>
|
|
19
|
+
<Checkbox />
|
|
20
|
+
Enable notifications
|
|
21
|
+
</label>;`}
|
|
22
|
+
/>
|
|
23
|
+
|
|
13
24
|
## Examples
|
|
14
25
|
|
|
15
26
|
### Default
|
|
@@ -9,3 +9,14 @@ description: Expandable panel controlled by a trigger, ideal for hiding and show
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
<InstallationBlock name="collapsible" />
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
<UsageSection
|
|
16
|
+
from="@/components/ui/collapsible"
|
|
17
|
+
imports={["Collapsible", "CollapsibleTrigger", "CollapsiblePanel"]}
|
|
18
|
+
anatomy={`<Collapsible>
|
|
19
|
+
<CollapsibleTrigger />
|
|
20
|
+
<CollapsiblePanel />
|
|
21
|
+
</Collapsible>;`}
|
|
22
|
+
/>
|
|
@@ -9,3 +9,36 @@ description: A searchable input with a list of predefined options.
|
|
|
9
9
|
# Installation
|
|
10
10
|
|
|
11
11
|
<InstallationBlock name="combobox" />
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
<UsageSection
|
|
16
|
+
from="@/components/ui/combobox"
|
|
17
|
+
imports={[
|
|
18
|
+
"Combobox",
|
|
19
|
+
"ComboboxInput",
|
|
20
|
+
"ComboboxPopup",
|
|
21
|
+
"ComboboxList",
|
|
22
|
+
"ComboboxItem",
|
|
23
|
+
"ComboboxGroup",
|
|
24
|
+
"ComboboxLabel",
|
|
25
|
+
"ComboboxCollection",
|
|
26
|
+
"ComboboxEmpty",
|
|
27
|
+
"ComboboxSeparator",
|
|
28
|
+
"ComboboxChips",
|
|
29
|
+
"ComboboxChip",
|
|
30
|
+
"ComboboxChipsInput",
|
|
31
|
+
"ComboboxTrigger",
|
|
32
|
+
"ComboboxValue",
|
|
33
|
+
"useComboboxAnchor",
|
|
34
|
+
]}
|
|
35
|
+
anatomy={`<Combobox>
|
|
36
|
+
<ComboboxInput />
|
|
37
|
+
<ComboboxTrigger />
|
|
38
|
+
<ComboboxPopup>
|
|
39
|
+
<ComboboxList>
|
|
40
|
+
<ComboboxItem />
|
|
41
|
+
</ComboboxList>
|
|
42
|
+
</ComboboxPopup>
|
|
43
|
+
</Combobox>;`}
|
|
44
|
+
/>
|
|
@@ -9,3 +9,32 @@ description: Displays a context menu that appears at the pointer on right click
|
|
|
9
9
|
# Installation
|
|
10
10
|
|
|
11
11
|
<InstallationBlock name="context-menu" />
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
<UsageSection
|
|
16
|
+
from="@/components/ui/context-menu"
|
|
17
|
+
imports={[
|
|
18
|
+
"ContextMenu",
|
|
19
|
+
"ContextMenuTrigger",
|
|
20
|
+
"ContextMenuPopup",
|
|
21
|
+
"ContextMenuItem",
|
|
22
|
+
"ContextMenuCheckboxItem",
|
|
23
|
+
"ContextMenuRadioItem",
|
|
24
|
+
"ContextMenuLabel",
|
|
25
|
+
"ContextMenuSeparator",
|
|
26
|
+
"ContextMenuShortcut",
|
|
27
|
+
"ContextMenuGroup",
|
|
28
|
+
"ContextMenuPortal",
|
|
29
|
+
"ContextMenuSub",
|
|
30
|
+
"ContextMenuSubPopup",
|
|
31
|
+
"ContextMenuSubTrigger",
|
|
32
|
+
"ContextMenuRadioGroup",
|
|
33
|
+
]}
|
|
34
|
+
anatomy={`<ContextMenu>
|
|
35
|
+
<ContextMenuTrigger />
|
|
36
|
+
<ContextMenuPopup>
|
|
37
|
+
<ContextMenuItem />
|
|
38
|
+
</ContextMenuPopup>
|
|
39
|
+
</ContextMenu>;`}
|
|
40
|
+
/>
|
|
@@ -9,3 +9,36 @@ description: Modal overlay for confirmations and forms.
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
11
11
|
<InstallationBlock name="dialog" />
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
<UsageSection
|
|
16
|
+
from="@/components/ui/dialog"
|
|
17
|
+
imports={[
|
|
18
|
+
"Dialog",
|
|
19
|
+
"DialogClose",
|
|
20
|
+
"DialogPopup",
|
|
21
|
+
"DialogDescription",
|
|
22
|
+
"DialogFooter",
|
|
23
|
+
"DialogHeader",
|
|
24
|
+
"DialogBackdrop",
|
|
25
|
+
"DialogPortal",
|
|
26
|
+
"DialogTitle",
|
|
27
|
+
"DialogTrigger",
|
|
28
|
+
]}
|
|
29
|
+
anatomy={`<Dialog>
|
|
30
|
+
<DialogTrigger />
|
|
31
|
+
<DialogPortal>
|
|
32
|
+
<DialogBackdrop />
|
|
33
|
+
<DialogPopup>
|
|
34
|
+
<DialogHeader>
|
|
35
|
+
<DialogTitle />
|
|
36
|
+
<DialogDescription />
|
|
37
|
+
</DialogHeader>
|
|
38
|
+
<DialogFooter>
|
|
39
|
+
<DialogClose />
|
|
40
|
+
</DialogFooter>
|
|
41
|
+
</DialogPopup>
|
|
42
|
+
</DialogPortal>
|
|
43
|
+
</Dialog>;`}
|
|
44
|
+
/>
|
|
@@ -10,6 +10,44 @@ description: A slide-out panel from the edge of the screen.
|
|
|
10
10
|
|
|
11
11
|
<InstallationBlock name="drawer" />
|
|
12
12
|
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
<UsageSection
|
|
16
|
+
from="@/components/ui/drawer"
|
|
17
|
+
imports={[
|
|
18
|
+
"DrawerProvider",
|
|
19
|
+
"DrawerIndentBackground",
|
|
20
|
+
"DrawerIndent",
|
|
21
|
+
"Drawer",
|
|
22
|
+
"DrawerTrigger",
|
|
23
|
+
"DrawerPortal",
|
|
24
|
+
"DrawerClose",
|
|
25
|
+
"DrawerBackdrop",
|
|
26
|
+
"DrawerPopup",
|
|
27
|
+
"DrawerHeader",
|
|
28
|
+
"DrawerFooter",
|
|
29
|
+
"DrawerTitle",
|
|
30
|
+
"DrawerDescription",
|
|
31
|
+
]}
|
|
32
|
+
anatomy={`<DrawerProvider>
|
|
33
|
+
<Drawer>
|
|
34
|
+
<DrawerTrigger />
|
|
35
|
+
<DrawerPortal>
|
|
36
|
+
<DrawerBackdrop />
|
|
37
|
+
<DrawerPopup>
|
|
38
|
+
<DrawerHeader>
|
|
39
|
+
<DrawerTitle />
|
|
40
|
+
<DrawerDescription />
|
|
41
|
+
</DrawerHeader>
|
|
42
|
+
<DrawerFooter>
|
|
43
|
+
<DrawerClose />
|
|
44
|
+
</DrawerFooter>
|
|
45
|
+
</DrawerPopup>
|
|
46
|
+
</DrawerPortal>
|
|
47
|
+
</Drawer>
|
|
48
|
+
</DrawerProvider>;`}
|
|
49
|
+
/>
|
|
50
|
+
|
|
13
51
|
## Examples
|
|
14
52
|
|
|
15
53
|
### Default
|