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 { InstagramIcon } from "src/ui/icons/instagram-icon"
5
+ import { LinkedInIcon } from "src/ui/icons/linked-in-icon"
6
+ import { ThreadsIcon } from "src/ui/icons/threads-icon"
7
+ import { TwitterXIcon } from "src/ui/icons/twitter-x-icon"
8
+ import {
9
+ IconBrandColors,
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 { YoutubeIcon } from "."
5
19
 
6
20
  const meta: Meta<typeof YoutubeIcon> = {
@@ -18,815 +32,68 @@ const meta: Meta<typeof YoutubeIcon> = {
18
32
  },
19
33
  docs: {
20
34
  page: () => (
21
- <>
22
- {/* Override default docs styling */}
23
- <style>
24
- {`
25
- .sbdocs-wrapper {
26
- padding: 0 !important;
27
- max-width: none !important;
28
- background: transparent !important;
29
- }
30
- .sbdocs-content {
31
- max-width: none !important;
32
- padding: 0 !important;
33
- margin: 0 !important;
34
- background: transparent !important;
35
- }
36
- .docs-story {
37
- background: transparent !important;
38
- }
39
- .sbdocs {
40
- background: transparent !important;
41
- }
42
- body {
43
- background: var(--color-fm-surface-primary) !important;
44
- }
45
- #storybook-docs {
46
- background: var(--color-fm-surface-primary) !important;
47
- }
48
- .sbdocs-preview {
49
- background: transparent !important;
50
- border: none !important;
51
- }
52
- .sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
53
- color: var(--color-fm-icon-active) !important;
54
- }
55
- .sbdocs-p, .sbdocs-li {
56
- color: var(--color-fm-secondary) !important;
57
- }
58
- .sbdocs-code {
59
- background: var(--color-fm-surface-secondary) !important;
60
- color: var(--color-fm-secondary-500) !important;
61
- border: 1px solid var(--color-fm-divider-secondary) !important;
62
- }
63
- .sbdocs-pre {
64
- background: var(--color-fm-surface-secondary) !important;
65
- border: 1px solid var(--color-fm-divider-secondary) !important;
66
- }
67
- .sbdocs-table {
68
- background: var(--color-fm-surface-secondary) !important;
69
- border: 1px solid var(--color-fm-divider-secondary) !important;
70
- }
71
- .sbdocs-table th {
72
- background: var(--color-fm-surface-secondary) !important;
73
- color: var(--color-fm-icon-active) !important;
74
- border-bottom: 1px solid var(--color-fm-divider-secondary) !important;
75
- }
76
- .sbdocs-table td {
77
- color: var(--color-fm-secondary) !important;
78
- border-bottom: 1px solid var(--color-fm-divider-tertiary) !important;
79
- }
80
- `}
81
- </style>
82
-
83
- <div className="from-fm-surface-primary via-fm-icon-negative/5 to-fm-surface-primary min-h-screen bg-linear-to-br">
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-icon-negative/10 to-fm-icon-negative/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-icon-negative/30 from-fm-icon-negative/20 to-fm-icon-negative/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
90
- <YoutubeIcon className="text-fm-icon-negative h-12 w-12" />
91
- </div>
92
- <h1 className="!text-fm-primary text-5xl font-bold">
93
- YoutubeIcon
94
- </h1>
95
- <p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
96
- The iconic YouTube logo for video content, social media
97
- integration, and multimedia features. Built with
98
- accessibility in mind using Radix UI's AccessibleIcon
99
- wrapper for seamless screen reader support.
100
- </p>
101
-
102
- {/* Stats */}
103
- <div className="flex items-center justify-center gap-8 pt-8">
104
- <div className="text-center">
105
- <div className="text-fm-icon-negative text-3xl font-bold">
106
- Accessible
107
- </div>
108
- <div className="text-fm-tertiary text-sm">
109
- Screen reader friendly
110
- </div>
111
- </div>
112
- <div className="bg-fm-divider-primary h-8 w-px" />
113
- <div className="text-center">
114
- <div className="text-fm-icon-active text-3xl font-bold">
115
- Scalable
116
- </div>
117
- <div className="text-fm-tertiary text-sm">
118
- Any size needed
119
- </div>
120
- </div>
121
- <div className="bg-fm-divider-primary h-8 w-px" />
122
- <div className="text-center">
123
- <div className="text-fm-secondary-600 text-3xl font-bold">
124
- Flexible
125
- </div>
126
- <div className="text-fm-tertiary text-sm">
127
- Customizable styling
128
- </div>
129
- </div>
130
- </div>
131
- </div>
132
- </div>
133
- </div>
134
-
135
- {/* Content */}
136
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
137
- {/* Quick Usage */}
138
- <div className="!space-y-8">
139
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
140
- Quick Start
141
- </h2>
142
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
143
- <div className="!space-y-4">
144
- <h3 className="text-fm-icon-negative! text-xl font-semibold">
145
- Basic Usage
146
- </h3>
147
- <div className="bg-fm-surface-secondary rounded-lg p-4">
148
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
149
- {`import { YoutubeIcon } from "@icons/youtube-icon"
150
-
151
- function VideoCard() {
152
- return (
153
- <button className="flex items-center gap-2">
154
- <YoutubeIcon className="h-5 w-5 text-red-500" />
155
- <span>Watch on YouTube</span>
156
- </button>
157
- )
158
- }`}
159
- </pre>
160
- </div>
161
- </div>
162
-
163
- <div className="!space-y-4">
164
- <h3 className="text-fm-icon-negative! text-xl font-semibold">
165
- Live Preview
166
- </h3>
167
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex h-32 items-center justify-center rounded-lg border">
168
- <button className="border-fm-icon-negative/20 bg-fm-icon-negative/10 hover:bg-fm-icon-negative/20 flex items-center gap-3 rounded-lg border px-4 py-2 transition-colors">
169
- <YoutubeIcon className="text-fm-icon-negative h-5 w-5" />
170
- <span className="text-fm-icon-active">
171
- Watch on YouTube
172
- </span>
173
- </button>
174
- </div>
175
- </div>
176
- </div>
177
- </div>
178
-
179
- {/* Props Documentation */}
180
- <div className="!space-y-8">
181
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
182
- Props & Configuration
183
- </h2>
184
-
185
- <div className="border-fm-divider-secondary bg-fm-surface-secondary overflow-hidden rounded-lg border">
186
- <div className="bg-fm-surface-secondary p-4">
187
- <h3 className="text-fm-icon-active! text-xl font-semibold">
188
- Props
189
- </h3>
190
- </div>
191
- <table className="!my-0 w-full">
192
- <thead className="bg-fm-surface-secondary">
193
- <tr className="border-fm-divider-secondary border-b">
194
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
195
- Prop
196
- </th>
197
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
198
- Type
199
- </th>
200
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
201
- Default
202
- </th>
203
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
204
- Description
205
- </th>
206
- </tr>
207
- </thead>
208
- <tbody>
209
- {" "}
210
- <tr className="bg-fm-surface-secondary!">
211
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
212
- withAccessibility
213
- </td>
214
- <td className="text-fm-secondary! px-6 py-4 text-sm">
215
- boolean
216
- </td>
217
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
218
- true
219
- </td>
220
- <td className="text-fm-secondary! px-6 py-4 text-sm">
221
- Whether to wrap the icon with accessibility feature
222
- </td>
223
- </tr>
224
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
225
- <td className="text-fm-icon-negative! px-6 py-4 font-mono text-sm">
226
- height
227
- </td>
228
- <td className="text-fm-secondary! px-6 py-4 text-sm">
229
- number | string
230
- </td>
231
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
232
- 24
233
- </td>
234
- <td className="text-fm-secondary! px-6 py-4 text-sm">
235
- Height of the icon in pixels
236
- </td>
237
- </tr>
238
- <tr className="border-fm-divider-tertiary border-b">
239
- <td className="text-fm-icon-negative! px-6 py-4 font-mono text-sm">
240
- fill
241
- </td>
242
- <td className="text-fm-secondary! px-6 py-4 text-sm">
243
- string
244
- </td>
245
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
246
- currentColor
247
- </td>
248
- <td className="text-fm-secondary! px-6 py-4 text-sm">
249
- Fill color of the icon
250
- </td>
251
- </tr>
252
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
253
- <td className="text-fm-icon-negative! px-6 py-4 font-mono text-sm">
254
- className
255
- </td>
256
- <td className="text-fm-secondary! px-6 py-4 text-sm">
257
- string
258
- </td>
259
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
260
- -
261
- </td>
262
- <td className="text-fm-secondary! px-6 py-4 text-sm">
263
- CSS classes for styling
264
- </td>
265
- </tr>
266
- <tr className="bg-fm-surface-secondary!">
267
- <td className="text-fm-icon-negative! px-6 py-4 font-mono text-sm">
268
- ...svgProps
269
- </td>
270
- <td className="text-fm-secondary! px-6 py-4 text-sm">
271
- SVGProps
272
- </td>
273
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
274
- -
275
- </td>
276
- <td className="text-fm-secondary! px-6 py-4 text-sm">
277
- All standard SVG element props
278
- </td>
279
- </tr>
280
- </tbody>
281
- </table>
282
- </div>
283
- </div>
284
-
285
- {/* Size Variations */}
286
- <div className="!space-y-8">
287
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
288
- Size Variations
289
- </h2>
290
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
291
- <div className="!space-y-6">
292
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
293
- <div className="!space-y-4">
294
- <h3 className="text-fm-icon-negative! text-lg font-semibold">
295
- Standard Sizes
296
- </h3>
297
- <div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
298
- <div className="text-center">
299
- <YoutubeIcon className="text-fm-icon-negative !mx-auto mb-2 h-3 w-3" />
300
- <span className="text-fm-tertiary text-xs">
301
- 12px
302
- </span>
303
- </div>
304
- <div className="text-center">
305
- <YoutubeIcon className="text-fm-icon-negative !mx-auto mb-2 h-4 w-4" />
306
- <span className="text-fm-tertiary text-xs">
307
- 16px
308
- </span>
309
- </div>
310
- <div className="text-center">
311
- <YoutubeIcon className="text-fm-icon-negative !mx-auto mb-2 h-5 w-5" />
312
- <span className="text-fm-tertiary text-xs">
313
- 20px
314
- </span>
315
- </div>
316
- <div className="text-center">
317
- <YoutubeIcon className="text-fm-icon-negative !mx-auto mb-2 h-6 w-6" />
318
- <span className="text-fm-tertiary text-xs">
319
- 24px
320
- </span>
321
- </div>
322
- <div className="text-center">
323
- <YoutubeIcon className="text-fm-icon-negative !mx-auto mb-2 h-8 w-8" />
324
- <span className="text-fm-tertiary text-xs">
325
- 32px
326
- </span>
327
- </div>
328
- <div className="text-center">
329
- <YoutubeIcon className="text-fm-icon-negative !mx-auto mb-2 h-12 w-12" />
330
- <span className="text-fm-tertiary text-xs">
331
- 48px
332
- </span>
333
- </div>
334
- </div>
335
- </div>
336
-
337
- <div className="!space-y-4">
338
- <h3 className="text-fm-icon-negative! text-lg font-semibold">
339
- Code Example
340
- </h3>
341
- <div className="bg-fm-surface-secondary rounded-lg p-4">
342
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
343
- {`// Small (16px)
344
- <YoutubeIcon className="h-4 w-4" />
345
-
346
- // Medium (24px)
347
- <YoutubeIcon className="h-6 w-6" />
348
-
349
- // Large (32px)
350
- <YoutubeIcon className="h-8 w-8" />
351
-
352
- // Custom size
353
- <YoutubeIcon width={40} height={40} />`}
354
- </pre>
355
- </div>
356
- </div>
357
- </div>
358
- </div>
359
- </div>
360
- </div>
361
-
362
- {/* Color Variations */}
363
- <div className="!space-y-8">
364
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
365
- Color Variations
366
- </h2>
367
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
368
- <div className="!space-y-4">
369
- <h3 className="text-fm-icon-negative! text-lg font-semibold">
370
- Brand Colors
371
- </h3>
372
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
373
- <div className="flex items-center gap-4">
374
- <YoutubeIcon className="text-fm-icon-negative h-6 w-6" />
375
- <div>
376
- <div className="text-fm-icon-active text-sm font-medium">
377
- YouTube Red
378
- </div>
379
- <div className="text-fm-tertiary text-xs">
380
- text-fm-icon-negative
381
- </div>
382
- </div>
383
- </div>
384
- <div className="flex items-center gap-4">
385
- <YoutubeIcon className="text-fm-icon-negative h-6 w-6" />
386
- <div>
387
- <div className="text-fm-icon-active text-sm font-medium">
388
- Light Red
389
- </div>
390
- <div className="text-fm-tertiary text-xs">
391
- text-fm-icon-negative
392
- </div>
393
- </div>
394
- </div>
395
- <div className="flex items-center gap-4">
396
- <YoutubeIcon className="text-fm-icon-active h-6 w-6" />
397
- <div>
398
- <div className="text-fm-icon-active text-sm font-medium">
399
- White
400
- </div>
401
- <div className="text-fm-tertiary text-xs">
402
- text-fm-icon-active
403
- </div>
404
- </div>
405
- </div>
406
- <div className="flex items-center gap-4">
407
- <YoutubeIcon className="text-fm-placeholder h-6 w-6" />
408
- <div>
409
- <div className="text-fm-icon-active text-sm font-medium">
410
- Neutral
411
- </div>
412
- <div className="text-fm-tertiary text-xs">
413
- text-fm-placeholder
414
- </div>
415
- </div>
416
- </div>
417
- </div>
418
- </div>
419
-
420
- <div className="!space-y-4">
421
- <h3 className="text-fm-icon-negative! text-lg font-semibold">
422
- Custom Colors
423
- </h3>
424
- <div className="bg-fm-surface-secondary rounded-lg p-4">
425
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
426
- {`// Using Tailwind classes
427
- <YoutubeIcon className="h-6 w-6 text-red-500" />
428
- <YoutubeIcon className="h-6 w-6 text-white" />
429
-
430
- // Using CSS custom properties
431
- <YoutubeIcon
432
- className="h-6 w-6"
433
- style={{ color: 'var(--youtube-red)' }}
434
- />
435
-
436
- // Direct fill prop
437
- <YoutubeIcon
438
- width={24}
439
- height={24}
440
- fill="#ff0000"
441
- />`}
442
- </pre>
443
- </div>
444
- </div>
445
- </div>
446
- </div>
447
-
448
- {/* Usage Examples */}
449
- <div className="!space-y-8">
450
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
451
- Usage Examples
452
- </h2>
453
-
454
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
455
- {/* Video Actions */}
456
- <div className="!space-y-4">
457
- <h3 className="text-fm-icon-negative! text-lg font-semibold">
458
- Video Actions
459
- </h3>
460
- <div className="!space-y-4">
461
- <div className="flex gap-4">
462
- <button className="border-fm-icon-negative/30 bg-fm-icon-negative/20 text-fm-icon-negative hover:bg-fm-icon-negative/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
463
- <YoutubeIcon className="h-4 w-4" />
464
- Watch on YouTube
465
- </button>
466
- <button className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active hover:bg-fm-surface-secondary flex items-center gap-2 rounded-lg border px-3 py-2 transition-colors">
467
- <YoutubeIcon className="h-4 w-4" />
468
- Share
469
- </button>
470
- </div>
471
- <div className="bg-fm-surface-secondary rounded-lg p-4">
472
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
473
- {`// Primary YouTube button
474
- <button className="flex items-center gap-2 bg-red-500/20 border border-red-500/30 px-4 py-2 rounded-lg">
475
- <YoutubeIcon className="h-4 w-4" />
476
- Watch on YouTube
477
- </button>
478
-
479
- // Share button
480
- <button className="flex items-center gap-2 bg-white/5 border border-white/20 px-3 py-2 rounded-lg">
481
- <YoutubeIcon className="h-4 w-4" />
482
- Share
483
- </button>`}
484
- </pre>
485
- </div>
486
- </div>
487
- </div>
488
-
489
- {/* Video Card */}
490
- <div className="!space-y-4">
491
- <h3 className="text-fm-icon-negative! text-lg font-semibold">
492
- Video Card
493
- </h3>
494
- <div className="!space-y-4">
495
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
496
- <div className="flex items-center justify-between">
497
- <div className="flex items-center gap-3">
498
- <div className="bg-fm-icon-negative/20 flex h-10 w-10 items-center justify-center rounded-lg">
499
- <YoutubeIcon className="text-fm-icon-negative h-5 w-5" />
500
- </div>
501
- <div>
502
- <div className="text-fm-icon-active text-sm font-medium">
503
- Introduction to React
504
- </div>
505
- <div className="text-fm-tertiary text-xs">
506
- 15:30 • 2.5M views
507
- </div>
508
- </div>
509
- </div>
510
- <button className="text-fm-placeholder hover:bg-fm-icon-negative/20 hover:text-fm-icon-negative rounded-lg p-2 transition-colors">
511
- <YoutubeIcon className="h-4 w-4" />
512
- </button>
513
- </div>
514
- </div>
515
- <div className="bg-fm-surface-secondary rounded-lg p-4">
516
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
517
- {`<div className="flex items-center justify-between">
518
- <div className="flex items-center gap-3">
519
- <div className="flex h-10 w-10 items-center justify-center rounded-lg bg-red-500/20">
520
- <YoutubeIcon className="h-5 w-5 text-red-400" />
521
- </div>
522
- <div>
523
- <div className="text-sm font-medium text-white">Introduction to React</div>
524
- <div className="text-xs text-white/60">15:30 • 2.5M views</div>
525
- </div>
526
- </div>
527
- <button className="p-2 rounded-lg text-gray-400 hover:bg-red-500/20 hover:text-red-400">
528
- <YoutubeIcon className="h-4 w-4" />
529
- </button>
530
- </div>`}
531
- </pre>
532
- </div>
533
- </div>
534
- </div>
535
-
536
- {/* Channel Subscribe */}
537
- <div className="!space-y-4">
538
- <h3 className="text-fm-icon-negative! text-lg font-semibold">
539
- Channel Subscribe
540
- </h3>
541
- <div className="!space-y-4">
542
- <div className="border-fm-icon-negative/20 bg-fm-icon-negative/5 rounded-lg border p-6">
543
- <div className="flex items-start gap-4">
544
- <div className="bg-fm-icon-negative/20 flex h-12 w-12 items-center justify-center rounded-lg">
545
- <YoutubeIcon className="text-fm-icon-negative h-6 w-6" />
546
- </div>
547
- <div className="flex-1">
548
- <h4 className="text-fm-icon-active! mb-2 font-medium">
549
- TechTalks Channel
550
- </h4>
551
- <p className="text-fm-secondary! mb-4 text-sm">
552
- Subscribe for the latest tech tutorials and
553
- programming guides.
554
- </p>
555
- <div className="flex gap-3">
556
- <button className="border-fm-icon-negative/30 bg-fm-icon-negative/20 text-fm-icon-negative rounded-lg border px-4 py-2 text-sm">
557
- Subscribe
558
- </button>
559
- <button className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active rounded-lg border px-4 py-2 text-sm">
560
- Visit Channel
561
- </button>
562
- </div>
563
- </div>
564
- </div>
565
- </div>
566
- <div className="bg-fm-surface-secondary rounded-lg p-4">
567
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
568
- {`<div className="border border-red-500/20 bg-red-500/5 p-6 rounded-lg">
569
- <div className="flex items-start gap-4">
570
- <div className="flex h-12 w-12 items-center justify-center rounded-lg bg-red-500/20">
571
- <YoutubeIcon className="h-6 w-6 text-red-400" />
572
- </div>
573
- <div className="flex-1">
574
- <h4 className="font-medium text-white mb-2">TechTalks Channel</h4>
575
- <p className="text-sm text-white/70 mb-4">
576
- Subscribe for the latest tech tutorials.
577
- </p>
578
- {/* Action buttons */}
579
- </div>
580
- </div>
581
- </div>`}
582
- </pre>
583
- </div>
584
- </div>
585
- </div>
586
-
587
- {/* Social Links */}
588
- <div className="!space-y-4">
589
- <h3 className="text-fm-icon-negative! text-lg font-semibold">
590
- Social Media Links
591
- </h3>
592
- <div className="!space-y-4">
593
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4">
594
- <div className="hover:bg-fm-surface-secondary flex items-center gap-3 rounded px-3 py-2 text-sm">
595
- <YoutubeIcon className="text-fm-icon-negative h-4 w-4" />
596
- <span className="text-fm-icon-active">
597
- YouTube Channel
598
- </span>
599
- <span className="text-fm-tertiary ml-auto text-xs">
600
- External
601
- </span>
602
- </div>
603
- <div className="hover:bg-fm-surface-secondary flex items-center gap-3 rounded px-3 py-2 text-sm">
604
- <YoutubeIcon className="text-fm-icon-negative h-4 w-4" />
605
- <span className="text-fm-icon-active">
606
- Latest Videos
607
- </span>
608
- </div>
609
- <div className="hover:bg-fm-surface-secondary flex items-center gap-3 rounded px-3 py-2 text-sm">
610
- <YoutubeIcon className="text-fm-icon-negative h-4 w-4" />
611
- <span className="text-fm-icon-active">Playlists</span>
612
- </div>
613
- </div>
614
- <div className="bg-fm-surface-secondary rounded-lg p-4">
615
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
616
- {`// Social media navigation
617
- <div className="flex items-center gap-3 px-3 py-2 text-sm hover:bg-white/10 rounded">
618
- <YoutubeIcon className="h-4 w-4 text-red-400" />
619
- <span className="text-white">YouTube Channel</span>
620
- <span className="ml-auto text-xs text-white/60">External</span>
621
- </div>`}
622
- </pre>
623
- </div>
624
- </div>
625
- </div>
626
- </div>
627
- </div>
628
-
629
- {/* Accessibility */}
630
- <div className="!space-y-8">
631
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
632
- Accessibility Features
633
- </h2>
634
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
635
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
636
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
637
- ✅ Built-in Features
638
- </h3>
639
- <ul className="text-fm-secondary! !space-y-2 text-sm">
640
- <li className="text-fm-secondary!">
641
- Uses Radix UI AccessibleIcon wrapper
642
- </li>
643
- <li className="text-fm-secondary!">
644
- Provides screen reader label "Youtube icon"
645
- </li>
646
- <li className="text-fm-secondary!">
647
- Supports keyboard navigation when interactive
648
- </li>
649
- <li className="text-fm-secondary!">
650
- Maintains proper color contrast ratios
651
- </li>
652
- <li className="text-fm-secondary!">
653
- Scales with user's font size preferences
654
- </li>
655
- </ul>
656
- </div>
657
-
658
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
659
- <h3 className="text-fm-icon-negative! text-lg font-semibold">
660
- 💡 Best Practices
661
- </h3>
662
- <ul className="text-fm-secondary !space-y-2 text-sm">
663
- <li className="text-fm-secondary!">
664
- Always pair with descriptive text for actions
665
- </li>
666
- <li className="text-fm-secondary!">
667
- Use YouTube's brand red for authenticity
668
- </li>
669
- <li className="text-fm-secondary!">
670
- Ensure sufficient color contrast on backgrounds
671
- </li>
672
- <li className="text-fm-secondary!">
673
- Add focus states for interactive elements
674
- </li>
675
- <li className="text-fm-secondary!">
676
- Follow YouTube's brand guidelines for usage
677
- </li>
678
- </ul>
679
- </div>
680
- </div>
681
-
682
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
683
- <h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
684
- Custom Accessibility Label
685
- </h3>
686
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
687
- <div className="bg-fm-surface-secondary rounded-lg p-4">
688
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
689
- {`// Custom implementation with specific label
690
- import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
691
-
692
- function CustomYoutubeIcon({ label = "YouTube", ...props }) {
35
+ <AuralIconDocsPage
36
+ accentToken="negative"
37
+ features={[
38
+ { title: "Brand Mark", description: "YouTube identity icon" },
39
+ { title: "Video Platform", description: "Channel and video links" },
40
+ { title: "Accessible", description: "ARIA-ready by default" },
41
+ ]}
42
+ quickStart={{
43
+ codeExample: `import { YoutubeIcon } from "src/ui/icons/youtube-icon"
44
+
45
+ function YouTubeLink() {
693
46
  return (
694
- <AccessibleIcon label={label}>
695
- <YoutubeIcon {...props} />
696
- </AccessibleIcon>
47
+ <a href="https://youtube.com/@channel" target="_blank">
48
+ <YoutubeIcon className="h-5 w-5 text-fm-icon-negative" />
49
+ </a>
697
50
  )
698
- }
699
-
700
- // Usage with specific context
701
- <CustomYoutubeIcon
702
- label="Watch video on YouTube"
703
- className="h-5 w-5 text-red-400"
704
- />`}
705
- </pre>
706
- </div>
707
- <div className="!space-y-4">
708
- <p className="text-fm-secondary! text-sm">
709
- For specific contexts, you can wrap the YoutubeIcon with
710
- a custom AccessibleIcon component that provides more
711
- descriptive labels for video actions and platform
712
- navigation.
713
- </p>
714
- <div className="border-fm-icon-negative/20 bg-fm-icon-negative/10 rounded-lg border p-4">
715
- <div className="text-fm-icon-negative flex items-center gap-2 text-sm">
716
- <YoutubeIcon className="h-4 w-4" />
717
- <span>
718
- This approach gives screen readers more context
719
- </span>
720
- </div>
721
- </div>
722
- </div>
723
- </div>
724
- </div>
725
- </div>
726
-
727
- {/* Related Icons */}
728
- <div className="!space-y-8">
729
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
730
- Related Icons
731
- </h2>
732
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
733
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
734
- <div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
735
- <span className="text-2xl">▶️</span>
736
- </div>
737
- <div>
738
- <div className="text-fm-icon-active font-medium">
739
- PlayIcon
740
- </div>
741
- <div className="text-fm-tertiary text-xs">
742
- Video playback
743
- </div>
744
- </div>
745
- </div>
746
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
747
- <div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
748
- <span className="text-2xl">🎥</span>
749
- </div>
750
- <div>
751
- <div className="text-fm-icon-active font-medium">
752
- VideoIcon
753
- </div>
754
- <div className="text-fm-tertiary text-xs">
755
- Video content
756
- </div>
757
- </div>
758
- </div>
759
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
760
- <div className="bg-fm-icon-positive/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
761
- <span className="text-2xl">🔗</span>
762
- </div>
763
- <div>
764
- <div className="text-fm-icon-active font-medium">
765
- ShareIcon
766
- </div>
767
- <div className="text-fm-tertiary text-xs">
768
- Share content
769
- </div>
770
- </div>
771
- </div>
772
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
773
- <div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
774
- <span className="text-2xl">📺</span>
775
- </div>
776
- <div>
777
- <div className="text-fm-icon-active font-medium">
778
- ChannelIcon
779
- </div>
780
- <div className="text-fm-tertiary text-xs">
781
- Channel content
782
- </div>
783
- </div>
784
- </div>
785
- </div>
786
- </div>
787
- </div>
788
-
789
- {/* Footer */}
790
- <div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
791
- <div className="!mx-auto max-w-7xl px-6 py-8">
792
- <div className="!space-y-4 text-center">
793
- <p className="text-fm-tertiary!">
794
- YoutubeIcon is part of the Aural UI icon library, built with
795
- accessibility and brand consistency in mind.
796
- </p>
797
- <p className="text-fm-placeholder! text-sm">
798
- All icons use Radix UI's AccessibleIcon for screen reader
799
- compatibility and follow WCAG guidelines.
800
- </p>
801
- </div>
802
- </div>
803
- </div>
804
- </div>
805
- </>
51
+ }`,
52
+ livePreview: (
53
+ <a href="#" target="_blank" rel="noreferrer">
54
+ <YoutubeIcon className="text-fm-icon-negative h-6 w-6" />
55
+ </a>
56
+ ),
57
+ }}
58
+ relatedIcons={[
59
+ {
60
+ name: "InstagramIcon",
61
+ description: "Instagram brand mark",
62
+ icon: InstagramIcon,
63
+ accentToken: "info",
64
+ },
65
+ {
66
+ name: "TwitterXIcon",
67
+ description: "X (Twitter) brand mark",
68
+ icon: TwitterXIcon,
69
+ accentToken: "positive",
70
+ },
71
+ {
72
+ name: "LinkedInIcon",
73
+ description: "LinkedIn brand mark",
74
+ icon: LinkedInIcon,
75
+ accentToken: "warning",
76
+ },
77
+ {
78
+ name: "ThreadsIcon",
79
+ description: "Threads brand mark",
80
+ icon: ThreadsIcon,
81
+ accentToken: "negative",
82
+ },
83
+ ]}
84
+ />
806
85
  ),
807
86
  },
808
87
  },
