werewolf-ui 0.1.0-alpha.2 → 0.1.0-alpha.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 CHANGED
@@ -144,6 +144,24 @@ only http(s) URLs and waits at most 5 seconds. Failure keeps exit 0, sets
144
144
  `opened: false` and adds a `WW_OPEN` warning. All opener branches are tested with
145
145
  an injected spawn; a real browser launch is not part of the suite.
146
146
 
147
+ ## Remote registries and login (pending review)
148
+
149
+ ```bash
150
+ npx werewolf-ui login https://acme.example/acme
151
+ npx werewolf-ui add @acme/settings-page --yes --json
152
+ npx werewolf-ui logout @acme
153
+ ```
154
+
155
+ `add @<namespace>/<item>` fetches the item from the registry configured under
156
+ `registries` in `werewolf.json` (or `components.json`), sends a key as a bearer
157
+ header, installs the built-in components it names from the bundled catalog, then
158
+ runs the same write plan, import mapping and rollback as any other add. `login`
159
+ signs in with the OAuth device flow, saves the key in the user config folder
160
+ (never in the app) and adds the registry to `werewolf.json`, with the key read
161
+ from an environment variable for CI. Only names with a namespace other than
162
+ `@werewolf` touch the network. Full protocol and limits:
163
+ [docs/cli.md](../../docs/cli.md#remote-registries).
164
+
147
165
  From any directory:
148
166
 
149
167
  ```bash
@@ -356,7 +374,7 @@ The selection applies only to component files in this request and a missing
356
374
  generated output being restored. It cannot overwrite seed, config, app CSS, agent
357
375
  instructions or ownership records. Existing theme edits stay intact.
358
376
 
359
- The internal planAdd({project,core,names}) returns {writes,dependencySpecs,componentNames}.
377
+ The internal planAdd({project,core,names}, io) returns {writes,dependencySpecs,componentNames,registryItems}.
360
378
  Writes use B2's WritePlan and ownership ledger. Conflict, byte, physical-target and
361
379
  root-confinement preflight runs before the package manager. Compatible declared
362
380
  dependencies skip installation; incompatible declarations and differing exact pins
@@ -413,7 +431,7 @@ npm ci
413
431
  npm run build:cli
414
432
  npm pack --workspace werewolf-ui --pack-destination /absolute/path/to/output
415
433
  cd /absolute/path/to/consumer
416
- npm install /absolute/path/to/output/werewolf-ui-0.1.0-alpha.2.tgz --engine-strict
434
+ npm install /absolute/path/to/output/werewolf-ui-0.1.0-alpha.3.tgz --engine-strict
417
435
  ```
418
436
 
419
437
  The supported alpha layouts are Next.js app-router (app or src/app) and Vite React
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "dataVersion": "0.1.0-alpha.2",
3
+ "dataVersion": "0.1.0-alpha.3",
4
4
  "siteUrl": "https://www.werewolf-ui.dev",
5
5
  "items": [
6
6
  {
@@ -5024,7 +5024,7 @@
5024
5024
  "name": "group-avatar",
5025
5025
  "type": "registry:ui",
5026
5026
  "title": "GroupAvatar",
5027
- "description": "One circle the size of an Avatar for a group, split into tiles instead of stacked: one member fills it, two split it in halves, three take a half and two quarters, four or more take four quarters with +N for the rest. Use it for a group chat or a team.",
5027
+ "description": "One square the size of an Avatar for a group, holding its members as small round avatars that overlap, each cut out of the one under it by a ring: one member fills it, two sit corner to corner, three make a triangle, four or more fill the four corners with +N for the rest. Use it for a group chat or a team.",
5028
5028
  "categories": [
5029
5029
  "Data display"
5030
5030
  ],
@@ -5037,7 +5037,7 @@
5037
5037
  {
5038
5038
  "path": "registry/werewolf/ui/group-avatar.tsx",
5039
5039
  "type": "registry:ui",
5040
- "content": "import * as React from \"react\"\n\nimport { cn } from \"@/registry/werewolf/lib/utils\"\nimport { avatarImageClassName, avatarVariants } from \"@/registry/werewolf/ui/avatar\"\n\ntype Hue = \"gray\" | \"red\" | \"orange\" | \"yellow\" | \"green\" | \"teal\" | \"blue\" | \"purple\" | \"pink\"\n\nexport type GroupAvatarMember = {\n /** The member's name. Its first letter shows when there is no src or initials. */\n name: string\n /** A photo URL. */\n src?: string\n /** One or two initials; the first one shows in the tile. */\n initials?: string\n /** The soft hue pair of the tile. Default: blue, green, purple, orange, in member order. */\n color?: Hue\n}\n\n// Token bindings mirror components/group-avatar.spec.json. One circle the size of an Avatar for a group, split\n// into tiles rather than stacked: one member fills it, two split it down the middle, three take a half and two\n// quarters, four or more take four quarters, the last one \"+N\" for the rest. The tiles are Avatar's soft hue pairs or\n// photos, with a spacing-2xs gap that shows the surface behind.\nexport const groupAvatarRootClassName = \"grid shrink-0 gap-2xs overflow-hidden rounded-full font-sans font-medium select-none\"\nconst SIZES = { sm: \"size-6\", md: \"size-8\", lg: \"size-10\" } as const\nconst LAYOUTS = [\"\", \"\", \"grid-cols-2\", \"grid-cols-2 grid-rows-2\", \"grid-cols-2 grid-rows-2\"]\nexport const groupAvatarTileClassName = \"flex size-full min-h-0 min-w-0 items-center justify-center overflow-hidden rounded-none text-xs leading-none\"\nconst DEFAULT_HUES: Hue[] = [\"blue\", \"green\", \"purple\", \"orange\"]\n// A lone member fills the circle at Avatar's own initials size.\nconst WHOLE_TEXT = { sm: \"text-xs\", md: \"text-sm\", lg: \"text-md\" } as const\n// The circle cuts each tile's outer corner, so a letter sits toward the center: halves at their inner edge, quarters\n// in their inner corner. Logical alignment, so it holds right to left. By tile count, then tile index.\nconst PLACE: Record<number, string[]> = {\n 2: [\"justify-end pe-2xs\", \"justify-start ps-2xs\"],\n 3: [\"justify-end pe-2xs\", \"items-end justify-start\", \"items-start justify-start\"],\n 4: [\"items-end justify-end\", \"items-end justify-start\", \"items-start justify-end\", \"items-start justify-start\"],\n}\n\nconst firstLetter = (member: GroupAvatarMember) => Array.from((member.initials ?? member.name).trim())[0]?.toUpperCase() ?? \"\"\n\nexport type GroupAvatarProps = Omit<React.ComponentPropsWithoutRef<\"div\">, \"children\"> & {\n /** The members to show. The first three or four show; the rest are counted. */\n members: readonly GroupAvatarMember[]\n /** The name of the group: \"Design team\". Pass \"\" when the name is written next to it. */\n alt: string\n size?: \"sm\" | \"md\" | \"lg\"\n}\n\nfunction GroupAvatar({ members, alt, size = \"md\", className, ...props }: GroupAvatarProps) {\n const many = members.length > 4\n const shown = members.slice(0, many ? 3 : 4)\n const tiles = shown.length + (many ? 1 : 0)\n const rest = members.length - 3\n // In the 24px circle a split tile is narrower than a letter, so it shows its color alone.\n const letters = size !== \"sm\" || tiles === 1\n return (\n <div\n data-slot=\"group-avatar\"\n data-size={size}\n data-count={tiles}\n role={alt ? \"img\" : undefined}\n aria-label={alt || undefined}\n aria-hidden={alt ? undefined : true}\n className={cn(groupAvatarRootClassName, SIZES[size], LAYOUTS[tiles], className)}\n {...props}\n >\n {shown.map((member, index) => (\n <span\n key={`${index}${member.name}`}\n data-slot=\"group-avatar-tile\"\n className={cn(\n avatarVariants({ color: member.color ?? DEFAULT_HUES[index % DEFAULT_HUES.length], size }),\n groupAvatarTileClassName,\n tiles === 1 && WHOLE_TEXT[size],\n tiles === 3 && index === 0 && \"row-span-2\",\n PLACE[tiles]?.[index]\n )}\n >\n {member.src ? <img src={member.src} alt=\"\" className={avatarImageClassName} /> : letters ? firstLetter(member) : null}\n </span>\n ))}\n {many && (\n <span data-slot=\"group-avatar-tile\" data-more=\"\" className={cn(avatarVariants({ color: \"gray\", size }), groupAvatarTileClassName, PLACE[4][3], \"tabular-nums\")}>\n {/* A quarter of the 40px circle holds two characters, of the 32px one a single digit. */}\n {letters ? (size === \"lg\" ? (rest > 9 ? \"9+\" : `+${rest}`) : rest > 9 ? \"+\" : rest) : null}\n </span>\n )}\n </div>\n )\n}\n\nexport { GroupAvatar }\n"
5040
+ "content": "import * as React from \"react\"\n\nimport { cn } from \"@/registry/werewolf/lib/utils\"\nimport { avatarImageClassName, avatarVariants } from \"@/registry/werewolf/ui/avatar\"\n\ntype Hue = \"gray\" | \"red\" | \"orange\" | \"yellow\" | \"green\" | \"teal\" | \"blue\" | \"purple\" | \"pink\"\n\nexport type GroupAvatarMember = {\n /** The member's name. Its first letter shows when there is no src or initials. */\n name: string\n /** A photo URL. */\n src?: string\n /** One or two initials; the first one shows in the tile. */\n initials?: string\n /** The soft hue pair of the tile. Default: blue, green, purple, orange, in member order. */\n color?: Hue\n}\n\n// Token bindings mirror components/group-avatar.spec.json. One square the size of an Avatar for a group, holding the\n// members as small round avatars that overlap: one member fills it, two sit corner to corner, three make a triangle,\n// four or more fill the four corners, the last one \"+N\" for the rest. Later members are painted over earlier ones,\n// with no z-index. Each circle is cut out of the one under it by a 2px ring in the color behind the group: the same\n// --ring-offset-color AvatarStack and the focus ring's gap use (the page by default; Card, Popover and other raised\n// panels set their own), so no color is guessed.\nexport const groupAvatarRootClassName = \"relative inline-block shrink-0 font-sans font-medium select-none\"\nconst SIZES = { sm: \"size-6\", md: \"size-8\", lg: \"size-10\" } as const\nexport const groupAvatarTileClassName = \"absolute overflow-hidden rounded-full text-xs leading-none\"\nconst RING = \"shadow-[0_0_0_var(--spacing-2xs)_var(--ring-offset-color,var(--color-background-page))]\"\nconst DEFAULT_HUES: Hue[] = [\"blue\", \"green\", \"purple\", \"orange\"]\n// A lone member fills the square at Avatar's own initials size.\nconst WHOLE_TEXT = { sm: \"text-xs\", md: \"text-sm\", lg: \"text-md\" } as const\n// Where each circle sits, by tile count, then tile index. Two circles take two thirds of the side, three and four a\n// little over half, so neighbors overlap by about a tenth. Logical insets, so it mirrors right to left.\nconst PLACE: Record<number, string[]> = {\n 1: [\"inset-0 size-full\"],\n 2: [\"top-0 start-0 size-[64%]\", \"bottom-0 end-0 size-[64%]\"],\n 3: [\"top-0 start-[22%] size-[56%]\", \"bottom-0 start-0 size-[56%]\", \"bottom-0 end-0 size-[56%]\"],\n 4: [\"top-0 start-0 size-[56%]\", \"top-0 end-0 size-[56%]\", \"bottom-0 start-0 size-[56%]\", \"bottom-0 end-0 size-[56%]\"],\n}\n\nconst firstLetter = (member: GroupAvatarMember) => Array.from((member.initials ?? member.name).trim())[0]?.toUpperCase() ?? \"\"\n\nexport type GroupAvatarProps = Omit<React.ComponentPropsWithoutRef<\"div\">, \"children\"> & {\n /** The members to show. The first three or four show; the rest are counted. */\n members: readonly GroupAvatarMember[]\n /** The name of the group: \"Design team\". Pass \"\" when the name is written next to it. */\n alt: string\n size?: \"sm\" | \"md\" | \"lg\"\n}\n\nfunction GroupAvatar({ members, alt, size = \"md\", className, ...props }: GroupAvatarProps) {\n const many = members.length > 4\n const shown = members.slice(0, many ? 3 : 4)\n const tiles = shown.length + (many ? 1 : 0)\n const rest = members.length - 3\n // In the 24px square a small circle is narrower than a letter, so it shows its color alone.\n const letters = size !== \"sm\" || tiles === 1\n return (\n <div\n data-slot=\"group-avatar\"\n data-size={size}\n data-count={tiles}\n role={alt ? \"img\" : undefined}\n aria-label={alt || undefined}\n aria-hidden={alt ? undefined : true}\n className={cn(groupAvatarRootClassName, SIZES[size], className)}\n {...props}\n >\n {shown.map((member, index) => (\n <span\n key={`${index}${member.name}`}\n data-slot=\"group-avatar-tile\"\n className={cn(\n avatarVariants({ color: member.color ?? DEFAULT_HUES[index % DEFAULT_HUES.length], size }),\n groupAvatarTileClassName,\n PLACE[tiles][index],\n tiles === 1 ? WHOLE_TEXT[size] : RING\n )}\n >\n {member.src ? <img src={member.src} alt=\"\" className={avatarImageClassName} /> : letters ? firstLetter(member) : null}\n </span>\n ))}\n {many && (\n <span data-slot=\"group-avatar-tile\" data-more=\"\" className={cn(avatarVariants({ color: \"gray\", size }), groupAvatarTileClassName, PLACE[4][3], RING, \"tabular-nums\")}>\n {/* A small circle in the 40px square holds two characters, in the 32px one a single digit. */}\n {letters ? (size === \"lg\" ? (rest > 9 ? \"9+\" : `+${rest}`) : rest > 9 ? \"+\" : rest) : null}\n </span>\n )}\n </div>\n )\n}\n\nexport { GroupAvatar }\n"
5041
5041
  }
5042
5042
  ],
5043
5043
  "dependencies": [],
@@ -5046,7 +5046,7 @@
5046
5046
  "$schema": "./spec.schema.json",
5047
5047
  "name": "group-avatar",
5048
5048
  "title": "GroupAvatar",
5049
- "description": "One circle the size of an Avatar for a group, split into tiles instead of stacked: one member fills it, two split it in halves, three take a half and two quarters, four or more take four quarters with +N for the rest. Use it for a group chat or a team.",
5049
+ "description": "One square the size of an Avatar for a group, holding its members as small round avatars that overlap, each cut out of the one under it by a ring: one member fills it, two sit corner to corner, three make a triangle, four or more fill the four corners with +N for the rest. Use it for a group chat or a team.",
5050
5050
  "status": "draft",
5051
5051
  "element": "div",
5052
5052
  "a11y": {
@@ -5054,21 +5054,21 @@
5054
5054
  "keyboard": [],
5055
5055
  "notes": [
5056
5056
  "alt names the group (EN `Design team`) on the circle, one image for screen readers. Pass alt=\"\" when the name is written next to it.",
5057
- "The tiles, their letters and photos are hidden from screen readers; the group's name is what counts.",
5057
+ "The circles, their letters and photos are hidden from screen readers; the group's name is what counts.",
5058
5058
  "The hues are decoration, as on Avatar."
5059
5059
  ]
5060
5060
  },
5061
5061
  "anatomy": {
5062
- "root": "The circle: 24, 32 or 40px, cut round, holding a grid of tiles with a 2px gap.",
5063
- "tile": "One member: their photo, or the first letter of their initials or name on a soft hue pair. In the 24px circle a split tile shows its color alone.",
5064
- "more": "The gray tile with +N (9+ above 9) when the group has more than four members."
5062
+ "root": "The square: 24, 32 or 40px, holding the overlapping circles.",
5063
+ "tile": "One member as a circle: their photo, or the first letter of their initials or name on a soft hue pair. A 2px ring in the color behind the group cuts it out of the one under it. In the 24px square a small circle shows its color alone.",
5064
+ "more": "The gray circle with +N (9+ above 9) when the group has more than four members."
5065
5065
  },
5066
5066
  "props": {
5067
5067
  "members": {
5068
5068
  "type": "object",
5069
5069
  "tsType": "{ name: string; src?: string; initials?: string; color?: \"gray\" | \"red\" | \"orange\" | \"yellow\" | \"green\" | \"teal\" | \"blue\" | \"purple\" | \"pink\" }[]",
5070
5070
  "required": true,
5071
- "description": "The members to show, in order. Up to four show; past four, three show and the fourth tile counts the rest. color defaults to blue, green, purple, orange."
5071
+ "description": "The members to show, in order; later ones are painted over earlier ones. Up to four show; past four, three show and the fourth circle counts the rest. color defaults to blue, green, purple, orange."
5072
5072
  },
5073
5073
  "alt": {
5074
5074
  "type": "string",
@@ -5092,12 +5092,11 @@
5092
5092
  "tokens": {
5093
5093
  "base": {
5094
5094
  "root": {
5095
- "border-radius": "radius-full",
5096
- "gap": "spacing-2xs",
5097
5095
  "font-family": "font-family-sans",
5098
5096
  "font-weight": "font-weight-medium"
5099
5097
  },
5100
5098
  "tile": {
5099
+ "border-radius": "radius-full",
5101
5100
  "font-size": "font-size-xs"
5102
5101
  }
5103
5102
  }
@@ -5110,8 +5109,8 @@
5110
5109
  ],
5111
5110
  "dont": [
5112
5111
  "Do not use it for a list of people to tell apart; use AvatarStack.",
5113
- "Do not use sm for groups of three or more where letters matter; the tiles are too small for them.",
5114
- "Do not put a status dot on a tile; put it on the circle."
5112
+ "Do not use sm for groups of three or more where letters matter; the circles are too small for them.",
5113
+ "Do not put a status dot on one member's circle; put it on the group."
5115
5114
  ]
5116
5115
  },
5117
5116
  "examples": [
@@ -5129,8 +5128,8 @@
5129
5128
  },
5130
5129
  "usage": {
5131
5130
  "when": [
5132
- "Stand for a group chat or a team with one circle, such as in ConversationList.",
5133
- "Show a group's members inside the space of one Avatar."
5131
+ "Stand for a group chat or a team in the space of one Avatar, such as in ConversationList.",
5132
+ "Show a group's members as small overlapping circles."
5134
5133
  ],
5135
5134
  "whenNot": [
5136
5135
  "Show several people side by side. Use AvatarStack.",
@@ -14620,19 +14619,19 @@
14620
14619
  "examples": [
14621
14620
  {
14622
14621
  "title": "File row",
14623
- "code": "<div className=\"flex w-64 max-w-full flex-col gap-md\">\n <div role=\"group\" aria-label=\"File actions\" className=\"flex gap-sm\">\n <Button size=\"sm\" variant=\"outline\">Rename</Button>\n <Button size=\"sm\" variant=\"outline\">Delete</Button>\n </div>\n <ContextMenu>\n <ContextMenuTrigger className=\"rounded-container border border-dashed border-border px-lg py-xl\" aria-label=\"More actions for report.pdf\">\n <p className=\"text-sm font-medium\">report.pdf</p>\n <p className=\"text-xs text-text-secondary\">Right click, long press or Shift+F10</p>\n </ContextMenuTrigger>\n <ContextMenuContent aria-label=\"File actions\">\n <ContextMenuItem leadingIcon={<IconPencil size={16} />} shortcut=\"F2\">Rename</ContextMenuItem>\n <ContextMenuItem disabled>Duplicate</ContextMenuItem>\n <ContextMenuSeparator />\n <ContextMenuItem destructive leadingIcon={<IconTrash size={16} />}>Delete</ContextMenuItem>\n </ContextMenuContent>\n </ContextMenu>\n</div>"
14622
+ "code": "<div className=\"flex w-64 max-w-full flex-col gap-md\">\n <ContextMenu>\n <ContextMenuTrigger className=\"rounded-container border border-dashed border-border px-lg py-xl\" aria-label=\"More actions for report.pdf\">\n <p className=\"text-sm font-medium\">report.pdf</p>\n <p className=\"text-xs text-text-secondary\">Right click, long press or Shift+F10</p>\n </ContextMenuTrigger>\n <ContextMenuContent aria-label=\"File actions\">\n <ContextMenuItem leadingIcon={<IconPencil size={16} />} shortcut=\"F2\">Rename</ContextMenuItem>\n <ContextMenuItem disabled>Duplicate</ContextMenuItem>\n <ContextMenuSeparator />\n <ContextMenuItem destructive leadingIcon={<IconTrash size={16} />}>Delete</ContextMenuItem>\n </ContextMenuContent>\n </ContextMenu>\n</div>"
14624
14623
  },
14625
14624
  {
14626
14625
  "title": "Checkbox options",
14627
- "code": "<div className=\"flex w-64 max-w-full flex-col gap-md\">\n <div role=\"group\" aria-label=\"File actions\" className=\"flex gap-sm\">\n <Button size=\"sm\" variant=\"outline\">Rename</Button>\n <Button size=\"sm\" variant=\"outline\">Delete</Button>\n </div>\n <ContextMenu>\n <ContextMenuTrigger className=\"rounded-container border border-dashed border-border px-lg py-xl\" aria-label=\"More actions for report.pdf\">\n <p className=\"text-sm font-medium\">report.pdf</p>\n <p className=\"text-xs text-text-secondary\">Right click, long press or Shift+F10</p>\n </ContextMenuTrigger>\n <ContextMenuContent aria-label=\"File actions\">\n <ContextMenuLabel>View</ContextMenuLabel>\n <ContextMenuCheckboxItem checked={menuPinned} onCheckedChange={setMenuPinned}>Pin to top</ContextMenuCheckboxItem>\n <ContextMenuSeparator />\n <ContextMenuItem leadingIcon={<IconPencil size={16} />} shortcut=\"F2\">Rename</ContextMenuItem>\n <ContextMenuItem disabled>Duplicate</ContextMenuItem>\n <ContextMenuSeparator />\n <ContextMenuItem destructive leadingIcon={<IconTrash size={16} />}>Delete</ContextMenuItem>\n </ContextMenuContent>\n </ContextMenu>\n</div>"
14626
+ "code": "<div className=\"flex w-64 max-w-full flex-col gap-md\">\n <ContextMenu>\n <ContextMenuTrigger className=\"rounded-container border border-dashed border-border px-lg py-xl\" aria-label=\"More actions for report.pdf\">\n <p className=\"text-sm font-medium\">report.pdf</p>\n <p className=\"text-xs text-text-secondary\">Right click, long press or Shift+F10</p>\n </ContextMenuTrigger>\n <ContextMenuContent aria-label=\"File actions\">\n <ContextMenuLabel>View</ContextMenuLabel>\n <ContextMenuCheckboxItem checked={menuPinned} onCheckedChange={setMenuPinned}>Pin to top</ContextMenuCheckboxItem>\n <ContextMenuSeparator />\n <ContextMenuItem leadingIcon={<IconPencil size={16} />} shortcut=\"F2\">Rename</ContextMenuItem>\n <ContextMenuItem disabled>Duplicate</ContextMenuItem>\n <ContextMenuSeparator />\n <ContextMenuItem destructive leadingIcon={<IconTrash size={16} />}>Delete</ContextMenuItem>\n </ContextMenuContent>\n </ContextMenu>\n</div>"
14628
14627
  },
14629
14628
  {
14630
14629
  "title": "Radio options",
14631
- "code": "<div className=\"flex w-64 max-w-full flex-col gap-md\">\n <div role=\"group\" aria-label=\"File actions\" className=\"flex gap-sm\">\n <Button size=\"sm\" variant=\"outline\">Rename</Button>\n <Button size=\"sm\" variant=\"outline\">Delete</Button>\n </div>\n <ContextMenu>\n <ContextMenuTrigger className=\"rounded-container border border-dashed border-border px-lg py-xl\" aria-label=\"More actions for report.pdf\">\n <p className=\"text-sm font-medium\">report.pdf</p>\n <p className=\"text-xs text-text-secondary\">Right click, long press or Shift+F10</p>\n </ContextMenuTrigger>\n <ContextMenuContent aria-label=\"File actions\">\n <ContextMenuLabel>Sort by</ContextMenuLabel>\n <ContextMenuRadioGroup value={menuSort} onValueChange={setMenuSort}>\n <ContextMenuRadioItem value=\"name\">Name</ContextMenuRadioItem>\n <ContextMenuRadioItem value=\"date\">Date</ContextMenuRadioItem>\n </ContextMenuRadioGroup>\n <ContextMenuSeparator />\n <ContextMenuItem leadingIcon={<IconPencil size={16} />} shortcut=\"F2\">Rename</ContextMenuItem>\n <ContextMenuItem disabled>Duplicate</ContextMenuItem>\n <ContextMenuSeparator />\n <ContextMenuItem destructive leadingIcon={<IconTrash size={16} />}>Delete</ContextMenuItem>\n </ContextMenuContent>\n </ContextMenu>\n</div>"
14630
+ "code": "<div className=\"flex w-64 max-w-full flex-col gap-md\">\n <ContextMenu>\n <ContextMenuTrigger className=\"rounded-container border border-dashed border-border px-lg py-xl\" aria-label=\"More actions for report.pdf\">\n <p className=\"text-sm font-medium\">report.pdf</p>\n <p className=\"text-xs text-text-secondary\">Right click, long press or Shift+F10</p>\n </ContextMenuTrigger>\n <ContextMenuContent aria-label=\"File actions\">\n <ContextMenuLabel>Sort by</ContextMenuLabel>\n <ContextMenuRadioGroup value={menuSort} onValueChange={setMenuSort}>\n <ContextMenuRadioItem value=\"name\">Name</ContextMenuRadioItem>\n <ContextMenuRadioItem value=\"date\">Date</ContextMenuRadioItem>\n </ContextMenuRadioGroup>\n <ContextMenuSeparator />\n <ContextMenuItem leadingIcon={<IconPencil size={16} />} shortcut=\"F2\">Rename</ContextMenuItem>\n <ContextMenuItem disabled>Duplicate</ContextMenuItem>\n <ContextMenuSeparator />\n <ContextMenuItem destructive leadingIcon={<IconTrash size={16} />}>Delete</ContextMenuItem>\n </ContextMenuContent>\n </ContextMenu>\n</div>"
14632
14631
  },
14633
14632
  {
14634
14633
  "title": "Disabled area",
14635
- "code": "<div className=\"flex w-64 max-w-full flex-col gap-md\">\n <div role=\"group\" aria-label=\"File actions\" className=\"flex gap-sm\">\n <Button size=\"sm\" variant=\"outline\">Rename</Button>\n <Button size=\"sm\" variant=\"outline\">Delete</Button>\n </div>\n <ContextMenu>\n <ContextMenuTrigger disabled className=\"rounded-container border border-dashed border-border px-lg py-xl\" aria-label=\"More actions for report.pdf\">\n <p className=\"text-sm font-medium\">report.pdf</p>\n <p className=\"text-xs text-text-secondary\">Right click, long press or Shift+F10</p>\n </ContextMenuTrigger>\n <ContextMenuContent aria-label=\"File actions\">\n <ContextMenuItem leadingIcon={<IconPencil size={16} />} shortcut=\"F2\">Rename</ContextMenuItem>\n <ContextMenuItem disabled>Duplicate</ContextMenuItem>\n <ContextMenuSeparator />\n <ContextMenuItem destructive leadingIcon={<IconTrash size={16} />}>Delete</ContextMenuItem>\n </ContextMenuContent>\n </ContextMenu>\n</div>"
14634
+ "code": "<div className=\"flex w-64 max-w-full flex-col gap-md\">\n <ContextMenu>\n <ContextMenuTrigger disabled className=\"rounded-container border border-dashed border-border px-lg py-xl\" aria-label=\"More actions for report.pdf\">\n <p className=\"text-sm font-medium\">report.pdf</p>\n <p className=\"text-xs text-text-secondary\">Right click, long press or Shift+F10</p>\n </ContextMenuTrigger>\n <ContextMenuContent aria-label=\"File actions\">\n <ContextMenuItem leadingIcon={<IconPencil size={16} />} shortcut=\"F2\">Rename</ContextMenuItem>\n <ContextMenuItem disabled>Duplicate</ContextMenuItem>\n <ContextMenuSeparator />\n <ContextMenuItem destructive leadingIcon={<IconTrash size={16} />}>Delete</ContextMenuItem>\n </ContextMenuContent>\n </ContextMenu>\n</div>"
14636
14635
  }
14637
14636
  ],
14638
14637
  "stateAttributes": {