shapes-ui 0.5.0 → 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.
Files changed (83) hide show
  1. package/.github/workflows/pr-preview.yml +9 -2
  2. package/CHANGELOG.md +11 -0
  3. package/README.md +13 -0
  4. package/content/components/accordion.mdx +13 -0
  5. package/content/components/alert-dialog.mdx +34 -0
  6. package/content/components/autocomplete.mdx +62 -0
  7. package/content/components/avatar.mdx +11 -0
  8. package/content/components/button.mdx +8 -0
  9. package/content/components/checkbox.mdx +11 -0
  10. package/content/components/collapsible.mdx +11 -0
  11. package/content/components/combobox.mdx +33 -0
  12. package/content/components/context-menu.mdx +29 -0
  13. package/content/components/dialog.mdx +33 -0
  14. package/content/components/drawer.mdx +38 -0
  15. package/content/components/field.mdx +21 -0
  16. package/content/components/fieldset.mdx +10 -0
  17. package/content/components/form.mdx +8 -0
  18. package/content/components/input.mdx +4 -0
  19. package/content/components/menu.mdx +27 -0
  20. package/content/components/menubar.mdx +31 -0
  21. package/content/components/meter.mdx +14 -0
  22. package/content/components/navigation-menu.mdx +28 -0
  23. package/content/components/number-field.mdx +25 -0
  24. package/content/components/popover.mdx +22 -0
  25. package/content/components/preview-card.mdx +14 -2
  26. package/content/components/progress.mdx +15 -1
  27. package/content/components/radio.mdx +11 -0
  28. package/content/components/scroll-area.mdx +23 -0
  29. package/content/components/select.mdx +27 -0
  30. package/content/components/separator.mdx +29 -0
  31. package/content/components/slider.mdx +4 -0
  32. package/content/components/switch.mdx +4 -0
  33. package/content/components/tabs.mdx +15 -0
  34. package/content/components/toast.mdx +10 -0
  35. package/content/components/toggle-group.mdx +37 -0
  36. package/content/components/toggle.mdx +12 -0
  37. package/content/components/toolbar.mdx +22 -0
  38. package/content/components/tooltip.mdx +13 -0
  39. package/content/docs/installation.mdx +30 -0
  40. package/content-collections.ts +65 -1
  41. package/dist/cli.js +947 -101
  42. package/examples/__index.tsx +136 -68
  43. package/examples/autocomplete-align.tsx +39 -0
  44. package/examples/autocomplete-controlled.tsx +44 -0
  45. package/examples/autocomplete-groups.tsx +65 -0
  46. package/examples/autocomplete-no-clear.tsx +40 -0
  47. package/examples/avatar-demo.tsx +3 -3
  48. package/examples/input-group-with-button.tsx +1 -1
  49. package/examples/separator-demo.tsx +13 -0
  50. package/examples/separator-horizontal.tsx +18 -0
  51. package/package.json +19 -18
  52. package/public/base-ui.svg +1 -0
  53. package/src/assets/base-ui.svg +1 -0
  54. package/src/commands/add.ts +79 -38
  55. package/src/commands/cli.ts +50 -3
  56. package/src/commands/create.ts +262 -0
  57. package/src/commands/init.ts +45 -12
  58. package/src/commands/palette.ts +55 -0
  59. package/src/components/docs/layout/footer.tsx +2 -2
  60. package/src/components/docs/layout/header.tsx +7 -9
  61. package/src/components/docs/layout/mobile-menu.tsx +0 -1
  62. package/src/components/docs/layout/nav-list.tsx +2 -2
  63. package/src/components/docs/layout/page-header.tsx +52 -7
  64. package/src/components/docs/layout/split-layout.tsx +9 -10
  65. package/src/components/docs/layout/table-of-content.tsx +145 -0
  66. package/src/components/docs/markdown/components.tsx +142 -29
  67. package/src/components/docs/markdown/copy-button.tsx +41 -0
  68. package/src/components/docs/markdown/installation-block.tsx +5 -24
  69. package/src/components/docs/markdown/render-preview.tsx +1 -1
  70. package/src/components/ui/button-group.tsx +1 -1
  71. package/src/components/ui/scroll-area.tsx +11 -2
  72. package/src/lib/docs-headings.ts +72 -0
  73. package/src/routeTree.gen.ts +60 -3
  74. package/src/routes/__root.tsx +2 -2
  75. package/src/routes/components.$slug.tsx +20 -4
  76. package/src/routes/docs.$slug.tsx +78 -0
  77. package/src/routes/docs.tsx +15 -0
  78. package/src/styles/styles.css +1 -1
  79. package/src/utils/cli-utils.ts +8 -8
  80. package/src/utils/dependency-installer.ts +30 -0
  81. package/src/utils/package-manager.ts +4 -4
  82. package/src/utils/palette.ts +666 -0
  83. package/src/utils/schema.ts +6 -0
