aural-ui 2.0.0 → 2.0.2

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 (74) hide show
  1. package/dist/components/badge/Badge.stories.tsx +7 -0
  2. package/dist/components/banner/Banner.stories.tsx +7 -0
  3. package/dist/components/button/Button.stories.tsx +7 -0
  4. package/dist/components/char-count/CharCount.stories.tsx +7 -0
  5. package/dist/components/checkbox/Checkbox.stories.tsx +7 -0
  6. package/dist/components/chip/Chip.stories.tsx +10 -0
  7. package/dist/components/collapsible/Collapsible.stories.tsx +7 -0
  8. package/dist/components/dropdown/index.tsx +18 -7
  9. package/dist/components/form/Form.stories.tsx +7 -0
  10. package/dist/components/helper-text/HelperText.stories.tsx +7 -0
  11. package/dist/components/icon-button/IconButton.stories.tsx +4 -0
  12. package/dist/components/if-else/if-else.stories.tsx +7 -0
  13. package/dist/components/input/Input.stories.tsx +7 -0
  14. package/dist/components/label/Label.stories.tsx +7 -0
  15. package/dist/components/overlay/index.tsx +1 -1
  16. package/dist/components/pagination/Pagination.stories.tsx +7 -0
  17. package/dist/components/radio/Radio.stories.tsx +7 -0
  18. package/dist/components/scroll-area/index.tsx +18 -5
  19. package/dist/components/select/Select.stories.tsx +7 -0
  20. package/dist/components/sheet/index.tsx +5 -2
  21. package/dist/components/stepper/Stepper.stories.tsx +7 -0
  22. package/dist/components/switch/Switch.stories.tsx +7 -0
  23. package/dist/components/switch-case/SwitchCase.stories.tsx +7 -0
  24. package/dist/components/tag/Tag.stories.tsx +7 -0
  25. package/dist/components/textarea/TextArea.stories.tsx +7 -0
  26. package/dist/components/textarea/index.tsx +2 -0
  27. package/dist/components/toast/Toast.stories.tsx +7 -0
  28. package/dist/components/typography/Typography.stories.tsx +7 -0
  29. package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +1101 -0
  30. package/dist/icons/ai-avatar-icon/index.tsx +36 -0
  31. package/dist/icons/ai-avatar-icon/meta.ts +8 -0
  32. package/dist/icons/all-icons.tsx +155 -79
  33. package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +1013 -0
  34. package/dist/icons/arrow-corner-up-left-icon/index.tsx +24 -0
  35. package/dist/icons/arrow-corner-up-left-icon/meta.ts +8 -0
  36. package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +1056 -0
  37. package/dist/icons/arrow-corner-up-right-icon/index.tsx +24 -0
  38. package/dist/icons/arrow-corner-up-right-icon/meta.ts +8 -0
  39. package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +992 -0
  40. package/dist/icons/capital-a-letter-icon/index.tsx +32 -0
  41. package/dist/icons/capital-a-letter-icon/meta.ts +8 -0
  42. package/dist/icons/head-icon/HeadIcon.stories.tsx +981 -0
  43. package/dist/icons/head-icon/index.tsx +26 -0
  44. package/dist/icons/head-icon/meta.ts +8 -0
  45. package/dist/icons/index.ts +40 -25
  46. package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +1027 -0
  47. package/dist/icons/layout-column-icon/index.tsx +23 -0
  48. package/dist/icons/layout-column-icon/meta.ts +8 -0
  49. package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +1007 -0
  50. package/dist/icons/layout-left-icon/index.tsx +26 -0
  51. package/dist/icons/layout-left-icon/meta.ts +8 -0
  52. package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +1001 -0
  53. package/dist/icons/layout-right-icon/index.tsx +26 -0
  54. package/dist/icons/layout-right-icon/meta.ts +8 -0
  55. package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +1032 -0
  56. package/dist/icons/musical-note-icon/index.tsx +25 -0
  57. package/dist/icons/musical-note-icon/meta.ts +8 -0
  58. package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +1010 -0
  59. package/dist/icons/paint-roll-icon/index.tsx +24 -0
  60. package/dist/icons/paint-roll-icon/meta.ts +8 -0
  61. package/dist/icons/setting-icon/SettingIcon.stories.tsx +1024 -0
  62. package/dist/icons/setting-icon/index.tsx +30 -0
  63. package/dist/icons/setting-icon/meta.ts +8 -0
  64. package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +1018 -0
  65. package/dist/icons/sparkles-soft-icon/index.tsx +29 -0
  66. package/dist/icons/sparkles-soft-icon/meta.ts +8 -0
  67. package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +1006 -0
  68. package/dist/icons/text-color-icon/index.tsx +35 -0
  69. package/dist/icons/text-color-icon/meta.ts +8 -0
  70. package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +1039 -0
  71. package/dist/icons/text-indicator-icon/index.tsx +24 -0
  72. package/dist/icons/text-indicator-icon/meta.ts +8 -0
  73. package/dist/index.js +124 -99
  74. package/package.json +1 -1
