ui-lab-registry 0.3.2 → 0.3.4

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 (67) hide show
  1. package/dist/components/Button/examples/01-variants.d.ts.map +1 -1
  2. package/dist/components/Button/examples/01-variants.js.map +1 -1
  3. package/dist/components/Button/examples/02-multi-actions.d.ts +6 -0
  4. package/dist/components/Button/examples/02-multi-actions.d.ts.map +1 -0
  5. package/dist/components/Button/examples/02-multi-actions.js +12 -0
  6. package/dist/components/Button/examples/02-multi-actions.js.map +1 -0
  7. package/dist/components/Button/examples/03-joined-toggle.d.ts +6 -0
  8. package/dist/components/Button/examples/03-joined-toggle.d.ts.map +1 -0
  9. package/dist/components/Button/examples/03-joined-toggle.js +15 -0
  10. package/dist/components/Button/examples/03-joined-toggle.js.map +1 -0
  11. package/dist/components/Button/examples/04-sub-stack-actions.d.ts +6 -0
  12. package/dist/components/Button/examples/04-sub-stack-actions.d.ts.map +1 -0
  13. package/dist/components/Button/examples/04-sub-stack-actions.js +15 -0
  14. package/dist/components/Button/examples/04-sub-stack-actions.js.map +1 -0
  15. package/dist/components/Button/examples/05-split-action-button.d.ts +6 -0
  16. package/dist/components/Button/examples/05-split-action-button.d.ts.map +1 -0
  17. package/dist/components/Button/examples/05-split-action-button.js +42 -0
  18. package/dist/components/Button/examples/05-split-action-button.js.map +1 -0
  19. package/dist/components/Button/examples/index.d.ts +8 -0
  20. package/dist/components/Button/examples/index.d.ts.map +1 -1
  21. package/dist/components/Button/examples/index.js +8 -0
  22. package/dist/components/Button/examples/index.js.map +1 -1
  23. package/dist/components/Button/examples.json +27 -1
  24. package/dist/components/Button/index.d.ts.map +1 -1
  25. package/dist/components/Button/index.js +8 -0
  26. package/dist/components/Button/index.js.map +1 -1
  27. package/dist/generated-data.d.ts.map +1 -1
  28. package/dist/generated-data.js +101 -140
  29. package/dist/generated-data.js.map +1 -1
  30. package/dist/generated-styles.d.ts.map +1 -1
  31. package/dist/generated-styles.js +142 -76
  32. package/dist/generated-styles.js.map +1 -1
  33. package/dist/generated-styles.json +142 -76
  34. package/dist/patterns/layout/media-object/metadata.json +1 -1
  35. package/dist/patterns/layout/media-object/variations/lg/index.js +1 -1
  36. package/dist/patterns/layout/media-object/variations/lg/index.js.map +1 -1
  37. package/dist/registry.d.ts.map +1 -1
  38. package/dist/registry.js +38 -12
  39. package/dist/registry.js.map +1 -1
  40. package/dist/sections/CTA/index.js +1 -1
  41. package/dist/sections/CTA/index.js.map +1 -1
  42. package/package.json +2 -2
  43. package/src/components/Anchor/metadata.json +1 -1
  44. package/src/components/Button/examples/01-variants.tsx +1 -1
  45. package/src/components/Button/examples/02-multi-actions.tsx +20 -0
  46. package/src/components/Button/examples/03-joined-toggle.tsx +32 -0
  47. package/src/components/Button/examples/04-sub-stack-actions.tsx +29 -0
  48. package/src/components/Button/examples/05-split-action-button.tsx +108 -0
  49. package/src/components/Button/examples/index.ts +8 -0
  50. package/src/components/Button/examples.json +27 -1
  51. package/src/components/Button/index.tsx +8 -0
  52. package/src/components/Color/metadata.json +1 -1
  53. package/src/components/Date/metadata.json +1 -1
  54. package/src/components/Expand/metadata.json +1 -1
  55. package/src/components/Frame/metadata.json +1 -1
  56. package/src/components/Gallery/metadata.json +1 -1
  57. package/src/components/Grid/metadata.json +1 -1
  58. package/src/components/Mask/metadata.json +1 -1
  59. package/src/components/Page/metadata.json +1 -1
  60. package/src/components/Path/metadata.json +1 -1
  61. package/src/components/Scroll/metadata.json +1 -1
  62. package/src/generated-data.ts +101 -140
  63. package/src/generated-styles.ts +142 -76
  64. package/src/patterns/layout/media-object/metadata.json +1 -1
  65. package/src/patterns/layout/media-object/variations/lg/index.tsx +1 -1
  66. package/src/registry.ts +38 -12
  67. package/src/sections/CTA/index.tsx +1 -1
