aural-ui 3.0.7 → 4.1.0

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 (183) hide show
  1. package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1199
  2. package/dist/components/avatar/Avatar.stories.tsx +235 -237
  3. package/dist/components/badge/Badge.stories.tsx +379 -116
  4. package/dist/components/banner/Banner.stories.tsx +445 -391
  5. package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
  6. package/dist/components/button/Button.stories.tsx +585 -230
  7. package/dist/components/button/index.tsx +7 -7
  8. package/dist/components/card/Card.stories.tsx +619 -301
  9. package/dist/components/char-count/CharCount.stories.tsx +350 -248
  10. package/dist/components/checkbox/Checkbox.stories.tsx +309 -167
  11. package/dist/components/chip/Chip.stories.tsx +362 -168
  12. package/dist/components/circular-loader/CircularLoader.stories.tsx +221 -620
  13. package/dist/components/clamp-lines/ClampLines.stories.tsx +246 -117
  14. package/dist/components/collapsible/Collapsible.stories.tsx +391 -252
  15. package/dist/components/command/Command.stories.tsx +533 -856
  16. package/dist/components/dialog/Dialog.stories.tsx +505 -949
  17. package/dist/components/divider/Divider.stories.tsx +265 -502
  18. package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
  19. package/dist/components/drawer/Drawer.stories.tsx +659 -993
  20. package/dist/components/drawer/index.tsx +3 -3
  21. package/dist/components/dropdown/Dropdown.stories.tsx +643 -1018
  22. package/dist/components/form/Form.stories.tsx +560 -274
  23. package/dist/components/helper-text/HelperText.stories.tsx +199 -200
  24. package/dist/components/hover-card/HoverCard.stories.tsx +318 -1221
  25. package/dist/components/icon-button/IconButton.stories.tsx +837 -194
  26. package/dist/components/if-else/if-else.stories.tsx +370 -83
  27. package/dist/components/input/Input.stories.tsx +436 -368
  28. package/dist/components/label/Label.stories.tsx +156 -154
  29. package/dist/components/list/List.stories.tsx +485 -822
  30. package/dist/components/marquee/Marquee.stories.tsx +356 -694
  31. package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -410
  32. package/dist/components/overlay/Overlay.stories.tsx +452 -818
  33. package/dist/components/overlay/index.tsx +4 -4
  34. package/dist/components/pagination/Pagination.stories.tsx +721 -210
  35. package/dist/components/popover/Popover.stories.tsx +484 -873
  36. package/dist/components/radio/Radio.stories.tsx +432 -124
  37. package/dist/components/resizable/Resizable.stories.tsx +496 -752
  38. package/dist/components/scroll-area/ScrollArea.stories.tsx +384 -1006
  39. package/dist/components/search/Search.stories.tsx +314 -575
  40. package/dist/components/select/Select.stories.tsx +684 -787
  41. package/dist/components/sheet/Sheet.stories.tsx +671 -936
  42. package/dist/components/skelton/Skelton.stories.tsx +230 -764
  43. package/dist/components/slider/Slider.stories.tsx +384 -737
  44. package/dist/components/stepper/Stepper.stories.tsx +371 -514
  45. package/dist/components/switch/Switch.stories.tsx +461 -208
  46. package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
  47. package/dist/components/table/Table.stories.tsx +770 -914
  48. package/dist/components/tabs/Tabs.stories.tsx +459 -1400
  49. package/dist/components/tag/Tag.stories.tsx +714 -542
  50. package/dist/components/textarea/TextArea.stories.tsx +621 -562
  51. package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -148
  52. package/dist/components/toast/Toast.stories.tsx +452 -1333
  53. package/dist/components/toggle/Toggle.stories.tsx +488 -909
  54. package/dist/components/tooltip/Tooltip.stories.tsx +344 -1372
  55. package/dist/components/typography/Typography.stories.tsx +406 -89
  56. package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
  57. package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
  58. package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
  59. package/dist/icons/Icons.stories.tsx +0 -12
  60. package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +226 -1013
  61. package/dist/icons/alert-icon/AlertIcon.stories.tsx +109 -929
  62. package/dist/icons/all-icons.tsx +124 -87
  63. package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +140 -971
  64. package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +148 -888
  65. package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +135 -1019
  66. package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +137 -953
  67. package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +138 -997
  68. package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +136 -942
  69. package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +148 -1092
  70. package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +146 -1211
  71. package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +126 -615
  72. package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +144 -1164
  73. package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +167 -985
  74. package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +122 -1179
  75. package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +124 -1168
  76. package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +119 -850
  77. package/dist/icons/camera-icon/CameraIcon.stories.tsx +112 -1213
  78. package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +117 -934
  79. package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +160 -961
  80. package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +163 -961
  81. package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +144 -942
  82. package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +129 -966
  83. package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +147 -964
  84. package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +145 -975
  85. package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +150 -1142
  86. package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +114 -461
  87. package/dist/icons/coin-icon/CoinIcon.stories.tsx +124 -1322
  88. package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +117 -1318
  89. package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +114 -903
  90. package/dist/icons/command-icon/CommandIcon.stories.tsx +127 -1042
  91. package/dist/icons/copy-icon/CopyIcon.stories.tsx +123 -962
  92. package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +147 -999
  93. package/dist/icons/cross-icon/CrossIcon.stories.tsx +139 -960
  94. package/dist/icons/download-icon/DownloadIcon.stories.tsx +126 -820
  95. package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +124 -1031
  96. package/dist/icons/email-icon/EmailIcon.stories.tsx +115 -936
  97. package/dist/icons/expand-icon/ExpandIcon.stories.tsx +112 -1111
  98. package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +144 -1025
  99. package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +143 -1036
  100. package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +127 -1011
  101. package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +126 -1056
  102. package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +125 -614
  103. package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +119 -1050
  104. package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +169 -989
  105. package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +115 -1145
  106. package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +115 -1122
  107. package/dist/icons/globe-icon/GlobeIcon.stories.tsx +130 -313
  108. package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +145 -940
  109. package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +119 -1174
  110. package/dist/icons/head-icon/HeadIcon.stories.tsx +111 -916
  111. package/dist/icons/heart-icon/HeartIcon.stories.tsx +120 -1019
  112. package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +119 -683
  113. package/dist/icons/image-icon/ImageIcon.stories.tsx +105 -1121
  114. package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +111 -1192
  115. package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +136 -1256
  116. package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +159 -962
  117. package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +161 -1385
  118. package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +124 -972
  119. package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +119 -948
  120. package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +119 -942
  121. package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +108 -1215
  122. package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +154 -1517
  123. package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +110 -1188
  124. package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +119 -678
  125. package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +123 -1184
  126. package/dist/icons/message-icon/MessageIcon.stories.tsx +114 -538
  127. package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +116 -1158
  128. package/dist/icons/moon-icon/MoonIcon.stories.tsx +120 -536
  129. package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +109 -1184
  130. package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +115 -1134
  131. package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +119 -971
  132. package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +111 -1100
  133. package/dist/icons/notes-icon/NotesIcon.stories.tsx +119 -1101
  134. package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +109 -1111
  135. package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +122 -684
  136. package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +113 -954
  137. package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +112 -877
  138. package/dist/icons/pause-icon/PauseIcon.stories.tsx +113 -1000
  139. package/dist/icons/pencil-icon/PencilIcon.stories.tsx +115 -1070
  140. package/dist/icons/phone-icon/PhoneIcon.stories.tsx +115 -978
  141. package/dist/icons/plus-icon/PlusIcon.stories.tsx +106 -1093
  142. package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +107 -829
  143. package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +102 -469
  144. package/dist/icons/search-icon/SearchIcon.stories.tsx +111 -1124
  145. package/dist/icons/setting-icon/SettingIcon.stories.tsx +107 -970
  146. package/dist/icons/share-icon/ShareIcon.stories.tsx +120 -1025
  147. package/dist/icons/shield-icon/ShieldIcon.stories.tsx +117 -931
  148. package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +137 -1104
  149. package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +172 -982
  150. package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +164 -983
  151. package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +105 -958
  152. package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +158 -580
  153. package/dist/icons/spinner-gradient-icon/index.tsx +6 -1
  154. package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +158 -587
  155. package/dist/icons/spinner-solid-icon/index.tsx +6 -1
  156. package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +146 -682
  157. package/dist/icons/spinner-solid-neutral-icon/index.tsx +1 -1
  158. package/dist/icons/star-icon/StarIcon.stories.tsx +124 -904
  159. package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +112 -964
  160. package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +116 -852
  161. package/dist/icons/sun-icon/SunIcon.stories.tsx +120 -831
  162. package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +116 -950
  163. package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +123 -980
  164. package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +156 -1427
  165. package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +146 -1142
  166. package/dist/icons/tick-icon/TickIcon.stories.tsx +145 -1276
  167. package/dist/icons/trash-icon/TrashIcon.stories.tsx +108 -933
  168. package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +157 -1402
  169. package/dist/icons/upload-icon/UploadIcon.stories.tsx +115 -889
  170. package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +118 -984
  171. package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +125 -1049
  172. package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +123 -1356
  173. package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +110 -1171
  174. package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +112 -1093
  175. package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +115 -1087
  176. package/dist/icons/warning-icon/WarningIcon.stories.tsx +122 -1046
  177. package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +161 -936
  178. package/dist/index.cjs +84 -84
  179. package/dist/index.js +84 -84
  180. package/dist/styles/aural-all-theme.css +1222 -0
  181. package/dist/styles/{aural-theme.css → aural-dark-theme.css} +15 -3
  182. package/dist/styles/aural-light-theme.css +1047 -0
  183. package/package.json +1 -1