@@ -0,0 +1,36 @@
1
+ import React from "react"
2
+ import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
3
+
4
+ type AiAvatarIconProps = React.JSX.IntrinsicAttributes &
5
+ React.SVGProps<SVGSVGElement> & {
6
+ classes?: {
7
+ circle?: string
8
+ path?: string
9
+ }
10
+ }
11
+
12
+ export const AiAvatarIcon = ({ classes = {}, ...props }: AiAvatarIconProps) => (
13
+ <AccessibleIcon label="Ai Avatar icon">
14
+ <svg
15
+ width="40"
16
+ height="40"
17
+ viewBox="0 0 40 40"
18
+ fill="none"
19
+ xmlns="http://www.w3.org/2000/svg"
20
+ {...props}
21
+ >
22
+ <circle
23
+ cx="20"
24
+ cy="20"
25
+ r="20"
26
+ fill="#37052D"
27
+ className={classes?.circle}
28
+ />
29
+ <path
30
+ d="M25.5401 16.8526C25.4745 16.8526 25.4187 16.8395 25.3728 16.8133C25.3269 16.787 25.2908 16.7412 25.2645 16.6756L24.6938 15.3388L23.2572 14.7097C23.1916 14.6835 23.1457 14.6474 23.1194 14.6016C23.0932 14.5557 23.0801 14.5 23.0801 14.4345C23.0801 14.3689 23.0932 14.3132 23.1194 14.2673C23.1457 14.2215 23.1916 14.1854 23.2572 14.1592L24.6938 13.5498L25.2645 12.2719C25.2908 12.2064 25.3269 12.1605 25.3728 12.1343C25.4187 12.1081 25.4745 12.095 25.5401 12.095C25.6057 12.095 25.6614 12.1081 25.7073 12.1343C25.7533 12.1605 25.7893 12.2064 25.8156 12.2719L26.3863 13.5498L27.8229 14.1592C27.8885 14.1854 27.9345 14.2215 27.9607 14.2673C27.9869 14.3132 28 14.3689 28 14.4345C28 14.5 27.9869 14.5557 27.9607 14.6016C27.9345 14.6474 27.8885 14.6835 27.8229 14.7097L26.3863 15.3388L25.8156 16.6756C25.7893 16.7412 25.7533 16.787 25.7073 16.8133C25.6614 16.8395 25.6057 16.8526 25.5401 16.8526ZM25.5401 28.5697C25.4876 28.5697 25.4351 28.5565 25.3826 28.5303C25.3301 28.5041 25.2908 28.4583 25.2645 28.3927L24.6938 27.1149L23.2769 26.5054C23.2113 26.4792 23.1653 26.4432 23.1391 26.3973C23.1129 26.3514 23.0997 26.2957 23.0997 26.2302C23.0997 26.1646 23.1129 26.1089 23.1391 26.0631C23.1653 26.0172 23.2113 25.9812 23.2769 25.9549L24.6938 25.3455L25.2645 23.989C25.2908 23.9235 25.3269 23.8776 25.3728 23.8514C25.4187 23.8252 25.4745 23.812 25.5401 23.812C25.6057 23.812 25.6614 23.8252 25.7073 23.8514C25.7533 23.8776 25.7893 23.9235 25.8156 23.989L26.3863 25.3455L27.8033 25.9549C27.8688 25.9812 27.9148 26.0172 27.941 26.0631C27.9673 26.1089 27.9804 26.1646 27.9804 26.2302C27.9804 26.2957 27.9673 26.3514 27.941 26.3973C27.9148 26.4432 27.8688 26.4792 27.8033 26.5054L26.3863 27.1149L25.8156 28.3927C25.7893 28.4583 25.75 28.5041 25.6975 28.5303C25.645 28.5565 25.5925 28.5697 25.5401 28.5697ZM16.9006 25.1686C16.7956 25.1686 16.6939 25.1391 16.5955 25.0801C16.4971 25.0211 16.4217 24.9392 16.3692 24.8343L15.09 22.1017L12.3348 20.8631C12.2298 20.8107 12.1478 20.7353 12.0888 20.637C12.0298 20.5387 12.0002 20.4372 12.0002 20.3323C12.0002 20.2275 12.0298 20.1259 12.0888 20.0276C12.1478 19.9293 12.2298 19.8539 12.3348 19.8015L15.09 18.563L16.3692 15.8499C16.4217 15.732 16.4971 15.6435 16.5955 15.5845C16.6939 15.5256 16.7956 15.4961 16.9006 15.4961C17.0055 15.4961 17.1072 15.5256 17.2056 15.5845C17.304 15.6435 17.3794 15.7254 17.4319 15.8303L18.7308 18.563L21.4663 19.8015C21.5844 19.8539 21.6729 19.9293 21.732 20.0276C21.791 20.1259 21.8205 20.2275 21.8205 20.3323C21.8205 20.4372 21.791 20.5387 21.732 20.637C21.6729 20.7353 21.5844 20.8107 21.4663 20.8631L18.7308 22.1017L17.4319 24.8343C17.3794 24.9523 17.304 25.0375 17.2056 25.0899C17.1072 25.1423 17.0055 25.1686 16.9006 25.1686Z"
31
+ fill="#C58AFF"
32
+ className={classes?.path}
33
+ />
34
+ </svg>
35
+ </AccessibleIcon>
36
+ )
@@ -0,0 +1,8 @@
1
+ export const meta = {
2
+ dependencies: {
3
+ "@radix-ui/react-accessible-icon": "^1.1.7",
4
+ },
5
+ devDependencies: {},
6
+ internalDependencies: [],
7
+ tokens: [],
8
+ }
@@ -313,12 +313,23 @@ export const Icons: React.FC = () => {
313
313
  "content",
314
314
  "status",
315
315
  "social",
316
+ "ai",
317
+ "audio",
318
+ "design",
319
+ "text",
320
+ "system",
316
321
  ]
