@create-ui/cli 0.5.9 → 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.
|
@@ -40,7 +40,6 @@ Every item below ships in `@createui` - and nothing else does. There is **no car
|
|
|
40
40
|
| checkbox-group | CheckboxGroup | variant: primary*\|danger · size: xs\|sm\|md* · placement: left*\|right |
|
|
41
41
|
| chip | Chip | variant: neutral*\|info\|danger\|success · appearance: outline*\|soft · size: xs\|sm\|md\|lg*\|xl · shape: pill\|rounded* · selected · disabled · dragging · closable |
|
|
42
42
|
| close-button | CloseButton | variant: neutral*\|inverse · appearance: solid\|outline\|ghost*\|soft · size: xs\|sm\|md*\|lg\|xl\|2xl · shape: rounded*\|pill\|square |
|
|
43
|
-
| command | Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, +13 more | CommandDialog: showCloseButton |
|
|
44
43
|
| country-flag | CountryFlag, CurrencyFlag, FlagFallback | code (required) |
|
|
45
44
|
| credit-card-input | CreditCardInput | size: xs\|sm\|md · leadingIcon · invalid · disabled · loading · showLeadingIcon · showBadge · showValidationIcon |
|
|
46
45
|
| date-input | DateInput | size: xs\|sm\|md · leadingIcon · invalid · disabled · loading · showLeadingIcon |
|
|
@@ -54,7 +53,6 @@ Every item below ships in `@createui` - and nothing else does. There is **no car
|
|
|
54
53
|
| input-stepper | InputStepper | variant: connected\|separated · size: xs\|sm\|md · value/onValueChange · defaultValue · min · max · step · invalid · disabled |
|
|
55
54
|
| label | Label, LabelBlock, LabelMain, LabelIcon, LabelRequired, LabelOptional, +4 more | size: xs\|sm\|md |
|
|
56
55
|
| pagination | Pagination, PaginationContent, PaginationLink, PaginationFirst, PaginationPrevious, PaginationNext, +2 more | variant: compact\|compact-grouped* · shape: rounded*\|pill |
|
|
57
|
-
| password-strength | PasswordStrength | size: xs\|sm\|md* |
|
|
58
56
|
| phone-input | PhoneInput | size: xs\|sm\|md · invalid · disabled · loading · showHelperIcon |
|
|
59
57
|
| progress | Progress | variant: primary*\|info\|success\|warning\|danger\|away\|neutral\|neutral-static\|neutral-soft\|inverse\|inverse-static\|inverse-soft · appearance: solid*\|gradient · size: xs\|sm\|md*\|lg · shape: sharp\|pill* · type: line*\|circle · value · max · duration |
|
|
60
58
|
| radio | Radio | variant: primary*\|neutral\|danger\|success\|inverse · size: xs\|sm\|md* |
|
package/package.json
CHANGED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
<!-- GENERATED FILE - do not edit. Source: registry/ui/command.tsx, registry/ui/dialog.tsx. Regenerate with `pnpm skill:build`. Curated notes: apps/v4/scripts/skill-reference/notes/command.md -->
|
|
2
|
-
|
|
3
|
-
# command
|
|
4
|
-
|
|
5
|
-
cmdk command palette; Command renders inline while CommandDialog opens as a modal (bundles dialog.tsx)
|
|
6
|
-
|
|
7
|
-
Install: `npx @create-ui/cli add command`
|
|
8
|
-
|
|
9
|
-
## Import
|
|
10
|
-
|
|
11
|
-
```tsx
|
|
12
|
-
import { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator } from "@/components/ui/command"
|
|
13
|
-
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "@/components/ui/dialog"
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## CommandDialog props
|
|
17
|
-
|
|
18
|
-
| Prop | Type | Default |
|
|
19
|
-
| --- | --- | --- |
|
|
20
|
-
| title | `string` | `Command Palette` |
|
|
21
|
-
| description | `string` | `Search for a command to run...` |
|
|
22
|
-
| className | `string` | - |
|
|
23
|
-
| showCloseButton | `boolean` | `false` |
|
|
24
|
-
|
|
25
|
-
Extends `React.ComponentProps<typeof Dialog>`.
|
|
26
|
-
|
|
27
|
-
## DialogContent props
|
|
28
|
-
|
|
29
|
-
| Prop | Type | Default |
|
|
30
|
-
| --- | --- | --- |
|
|
31
|
-
| showCloseButton | `boolean` | `true` |
|
|
32
|
-
|
|
33
|
-
Extends `React.ComponentProps<typeof DialogPrimitive.Content>`.
|
|
34
|
-
|
|
35
|
-
## DialogFooter props
|
|
36
|
-
|
|
37
|
-
| Prop | Type | Default |
|
|
38
|
-
| --- | --- | --- |
|
|
39
|
-
| showCloseButton | `boolean` | `false` |
|
|
40
|
-
|
|
41
|
-
Extends `React.ComponentProps<"div">`.
|
|
42
|
-
|
|
43
|
-
## Examples
|
|
44
|
-
|
|
45
|
-
More: `npx @create-ui/cli view command` or MCP `get_item_examples_from_registries` with "command-demo" / "command-example".
|
|
46
|
-
|
|
47
|
-
## When to use
|
|
48
|
-
Command is a searchable command palette built on cmdk: CommandDialog for a modal Cmd+K palette, bare Command for an inline list. Do not use it to pick a form value (use Select) or for a small action menu on a trigger (use DropdownMenu).
|
|
49
|
-
## Gotchas
|
|
50
|
-
- CommandDialog does NOT wrap children in Command (unlike shadcn): its children go directly into DialogContent. Nest Command yourself or filtering and keyboard navigation will not work:
|
|
51
|
-
|
|
52
|
-
```tsx
|
|
53
|
-
<CommandDialog open={open} onOpenChange={setOpen}>
|
|
54
|
-
<Command>
|
|
55
|
-
<CommandInput placeholder="Type a command or search..." />
|
|
56
|
-
<CommandList>
|
|
57
|
-
<CommandEmpty>No results found.</CommandEmpty>
|
|
58
|
-
<CommandGroup heading="Suggestions">
|
|
59
|
-
<CommandItem>Calendar</CommandItem>
|
|
60
|
-
</CommandGroup>
|
|
61
|
-
</CommandList>
|
|
62
|
-
</Command>
|
|
63
|
-
</CommandDialog>
|
|
64
|
-
```
|
|
65
|
-
- No built-in trigger or Cmd+K key handler, and DialogTrigger cannot be composed (all children land inside DialogContent). Drive it with open/onOpenChange state; the examples use a Button onClick.
|
|
66
|
-
- CommandInput renders a trailing RiSearchLine icon on the right (not shadcn's left-side icon). Do not add your own search icon.
|
|
67
|
-
- CommandItem auto-appends a RiCheckLine indicator: it shows only when you set data-checked="true" on the item (nothing sets this attribute for you), and it is hidden entirely whenever the item contains a CommandShortcut. Do not add your own check icon for selected state.
|
|
68
|
-
- CommandDialog already renders sr-only DialogTitle/DialogDescription from its title/description props and pins the panel to the top third of the viewport with zero padding; do not add DialogHeader or try to re-center it.
|
|
69
|
-
- Follow the example item anatomy: bare <RiIcon /> from @create-ui/assets/icons, then <span> text, optional CommandShortcut last; items sit in CommandGroup (with heading) inside CommandList.
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
<!-- GENERATED FILE - do not edit. Source: registry/ui/password-strength.tsx. Regenerate with `pnpm skill:build`. Curated notes: apps/v4/scripts/skill-reference/notes/password-strength.md -->
|
|
2
|
-
|
|
3
|
-
# password-strength
|
|
4
|
-
|
|
5
|
-
Password meter with five segments driven by a 0-5 strength prop plus an optional checklist of rules
|
|
6
|
-
|
|
7
|
-
Install: `npx @create-ui/cli add password-strength`
|
|
8
|
-
|
|
9
|
-
## Import
|
|
10
|
-
|
|
11
|
-
```tsx
|
|
12
|
-
import { PasswordStrength } from "@/components/ui/password-strength"
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## PasswordStrength props
|
|
16
|
-
|
|
17
|
-
| Prop | Type | Default |
|
|
18
|
-
| --- | --- | --- |
|
|
19
|
-
| size | `xs \| sm \| md` (Standalone prop - not inherited from Field or InputGroup context; mirror the sibling password field's size manually.) | `md` |
|
|
20
|
-
| strength | `StrengthLevel` (How many of the 5 segments fill (0-5); the component computes nothing - derive the level from the password value yourself.) | `0` |
|
|
21
|
-
| rules | `PasswordStrengthRule[]` (Omit (or pass an empty array) to hide the whole checklist section and its divider; each rule is just { label, met }.) | - |
|
|
22
|
-
|
|
23
|
-
Extends `React.ComponentProps<"div">`.
|
|
24
|
-
|
|
25
|
-
## Examples
|
|
26
|
-
|
|
27
|
-
From `input-group-password`:
|
|
28
|
-
|
|
29
|
-
```tsx
|
|
30
|
-
import { RiLock2Line } from "@create-ui/assets/icons"
|
|
31
|
-
|
|
32
|
-
import { Field, FieldLabel } from "@/components/ui/field"
|
|
33
|
-
import {
|
|
34
|
-
InputGroup,
|
|
35
|
-
InputGroupControl,
|
|
36
|
-
InputGroupSlot,
|
|
37
|
-
} from "@/components/ui/input-group"
|
|
38
|
-
|
|
39
|
-
export default function InputGroupPassword() {
|
|
40
|
-
return (
|
|
41
|
-
<Field className="max-w-100">
|
|
42
|
-
<FieldLabel htmlFor="input-group-password-input">Password</FieldLabel>
|
|
43
|
-
<InputGroup>
|
|
44
|
-
<InputGroupSlot>
|
|
45
|
-
<RiLock2Line />
|
|
46
|
-
<InputGroupControl
|
|
47
|
-
id="input-group-password-input"
|
|
48
|
-
type="password"
|
|
49
|
-
placeholder="••••••••••••"
|
|
50
|
-
defaultValue="mysecretpassword"
|
|
51
|
-
/>
|
|
52
|
-
</InputGroupSlot>
|
|
53
|
-
</InputGroup>
|
|
54
|
-
</Field>
|
|
55
|
-
)
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
More: `npx @create-ui/cli view password-strength` or MCP `get_item_examples_from_registries` with "password-strength-demo" / "password-strength-example".
|
|
60
|
-
|
|
61
|
-
## When to use
|
|
62
|
-
Read-only feedback card shown alongside a password field: a five-segment strength meter plus an optional "Your password must include:" checklist. It contains no input and no scoring algorithm, so pair it with a separate `InputGroup` + `InputGroupControl type="password"` (or `Input type="password"`) and recompute `strength`/`rules` on every change. For a generic completion bar use `Progress`; for the password field itself use `Input`/`InputGroup`, never this.
|
|
63
|
-
|
|
64
|
-
## Gotchas
|
|
65
|
-
- Fully controlled and dumb: no value prop, no onChange, no built-in zxcvbn-style scoring. You own the evaluation (e.g. count met rules) and pass the result in as `strength` and `rules`.
|
|
66
|
-
- All copy is hardcoded English: the checklist heading "Your password must include:", the level labels ("Too Weak" through "Very Strong"), and the per-level meter colors (red/orange/yellow/lime/green). No props exist to relabel, localize, or recolor them.
|
|
67
|
-
- `strength={0}` is the legitimate pristine state: all five segments render unfilled and the level label is omitted (only the "Password Strength" caption shows). Do not conditionally unmount the component to get an empty meter.
|
|
68
|
-
- Rule icons are automatic: `met: true` renders a check (RiCheckFill), `met: false` a cross (RiCloseFill). You supply only `label` and `met`; there is no per-rule icon slot.
|
|
69
|
-
- The checklist renders ABOVE the meter in DOM order (rules, divider, then meter); the meter section always renders, and the divider appears and disappears with the checklist.
|
|
70
|
-
- Met rule rows carry `data-met` (absent when unmet); the root has `data-slot="password-strength"` and `data-size` as external styling hooks.
|