809
88
  tags: ["autodocs"],
810
89
  argTypes: {
811
- width: {
812
- control: { type: "range", min: 8, max: 96, step: 2 },
813
- description: "Width of the icon in pixels",
90
+ className: {
91
+ control: "text",
92
+ description: "CSS classes including color token",
814
93
  },
815
94
  withAccessibility: {
816
95
  control: "boolean",
817
- description: "Whether to wrap the icon with accessibility features",
818
- },
819
- height: {
820
- control: { type: "range", min: 8, max: 96, step: 2 },
821
- description: "Height of the icon in pixels",
822
- },
823
- fill: {
824
- control: "color",
825
- description: "Fill color of the icon",
826
- },
827
- className: {
828
- control: "text",
829
- description: "CSS classes for styling",
96
+ description: "Wrap with accessibility label",
830
97
  },
831
98
  },
832
99
  }
@@ -834,221 +101,129 @@ function CustomYoutubeIcon({ label = "YouTube", ...props }) {
834
101
  export default meta
835
102
  type Story = StoryObj<typeof YoutubeIcon>
836
103
 
837
- // Story parameters for consistent dark theme
838
- const storyParameters = {
839
- backgrounds: {
840
- default: "dark",
841
- values: [
842
- { name: "dark", value: "var(--color-fm-surface-primary)" },
843
- { name: "darker", value: "var(--color-fm-neutral-0)" },
844
- ],
845
- },
846
- }
847
-
848
104
  export const Default: Story = {
849
105
  args: {
850
- width: 24,
851
- height: 24,
852
- className: "text-fm-icon-negative",
106
+ className: "h-6 w-6 text-fm-icon-negative",
853
107
  withAccessibility: true,
854
108
  },
855
- parameters: storyParameters,
856
109
  render: (args) => (
857
- <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">
110
+ <IconDefaultCanvas>
858
111
  <YoutubeIcon {...args} />
859
- </div>
112
+ </IconDefaultCanvas>
860
113
  ),
861
114
  }
862
115
 
863
116
  export const SizeVariations: Story = {
864
- parameters: {
865
- ...storyParameters,
866
- docs: {
867
- description: {
868
- story:
869
- "YoutubeIcon in different sizes, from small UI elements to large video displays.",
870
- },
871
- },
872
- },
873
- render: () => (
874
- <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">
875
- <div className="text-center">
876
- <YoutubeIcon className="text-fm-icon-negative !mx-auto mb-2 h-3 w-3" />
877
- <span className="text-fm-tertiary text-xs">12px</span>
878
- </div>
879
- <div className="text-center">
880
- <YoutubeIcon className="text-fm-icon-negative !mx-auto mb-2 h-4 w-4" />
881
- <span className="text-fm-tertiary text-xs">16px</span>
882
- </div>
883
- <div className="text-center">
884
- <YoutubeIcon className="text-fm-icon-negative !mx-auto mb-2 h-5 w-5" />
885
- <span className="text-fm-tertiary text-xs">20px</span>
886
- </div>
887
- <div className="text-center">
888
- <YoutubeIcon className="text-fm-icon-negative !mx-auto mb-2 h-6 w-6" />
889
- <span className="text-fm-tertiary text-xs">24px</span>
890
- </div>
891
- <div className="text-center">
892
- <YoutubeIcon className="text-fm-icon-negative !mx-auto mb-2 h-8 w-8" />
893
- <span className="text-fm-tertiary text-xs">32px</span>
894
- </div>
895
- <div className="text-center">
896
- <YoutubeIcon className="text-fm-icon-negative !mx-auto mb-2 h-12 w-12" />
897
- <span className="text-fm-tertiary text-xs">48px</span>
898
- </div>
899
- </div>
900
- ),
117
+ render: () => <IconSizeVariations icon={YoutubeIcon} />,
901
118
  }
902
119
 
903
- export const ColorVariations: Story = {
904
- parameters: {
905
- ...storyParameters,
906
- docs: {
907
- description: {
908
- story:
909
- "YoutubeIcon in different brand and semantic colors for various contexts.",
910
- },
911
- },
912
- },
120
+ export const BrandColors: Story = {
913
121
  render: () => (
914
- <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">
915
- <div className="text-center">
916
- <div className="border-fm-icon-negative/30 bg-fm-icon-negative/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
917
- <YoutubeIcon className="text-fm-icon-negative h-8 w-8" />
918
- </div>
919
- <div className="text-fm-icon-active text-sm font-medium">
920
- YouTube Red
921
- </div>
922
- <div className="text-fm-icon-negative text-xs">
923
- text-fm-icon-negative
924
- </div>
925
- </div>
926
- <div className="text-center">
927
- <div className="border-fm-icon-negative/30 bg-fm-icon-negative/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
928
- <YoutubeIcon className="text-fm-icon-negative h-8 w-8" />
929
- </div>
930
- <div className="text-fm-icon-active text-sm font-medium">Light Red</div>
931
- <div className="text-fm-icon-negative text-xs">
932
- text-fm-icon-negative
933
- </div>
934
- </div>
935
- <div className="text-center">
936
- <div className="border-fm-divider-primary bg-fm-divider-primary !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
937
- <YoutubeIcon className="text-fm-icon-active h-8 w-8" />
938
- </div>
939
- <div className="text-fm-icon-active text-sm font-medium">White</div>
940
- <div className="text-fm-tertiary text-xs">text-fm-icon-active</div>
941
- </div>
942
- <div className="text-center">
943
- <div className="border-fm-divider-primary bg-fm-surface-tertiary/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
944
- <YoutubeIcon className="text-fm-placeholder h-8 w-8" />
945
- </div>
946
- <div className="text-fm-icon-active text-sm font-medium">Neutral</div>
947
- <div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
948
- </div>
949
- </div>
122
+ <IconBrandColors
123
+ icon={YoutubeIcon}
124
+ variants={[
125
+ {
126
+ label: "Brand Red",
127
+ description: "Recommended",
128
+ cardClassName: "h-24 w-24",
129
+ cardStyle: { backgroundColor: "#FF0000" },
130
+ iconClassName: "h-8 w-8 text-white",
131
+ },
132
+ {
133
+ label: "White Background",
134
+ description: "Official contrast",
135
+ cardClassName:
136
+ "border-fm-divider-secondary h-24 w-24 border bg-white",
137
+ iconClassName: "h-8 w-8 text-[#FF0000]",
138
+ },
139
+ {
140
+ label: "Primary Surface",
141
+ description: "Theme surface",
142
+ cardClassName: "bg-fm-surface-primary h-24 w-24",
143
+ iconClassName: "h-8 w-8 text-[#FF0000]",
144
+ },
145
+ {
146
+ label: "Transparent",
147
+ description: "Original mark",
148
+ cardClassName:
149
+ "border-fm-divider-contrast h-24 w-24 border bg-transparent",
150
+ iconClassName: "h-8 w-8 text-[#FF0000]",
151
+ },
152
+ ]}
153
+ />
950
154
  ),
951
155
  }
952
156
 
953
157
  export const UsageExamples: Story = {
954
- parameters: {
955
- ...storyParameters,
956
- docs: {
957
- description: {
958
- story:
959
- "Real-world usage examples showing YoutubeIcon in different video and social media contexts.",
960
- },
961
- },
962
- },
963
158
  render: () => (
964
- <div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh !space-y-8 rounded-lg bg-linear-to-br p-8">
965
- {/* Video Actions */}
966
- <div className="!space-y-2">
967
- <h3 className="text-fm-icon-active text-sm font-medium">
968
- Video Actions
969
- </h3>
970
- <div className="flex gap-4">
971
- <button className="border-fm-icon-negative/30 bg-fm-icon-negative/20 text-fm-icon-negative hover:bg-fm-icon-negative/30 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors">
972
- <YoutubeIcon className="h-4 w-4" />
159
+ <IconUsageCanvas>
160
+ <IconUsageSection title="YouTube Channel Link">
161
+ <a
162
+ href="#"
163
+ className="flex items-center gap-2 rounded-xl px-4 py-2 text-white"
164
+ style={{ backgroundColor: "#FF0000" }}
165
+ target="_blank"
166
+ rel="noreferrer"
167
+ >
168
+ <YoutubeIcon className="h-4 w-4 text-white" />
169
+ <span className="font-fm-text text-sm font-medium">
973
170
  Watch on YouTube
974
- </button>
975
- <button className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active hover:bg-fm-surface-secondary flex items-center gap-2 rounded-lg border px-3 py-2 transition-colors">
976
- <YoutubeIcon className="h-4 w-4" />
977
- Share
978
- </button>
171
+ </span>
172
+ </a>
173
+ </IconUsageSection>
174
+
175
+ <IconUsageSection title="Social Links Row">
176
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center justify-center gap-4 rounded-xl border p-4">
177
+ {[YoutubeIcon, InstagramIcon, TwitterXIcon, LinkedInIcon].map(
178
+ (Icon, i) => (
179
+ <a
180
+ key={i}
181
+ href="#"
182
+ className="border-fm-divider-secondary flex h-10 w-10 items-center justify-center rounded-xl border"
183
+ target="_blank"
184
+ rel="noreferrer"
185
+ >
186
+ <Icon className="text-fm-icon-active h-5 w-5" />
187
+ </a>
188
+ )
189
+ )}
979
190
  </div>
980
- </div>
981
-
982
- {/* Video Card */}
983
- <div className="!space-y-2">
984
- <h3 className="text-fm-icon-active text-sm font-medium">Video Card</h3>
985
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
986
- <div className="flex items-center justify-between">
987
- <div className="flex items-center gap-3">
988
- <div className="bg-fm-icon-negative/20 flex h-10 w-10 items-center justify-center rounded-lg">
989
- <YoutubeIcon className="text-fm-icon-negative h-5 w-5" />
990
- </div>
991
- <div>
992
- <div className="text-fm-icon-active text-sm font-medium">
993
- Introduction to React
994
- </div>
995
- <div className="text-fm-tertiary text-xs">
996
- 15:30 • 2.5M views
997
- </div>
191
+ </IconUsageSection>
192
+
193
+ <IconUsageSection title="Video Content Card">
194
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm rounded-xl border">
195
+ <div className="bg-fm-divider-secondary relative h-32 overflow-hidden rounded-t-xl">
196
+ <div className="absolute inset-0 flex items-center justify-center">
197
+ <div
198
+ className="flex h-10 w-10 items-center justify-center rounded-full"
199
+ style={{ backgroundColor: "#FF0000" }}
200
+ >
201
+ <YoutubeIcon className="h-5 w-5 text-white" />
998
202
  </div>
999
203
  </div>
1000
- <button className="text-fm-placeholder hover:bg-fm-icon-negative/20 hover:text-fm-icon-negative rounded-lg p-2 transition-colors">
1001
- <YoutubeIcon className="h-4 w-4" />
1002
- </button>
1003
- </div>
1004
- </div>
1005
- </div>
1006
-
1007
- {/* Social Links */}
1008
- <div className="!space-y-2">
1009
- <h3 className="text-fm-icon-active text-sm font-medium">
1010
- Social Media Links
1011
- </h3>
1012
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4">
1013
- <div className="hover:bg-fm-surface-secondary flex items-center gap-3 rounded px-3 py-2 text-sm">
1014
- <YoutubeIcon className="text-fm-icon-negative h-4 w-4" />
1015
- <span className="text-fm-icon-active">YouTube Channel</span>
1016
- <span className="text-fm-tertiary ml-auto text-xs">External</span>
1017
- </div>
1018
- <div className="hover:bg-fm-surface-secondary flex items-center gap-3 rounded px-3 py-2 text-sm">
1019
- <YoutubeIcon className="text-fm-icon-negative h-4 w-4" />
1020
- <span className="text-fm-icon-active">Latest Videos</span>
1021
204
  </div>
1022
- <div className="hover:bg-fm-surface-secondary flex items-center gap-3 rounded px-3 py-2 text-sm">
1023
- <YoutubeIcon className="text-fm-icon-negative h-4 w-4" />
1024
- <span className="text-fm-icon-active">Playlists</span>
205
+ <div className="p-3">
206
+ <div className="text-fm-primary font-fm-text text-sm font-medium">
207
+ Creator Interview
208
+ </div>
209
+ <div className="text-fm-secondary font-fm-text text-xs">
210
+ Pocket FM Channel
211
+ </div>
1025
212
  </div>
1026
213
  </div>
1027
- </div>
1028
- </div>
214
+ </IconUsageSection>
215
+ </IconUsageCanvas>
1029
216
  ),
1030
217
  }
1031
218
 
1032
219
  export const Playground: Story = {
1033
- parameters: {
1034
- ...storyParameters,
1035
- docs: {
1036
- description: {
1037
- story:
1038
- "Interactive playground to experiment with different YoutubeIcon configurations.",
1039
- },
1040
- },
1041
- },
1042
220
  args: {
1043
- width: 32,
1044
- height: 32,
1045
- className: "text-fm-icon-negative",
221
+ className: "h-8 w-8 text-fm-icon-negative",
222
+ withAccessibility: true,
1046
223
  },
1047
224
  render: (args) => (
1048
- <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">
1049
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
1050
- <YoutubeIcon {...args} />
1051
- </div>
1052
- </div>
225
+ <IconPlaygroundCanvas>
226
+ <YoutubeIcon {...args} />
227
+ </IconPlaygroundCanvas>
1053
228
  ),
1054
229
  }