@@ -1,6 +1,20 @@
1
1
  import React from "react"
2
2
  import type { Meta, StoryObj } from "@storybook/react-vite"
3
3
 
4
+ import { BubbleSparkleIcon } from "src/ui/icons/bubble-sparkle-icon"
5
+ import { FeatureShineIcon } from "src/ui/icons/feature-shine-icon"
6
+ import { ImageAvatarSparkleIcon } from "src/ui/icons/image-avatar-sparkle-icon"
7
+ import { SparklesSoftIcon } from "src/ui/icons/sparkles-soft-icon"
8
+ import {
9
+ IconColorVariations,
10
+ IconDefaultCanvas,
11
+ IconPlaygroundCanvas,
12
+ IconSizeVariations,
13
+ IconUsageCanvas,
14
+ IconUsageSection,
15
+ } from "src/ui/story-spec/icons/icon-story-canvas"
16
+ import { AuralIconDocsPage } from "src/ui/story-spec/icons/icon-story-docs-page"
17
+
4
18
  import { AiAvatarIcon } from "."
5
19
 
6
20
  const meta: Meta<typeof AiAvatarIcon> = {
@@ -11,847 +25,65 @@ const meta: Meta<typeof AiAvatarIcon> = {
11
25
  backgrounds: {
12
26
  default: "dark",
13
27
  values: [
14
- { name: "dark", value: "#0a0a0a" },
15
- { name: "darker", value: "#000000" },
16
- { name: "light", value: "#ffffff" },
28
+ { name: "dark", value: "var(--color-fm-surface-primary)" },
29
+ { name: "darker", value: "var(--color-fm-neutral-0)" },
30
+ { name: "light", value: "var(--color-fm-neutral-1100)" },
17
31
  ],
18
32
  },
19
33
  docs: {
20
34
  page: () => (
21
- <>
22
- {/* Override default docs styling */}
23
- <style>
24
- {`
25
- .sbdocs-wrapper {
26
- padding: 0 ;
27
- max-width: none ;
28
- background: transparent ;
29
- }
30
- .sbdocs-content {
31
- max-width: none ;
32
- padding: 0 ;
33
- margin: 0 ;
34
- background: transparent ;
35
- }
36
- .docs-story {
37
- background: transparent ;
38
- }
39
- .sbdocs {
40
- background: transparent ;
41
- }
42
- body {
43
- background: #0a0a0a ;
44
- }
45
- #storybook-docs {
46
- background: #0a0a0a ;
47
- }
48
- .sbdocs-preview {
49
- background: transparent ;
50
- border: none ;
51
- }
52
- .sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
53
- color: white ;
54
- }
55
- .sbdocs-p, .sbdocs-li {
56
- color: rgba(255, 255, 255, 0.7) ;
57
- }
58
- .sbdocs-code {
59
- background: rgba(255, 255, 255, 0.1) ;
60
- color: rgba(168, 85, 247, 1) ;
61
- border: 1px solid rgba(255, 255, 255, 0.1) ;
62
- }
63
- .sbdocs-pre {
64
- background: rgba(0, 0, 0, 0.4) ;
65
- border: 1px solid rgba(255, 255, 255, 0.1) ;
66
- }
67
- .sbdocs-table {
68
- background: rgba(255, 255, 255, 0.05) ;
69
- border: 1px solid rgba(255, 255, 255, 0.1) ;
70
- }
71
- .sbdocs-table th {
72
- background: rgba(255, 255, 255, 0.05) ;
73
- color: white ;
74
- border-bottom: 1px solid rgba(255, 255, 255, 0.1) ;
75
- }
76
- .sbdocs-table td {
77
- color: rgba(255, 255, 255, 0.7) ;
78
- border-bottom: 1px solid rgba(255, 255, 255, 0.05) ;
79
- }
80
- `}
81
- </style>
82
-
83
- <div className="min-h-screen bg-gradient-to-br from-gray-900 via-purple-900/20 to-gray-900">
84
- {/* Header */}
85
- <div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
86
- <div className="absolute inset-0 bg-gradient-to-r from-purple-500/10 via-transparent to-blue-500/10" />
87
- <div className="relative !mx-auto max-w-7xl px-6 py-16">
88
- <div className="!space-y-6 text-center">
89
- <div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-purple-500/30 bg-gradient-to-br from-purple-500/20 to-pink-500/20">
90
- <AiAvatarIcon className="h-12 w-12" />
91
- </div>
92
- <h1 className="!text-fm-primary text-5xl font-bold">
93
- AiAvatarIcon
94
- </h1>
95
- <p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
96
- A sophisticated AI avatar icon featuring sparkle elements
97
- and a distinct purple theme. Perfect for AI assistants,
98
- chatbots, virtual agents, and machine learning interfaces.
99
- Built with accessibility in mind using Radix UI's
100
- AccessibleIcon wrapper.
101
- </p>
102
-
103
- {/* Stats */}
104
- <div className="flex items-center justify-center gap-8 pt-8">
105
- <div className="text-center">
106
- <div className="text-3xl font-bold text-purple-300">
107
- Accessible
108
- </div>
109
- <div className="text-sm text-white/60">
110
- Screen reader friendly
111
- </div>
112
- </div>
113
- <div className="h-8 w-px bg-white/20" />
114
- <div className="text-center">
115
- <div className="text-3xl font-bold text-pink-300">
116
- Scalable
117
- </div>
118
- <div className="text-sm text-white/60">
119
- Any size needed
120
- </div>
121
- </div>
122
- <div className="h-8 w-px bg-white/20" />
123
- <div className="text-center">
124
- <div className="text-3xl font-bold text-blue-300">
125
- Customizable
126
- </div>
127
- <div className="text-sm text-white/60">
128
- Independent styling
129
- </div>
130
- </div>
131
- </div>
132
- </div>
133
- </div>
134
- </div>
135
-
136
- {/* Content */}
137
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
138
- {/* Quick Usage */}
139
- <div className="!space-y-8">
140
- <h2 className="text-center text-3xl font-bold !text-white">
141
- Quick Start
142
- </h2>
143
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
144
- <div className="!space-y-4">
145
- <h3 className="text-xl font-semibold !text-purple-300">
146
- Basic Usage
147
- </h3>
148
- <div className="rounded-lg bg-black/40 p-4">
149
- <pre className="overflow-x-auto text-sm !text-green-300">
150
- {`import { AiAvatarIcon } from "@icons/ai-avatar-icon"
151
-
152
- function MyComponent() {
35
+ <AuralIconDocsPage
36
+ accentToken="info"
37
+ features={[
38
+ { title: "AI Identity", description: "Distinct AI avatar mark" },
39
+ { title: "Accessible", description: "ARIA-ready by default" },
40
+ { title: "Customizable", description: "Theming via classes prop" },
41
+ ]}
42
+ quickStart={{
43
+ codeExample: `import { AiAvatarIcon } from "src/ui/icons/ai-avatar-icon"
44
+
45
+ function AiButton() {
153
46
  return (
154
- <div className="flex items-center gap-3">
155
- <AiAvatarIcon className="h-8 w-8" />
156
- <span>AI Assistant</span>
157
- </div>
47
+ <button className="flex items-center gap-2">
48
+ <AiAvatarIcon className="h-5 w-5" />
49
+ Ask AI
50
+ </button>
158
51
  )
159
- }`}
160
- </pre>
161
- </div>
162
- </div>
163
-
164
- <div className="!space-y-4">
165
- <h3 className="text-xl font-semibold !text-purple-300">
166
- Live Preview
167
- </h3>
168
- <div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
169
- <div className="flex items-center gap-3 rounded-lg border border-purple-500/20 bg-purple-500/10 px-4 py-2">
170
- <AiAvatarIcon className="h-8 w-8" />
171
- <span className="text-white">AI Assistant</span>
172
- </div>
173
- </div>
174
- </div>
175
- </div>
176
- </div>
177
-
178
- {/* Props Documentation */}
179
- <div className="!space-y-8">
180
- <h2 className="text-center text-3xl font-bold !text-white">
181
- Props & Configuration
182
- </h2>
183
-
184
- <div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
185
- <div className="bg-white/5 p-4">
186
- <h3 className="text-xl font-semibold !text-white">Props</h3>
187
- </div>
188
- <table className="!my-0 w-full">
189
- <thead className="bg-white/5">
190
- <tr className="border-b border-white/10">
191
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
192
- Prop
193
- </th>
194
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
195
- Type
196
- </th>
197
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
198
- Default
199
- </th>
200
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
201
- Description
202
- </th>
203
- </tr>
204
- </thead>
205
- <tbody>
206
- {" "}
207
- <tr className="!bg-black/10">
208
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
209
- withAccessibility
210
- </td>
211
- <td className="px-6 py-4 text-sm !text-white/70">
212
- boolean
213
- </td>
214
- <td className="px-6 py-4 text-sm !text-white/50">
215
- true
216
- </td>
217
- <td className="px-6 py-4 text-sm !text-white/70">
218
- Whether to wrap the icon with accessibility feature
219
- </td>
220
- </tr>
221
- <tr className="border-b border-white/5 !bg-black/10">
222
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
223
- height
224
- </td>
225
- <td className="px-6 py-4 text-sm !text-white/70">
226
- number | string
227
- </td>
228
- <td className="px-6 py-4 text-sm !text-white/50">40</td>
229
- <td className="px-6 py-4 text-sm !text-white/70">
230
- Height of the icon in pixels
231
- </td>
232
- </tr>
233
- <tr className="border-b border-white/5">
234
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
235
- classes
236
- </td>
237
- <td className="px-6 py-4 text-sm !text-white/70">
238
- object
239
- </td>
240
- <td className="px-6 py-4 text-sm !text-white/50">{}</td>
241
- <td className="px-6 py-4 text-sm !text-white/70">
242
- Custom classes for circle and path elements
243
- </td>
244
- </tr>
245
- <tr className="border-b border-white/5 !bg-black/10">
246
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
247
- classes.circle
248
- </td>
249
- <td className="px-6 py-4 text-sm !text-white/70">
250
- string
251
- </td>
252
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
253
- <td className="px-6 py-4 text-sm !text-white/70">
254
- CSS classes for the background circle
255
- </td>
256
- </tr>
257
- <tr className="border-b border-white/5">
258
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
259
- classes.path
260
- </td>
261
- <td className="px-6 py-4 text-sm !text-white/70">
262
- string
263
- </td>
264
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
265
- <td className="px-6 py-4 text-sm !text-white/70">
266
- CSS classes for the sparkle elements
267
- </td>
268
- </tr>
269
- <tr className="border-b border-white/5 !bg-black/10">
270
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
271
- className
272
- </td>
273
- <td className="px-6 py-4 text-sm !text-white/70">
274
- string
275
- </td>
276
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
277
- <td className="px-6 py-4 text-sm !text-white/70">
278
- CSS classes for the entire SVG element
279
- </td>
280
- </tr>
281
- <tr className="!bg-black/10">
282
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
283
- ...svgProps
284
- </td>
285
- <td className="px-6 py-4 text-sm !text-white/70">
286
- SVGProps
287
- </td>
288
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
289
- <td className="px-6 py-4 text-sm !text-white/70">
290
- All standard SVG element props
291
- </td>
292
- </tr>
293
- </tbody>
294
- </table>
295
- </div>
296
- </div>
297
-
298
- {/* Size Variations */}
299
- <div className="!space-y-8">
300
- <h2 className="text-center text-3xl font-bold !text-white">
301
- Size Variations
302
- </h2>
303
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
304
- <div className="!space-y-6">
305
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
306
- <div className="!space-y-4">
307
- <h3 className="text-lg font-semibold !text-purple-300">
308
- Standard Sizes
309
- </h3>
310
- <div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
311
- <div className="text-center">
312
- <AiAvatarIcon className="!mx-auto mb-2 h-6 w-6" />
313
- <span className="text-xs text-white/60">24px</span>
314
- </div>
315
- <div className="text-center">
316
- <AiAvatarIcon className="!mx-auto mb-2 h-8 w-8" />
317
- <span className="text-xs text-white/60">32px</span>
318
- </div>
319
- <div className="text-center">
320
- <AiAvatarIcon className="!mx-auto mb-2 h-10 w-10" />
321
- <span className="text-xs text-white/60">40px</span>
322
- </div>
323
- <div className="text-center">
324
- <AiAvatarIcon className="!mx-auto mb-2 h-12 w-12" />
325
- <span className="text-xs text-white/60">48px</span>
326
- </div>
327
- <div className="text-center">
328
- <AiAvatarIcon className="!mx-auto mb-2 h-16 w-16" />
329
- <span className="text-xs text-white/60">64px</span>
330
- </div>
331
- <div className="text-center">
332
- <AiAvatarIcon className="!mx-auto mb-2 h-20 w-20" />
333
- <span className="text-xs text-white/60">80px</span>
334
- </div>
335
- </div>
336
- </div>
337
-
338
- <div className="!space-y-4">
339
- <h3 className="text-lg font-semibold !text-purple-300">
340
- Code Example
341
- </h3>
342
- <div className="rounded-lg bg-black/40 p-4">
343
- <pre className="overflow-x-auto text-sm !text-blue-300">
344
- {`// Small (32px)
345
- <AiAvatarIcon className="h-8 w-8" />
346
-
347
- // Medium (40px) - Default
348
- <AiAvatarIcon className="h-10 w-10" />
349
-
350
- // Large (64px)
351
- <AiAvatarIcon className="h-16 w-16" />
352
-
353
- // Custom size
354
- <AiAvatarIcon width={80} height={80} />`}
355
- </pre>
356
- </div>
357
- </div>
358
- </div>
359
- </div>
360
- </div>
361
- </div>
362
-
363
- {/* Color Customization */}
364
- <div className="!space-y-8">
365
- <h2 className="text-center text-3xl font-bold !text-white">
366
- Color Customization
367
- </h2>
368
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
369
- <div className="!space-y-4">
370
- <h3 className="text-lg font-semibold !text-purple-300">
371
- Theme Variations
372
- </h3>
373
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
374
- <div className="flex items-center gap-4">
375
- <AiAvatarIcon className="h-10 w-10" />
376
- <div>
377
- <div className="text-sm font-medium text-white">
378
- Default Theme
379
- </div>
380
- <div className="text-xs text-white/60">
381
- Purple & Pink sparkles
382
- </div>
383
- </div>
384
- </div>
385
- <div className="flex items-center gap-4">
386
- <AiAvatarIcon
387
- className="h-10 w-10"
388
- classes={{
389
- circle: "fill-blue-800",
390
- path: "fill-blue-300",
391
- }}
392
- />
393
- <div>
394
- <div className="text-sm font-medium text-white">
395
- Blue Theme
396
- </div>
397
- <div className="text-xs text-white/60">
398
- Blue background & sparkles
399
- </div>
400
- </div>
401
- </div>
402
- <div className="flex items-center gap-4">
403
- <AiAvatarIcon
404
- className="h-10 w-10"
405
- classes={{
406
- circle: "fill-green-800",
407
- path: "fill-green-300",
408
- }}
409
- />
410
- <div>
411
- <div className="text-sm font-medium text-white">
412
- Green Theme
413
- </div>
414
- <div className="text-xs text-white/60">
415
- Green background & sparkles
416
- </div>
417
- </div>
418
- </div>
419
- <div className="flex items-center gap-4">
420
- <AiAvatarIcon
421
- className="h-10 w-10"
422
- classes={{
423
- circle: "fill-orange-800",
424
- path: "fill-orange-300",
425
- }}
426
- />
427
- <div>
428
- <div className="text-sm font-medium text-white">
429
- Orange Theme
430
- </div>
431
- <div className="text-xs text-white/60">
432
- Orange background & sparkles
433
- </div>
434
- </div>
435
- </div>
436
- </div>
437
- </div>
438
-
439
- <div className="!space-y-4">
440
- <h3 className="text-lg font-semibold !text-purple-300">
441
- Custom Styling
442
- </h3>
443
- <div className="rounded-lg bg-black/40 p-4">
444
- <pre className="overflow-x-auto text-sm !text-green-300">
445
- {`// Using classes prop for custom colors
446
- <AiAvatarIcon
447
- classes={{
448
- circle: "fill-blue-800",
449
- path: "fill-blue-300"
450
- }}
451
- />
452
-
453
- // Using Tailwind CSS modifiers
454
- <AiAvatarIcon
455
- classes={{
456
- circle: "fill-gradient-to-br from-purple-800 to-pink-800",
457
- path: "fill-purple-200"
458
- }}
459
- />
460
-
461
- // CSS custom properties
462
- <AiAvatarIcon
463
- classes={{
464
- circle: "fill-[var(--ai-bg-color)]",
465
- path: "fill-[var(--ai-accent-color)]"
466
- }}
467
- />`}
468
- </pre>
469
- </div>
470
- </div>
471
- </div>
472
- </div>
473
-
474
- {/* Usage Examples */}
475
- <div className="!space-y-8">
476
- <h2 className="text-center text-3xl font-bold !text-white">
477
- Usage Examples
478
- </h2>
479
-
480
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
481
- {/* Chat Interface */}
482
- <div className="!space-y-4">
483
- <h3 className="text-lg font-semibold !text-purple-300">
484
- Chat Interface
485
- </h3>
486
- <div className="!space-y-4">
487
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-4">
488
- <div className="flex items-start gap-3">
489
- <AiAvatarIcon className="h-8 w-8 flex-shrink-0" />
490
- <div className="flex-1">
491
- <div className="flex items-center gap-2">
492
- <span className="text-sm font-medium text-purple-300">
493
- AI Assistant
494
- </span>
495
- <span className="text-xs text-white/50">now</span>
496
- </div>
497
- <p className="mt-1 text-sm !text-white/80">
498
- Hello! I'm here to help you with any questions you
499
- might have.
500
- </p>
501
- </div>
502
- </div>
503
- <div className="flex items-start gap-3">
504
- <div className="h-8 w-8 flex-shrink-0 rounded-full bg-gray-600"></div>
505
- <div className="flex-1">
506
- <div className="flex items-center gap-2">
507
- <span className="text-sm font-medium text-white">
508
- You
509
- </span>
510
- <span className="text-xs text-white/50">now</span>
511
- </div>
512
- <p className="mt-1 text-sm !text-white/80">
513
- Can you help me understand AI avatars?
514
- </p>
515
- </div>
516
- </div>
517
- </div>
518
- <div className="rounded-lg bg-black/40 p-4">
519
- <pre className="overflow-x-auto text-sm !text-green-300">
520
- {`<div className="flex items-start gap-3">
521
- <AiAvatarIcon className="h-8 w-8 flex-shrink-0" />
522
- <div className="flex-1">
523
- <div className="flex items-center gap-2">
524
- <span className="text-sm font-medium text-purple-300">AI Assistant</span>
525
- <span className="text-xs text-white/50">now</span>
526
- </div>
527
- <p className="mt-1 text-sm !text-white/80">
528
- Hello! I'm here to help you with any questions you might have.
529
- </p>
530
- </div>
531
- </div>`}
532
- </pre>
533
- </div>
534
- </div>
535
- </div>
536
-
537
- {/* Profile Card */}
538
- <div className="!space-y-4">
539
- <h3 className="text-lg font-semibold !text-purple-300">
540
- AI Profile Card
541
- </h3>
542
- <div className="!space-y-4">
543
- <div className="rounded-lg border border-purple-500/20 bg-purple-500/10 p-6">
544
- <div className="!space-y-4 text-center">
545
- <AiAvatarIcon className="!mx-auto h-16 w-16" />
546
- <div>
547
- <h4 className="font-medium !text-white">
548
- Claude AI
549
- </h4>
550
- <p className="text-sm !text-purple-300/80">
551
- Your intelligent assistant
552
- </p>
553
- </div>
554
- <div className="flex items-center justify-center gap-2 text-xs text-purple-400">
555
- <div className="h-2 w-2 rounded-full bg-green-400"></div>
556
- <span>Online & Ready</span>
557
- </div>
558
- </div>
559
- </div>
560
- <div className="rounded-lg bg-black/40 p-4">
561
- <pre className="overflow-x-auto text-sm !text-green-300">
562
- {`<div className="rounded-lg border border-purple-500/20 bg-purple-500/10 p-6">
563
- <div className="space-y-4 text-center">
564
- <AiAvatarIcon className="mx-auto h-16 w-16" />
565
- <div>
566
- <h4 className="font-medium !text-white">Claude AI</h4>
567
- <p className="text-sm !text-purple-300/80">Your intelligent assistant</p>
568
- </div>
569
- <div className="flex items-center justify-center gap-2 text-xs text-purple-400">
570
- <div className="h-2 w-2 rounded-full bg-green-400"></div>
571
- <span>Online & Ready</span>
572
- </div>
573
- </div>
574
- </div>`}
575
- </pre>
576
- </div>
577
- </div>
578
- </div>
579
-
580
- {/* Navigation Menu */}
581
- <div className="!space-y-4">
582
- <h3 className="text-lg font-semibold !text-purple-300">
583
- Navigation Menu
584
- </h3>
585
- <div className="!space-y-4">
586
- <div className="!space-y-2">
587
- <div className="flex items-center gap-3 rounded-lg bg-purple-500/20 px-3 py-2 text-purple-200">
588
- <AiAvatarIcon className="h-5 w-5" />
589
- <span className="text-sm font-medium">
590
- AI Assistant
591
- </span>
592
- </div>
593
- <div className="flex items-center gap-3 rounded-lg px-3 py-2 text-white/60 hover:bg-white/5">
594
- <div className="h-5 w-5 rounded bg-gray-600"></div>
595
- <span className="text-sm">Conversations</span>
596
- </div>
597
- <div className="flex items-center gap-3 rounded-lg px-3 py-2 text-white/60 hover:bg-white/5">
598
- <div className="h-5 w-5 rounded bg-gray-600"></div>
599
- <span className="text-sm">Settings</span>
600
- </div>
601
- </div>
602
- <div className="rounded-lg bg-black/40 p-4">
603
- <pre className="overflow-x-auto text-sm !text-green-300">
604
- {`// Active menu item
605
- <div className="flex items-center gap-3 rounded-lg bg-purple-500/20 px-3 py-2 text-purple-200">
606
- <AiAvatarIcon className="h-5 w-5" />
607
- <span className="text-sm font-medium">AI Assistant</span>
608
- </div>
609
-
610
- // Regular menu items
611
- <div className="flex items-center gap-3 rounded-lg px-3 py-2 text-white/60 hover:bg-white/5">
612
- <div className="h-5 w-5 rounded bg-gray-600"></div>
613
- <span className="text-sm">Conversations</span>
614
- </div>`}
615
- </pre>
616
- </div>
617
- </div>
618
- </div>
619
-
620
- {/* Feature Card */}
621
- <div className="!space-y-4">
622
- <h3 className="text-lg font-semibold !text-purple-300">
623
- Feature Showcase
624
- </h3>
625
- <div className="!space-y-4">
626
- <div className="grid gap-4">
627
- <div className="group cursor-pointer rounded-lg border border-white/10 bg-white/5 p-4 transition-colors hover:bg-white/10">
628
- <div className="flex items-center gap-4">
629
- <div className="flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
630
- <AiAvatarIcon className="h-6 w-6" />
631
- </div>
632
- <div>
633
- <h4 className="font-medium !text-white">
634
- AI-Powered Chat
635
- </h4>
636
- <p className="text-sm !text-white/60">
637
- Intelligent conversations with context awareness
638
- </p>
639
- </div>
640
- </div>
641
- </div>
642
- <div className="group cursor-pointer rounded-lg border border-white/10 bg-white/5 p-4 transition-colors hover:bg-white/10">
643
- <div className="flex items-center gap-4">
644
- <div className="flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
645
- <AiAvatarIcon
646
- className="h-6 w-6"
647
- classes={{
648
- circle: "fill-blue-800",
649
- path: "fill-blue-300",
650
- }}
651
- />
652
- </div>
653
- <div>
654
- <h4 className="font-medium !text-white">
655
- Smart Analytics
656
- </h4>
657
- <p className="text-sm !text-white/60">
658
- Data insights powered by machine learning
659
- </p>
660
- </div>
661
- </div>
662
- </div>
663
- </div>
664
- <div className="rounded-lg bg-black/40 p-4">
665
- <pre className="overflow-x-auto text-sm !text-green-300">
666
- {`<div className="group cursor-pointer rounded-lg border border-white/10 bg-white/5 p-4 transition-colors hover:bg-white/10">
667
- <div className="flex items-center gap-4">
668
- <div className="flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
669
- <AiAvatarIcon className="h-6 w-6" />
670
- </div>
671
- <div>
672
- <h4 className="font-medium text-white">AI-Powered Chat</h4>
673
- <p className="text-sm text-white/60">
674
- Intelligent conversations with context awareness
675
- </p>
676
- </div>
677
- </div>
678
- </div>`}
679
- </pre>
680
- </div>
681
- </div>
682
- </div>
683
- </div>
684
- </div>
685
-
686
- {/* Accessibility */}
687
- <div className="!space-y-8">
688
- <h2 className="text-center text-3xl font-bold !text-white">
689
- Accessibility Features
690
- </h2>
691
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
692
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
693
- <h3 className="text-lg font-semibold !text-green-300">
694
- ✅ Built-in Features
695
- </h3>
696
- <ul className="!space-y-2 text-sm !text-white/70">
697
- <li className="!text-white/70">
698
- Uses Radix UI AccessibleIcon wrapper
699
- </li>
700
- <li className="!text-white/70">
701
- Provides screen reader label "Ai Avatar icon"
702
- </li>
703
- <li className="!text-white/70">
704
- Supports keyboard navigation when interactive
705
- </li>
706
- <li className="!text-white/70">
707
- Maintains proper color contrast ratios
708
- </li>
709
- <li className="!text-white/70">
710
- Scales proportionally with size changes
711
- </li>
712
- </ul>
713
- </div>
714
-
715
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
716
- <h3 className="text-lg font-semibold !text-purple-300">
717
- 💡 Best Practices
718
- </h3>
719
- <ul className="!space-y-2 text-sm text-white/70">
720
- <li className="!text-white/70">
721
- Always pair with descriptive text or labels
722
- </li>
723
- <li className="!text-white/70">
724
- Use consistent colors for AI-related elements
725
- </li>
726
- <li className="!text-white/70">
727
- Ensure sufficient color contrast for sparkle elements
728
- </li>
729
- <li className="!text-white/70">
730
- Add focus states for interactive elements
731
- </li>
732
- <li className="!text-white/70">
733
- Consider providing alternative text context
734
- </li>
735
- </ul>
736
- </div>
737
- </div>
738
-
739
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
740
- <h3 className="mb-4 text-lg font-semibold !text-blue-300">
741
- Custom Accessibility Label
742
- </h3>
743
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
744
- <div className="rounded-lg bg-black/40 p-4">
745
- <pre className="overflow-x-auto text-sm !text-blue-300">
746
- {`// Custom implementation with specific label
747
- import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
748
-
749
- function CustomAiAvatarIcon({ label = "AI Assistant", ...props }) {
750
- return (
751
- <AccessibleIcon label={label}>
752
- <AiAvatarIcon {...props} />
753
- </AccessibleIcon>
754
- )
755
- }
756
-
757
- // Usage with specific context
758
- <CustomAiAvatarIcon
759
- label="Claude AI Assistant avatar"
760
- className="h-8 w-8"
761
- />`}
762
- </pre>
763
- </div>
764
- <div className="!space-y-4">
765
- <p className="text-sm !text-white/70">
766
- For specific contexts, you can wrap the AiAvatarIcon
767
- with a custom AccessibleIcon component that provides
768
- more descriptive labels for different AI assistants or
769
- contexts.
770
- </p>
771
- <div className="rounded-lg border border-purple-500/20 bg-purple-500/10 p-4">
772
- <div className="flex items-center gap-2 text-sm text-purple-200">
773
- <AiAvatarIcon className="h-4 w-4" />
774
- <span>
775
- This approach gives screen readers specific AI
776
- context
777
- </span>
778
- </div>
779
- </div>
780
- </div>
781
- </div>
782
- </div>
783
- </div>
784
-
785
- {/* Related Icons */}
786
- <div className="!space-y-8">
787
- <h2 className="text-center text-3xl font-bold !text-white">
788
- Related Icons
789
- </h2>
790
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
791
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
792
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
793
- <span className="text-2xl">🤖</span>
794
- </div>
795
- <div>
796
- <div className="font-medium text-white">BotIcon</div>
797
- <div className="text-xs text-white/60">
798
- Robot assistants
799
- </div>
800
- </div>
801
- </div>
802
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
803
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
804
- <span className="text-2xl">👤</span>
805
- </div>
806
- <div>
807
- <div className="font-medium text-white">UserIcon</div>
808
- <div className="text-xs text-white/60">Human users</div>
809
- </div>
810
- </div>
811
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
812
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
813
- <span className="text-2xl">💬</span>
814
- </div>
815
- <div>
816
- <div className="font-medium text-white">ChatIcon</div>
817
- <div className="text-xs text-white/60">Conversations</div>
818
- </div>
819
- </div>
820
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
821
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-orange-500/20">
822
- <span className="text-2xl">⚡</span>
823
- </div>
824
- <div>
825
- <div className="font-medium text-white">
826
- AutomationIcon
827
- </div>
828
- <div className="text-xs text-white/60">
829
- Smart automation
830
- </div>
831
- </div>
832
- </div>
833
- </div>
834
- </div>
835
- </div>
836
-
837
- {/* Footer */}
838
- <div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
839
- <div className="!mx-auto max-w-7xl px-6 py-8">
840
- <div className="!space-y-4 text-center">
841
- <p className="!text-white/60">
842
- AiAvatarIcon is part of the Aural UI icon library, designed
843
- specifically for AI and machine learning interfaces with
844
- accessibility in mind.
845
- </p>
846
- <p className="text-sm !text-white/40">
847
- Features customizable colors for circle and sparkle
848
- elements, following WCAG guidelines for accessibility.
849
- </p>
850
- </div>
851
- </div>
852
- </div>
853
- </div>
854
- </>
52
+ }`,
53
+ livePreview: (
54
+ <button className="bg-fm-surface-secondary border-fm-divider-secondary text-fm-primary font-fm-text flex items-center gap-2 rounded-xl border px-4 py-2.5 text-sm">
55
+ <AiAvatarIcon className="h-5 w-5" />
56
+ Ask AI
57
+ </button>
58
+ ),
59
+ }}
60
+ relatedIcons={[
61
+ {
62
+ name: "BubbleSparkleIcon",
63
+ description: "AI chat bubbles",
64
+ icon: BubbleSparkleIcon,
65
+ accentToken: "warning",
66
+ },
67
+ {
68
+ name: "SparklesSoftIcon",
69
+ description: "Soft sparkle effects",
70
+ icon: SparklesSoftIcon,
71
+ accentToken: "info",
72
+ },
73
+ {
74
+ name: "FeatureShineIcon",
75
+ description: "AI feature highlights",
76
+ icon: FeatureShineIcon,
77
+ accentToken: "positive",
78
+ },
79
+ {
80
+ name: "ImageAvatarSparkleIcon",
81
+ description: "Sparkle avatar",
82
+ icon: ImageAvatarSparkleIcon,
83
+ accentToken: "negative",
84
+ },
85
+ ]}
86
+ />
855
87
  ),
856
88
  },
857
89
  },