@@ -26,7 +26,7 @@
26
26
  "id": "media-object-lg",
27
27
  "name": "Large",
28
28
  "description": "Larger icon area (w-14 h-14) for feature cards and marketing contexts.",
29
- "code": "function MediaObjectLg({ icon, title, description }) {\n return (\n <div className=\"flex items-start gap-4\">\n <div className=\"w-14 h-14 flex items-center justify-center rounded-xl bg-background-800 text-foreground-300 flex-shrink-0\">\n {icon}\n </div>\n <div className=\"min-w-0 pt-1\">\n <p className=\"text-base font-semibold text-foreground-100\">{title}</p>\n <p className=\"text-sm text-foreground-400 mt-1\">{description}</p>\n </div>\n </div>\n )\n}"
29
+ "code": "function MediaObjectLg({ icon, title, description }) {\n return (\n <div className=\"flex items-start gap-4\">\n <div className=\"w-14 h-14 flex items-center justify-center rounded-xl bg-background-800 text-foreground-300 flex-shrink-0\">\n {icon}\n </div>\n <div className=\"min-w-0 pt-1\">\n <p className=\"font-semibold text-foreground-100\">{title}</p>\n <p className=\"text-sm text-foreground-400 mt-1\">{description}</p>\n </div>\n </div>\n )\n}"
30
30
  }
31
31
  ]
32
32
  }
