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 { MagicEditIcon } from "src/ui/icons/magic-edit-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 { MagicBookIcon } from "."
5
19
 
6
20
  const meta: Meta<typeof MagicBookIcon> = {
@@ -18,980 +32,69 @@ const meta: Meta<typeof MagicBookIcon> = {
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
- @keyframes sparkle {
81
- 0%, 100% { opacity: 1; transform: scale(1); }
82
- 50% { opacity: 0.7; transform: scale(1.1); }
83
- }
84
- .animate-sparkle {
85
- animation: sparkle 2s ease-in-out infinite;
86
- }
87
- @keyframes float {
88
- 0%, 100% { transform: translateY(0px); }
89
- 50% { transform: translateY(-5px); }
90
- }
91
- .animate-float {
92
- animation: float 3s ease-in-out infinite;
93
- }
94
- `}
95
- </style>
96
-
97
- <div className="bg-fm-surface-primary min-h-screen">
98
- {/* Header */}
99
- <div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
100
- <div className="from-fm-secondary-500/10 to-fm-icon-info/10 absolute inset-0 bg-linear-to-r via-transparent" />
101
- <div className="relative !mx-auto max-w-7xl px-6 py-16">
102
- <div className="!space-y-6 text-center">
103
- <div className="border-fm-secondary-500/30 from-fm-secondary-500/20 to-fm-icon-info/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
104
- <MagicBookIcon className="text-fm-secondary-600 h-12 w-12" />
105
- </div>
106
- <h1 className="!text-fm-primary text-5xl font-bold">
107
- MagicBookIcon
108
- </h1>
109
- <p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
110
- A magical book icon perfect for representing knowledge,
111
- learning, documentation, spells, and educational content.
112
- Features sparkling stars to convey magic and wonder. Built
113
- with accessibility in mind using Radix UI's AccessibleIcon
114
- wrapper.
115
- </p>
116
-
117
- {/* Stats */}
118
- <div className="flex items-center justify-center gap-8 pt-8">
119
- <div className="text-center">
120
- <div className="text-fm-secondary-600 text-3xl font-bold">
121
- Knowledge
122
- </div>
123
- <div className="text-fm-tertiary text-sm">
124
- Learning & education
125
- </div>
126
- </div>
127
- <div className="bg-fm-divider-primary h-8 w-px" />
128
- <div className="text-center">
129
- <div className="text-fm-icon-info text-3xl font-bold">
130
- Magic
131
- </div>
132
- <div className="text-fm-tertiary text-sm">
133
- Spells & enchantments
134
- </div>
135
- </div>
136
- <div className="bg-fm-divider-primary h-8 w-px" />
137
- <div className="text-center">
138
- <div className="text-fm-secondary-600 text-3xl font-bold">
139
- Wisdom
140
- </div>
141
- <div className="text-fm-tertiary text-sm">
142
- Documentation & guides
143
- </div>
144
- </div>
145
- </div>
146
- </div>
147
- </div>
148
- </div>
149
-
150
- {/* Content */}
151
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
152
- {/* Quick Usage */}
153
- <div className="!space-y-8">
154
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
155
- Quick Start
156
- </h2>
157
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
158
- <div className="!space-y-4">
159
- <h3 className="text-fm-secondary-600! text-xl font-semibold">
160
- Basic Usage
161
- </h3>
162
- <div className="bg-fm-surface-secondary rounded-lg p-4">
163
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
164
- {`import { MagicBookIcon } from "@icons/magic-book-icon"
165
-
166
- function FeatureCard() {
35
+ <AuralIconDocsPage
36
+ accentToken="positive"
37
+ features={[
38
+ { title: "AI Writing", description: "AI-assisted story creation" },
39
+ { title: "Magic Book", description: "Smart content generator" },
40
+ { title: "Accessible", description: "ARIA-ready by default" },
41
+ ]}
42
+ quickStart={{
43
+ codeExample: `import { MagicBookIcon } from "src/ui/icons/magic-book-icon"
44
+
45
+ function AIWriteButton() {
167
46
  return (
168
- <div className="flex items-center gap-3">
169
- <MagicBookIcon className="h-6 w-6 text-purple-400 " />
170
- <span>Learn Magic</span>
171
- </div>
172
- )
173
- }`}
174
- </pre>
175
- </div>
176
- </div>
177
-
178
- <div className="!space-y-4">
179
- <h3 className="text-fm-secondary-600! text-xl font-semibold">
180
- Live Preview
181
- </h3>
182
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex h-32 items-center justify-center rounded-lg border">
183
- <div className="border-fm-secondary-500/20 bg-fm-secondary-500/10 flex items-center gap-3 rounded-lg border px-4 py-3">
184
- <MagicBookIcon className="text-fm-secondary-600 h-6 w-6" />
185
- <span className="text-fm-icon-active">Learn Magic</span>
186
- </div>
187
- </div>
188
- </div>
189
- </div>
190
- </div>
191
-
192
- {/* Props Documentation */}
193
- <div className="!space-y-8">
194
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
195
- Props & Configuration
196
- </h2>
197
-
198
- <div className="border-fm-divider-secondary bg-fm-surface-secondary overflow-hidden rounded-lg border">
199
- <div className="bg-fm-surface-secondary p-4">
200
- <h3 className="text-fm-icon-active! text-xl font-semibold">
201
- Props
202
- </h3>
203
- </div>
204
- <table className="!my-0 w-full">
205
- <thead className="bg-fm-surface-secondary">
206
- <tr className="border-fm-divider-secondary border-b">
207
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
208
- Prop
209
- </th>
210
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
211
- Type
212
- </th>
213
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
214
- Default
215
- </th>
216
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
217
- Description
218
- </th>
219
- </tr>
220
- </thead>
221
- <tbody>
222
- {" "}
223
- <tr className="bg-fm-surface-secondary!">
224
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
225
- withAccessibility
226
- </td>
227
- <td className="text-fm-secondary! px-6 py-4 text-sm">
228
- boolean
229
- </td>
230
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
231
- true
232
- </td>
233
- <td className="text-fm-secondary! px-6 py-4 text-sm">
234
- Whether to wrap the icon with accessibility feature
235
- </td>
236
- </tr>
237
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
238
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
239
- height
240
- </td>
241
- <td className="text-fm-secondary! px-6 py-4 text-sm">
242
- number | string
243
- </td>
244
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
245
- 24
246
- </td>
247
- <td className="text-fm-secondary! px-6 py-4 text-sm">
248
- Height of the icon in pixels
249
- </td>
250
- </tr>
251
- <tr className="border-fm-divider-tertiary border-b">
252
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
253
- fill
254
- </td>
255
- <td className="text-fm-secondary! px-6 py-4 text-sm">
256
- string
257
- </td>
258
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
259
- currentColor
260
- </td>
261
- <td className="text-fm-secondary! px-6 py-4 text-sm">
262
- Fill color of the icon
263
- </td>
264
- </tr>
265
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
266
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
267
- className
268
- </td>
269
- <td className="text-fm-secondary! px-6 py-4 text-sm">
270
- string
271
- </td>
272
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
273
- -
274
- </td>
275
- <td className="text-fm-secondary! px-6 py-4 text-sm">
276
- CSS classes for styling (use for overrides)
277
- </td>
278
- </tr>
279
- <tr className="bg-fm-surface-secondary!">
280
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
281
- ...svgProps
282
- </td>
283
- <td className="text-fm-secondary! px-6 py-4 text-sm">
284
- SVGProps
285
- </td>
286
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
287
- -
288
- </td>
289
- <td className="text-fm-secondary! px-6 py-4 text-sm">
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-fm-icon-active! text-center text-3xl font-bold">
301
- Size Variations
302
- </h2>
303
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border 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-fm-secondary-600! text-lg font-semibold">
308
- Standard Sizes
309
- </h3>
310
- <div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
311
- <div className="text-center">
312
- <MagicBookIcon className="text-fm-secondary-600 !mx-auto mb-2 h-3 w-3" />
313
- <span className="text-fm-tertiary text-xs">
314
- 12px
315
- </span>
316
- </div>
317
- <div className="text-center">
318
- <MagicBookIcon className="text-fm-secondary-600 !mx-auto mb-2 h-4 w-4" />
319
- <span className="text-fm-tertiary text-xs">
320
- 16px
321
- </span>
322
- </div>
323
- <div className="text-center">
324
- <MagicBookIcon className="text-fm-secondary-600 !mx-auto mb-2 h-5 w-5" />
325
- <span className="text-fm-tertiary text-xs">
326
- 20px
327
- </span>
328
- </div>
329
- <div className="text-center">
330
- <MagicBookIcon className="text-fm-secondary-600 !mx-auto mb-2 h-6 w-6" />
331
- <span className="text-fm-tertiary text-xs">
332
- 24px
333
- </span>
334
- </div>
335
- <div className="text-center">
336
- <MagicBookIcon className="text-fm-secondary-600 !mx-auto mb-2 h-8 w-8" />
337
- <span className="text-fm-tertiary text-xs">
338
- 32px
339
- </span>
340
- </div>
341
- <div className="text-center">
342
- <MagicBookIcon className="text-fm-secondary-600 !mx-auto mb-2 h-12 w-12" />
343
- <span className="text-fm-tertiary text-xs">
344
- 48px
345
- </span>
346
- </div>
347
- </div>
348
- </div>
349
-
350
- <div className="!space-y-4">
351
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
352
- Code Example
353
- </h3>
354
- <div className="bg-fm-surface-secondary rounded-lg p-4">
355
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
356
- {`// Small (16px)
357
- <MagicBookIcon className="h-4 w-4 " />
358
-
359
- // Medium (24px)
360
- <MagicBookIcon className="h-6 w-6 " />
361
-
362
- // Large (32px)
363
- <MagicBookIcon className="h-8 w-8 " />
364
-
365
- // Custom size for learning sections
366
- <MagicBookIcon
367
- width={40}
368
- height={40}
369
- className="text-purple-400 "
370
- />`}
371
- </pre>
372
- </div>
373
- </div>
374
- </div>
375
- </div>
376
- </div>
377
- </div>
378
-
379
- {/* Color Variations */}
380
- <div className="!space-y-8">
381
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
382
- Color Variations
383
- </h2>
384
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
385
- <div className="!space-y-4">
386
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
387
- Semantic Colors
388
- </h3>
389
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
390
- <div className="flex items-center gap-4">
391
- <MagicBookIcon className="text-fm-secondary-600 h-6 w-6" />
392
- <div>
393
- <div className="text-fm-icon-active text-sm font-medium">
394
- Magic & Spells
395
- </div>
396
- <div className="text-fm-tertiary text-xs">
397
- text-fm-secondary-600
398
- </div>
399
- </div>
400
- </div>
401
- <div className="flex items-center gap-4">
402
- <MagicBookIcon className="text-fm-icon-info h-6 w-6" />
403
- <div>
404
- <div className="text-fm-icon-active text-sm font-medium">
405
- Knowledge & Learning
406
- </div>
407
- <div className="text-fm-tertiary text-xs">
408
- text-fm-icon-info
409
- </div>
410
- </div>
411
- </div>
412
- <div className="flex items-center gap-4">
413
- <MagicBookIcon className="text-fm-secondary-600 h-6 w-6" />
414
- <div>
415
- <div className="text-fm-icon-active text-sm font-medium">
416
- Wisdom & Guides
417
- </div>
418
- <div className="text-fm-tertiary text-xs">
419
- text-fm-secondary-600
420
- </div>
421
- </div>
422
- </div>
423
- <div className="flex items-center gap-4">
424
- <MagicBookIcon className="text-fm-icon-info h-6 w-6" />
425
- <div>
426
- <div className="text-fm-icon-active text-sm font-medium">
427
- Documentation
428
- </div>
429
- <div className="text-fm-tertiary text-xs">
430
- text-fm-icon-info
431
- </div>
432
- </div>
433
- </div>
434
- </div>
435
- </div>
436
-
437
- <div className="!space-y-4">
438
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
439
- Custom Colors
440
- </h3>
441
- <div className="bg-fm-surface-secondary rounded-lg p-4">
442
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
443
- {`// Using Tailwind classes with
444
- <MagicBookIcon className="h-6 w-6 text-purple-400 " />
445
- <MagicBookIcon className="h-6 w-6 text-indigo-500 " />
446
-
447
- // Using CSS custom properties
448
- <MagicBookIcon
449
- className="h-6 w-6 "
450
- style={{ color: 'var(--color-magic)' }}
451
- />
452
-
453
- // Direct fill prop
454
- <MagicBookIcon
455
- width={24}
456
- height={24}
457
- fill="#a855f7"
458
- />`}
459
- </pre>
460
- </div>
461
- </div>
462
- </div>
463
- </div>
464
-
465
- {/* Usage Examples */}
466
- <div className="!space-y-8">
467
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
468
- Usage Examples
469
- </h2>
470
-
471
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
472
- {/* Learning Card */}
473
- <div className="!space-y-4">
474
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
475
- Learning Card
476
- </h3>
477
- <div className="!space-y-4">
478
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
479
- <div className="flex items-start gap-4">
480
- <div className="border-fm-secondary-500/30 bg-fm-secondary-500/20 flex h-12 w-12 items-center justify-center rounded-lg border">
481
- <MagicBookIcon className="text-fm-secondary-600 h-6 w-6" />
482
- </div>
483
- <div className="flex-1">
484
- <h4 className="text-fm-icon-active! mb-2 text-lg font-semibold">
485
- Magical Arts Guide
486
- </h4>
487
- <p className="text-fm-secondary! text-sm">
488
- Comprehensive guide to enchantments, spells, and
489
- mystical knowledge for aspiring wizards.
490
- </p>
491
- </div>
492
- </div>
493
- </div>
494
- <div className="bg-fm-surface-secondary rounded-lg p-4">
495
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
496
- {`<div className="border border-white/10 bg-white/5 p-6 rounded-lg">
497
- <div className="flex items-start gap-4">
498
- <div className="flex h-12 w-12 items-center justify-center rounded-lg border border-purple-500/30 bg-purple-500/20">
499
- <MagicBookIcon className="h-6 w-6 text-purple-400 " />
500
- </div>
501
- <div className="flex-1">
502
- <h4 className="mb-2 text-lg font-semibold text-white">Magical Arts Guide</h4>
503
- <p className="text-sm text-white/70">
504
- Comprehensive guide to enchantments, spells, and mystical knowledge.
505
- </p>
506
- </div>
507
- </div>
508
- </div>`}
509
- </pre>
510
- </div>
511
- </div>
512
- </div>
513
-
514
- {/* Course Sections */}
515
- <div className="!space-y-4">
516
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
517
- Course Sections
518
- </h3>
519
- <div className="!space-y-4">
520
- <div className="!space-y-3">
521
- {[
522
- {
523
- text: "Introduction to Spellcasting",
524
- level: "Beginner",
525
- color: "purple",
526
- },
527
- {
528
- text: "Advanced Potion Making",
529
- level: "Advanced",
530
- color: "indigo",
531
- },
532
- {
533
- text: "Mystical Creature Studies",
534
- level: "Expert",
535
- color: "violet",
536
- },
537
- ].map((course, index) => (
538
- <div
539
- key={index}
540
- className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-3 rounded-lg border p-3"
541
- >
542
- <MagicBookIcon
543
- className={`h-4 w-4 ${
544
- course.color === "purple"
545
- ? "text-purple-400"
546
- : course.color === "indigo"
547
- ? "text-indigo-400"
548
- : "text-violet-400"
549
- }`}
550
- />
551
- <div className="flex-1">
552
- <span className="text-fm-icon-active text-sm">
553
- {course.text}
554
- </span>
555
- </div>
556
- <div
557
- className={`rounded px-2 py-1 text-xs ${
558
- course.level === "Beginner"
559
- ? "bg-green-500/20 text-green-300"
560
- : course.level === "Advanced"
561
- ? "bg-yellow-500/20 text-yellow-300"
562
- : "bg-red-500/20 text-red-300"
563
- }`}
564
- >
565
- {course.level}
566
- </div>
567
- </div>
568
- ))}
569
- </div>
570
- <div className="bg-fm-surface-secondary rounded-lg p-4">
571
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
572
- {`// Course item
573
- <div className="flex items-center gap-3 border border-white/10 bg-white/5 p-3 rounded-lg">
574
- <MagicBookIcon className="h-4 w-4 text-purple-400 " />
575
- <div className="flex-1">
576
- <span className="text-sm text-white">Introduction to Spellcasting</span>
577
- </div>
578
- <div className="text-xs px-2 py-1 rounded bg-green-500/20 text-green-300">
579
- Beginner
580
- </div>
581
- </div>`}
582
- </pre>
583
- </div>
584
- </div>
585
- </div>
586
-
587
- {/* Documentation Section */}
588
- <div className="!space-y-4">
589
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
590
- Documentation Section
591
- </h3>
592
- <div className="!space-y-4">
593
- <div className="border-fm-secondary-500/20 from-fm-secondary-500/10 to-fm-icon-info/10 relative overflow-hidden rounded-lg border bg-linear-to-br p-8 text-center">
594
- <div className="via-fm-secondary-500/5 absolute inset-0 bg-linear-to-r from-transparent to-transparent" />
595
- <div className="relative">
596
- <MagicBookIcon className="text-fm-secondary-600 !mx-auto mb-4 h-16 w-16" />
597
- <h2 className="text-fm-icon-active! mb-4 text-3xl font-bold">
598
- Magical Knowledge Base
599
- </h2>
600
- <p className="text-fm-secondary! mb-6 text-lg">
601
- Discover ancient spells, enchantments, and mystical
602
- wisdom
603
- </p>
604
- <button className="bg-fm-secondary-500/20 text-fm-secondary-600 hover:bg-fm-secondary-500/30 rounded-lg px-6 py-3 transition-colors">
605
- Explore Spells
606
- </button>
607
- </div>
608
- </div>
609
- <div className="bg-fm-surface-secondary rounded-lg p-4">
610
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
611
- {`// Documentation hero section
612
- <div className="relative overflow-hidden rounded-lg border border-purple-500/20 bg-gradient-to-br from-purple-500/10 to-indigo-500/10 p-8 text-center">
613
- <div className="relative">
614
- <MagicBookIcon className="mx-auto mb-4 h-16 w-16 text-purple-400 " />
615
- <h2 className="mb-4 text-3xl font-bold text-white">Magical Knowledge Base</h2>
616
- <p className="mb-6 text-lg text-white/70">
617
- Discover ancient spells, enchantments, and mystical wisdom
618
- </p>
619
- <button className="rounded-lg bg-purple-500/20 px-6 py-3 text-purple-200 hover:bg-purple-500/30">
620
- Explore Spells
47
+ <button className="flex items-center gap-2">
48
+ <MagicBookIcon className="h-5 w-5 text-fm-icon-positive" />
49
+ <span>AI Write</span>
621
50
  </button>
622
- </div>
623
- </div>`}
624
- </pre>
625
- </div>
626
- </div>
627
- </div>
628
-
629
- {/* Library Navigation */}
630
- <div className="!space-y-4">
631
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
632
- Library Navigation
633
- </h3>
634
- <div className="!space-y-4">
635
- <div className="border-fm-divider-secondary bg-fm-surface-secondary max-w-xs rounded-lg border p-3">
636
- {[
637
- { name: "Home", icon: "🏠", active: false },
638
- {
639
- name: "Spellbooks",
640
- icon: "MagicBookIcon",
641
- active: true,
642
- },
643
- { name: "Potions", icon: "🧪", active: false },
644
- { name: "Artifacts", icon: "💎", active: false },
645
- ].map((item, index) => (
646
- <div
647
- key={index}
648
- className={`flex cursor-pointer items-center gap-3 rounded p-2 transition-colors ${
649
- item.active
650
- ? "bg-purple-500/20 text-purple-200"
651
- : "text-white/70 hover:bg-white/10"
652
- }`}
653
- >
654
- {item.icon === "MagicBookIcon" ? (
655
- <MagicBookIcon
656
- className={`h-4 w-4 ${
657
- item.active
658
- ? "text-purple-400"
659
- : "text-white/50"
660
- }`}
661
- />
662
- ) : (
663
- <span className="text-sm">{item.icon}</span>
664
- )}
665
- <span className="flex-1 text-sm">{item.name}</span>
666
- {item.active && (
667
- <div className="bg-fm-secondary-500 h-2 w-2 rounded-full"></div>
668
- )}
669
- </div>
670
- ))}
671
- </div>
672
- <div className="bg-fm-surface-secondary rounded-lg p-4">
673
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
674
- {`// Navigation item
675
- <div className="flex items-center gap-3 p-2 rounded bg-purple-500/20 text-purple-200 cursor-pointer">
676
- <MagicBookIcon className="h-4 w-4 text-purple-400 " />
677
- <span className="flex-1 text-sm">Spellbooks</span>
678
- <div className="h-2 w-2 rounded-full bg-purple-400"></div>
679
- </div>`}
680
- </pre>
681
- </div>
682
- </div>
683
- </div>
684
- </div>
685
- </div>
686
-
687
- {/* Interactive States */}
688
- <div className="!space-y-8">
689
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
690
- Interactive States & Animations
691
- </h2>
692
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
693
- <div className="!space-y-4">
694
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
695
- Hover & Animation Effects
696
- </h3>
697
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
698
- <div className="flex items-center gap-4">
699
- <MagicBookIcon className="text-fm-tertiary hover:text-fm-secondary-600 h-6 w-6 transition-colors" />
700
- <div>
701
- <div className="text-fm-icon-active text-sm font-medium">
702
- Color Change
703
- </div>
704
- <div className="text-fm-tertiary text-xs">
705
- hover:text-fm-secondary-600
706
- </div>
707
- </div>
708
- </div>
709
- <div className="flex items-center gap-4">
710
- <MagicBookIcon className="text-fm-icon-active h-6 w-6 transition-transform hover:scale-110" />
711
- <div>
712
- <div className="text-fm-icon-active text-sm font-medium">
713
- Scale Effect
714
- </div>
715
- <div className="text-fm-tertiary text-xs">
716
- hover:scale-110
717
- </div>
718
- </div>
719
- </div>
720
- <div className="flex items-center gap-4">
721
- <MagicBookIcon className="animate-sparkle text-fm-secondary-600 h-6 w-6" />
722
- <div>
723
- <div className="text-fm-icon-active text-sm font-medium">
724
- Magical Sparkle
725
- </div>
726
- <div className="text-fm-tertiary text-xs">
727
- animate-sparkle
728
- </div>
729
- </div>
730
- </div>
731
- <div className="flex items-center gap-4">
732
- <MagicBookIcon className="animate-float text-fm-secondary-600 h-6 w-6" />
733
- <div>
734
- <div className="text-fm-icon-active text-sm font-medium">
735
- Floating Magic
736
- </div>
737
- <div className="text-fm-tertiary text-xs">
738
- animate-float
739
- </div>
740
- </div>
741
- </div>
742
- </div>
743
- </div>
744
-
745
- <div className="!space-y-4">
746
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
747
- Animation Examples
748
- </h3>
749
- <div className="bg-fm-surface-secondary rounded-lg p-4">
750
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
751
- {`// Hover effects
752
- <MagicBookIcon className="h-6 w-6 text-white/60 hover:text-purple-400 transition-colors " />
753
-
754
- // Scale on hover
755
- <MagicBookIcon className="h-6 w-6 text-white hover:scale-110 transition-transform " />
756
-
757
- // Sparkle animation
758
- <MagicBookIcon className="h-6 w-6 text-purple-400 animate-sparkle " />
759
-
760
- // Floating effect for magical sections
761
- <MagicBookIcon className="h-6 w-6 text-purple-400 animate-float " />
762
-
763
- // Custom sparkle animation
764
- @keyframes sparkle {
765
- 0%, 100% { opacity: 1; transform: scale(1); }
766
- 50% { opacity: 0.7; transform: scale(1.1); }
767
- }
768
-
769
- .animate-sparkle {
770
- animation: sparkle 2s ease-in-out infinite;
771
- }`}
772
- </pre>
773
- </div>
774
- </div>
775
- </div>
776
- </div>
777
-
778
- {/* Accessibility */}
779
- <div className="!space-y-8">
780
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
781
- Accessibility Features
782
- </h2>
783
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
784
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
785
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
786
- ✅ Built-in Features
787
- </h3>
788
- <ul className="text-fm-secondary! !space-y-2 text-sm">
789
- <li className="text-fm-secondary!">
790
- Uses Radix UI AccessibleIcon wrapper
791
- </li>
792
- <li className="text-fm-secondary!">
793
- Provides screen reader label "Magic book icon"
794
- </li>
795
- <li className="text-fm-secondary!">
796
- Supports keyboard navigation when interactive
797
- </li>
798
- <li className="text-fm-secondary!">
799
- Maintains proper color contrast ratios
800
- </li>
801
- <li className="text-fm-secondary!">
802
- Scales with user's font size preferences
803
- </li>
804
- </ul>
805
- </div>
806
-
807
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
808
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
809
- 💡 Best Practices
810
- </h3>
811
- <ul className="text-fm-secondary !space-y-2 text-sm">
812
- <li className="text-fm-secondary!">
813
- Always pair with descriptive context
814
- </li>
815
- <li className="text-fm-secondary!">
816
- Use consistent colors for learning themes
817
- </li>
818
- <li className="text-fm-secondary!">
819
- Consider motion sensitivity for sparkle animations
820
- </li>
821
- <li className="text-fm-secondary!">
822
- Add focus states for interactive elements
823
- </li>
824
- <li className="text-fm-secondary!">
825
- Provide alternative text for complex contexts
826
- </li>
827
- </ul>
828
- </div>
829
- </div>
830
-
831
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
832
- <h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
833
- Learning & Knowledge Accessibility
834
- </h3>
835
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
836
- <div className="bg-fm-surface-secondary rounded-lg p-4">
837
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
838
- {`// Learning button with proper ARIA
839
- <button
840
- aria-label="Access magical knowledge base and spellbook library"
841
- className="flex items-center gap-2 p-3 rounded-lg focus:ring-2 focus:ring-purple-500"
842
- onClick={handleLearnClick}
843
- >
844
- <MagicBookIcon className="h-5 w-5 text-purple-400 " />
845
- <span>Learn Magic</span>
846
- </button>
847
-
848
- // Course card with semantic structure
849
- <div
850
- role="article"
851
- aria-labelledby="course-title"
852
- className="border border-white/10 bg-white/5 p-6 rounded-lg"
853
- >
854
- <div className="flex items-start gap-4">
855
- <div className="flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20" aria-hidden="true">
856
- <MagicBookIcon className="h-6 w-6 text-purple-400 " />
857
- </div>
858
- <div>
859
- <h4 id="course-title" className="text-lg font-semibold text-white">
860
- Magical Arts Guide
861
- </h4>
862
- <p className="text-sm text-white/70">
863
- Comprehensive guide to enchantments and mystical knowledge.
864
- </p>
865
- </div>
866
- </div>
867
- </div>`}
868
- </pre>
869
- </div>
870
- <div className="!space-y-4">
871
- <p className="text-fm-secondary! text-sm">
872
- When using MagicBookIcon for learning and knowledge
873
- features, provide clear context about what educational
874
- content or magical knowledge users can access.
875
- </p>
876
- <div className="border-fm-secondary-500/20 bg-fm-secondary-500/10 rounded-lg border p-4">
877
- <div className="text-fm-secondary-600 flex items-center gap-2 text-sm">
878
- <MagicBookIcon className="h-4 w-4" />
879
- <span>
880
- Screen readers understand this represents learning
881
- content
882
- </span>
883
- </div>
884
- </div>
885
- </div>
886
- </div>
887
- </div>
888
- </div>
889
-
890
- {/* Related Icons */}
891
- <div className="!space-y-8">
892
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
893
- Related Icons
894
- </h2>
895
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
896
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
897
- <div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
898
- <span className="text-2xl">📚</span>
899
- </div>
900
- <div>
901
- <div className="text-fm-icon-active font-medium">
902
- LibraryIcon
903
- </div>
904
- <div className="text-fm-tertiary text-xs">
905
- Books & knowledge
906
- </div>
907
- </div>
908
- </div>
909
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
910
- <div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
911
- <span className="text-2xl">🎓</span>
912
- </div>
913
- <div>
914
- <div className="text-fm-icon-active font-medium">
915
- EducationIcon
916
- </div>
917
- <div className="text-fm-tertiary text-xs">
918
- Learning & degrees
919
- </div>
920
- </div>
921
- </div>
922
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
923
- <div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
924
- <span className="text-2xl">🪄</span>
925
- </div>
926
- <div>
927
- <div className="text-fm-icon-active font-medium">
928
- WandIcon
929
- </div>
930
- <div className="text-fm-tertiary text-xs">
931
- Magic & spells
932
- </div>
933
- </div>
934
- </div>
935
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
936
- <div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
937
- <span className="text-2xl">📖</span>
938
- </div>
939
- <div>
940
- <div className="text-fm-icon-active font-medium">
941
- DocumentIcon
942
- </div>
943
- <div className="text-fm-tertiary text-xs">
944
- Documentation
945
- </div>
946
- </div>
947
- </div>
948
- </div>
949
- </div>
950
- </div>
951
-
952
- {/* Footer */}
953
- <div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
954
- <div className="!mx-auto max-w-7xl px-6 py-8">
955
- <div className="!space-y-4 text-center">
956
- <p className="text-fm-tertiary!">
957
- MagicBookIcon is part of the Aural UI icon library, built
958
- for representing magical knowledge, learning, and
959
- educational content.
960
- </p>
961
- <p className="text-fm-placeholder! text-sm">
962
- All icons use Radix UI's AccessibleIcon for screen reader
963
- compatibility and follow WCAG guidelines for learning
964
- applications.
965
- </p>
966
- </div>
967
- </div>
968
- </div>
969
- </div>
970
- </>
51
+ )
52
+ }`,
53
+ livePreview: (
54
+ <button className="flex items-center gap-2">
55
+ <MagicBookIcon className="text-fm-icon-positive h-6 w-6" />
56
+ </button>
57
+ ),
58
+ }}
59
+ relatedIcons={[
60
+ {
61
+ name: "MagicEditIcon",
62
+ description: "AI-enhanced edit icon",
63
+ icon: MagicEditIcon,
64
+ accentToken: "info",
65
+ },
66
+ {
67
+ name: "BubbleSparkleIcon",
68
+ description: "AI sparkle bubble icon",
69
+ icon: BubbleSparkleIcon,
70
+ accentToken: "positive",
71
+ },
72
+ {
73
+ name: "SparklesSoftIcon",
74
+ description: "Soft sparkle / AI glow icon",
75
+ icon: SparklesSoftIcon,
76
+ accentToken: "warning",
77
+ },
78
+ {
79
+ name: "FeatureShineIcon",
80
+ description: "Feature highlight / shine icon",
81
+ icon: FeatureShineIcon,
82
+ accentToken: "negative",
83
+ },
84
+ ]}
85
+ />
971
86
  ),
972
87
  },
973
88
  },
974
89
  tags: ["autodocs"],
975
90
  argTypes: {
976
- width: {
977
- control: { type: "range", min: 8, max: 96, step: 2 },
978
- description: "Width of the icon in pixels",
91
+ className: {
92
+ control: "text",
93
+ description: "CSS classes including color token",
979
94
  },
980
95
  withAccessibility: {
981
96
  control: "boolean",
982
- description: "Whether to wrap the icon with accessibility features",
983
- },
984
- height: {
985
- control: { type: "range", min: 8, max: 96, step: 2 },
986
- description: "Height of the icon in pixels",
987
- },
988
- fill: {
989
- control: "color",
990
- description: "Fill color of the icon",
991
- },
992
- className: {
993
- control: "text",
994
- description: "CSS classes for styling (use for overrides)",
97
+ description: "Wrap with accessibility label",
995
98
  },
996
99
  },
997
100
  }
@@ -999,297 +102,74 @@ function FeatureCard() {
999
102
  export default meta
1000
103
  type Story = StoryObj<typeof MagicBookIcon>
1001
104
 
1002
- // Story parameters for consistent dark theme
1003
- const storyParameters = {
1004
- backgrounds: {
1005
- default: "dark",
1006
- values: [
1007
- { name: "dark", value: "var(--color-fm-surface-primary)" },
1008
- { name: "darker", value: "var(--color-fm-neutral-0)" },
1009
- ],
1010
- },
1011
- }
1012
-
1013
105
  export const Default: Story = {
1014
106
  args: {
1015
- className: "h-6 w-6 text-fm-secondary-600 ",
107
+ className: "h-6 w-6 text-fm-icon-positive",
1016
108
  withAccessibility: true,
1017
109
  },
1018
- parameters: storyParameters,
1019
110
  render: (args) => (
1020
- <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">
111
+ <IconDefaultCanvas>
1021
112
  <MagicBookIcon {...args} />
1022
- </div>
113
+ </IconDefaultCanvas>
1023
114
  ),
1024
115
  }
1025
116
 
1026
117
  export const SizeVariations: Story = {
1027
- parameters: {
1028
- ...storyParameters,
1029
- docs: {
1030
- description: {
1031
- story:
1032
- "MagicBookIcon in different sizes, from small UI elements to large learning displays.",
1033
- },
1034
- },
1035
- },
1036
- render: () => (
1037
- <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">
1038
- <div className="text-center">
1039
- <MagicBookIcon className="text-fm-secondary-600 !mx-auto mb-2 h-3 w-3" />
1040
- <span className="text-fm-tertiary text-xs">12px</span>
1041
- </div>
1042
- <div className="text-center">
1043
- <MagicBookIcon className="text-fm-secondary-600 !mx-auto mb-2 h-4 w-4" />
1044
- <span className="text-fm-tertiary text-xs">16px</span>
1045
- </div>
1046
- <div className="text-center">
1047
- <MagicBookIcon className="text-fm-secondary-600 !mx-auto mb-2 h-5 w-5" />
1048
- <span className="text-fm-tertiary text-xs">20px</span>
1049
- </div>
1050
- <div className="text-center">
1051
- <MagicBookIcon className="text-fm-secondary-600 !mx-auto mb-2 h-6 w-6" />
1052
- <span className="text-fm-tertiary text-xs">24px</span>
1053
- </div>
1054
- <div className="text-center">
1055
- <MagicBookIcon className="text-fm-secondary-600 !mx-auto mb-2 h-8 w-8" />
1056
- <span className="text-fm-tertiary text-xs">32px</span>
1057
- </div>
1058
- <div className="text-center">
1059
- <MagicBookIcon className="text-fm-secondary-600 !mx-auto mb-2 h-12 w-12" />
1060
- <span className="text-fm-tertiary text-xs">48px</span>
1061
- </div>
1062
- </div>
1063
- ),
118
+ render: () => <IconSizeVariations icon={MagicBookIcon} />,
1064
119
  }
1065
120
 
1066
121
  export const ColorVariations: Story = {
1067
- parameters: {
1068
- ...storyParameters,
1069
- docs: {
1070
- description: {
1071
- story:
1072
- "MagicBookIcon in different colors for various magical and learning contexts.",
1073
- },
1074
- },
1075
- },
1076
- render: () => (
1077
- <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">
1078
- <div className="text-center">
1079
- <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">
1080
- <MagicBookIcon className="text-fm-secondary-600 h-8 w-8" />
1081
- </div>
1082
- <div className="text-fm-icon-active text-sm font-medium">
1083
- Magic & Spells
1084
- </div>
1085
- <div className="text-fm-secondary-600 text-xs">
1086
- text-fm-secondary-600
1087
- </div>
1088
- </div>
1089
- <div className="text-center">
1090
- <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">
1091
- <MagicBookIcon className="text-fm-icon-info h-8 w-8" />
1092
- </div>
1093
- <div className="text-fm-icon-active text-sm font-medium">Knowledge</div>
1094
- <div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
1095
- </div>
1096
- <div className="text-center">
1097
- <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">
1098
- <MagicBookIcon className="text-fm-secondary-600 h-8 w-8" />
1099
- </div>
1100
- <div className="text-fm-icon-active text-sm font-medium">Wisdom</div>
1101
- <div className="text-fm-secondary-600 text-xs">
1102
- text-fm-secondary-600
1103
- </div>
1104
- </div>
1105
- <div className="text-center">
1106
- <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">
1107
- <MagicBookIcon className="text-fm-icon-info h-8 w-8" />
1108
- </div>
1109
- <div className="text-fm-icon-active text-sm font-medium">
1110
- Documentation
1111
- </div>
1112
- <div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
1113
- </div>
1114
- </div>
1115
- ),
122
+ render: () => <IconColorVariations icon={MagicBookIcon} />,
1116
123
  }
1117
124
 
1118
125
  export const UsageExamples: Story = {
1119
- parameters: {
1120
- ...storyParameters,
1121
- docs: {
1122
- description: {
1123
- story:
1124
- "Real-world usage examples showing MagicBookIcon in different magical and learning contexts.",
1125
- },
1126
- },
1127
- },
1128
126
  render: () => (
1129
- <div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh !space-y-8 rounded-lg bg-linear-to-br p-8">
1130
- {/* Learning Card */}
1131
- <div className="!space-y-2">
1132
- <h3 className="text-fm-icon-active text-sm font-medium">
1133
- Learning Card
1134
- </h3>
1135
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
1136
- <div className="flex items-start gap-4">
1137
- <div className="border-fm-secondary-500/30 bg-fm-secondary-500/20 flex h-12 w-12 items-center justify-center rounded-lg border">
1138
- <MagicBookIcon className="text-fm-secondary-600 h-6 w-6" />
1139
- </div>
1140
- <div className="flex-1">
1141
- <h4 className="text-fm-icon-active! mb-2 text-lg font-semibold">
1142
- Magical Arts Guide
1143
- </h4>
1144
- <p className="text-fm-secondary! text-sm">
1145
- Comprehensive guide to enchantments, spells, and mystical
1146
- knowledge.
1147
- </p>
1148
- </div>
127
+ <IconUsageCanvas>
128
+ <IconUsageSection title="AI Write Button">
129
+ <button className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-2 rounded-xl border px-4 py-2">
130
+ <MagicBookIcon className="text-fm-icon-positive h-4 w-4" />
131
+ <span className="text-fm-primary font-fm-text text-sm">AI Write</span>
132
+ </button>
133
+ </IconUsageSection>
134
+
135
+ <IconUsageSection title="AI Feature Card">
136
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm rounded-xl border p-4">
137
+ <div className="mb-2 flex items-center gap-2">
138
+ <MagicBookIcon className="text-fm-icon-positive h-5 w-5" />
139
+ <span className="text-fm-primary font-fm-text text-sm font-medium">
140
+ AI Story Generator
141
+ </span>
1149
142
  </div>
143
+ <p className="text-fm-secondary font-fm-text text-xs">
144
+ Create compelling episodes with AI-assisted writing.
145
+ </p>
1150
146
  </div>
1151
- </div>
1152
-
1153
- {/* Course Sections */}
1154
- <div className="!space-y-2">
1155
- <h3 className="text-fm-icon-active text-sm font-medium">
1156
- Course Sections
1157
- </h3>
1158
- <div className="!space-y-3">
1159
- {[
1160
- {
1161
- text: "Introduction to Spellcasting",
1162
- level: "Beginner",
1163
- color: "purple",
1164
- },
1165
- {
1166
- text: "Advanced Potion Making",
1167
- level: "Advanced",
1168
- color: "indigo",
1169
- },
1170
- {
1171
- text: "Mystical Creature Studies",
1172
- level: "Expert",
1173
- color: "violet",
1174
- },
1175
- ].map((course, index) => (
1176
- <div
1177
- key={index}
1178
- className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-3 rounded-lg border p-3"
147
+ </IconUsageSection>
148
+
149
+ <IconUsageSection title="AI Tools Toolbar">
150
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-2 rounded-xl border px-3 py-2">
151
+ {[MagicBookIcon, MagicEditIcon, BubbleSparkleIcon].map((Icon, i) => (
152
+ <button
153
+ key={i}
154
+ className="flex h-8 w-8 items-center justify-center rounded-lg"
1179
155
  >
1180
- <MagicBookIcon
1181
- className={`h-4 w-4 ${
1182
- course.color === "purple"
1183
- ? "text-purple-400"
1184
- : course.color === "indigo"
1185
- ? "text-indigo-400"
1186
- : "text-violet-400"
1187
- }`}
1188
- />
1189
- <div className="flex-1">
1190
- <span className="text-fm-icon-active text-sm">
1191
- {course.text}
1192
- </span>
1193
- </div>
1194
- <div
1195
- className={`rounded px-2 py-1 text-xs ${
1196
- course.level === "Beginner"
1197
- ? "bg-green-500/20 text-green-300"
1198
- : course.level === "Advanced"
1199
- ? "bg-yellow-500/20 text-yellow-300"
1200
- : "bg-red-500/20 text-red-300"
1201
- }`}
1202
- >
1203
- {course.level}
1204
- </div>
1205
- </div>
1206
- ))}
1207
- </div>
1208
- </div>
1209
-
1210
- {/* Documentation Hero */}
1211
- <div className="!space-y-2">
1212
- <h3 className="text-fm-icon-active text-sm font-medium">
1213
- Documentation Section
1214
- </h3>
1215
- <div className="border-fm-secondary-500/20 from-fm-secondary-500/10 to-fm-icon-info/10 relative overflow-hidden rounded-lg border bg-linear-to-br p-8 text-center">
1216
- <div className="relative">
1217
- <MagicBookIcon className="text-fm-secondary-600 !mx-auto mb-4 h-16 w-16" />
1218
- <h2 className="text-fm-icon-active! mb-4 text-3xl font-bold">
1219
- Magical Knowledge Base
1220
- </h2>
1221
- <p className="text-fm-secondary! mb-6 text-lg">
1222
- Discover ancient spells, enchantments, and mystical wisdom
1223
- </p>
1224
- <button className="bg-fm-secondary-500/20 text-fm-secondary-600 hover:bg-fm-secondary-500/30 rounded-lg px-6 py-3 transition-colors">
1225
- Explore Spells
156
+ <Icon className="text-fm-icon-positive h-4 w-4" />
1226
157
  </button>
1227
- </div>
1228
- </div>
1229
- </div>
1230
- </div>
1231
- ),
1232
- }
1233
-
1234
- export const InteractiveStates: Story = {
1235
- parameters: {
1236
- ...storyParameters,
1237
- docs: {
1238
- description: {
1239
- story:
1240
- "Interactive states showing hover effects, animations, and magical visual effects for the magic book icon.",
1241
- },
1242
- },
1243
- },
1244
- render: () => (
1245
- <div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh !space-y-8 rounded-lg bg-linear-to-br p-8">
1246
- <div className="!space-y-4">
1247
- <h3 className="text-fm-secondary text-sm font-medium">
1248
- Hover & Animation Effects
1249
- </h3>
1250
- <div className="flex gap-8">
1251
- <div className="flex flex-col items-center gap-2">
1252
- <MagicBookIcon className="text-fm-tertiary hover:text-fm-secondary-600 h-8 w-8 transition-colors" />
1253
- <span className="text-fm-tertiary text-xs">Color Change</span>
1254
- </div>
1255
- <div className="flex flex-col items-center gap-2">
1256
- <MagicBookIcon className="text-fm-icon-active h-8 w-8 transition-transform hover:scale-110" />
1257
- <span className="text-fm-tertiary text-xs">Scale Up</span>
1258
- </div>
1259
- <div className="flex flex-col items-center gap-2">
1260
- <MagicBookIcon className="animate-sparkle text-fm-secondary-600 h-8 w-8" />
1261
- <span className="text-fm-tertiary text-xs">Sparkle</span>
1262
- </div>
1263
- <div className="flex flex-col items-center gap-2">
1264
- <MagicBookIcon className="animate-float text-fm-secondary-600 h-8 w-8" />
1265
- <span className="text-fm-tertiary text-xs">Float</span>
1266
- </div>
158
+ ))}
1267
159
  </div>
1268
- </div>
1269
- </div>
160
+ </IconUsageSection>
161
+ </IconUsageCanvas>
1270
162
  ),
1271
163
  }
1272
164
 
1273
165
  export const Playground: Story = {
1274
- parameters: {
1275
- ...storyParameters,
1276
- docs: {
1277
- description: {
1278
- story:
1279
- "Interactive playground to experiment with different MagicBookIcon configurations.",
1280
- },
1281
- },
1282
- },
1283
166
  args: {
1284
- width: 32,
1285
- height: 32,
1286
- className: "text-fm-secondary-600 ",
167
+ className: "h-8 w-8 text-fm-icon-positive",
168
+ withAccessibility: true,
1287
169
  },
1288
170
  render: (args) => (
1289
- <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">
1290
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
1291
- <MagicBookIcon {...args} />
1292
- </div>
1293
- </div>
171
+ <IconPlaygroundCanvas>
172
+ <MagicBookIcon {...args} />
173
+ </IconPlaygroundCanvas>
1294
174
  ),
1295
175
  }