@@ -861,10 +93,6 @@ function CustomAiAvatarIcon({ label = "AI Assistant", ...props }) {
861
93
  control: { type: "range", min: 16, max: 120, step: 4 },
862
94
  description: "Width of the icon in pixels",
863
95
  },
864
- withAccessibility: {
865
- control: "boolean",
866
- description: "Whether to wrap the icon with accessibility features",
867
- },
868
96
  height: {
869
97
  control: { type: "range", min: 16, max: 120, step: 4 },
870
98
  description: "Height of the icon in pixels",
@@ -873,237 +101,222 @@ function CustomAiAvatarIcon({ label = "AI Assistant", ...props }) {
873
101
  control: "text",
874
102
  description: "CSS classes for the entire SVG element",
875
103
  },
104
+ withAccessibility: {
105
+ control: "boolean",
106
+ description: "Whether to wrap the icon with accessibility features",
107
+ },
876
108
  },
877
109
  }
878
110
 
879
111
  export default meta
880
112
  type Story = StoryObj<typeof AiAvatarIcon>
881
113
 
882
- // Story parameters for consistent dark theme
883
- const storyParameters = {
884
- backgrounds: {
885
- default: "dark",
886
- values: [
887
- { name: "dark", value: "#0a0a0a" },
888
- { name: "darker", value: "#000000" },
889
- ],
890
- },
891
- }
892
-
893
114
  export const Default: Story = {
894
115
  args: {
895
116
  width: 40,
896
117
  height: 40,
897
- className: "",
898
118
  withAccessibility: true,
899
119
  },
900
- parameters: storyParameters,
901
120
  render: (args) => (
902
- <div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
121
+ <IconDefaultCanvas>
903
122
  <AiAvatarIcon {...args} />
904
- </div>
123
+ </IconDefaultCanvas>
905
124
  ),
906
125
  }
