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 { EmailIcon } from "src/ui/icons/email-icon"
5
+ import { MessageIcon } from "src/ui/icons/message-icon"
6
+ import { PaperPlaneIcon } from "src/ui/icons/paper-plane-icon"
7
+ import { ShareIcon } from "src/ui/icons/share-icon"
8
+ import {
9
+ IconColorVariations,
10
+ IconDefaultCanvas,
11
+ IconPlaygroundCanvas,
12
+ IconSizeVariations,
13
+ IconUsageCanvas,
14
+ IconUsageSection,
15
+ } from "src/ui/story-spec/icons/icon-story-canvas"
16
+ import { AuralIconDocsPage } from "src/ui/story-spec/icons/icon-story-docs-page"
17
+
4
18
  import { PhoneIcon } from "."
5
19
 
6
20
  const meta: Meta<typeof PhoneIcon> = {
@@ -18,862 +32,69 @@ const meta: Meta<typeof PhoneIcon> = {
18
32
  },
19
33
  docs: {
20
34
  page: () => (
21
- <>
22
- {/* Override default docs styling */}
23
- <style>
24
- {`
25
- .sbdocs-wrapper {
26
- padding: 0 ;
27
- max-width: none ;
28
- background: transparent ;
29
- }
30
- .sbdocs-content {
31
- max-width: none ;
32
- padding: 0 ;
33
- margin: 0 ;
34
- background: transparent ;
35
- }
36
- .docs-story {
37
- background: transparent ;
38
- }
39
- .sbdocs {
40
- background: transparent ;
41
- }
42
- body {
43
- background: var(--color-fm-surface-primary) ;
44
- }
45
- #storybook-docs {
46
- background: var(--color-fm-surface-primary) ;
47
- }
48
- .sbdocs-preview {
49
- background: transparent ;
50
- border: none ;
51
- }
52
- .sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
53
- color: var(--color-fm-icon-active) ;
54
- }
55
- .sbdocs-p, .sbdocs-li {
56
- color: var(--color-fm-secondary) ;
57
- }
58
- .sbdocs-code {
59
- background: var(--color-fm-surface-secondary) ;
60
- color: var(--color-fm-secondary-500) ;
61
- border: 1px solid var(--color-fm-divider-secondary) ;
62
- }
63
- .sbdocs-pre {
64
- background: var(--color-fm-surface-secondary) ;
65
- border: 1px solid var(--color-fm-divider-secondary) ;
66
- }
67
- .sbdocs-table {
68
- background: var(--color-fm-surface-secondary) ;
69
- border: 1px solid var(--color-fm-divider-secondary) ;
70
- }
71
- .sbdocs-table th {
72
- background: var(--color-fm-surface-secondary) ;
73
- color: var(--color-fm-icon-active) ;
74
- border-bottom: 1px solid var(--color-fm-divider-secondary) ;
75
- }
76
- .sbdocs-table td {
77
- color: var(--color-fm-secondary) ;
78
- border-bottom: 1px solid var(--color-fm-divider-tertiary) ;
79
- }
80
- `}
81
- </style>
82
-
83
- <div className="bg-fm-surface-primary min-h-screen">
84
- {/* Header */}
85
- <div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
86
- <div className="from-fm-secondary-500/10 to-fm-secondary-500/10 absolute inset-0 bg-linear-to-r via-transparent" />
87
- <div className="relative !mx-auto max-w-7xl px-6 py-16">
88
- <div className="!space-y-6 text-center">
89
- <div className="border-fm-secondary-500/30 from-fm-secondary-500/20 to-fm-secondary-500/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
90
- <PhoneIcon className="text-fm-secondary-800 h-12 w-12" />
91
- </div>
92
- <h1 className="text-fm-icon-active! text-5xl font-bold">
93
- PhoneIcon
94
- </h1>
95
- <p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
96
- A universal phone icon for communication interfaces.
97
- Features the classic mobile phone design, essential for
98
- contact lists, call buttons, messaging apps, and any
99
- interface where users need to initiate or manage phone
100
- calls.
101
- </p>
102
-
103
- {/* Stats */}
104
- <div className="flex items-center justify-center gap-8 pt-8">
105
- <div className="text-center">
106
- <div className="text-fm-secondary-600 text-3xl font-bold">
107
- Call Action
108
- </div>
109
- <div className="text-fm-tertiary text-sm">
110
- Initiate calls
111
- </div>
112
- </div>
113
- <div className="bg-fm-divider-primary h-8 w-px" />
114
- <div className="text-center">
115
- <div className="text-fm-secondary-600 text-3xl font-bold">
116
- Accessible
117
- </div>
118
- <div className="text-fm-tertiary text-sm">
119
- Screen reader friendly
120
- </div>
121
- </div>
122
- <div className="bg-fm-divider-primary h-8 w-px" />
123
- <div className="text-center">
124
- <div className="text-fm-secondary-600 text-3xl font-bold">
125
- Universal
126
- </div>
127
- <div className="text-fm-tertiary text-sm">
128
- Standard communication icon
129
- </div>
130
- </div>
131
- </div>
132
- </div>
133
- </div>
134
- </div>
135
-
136
- {/* Content */}
137
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
138
- {/* Quick Usage */}
139
- <div className="!space-y-8">
140
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
141
- Quick Start
142
- </h2>
143
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
144
- <div className="!space-y-4">
145
- <h3 className="text-fm-secondary-600! text-xl font-semibold">
146
- Basic Usage
147
- </h3>
148
- <div className="bg-fm-surface-secondary rounded-lg p-4">
149
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
150
- {`import { PhoneIcon } from "@icons/phone-icon"
151
-
152
- function ContactCard() {
35
+ <AuralIconDocsPage
36
+ accentToken="info"
37
+ features={[
38
+ { title: "Phone", description: "Call or phone contact" },
39
+ { title: "Contact", description: "User contact / support" },
40
+ { title: "Accessible", description: "ARIA-ready by default" },
41
+ ]}
42
+ quickStart={{
43
+ codeExample: `import { PhoneIcon } from "src/ui/icons/phone-icon"
44
+
45
+ function ContactButton() {
153
46
  return (
154
- <button
155
- onClick={makeCall}
156
- className="p-2 hover:bg-white/10 rounded-lg"
157
- >
158
- <PhoneIcon className="h-6 w-6" />
47
+ <button className="flex items-center gap-2">
48
+ <PhoneIcon className="h-5 w-5 text-fm-icon-active" />
49
+ <span>Contact support</span>
159
50
  </button>
160
51
  )
161
- }`}
162
- </pre>
163
- </div>
164
- </div>
165
-
166
- <div className="!space-y-4">
167
- <h3 className="text-fm-secondary-600! text-xl font-semibold">
168
- Live Preview
169
- </h3>
170
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex h-32 items-center justify-center rounded-lg border">
171
- <button className="border-fm-secondary-500/20 bg-fm-secondary-500/10 hover:bg-fm-secondary-500/20 rounded-lg border p-3 transition-colors">
172
- <PhoneIcon className="h-6 w-6" />
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-secondary-600! 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
- 14
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-secondary-600! px-6 py-4 font-mono text-sm">
240
- stroke
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
- #C58AFF
247
- </td>
248
- <td className="text-fm-secondary! px-6 py-4 text-sm">
249
- Stroke 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-secondary-600! px-6 py-4 font-mono text-sm">
254
- strokeWidth
255
- </td>
256
- <td className="text-fm-secondary! px-6 py-4 text-sm">
257
- string | number
258
- </td>
259
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
260
- 1.2
261
- </td>
262
- <td className="text-fm-secondary! px-6 py-4 text-sm">
263
- Width of the stroke
264
- </td>
265
- </tr>
266
- <tr className="border-fm-divider-tertiary border-b">
267
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
268
- className
269
- </td>
270
- <td className="text-fm-secondary! px-6 py-4 text-sm">
271
- string
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
- CSS classes for styling (use for overrides)
278
- </td>
279
- </tr>
280
- <tr className="bg-fm-surface-secondary!">
281
- <td className="text-fm-secondary-600! px-6 py-4 font-mono text-sm">
282
- ...svgProps
283
- </td>
284
- <td className="text-fm-secondary! px-6 py-4 text-sm">
285
- SVGProps
286
- </td>
287
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
288
- -
289
- </td>
290
- <td className="text-fm-secondary! px-6 py-4 text-sm">
291
- All standard SVG element props
292
- </td>
293
- </tr>
294
- </tbody>
295
- </table>
296
- </div>
297
- </div>
298
-
299
- {/* Size Variations */}
300
- <div className="!space-y-8">
301
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
302
- Size Variations
303
- </h2>
304
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
305
- <div className="!space-y-6">
306
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
307
- <div className="!space-y-4">
308
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
309
- Standard Sizes
310
- </h3>
311
- <div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
312
- <div className="text-center">
313
- <PhoneIcon className="!mx-auto mb-2 size-3" />
314
- <span className="text-fm-tertiary text-xs">
315
- 12px
316
- </span>
317
- </div>
318
- <div className="text-center">
319
- <PhoneIcon className="!mx-auto mb-2 size-4" />
320
- <span className="text-fm-tertiary text-xs">
321
- 16px
322
- </span>
323
- </div>
324
- <div className="text-center">
325
- <PhoneIcon className="!mx-auto mb-2 size-5" />
326
- <span className="text-fm-tertiary text-xs">
327
- 20px
328
- </span>
329
- </div>
330
- <div className="text-center">
331
- <PhoneIcon className="!mx-auto mb-2 size-6" />
332
- <span className="text-fm-tertiary text-xs">
333
- 24px
334
- </span>
335
- </div>
336
- <div className="text-center">
337
- <PhoneIcon className="!mx-auto mb-2 size-8" />
338
- <span className="text-fm-tertiary text-xs">
339
- 32px
340
- </span>
341
- </div>
342
- <div className="text-center">
343
- <PhoneIcon className="!mx-auto mb-2 h-12 w-12" />
344
- <span className="text-fm-tertiary text-xs">
345
- 48px
346
- </span>
347
- </div>
348
- </div>
349
- </div>
350
-
351
- <div className="!space-y-4">
352
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
353
- Code Example
354
- </h3>
355
- <div className="bg-fm-surface-secondary rounded-lg p-4">
356
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
357
- {`// Small (16px)
358
- <PhoneIcon className="size-4" />
359
-
360
- // Medium (24px)
361
- <PhoneIcon className="size-6" />
362
-
363
- // Large (32px)
364
- <PhoneIcon className="size-8" />
365
-
366
- // Custom size
367
- <PhoneIcon width={40} height={40} />`}
368
- </pre>
369
- </div>
370
- </div>
371
- </div>
372
- </div>
373
- </div>
374
- </div>
375
-
376
- {/* Color Variations */}
377
- <div className="!space-y-8">
378
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
379
- Color Variations
380
- </h2>
381
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
382
- <div className="!space-y-4">
383
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
384
- Semantic Colors
385
- </h3>
386
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
387
- <div className="flex items-center gap-4">
388
- <PhoneIcon className="h-6 w-6" />
389
- <div>
390
- <div className="text-fm-icon-active text-sm font-medium">
391
- Primary
392
- </div>
393
- <div className="text-fm-tertiary text-xs"></div>
394
- </div>
395
- </div>
396
- <div className="flex items-center gap-4">
397
- <PhoneIcon className="text-fm-secondary-600 h-6 w-6" />
398
- <div>
399
- <div className="text-fm-icon-active text-sm font-medium">
400
- Secondary
401
- </div>
402
- <div className="text-fm-tertiary text-xs">
403
- text-fm-secondary-600
404
- </div>
405
- </div>
406
- </div>
407
- <div className="flex items-center gap-4">
408
- <PhoneIcon className="text-fm-secondary-600 h-6 w-6" />
409
- <div>
410
- <div className="text-fm-icon-active text-sm font-medium">
411
- Accent
412
- </div>
413
- <div className="text-fm-tertiary text-xs">
414
- text-fm-secondary-600
415
- </div>
416
- </div>
417
- </div>
418
- <div className="flex items-center gap-4">
419
- <PhoneIcon className="text-fm-placeholder h-6 w-6" />
420
- <div>
421
- <div className="text-fm-icon-active text-sm font-medium">
422
- Disabled
423
- </div>
424
- <div className="text-fm-tertiary text-xs">
425
- text-fm-placeholder
426
- </div>
427
- </div>
428
- </div>
429
- </div>
430
- </div>
431
-
432
- <div className="!space-y-4">
433
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
434
- Custom Colors
435
- </h3>
436
- <div className="bg-fm-surface-secondary rounded-lg p-4">
437
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
438
- {`// Using Tailwind classes
439
- <PhoneIcon className="h-6 w-6" />
440
- <PhoneIcon className="h-6 w-6 text-violet-500" />
441
-
442
- // Using CSS custom properties
443
- <PhoneIcon
444
- className="h-6 w-6"
445
- style={{ color: 'var(--color-primary)' }}
446
- />
447
-
448
- // Direct stroke prop
449
- <PhoneIcon
450
- width={24}
451
- height={24}
452
- stroke="#a855f7"
453
- />`}
454
- </pre>
455
- </div>
456
- </div>
457
- </div>
458
- </div>
459
-
460
- {/* Usage Examples */}
461
- <div className="!space-y-8">
462
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
463
- Usage Examples
464
- </h2>
465
-
466
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
467
- {/* Contact Card */}
468
- <div className="!space-y-4">
469
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
470
- Contact Card
471
- </h3>
472
- <div className="!space-y-4">
473
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
474
- <div className="mb-4 flex items-center gap-3">
475
- <div className="from-fm-secondary-500/20 to-fm-secondary-500/20 h-12 w-12 rounded-full bg-linear-to-br" />
476
- <div>
477
- <div className="text-fm-icon-active! text-sm font-medium">
478
- John Doe
479
- </div>
480
- <div className="text-fm-tertiary! text-xs">
481
- +1 (555) 123-4567
482
- </div>
483
- </div>
484
- </div>
485
- <div className="flex items-center justify-center gap-4">
486
- <button className="border-fm-secondary-500/20 bg-fm-secondary-500/10 hover:bg-fm-secondary-500/20 rounded-lg border p-3 transition-colors">
487
- <PhoneIcon className="h-6 w-6" />
488
- </button>
489
- </div>
490
- </div>
491
- <div className="bg-fm-surface-secondary rounded-lg p-4">
492
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
493
- {`// Contact card with call button
494
- <div className="contact-card">
495
- <div className="contact-info">
496
- <Avatar />
497
- <div>
498
- <h3>{name}</h3>
499
- <p>{phoneNumber}</p>
500
- </div>
501
- </div>
502
- <button
503
- onClick={() => makeCall(phoneNumber)}
504
- aria-label={\`Call \${name}\`}
505
- >
506
- <PhoneIcon className="h-6 w-6" />
507
- </button>
508
- </div>`}
509
- </pre>
510
- </div>
511
- </div>
512
- </div>
513
-
514
- {/* Call History */}
515
- <div className="!space-y-4">
516
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
517
- Call History
518
- </h3>
519
- <div className="!space-y-4">
520
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
521
- <div className="!space-y-3">
522
- <div className="flex items-center justify-between">
523
- <div>
524
- <div className="text-fm-icon-active! text-sm font-medium">
525
- Jane Smith
526
- </div>
527
- <div className="text-fm-tertiary! text-xs">
528
- Today, 2:30 PM
529
- </div>
530
- </div>
531
- <button className="hover:bg-fm-surface-secondary rounded-lg p-2">
532
- <PhoneIcon className="h-5 w-5" />
533
- </button>
534
- </div>
535
- <div className="flex items-center justify-between">
536
- <div>
537
- <div className="text-fm-icon-active! text-sm font-medium">
538
- Bob Johnson
539
- </div>
540
- <div className="text-fm-tertiary! text-xs">
541
- Yesterday, 4:15 PM
542
- </div>
543
- </div>
544
- <button className="hover:bg-fm-surface-secondary rounded-lg p-2">
545
- <PhoneIcon className="h-5 w-5" />
546
- </button>
547
- </div>
548
- </div>
549
- </div>
550
- <div className="bg-fm-surface-secondary rounded-lg p-4">
551
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
552
- {`// Call history list
553
- <div className="call-history">
554
- {calls.map((call) => (
555
- <div key={call.id} className="call-item">
556
- <div>
557
- <h4>{call.name}</h4>
558
- <p>{call.timestamp}</p>
559
- </div>
560
- <button
561
- onClick={() => redial(call.number)}
562
- aria-label={\`Call \${call.name}\`}
563
- >
564
- <PhoneIcon className="h-5 w-5" />
565
- </button>
566
- </div>
567
- ))}
568
- </div>`}
569
- </pre>
570
- </div>
571
- </div>
572
- </div>
573
-
574
- {/* Quick Dial */}
575
- <div className="!space-y-4">
576
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
577
- Quick Dial
578
- </h3>
579
- <div className="!space-y-4">
580
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
581
- <div className="mb-4 text-center">
582
- <div className="text-fm-icon-active! text-sm font-medium">
583
- Emergency Contact
584
- </div>
585
- <div className="text-fm-tertiary! text-xs">
586
- Press to call
587
- </div>
588
- </div>
589
- <div className="flex items-center justify-center">
590
- <button className="border-fm-secondary-500/30 bg-fm-secondary-500/10 hover:bg-fm-secondary-500/20 rounded-full border-2 p-6 transition-colors">
591
- <PhoneIcon className="h-10 w-10" />
592
- </button>
593
- </div>
594
- </div>
595
- <div className="bg-fm-surface-secondary rounded-lg p-4">
596
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
597
- {`// Quick dial button
598
- <button
599
- onClick={initiateCall}
600
- className="quick-dial-button"
601
- aria-label="Call emergency contact"
602
- >
603
- <PhoneIcon className="h-10 w-10" />
604
- </button>`}
605
- </pre>
606
- </div>
607
- </div>
608
- </div>
609
-
610
- {/* Phone Number Input */}
611
- <div className="!space-y-4">
612
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
613
- Phone Number Input
614
- </h3>
615
- <div className="!space-y-4">
616
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
617
- <div className="mb-4">
618
- <label className="text-fm-tertiary mb-2 block text-xs">
619
- Phone Number
620
- </label>
621
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-2 rounded-lg border px-3 py-2">
622
- <PhoneIcon className="h-4 w-4" />
623
- <input
624
- type="tel"
625
- placeholder="+1 (555) 123-4567"
626
- className="text-fm-icon-active placeholder:text-fm-placeholder flex-1 bg-transparent text-sm"
627
- />
628
- </div>
629
- </div>
630
- <button className="border-fm-secondary-500/20 bg-fm-secondary-500/10 hover:bg-fm-secondary-500/20 w-full rounded-lg border px-4 py-2 text-sm transition-colors">
631
- Call Now
632
- </button>
633
- </div>
634
- <div className="bg-fm-surface-secondary rounded-lg p-4">
635
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
636
- {`// Phone input with icon
637
- <div className="phone-input">
638
- <label>Phone Number</label>
639
- <div className="input-wrapper">
640
- <PhoneIcon className="h-4 w-4" />
641
- <input
642
- type="tel"
643
- placeholder="Enter phone number"
644
- value={phoneNumber}
645
- onChange={(e) => setPhoneNumber(e.target.value)}
646
- />
647
- </div>
648
- <button onClick={handleCall}>
649
- Call Now
650
- </button>
651
- </div>`}
652
- </pre>
653
- </div>
654
- </div>
655
- </div>
656
- </div>
657
- </div>
658
-
659
- {/* Accessibility */}
660
- <div className="!space-y-8">
661
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
662
- Accessibility Features
663
- </h2>
664
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
665
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
666
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
667
- ✅ Built-in Features
668
- </h3>
669
- <ul className="text-fm-secondary! !space-y-2 text-sm">
670
- <li className="text-fm-secondary!">
671
- Uses Radix UI AccessibleIcon wrapper
672
- </li>
673
- <li className="text-fm-secondary!">
674
- Provides screen reader label "Phone icon"
675
- </li>
676
- <li className="text-fm-secondary!">
677
- Supports keyboard navigation when interactive
678
- </li>
679
- <li className="text-fm-secondary!">
680
- Maintains proper color contrast ratios
681
- </li>
682
- <li className="text-fm-secondary!">
683
- Scales with user's font size preferences
684
- </li>
685
- </ul>
686
- </div>
687
-
688
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
689
- <h3 className="text-fm-secondary-600! text-lg font-semibold">
690
- 💡 Best Practices
691
- </h3>
692
- <ul className="text-fm-secondary !space-y-2 text-sm">
693
- <li className="text-fm-secondary!">
694
- Always provide descriptive aria-labels for call buttons
695
- </li>
696
- <li className="text-fm-secondary!">
697
- Include phone number in accessible text when possible
698
- </li>
699
- <li className="text-fm-secondary!">
700
- Ensure sufficient touch target size (44px minimum)
701
- </li>
702
- <li className="text-fm-secondary!">
703
- Provide visible focus states for keyboard users
704
- </li>
705
- <li className="text-fm-secondary!">
706
- Consider voice control compatibility
707
- </li>
708
- </ul>
709
- </div>
710
- </div>
711
-
712
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
713
- <h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
714
- Proper ARIA Implementation
715
- </h3>
716
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
717
- <div className="bg-fm-surface-secondary rounded-lg p-4">
718
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
719
- {`// Call button with proper ARIA
720
- <button
721
- aria-label={\`Call \${contactName}\`}
722
- className="p-2 hover:bg-fm-surface-secondary rounded-lg"
723
- onClick={() => makeCall(phoneNumber)}
724
- >
725
- <PhoneIcon className="h-6 w-6" />
726
- </button>
727
-
728
- // Phone number with context
729
- <button
730
- aria-label={\`Call \${name} at \${phoneNumber}\`}
731
- onClick={initiateCall}
732
- >
733
- <PhoneIcon className="h-6 w-6" />
734
- <span className="sr-only">{phoneNumber}</span>
735
- </button>
736
-
737
- // Emergency call with state
738
- <button
739
- aria-label="Call emergency services"
740
- onClick={callEmergency}
741
- aria-pressed={isCalling}
742
- >
743
- <PhoneIcon className="h-8 w-8" />
744
- </button>`}
745
- </pre>
746
- </div>
747
- <div className="!space-y-4">
748
- <p className="text-fm-secondary! text-sm">
749
- When using PhoneIcon for interactive elements, always
750
- provide clear context about who or what will be called,
751
- and ensure the phone number is accessible to screen
752
- readers.
753
- </p>
754
- <div className="border-fm-secondary-500/20 bg-fm-secondary-500/10 rounded-lg border p-4">
755
- <div className="text-fm-secondary-600 flex items-center gap-2 text-sm">
756
- <PhoneIcon className="h-4 w-4" />
757
- <span>
758
- Screen readers need context about the call
759
- destination
760
- </span>
761
- </div>
762
- </div>
763
- </div>
764
- </div>
765
- </div>
766
- </div>
767
-
768
- {/* Related Icons */}
769
- <div className="!space-y-8">
770
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
771
- Related Icons
772
- </h2>
773
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
774
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
775
- <div className="bg-fm-icon-positive/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
776
- <span className="text-fm-icon-active! !text-2xl">📧</span>
777
- </div>
778
- <div>
779
- <div className="text-fm-icon-active font-medium">
780
- EmailIcon
781
- </div>
782
- <div className="text-fm-tertiary text-xs">Send email</div>
783
- </div>
784
- </div>
785
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
786
- <div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
787
- <span className="text-fm-icon-active! !text-2xl">💬</span>
788
- </div>
789
- <div>
790
- <div className="text-fm-icon-active font-medium">
791
- MessageIcon
792
- </div>
793
- <div className="text-fm-tertiary text-xs">
794
- Send message
795
- </div>
796
- </div>
797
- </div>
798
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
799
- <div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
800
- <span className="text-fm-icon-active! !text-2xl">📱</span>
801
- </div>
802
- <div>
803
- <div className="text-fm-icon-active font-medium">
804
- MobileIcon
805
- </div>
806
- <div className="text-fm-tertiary text-xs">
807
- Mobile device
808
- </div>
809
- </div>
810
- </div>
811
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
812
- <div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
813
- <span className="text-fm-icon-active! !text-2xl">👤</span>
814
- </div>
815
- <div>
816
- <div className="text-fm-icon-active font-medium">
817
- UserIcon
818
- </div>
819
- <div className="text-fm-tertiary text-xs">
820
- Contact profile
821
- </div>
822
- </div>
823
- </div>
824
- </div>
825
- </div>
826
- </div>
827
-
828
- {/* Footer */}
829
- <div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
830
- <div className="!mx-auto max-w-7xl px-6 py-8">
831
- <div className="!space-y-4 text-center">
832
- <p className="text-fm-tertiary!">
833
- PhoneIcon is part of the Aural UI icon library, built with
834
- accessibility and communication best practices in mind.
835
- </p>
836
- <p className="text-fm-placeholder! text-sm">
837
- All icons use Radix UI's AccessibleIcon for screen reader
838
- compatibility and follow WCAG guidelines.
839
- </p>
840
- </div>
841
- </div>
842
- </div>
843
- </div>
844
- </>
52
+ }`,
53
+ livePreview: (
54
+ <button className="flex items-center gap-2">
55
+ <PhoneIcon className="text-fm-icon-active h-6 w-6" />
56
+ </button>
57
+ ),
58
+ }}
59
+ relatedIcons={[
60
+ {
61
+ name: "EmailIcon",
62
+ description: "Email / inbox icon",
63
+ icon: EmailIcon,
64
+ accentToken: "info",
65
+ },
66
+ {
67
+ name: "MessageIcon",
68
+ description: "Chat / message bubble icon",
69
+ icon: MessageIcon,
70
+ accentToken: "positive",
71
+ },
72
+ {
73
+ name: "PaperPlaneIcon",
74
+ description: "Send / paper plane icon",
75
+ icon: PaperPlaneIcon,
76
+ accentToken: "warning",
77
+ },
78
+ {
79
+ name: "ShareIcon",
80
+ description: "Share content icon",
81
+ icon: ShareIcon,
82
+ accentToken: "negative",
83
+ },
84
+ ]}
85
+ />
845
86
  ),
846
87
  },
847
88
  },
848
89
  tags: ["autodocs"],
849
90
  argTypes: {
850
- width: {
851
- control: { type: "range", min: 8, max: 96, step: 2 },
852
- description: "Width of the icon in pixels",
853
- },
854
- withAccessibility: {
855
- control: "boolean",
856
- description: "Whether to wrap the icon with accessibility features",
857
- },
858
- height: {
859
- control: { type: "range", min: 8, max: 96, step: 2 },
860
- description: "Height of the icon in pixels",
861
- },
862
- stroke: {
863
- control: "color",
864
- description: "Stroke color of the icon",
865
- },
866
- strokeWidth: {
867
- control: { type: "range", min: 0.5, max: 4, step: 0.5 },
868
- description: "Width of the stroke",
869
- },
870
91
  className: {
871
92
  control: "text",
872
- description: "CSS classes for styling (use for overrides)",
93
+ description: "CSS classes including color token",
873
94
  },
874
- onClick: {
875
- action: "clicked",
876
- description: "Click handler for interactive use",
95
+ withAccessibility: {
96
+ control: "boolean",
97
+ description: "Wrap with accessibility label",
877
98
  },
878
99
  },
879
100
  }
@@ -881,210 +102,78 @@ function ContactCard() {
881
102
  export default meta
882
103
  type Story = StoryObj<typeof PhoneIcon>
883
104
 
884
- // Story parameters for consistent dark theme
885
- const storyParameters = {
886
- backgrounds: {
887
- default: "dark",
888
- values: [
889
- { name: "dark", value: "var(--color-fm-surface-primary)" },
890
- { name: "darker", value: "var(--color-fm-neutral-0)" },
891
- ],
892
- },
893
- }
894
-
895
105
  export const Default: Story = {
896
106
  args: {
897
- className: "h-8 w-8",
107
+ className: "h-6 w-6 text-fm-icon-active",
898
108
  withAccessibility: true,
899
109
  },
900
- parameters: storyParameters,
901
110
  render: (args) => (
902
- <div className="from-fm-surface-primary to-fm-surface-secondary flex h-32 min-h-dvh items-center justify-center rounded-lg bg-linear-to-br">
111
+ <IconDefaultCanvas>
903
112
  <PhoneIcon {...args} />
904
- </div>
113
+ </IconDefaultCanvas>
905
114
  ),
906
115
  }
907
116
 
908
117
  export const SizeVariations: Story = {
909
- parameters: {
910
- ...storyParameters,
911
- docs: {
912
- description: {
913
- story:
914
- "PhoneIcon in different sizes, from small UI elements to large displays.",
915
- },
916
- },
917
- },
918
- render: () => (
919
- <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">
920
- <div className="text-center">
921
- <PhoneIcon className="!mx-auto mb-2 h-3 w-3" />
922
- <span className="text-fm-tertiary text-xs">12px</span>
923
- </div>
924
- <div className="text-center">
925
- <PhoneIcon className="!mx-auto mb-2 h-4 w-4" />
926
- <span className="text-fm-tertiary text-xs">16px</span>
927
- </div>
928
- <div className="text-center">
929
- <PhoneIcon className="!mx-auto mb-2 h-5 w-5" />
930
- <span className="text-fm-tertiary text-xs">20px</span>
931
- </div>
932
- <div className="text-center">
933
- <PhoneIcon className="!mx-auto mb-2 h-6 w-6" />
934
- <span className="text-fm-tertiary text-xs">24px</span>
935
- </div>
936
- <div className="text-center">
937
- <PhoneIcon className="!mx-auto mb-2 h-8 w-8" />
938
- <span className="text-fm-tertiary text-xs">32px</span>
939
- </div>
940
- <div className="text-center">
941
- <PhoneIcon className="!mx-auto mb-2 h-12 w-12" />
942
- <span className="text-fm-tertiary text-xs">48px</span>
943
- </div>
944
- </div>
945
- ),
118
+ render: () => <IconSizeVariations icon={PhoneIcon} />,
946
119
  }
947
120
 
948
121
  export const ColorVariations: Story = {
949
- parameters: {
950
- ...storyParameters,
951
- docs: {
952
- description: {
953
- story: "PhoneIcon in different semantic colors for various use cases.",
954
- },
955
- },
956
- },
957
- render: () => (
958
- <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">
959
- <div className="text-center">
960
- <div className="border-fm-secondary-500/30 bg-fm-secondary-500/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
961
- <PhoneIcon className="h-8 w-8" />
962
- </div>
963
- <div className="text-fm-icon-active text-sm font-medium">Primary</div>
964
- <div className="text-xs">text-fm-secondary-600</div>
965
- </div>
966
- <div className="text-center">
967
- <div className="border-fm-secondary-500/30 bg-fm-secondary-500/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
968
- <PhoneIcon className="text-fm-secondary-600 h-8 w-8" />
969
- </div>
970
- <div className="text-fm-icon-active text-sm font-medium">Secondary</div>
971
- <div className="text-fm-secondary-600 text-xs">
972
- text-fm-secondary-600
973
- </div>
974
- </div>
975
- <div className="text-center">
976
- <div className="border-fm-secondary-500/30 bg-fm-secondary-500/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
977
- <PhoneIcon className="text-fm-secondary-600 h-8 w-8" />
978
- </div>
979
- <div className="text-fm-icon-active text-sm font-medium">Accent</div>
980
- <div className="text-fm-secondary-600 text-xs">
981
- text-fm-secondary-600
982
- </div>
983
- </div>
984
- <div className="text-center">
985
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
986
- <PhoneIcon className="text-fm-placeholder h-8 w-8" />
987
- </div>
988
- <div className="text-fm-icon-active text-sm font-medium">Disabled</div>
989
- <div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
990
- </div>
991
- </div>
992
- ),
122
+ render: () => <IconColorVariations icon={PhoneIcon} />,
993
123
  }
994
124
 
995
125
  export const UsageExamples: Story = {
996
- parameters: {
997
- ...storyParameters,
998
- docs: {
999
- description: {
1000
- story:
1001
- "Real-world usage examples showing PhoneIcon in different communication contexts.",
1002
- },
1003
- },
1004
- },
1005
126
  render: () => (
1006
- <div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh !space-y-8 rounded-lg bg-linear-to-br p-8">
1007
- {/* Contact Card */}
1008
- <div className="!space-y-2">
1009
- <h3 className="text-fm-icon-active text-sm font-medium">
1010
- Contact Card
1011
- </h3>
1012
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
1013
- <div className="mb-4 flex items-center gap-3">
1014
- <div className="from-fm-secondary-500/20 to-fm-secondary-500/20 h-12 w-12 rounded-full bg-linear-to-br" />
1015
- <div>
1016
- <div className="text-fm-icon-active text-sm font-medium">
1017
- John Doe
1018
- </div>
1019
- <div className="text-fm-tertiary text-xs">+1 (555) 123-4567</div>
1020
- </div>
1021
- </div>
1022
- <div className="flex items-center justify-center gap-4">
1023
- <button className="border-fm-secondary-500/20 bg-fm-secondary-500/10 hover:bg-fm-secondary-500/20 rounded-lg border p-3 transition-colors">
1024
- <PhoneIcon className="h-6 w-6" />
127
+ <IconUsageCanvas>
128
+ <IconUsageSection title="Contact Support">
129
+ <button className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-2 rounded-xl border px-4 py-2">
130
+ <PhoneIcon className="text-fm-icon-active h-4 w-4" />
131
+ <span className="text-fm-primary font-fm-text text-sm">
132
+ Contact support
133
+ </span>
134
+ </button>
135
+ </IconUsageSection>
136
+
137
+ <IconUsageSection title="Contact Methods">
138
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm overflow-hidden rounded-xl border">
139
+ {[
140
+ { label: "Phone", icon: PhoneIcon },
141
+ { label: "Email", icon: EmailIcon },
142
+ { label: "Message", icon: MessageIcon },
143
+ ].map(({ label, icon: Icon }) => (
144
+ <button
145
+ key={label}
146
+ className="border-fm-divider-secondary flex w-full items-center gap-3 border-b px-4 py-3 last:border-b-0"
147
+ >
148
+ <Icon className="text-fm-icon-active h-4 w-4" />
149
+ <span className="text-fm-primary font-fm-text text-sm">
150
+ {label}
151
+ </span>
1025
152
  </button>
1026
- </div>
153
+ ))}
1027
154
  </div>
1028
- </div>
1029
-
1030
- {/* Call History */}
1031
- <div className="!space-y-2">
1032
- <h3 className="text-fm-icon-active text-sm font-medium">
1033
- Call History
1034
- </h3>
1035
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
1036
- <div className="!space-y-3">
1037
- <div className="flex items-center justify-between">
1038
- <div>
1039
- <div className="text-fm-icon-active text-sm font-medium">
1040
- Jane Smith
1041
- </div>
1042
- <div className="text-fm-tertiary text-xs">Today, 2:30 PM</div>
1043
- </div>
1044
- <button className="hover:bg-fm-surface-secondary rounded-lg p-2">
1045
- <PhoneIcon className="h-5 w-5" />
1046
- </button>
1047
- </div>
1048
- <div className="flex items-center justify-between">
1049
- <div>
1050
- <div className="text-fm-icon-active text-sm font-medium">
1051
- Bob Johnson
1052
- </div>
1053
- <div className="text-fm-tertiary text-xs">
1054
- Yesterday, 4:15 PM
1055
- </div>
1056
- </div>
1057
- <button className="hover:bg-fm-surface-secondary rounded-lg p-2">
1058
- <PhoneIcon className="h-5 w-5" />
1059
- </button>
1060
- </div>
1061
- </div>
155
+ </IconUsageSection>
156
+
157
+ <IconUsageSection title="Profile Contact Row">
158
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center gap-3 rounded-xl border px-4 py-3">
159
+ <PhoneIcon className="text-fm-icon-inactive h-5 w-5" />
160
+ <span className="text-fm-secondary font-fm-text text-sm">
161
+ +91 98765 43210
162
+ </span>
1062
163
  </div>
1063
- </div>
1064
- </div>
164
+ </IconUsageSection>
165
+ </IconUsageCanvas>
1065
166
  ),
1066
167
  }
1067
168
 
1068
169
  export const Playground: Story = {
1069
- parameters: {
1070
- ...storyParameters,
1071
- docs: {
1072
- description: {
1073
- story:
1074
- "Interactive playground to experiment with different PhoneIcon configurations.",
1075
- },
1076
- },
1077
- },
1078
170
  args: {
1079
- width: 24,
1080
- height: 24,
1081
- className: "text-fm-secondary-600",
171
+ className: "h-8 w-8 text-fm-icon-active",
172
+ withAccessibility: true,
1082
173
  },
1083
174
  render: (args) => (
1084
- <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">
1085
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
1086
- <PhoneIcon {...args} />
1087
- </div>
1088
- </div>
175
+ <IconPlaygroundCanvas>
176
+ <PhoneIcon {...args} />
177
+ </IconPlaygroundCanvas>
1089
178
  ),
1090
179
  }