@rlx-ui/mcp 0.0.13 → 0.0.14

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.
@@ -1411,6 +1411,24 @@
1411
1411
  }
1412
1412
  ]
1413
1413
  },
1414
+ {
1415
+ "name": "Selectable Button",
1416
+ "exportName": "SelectableButton",
1417
+ "packageName": "@rlx-components/selectable-button",
1418
+ "version": "0.0.0",
1419
+ "slug": "selectable-button",
1420
+ "category": "component",
1421
+ "sourceCode": "\"use client\";\n\nimport { Button } from \"@rlx-widgets/button\";\nimport { cn } from \"@rlx-widgets/base\";\nimport { useMemo } from \"react\";\nimport type { SelectableButtonProps } from \"./types\";\n\nexport const SelectableButton = ({\n selected,\n children,\n icon,\n className,\n size = \"sm\",\n ...props\n}: SelectableButtonProps) => {\n const buttonClassName = useMemo(\n () =>\n cn(\n \"rounded-lg border transition-all duration-200\",\n !selected &&\n \"bg-card text-foreground border-border hover:border-primary/50! hover:bg-muted/50 hover:text-foreground dark:hover:border-primary/50!\",\n selected &&\n \"bg-primary text-primary-foreground border-primary hover:bg-primary hover:text-primary-foreground shadow-sm\",\n className\n ),\n [selected, className]\n );\n\n return (\n <Button\n variant={selected ? \"default\" : \"outline\"}\n size={size}\n className={buttonClassName}\n {...props}\n >\n {icon}\n {children}\n </Button>\n );\n};\n",
1422
+ "demos": [
1423
+ {
1424
+ "name": "default",
1425
+ "code": "\"use client\";\n\nimport { SelectableButton } from \"@rlx-components/selectable-button\";\nimport { CheckIcon, StarIcon, HeartIcon } from \"lucide-react\";\nimport { useState } from \"react\";\n\nexport const Preview = () => {\n const [selected1, setSelected1] = useState(false);\n const [selected2, setSelected2] = useState(true);\n const [selected3, setSelected3] = useState(false);\n\n return (\n <div className=\"w-full max-w-md space-y-6\">\n <div className=\"space-y-2\">\n <h3 className=\"text-sm font-medium\">With icon</h3>\n <div className=\"flex gap-2\">\n <SelectableButton\n selected={selected1}\n onClick={() => setSelected1(!selected1)}\n icon={<CheckIcon className=\"size-4\" />}\n >\n Option 1\n </SelectableButton>\n <SelectableButton\n selected={selected2}\n onClick={() => setSelected2(!selected2)}\n icon={<StarIcon className=\"size-4\" />}\n >\n Option 2\n </SelectableButton>\n </div>\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-sm font-medium\">Without icon</h3>\n <div className=\"flex gap-2\">\n <SelectableButton\n selected={selected3}\n onClick={() => setSelected3(!selected3)}\n >\n Select me\n </SelectableButton>\n <SelectableButton selected={true} disabled>\n Disabled\n </SelectableButton>\n </div>\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-sm font-medium\">Different sizes</h3>\n <div className=\"flex items-center gap-2\">\n <SelectableButton selected={false} size=\"sm\" icon={<HeartIcon className=\"size-3\" />}>\n Small\n </SelectableButton>\n <SelectableButton selected={true} size=\"default\">\n Default\n </SelectableButton>\n <SelectableButton selected={false} size=\"lg\">\n Large\n </SelectableButton>\n </div>\n </div>\n </div>\n );\n};\n\n"
1426
+ }
1427
+ ],
1428
+ "sourceFiles": {
1429
+ "types/SelectableButtonProps.t.ts": "import { ComponentProps, ReactNode } from \"react\";\nimport { VariantProps } from \"class-variance-authority\";\nimport { buttonVariants } from \"@rlx-widgets/button\";\n\nexport type SelectableButtonProps = ComponentProps<\"button\"> & {\n selected: boolean;\n icon?: ReactNode;\n size?: VariantProps<typeof buttonVariants>[\"size\"];\n};\n\n"
1430
+ }
1431
+ },
1414
1432
  {
1415
1433
  "name": "Shiki Code Block",
1416
1434
  "exportName": "ShikiCodeBlock",
@@ -1591,5 +1609,5 @@
1591
1609
  "sourceCode": "export const isValidDate = (date: Date) => {\n return !Number.isNaN(date.getTime());\n};\n\nexport default isValidDate;\n"
1592
1610
  }
1593
1611
  ],
1594
- "extractedAt": "2025-12-07T22:58:51.259Z"
1612
+ "extractedAt": "2025-12-08T00:08:04.743Z"
1595
1613
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rlx-ui/mcp",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "MCP (Model Context Protocol) Server for RLX UI components",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rlx-ui/mcp",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "MCP (Model Context Protocol) Server for RLX UI components",
5
5
  "publishConfig": {
6
6
  "access": "public"