317
322
 
318
- // Get all icon components and categorize them
323
+ // Get all icon components from index and categorize them
319
324
  const allIcons = useMemo(() => {
320
325
  return Object.entries(IconSet)
321
- .filter(([name]) => name.endsWith("Icon"))
326
+ .filter(([, component]) => {
327
+ // Only include components that are likely to be React icon components
328
+ return (
329
+ typeof component === "function" ||
330
+ (typeof component === "object" && component !== null)
331
+ )
332
+ })
322
333
  .map(([name, component]) => ({
323
334
  name,
324
335
  component: component as React.ComponentType<
@@ -330,66 +341,186 @@ export const Icons: React.FC = () => {
330
341
  .sort((a, b) => a.name.localeCompare(b.name))
331
342
  }, [])
332
343
 
333
- // Categorize icons based on their names
344
+ // Enhanced categorize function based on icon names from index
334
345
  function categorizeIcon(iconName: string): string {
335
346
  const name = iconName.toLowerCase()
336
347
 
337
- if (name.includes("chevron") || name.includes("arrow")) {
348
+ // AI related icons
349
+ if (
350
+ name.includes("ai") ||
351
+ name.includes("sparkle") ||
352
+ name.includes("magic")
353
+ ) {
354
+ return "ai"
355
+ }
356
+
357
+ // Navigation icons
358
+ if (
359
+ name.includes("chevron") ||
360
+ name.includes("arrow") ||
361
+ name.includes("angle") ||
362
+ name.includes("corner")
363
+ ) {
338
364
  return "navigation"
339
365
  }
366
+
367
+ // Action icons
340
368
  if (
341
369
  name.includes("cross") ||
342
370
  name.includes("tick") ||
343
371
  name.includes("plus") ||
344
372
  name.includes("edit") ||
345
- name.includes("trash")
373
+ name.includes("trash") ||
374
+ name.includes("upload") ||
375
+ name.includes("import") ||
376
+ name.includes("pencil")
346
377
  ) {
347
378
  return "actions"
348
379
  }
380
+
381
+ // Interface icons
349
382
  if (
350
383
  name.includes("eye") ||
351
384
  name.includes("search") ||
352
385
  name.includes("command") ||
353
- name.includes("menu")
386
+ name.includes("menu") ||
387
+ name.includes("setting") ||
388
+ name.includes("grip") ||
389
+ name.includes("move") ||
390
+ name.includes("layout")
354
391
  ) {
355
392
  return "interface"
356
393
  }
394
+
395
+ // Content icons
357
396
  if (
358
397
  name.includes("file") ||
359
398
  name.includes("image") ||
360
399
  name.includes("bubble") ||
361
- name.includes("import")
400
+ name.includes("message") ||
401
+ name.includes("book") ||
402
+ name.includes("page")
362
403
  ) {
363
404
  return "content"
364
405
  }
406
+
407
+ // Status icons
365
408
  if (
366
409
  name.includes("alert") ||
367
410
  name.includes("maintenance") ||
368
- name.includes("bulb")
411
+ name.includes("bulb") ||
412
+ name.includes("spinner") ||
413
+ name.includes("check") ||
414
+ name.includes("circle")
369
415
  ) {
370
416
  return "status"
371
417
  }
372
418
 
419
+ // Audio icons
420
+ if (
421
+ name.includes("audio") ||
422
+ name.includes("musical") ||
423
+ name.includes("note")
424
+ ) {
425
+ return "audio"
426
+ }
427
+
428
+ // Design icons
429
+ if (
430
+ name.includes("art") ||
431
+ name.includes("paint") ||
432
+ name.includes("color") ||
433
+ name.includes("feature") ||
434
+ name.includes("board")
435
+ ) {
436
+ return "design"
437
+ }
438
+
439
+ // Text icons
440
+ if (
441
+ name.includes("text") ||
442
+ name.includes("capital") ||
443
+ name.includes("letter") ||
444
+ name.includes("indicator")
445
+ ) {
446
+ return "text"
447
+ }
448
+
449
+ // System icons
450
+ if (
451
+ name.includes("head") ||
452
+ name.includes("site") ||
453
+ name.includes("logo")
454
+ ) {
455
+ return "system"
456
+ }
457
+
373
458
  return "interface"
374
459
  }
375
460
 
376
- // Get icon description based on name
461
+ // Enhanced icon description function
377
462
  function getIconDescription(iconName: string): string {
378
463
  const descriptions: Record<string, string> = {
379
- ChevronRightIcon: "Navigate forward or expand",
380
- ChevronLeftIcon: "Navigate back or collapse",
464
+ AiAvatarIcon: "AI avatar representation",
465
+ AlertIcon: "Warning or attention indicator",
466
+ AngleDownIcon: "Dropdown or expand indicator",
467
+ ArrowBoxLeftIcon: "Navigate or move left",
468
+ ArrowCornerUpLeftIcon: "Corner navigation up-left",
469
+ ArrowCornerUpRightIcon: "Corner navigation up-right",
470
+ ArrowRightIcon: "Navigate or move right",
471
+ ArrowRightUpIcon: "Navigate up-right",
472
+ ArtBoardIcon: "Design canvas or artboard",
473
+ AudioBarIcon: "Audio level indicator",
474
+ BubbleCheckIcon: "Message with confirmation",
475
+ BubbleCrossedIcon: "Message with error",
476
+ BubbleSparkleIcon: "Enhanced or special message",
477
+ CapitalALetterIcon: "Text formatting indicator",
478
+ ChevronDoubleLeftIcon: "Fast backward navigation",
479
+ ChevronDoubleRightIcon: "Fast forward navigation",
480
+ ChevronDownIcon: "Expand or dropdown",
481
+ ChevronLeftIcon: "Navigate back",
482
+ ChevronRightIcon: "Navigate forward",
483
+ ChevronUpIcon: "Collapse or up",
484
+ CommandIcon: "Keyboard shortcut indicator",
485
+ CrossCircleIcon: "Error or cancel in circle",
381
486
  CrossIcon: "Close or cancel action",
382
- TickIcon: "Confirm or success state",
383
- SearchIcon: "Search functionality",
487
+ EditBigIcon: "Edit or modify (large)",
384
488
  EyeOpenIcon: "Show or visible state",
385
489
  EyeCloseIcon: "Hide or invisible state",
386
- AlertIcon: "Warning or attention",
490
+ FeatureShineIcon: "Highlight or featured item",
491
+ FileChartIcon: "Chart or analytics file",
492
+ FileTextIcon: "Text document",
493
+ GripVerticalIcon: "Drag handle vertical",
494
+ HeadIcon: "User profile or person",
495
+ ImageIcon: "Image or media content",
496
+ ImportFolderIcon: "Import files or folder",
497
+ LayoutColumnIcon: "Column layout",
498
+ LayoutLeftIcon: "Left sidebar layout",
499
+ LayoutRightIcon: "Right sidebar layout",
500
+ LightBulbSimpleIcon: "Idea or suggestion",
501
+ MagicBookIcon: "Documentation or guide",
502
+ MaintenanceIcon: "System maintenance",
503
+ MessageIcon: "Communication or chat",
504
+ MoveHorizontalIcon: "Resize horizontally",
505
+ MoveVerticalIcon: "Resize vertically",
506
+ MusicalNoteIcon: "Audio or music",
507
+ PageSearchIcon: "Search within page",
508
+ PaintRollIcon: "Theming or styling",
509
+ PencilIcon: "Edit or write",
387
510
  PlusIcon: "Add or create new",
388
- EditIcon: "Edit or modify",
511
+ SearchIcon: "Search functionality",
512
+ SettingIcon: "Configuration or settings",
513
+ SiteLogoIcon: "Brand or logo",
514
+ SparklesSoftIcon: "Enhancement or magic",
515
+ SpinnerGradientIcon: "Loading (gradient)",
516
+ SpinnerSolidIcon: "Loading (solid)",
517
+ SpinnerSolidNeutralIcon: "Loading (neutral)",
518
+ TextColorIcon: "Text color formatting",
519
+ TextIndicatorIcon: "Text formatting indicator",
520
+ TickCircleIcon: "Success or confirmation in circle",
521
+ TickIcon: "Confirm or success state",
389
522
  TrashIcon: "Delete or remove",
390
- ImageIcon: "Image content",
391
- FileChartIcon: "Chart or analytics",
392
- CommandIcon: "Keyboard shortcut",
523
+ UploadIcon: "Upload files",
393
524
  VerticalMenuIcon: "More options menu",
394
525
  }
395
526
 
@@ -462,7 +593,7 @@ export const Icons: React.FC = () => {
462
593
  <div className="flex items-center justify-center gap-8 pt-8">
463
594
  <div className="text-center">
464
595
  <div className="text-3xl font-bold text-purple-300">
465
- {totalIcons}+
596
+ {totalIcons}
466
597
  </div>
467
598
  <div className="text-sm text-white/60">Total icons</div>
468
599
  </div>
@@ -629,6 +760,11 @@ export const Icons: React.FC = () => {
629
760
  content: "Icons for content types like files, images, and media.",
630
761
  status: "Icons for states, alerts, and status indicators.",
631
762
  social: "Icons for social features and sharing functionality.",
763
+ ai: "Icons related to artificial intelligence and smart features.",
764
+ audio: "Icons for audio, music, and sound-related features.",
765
+ design: "Icons for design, styling, and creative tools.",
766
+ text: "Icons for text formatting and typography.",
767
+ system: "Icons for system-level features and branding.",
632
768
  }
633
769
 
634
770
  return (
@@ -645,66 +781,6 @@ export const Icons: React.FC = () => {
645
781
  </IconCategory>
646
782
  )
647
783
  })}
648
-
649
- {/* Featured Icons Section - only show when no filters applied */}
650
- {selectedCategory === "all" && !searchTerm && (
651
- <IconCategory category="Featured Icons">
652
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
653
- {/* Most Used Icons */}
654
- <div className="space-y-6">
655
- <h3 className="text-xl font-bold text-white">Most Used</h3>
656
- <div className="grid grid-cols-4 gap-4">
657
- {allIcons
658
- .filter((icon) =>
659
- [
660
- "ChevronRightIcon",
661
- "ChevronLeftIcon",
662
- "CrossIcon",
663
- "TickIcon",
664
- "SearchIcon",
665
- "PlusIcon",
666
- "EditIcon",
667
- "TrashIcon",
668
- ].includes(icon.name)
669
- )
670
- .map(({ name, component: IconComponent }) => (
671
- <div
672
- key={name}
673
- onClick={() => handleIconClick(name, IconComponent)}
674
- className="group cursor-pointer rounded-lg border border-white/10 bg-white/5 p-4 text-center transition-all hover:scale-105 hover:bg-white/10"
675
- >
676
- <IconComponent className="mx-auto mb-2 h-8 w-8 text-white transition-colors group-hover:text-blue-400" />
677
- <p className="text-xs text-white/70">
678
- {name.replace("Icon", "")}
679
- </p>
680
- </div>
681
- ))}
682
- </div>
683
- </div>
684
-
685
- {/* Recently Added */}
686
- <div className="space-y-6">
687
- <h3 className="text-xl font-bold text-white">Recently Added</h3>
688
- <div className="grid grid-cols-4 gap-4">
689
- {allIcons
690
- .slice(-8)
691
- .map(({ name, component: IconComponent }) => (
692
- <div
693
- key={name}
694
- onClick={() => handleIconClick(name, IconComponent)}
695
- className="group cursor-pointer rounded-lg border border-white/10 bg-white/5 p-4 text-center transition-all hover:scale-105 hover:bg-white/10"
696
- >
697
- <IconComponent className="mx-auto mb-2 h-8 w-8 text-white transition-colors group-hover:text-blue-400" />
698
- <p className="text-xs text-white/70">
699
- {name.replace("Icon", "")}
700
- </p>
701
- </div>
702
- ))}
703
- </div>
704
- </div>
705
- </div>
706
- </IconCategory>
707
- )}
708
784
  </div>
709
785
 
710
786
  {/* Footer */}