@@ -6,6 +6,8 @@ on:
6
6
  - opened
7
7
  - reopened
8
8
  - synchronize
9
+ pull_request_target:
10
+ types:
9
11
  - closed
10
12
 
11
13
  concurrency:
@@ -15,7 +17,7 @@ concurrency:
15
17
  jobs:
16
18
  deploy-preview:
17
19
  name: Deploy Preview
18
- if: github.event.action != 'closed'
20
+ if: github.event_name == 'pull_request' && github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository
19
21
  runs-on: ubuntu-latest
20
22
  permissions:
21
23
  contents: read
@@ -40,6 +42,7 @@ jobs:
40
42
  - name: Deploy Preview Worker
41
43
  uses: cloudflare/wrangler-action@v3
42
44
  with:
45
+ wranglerVersion: "4"
43
46
  apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
44
47
  accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
45
48
  command: "deploy --name shapes-ui-pr-${{ github.event.pull_request.number }}"
@@ -55,14 +58,18 @@ jobs:
55
58
 
56
59
  cleanup-preview:
57
60
  name: Cleanup Preview
58
- if: github.event.action == 'closed'
61
+ if: github.event_name == 'pull_request_target' && github.event.action == 'closed'
59
62
  runs-on: ubuntu-latest
60
63
  permissions:
61
64
  contents: read
62
65
  steps:
63
66
  - name: Delete Preview Worker
64
67
  uses: cloudflare/wrangler-action@v3
68
+ env:
69
+ CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
70
+ CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
65
71
  with:
72
+ wranglerVersion: "4"
66
73
  apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
67
74
  accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
68
75
  command: "delete shapes-ui-pr-${{ github.event.pull_request.number }} --force"
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
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
+
3
14
  ## 0.5.0
4
15
 
5
16
  ### Minor Changes
package/README.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Shapes UI
2
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
+
3
16
  ## Community
4
17
 
5
18
  - [Contributing guide](CONTRIBUTING.md)
@@ -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
@@ -10,6 +10,27 @@ description: Accessible form field components with built-in validation, labels,
10
10
 
11
11
  <InstallationBlock name="field" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/field"
17
+ imports={[
18
+ "Field",
19
+ "FieldLabel",
20
+ "FieldControl",
21
+ "FieldDescription",
22
+ "FieldError",
23
+ "FieldItem",
24
+ "FieldValidity",
25
+ ]}
26
+ anatomy={`<Field>
27
+ <FieldLabel />
28
+ <FieldControl />
29
+ <FieldDescription />
30
+ <FieldError />
31
+ </Field>;`}
32
+ />
33
+
13
34
  ## Examples
14
35
 
15
36
  ### Default
@@ -10,6 +10,16 @@ description: Groups related form fields with an accessible legend for semantic o
10
10
 
11
11
  <InstallationBlock name="fieldset" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/fieldset"
17
+ imports={["Fieldset", "FieldsetLegend"]}
18
+ anatomy={`<Fieldset>
19
+ <FieldsetLegend />
20
+ </Fieldset>;`}
21
+ />
22
+
13
23
  ## Examples
14
24
 
15
25
  ### Default
@@ -10,6 +10,14 @@ description: Form wrapper component with consolidated error handling and field v
10
10
 
11
11
  <InstallationBlock name="form" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/form"
17
+ imports={["Form"]}
18
+ anatomy={`<Form>{/* form fields */}</Form>;`}
19
+ />
20
+
13
21
  ## Examples
14
22
 
15
23
  ### Demo
@@ -10,6 +10,10 @@ description: Single-line text input field.
10
10
 
11
11
  <InstallationBlock name="input" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection from="@/components/ui/input" imports={["Input"]} anatomy={`<Input />;`} />
16
+
13
17
  ## Examples
14
18
 
15
19
  ### Basic
@@ -10,6 +10,33 @@ description: Dropdown menu component with support for items, groups, separators,
10
10
 
11
11
  <InstallationBlock name="menu" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/menu"
