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 { GoogleLogoIcon } from "src/ui/icons/google-logo-icon"
5
+ import { InstagramIcon } from "src/ui/icons/instagram-icon"
6
+ import { LinkedInIcon } from "src/ui/icons/linked-in-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 { AppleLogoIcon } from "."
5
19
 
6
20
  const meta: Meta<typeof AppleLogoIcon> = {
@@ -18,782 +32,70 @@ const meta: Meta<typeof AppleLogoIcon> = {
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-info/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-info/10 to-fm-surface-tertiary/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-divider-primary from-fm-surface-tertiary/20 to-fm-icon-info/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
90
- <AppleLogoIcon className="text-fm-icon-active h-12 w-12" />
91
- </div>
92
- <h1 className="!text-fm-primary text-5xl font-bold">
93
- AppleLogoIcon
94
- </h1>
95
- <p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
96
- The iconic Apple logo for branding, authentication, and
97
- platform identification. Built with accessibility in mind
98
- using Radix UI's AccessibleIcon wrapper for seamless screen
99
- 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-info 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-secondary 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-info! 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 { AppleLogoIcon } from "@icons/apple-logo-icon"
150
-
151
- function LoginPage() {
35
+ <AuralIconDocsPage
36
+ accentToken="info"
37
+ features={[
38
+ { title: "Brand Mark", description: "Apple identity icon" },
39
+ { title: "Auth Icon", description: "Sign in with Apple" },
40
+ { title: "Accessible", description: "ARIA-ready by default" },
41
+ ]}
42
+ quickStart={{
43
+ codeExample: `import { AppleLogoIcon } from "src/ui/icons/apple-logo-icon"
44
+
45
+ function AppleSignIn() {
152
46
  return (
153
- <button className="flex items-center gap-3">
47
+ <button className="flex items-center gap-2 bg-black text-white rounded-lg px-4 py-2">
154
48
  <AppleLogoIcon className="h-5 w-5 text-white" />
155
- <span>Sign in with Apple</span>
49
+ Sign in with Apple
156
50
  </button>
157
51
  )
158
- }`}
159
- </pre>
160
- </div>
161
- </div>
162
-
163
- <div className="!space-y-4">
164
- <h3 className="text-fm-icon-info! 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-divider-secondary bg-fm-surface-primary hover:bg-fm-surface-primary flex items-center gap-3 rounded-lg border px-6 py-3 transition-colors">
169
- <AppleLogoIcon className="text-fm-icon-active h-5 w-5" />
170
- <span className="text-fm-icon-active">
171
- Sign in with Apple
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-info! 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
- 20
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-info! 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
- #fff
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-info! 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-info! 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-info! 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
- <AppleLogoIcon className="text-fm-icon-active !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
- <AppleLogoIcon className="text-fm-icon-active !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
- <AppleLogoIcon className="text-fm-icon-active !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
- <AppleLogoIcon className="text-fm-icon-active !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
- <AppleLogoIcon className="text-fm-icon-active !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
- <AppleLogoIcon className="text-fm-icon-active !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-info! 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
- <AppleLogoIcon className="h-4 w-4" />
345
-
346
- // Medium (24px)
347
- <AppleLogoIcon className="h-6 w-6" />
348
-
349
- // Large (32px)
350
- <AppleLogoIcon className="h-8 w-8" />
351
-
352
- // Custom size
353
- <AppleLogoIcon 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-info! 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
- <AppleLogoIcon className="text-fm-icon-active h-6 w-6" />
375
- <div>
376
- <div className="text-fm-icon-active text-sm font-medium">
377
- Classic White
378
- </div>
379
- <div className="text-fm-tertiary text-xs">
380
- text-fm-icon-active
381
- </div>
382
- </div>
383
- </div>
384
- <div className="flex items-center gap-4">
385
- <AppleLogoIcon className="text-fm-primary h-6 w-6" />
386
- <div>
387
- <div className="text-fm-icon-active text-sm font-medium">
388
- Space Gray
389
- </div>
390
- <div className="text-fm-tertiary text-xs">
391
- text-fm-primary
392
- </div>
393
- </div>
394
- </div>
395
- <div className="flex items-center gap-4">
396
- <AppleLogoIcon className="text-fm-icon-info h-6 w-6" />
397
- <div>
398
- <div className="text-fm-icon-active text-sm font-medium">
399
- Apple Blue
400
- </div>
401
- <div className="text-fm-tertiary text-xs">
402
- text-fm-icon-info
403
- </div>
404
- </div>
405
- </div>
406
- <div className="flex items-center gap-4">
407
- <AppleLogoIcon 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-info! 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
- <AppleLogoIcon className="h-6 w-6 text-white" />
428
- <AppleLogoIcon className="h-6 w-6 text-gray-800" />
429
-
430
- // Using CSS custom properties
431
- <AppleLogoIcon
432
- className="h-6 w-6"
433
- style={{ color: 'var(--brand-primary)' }}
434
- />
435
-
436
- // Direct fill prop
437
- <AppleLogoIcon
438
- width={24}
439
- height={24}
440
- fill="var(--color-fm-neutral-1100)"
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
- {/* Authentication Button */}
456
- <div className="!space-y-4">
457
- <h3 className="text-fm-icon-info! text-lg font-semibold">
458
- Authentication Button
459
- </h3>
460
- <div className="!space-y-4">
461
- <div className="flex gap-4">
462
- <button className="bg-fm-surface-primary text-fm-icon-active hover:bg-fm-surface-primary flex items-center gap-3 rounded-lg px-6 py-3 transition-colors">
463
- <AppleLogoIcon className="h-5 w-5" />
464
- Sign in with Apple
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-3 rounded-lg border px-4 py-2 transition-colors">
467
- <AppleLogoIcon className="h-4 w-4" />
468
- Continue
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 authentication button
474
- <button className="flex items-center gap-3 bg-black px-6 py-3 rounded-lg text-white">
475
- <AppleLogoIcon className="h-5 w-5" />
476
- Sign in with Apple
477
- </button>
478
-
479
- // Secondary continue button
480
- <button className="flex items-center gap-3 bg-white/5 border border-white/20 px-4 py-2 rounded-lg">
481
- <AppleLogoIcon className="h-4 w-4" />
482
- Continue
483
- </button>`}
484
- </pre>
485
- </div>
486
- </div>
487
- </div>
488
-
489
- {/* App Footer */}
490
- <div className="!space-y-4">
491
- <h3 className="text-fm-icon-info! text-lg font-semibold">
492
- App Footer
493
- </h3>
494
- <div className="!space-y-4">
495
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
496
- <div className="flex items-center justify-center gap-4">
497
- <span className="text-fm-secondary text-sm">
498
- Available on
499
- </span>
500
- <div className="flex items-center gap-2">
501
- <AppleLogoIcon className="text-fm-icon-active h-6 w-6" />
502
- <span className="text-fm-icon-active">
503
- App Store
504
- </span>
505
- </div>
506
- </div>
507
- </div>
508
- <div className="bg-fm-surface-secondary rounded-lg p-4">
509
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
510
- {`<div className="flex items-center justify-center gap-4">
511
- <span className="text-sm text-white/70">Available on</span>
512
- <div className="flex items-center gap-2">
513
- <AppleLogoIcon className="h-6 w-6 text-white" />
514
- <span className="text-white">App Store</span>
515
- </div>
516
- </div>`}
517
- </pre>
518
- </div>
519
- </div>
520
- </div>
521
-
522
- {/* Platform Badge */}
523
- <div className="!space-y-4">
524
- <h3 className="text-fm-icon-info! text-lg font-semibold">
525
- Platform Badge
526
- </h3>
527
- <div className="!space-y-4">
528
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
529
- <div className="border-fm-divider-primary bg-fm-surface-tertiary/10 inline-flex items-center gap-2 rounded-full border px-3 py-1">
530
- <AppleLogoIcon className="text-fm-icon-active h-4 w-4" />
531
- <span className="text-fm-icon-active text-sm">
532
- macOS
533
- </span>
534
- </div>
535
- </div>
536
- <div className="bg-fm-surface-secondary rounded-lg p-4">
537
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
538
- {`<div className="inline-flex items-center gap-2 rounded-full border border-gray-500/30 bg-gray-500/10 px-3 py-1">
539
- <AppleLogoIcon className="h-4 w-4 text-white" />
540
- <span className="text-sm text-white">macOS</span>
541
- </div>`}
542
- </pre>
543
- </div>
544
- </div>
545
- </div>
546
-
547
- {/* Download Card */}
548
- <div className="!space-y-4">
549
- <h3 className="text-fm-icon-info! text-lg font-semibold">
550
- Download Card
551
- </h3>
552
- <div className="!space-y-4">
553
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
554
- <div className="flex items-center justify-between">
555
- <div className="flex items-center gap-4">
556
- <div className="bg-fm-surface-primary flex h-12 w-12 items-center justify-center rounded-lg">
557
- <AppleLogoIcon className="text-fm-icon-active h-6 w-6" />
558
- </div>
559
- <div>
560
- <div className="text-fm-icon-active font-medium">
561
- iOS App
562
- </div>
563
- <div className="text-fm-tertiary text-sm">
564
- Download for iPhone & iPad
565
- </div>
566
- </div>
567
- </div>
568
- <button className="bg-fm-icon-info text-fm-icon-active hover:bg-fm-icon-info rounded-lg px-4 py-2 text-sm transition-colors">
569
- Download
570
- </button>
571
- </div>
572
- </div>
573
- <div className="bg-fm-surface-secondary rounded-lg p-4">
574
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
575
- {`<div className="flex items-center justify-between">
576
- <div className="flex items-center gap-4">
577
- <div className="flex h-12 w-12 items-center justify-center rounded-lg bg-black">
578
- <AppleLogoIcon className="h-6 w-6 text-white" />
579
- </div>
580
- <div>
581
- <div className="font-medium text-white">iOS App</div>
582
- <div className="text-sm text-white/60">Download for iPhone & iPad</div>
583
- </div>
584
- </div>
585
- <button className="bg-blue-500 hover:bg-blue-600 px-4 py-2 rounded-lg text-sm text-white">
586
- Download
587
- </button>
588
- </div>`}
589
- </pre>
590
- </div>
591
- </div>
592
- </div>
593
- </div>
594
- </div>
595
-
596
- {/* Accessibility */}
597
- <div className="!space-y-8">
598
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
599
- Accessibility Features
600
- </h2>
601
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
602
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
603
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
604
- ✅ Built-in Features
605
- </h3>
606
- <ul className="text-fm-secondary! !space-y-2 text-sm">
607
- <li className="text-fm-secondary!">
608
- Uses Radix UI AccessibleIcon wrapper
609
- </li>
610
- <li className="text-fm-secondary!">
611
- Provides screen reader label "Apple logo"
612
- </li>
613
- <li className="text-fm-secondary!">
614
- Supports keyboard navigation when interactive
615
- </li>
616
- <li className="text-fm-secondary!">
617
- Maintains proper color contrast ratios
618
- </li>
619
- <li className="text-fm-secondary!">
620
- Scales with user's font size preferences
621
- </li>
622
- </ul>
623
- </div>
624
-
625
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
626
- <h3 className="text-fm-icon-info! text-lg font-semibold">
627
- 💡 Best Practices
628
- </h3>
629
- <ul className="text-fm-secondary !space-y-2 text-sm">
630
- <li className="text-fm-secondary!">
631
- Always pair with descriptive text for actions
632
- </li>
633
- <li className="text-fm-secondary!">
634
- Use consistent sizing across similar contexts
635
- </li>
636
- <li className="text-fm-secondary!">
637
- Ensure sufficient color contrast on backgrounds
638
- </li>
639
- <li className="text-fm-secondary!">
640
- Add focus states for interactive elements
641
- </li>
642
- <li className="text-fm-secondary!">
643
- Consider brand guidelines for Apple logo usage
644
- </li>
645
- </ul>
646
- </div>
647
- </div>
648
-
649
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
650
- <h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
651
- Custom Accessibility Label
652
- </h3>
653
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
654
- <div className="bg-fm-surface-secondary rounded-lg p-4">
655
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
656
- {`// Custom implementation with specific label
657
- import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
658
-
659
- function CustomAppleIcon({ label = "Apple", ...props }) {
660
- return (
661
- <AccessibleIcon label={label}>
662
- <AppleLogoIcon {...props} />
663
- </AccessibleIcon>
664
- )
665
- }
666
-
667
- // Usage with specific context
668
- <CustomAppleIcon
669
- label="Sign in with Apple"
670
- className="h-5 w-5 text-white"
671
- />`}
672
- </pre>
673
- </div>
674
- <div className="!space-y-4">
675
- <p className="text-fm-secondary! text-sm">
676
- For specific contexts, you can wrap the AppleLogoIcon
677
- with a custom AccessibleIcon component that provides
678
- more descriptive labels for authentication or platform
679
- identification.
680
- </p>
681
- <div className="border-fm-icon-info/20 bg-fm-icon-info/10 rounded-lg border p-4">
682
- <div className="text-fm-icon-info flex items-center gap-2 text-sm">
683
- <AppleLogoIcon className="h-4 w-4" />
684
- <span>
685
- This approach gives screen readers more context
686
- </span>
687
- </div>
688
- </div>
689
- </div>
690
- </div>
691
- </div>
692
- </div>
693
-
694
- {/* Related Icons */}
695
- <div className="!space-y-8">
696
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
697
- Related Icons
698
- </h2>
699
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
700
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
701
- <div className="bg-fm-icon-positive/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
702
- <span className="text-2xl">🔐</span>
703
- </div>
704
- <div>
705
- <div className="text-fm-icon-active font-medium">
706
- LoginIcon
707
- </div>
708
- <div className="text-fm-tertiary text-xs">
709
- Authentication
710
- </div>
711
- </div>
712
- </div>
713
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
714
- <div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
715
- <span className="text-2xl">👤</span>
716
- </div>
717
- <div>
718
- <div className="text-fm-icon-active font-medium">
719
- UserIcon
720
- </div>
721
- <div className="text-fm-tertiary text-xs">
722
- User profile
723
- </div>
724
- </div>
725
- </div>
726
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
727
- <div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
728
- <span className="text-2xl">📱</span>
729
- </div>
730
- <div>
731
- <div className="text-fm-icon-active font-medium">
732
- MobileIcon
733
- </div>
734
- <div className="text-fm-tertiary text-xs">
735
- Device platform
736
- </div>
737
- </div>
738
- </div>
739
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
740
- <div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
741
- <span className="text-2xl">⬇️</span>
742
- </div>
743
- <div>
744
- <div className="text-fm-icon-active font-medium">
745
- DownloadIcon
746
- </div>
747
- <div className="text-fm-tertiary text-xs">
748
- Download apps
749
- </div>
750
- </div>
751
- </div>
752
- </div>
753
- </div>
754
- </div>
755
-
756
- {/* Footer */}
757
- <div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
758
- <div className="!mx-auto max-w-7xl px-6 py-8">
759
- <div className="!space-y-4 text-center">
760
- <p className="text-fm-tertiary!">
761
- AppleLogoIcon is part of the Aural UI icon library, built
762
- with accessibility and brand consistency in mind.
763
- </p>
764
- <p className="text-fm-placeholder! text-sm">
765
- All icons use Radix UI's AccessibleIcon for screen reader
766
- compatibility and follow WCAG guidelines.
767
- </p>
768
- </div>
769
- </div>
770
- </div>
771
- </div>
772
- </>
52
+ }`,
53
+ livePreview: (
54
+ <button className="border-fm-divider-secondary text-fm-primary font-fm-text flex items-center gap-2 rounded-lg border px-4 py-2 text-sm">
55
+ <AppleLogoIcon className="text-fm-icon-active h-5 w-5" />
56
+ Sign in with Apple
57
+ </button>
58
+ ),
59
+ }}
60
+ relatedIcons={[
61
+ {
62
+ name: "GoogleLogoIcon",
63
+ description: "Google brand mark",
64
+ icon: GoogleLogoIcon,
65
+ accentToken: "info",
66
+ },
67
+ {
68
+ name: "LinkedInIcon",
69
+ description: "LinkedIn brand mark",
70
+ icon: LinkedInIcon,
71
+ accentToken: "positive",
72
+ },
73
+ {
74
+ name: "TwitterXIcon",
75
+ description: "X (Twitter) brand mark",
76
+ icon: TwitterXIcon,
77
+ accentToken: "warning",
78
+ },
79
+ {
80
+ name: "InstagramIcon",
81
+ description: "Instagram brand mark",
82
+ icon: InstagramIcon,
83
+ accentToken: "negative",
84
+ },
85
+ ]}
86
+ />
773
87
  ),
774
88
  },
