@create-ui/cli 0.6.0 → 0.6.1

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 (71) hide show
  1. package/dist/chunk-KFQXWKJJ.js +19 -0
  2. package/dist/chunk-KFQXWKJJ.js.map +1 -0
  3. package/dist/{chunk-2ELKDGGM.js → chunk-OGAWGP7T.js} +3 -3
  4. package/dist/{chunk-2ELKDGGM.js.map → chunk-OGAWGP7T.js.map} +1 -1
  5. package/dist/chunk-OITQ46YK.js +99 -0
  6. package/dist/chunk-OITQ46YK.js.map +1 -0
  7. package/dist/index.js +16 -16
  8. package/dist/index.js.map +1 -1
  9. package/dist/mcp/index.js +1 -1
  10. package/dist/registry/index.d.ts +3 -1
  11. package/dist/registry/index.js +1 -1
  12. package/dist/skills/createui/SKILL.md +81 -52
  13. package/dist/skills/createui/cli.md +1 -1
  14. package/dist/skills/createui/customization.md +14 -12
  15. package/dist/skills/createui/evals/evals.json +77 -0
  16. package/dist/skills/createui/mcp.md +12 -26
  17. package/dist/skills/createui/rules/a11y.md +148 -0
  18. package/dist/skills/createui/rules/composition.md +64 -26
  19. package/dist/skills/createui/rules/forms.md +2 -2
  20. package/dist/skills/createui/rules/icons.md +1 -1
  21. package/dist/skills/createui/rules/styling.md +2 -2
  22. package/dist/utils/index.js +1 -1
  23. package/dist/utils/index.js.map +1 -1
  24. package/package.json +1 -1
  25. package/dist/chunk-643QI2I2.js +0 -102
  26. package/dist/chunk-643QI2I2.js.map +0 -1
  27. package/dist/chunk-KQTXDVKV.js +0 -19
  28. package/dist/chunk-KQTXDVKV.js.map +0 -1
  29. package/dist/skills/createui/reference/accordion.md +0 -127
  30. package/dist/skills/createui/reference/app-store-badge.md +0 -88
  31. package/dist/skills/createui/reference/aspect-ratio.md +0 -52
  32. package/dist/skills/createui/reference/avatar.md +0 -230
  33. package/dist/skills/createui/reference/badge.md +0 -110
  34. package/dist/skills/createui/reference/breadcrumb.md +0 -153
  35. package/dist/skills/createui/reference/button-group.md +0 -116
  36. package/dist/skills/createui/reference/button.md +0 -104
  37. package/dist/skills/createui/reference/checkbox-group.md +0 -118
  38. package/dist/skills/createui/reference/checkbox.md +0 -79
  39. package/dist/skills/createui/reference/chip.md +0 -115
  40. package/dist/skills/createui/reference/close-button.md +0 -83
  41. package/dist/skills/createui/reference/country-flag.md +0 -109
  42. package/dist/skills/createui/reference/credit-card-input.md +0 -76
  43. package/dist/skills/createui/reference/date-input.md +0 -71
  44. package/dist/skills/createui/reference/dropdown-menu.md +0 -164
  45. package/dist/skills/createui/reference/field.md +0 -186
  46. package/dist/skills/createui/reference/info-tooltip.md +0 -110
  47. package/dist/skills/createui/reference/inline-alert.md +0 -146
  48. package/dist/skills/createui/reference/input-group.md +0 -171
  49. package/dist/skills/createui/reference/input-otp.md +0 -130
  50. package/dist/skills/createui/reference/input-stepper.md +0 -120
  51. package/dist/skills/createui/reference/input.md +0 -118
  52. package/dist/skills/createui/reference/label.md +0 -121
  53. package/dist/skills/createui/reference/pagination.md +0 -157
  54. package/dist/skills/createui/reference/phone-input.md +0 -77
  55. package/dist/skills/createui/reference/progress.md +0 -158
  56. package/dist/skills/createui/reference/radio-group.md +0 -133
  57. package/dist/skills/createui/reference/radio.md +0 -79
  58. package/dist/skills/createui/reference/scroll-area.md +0 -212
  59. package/dist/skills/createui/reference/segmented-control.md +0 -146
  60. package/dist/skills/createui/reference/select.md +0 -204
  61. package/dist/skills/createui/reference/separator.md +0 -99
  62. package/dist/skills/createui/reference/social-login-button.md +0 -130
  63. package/dist/skills/createui/reference/spinner.md +0 -68
  64. package/dist/skills/createui/reference/status-badge.md +0 -89
  65. package/dist/skills/createui/reference/switch-group.md +0 -122
  66. package/dist/skills/createui/reference/switch.md +0 -75
  67. package/dist/skills/createui/reference/tab-menu.md +0 -165
  68. package/dist/skills/createui/reference/text-link.md +0 -84
  69. package/dist/skills/createui/reference/textarea.md +0 -50
  70. package/dist/skills/createui/reference/toast.md +0 -162
  71. package/dist/skills/createui/reference/tooltip.md +0 -63