907
126
 
908
127
  export const SizeVariations: Story = {
909
- parameters: {
910
- ...storyParameters,
911
- docs: {
912
- description: {
913
- story:
914
- "AiAvatarIcon in different sizes, from small chat indicators to large profile displays.",
915
- },
916
- },
917
- },
918
- render: () => (
919
- <div className="flex h-64 min-h-dvh items-center justify-center gap-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
920
- <div className="text-center">
921
- <AiAvatarIcon className="!mx-auto mb-2 h-6 w-6" />
922
- <span className="text-xs text-white/60">24px</span>
923
- </div>
924
- <div className="text-center">
925
- <AiAvatarIcon className="!mx-auto mb-2 h-8 w-8" />
926
- <span className="text-xs text-white/60">32px</span>
927
- </div>
928
- <div className="text-center">
929
- <AiAvatarIcon className="!mx-auto mb-2 h-10 w-10" />
930
- <span className="text-xs text-white/60">40px</span>
931
- </div>
932
- <div className="text-center">
933
- <AiAvatarIcon className="!mx-auto mb-2 h-12 w-12" />
934
- <span className="text-xs text-white/60">48px</span>
935
- </div>
936
- <div className="text-center">
937
- <AiAvatarIcon className="!mx-auto mb-2 h-16 w-16" />
938
- <span className="text-xs text-white/60">64px</span>
939
- </div>
940
- <div className="text-center">
941
- <AiAvatarIcon className="!mx-auto mb-2 h-20 w-20" />
942
- <span className="text-xs text-white/60">80px</span>
943
- </div>
944
- </div>
945
- ),
128
+ render: () => <IconSizeVariations icon={AiAvatarIcon} />,
946
129
  }