@@ -12,7 +12,7 @@ function MediaObjectLg({ icon, title, description }: { icon: React.ReactNode; ti
12
12
  <div className="flex items-start gap-4">
13
13
  <div className="w-14 h-14 flex items-center justify-center rounded-xl bg-background-800 text-foreground-300 flex-shrink-0">{icon}</div>
14
14
  <div className="min-w-0 pt-1">
15
- <p className="text-base font-semibold text-foreground-100">{title}</p>
15
+ <p className="font-semibold text-foreground-100">{title}</p>
16
16
  <p className="text-sm text-foreground-400 mt-1">{description}</p>
17
17
  </div>
18
18
  </div>
package/src/registry.ts CHANGED
@@ -4,7 +4,7 @@ export const componentRegistry: ComponentRegistry = {
4
4
  anchor: {
5
5
  id: "anchor",
6
6
  name: "Anchor",
7
- description: "Styled link with animated underline and hover popover preview.",
7
+ description: "Link with animated underline and popover preview.",
8
8
  category: "information",
9
9
  source: {
10
10
  "packageName": "ui-lab-components",
@@ -85,7 +85,33 @@ export const componentRegistry: ComponentRegistry = {
85
85
  relatedComponents: ["group"],
86
86
  tags: ["cta","interactive","primary-action"],
87
87
  accessibility: {"hasAriaSupport":true,"notes":["Supports keyboard navigation","Screen reader friendly"]},
88
- examples: [],
88
+ examples: [
89
+ {
90
+ "title": "Button Variants",
91
+ "description": "All available button variants including primary, default, secondary, outline, and ghost styles.",
92
+ "code": "import React from 'react'\nimport { Button } from 'ui-lab-components'\n\nexport default function Example() {\n return (\n <div className=\"p-4 space-y-8\">\n <div>\n <h3 className=\"text-sm font-semibold text-foreground-200 mb-3\">Primary Variant</h3>\n <div className=\"flex gap-2 flex-wrap\">\n <Button variant=\"primary\">Primary Button</Button>\n <Button variant=\"primary\" disabled>Disabled</Button>\n </div>\n </div>\n\n <div>\n <h3 className=\"text-sm font-semibold text-foreground-200 mb-3\">Default Variant</h3>\n <div className=\"flex gap-2 flex-wrap\">\n <Button variant=\"default\">Default Button</Button>\n <Button variant=\"default\" disabled>Disabled</Button>\n </div>\n </div>\n\n <div>\n <h3 className=\"text-sm font-semibold text-foreground-200 mb-3\">Secondary Variant</h3>\n <div className=\"flex gap-2 flex-wrap\">\n <Button variant=\"secondary\">Secondary Button</Button>\n <Button variant=\"secondary\" disabled>Disabled</Button>\n </div>\n </div>\n\n <div>\n <h3 className=\"text-sm font-semibold text-foreground-200 mb-3\">Outline Variant</h3>\n <div className=\"flex gap-2 flex-wrap\">\n <Button variant=\"outline\">Outline Button</Button>\n <Button variant=\"outline\" disabled>Disabled</Button>\n </div>\n </div>\n\n <div>\n <h3 className=\"text-sm font-semibold text-foreground-200 mb-3\">Ghost Variant</h3>\n <div className=\"flex gap-2 flex-wrap\">\n <Button variant=\"ghost\">Ghost Button</Button>\n <Button variant=\"ghost\" disabled>Disabled</Button>\n </div>\n </div>\n\n <div>\n <h3 className=\"text-sm font-semibold text-foreground-200 mb-3\">Sizes</h3>\n <div className=\"flex gap-2 flex-wrap items-center\">\n <Button size=\"sm\">Small</Button>\n <Button size=\"md\">Medium</Button>\n <Button size=\"lg\">Large</Button>\n </div>\n </div>\n </div>\n )\n}"
93
+ },
94
+ {
95
+ "title": "Multiple Actions",
96
+ "description": "A primary action button grouped with secondary actions and an options menu.",
97
+ "code": "\"use client\";\n\nimport React, { useState } from 'react'\nimport { Button, Flex } from 'ui-lab-components'\nimport { FaEllipsisVertical } from \"react-icons/fa6\";\n\nexport default function Example() {\n return (\n <Flex gap=\"xs\" className=\"w-110 *:not-last:flex-1\">\n <Button size=\"sm\" variant=\"primary\" >Subscribe</Button>\n <Button size=\"sm\" >Message</Button>\n <Button size=\"icon\" variant=\"outline\" icon={<FaEllipsisVertical />} />\n </Flex>\n );\n}"
98
+ },
99
+ {
100
+ "title": "Joined Toggle Buttons",
101
+ "description": "Multiple buttons grouped together for view/mode selection with active state indication.",
102
+ "code": "\"use client\";\n\nimport React, { useState } from 'react'\nimport { Button, Group, Divider, Input, Flex } from 'ui-lab-components'\nimport { FaList, FaGrip, FaTable, FaPlus } from \"react-icons/fa6\";\nimport { LuSearch } from \"react-icons/lu\";\n\nexport default function Example() {\n const [viewMode, setViewMode] = useState(\"list\");\n return (\n <Flex className=\"w-110\" gap=\"xs\" align=\"center\">\n <Input\n placeholder=\"Search items...\"\n icon={<LuSearch />}\n className=\"w-full\"\n />\n <Group orientation=\"horizontal\" value={viewMode} onChange={setViewMode}>\n <Group.Button size=\"icon\" value=\"list\"><FaList /></Group.Button>\n <Divider orientation=\"vertical\" />\n <Group.Button size=\"icon\" value=\"grid\"><FaGrip /></Group.Button>\n <Divider orientation=\"vertical\" />\n <Group.Button size=\"icon\" value=\"table\"><FaTable /></Group.Button>\n </Group>\n <Button size=\"sm\" icon={{ left: <FaPlus size={12} /> }} >New</Button>\n </Flex>\n );\n}"
103
+ },
104
+ {
105
+ "title": "Sub Stack Actions",
106
+ "description": "A collection of buttons and inputs arranged horizontally for grouped actions and filtering.",
107
+ "code": "\"use client\";\n\nimport React, { useState } from 'react'\nimport { Button, Group, Input, Badge, Flex } from 'ui-lab-components'\nimport { FaList, FaGrip, FaPlus } from \"react-icons/fa6\";\nimport { LuSearch } from \"react-icons/lu\";\n\nexport default function Example() {\n const [viewMode, setViewMode] = useState(\"list\");\n return (\n <Flex align=\"center\" gap=\"xs\" className=\"w-110\">\n <Group orientation=\"horizontal\" spacing=\"xs\" value={viewMode} onChange={setViewMode}>\n <Group.Button size=\"icon\" value=\"list\"><FaList /></Group.Button>\n <Group.Button size=\"icon\" value=\"grid\"><FaGrip /></Group.Button>\n </Group>\n <Input\n placeholder=\"Search...\"\n icon={<LuSearch />}\n hint={<Badge size=\"sm\" variant=\"secondary\" >Ctrl+K</Badge>}\n />\n <Button size=\"sm\" icon={{ right: <FaPlus size={12} /> }} >Upload</Button>\n </Flex>\n );\n}"
108
+ },
109
+ {
110
+ "title": "Split Action Button",
111
+ "description": "A primary action button joined with a Select dropdown that changes what the button does — useful for publish workflows with multiple delivery options.",
112
+ "code": "\"use client\";\n\nimport React, { useState } from 'react'\nimport { Button, Divider, Select, Searchable, Flex, Menu } from 'ui-lab-components'\nimport { FaSpinner, FaCheck, FaEllipsisVertical, FaHashtag, FaLock } from \"react-icons/fa6\";\n\ntype Channel = { value: string; label: string; description: string; private?: boolean };\n\nconst channels: Channel[] = [\n { value: \"general\", label: \"general\", description: \"General team discussion\" },\n { value: \"announcements\", label: \"announcements\", description: \"Important team updates\", private: true },\n { value: \"design\", label: \"design\", description: \"Design work and feedback\" },\n { value: \"engineering\", label: \"engineering\", description: \"Engineering discussions\" },\n { value: \"marketing\", label: \"marketing\", description: \"Marketing campaigns\" },\n { value: \"product\", label: \"product\", description: \"Product roadmap and planning\" },\n { value: \"random\", label: \"random\", description: \"Off-topic conversations\" },\n { value: \"releases\", label: \"releases\", description: \"Release announcements\", private: true },\n];\n\ntype PublishAction = \"publish\" | \"draft\" | \"schedule\";\n\nconst publishActions: Record<PublishAction, { label: string; variant: \"ghost\" | \"default\" | \"outline\" }> = {\n publish: { label: \"Publish Now\", variant: \"ghost\" },\n draft: { label: \"Save as Draft\", variant: \"ghost\" },\n schedule: { label: \"Schedule for Later\", variant: \"outline\" },\n};\n\nexport default function Example() {\n const [action, setAction] = useState<PublishAction>(\"publish\");\n const [status, setStatus] = useState<\"idle\" | \"loading\" | \"done\">(\"idle\");\n const [channel, setChannel] = useState<string | number | null>(\"general\");\n const selectedChannel = channels.find((c) => c.value === channel);\n const cfg = publishActions[action];\n\n const handleExecute = () => {\n setStatus(\"loading\");\n setTimeout(() => {\n setStatus(\"done\");\n setTimeout(() => setStatus(\"idle\"), 2000);\n }, 1500);\n };\n\n const leftIcon = status === \"loading\" ? <FaSpinner className=\"animate-spin\" /> : status === \"done\" ? <FaCheck /> : undefined;\n const label = status === \"loading\" ? \"Saving...\" : status === \"done\" ? \"Done!\" : cfg.label;\n\n return (\n <Flex gap=\"xs\" className=\"w-110\" align=\"center\">\n <Select\n selectedKey={channel}\n valueLabel={selectedChannel ? `#${selectedChannel.label}` : undefined}\n onSelectionChange={setChannel}\n className=\"flex h-10\"\n isDisabled={status !== \"idle\"}\n >\n <Searchable.Input className=\"w-50\" icon={<FaHashtag />} placeholder=\"Select channel...\" />\n <Select.Content>\n <Select.List>\n {channels.map((c) => (\n <Select.Item\n key={c.value}\n value={c.value}\n textValue={c.label}\n icon={c.private ? <FaLock className=\"h-3 w-3\" /> : <FaHashtag className=\"h-3 w-3\" />}\n description={c.description}\n >\n {c.label}\n </Select.Item>\n ))}\n </Select.List>\n </Select.Content>\n </Select>\n <Select className=\"flex h-10\" selectedKey={action} onSelectionChange={(key) => setAction(key as PublishAction)} isDisabled={status !== \"idle\"}>\n <Button\n onPress={handleExecute}\n variant=\"ghost\"\n size=\"sm\"\n className=\"w-full\"\n isDisabled={status !== \"idle\"}\n icon={leftIcon}\n >\n {label}\n </Button>\n <Divider orientation=\"vertical\" spacing=\"none\" />\n <Select.Trigger />\n <Select.Content>\n <Select.Item value=\"publish\" textValue=\"Publish Now\">Publish Now</Select.Item>\n <Select.Item value=\"draft\" textValue=\"Save as Draft\">Save as Draft</Select.Item>\n <Select.Item value=\"schedule\" textValue=\"Schedule for Later\">Schedule for Later</Select.Item>\n </Select.Content>\n </Select>\n <Menu type=\"pop-over\">\n <Menu.Trigger>\n <Button size=\"icon\" variant=\"outline\" icon={<FaEllipsisVertical />} />\n </Menu.Trigger>\n <Menu.Content offset={8} side=\"bottom\" align=\"end\">\n <Menu.Item>Preview</Menu.Item>\n <Menu.Item>View History</Menu.Item>\n <Menu.Item>Discard Changes</Menu.Item>\n </Menu.Content>\n </Menu>\n </Flex>\n );\n}"
113
+ }
114
+ ],
89
115
  },
90
116
 
91
117
  card: {
@@ -157,7 +183,7 @@ export const componentRegistry: ComponentRegistry = {
157
183
  color: {
158
184
  id: "color",
159
185
  name: "Color",
160
- description: "Custom color picker with 2D canvas, hue slider, and format selection.",
186
+ description: "Color picker with hue slider and format selection.",
161
187
  category: "input",
162
188
  experimental: true,
163
189
  source: {
@@ -230,7 +256,7 @@ export const componentRegistry: ComponentRegistry = {
230
256
  date: {
231
257
  id: "date",
232
258
  name: "Date",
233
- description: "Calendar date picker with keyboard navigation and accessibility.",
259
+ description: "Date picker with calendar and keyboard navigation.",
234
260
  category: "input",
235
261
  source: {
236
262
  "packageName": "ui-lab-components",
@@ -278,7 +304,7 @@ export const componentRegistry: ComponentRegistry = {
278
304
  expand: {
279
305
  id: "expand",
280
306
  name: "Expand",
281
- description: "Collapsible disclosure component for expanding and collapsing sections.",
307
+ description: "Collapsible component for expanding hidden sections.",
282
308
  category: "layout",
283
309
  source: {
284
310
  "packageName": "ui-lab-components",
@@ -322,7 +348,7 @@ export const componentRegistry: ComponentRegistry = {
322
348
  frame: {
323
349
  id: "frame",
324
350
  name: "Frame",
325
- description: "Decorative border/frame component with advanced SVG path support.",
351
+ description: "Decorative border with advanced SVG path support.",
326
352
  category: "container",
327
353
  source: {
328
354
  "packageName": "ui-lab-components",
@@ -354,7 +380,7 @@ export const componentRegistry: ComponentRegistry = {
354
380
  gallery: {
355
381
  id: "gallery",
356
382
  name: "Gallery",
357
- description: "Responsive grid layout for displaying images and media items.",
383
+ description: "Responsive grid for displaying images and media.",
358
384
  category: "layout",
359
385
  source: {
360
386
  "packageName": "ui-lab-components",
@@ -376,7 +402,7 @@ export const componentRegistry: ComponentRegistry = {
376
402
  grid: {
377
403
  id: "grid",
378
404
  name: "Grid",
379
- description: "Grid layout component with container query support for responsive designs.",
405
+ description: "Responsive grid layout with container query support.",
380
406
  category: "layout",
381
407
  source: {
382
408
  "packageName": "ui-lab-components",
@@ -493,7 +519,7 @@ export const componentRegistry: ComponentRegistry = {
493
519
  mask: {
494
520
  id: "mask",
495
521
  name: "Mask",
496
- description: "Container component that creates fading edge effects on content.",
522
+ description: "Container with fading edge effects on content.",
497
523
  category: "container",
498
524
  experimental: true,
499
525
  source: {
@@ -576,7 +602,7 @@ export const componentRegistry: ComponentRegistry = {
576
602
  page: {
577
603
  id: "page",
578
604
  name: "Page",
579
- description: "Top-level page container with constraints and semantic structure.",
605
+ description: "Top-level page container with layout constraints.",
580
606
  category: "container",
581
607
  experimental: true,
582
608
  source: {
@@ -610,7 +636,7 @@ export const componentRegistry: ComponentRegistry = {
610
636
  path: {
611
637
  id: "path",
612
638
  name: "Path",
613
- description: "Navigation component showing page hierarchy with links to parent pages.",
639
+ description: "Breadcrumb navigation showing page hierarchy.",
614
640
  category: "navigation",
615
641
  source: {
616
642
  "packageName": "ui-lab-components",
@@ -703,7 +729,7 @@ export const componentRegistry: ComponentRegistry = {
703
729
  scroll: {
704
730
  id: "scroll",
705
731
  name: "Scroll",
706
- description: "Scroll area component with custom scrollbars for overflowing content.",
732
+ description: "Scroll area with custom scrollbars for overflow.",
707
733
  category: "container",
708
734
  source: {
709
735
  "packageName": "ui-lab-components",
@@ -5,7 +5,7 @@ import variationsData from './variations.json' with { type: 'json' };
5
5
 
6
6
  const baseMetadata = {
7
7
  id: 'cta',
8
- name: 'CTA',
8
+ name: 'Call to Action',
9
9
  description: 'Call-to-action sections designed to drive user engagement and conversions',
10
10
  category: 'cta' as const,
11
11
  tags: ['cta', 'conversion', 'action', 'engagement'],