@@ -1,162 +0,0 @@
1
- <!-- GENERATED FILE - do not edit. Source: registry/ui/toast.tsx. Regenerate with `pnpm skill:build`. Curated notes: apps/v4/scripts/skill-reference/notes/toast.md -->
2
-
3
- # toast
4
-
5
- Notification card with icon, action and close slots plus ToastProgress countdown; seven variants by four appearances
6
-
7
- Install: `npx @create-ui/cli add toast`
8
-
9
- ## Import
10
-
11
- ```tsx
12
- import { Toast, ToastBody, ToastIcon, ToastContent, ToastTitle, ToastDescription, ToastAction, ToastClose, ToastProgress } from "@/components/ui/toast"
13
- ```
14
-
15
- Also exported: `toastVariants`, `useToastContext`
16
-
17
- ## Toast props
18
-
19
- | Prop | Type | Default |
20
- | --- | --- | --- |
21
- | variant | `primary \| neutral \| danger \| success \| warning \| info \| away` | `primary` |
22
- | appearance | `solid \| soft \| outline \| default` (solid = filled, soft/outline/default = quieter surfaces) | `solid` |
23
-
24
- Extends `React.ComponentProps<"div">`.
25
-
26
- ## ToastProgress props
27
-
28
- | Prop | Type | Default |
29
- | --- | --- | --- |
30
- | value | `number` | - |
31
- | duration | `number` (CSS tween duration per value change (default 150ms); for a lifetime countdown set it to the toast's full lifetime in ms) | `150` |
32
-
33
- Extends `React.ComponentProps<"div">`.
34
-
35
- ## Examples
36
-
37
- From `toast-demo`:
38
-
39
- ```tsx
40
- import { RiInformationFill } from "@create-ui/assets/icons"
41
-
42
- import {
43
- Toast,
44
- ToastBody,
45
- ToastContent,
46
- ToastDescription,
47
- ToastIcon,
48
- ToastTitle,
49
- } from "@/components/ui/toast"
50
-
51
- export default function ToastDemo() {
52
- return (
53
- <Toast>
54
- <ToastBody>
55
- <ToastIcon>
56
- <RiInformationFill />
57
- </ToastIcon>
58
- <ToastContent>
59
- <ToastTitle>New update available</ToastTitle>
60
- <ToastDescription>Version 2.1 is ready to install.</ToastDescription>
61
- </ToastContent>
62
- </ToastBody>
63
- </Toast>
64
- )
65
- }
66
- ```
67
-
68
- From `toast-with-progress`:
69
-
70
- ```tsx
71
- "use client"
72
-
73
- import * as React from "react"
74
- import { RiInformationFill } from "@create-ui/assets/icons"
75
-
76
- import { Button } from "@/components/ui/button"
77
- import {
78
- Toast,
79
- ToastBody,
80
- ToastContent,
81
- ToastDescription,
82
- ToastIcon,
83
- ToastProgress,
84
- ToastTitle,
85
- } from "@/components/ui/toast"
86
-
87
- const DURATION_MS = 5000
88
-
89
- export default function ToastWithProgress() {
90
- const [visible, setVisible] = React.useState(true)
91
- const [progress, setProgress] = React.useState(0)
92
-
93
- React.useEffect(() => {
94
- if (!visible) return
95
-
96
- const raf = requestAnimationFrame(() => setProgress(100))
97
- const timeout = setTimeout(() => setVisible(false), DURATION_MS)
98
-
99
- return () => {
100
- cancelAnimationFrame(raf)
101
- clearTimeout(timeout)
102
- }
103
- }, [visible])
104
-
105
- if (!visible) {
106
- return (
107
- <Button
108
- variant="neutral-light"
109
- appearance="outline"
110
- onClick={() => {
111
- setProgress(0)
112
- setVisible(true)
113
- }}
114
- >
115
- Show toast again
116
- </Button>
117
- )
118
- }
119
-
120
- return (
121
- <Toast variant="info" appearance="soft">
122
- <ToastBody>
123
- <ToastIcon>
124
- <RiInformationFill />
125
- </ToastIcon>
126
- <ToastContent>
127
- <ToastTitle>Auto-dismissing in 5s</ToastTitle>
128
- <ToastDescription>
129
- The progress bar tracks the remaining lifetime of this toast.
130
- </ToastDescription>
131
- </ToastContent>
132
- </ToastBody>
133
- <ToastProgress value={progress} duration={DURATION_MS} />
134
- </Toast>
135
- )
136
- }
137
- ```
138
-
139
- More: `npx @create-ui/cli view toast` or MCP `get_item_examples_from_registries` with "toast-demo" / "toast-example".
140
-
141
- ## When to use
142
-
143
- Ephemeral, floating confirmation of an action ("Draft saved", "Copied"); render it in a screen-level fixed container. Not for status that belongs to a section (use `InlineAlert`), blocking confirm/cancel decisions (use `Dialog`), or per-field validation (use `Field` helper/error text).
144
-
145
- ## Gotchas
146
-
147
- - There is no `toast()` function, no `Toaster`, no app-level provider, no portal, no queue or positioning system. `Toast` is just the card; render active toasts from your own state into a fixed container. Do NOT install or import `sonner`.
148
- - Dismiss lifecycle: `ToastClose` starts a 300ms fade/scale exit; the root's `onDismiss` fires only after the transition ends, then the component renders `null`. Remove the toast from your list in `onDismiss`, not in `ToastClose`'s `onClick`. Once dismissed it stays hidden; re-showing requires a remount (state toggle or new `key`).
149
- - `ToastProgress` never ticks by itself and is `aria-hidden` (purely visual). For an auto-dismissing toast, set `duration` to the lifetime, flip `value` from 0 to 100 inside `requestAnimationFrame`, and pair it with a `setTimeout` that actually hides the toast:
150
-
151
- ```tsx
152
- React.useEffect(() => {
153
- const raf = requestAnimationFrame(() => setProgress(100))
154
- const timeout = setTimeout(() => setVisible(false), DURATION_MS)
155
- return () => { cancelAnimationFrame(raf); clearTimeout(timeout) }
156
- }, [])
157
- // <ToastProgress value={progress} duration={DURATION_MS} />
158
- ```
159
-
160
- - `ToastIcon`, `ToastDescription`, `ToastAction`, `ToastClose`, and `ToastProgress` read the Toast context, so they only style correctly inside `<Toast>`. Don't hand-set Button variants on `ToastAction`/`ToastClose` (the appearance-matched pairing is automatic) or color/size classes on the icon (the svg is auto-sized `size-5` and colored per variant/appearance).
161
- - The root is hard-coded `w-[410px] min-w-[300px]`; override the width via `className` for narrow viewports.
162
- - The root renders `role="status"` (polite live region); pass `role="alert"` for urgent messages. No Escape-key handling is wired; dismissal happens only through `ToastClose` (or `useToastContext().dismiss`).
@@ -1,63 +0,0 @@
1
- <!-- GENERATED FILE - do not edit. Source: registry/ui/tooltip.tsx. Regenerate with `pnpm skill:build`. Curated notes: apps/v4/scripts/skill-reference/notes/tooltip.md -->
2
-
3
- # tooltip
4
-
5
- Radix hover tooltip for any trigger element; five color variants, optional arrow, side and offset control
6
-
7
- Install: `npx @create-ui/cli add tooltip`
8
-
9
- ## Import
10
-
11
- ```tsx
12
- import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"
13
- ```
14
-
15
- Also exported: `tooltipContentVariants`
16
-
17
- ## TooltipContent props
18
-
19
- | Prop | Type | Default |
20
- | --- | --- | --- |
21
- | children | `ReactNode` | - |
22
- | className | `string` | - |
23
- | variant | `primary \| neutral \| inverse \| danger \| info` | `primary` |
24
- | showArrow | `boolean` (effective offset = sideOffset when true; sideOffset + 5 when false, so the chip keeps a visible gap without the caret) | `false` |
25
- | side | `top \| bottom \| left \| right` (defaults to bottom; shadcn/Radix default to top, do not assume top) | `bottom` |
26
- | sideOffset | `number` | `2.5` |
27
-
28
- Extends `React.ComponentProps<typeof TooltipPrimitive.Content>`.
29
-
30
- ## Examples
31
-
32
- From `tooltip-demo`:
33
-
34
- ```tsx
35
- "use client"
36
-
37
- import { Button } from "@/components/ui/button"
38
- import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"
39
-
40
- export default function TooltipDemo() {
41
- return (
42
- <Tooltip defaultOpen>
43
- <TooltipTrigger asChild>
44
- <Button appearance="outline" size="sm">
45
- Hover me
46
- </Button>
47
- </TooltipTrigger>
48
- <TooltipContent showArrow>Add to library</TooltipContent>
49
- </Tooltip>
50
- )
51
- }
52
- ```
53
-
54
- More: `npx @create-ui/cli view tooltip` or MCP `get_item_examples_from_registries` with "tooltip-demo" / "tooltip-example".
55
-
56
- ## When to use
57
- Tooltip is a short hover/focus hint for icon-only buttons, truncated labels, and similar read-only context. Content must stay brief: the chip caps at max-w-[200px] and wraps. For content with links, buttons, or inputs there is no popover component - put it inline; for a help icon next to a label use InfoTooltip; for post-action messages use Toast; for a persistent in-flow note use InlineAlert.
58
- ## Gotchas
59
- - Tooltip self-provides its Radix Provider and passes delayDuration (default 0) explicitly to both Provider and Root, so an ancestor TooltipProvider's delayDuration never reaches it. Set delay per instance: `<Tooltip delayDuration={400}>`. The exported TooltipProvider only matters for raw TooltipPrimitive.Root subtrees.
60
- - align is hardcoded to "center" and Omit-ed from the passthrough type; it cannot be overridden.
61
- - TooltipTrigger should use asChild wrapping a focusable registry element (Button, link); the trigger always gets an `inline-flex` class so the wrapped child lays out consistently.
62
- - TooltipArrow is internal and not exported; the only way to render the caret is `showArrow` on TooltipContent, and its fill auto-matches the chosen variant. Never try to style or compose the arrow separately.
63
- - InfoTooltip is a separate ready-made component for inline "what is this" affordances; do not hand-compose Tooltip around an info icon.