947
130
 
948
131
  export const ColorVariations: Story = {
949
- parameters: {
950
- ...storyParameters,
951
- docs: {
952
- description: {
953
- story:
954
- "AiAvatarIcon with different color themes for various AI personalities and brands.",
955
- },
956
- },
957
- },
958
- render: () => (
959
- <div className="grid min-h-dvh grid-cols-2 items-center justify-center gap-6 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8 md:grid-cols-4">
960
- <div className="text-center">
961
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-purple-500/30 bg-purple-500/20">
962
- <AiAvatarIcon className="h-10 w-10" />
963
- </div>
964
- <div className="text-sm font-medium text-white">Default</div>
965
- <div className="text-xs text-purple-400">Purple & Pink</div>
966
- </div>
967
- <div className="text-center">
968
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-blue-500/30 bg-blue-500/20">
969
- <AiAvatarIcon
970
- className="h-10 w-10"
971
- classes={{
972
- circle: "fill-blue-800",
973
- path: "fill-blue-300",
974
- }}
975
- />
976
- </div>
977
- <div className="text-sm font-medium text-white">Blue</div>
978
- <div className="text-xs text-blue-400">Tech & Corporate</div>
979
- </div>
980
- <div className="text-center">
981
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-green-500/30 bg-green-500/20">
982
- <AiAvatarIcon
983
- className="h-10 w-10"
984
- classes={{
985
- circle: "fill-green-800",
986
- path: "fill-green-300",
987
- }}
988
- />
989
- </div>
990
- <div className="text-sm font-medium text-white">Green</div>
991
- <div className="text-xs text-green-400">Eco & Health</div>
992
- </div>
993
- <div className="text-center">
994
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-orange-500/30 bg-orange-500/20">
995
- <AiAvatarIcon
996
- className="h-10 w-10"
997
- classes={{
998
- circle: "fill-orange-800",
999
- path: "fill-orange-300",
1000
- }}
1001
- />
1002
- </div>
1003
- <div className="text-sm font-medium text-white">Orange</div>
1004
- <div className="text-xs text-orange-400">Creative & Warm</div>
1005
- </div>
1006
- </div>
1007
- ),
132
+ render: () => <IconColorVariations icon={AiAvatarIcon} />,
1008
133
  }
