@nqlib/nqui 0.3.1 → 0.3.3
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/README.md +6 -1
- package/dist/App.d.ts.map +1 -1
- package/dist/components/AppLayout.d.ts.map +1 -1
- package/dist/components/app-sidebar.d.ts.map +1 -1
- package/dist/components/custom/command-palette.d.ts +19 -0
- package/dist/components/custom/command-palette.d.ts.map +1 -0
- package/dist/components/custom/enhanced-badge.d.ts +1 -1
- package/dist/components/custom/enhanced-button.d.ts +1 -1
- package/dist/components/custom/enhanced-checkbox.d.ts +1 -1
- package/dist/components/custom/enhanced-checkbox.d.ts.map +1 -1
- package/dist/components/custom/enhanced-scroll-area.d.ts +11 -13
- package/dist/components/custom/enhanced-scroll-area.d.ts.map +1 -1
- package/dist/components/custom/nqui-logo.d.ts +1 -0
- package/dist/components/custom/nqui-logo.d.ts.map +1 -1
- package/dist/components/custom/segmented-control.d.ts +48 -0
- package/dist/components/custom/segmented-control.d.ts.map +1 -0
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/input-group.d.ts +1 -1
- package/dist/components/ui/sheet.d.ts +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/lib/keyboard.d.ts +1 -0
- package/dist/lib/keyboard.d.ts.map +1 -1
- package/dist/nqui.cjs.js +85 -85
- package/dist/nqui.es.js +13099 -12927
- package/dist/pages/ChartShowcase.d.ts.map +1 -1
- package/dist/pages/ComponentShowcase.d.ts.map +1 -1
- package/dist/pages/DataTableShowcase.d.ts +2 -0
- package/dist/pages/DataTableShowcase.d.ts.map +1 -0
- package/dist/styles.css +5 -13
- package/docs/components/README.md +119 -0
- package/docs/components/nqui-accordion.md +20 -0
- package/docs/components/nqui-alert-dialog.md +31 -0
- package/docs/components/nqui-alert.md +19 -0
- package/docs/components/nqui-aspect-ratio.md +17 -0
- package/docs/components/nqui-avatar.md +18 -0
- package/docs/components/nqui-badge.md +42 -0
- package/docs/components/nqui-breadcrumb.md +24 -0
- package/docs/components/nqui-button-group.md +31 -0
- package/docs/components/nqui-button.md +56 -0
- package/docs/components/nqui-calendar.md +46 -0
- package/docs/components/nqui-card.md +31 -0
- package/docs/components/nqui-carousel.md +22 -0
- package/docs/components/nqui-checkbox.md +34 -0
- package/docs/components/nqui-code-block.md +39 -0
- package/docs/components/nqui-code-editor.md +21 -0
- package/docs/components/nqui-collapsible.md +18 -0
- package/docs/components/nqui-color-picker.md +38 -0
- package/docs/components/nqui-color-slider.md +23 -0
- package/docs/components/nqui-combobox.md +65 -0
- package/docs/components/nqui-command-palette.md +29 -0
- package/docs/components/nqui-command.md +39 -0
- package/docs/components/nqui-context-menu.md +33 -0
- package/docs/components/nqui-dialog.md +36 -0
- package/docs/components/nqui-drawer.md +27 -0
- package/docs/components/nqui-dropdown-menu.md +56 -0
- package/docs/components/nqui-empty.md +22 -0
- package/docs/components/nqui-field.md +42 -0
- package/docs/components/nqui-frosted-glass.md +19 -0
- package/docs/components/nqui-hover-card.md +18 -0
- package/docs/components/nqui-input-group.md +22 -0
- package/docs/components/nqui-input-otp.md +23 -0
- package/docs/components/nqui-input.md +25 -0
- package/docs/components/nqui-item.md +25 -0
- package/docs/components/nqui-kbd.md +25 -0
- package/docs/components/nqui-label.md +16 -0
- package/docs/components/nqui-logo.md +16 -0
- package/docs/components/nqui-menubar.md +22 -0
- package/docs/components/nqui-native-select.md +28 -0
- package/docs/components/nqui-navigation-menu.md +25 -0
- package/docs/components/nqui-pagination.md +25 -0
- package/docs/components/nqui-popover.md +34 -0
- package/docs/components/nqui-progress.md +22 -0
- package/docs/components/nqui-radio-group.md +34 -0
- package/docs/components/nqui-rating.md +35 -0
- package/docs/components/nqui-resizable.md +23 -0
- package/docs/components/nqui-sandbox.md +27 -0
- package/docs/components/nqui-scroll-area.md +32 -0
- package/docs/components/nqui-segmented-control.md +18 -0
- package/docs/components/nqui-select.md +50 -0
- package/docs/components/nqui-separator.md +16 -0
- package/docs/components/nqui-sheet.md +27 -0
- package/docs/components/nqui-sidebar.md +45 -0
- package/docs/components/nqui-skeleton.md +15 -0
- package/docs/components/nqui-slider.md +16 -0
- package/docs/components/nqui-snippet.md +28 -0
- package/docs/components/nqui-sortable.md +46 -0
- package/docs/components/nqui-spinner.md +16 -0
- package/docs/components/nqui-switch.md +15 -0
- package/docs/components/nqui-table-of-contents.md +37 -0
- package/docs/components/nqui-tabs.md +35 -0
- package/docs/components/nqui-textarea.md +15 -0
- package/docs/components/nqui-toaster.md +44 -0
- package/docs/components/nqui-toggle-group.md +21 -0
- package/docs/components/nqui-toggle.md +15 -0
- package/docs/components/nqui-tooltip.md +24 -0
- package/docs/components/nqui-tracker.md +38 -0
- package/docs/internal-notes/BUILD_VERIFICATION.md +174 -0
- package/docs/internal-notes/DASHBOARD_LAYOUT_DESIGN.md +1429 -0
- package/docs/internal-notes/FROSTED_GLASS_FIX.md +50 -0
- package/docs/internal-notes/PUBLISHING.md +339 -0
- package/docs/internal-notes/layoutdesign.md +616 -0
- package/docs/internal-notes/progress.md +348 -0
- package/docs/internal-notes/stacked-avatar-implementation.md +38 -0
- package/package.json +2 -1
- /package/{INSTALLATION.md → docs/internal-notes/INSTALLATION.md} +0 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# nqui ColorPicker
|
|
2
|
+
|
|
3
|
+
> OKLCH color picker. Popover or inline. Value is OKLCH string.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { ColorPicker } from "@nqlib/nqui"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Basic
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<ColorPicker
|
|
15
|
+
value={color}
|
|
16
|
+
onChange={setColor}
|
|
17
|
+
variant="popover"
|
|
18
|
+
/>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Inline
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
<ColorPicker value={color} onChange={setColor} variant="inline" />
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Value Format
|
|
28
|
+
|
|
29
|
+
OKLCH string: `"oklch(0.75 0.15 240)"` (L, C, H). Not hex/RGB.
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
const [color, setColor] = useState("oklch(0.5 0.15 240)")
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Notes
|
|
36
|
+
|
|
37
|
+
- Store/pass OKLCH. Convert to hex for APIs if needed.
|
|
38
|
+
- Component includes hex display and copy.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# nqui ColorSlider
|
|
2
|
+
|
|
3
|
+
> Slider for hue/saturation/lightness. Used by ColorPicker; usable standalone.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { ColorSlider } from "@nqlib/nqui"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Types
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<ColorSlider sliderType="hue" value={[240]} onValueChange={setVal} min={0} max={360} />
|
|
15
|
+
<ColorSlider sliderType="saturation" value={[0.5]} onValueChange={setVal} min={0} max={1} step={0.01} />
|
|
16
|
+
<ColorSlider sliderType="lightness" value={[0.6]} onValueChange={setVal} min={0} max={1} step={0.01} />
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Custom
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
<ColorSlider sliderType="custom" gradientBackground="..." value={[50]} onValueChange={...} />
|
|
23
|
+
```
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# nqui Combobox
|
|
2
|
+
|
|
3
|
+
> Autocomplete / searchable select. Multi-select chips, trigger mode, groups.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import {
|
|
9
|
+
Combobox, ComboboxInput, ComboboxContent, ComboboxList,
|
|
10
|
+
ComboboxItem, ComboboxEmpty, ComboboxChips, ComboboxChip,
|
|
11
|
+
ComboboxTrigger, ComboboxValue, ComboboxCollection, ComboboxGroup,
|
|
12
|
+
ComboboxLabel, ComboboxSeparator
|
|
13
|
+
} from "@nqlib/nqui"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Basic
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
<Combobox options={items} value={value} onChange={setValue}>
|
|
20
|
+
<ComboboxInput placeholder="Search..." />
|
|
21
|
+
<ComboboxContent>
|
|
22
|
+
<ComboboxList>
|
|
23
|
+
{items.map((item) => (
|
|
24
|
+
<ComboboxItem key={item.value} value={item.value}>{item.label}</ComboboxItem>
|
|
25
|
+
))}
|
|
26
|
+
</ComboboxList>
|
|
27
|
+
<ComboboxEmpty>No results</ComboboxEmpty>
|
|
28
|
+
</ComboboxContent>
|
|
29
|
+
</Combobox>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## showClear
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
<Combobox showClear ... />
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Multi-select chips
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
<Combobox multiSelect value={selected} onChange={setSelected}>
|
|
42
|
+
<ComboboxChips placeholder="Select...">
|
|
43
|
+
{(vals) => vals.map((v) => <ComboboxChip key={v} value={v} onRemove={...} />)}
|
|
44
|
+
</ComboboxChips>
|
|
45
|
+
...
|
|
46
|
+
</Combobox>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Groups
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
<ComboboxCollection>
|
|
53
|
+
<ComboboxGroup>
|
|
54
|
+
<ComboboxLabel>Group A</ComboboxLabel>
|
|
55
|
+
<ComboboxItem value="a">A</ComboboxItem>
|
|
56
|
+
</ComboboxGroup>
|
|
57
|
+
<ComboboxSeparator />
|
|
58
|
+
...
|
|
59
|
+
</ComboboxCollection>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Notes
|
|
63
|
+
|
|
64
|
+
- Injects CSS at mount; client-only in SSR.
|
|
65
|
+
- `useComboboxAnchor` for PopoverAnchor positioning.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# nqui CommandPalette
|
|
2
|
+
|
|
3
|
+
> Global command palette (Cmd+K). Wraps Command with shortcut.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { CommandPalette } from "@nqlib/nqui"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Basic
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<CommandPalette open={open} onOpenChange={setOpen} shortcutEnabled>
|
|
15
|
+
<CommandInput placeholder="Search..." />
|
|
16
|
+
<CommandList>...</CommandList>
|
|
17
|
+
</CommandPalette>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Programmatic Only
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
<CommandPalette shortcutEnabled={false} ... />
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Notes
|
|
27
|
+
|
|
28
|
+
- Keyboard listener on window. May conflict with other global shortcuts.
|
|
29
|
+
- Custom title/description for accessibility.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# nqui Command
|
|
2
|
+
|
|
3
|
+
> Command palette filter list. CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandSeparator, CommandShortcut. CommandDialog for modal.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import {
|
|
9
|
+
Command, CommandInput, CommandList, CommandEmpty, CommandGroup,
|
|
10
|
+
CommandItem, CommandSeparator, CommandShortcut, CommandDialog
|
|
11
|
+
} from "@nqlib/nqui"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Basic
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
<Command>
|
|
18
|
+
<CommandInput placeholder="Search..." />
|
|
19
|
+
<CommandList>
|
|
20
|
+
<CommandEmpty>No results</CommandEmpty>
|
|
21
|
+
<CommandGroup heading="Suggestions">
|
|
22
|
+
<CommandItem>Item</CommandItem>
|
|
23
|
+
</CommandGroup>
|
|
24
|
+
<CommandSeparator />
|
|
25
|
+
<CommandGroup heading="Other">
|
|
26
|
+
<CommandItem>Other<CommandShortcut>⌘K</CommandShortcut></CommandItem>
|
|
27
|
+
</CommandGroup>
|
|
28
|
+
</CommandList>
|
|
29
|
+
</Command>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## CommandDialog
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
<CommandDialog open={open} onOpenChange={setOpen}>
|
|
36
|
+
<CommandInput />
|
|
37
|
+
<CommandList>...</CommandList>
|
|
38
|
+
</CommandDialog>
|
|
39
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# nqui ContextMenu
|
|
2
|
+
|
|
3
|
+
> Right-click menu. Checkbox, radio, submenus, shortcuts.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import {
|
|
9
|
+
ContextMenu, ContextMenuTrigger, ContextMenuContent,
|
|
10
|
+
ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioGroup,
|
|
11
|
+
ContextMenuRadioItem, ContextMenuSub, ContextMenuSubTrigger,
|
|
12
|
+
ContextMenuSubContent, ContextMenuShortcut
|
|
13
|
+
} from "@nqlib/nqui"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Basic
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
<ContextMenu>
|
|
20
|
+
<ContextMenuTrigger>Right-click here</ContextMenuTrigger>
|
|
21
|
+
<ContextMenuContent>
|
|
22
|
+
<ContextMenuItem>Copy</ContextMenuItem>
|
|
23
|
+
<ContextMenuCheckboxItem checked={x} onCheckedChange={setX}>Option</ContextMenuCheckboxItem>
|
|
24
|
+
<ContextMenuRadioGroup value={v} onValueChange={setV}>
|
|
25
|
+
<ContextMenuRadioItem value="a">A</ContextMenuRadioItem>
|
|
26
|
+
</ContextMenuRadioGroup>
|
|
27
|
+
<ContextMenuSub>
|
|
28
|
+
<ContextMenuSubTrigger>More</ContextMenuSubTrigger>
|
|
29
|
+
<ContextMenuSubContent>...</ContextMenuSubContent>
|
|
30
|
+
</ContextMenuSub>
|
|
31
|
+
</ContextMenuContent>
|
|
32
|
+
</ContextMenu>
|
|
33
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# nqui Dialog
|
|
2
|
+
|
|
3
|
+
> Modal dialog. Core Radix primitive.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from "@nqlib/nqui"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Basic
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<Dialog>
|
|
15
|
+
<DialogTrigger asChild><Button>Open</Button></DialogTrigger>
|
|
16
|
+
<DialogContent>
|
|
17
|
+
<DialogHeader>
|
|
18
|
+
<DialogTitle>Title</DialogTitle>
|
|
19
|
+
<DialogDescription>Description</DialogDescription>
|
|
20
|
+
</DialogHeader>
|
|
21
|
+
<p>Body</p>
|
|
22
|
+
<DialogFooter>
|
|
23
|
+
<Button variant="outline">Cancel</Button>
|
|
24
|
+
<Button>Save</Button>
|
|
25
|
+
</DialogFooter>
|
|
26
|
+
</DialogContent>
|
|
27
|
+
</Dialog>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Controlled
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
<Dialog open={open} onOpenChange={setOpen}>
|
|
34
|
+
...
|
|
35
|
+
</Dialog>
|
|
36
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# nqui Drawer
|
|
2
|
+
|
|
3
|
+
> Bottom drawer. DrawerTrigger, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, DrawerFooter.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import {
|
|
9
|
+
Drawer, DrawerTrigger, DrawerContent, DrawerHeader,
|
|
10
|
+
DrawerTitle, DrawerDescription, DrawerFooter
|
|
11
|
+
} from "@nqlib/nqui"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Basic
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
<Drawer>
|
|
18
|
+
<DrawerTrigger asChild><Button>Open</Button></DrawerTrigger>
|
|
19
|
+
<DrawerContent>
|
|
20
|
+
<DrawerHeader>
|
|
21
|
+
<DrawerTitle>Title</DrawerTitle>
|
|
22
|
+
<DrawerDescription>Desc</DrawerDescription>
|
|
23
|
+
</DrawerHeader>
|
|
24
|
+
<DrawerFooter><Button>Save</Button></DrawerFooter>
|
|
25
|
+
</DrawerContent>
|
|
26
|
+
</Drawer>
|
|
27
|
+
```
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# nqui DropdownMenu
|
|
2
|
+
|
|
3
|
+
> Context menu. Checkbox/radio items, submenus, shortcuts.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import {
|
|
9
|
+
DropdownMenu, DropdownMenuTrigger, DropdownMenuContent,
|
|
10
|
+
DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem,
|
|
11
|
+
DropdownMenuRadioGroup, DropdownMenuLabel, DropdownMenuSeparator,
|
|
12
|
+
DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent,
|
|
13
|
+
DropdownMenuShortcut
|
|
14
|
+
} from "@nqlib/nqui"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Basic
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
<DropdownMenu>
|
|
21
|
+
<DropdownMenuTrigger asChild><Button>Open</Button></DropdownMenuTrigger>
|
|
22
|
+
<DropdownMenuContent>
|
|
23
|
+
<DropdownMenuItem>Item</DropdownMenuItem>
|
|
24
|
+
<DropdownMenuSeparator />
|
|
25
|
+
<DropdownMenuItem>Another</DropdownMenuItem>
|
|
26
|
+
</DropdownMenuContent>
|
|
27
|
+
</DropdownMenu>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Checkbox / Radio
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
<DropdownMenuCheckboxItem checked={x} onCheckedChange={setX}>
|
|
34
|
+
Toggle
|
|
35
|
+
</DropdownMenuCheckboxItem>
|
|
36
|
+
<DropdownMenuRadioGroup value={v} onValueChange={setV}>
|
|
37
|
+
<DropdownMenuRadioItem value="a">A</DropdownMenuRadioItem>
|
|
38
|
+
</DropdownMenuRadioGroup>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Submenu
|
|
42
|
+
|
|
43
|
+
```tsx
|
|
44
|
+
<DropdownMenuSub>
|
|
45
|
+
<DropdownMenuSubTrigger>More</DropdownMenuSubTrigger>
|
|
46
|
+
<DropdownMenuSubContent>
|
|
47
|
+
<DropdownMenuItem>Sub item</DropdownMenuItem>
|
|
48
|
+
</DropdownMenuSubContent>
|
|
49
|
+
</DropdownMenuSub>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Shortcut
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
<DropdownMenuItem>Save<DropdownMenuShortcut>⌘S</DropdownMenuShortcut></DropdownMenuItem>
|
|
56
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# nqui Empty
|
|
2
|
+
|
|
3
|
+
> Empty state. Header, title, description, media, content.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia } from "@nqlib/nqui"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Basic
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<Empty>
|
|
15
|
+
<EmptyHeader>
|
|
16
|
+
<EmptyTitle>No items</EmptyTitle>
|
|
17
|
+
<EmptyDescription>Add something to get started</EmptyDescription>
|
|
18
|
+
</EmptyHeader>
|
|
19
|
+
<EmptyMedia>{/* icon */}</EmptyMedia>
|
|
20
|
+
<EmptyContent><Button>Add</Button></EmptyContent>
|
|
21
|
+
</Empty>
|
|
22
|
+
```
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# nqui Field
|
|
2
|
+
|
|
3
|
+
> Form field layout. Label, description, error. FieldGroup, FieldSet, FieldLegend.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import {
|
|
9
|
+
Field, FieldLabel, FieldDescription, FieldError,
|
|
10
|
+
FieldGroup, FieldSet, FieldLegend, FieldContent, FieldTitle, FieldSeparator
|
|
11
|
+
} from "@nqlib/nqui"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Basic
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
<Field>
|
|
18
|
+
<FieldLabel>Email</FieldLabel>
|
|
19
|
+
<FieldDescription>We'll never share it</FieldDescription>
|
|
20
|
+
<Input id="email" />
|
|
21
|
+
<FieldError>Invalid email</FieldError>
|
|
22
|
+
</Field>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## FieldGroup
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
<FieldGroup>
|
|
29
|
+
<Field>...</Field>
|
|
30
|
+
<FieldSeparator />
|
|
31
|
+
<Field>...</Field>
|
|
32
|
+
</FieldGroup>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## FieldSet
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
<FieldSet>
|
|
39
|
+
<FieldLegend>Section</FieldLegend>
|
|
40
|
+
<FieldContent>...</FieldContent>
|
|
41
|
+
</FieldSet>
|
|
42
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# nqui FrostedGlass
|
|
2
|
+
|
|
3
|
+
> Frosted glass blur effect. For sticky headers, overlays.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { FrostedGlass } from "@nqlib/nqui"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Basic
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<FrostedGlass blur={16} borderRadius={0} />
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Props
|
|
18
|
+
|
|
19
|
+
blur, borderRadius, opacity. Use in sticky header with z-index.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# nqui HoverCard
|
|
2
|
+
|
|
3
|
+
> Hover panel. HoverCardTrigger, HoverCardContent.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { HoverCard, HoverCardTrigger, HoverCardContent } from "@nqlib/nqui"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Basic
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<HoverCard>
|
|
15
|
+
<HoverCardTrigger asChild><span>Hover</span></HoverCardTrigger>
|
|
16
|
+
<HoverCardContent>Content</HoverCardContent>
|
|
17
|
+
</HoverCard>
|
|
18
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# nqui InputGroup
|
|
2
|
+
|
|
3
|
+
> Input with prefix/suffix. InputGroupText, InputGroupInput, etc.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { InputGroup, InputGroupText, Input } from "@nqlib/nqui"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Basic
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<InputGroup>
|
|
15
|
+
<InputGroupText>@</InputGroupText>
|
|
16
|
+
<Input placeholder="Username" />
|
|
17
|
+
</InputGroup>
|
|
18
|
+
<InputGroup>
|
|
19
|
+
<Input placeholder="Amount" />
|
|
20
|
+
<InputGroupText>.00</InputGroupText>
|
|
21
|
+
</InputGroup>
|
|
22
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# nqui InputOTP
|
|
2
|
+
|
|
3
|
+
> OTP/code input. Group, slots, separator.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator } from "@nqlib/nqui"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Basic
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<InputOTP value={value} onChange={setValue}>
|
|
15
|
+
<InputOTPGroup>
|
|
16
|
+
<InputOTPSlot index={0} />
|
|
17
|
+
<InputOTPSlot index={1} />
|
|
18
|
+
<InputOTPSeparator />
|
|
19
|
+
<InputOTPSlot index={2} />
|
|
20
|
+
<InputOTPSlot index={3} />
|
|
21
|
+
</InputOTPGroup>
|
|
22
|
+
</InputOTP>
|
|
23
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# nqui Input
|
|
2
|
+
|
|
3
|
+
> Text input. Core component.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { Input } from "@nqlib/nqui"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Basic
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<Input placeholder="Email" type="email" />
|
|
15
|
+
<Input type="password" disabled />
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## With Label
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
<div>
|
|
22
|
+
<Label htmlFor="email">Email</Label>
|
|
23
|
+
<Input id="email" type="email" />
|
|
24
|
+
</div>
|
|
25
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# nqui Item
|
|
2
|
+
|
|
3
|
+
> List item layout. Media, content, actions. ItemGroup, ItemSeparator, ItemHeader, ItemFooter.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import {
|
|
9
|
+
Item, ItemMedia, ItemContent, ItemActions, ItemTitle, ItemDescription,
|
|
10
|
+
ItemGroup, ItemSeparator, ItemHeader, ItemFooter
|
|
11
|
+
} from "@nqlib/nqui"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Basic
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
<Item>
|
|
18
|
+
<ItemMedia><Avatar /></ItemMedia>
|
|
19
|
+
<ItemContent>
|
|
20
|
+
<ItemTitle>Title</ItemTitle>
|
|
21
|
+
<ItemDescription>Desc</ItemDescription>
|
|
22
|
+
</ItemContent>
|
|
23
|
+
<ItemActions><Button>...</Button></ItemActions>
|
|
24
|
+
</Item>
|
|
25
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# nqui Kbd
|
|
2
|
+
|
|
3
|
+
> Keyboard key indicator for shortcuts.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { Kbd } from "@nqlib/nqui"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Basic
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
Press <Kbd>⌘</Kbd> + <Kbd>K</Kbd> to open
|
|
15
|
+
<Kbd>Esc</Kbd> to close
|
|
16
|
+
<Kbd>Ctrl</Kbd> + <Kbd>Shift</Kbd> + <Kbd>P</Kbd>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## KbdGroup
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { Kbd } from "@nqlib/nqui"
|
|
23
|
+
// KbdGroup: import from @/components/ui/kbd if needed
|
|
24
|
+
<div><Kbd>Ctrl</Kbd>+<Kbd>K</Kbd></div>
|
|
25
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# nqui Menubar
|
|
2
|
+
|
|
3
|
+
> Horizontal menu bar. MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem } from "@nqlib/nqui"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Basic
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<Menubar>
|
|
15
|
+
<MenubarMenu>
|
|
16
|
+
<MenubarTrigger>File</MenubarTrigger>
|
|
17
|
+
<MenubarContent>
|
|
18
|
+
<MenubarItem>New</MenubarItem>
|
|
19
|
+
</MenubarContent>
|
|
20
|
+
</MenubarMenu>
|
|
21
|
+
</Menubar>
|
|
22
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# nqui NativeSelect
|
|
2
|
+
|
|
3
|
+
> Native HTML select.
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { NativeSelect, NativeSelectOption, NativeSelectOptGroup } from "@nqlib/nqui"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Basic
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<NativeSelect>
|
|
15
|
+
<NativeSelectOption value="">Select...</NativeSelectOption>
|
|
16
|
+
<NativeSelectOption value="1">One</NativeSelectOption>
|
|
17
|
+
</NativeSelect>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## OptGroup
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
<NativeSelect>
|
|
24
|
+
<NativeSelectOptGroup label="Group">
|
|
25
|
+
<NativeSelectOption value="a">A</NativeSelectOption>
|
|
26
|
+
</NativeSelectOptGroup>
|
|
27
|
+
</NativeSelect>
|
|
28
|
+
```
|