17
+ imports={[
18
+ "Menu",
19
+ "MenuTrigger",
20
+ "MenuPopup",
21
+ "MenuGroup",
22
+ "MenuLabel",
23
+ "MenuItem",
24
+ "MenuSub",
25
+ "MenuSubTrigger",
26
+ "MenuCheckboxItem",
27
+ "MenuRadioGroup",
28
+ "MenuRadioItem",
29
+ "MenuSubPopup",
30
+ "MenuSeparator",
31
+ ]}
32
+ anatomy={`<Menu>
33
+ <MenuTrigger />
34
+ <MenuPopup>
35
+ <MenuItem />
36
+ </MenuPopup>
37
+ </Menu>;`}
38
+ />
39
+
13
40
  ## Examples
14
41
 
15
42
  ### Sides and alignments
@@ -10,6 +10,37 @@ description: Menu bar providing commands and options for your application with d
10
10
 
11
11
  <InstallationBlock name="menubar" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/menubar"
17
+ imports={[
18
+ "Menubar",
19
+ "Menu",
20
+ "MenuTrigger",
21
+ "MenuPopup",
22
+ "MenuGroup",
23
+ "MenuLabel",
24
+ "MenuItem",
25
+ "MenuSub",
26
+ "MenuSubPopup",
27
+ "MenuSubTrigger",
28
+ "MenuCheckboxItem",
29
+ "MenuRadioGroup",
30
+ "MenuRadioItem",
31
+ "MenuSeparator",
32
+ "MenuShortcut",
33
+ ]}
34
+ anatomy={`<Menubar>
35
+ <Menu>
36
+ <MenuTrigger />
37
+ <MenuPopup>
38
+ <MenuItem />
39
+ </MenuPopup>
40
+ </Menu>
41
+ </Menubar>;`}
42
+ />
43
+
13
44
  Menubar relies on `Menu` component, but for the ease of use, it also provides a set of components that are built on top of `Menu` component with same styling and APIs.
14
45
 
15
46
  ## Examples
@@ -10,6 +10,20 @@ description: Meter component that provides a graphical display of a numeric valu
10
10
 
11
11
  <InstallationBlock name="meter" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/meter"
17
+ imports={["Meter", "MeterLabel", "MeterValue", "MeterTrack", "MeterIndicator"]}
18
+ anatomy={`<Meter>
19
+ <MeterLabel />
20
+ <MeterValue />
21
+ <MeterTrack>
22
+ <MeterIndicator />
23
+ </MeterTrack>
24
+ </Meter>;`}
25
+ />
26
+
13
27
  ## Examples
14
28
 
15
29
  ### Default
@@ -9,3 +9,31 @@ description: Navigation menu component for displaying a collection of links and
9
9
  ## Installation
10
10
 
11
11
  <InstallationBlock name="navigation-menu" />
12
+
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/navigation-menu"
17
+ imports={[
18
+ "NavigationMenu",
19
+ "NavigationMenuList",
20
+ "NavigationMenuItem",
21
+ "NavigationMenuTrigger",
22
+ "NavigationMenuContent",
23
+ "NavigationMenuLink",
24
+ "NavigationMenuPopup",
25
+ "NavigationMenuViewport",
26
+ "NavigationMenuArrow",
27
+ ]}
28
+ anatomy={`<NavigationMenu>
29
+ <NavigationMenuList>
30
+ <NavigationMenuItem>
31
+ <NavigationMenuTrigger />
32
+ <NavigationMenuContent />
33
+ </NavigationMenuItem>
34
+ </NavigationMenuList>
35
+ <NavigationMenuViewport>
36
+ <NavigationMenuArrow />
37
+ </NavigationMenuViewport>
38
+ </NavigationMenu>;`}
39
+ />
@@ -10,6 +10,31 @@ description: An input field component specifically designed for numeric input, w
10
10
 
11
11
  <InstallationBlock name="number-field" />
12
12
 
13
+ ## Usage
14
+
15
+ <UsageSection
16
+ from="@/components/ui/number-field"
17
+ imports={[
18
+ "NumberField",
19
+ "NumberFieldScrubArea",
20
+ "NumberFieldScrubAreaCursor",
21
+ "NumberFieldGroup",
22
+ "NumberFieldDecrement",
23
+ "NumberFieldIncrement",
24
+ "NumberFieldInput",
25
+ ]}
26
+ anatomy={`<NumberField>
27
+ <NumberFieldScrubArea>
28
+ <NumberFieldScrubAreaCursor />
29
+ </NumberFieldScrubArea>
30
+ <NumberFieldGroup>
31
+ <NumberFieldDecrement />
32
+ <NumberFieldInput />
33
+ <NumberFieldIncrement />
34
+ </NumberFieldGroup>
35
+ </NumberField>;`}
36
+ />
37
+
13
38
  ## Examples
14
39
 
15
40
  ### Basic