1009
134
 
1010
135
  export const UsageExamples: Story = {
1011
- parameters: {
1012
- ...storyParameters,
1013
- docs: {
1014
- description: {
1015
- story:
1016
- "Real-world usage examples showing AiAvatarIcon in different AI interface contexts.",
1017
- },
1018
- },
1019
- },
1020
136
  render: () => (
1021
- <div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
1022
- {/* Chat Interface */}
1023
- <div className="!space-y-2">
1024
- <h3 className="text-sm font-medium text-white">Chat Interface</h3>
1025
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-4">
137
+ <IconUsageCanvas>
138
+ <IconUsageSection title="Chat Interface">
139
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full space-y-4 rounded-xl border p-4">
1026
140
  <div className="flex items-start gap-3">
1027
- <AiAvatarIcon className="h-8 w-8 flex-shrink-0" />
141
+ <AiAvatarIcon className="h-8 w-8 shrink-0" />
1028
142
  <div className="flex-1">
1029
143
  <div className="flex items-center gap-2">
1030
- <span className="text-sm font-medium text-purple-300">
144
+ <span className="text-fm-primary font-fm-text text-sm font-medium">
1031
145
  AI Assistant
1032
146
  </span>
1033
- <span className="text-xs text-white/50">now</span>
147
+ <span className="text-fm-tertiary font-fm-text text-xs">
148
+ now
149
+ </span>
1034
150
  </div>
1035
- <p className="mt-1 text-sm !text-white/80">
151
+ <p className="text-fm-secondary font-fm-text mt-1 text-sm">
1036
152
  Hello! I'm here to help you with any questions you might have.
1037
153
  </p>
1038
154
  </div>
1039
155
  </div>
156
+ <div className="flex items-start gap-3">
157
+ <div className="bg-fm-divider-secondary h-8 w-8 shrink-0 rounded-full" />
158
+ <div className="flex-1">
159
+ <div className="flex items-center gap-2">
160
+ <span className="text-fm-primary font-fm-text text-sm font-medium">
161
+ You
162
+ </span>
163
+ <span className="text-fm-tertiary font-fm-text text-xs">
164
+ now
165
+ </span>
166
+ </div>
167
+ <p className="text-fm-secondary font-fm-text mt-1 text-sm">
168
+ Can you help me understand AI avatars?
169
+ </p>
170
+ </div>
171
+ </div>
1040
172
  </div>
1041
- </div>
173
+ </IconUsageSection>
174
+
175
+ <IconUsageSection title="AI Profile Card">
176
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full space-y-4 rounded-xl border p-6 text-center">
177
+ <AiAvatarIcon className="mx-auto h-16 w-16" />
178
+ <div>
179
+ <h4 className="text-fm-primary font-fm-text font-medium">
180
+ Claude AI
181
+ </h4>
182
+ <p className="text-fm-secondary font-fm-text text-sm">
183
+ Your intelligent assistant
184
+ </p>
185
+ </div>
186
+ <div className="text-fm-secondary font-fm-text flex items-center justify-center gap-2 text-xs">
187
+ <div className="bg-fm-icon-positive h-2 w-2 rounded-full" />
188
+ <span>Online & Ready</span>
189
+ </div>
190
+ </div>
191
+ </IconUsageSection>
1042
192
 
1043
- {/* Profile Card */}
1044
- <div className="!space-y-2">
1045
- <h3 className="text-sm font-medium text-white">AI Profile Card</h3>
1046
- <div className="rounded-lg border border-purple-500/20 bg-purple-500/10 p-6">
1047
- <div className="!space-y-4 text-center">
1048
- <AiAvatarIcon className="!mx-auto h-16 w-16" />
193
+ <IconUsageSection title="Navigation Menu">
194
+ <div className="w-full space-y-1">
195
+ <div className="bg-fm-surface-secondary text-fm-primary font-fm-text flex items-center gap-3 rounded-lg px-3 py-2">
196
+ <AiAvatarIcon className="h-5 w-5 shrink-0" />
197
+ <span className="text-sm font-medium">AI Assistant</span>
198
+ </div>
199
+ <div className="text-fm-tertiary font-fm-text flex items-center gap-3 rounded-lg px-3 py-2">
200
+ <div className="bg-fm-divider-secondary h-5 w-5 shrink-0 rounded" />
201
+ <span className="text-sm">Conversations</span>
202
+ </div>
203
+ <div className="text-fm-tertiary font-fm-text flex items-center gap-3 rounded-lg px-3 py-2">
204
+ <div className="bg-fm-divider-secondary h-5 w-5 shrink-0 rounded" />
205
+ <span className="text-sm">Settings</span>
206
+ </div>
207
+ </div>
208
+ </IconUsageSection>
209
+
210
+ <IconUsageSection title="Feature Cards">
211
+ <div className="w-full space-y-3">
212
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-4 rounded-xl border p-4">
213
+ <div className="bg-fm-divider-secondary flex h-12 w-12 shrink-0 items-center justify-center rounded-lg">
214
+ <AiAvatarIcon className="h-6 w-6" />
215
+ </div>
1049
216
  <div>
1050
- <h4 className="font-medium text-white">Claude AI</h4>
1051
- <p className="text-sm text-purple-300/80">
1052
- Your intelligent assistant
217
+ <h4 className="text-fm-primary font-fm-text font-medium">
218
+ AI-Powered Chat
219
+ </h4>
220
+ <p className="text-fm-secondary font-fm-text text-sm">
221
+ Intelligent conversations with context awareness
1053
222
  </p>
1054
223
  </div>
1055
- <div className="flex items-center justify-center gap-2 text-xs text-purple-400">
1056
- <div className="h-2 w-2 rounded-full bg-green-400"></div>
1057
- <span>Online & Ready</span>
224
+ </div>
225
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-4 rounded-xl border p-4">
226
+ <div className="bg-fm-icon-info/20 flex h-12 w-12 shrink-0 items-center justify-center rounded-lg">
227
+ <AiAvatarIcon
228
+ className="h-6 w-6"
229
+ classes={{
230
+ circle: "fill-fm-blue-200",
231
+ path: "fill-fm-blue-800",
232
+ }}
233
+ />
234
+ </div>
235
+ <div>
236
+ <h4 className="text-fm-primary font-fm-text font-medium">
237
+ Smart Analytics
238
+ </h4>
239
+ <p className="text-fm-secondary font-fm-text text-sm">
240
+ Data insights powered by machine learning
241
+ </p>
1058
242
  </div>
1059
243
  </div>
1060
244
  </div>
1061
- </div>
245
+ </IconUsageSection>
1062
246
 
1063
- {/* Feature Showcase */}
1064
- <div className="!space-y-2">
1065
- <h3 className="text-sm font-medium text-white">Feature Cards</h3>
1066
- <div className="grid gap-4">
1067
- <div className="group cursor-pointer rounded-lg border border-white/10 bg-white/5 p-4 transition-colors hover:bg-white/10">
1068
- <div className="flex items-center gap-4">
1069
- <div className="flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
1070
- <AiAvatarIcon className="h-6 w-6" />
247
+ <IconUsageSection title="Theme Variations">
248
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full space-y-4 rounded-xl border p-4">
249
+ <div className="flex items-center gap-4">
250
+ <AiAvatarIcon className="h-10 w-10 shrink-0" />
251
+ <div>
252
+ <div className="text-fm-primary font-fm-text text-sm font-medium">
253
+ Default Theme
254
+ </div>
255
+ <div className="text-fm-secondary font-fm-text text-xs">
256
+ Purple & pink sparkles
257
+ </div>
258
+ </div>
259
+ </div>
260
+ <div className="flex items-center gap-4">
261
+ <AiAvatarIcon
262
+ className="h-10 w-10 shrink-0"
263
+ classes={{ circle: "fill-fm-blue-200", path: "fill-fm-blue-800" }}
264
+ />
265
+ <div>
266
+ <div className="text-fm-primary font-fm-text text-sm font-medium">
267
+ Blue Theme
268
+ </div>
269
+ <div className="text-fm-secondary font-fm-text text-xs">
270
+ Blue background & sparkles
1071
271
  </div>
1072
- <div>
1073
- <h4 className="font-medium text-white">AI-Powered Chat</h4>
1074
- <p className="text-sm text-white/60">
1075
- Intelligent conversations with context awareness
1076
- </p>
272
+ </div>
273
+ </div>
274
+ <div className="flex items-center gap-4">
275
+ <AiAvatarIcon
276
+ className="h-10 w-10 shrink-0"
277
+ classes={{
278
+ circle: "fill-fm-green-200",
279
+ path: "fill-fm-green-800",
280
+ }}
281
+ />
282
+ <div>
283
+ <div className="text-fm-primary font-fm-text text-sm font-medium">
284
+ Green Theme
285
+ </div>
286
+ <div className="text-fm-secondary font-fm-text text-xs">
287
+ Green background & sparkles
288
+ </div>
289
+ </div>
290
+ </div>
291
+ <div className="flex items-center gap-4">
292
+ <AiAvatarIcon
293
+ className="h-10 w-10 shrink-0"
294
+ classes={{ circle: "fill-fm-red-200", path: "fill-fm-red-800" }}
295
+ />
296
+ <div>
297
+ <div className="text-fm-primary font-fm-text text-sm font-medium">
298
+ Orange Theme
299
+ </div>
300
+ <div className="text-fm-secondary font-fm-text text-xs">
301
+ Orange background & sparkles
1077
302
  </div>
1078
303
  </div>
1079
304
  </div>
1080
305
  </div>
1081
- </div>
1082
- </div>
306
+ </IconUsageSection>
307
+ </IconUsageCanvas>
1083
308
  ),
1084
309
  }
1085
310
 
1086
311
  export const Playground: Story = {
1087
- parameters: {
1088
- ...storyParameters,
1089
- docs: {
1090
- description: {
1091
- story:
1092
- "Interactive playground to experiment with different AiAvatarIcon configurations and themes.",
1093
- },
1094
- },
1095
- },
1096
312
  args: {
1097
313
  width: 64,
1098
314
  height: 64,
1099
- className: "",
1100
- classes: {},
315
+ withAccessibility: true,
1101
316
  },
1102
317
  render: (args) => (
1103
- <div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
1104
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
1105
- <AiAvatarIcon {...args} />
1106
- </div>
1107
- </div>
318
+ <IconPlaygroundCanvas>
319
+ <AiAvatarIcon {...args} />
320
+ </IconPlaygroundCanvas>
1108
321
  ),
1109
322
  }