775
89
  },
776
90
  tags: ["autodocs"],
777
91
  argTypes: {
778
- width: {
779
- control: { type: "range", min: 8, max: 96, step: 2 },
780
- description: "Width of the icon in pixels",
92
+ className: {
93
+ control: "text",
94
+ description: "CSS classes including color token",
781
95
  },
782
96
  withAccessibility: {
783
97
  control: "boolean",
784
- description: "Whether to wrap the icon with accessibility features",
785
- },
786
- height: {
787
- control: { type: "range", min: 8, max: 96, step: 2 },
788
- description: "Height of the icon in pixels",
789
- },
790
- fill: {
791
- control: "color",
792
- description: "Fill color of the icon",
793
- },
794
- className: {
795
- control: "text",
796
- description: "CSS classes for styling",
98
+ description: "Wrap with accessibility label",
797
99
  },
798
100
  },
799
101
  }
@@ -801,210 +103,118 @@ function CustomAppleIcon({ label = "Apple", ...props }) {
801
103
  export default meta
802
104
  type Story = StoryObj<typeof AppleLogoIcon>
803
105
 
804
- // Story parameters for consistent dark theme
805
- const storyParameters = {
806
- backgrounds: {
807
- default: "dark",
808
- values: [
809
- { name: "dark", value: "var(--color-fm-surface-primary)" },
810
- { name: "darker", value: "var(--color-fm-neutral-0)" },
811
- ],
812
- },
813
- }
814
-
815
106
  export const Default: Story = {
816
107
  args: {
817
- width: 20,
818
- height: 20,
819
- className: "text-fm-icon-active",
108
+ className: "h-6 w-6 text-fm-icon-active",
820
109
  withAccessibility: true,
821
110
  },
822
- parameters: storyParameters,
823
111
  render: (args) => (
824
- <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">
112
+ <IconDefaultCanvas>
825
113
  <AppleLogoIcon {...args} />
826
- </div>
114
+ </IconDefaultCanvas>
827
115
  ),
828
116
  }
829
117
 
830
118
  export const SizeVariations: Story = {
831
- parameters: {
832
- ...storyParameters,
833
- docs: {
834
- description: {
835
- story:
836
- "AppleLogoIcon in different sizes, from small UI elements to large brand displays.",
837
- },
838
- },
839
- },
840
- render: () => (
841
- <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">
842
- <div className="text-center">
843
- <AppleLogoIcon className="text-fm-icon-active !mx-auto mb-2 h-3 w-3" />
844
- <span className="text-fm-tertiary text-xs">12px</span>
845
- </div>
846
- <div className="text-center">
847
- <AppleLogoIcon className="text-fm-icon-active !mx-auto mb-2 h-4 w-4" />
848
- <span className="text-fm-tertiary text-xs">16px</span>
849
- </div>
850
- <div className="text-center">
851
- <AppleLogoIcon className="text-fm-icon-active !mx-auto mb-2 h-5 w-5" />
852
- <span className="text-fm-tertiary text-xs">20px</span>
853
- </div>
854
- <div className="text-center">
855
- <AppleLogoIcon className="text-fm-icon-active !mx-auto mb-2 h-6 w-6" />
856
- <span className="text-fm-tertiary text-xs">24px</span>
857
- </div>
858
- <div className="text-center">
859
- <AppleLogoIcon className="text-fm-icon-active !mx-auto mb-2 h-8 w-8" />
860
- <span className="text-fm-tertiary text-xs">32px</span>
861
- </div>
862
- <div className="text-center">
863
- <AppleLogoIcon className="text-fm-icon-active !mx-auto mb-2 h-12 w-12" />
864
- <span className="text-fm-tertiary text-xs">48px</span>
865
- </div>
866
- </div>
867
- ),
119
+ render: () => <IconSizeVariations icon={AppleLogoIcon} />,
868
120
  }
869
121
 
870
- export const ColorVariations: Story = {
871
- parameters: {
872
- ...storyParameters,
873
- docs: {
874
- description: {
875
- story:
876
- "AppleLogoIcon in different brand and semantic colors for various contexts.",
877
- },
878
- },
879
- },
122
+ export const BrandColors: Story = {
880
123
  render: () => (
881
- <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">
882
- <div className="text-center">
883
- <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">
884
- <AppleLogoIcon className="text-fm-icon-active h-8 w-8" />
885
- </div>
886
- <div className="text-fm-icon-active text-sm font-medium">
887
- Classic White
888
- </div>
889
- <div className="text-fm-tertiary text-xs">text-fm-icon-active</div>
890
- </div>
891
- <div className="text-center">
892
- <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">
893
- <AppleLogoIcon className="text-fm-primary h-8 w-8" />
894
- </div>
895
- <div className="text-fm-icon-active text-sm font-medium">
896
- Space Gray
897
- </div>
898
- <div className="text-fm-placeholder text-xs">text-fm-primary</div>
899
- </div>
900
- <div className="text-center">
901
- <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">
902
- <AppleLogoIcon className="text-fm-icon-info h-8 w-8" />
903
- </div>
904
- <div className="text-fm-icon-active text-sm font-medium">
905
- Apple Blue
906
- </div>
907
- <div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
908
- </div>
909
- <div className="text-center">
910
- <div className="border-fm-divider-secondary bg-fm-surface-tertiary/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
911
- <AppleLogoIcon className="text-fm-placeholder h-8 w-8" />
912
- </div>
913
- <div className="text-fm-icon-active text-sm font-medium">Neutral</div>
914
- <div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
915
- </div>
916
- </div>
124
+ <IconBrandColors
125
+ icon={AppleLogoIcon}
126
+ variants={[
127
+ {
128
+ label: "Dark Background",
129
+ description: "Recommended",
130
+ cardClassName:
131
+ "border-fm-divider-secondary h-24 w-24 border bg-black",
132
+ iconClassName: "h-8 w-8",
133
+ },
134
+ {
135
+ label: "Surface Background",
136
+ description: "Theme surface",
137
+ cardClassName:
138
+ "border-fm-divider-secondary bg-fm-surface-secondary h-24 w-24 border",
139
+ iconClassName: "h-8 w-8",
140
+ },
141
+ {
142
+ label: "Contrast Background",
143
+ description: "Theme contrast",
144
+ cardClassName: "bg-fm-neutral-0 h-24 w-24",
145
+ iconClassName: "h-8 w-8",
146
+ },
147
+ {
148
+ label: "Transparent",
149
+ description: "Original mark",
150
+ cardClassName:
151
+ "border-fm-divider-contrast h-24 w-24 border bg-transparent",
152
+ iconClassName: "h-8 w-8",
153
+ },
154
+ ]}
155
+ />
917
156
  ),
918
157
  }
919
158
 
920
159
  export const UsageExamples: Story = {
921
- parameters: {
922
- ...storyParameters,
923
- docs: {
924
- description: {
925
- story:
926
- "Real-world usage examples showing AppleLogoIcon in different branding and authentication contexts.",
927
- },
928
- },
929
- },
930
160
  render: () => (
931
- <div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh !space-y-8 rounded-lg bg-linear-to-br p-8">
932
- {/* Authentication Buttons */}
933
- <div className="!space-y-2">
934
- <h3 className="text-fm-icon-active text-sm font-medium">
935
- Authentication
936
- </h3>
937
- <div className="flex gap-4">
938
- <button className="bg-fm-surface-primary text-fm-icon-active hover:bg-fm-surface-primary flex items-center gap-3 rounded-lg px-6 py-3 transition-colors">
939
- <AppleLogoIcon className="h-5 w-5" />
161
+ <IconUsageCanvas>
162
+ <IconUsageSection title="Sign In with Apple">
163
+ <button className="flex w-full max-w-sm items-center justify-center gap-3 rounded-xl bg-black px-4 py-3">
164
+ <AppleLogoIcon className="h-5 w-5 text-white" />
165
+ <span className="font-fm-text text-sm font-medium text-white">
940
166
  Sign in with Apple
167
+ </span>
168
+ </button>
169
+ </IconUsageSection>
170
+
171
+ <IconUsageSection title="Auth Provider List">
172
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm space-y-2 rounded-xl border p-4">
173
+ <button className="border-fm-divider-secondary flex w-full items-center gap-3 rounded-lg border px-3 py-2.5">
174
+ <AppleLogoIcon className="text-fm-icon-active h-5 w-5" />
175
+ <span className="text-fm-primary font-fm-text text-sm">
176
+ Continue with Apple
177
+ </span>
941
178
  </button>
942
- <button className="border-fm-divider-primary bg-fm-surface-secondary text-fm-icon-active hover:bg-fm-surface-secondary flex items-center gap-3 rounded-lg border px-4 py-2 transition-colors">
943
- <AppleLogoIcon className="h-4 w-4" />
944
- Continue
179
+ <button className="border-fm-divider-secondary flex w-full items-center gap-3 rounded-lg border px-3 py-2.5">
180
+ <GoogleLogoIcon className="h-5 w-5" />
181
+ <span className="text-fm-primary font-fm-text text-sm">
182
+ Continue with Google
183
+ </span>
945
184
  </button>
946
185
  </div>
947
- </div>
948
-
949
- {/* Platform Badge */}
950
- <div className="!space-y-2">
951
- <h3 className="text-fm-icon-active text-sm font-medium">
952
- Platform Badge
953
- </h3>
954
- <div className="border-fm-divider-primary bg-fm-surface-tertiary/10 inline-flex items-center gap-2 rounded-full border px-3 py-1">
955
- <AppleLogoIcon className="text-fm-icon-active h-4 w-4" />
956
- <span className="text-fm-icon-active text-sm">macOS</span>
957
- </div>
958
- </div>
959
-
960
- {/* Download Card */}
961
- <div className="!space-y-2">
962
- <h3 className="text-fm-icon-active text-sm font-medium">
963
- Download Card
964
- </h3>
965
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
966
- <div className="flex items-center justify-between">
967
- <div className="flex items-center gap-4">
968
- <div className="bg-fm-surface-primary flex h-12 w-12 items-center justify-center rounded-lg">
969
- <AppleLogoIcon className="text-fm-icon-active h-6 w-6" />
186
+ </IconUsageSection>
187
+
188
+ <IconUsageSection title="Connected Account">
189
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center justify-between rounded-xl border px-4 py-3">
190
+ <div className="flex items-center gap-3">
191
+ <AppleLogoIcon className="text-fm-icon-active h-5 w-5" />
192
+ <div>
193
+ <div className="text-fm-primary font-fm-text text-sm font-medium">
194
+ Apple
970
195
  </div>
971
- <div>
972
- <div className="text-fm-icon-active font-medium">iOS App</div>
973
- <div className="text-fm-tertiary text-sm">
974
- Download for iPhone & iPad
975
- </div>
196
+ <div className="text-fm-secondary font-fm-text text-xs">
197
+ user@icloud.com
976
198
  </div>
977
199
  </div>
978
- <button className="bg-fm-icon-info text-fm-icon-active hover:bg-fm-icon-info rounded-lg px-4 py-2 text-sm transition-colors">
979
- Download
980
- </button>
981
200
  </div>
201
+ <span className="text-fm-icon-positive font-fm-text text-xs">
202
+ Connected
203
+ </span>
982
204
  </div>
983
- </div>
984
- </div>
205
+ </IconUsageSection>
206
+ </IconUsageCanvas>
985
207
  ),
986
208
  }
987
209
 
988
210
  export const Playground: Story = {
989
- parameters: {
990
- ...storyParameters,
991
- docs: {
992
- description: {
993
- story:
994
- "Interactive playground to experiment with different AppleLogoIcon configurations.",
995
- },
996
- },
997
- },
998
211
  args: {
999
- width: 32,
1000
- height: 32,
1001
- className: "text-fm-icon-active",
212
+ className: "h-8 w-8 text-fm-icon-active",
213
+ withAccessibility: true,
1002
214
  },
1003
215
  render: (args) => (
1004
- <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">
1005
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
1006
- <AppleLogoIcon {...args} />
1007
- </div>
1008
- </div>
216
+ <IconPlaygroundCanvas>
217
+ <AppleLogoIcon {...args} />
218
+ </IconPlaygroundCanvas>
1009
219
  ),
1010
220
  }