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