aural-ui 3.0.7 → 4.1.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 (183) hide show
  1. package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1199
  2. package/dist/components/avatar/Avatar.stories.tsx +235 -237
  3. package/dist/components/badge/Badge.stories.tsx +379 -116
  4. package/dist/components/banner/Banner.stories.tsx +445 -391
  5. package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
  6. package/dist/components/button/Button.stories.tsx +585 -230
  7. package/dist/components/button/index.tsx +7 -7
  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 -620
  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 +533 -856
  16. package/dist/components/dialog/Dialog.stories.tsx +505 -949
  17. package/dist/components/divider/Divider.stories.tsx +265 -502
  18. package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
  19. package/dist/components/drawer/Drawer.stories.tsx +659 -993
  20. package/dist/components/drawer/index.tsx +3 -3
  21. package/dist/components/dropdown/Dropdown.stories.tsx +643 -1018
  22. package/dist/components/form/Form.stories.tsx +560 -274
  23. package/dist/components/helper-text/HelperText.stories.tsx +199 -200
  24. package/dist/components/hover-card/HoverCard.stories.tsx +318 -1221
  25. package/dist/components/icon-button/IconButton.stories.tsx +837 -194
  26. package/dist/components/if-else/if-else.stories.tsx +370 -83
  27. package/dist/components/input/Input.stories.tsx +436 -368
  28. package/dist/components/label/Label.stories.tsx +156 -154
  29. package/dist/components/list/List.stories.tsx +485 -822
  30. package/dist/components/marquee/Marquee.stories.tsx +356 -694
  31. package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -410
  32. package/dist/components/overlay/Overlay.stories.tsx +452 -818
  33. package/dist/components/overlay/index.tsx +4 -4
  34. package/dist/components/pagination/Pagination.stories.tsx +721 -210
  35. package/dist/components/popover/Popover.stories.tsx +484 -873
  36. package/dist/components/radio/Radio.stories.tsx +432 -124
  37. package/dist/components/resizable/Resizable.stories.tsx +496 -752
  38. package/dist/components/scroll-area/ScrollArea.stories.tsx +384 -1006
  39. package/dist/components/search/Search.stories.tsx +314 -575
  40. package/dist/components/select/Select.stories.tsx +684 -787
  41. package/dist/components/sheet/Sheet.stories.tsx +671 -936
  42. package/dist/components/skelton/Skelton.stories.tsx +230 -764
  43. package/dist/components/slider/Slider.stories.tsx +384 -737
  44. package/dist/components/stepper/Stepper.stories.tsx +371 -514
  45. package/dist/components/switch/Switch.stories.tsx +461 -208
  46. package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
  47. package/dist/components/table/Table.stories.tsx +770 -914
  48. package/dist/components/tabs/Tabs.stories.tsx +459 -1400
  49. package/dist/components/tag/Tag.stories.tsx +714 -542
  50. package/dist/components/textarea/TextArea.stories.tsx +621 -562
  51. package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -148
  52. package/dist/components/toast/Toast.stories.tsx +452 -1333
  53. package/dist/components/toggle/Toggle.stories.tsx +488 -909
  54. package/dist/components/tooltip/Tooltip.stories.tsx +344 -1372
  55. package/dist/components/typography/Typography.stories.tsx +406 -89
  56. package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
  57. package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
  58. package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
  59. package/dist/icons/Icons.stories.tsx +0 -12
  60. package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +226 -1013
  61. package/dist/icons/alert-icon/AlertIcon.stories.tsx +109 -929
  62. package/dist/icons/all-icons.tsx +124 -87
  63. package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +140 -971
  64. package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +148 -888
  65. package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +135 -1019
  66. package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +137 -953
  67. package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +138 -997
  68. package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +136 -942
  69. package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +148 -1092
  70. package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +146 -1211
  71. package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +126 -615
  72. package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +144 -1164
  73. package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +167 -985
  74. package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +122 -1179
  75. package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +124 -1168
  76. package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +119 -850
  77. package/dist/icons/camera-icon/CameraIcon.stories.tsx +112 -1213
  78. package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +117 -934
  79. package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +160 -961
  80. package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +163 -961
  81. package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +144 -942
  82. package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +129 -966
  83. package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +147 -964
  84. package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +145 -975
  85. package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +150 -1142
  86. package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +114 -461
  87. package/dist/icons/coin-icon/CoinIcon.stories.tsx +124 -1322
  88. package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +117 -1318
  89. package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +114 -903
  90. package/dist/icons/command-icon/CommandIcon.stories.tsx +127 -1042
  91. package/dist/icons/copy-icon/CopyIcon.stories.tsx +123 -962
  92. package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +147 -999
  93. package/dist/icons/cross-icon/CrossIcon.stories.tsx +139 -960
  94. package/dist/icons/download-icon/DownloadIcon.stories.tsx +126 -820
  95. package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +124 -1031
  96. package/dist/icons/email-icon/EmailIcon.stories.tsx +115 -936
  97. package/dist/icons/expand-icon/ExpandIcon.stories.tsx +112 -1111
  98. package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +144 -1025
  99. package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +143 -1036
  100. package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +127 -1011
  101. package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +126 -1056
  102. package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +125 -614
  103. package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +119 -1050
  104. package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +169 -989
  105. package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +115 -1145
  106. package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +115 -1122
  107. package/dist/icons/globe-icon/GlobeIcon.stories.tsx +130 -313
  108. package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +145 -940
  109. package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +119 -1174
  110. package/dist/icons/head-icon/HeadIcon.stories.tsx +111 -916
  111. package/dist/icons/heart-icon/HeartIcon.stories.tsx +120 -1019
  112. package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +119 -683
  113. package/dist/icons/image-icon/ImageIcon.stories.tsx +105 -1121
  114. package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +111 -1192
  115. package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +136 -1256
  116. package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +159 -962
  117. package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +161 -1385
  118. package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +124 -972
  119. package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +119 -948
  120. package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +119 -942
  121. package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +108 -1215
  122. package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +154 -1517
  123. package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +110 -1188
  124. package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +119 -678
  125. package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +123 -1184
  126. package/dist/icons/message-icon/MessageIcon.stories.tsx +114 -538
  127. package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +116 -1158
  128. package/dist/icons/moon-icon/MoonIcon.stories.tsx +120 -536
  129. package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +109 -1184
  130. package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +115 -1134
  131. package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +119 -971
  132. package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +111 -1100
  133. package/dist/icons/notes-icon/NotesIcon.stories.tsx +119 -1101
  134. package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +109 -1111
  135. package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +122 -684
  136. package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +113 -954
  137. package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +112 -877
  138. package/dist/icons/pause-icon/PauseIcon.stories.tsx +113 -1000
  139. package/dist/icons/pencil-icon/PencilIcon.stories.tsx +115 -1070
  140. package/dist/icons/phone-icon/PhoneIcon.stories.tsx +115 -978
  141. package/dist/icons/plus-icon/PlusIcon.stories.tsx +106 -1093
  142. package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +107 -829
  143. package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +102 -469
  144. package/dist/icons/search-icon/SearchIcon.stories.tsx +111 -1124
  145. package/dist/icons/setting-icon/SettingIcon.stories.tsx +107 -970
  146. package/dist/icons/share-icon/ShareIcon.stories.tsx +120 -1025
  147. package/dist/icons/shield-icon/ShieldIcon.stories.tsx +117 -931
  148. package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +137 -1104
  149. package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +172 -982
  150. package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +164 -983
  151. package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +105 -958
  152. package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +158 -580
  153. package/dist/icons/spinner-gradient-icon/index.tsx +6 -1
  154. package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +158 -587
  155. package/dist/icons/spinner-solid-icon/index.tsx +6 -1
  156. package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +146 -682
  157. package/dist/icons/spinner-solid-neutral-icon/index.tsx +1 -1
  158. package/dist/icons/star-icon/StarIcon.stories.tsx +124 -904
  159. package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +112 -964
  160. package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +116 -852
  161. package/dist/icons/sun-icon/SunIcon.stories.tsx +120 -831
  162. package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +116 -950
  163. package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +123 -980
  164. package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +156 -1427
  165. package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +146 -1142
  166. package/dist/icons/tick-icon/TickIcon.stories.tsx +145 -1276
  167. package/dist/icons/trash-icon/TrashIcon.stories.tsx +108 -933
  168. package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +157 -1402
  169. package/dist/icons/upload-icon/UploadIcon.stories.tsx +115 -889
  170. package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +118 -984
  171. package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +125 -1049
  172. package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +123 -1356
  173. package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +110 -1171
  174. package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +112 -1093
  175. package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +115 -1087
  176. package/dist/icons/warning-icon/WarningIcon.stories.tsx +122 -1046
  177. package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +161 -936
  178. package/dist/index.cjs +84 -84
  179. package/dist/index.js +84 -84
  180. package/dist/styles/aural-all-theme.css +1222 -0
  181. package/dist/styles/{aural-theme.css → aural-dark-theme.css} +15 -3
  182. package/dist/styles/aural-light-theme.css +1047 -0
  183. package/package.json +1 -1
@@ -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> = {
@@ -11,835 +25,76 @@ const meta: Meta<typeof PhoneIcon> = {
11
25
  backgrounds: {
12
26
  default: "dark",
13
27
  values: [
14
- { name: "dark", value: "#0a0a0a" },
15
- { name: "darker", value: "#000000" },
16
- { name: "light", value: "#ffffff" },
28
+ { name: "dark", value: "var(--color-fm-surface-primary)" },
29
+ { name: "darker", value: "var(--color-fm-neutral-0)" },
30
+ { name: "light", value: "var(--color-fm-neutral-1100)" },
17
31
  ],
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: #0a0a0a ;
44
- }
45
- #storybook-docs {
46
- background: #0a0a0a ;
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: white ;
54
- }
55
- .sbdocs-p, .sbdocs-li {
56
- color: rgba(255, 255, 255, 0.7) ;
57
- }
58
- .sbdocs-code {
59
- background: rgba(255, 255, 255, 0.1) ;
60
- color: rgba(168, 85, 247, 1) ;
61
- border: 1px solid rgba(255, 255, 255, 0.1) ;
62
- }
63
- .sbdocs-pre {
64
- background: rgba(0, 0, 0, 0.4) ;
65
- border: 1px solid rgba(255, 255, 255, 0.1) ;
66
- }
67
- .sbdocs-table {
68
- background: rgba(255, 255, 255, 0.05) ;
69
- border: 1px solid rgba(255, 255, 255, 0.1) ;
70
- }
71
- .sbdocs-table th {
72
- background: rgba(255, 255, 255, 0.05) ;
73
- color: white ;
74
- border-bottom: 1px solid rgba(255, 255, 255, 0.1) ;
75
- }
76
- .sbdocs-table td {
77
- color: rgba(255, 255, 255, 0.7) ;
78
- border-bottom: 1px solid rgba(255, 255, 255, 0.05) ;
79
- }
80
- `}
81
- </style>
82
-
83
- <div className="min-h-screen bg-gradient-to-br from-gray-900 via-purple-900/20 to-gray-900">
84
- {/* Header */}
85
- <div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
86
- <div className="absolute inset-0 bg-gradient-to-r from-purple-500/10 via-transparent to-violet-500/10" />
87
- <div className="relative !mx-auto max-w-7xl px-6 py-16">
88
- <div className="!space-y-6 text-center">
89
- <div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-purple-500/30 bg-gradient-to-br from-purple-500/20 to-violet-500/20">
90
- <PhoneIcon className="text-fm-secondary-800 h-12 w-12" />
91
- </div>
92
- <h1 className="text-5xl font-bold !text-white">PhoneIcon</h1>
93
- <p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
94
- A universal phone icon for communication interfaces.
95
- Features the classic mobile phone design, essential for
96
- contact lists, call buttons, messaging apps, and any
97
- interface where users need to initiate or manage phone
98
- calls.
99
- </p>
100
-
101
- {/* Stats */}
102
- <div className="flex items-center justify-center gap-8 pt-8">
103
- <div className="text-center">
104
- <div className="text-3xl font-bold text-purple-300">
105
- Call Action
106
- </div>
107
- <div className="text-sm text-white/60">
108
- Initiate calls
109
- </div>
110
- </div>
111
- <div className="h-8 w-px bg-white/20" />
112
- <div className="text-center">
113
- <div className="text-3xl font-bold text-violet-300">
114
- Accessible
115
- </div>
116
- <div className="text-sm text-white/60">
117
- Screen reader friendly
118
- </div>
119
- </div>
120
- <div className="h-8 w-px bg-white/20" />
121
- <div className="text-center">
122
- <div className="text-3xl font-bold text-fuchsia-300">
123
- Universal
124
- </div>
125
- <div className="text-sm text-white/60">
126
- Standard communication icon
127
- </div>
128
- </div>
129
- </div>
130
- </div>
131
- </div>
132
- </div>
133
-
134
- {/* Content */}
135
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
136
- {/* Quick Usage */}
137
- <div className="!space-y-8">
138
- <h2 className="text-center text-3xl font-bold !text-white">
139
- Quick Start
140
- </h2>
141
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
142
- <div className="!space-y-4">
143
- <h3 className="text-xl font-semibold !text-purple-300">
144
- Basic Usage
145
- </h3>
146
- <div className="rounded-lg bg-black/40 p-4">
147
- <pre className="overflow-x-auto text-sm !text-green-300">
148
- {`import { PhoneIcon } from "@icons/phone-icon"
149
-
150
- 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() {
151
46
  return (
152
- <button
153
- onClick={makeCall}
154
- className="p-2 hover:bg-white/10 rounded-lg"
155
- >
156
- <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>
157
50
  </button>
158
51
  )
159
- }`}
160
- </pre>
161
- </div>
162
- </div>
163
-
164
- <div className="!space-y-4">
165
- <h3 className="text-xl font-semibold !text-purple-300">
166
- Live Preview
167
- </h3>
168
- <div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
169
- <button className="rounded-lg border border-purple-500/20 bg-purple-500/10 p-3 transition-colors hover:bg-purple-500/20">
170
- <PhoneIcon className="h-6 w-6" />
171
- </button>
172
- </div>
173
- </div>
174
- </div>
175
- </div>
176
-
177
- {/* Props Documentation */}
178
- <div className="!space-y-8">
179
- <h2 className="text-center text-3xl font-bold !text-white">
180
- Props & Configuration
181
- </h2>
182
-
183
- <div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
184
- <div className="bg-white/5 p-4">
185
- <h3 className="text-xl font-semibold !text-white">Props</h3>
186
- </div>
187
- <table className="!my-0 w-full">
188
- <thead className="bg-white/5">
189
- <tr className="border-b border-white/10">
190
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
191
- Prop
192
- </th>
193
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
194
- Type
195
- </th>
196
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
197
- Default
198
- </th>
199
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
200
- Description
201
- </th>
202
- </tr>
203
- </thead>
204
- <tbody>
205
- {" "}
206
- <tr className="!bg-black/10">
207
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
208
- withAccessibility
209
- </td>
210
- <td className="px-6 py-4 text-sm !text-white/70">
211
- boolean
212
- </td>
213
- <td className="px-6 py-4 text-sm !text-white/50">
214
- true
215
- </td>
216
- <td className="px-6 py-4 text-sm !text-white/70">
217
- Whether to wrap the icon with accessibility feature
218
- </td>
219
- </tr>
220
- <tr className="border-b border-white/5 !bg-black/10">
221
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
222
- height
223
- </td>
224
- <td className="px-6 py-4 text-sm !text-white/70">
225
- number | string
226
- </td>
227
- <td className="px-6 py-4 text-sm !text-white/50">14</td>
228
- <td className="px-6 py-4 text-sm !text-white/70">
229
- Height of the icon in pixels
230
- </td>
231
- </tr>
232
- <tr className="border-b border-white/5">
233
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
234
- stroke
235
- </td>
236
- <td className="px-6 py-4 text-sm !text-white/70">
237
- string
238
- </td>
239
- <td className="px-6 py-4 text-sm !text-white/50">
240
- #C58AFF
241
- </td>
242
- <td className="px-6 py-4 text-sm !text-white/70">
243
- Stroke color of the icon
244
- </td>
245
- </tr>
246
- <tr className="border-b border-white/5 !bg-black/10">
247
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
248
- strokeWidth
249
- </td>
250
- <td className="px-6 py-4 text-sm !text-white/70">
251
- string | number
252
- </td>
253
- <td className="px-6 py-4 text-sm !text-white/50">
254
- 1.2
255
- </td>
256
- <td className="px-6 py-4 text-sm !text-white/70">
257
- Width of the stroke
258
- </td>
259
- </tr>
260
- <tr className="border-b border-white/5">
261
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
262
- className
263
- </td>
264
- <td className="px-6 py-4 text-sm !text-white/70">
265
- string
266
- </td>
267
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
268
- <td className="px-6 py-4 text-sm !text-white/70">
269
- CSS classes for styling (use for overrides)
270
- </td>
271
- </tr>
272
- <tr className="!bg-black/10">
273
- <td className="px-6 py-4 font-mono text-sm !text-purple-300">
274
- ...svgProps
275
- </td>
276
- <td className="px-6 py-4 text-sm !text-white/70">
277
- SVGProps
278
- </td>
279
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
280
- <td className="px-6 py-4 text-sm !text-white/70">
281
- All standard SVG element props
282
- </td>
283
- </tr>
284
- </tbody>
285
- </table>
286
- </div>
287
- </div>
288
-
289
- {/* Size Variations */}
290
- <div className="!space-y-8">
291
- <h2 className="text-center text-3xl font-bold !text-white">
292
- Size Variations
293
- </h2>
294
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
295
- <div className="!space-y-6">
296
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
297
- <div className="!space-y-4">
298
- <h3 className="text-lg font-semibold !text-purple-300">
299
- Standard Sizes
300
- </h3>
301
- <div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
302
- <div className="text-center">
303
- <PhoneIcon className="!mx-auto mb-2 size-3" />
304
- <span className="text-xs text-white/60">12px</span>
305
- </div>
306
- <div className="text-center">
307
- <PhoneIcon className="!mx-auto mb-2 size-4" />
308
- <span className="text-xs text-white/60">16px</span>
309
- </div>
310
- <div className="text-center">
311
- <PhoneIcon className="!mx-auto mb-2 size-5" />
312
- <span className="text-xs text-white/60">20px</span>
313
- </div>
314
- <div className="text-center">
315
- <PhoneIcon className="!mx-auto mb-2 size-6" />
316
- <span className="text-xs text-white/60">24px</span>
317
- </div>
318
- <div className="text-center">
319
- <PhoneIcon className="!mx-auto mb-2 size-8" />
320
- <span className="text-xs text-white/60">32px</span>
321
- </div>
322
- <div className="text-center">
323
- <PhoneIcon className="!mx-auto mb-2 h-12 w-12" />
324
- <span className="text-xs text-white/60">48px</span>
325
- </div>
326
- </div>
327
- </div>
328
-
329
- <div className="!space-y-4">
330
- <h3 className="text-lg font-semibold !text-purple-300">
331
- Code Example
332
- </h3>
333
- <div className="rounded-lg bg-black/40 p-4">
334
- <pre className="overflow-x-auto text-sm !text-cyan-300">
335
- {`// Small (16px)
336
- <PhoneIcon className="size-4" />
337
-
338
- // Medium (24px)
339
- <PhoneIcon className="size-6" />
340
-
341
- // Large (32px)
342
- <PhoneIcon className="size-8" />
343
-
344
- // Custom size
345
- <PhoneIcon width={40} height={40} />`}
346
- </pre>
347
- </div>
348
- </div>
349
- </div>
350
- </div>
351
- </div>
352
- </div>
353
-
354
- {/* Color Variations */}
355
- <div className="!space-y-8">
356
- <h2 className="text-center text-3xl font-bold !text-white">
357
- Color Variations
358
- </h2>
359
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
360
- <div className="!space-y-4">
361
- <h3 className="text-lg font-semibold !text-purple-300">
362
- Semantic Colors
363
- </h3>
364
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
365
- <div className="flex items-center gap-4">
366
- <PhoneIcon className="h-6 w-6" />
367
- <div>
368
- <div className="text-sm font-medium text-white">
369
- Primary
370
- </div>
371
- <div className="text-xs text-white/60"></div>
372
- </div>
373
- </div>
374
- <div className="flex items-center gap-4">
375
- <PhoneIcon className="h-6 w-6 text-violet-400" />
376
- <div>
377
- <div className="text-sm font-medium text-white">
378
- Secondary
379
- </div>
380
- <div className="text-xs text-white/60">
381
- text-violet-400
382
- </div>
383
- </div>
384
- </div>
385
- <div className="flex items-center gap-4">
386
- <PhoneIcon className="h-6 w-6 text-fuchsia-400" />
387
- <div>
388
- <div className="text-sm font-medium text-white">
389
- Accent
390
- </div>
391
- <div className="text-xs text-white/60">
392
- text-fuchsia-400
393
- </div>
394
- </div>
395
- </div>
396
- <div className="flex items-center gap-4">
397
- <PhoneIcon className="h-6 w-6 text-white/40" />
398
- <div>
399
- <div className="text-sm font-medium text-white">
400
- Disabled
401
- </div>
402
- <div className="text-xs text-white/60">
403
- text-white/40
404
- </div>
405
- </div>
406
- </div>
407
- </div>
408
- </div>
409
-
410
- <div className="!space-y-4">
411
- <h3 className="text-lg font-semibold !text-purple-300">
412
- Custom Colors
413
- </h3>
414
- <div className="rounded-lg bg-black/40 p-4">
415
- <pre className="overflow-x-auto text-sm !text-green-300">
416
- {`// Using Tailwind classes
417
- <PhoneIcon className="h-6 w-6" />
418
- <PhoneIcon className="h-6 w-6 text-violet-500" />
419
-
420
- // Using CSS custom properties
421
- <PhoneIcon
422
- className="h-6 w-6"
423
- style={{ color: 'var(--color-primary)' }}
424
- />
425
-
426
- // Direct stroke prop
427
- <PhoneIcon
428
- width={24}
429
- height={24}
430
- stroke="#a855f7"
431
- />`}
432
- </pre>
433
- </div>
434
- </div>
435
- </div>
436
- </div>
437
-
438
- {/* Usage Examples */}
439
- <div className="!space-y-8">
440
- <h2 className="text-center text-3xl font-bold !text-white">
441
- Usage Examples
442
- </h2>
443
-
444
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
445
- {/* Contact Card */}
446
- <div className="!space-y-4">
447
- <h3 className="text-lg font-semibold !text-purple-300">
448
- Contact Card
449
- </h3>
450
- <div className="!space-y-4">
451
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
452
- <div className="mb-4 flex items-center gap-3">
453
- <div className="h-12 w-12 rounded-full bg-gradient-to-br from-purple-500/20 to-violet-500/20" />
454
- <div>
455
- <div className="text-sm font-medium !text-white">
456
- John Doe
457
- </div>
458
- <div className="text-xs !text-white/60">
459
- +1 (555) 123-4567
460
- </div>
461
- </div>
462
- </div>
463
- <div className="flex items-center justify-center gap-4">
464
- <button className="rounded-lg border border-purple-500/20 bg-purple-500/10 p-3 transition-colors hover:bg-purple-500/20">
465
- <PhoneIcon className="h-6 w-6" />
466
- </button>
467
- </div>
468
- </div>
469
- <div className="rounded-lg bg-black/40 p-4">
470
- <pre className="overflow-x-auto text-sm !text-green-300">
471
- {`// Contact card with call button
472
- <div className="contact-card">
473
- <div className="contact-info">
474
- <Avatar />
475
- <div>
476
- <h3>{name}</h3>
477
- <p>{phoneNumber}</p>
478
- </div>
479
- </div>
480
- <button
481
- onClick={() => makeCall(phoneNumber)}
482
- aria-label={\`Call \${name}\`}
483
- >
484
- <PhoneIcon className="h-6 w-6" />
485
- </button>
486
- </div>`}
487
- </pre>
488
- </div>
489
- </div>
490
- </div>
491
-
492
- {/* Call History */}
493
- <div className="!space-y-4">
494
- <h3 className="text-lg font-semibold !text-purple-300">
495
- Call History
496
- </h3>
497
- <div className="!space-y-4">
498
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
499
- <div className="!space-y-3">
500
- <div className="flex items-center justify-between">
501
- <div>
502
- <div className="text-sm font-medium !text-white">
503
- Jane Smith
504
- </div>
505
- <div className="text-xs !text-white/60">
506
- Today, 2:30 PM
507
- </div>
508
- </div>
509
- <button className="rounded-lg p-2 hover:bg-white/10">
510
- <PhoneIcon className="h-5 w-5" />
511
- </button>
512
- </div>
513
- <div className="flex items-center justify-between">
514
- <div>
515
- <div className="text-sm font-medium !text-white">
516
- Bob Johnson
517
- </div>
518
- <div className="text-xs !text-white/60">
519
- Yesterday, 4:15 PM
520
- </div>
521
- </div>
522
- <button className="rounded-lg p-2 hover:bg-white/10">
523
- <PhoneIcon className="h-5 w-5" />
524
- </button>
525
- </div>
526
- </div>
527
- </div>
528
- <div className="rounded-lg bg-black/40 p-4">
529
- <pre className="overflow-x-auto text-sm !text-green-300">
530
- {`// Call history list
531
- <div className="call-history">
532
- {calls.map((call) => (
533
- <div key={call.id} className="call-item">
534
- <div>
535
- <h4>{call.name}</h4>
536
- <p>{call.timestamp}</p>
537
- </div>
538
- <button
539
- onClick={() => redial(call.number)}
540
- aria-label={\`Call \${call.name}\`}
541
- >
542
- <PhoneIcon className="h-5 w-5" />
543
- </button>
544
- </div>
545
- ))}
546
- </div>`}
547
- </pre>
548
- </div>
549
- </div>
550
- </div>
551
-
552
- {/* Quick Dial */}
553
- <div className="!space-y-4">
554
- <h3 className="text-lg font-semibold !text-purple-300">
555
- Quick Dial
556
- </h3>
557
- <div className="!space-y-4">
558
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
559
- <div className="mb-4 text-center">
560
- <div className="text-sm font-medium !text-white">
561
- Emergency Contact
562
- </div>
563
- <div className="text-xs !text-white/60">
564
- Press to call
565
- </div>
566
- </div>
567
- <div className="flex items-center justify-center">
568
- <button className="rounded-full border-2 border-purple-500/30 bg-purple-500/10 p-6 transition-colors hover:bg-purple-500/20">
569
- <PhoneIcon className="h-10 w-10" />
570
- </button>
571
- </div>
572
- </div>
573
- <div className="rounded-lg bg-black/40 p-4">
574
- <pre className="overflow-x-auto text-sm !text-green-300">
575
- {`// Quick dial button
576
- <button
577
- onClick={initiateCall}
578
- className="quick-dial-button"
579
- aria-label="Call emergency contact"
580
- >
581
- <PhoneIcon className="h-10 w-10" />
582
- </button>`}
583
- </pre>
584
- </div>
585
- </div>
586
- </div>
587
-
588
- {/* Phone Number Input */}
589
- <div className="!space-y-4">
590
- <h3 className="text-lg font-semibold !text-purple-300">
591
- Phone Number Input
592
- </h3>
593
- <div className="!space-y-4">
594
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
595
- <div className="mb-4">
596
- <label className="mb-2 block text-xs text-white/60">
597
- Phone Number
598
- </label>
599
- <div className="flex items-center gap-2 rounded-lg border border-white/10 bg-black/20 px-3 py-2">
600
- <PhoneIcon className="h-4 w-4" />
601
- <input
602
- type="tel"
603
- placeholder="+1 (555) 123-4567"
604
- className="flex-1 bg-transparent text-sm text-white placeholder:text-white/40"
605
- />
606
- </div>
607
- </div>
608
- <button className="w-full rounded-lg border border-purple-500/20 bg-purple-500/10 px-4 py-2 text-sm transition-colors hover:bg-purple-500/20">
609
- Call Now
610
- </button>
611
- </div>
612
- <div className="rounded-lg bg-black/40 p-4">
613
- <pre className="overflow-x-auto text-sm !text-green-300">
614
- {`// Phone input with icon
615
- <div className="phone-input">
616
- <label>Phone Number</label>
617
- <div className="input-wrapper">
618
- <PhoneIcon className="h-4 w-4" />
619
- <input
620
- type="tel"
621
- placeholder="Enter phone number"
622
- value={phoneNumber}
623
- onChange={(e) => setPhoneNumber(e.target.value)}
624
- />
625
- </div>
626
- <button onClick={handleCall}>
627
- Call Now
628
- </button>
629
- </div>`}
630
- </pre>
631
- </div>
632
- </div>
633
- </div>
634
- </div>
635
- </div>
636
-
637
- {/* Accessibility */}
638
- <div className="!space-y-8">
639
- <h2 className="text-center text-3xl font-bold !text-white">
640
- Accessibility Features
641
- </h2>
642
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
643
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
644
- <h3 className="text-lg font-semibold !text-green-300">
645
- ✅ Built-in Features
646
- </h3>
647
- <ul className="!space-y-2 text-sm !text-white/70">
648
- <li className="!text-white/70">
649
- Uses Radix UI AccessibleIcon wrapper
650
- </li>
651
- <li className="!text-white/70">
652
- Provides screen reader label "Phone icon"
653
- </li>
654
- <li className="!text-white/70">
655
- Supports keyboard navigation when interactive
656
- </li>
657
- <li className="!text-white/70">
658
- Maintains proper color contrast ratios
659
- </li>
660
- <li className="!text-white/70">
661
- Scales with user's font size preferences
662
- </li>
663
- </ul>
664
- </div>
665
-
666
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
667
- <h3 className="text-lg font-semibold !text-purple-300">
668
- 💡 Best Practices
669
- </h3>
670
- <ul className="!space-y-2 text-sm text-white/70">
671
- <li className="!text-white/70">
672
- Always provide descriptive aria-labels for call buttons
673
- </li>
674
- <li className="!text-white/70">
675
- Include phone number in accessible text when possible
676
- </li>
677
- <li className="!text-white/70">
678
- Ensure sufficient touch target size (44px minimum)
679
- </li>
680
- <li className="!text-white/70">
681
- Provide visible focus states for keyboard users
682
- </li>
683
- <li className="!text-white/70">
684
- Consider voice control compatibility
685
- </li>
686
- </ul>
687
- </div>
688
- </div>
689
-
690
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
691
- <h3 className="mb-4 text-lg font-semibold !text-violet-300">
692
- Proper ARIA Implementation
693
- </h3>
694
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
695
- <div className="rounded-lg bg-black/40 p-4">
696
- <pre className="overflow-x-auto text-sm !text-cyan-300">
697
- {`// Call button with proper ARIA
698
- <button
699
- aria-label={\`Call \${contactName}\`}
700
- className="p-2 hover:bg-white/10 rounded-lg"
701
- onClick={() => makeCall(phoneNumber)}
702
- >
703
- <PhoneIcon className="h-6 w-6" />
704
- </button>
705
-
706
- // Phone number with context
707
- <button
708
- aria-label={\`Call \${name} at \${phoneNumber}\`}
709
- onClick={initiateCall}
710
- >
711
- <PhoneIcon className="h-6 w-6" />
712
- <span className="sr-only">{phoneNumber}</span>
713
- </button>
714
-
715
- // Emergency call with state
716
- <button
717
- aria-label="Call emergency services"
718
- onClick={callEmergency}
719
- aria-pressed={isCalling}
720
- >
721
- <PhoneIcon className="h-8 w-8" />
722
- </button>`}
723
- </pre>
724
- </div>
725
- <div className="!space-y-4">
726
- <p className="text-sm !text-white/70">
727
- When using PhoneIcon for interactive elements, always
728
- provide clear context about who or what will be called,
729
- and ensure the phone number is accessible to screen
730
- readers.
731
- </p>
732
- <div className="rounded-lg border border-purple-500/20 bg-purple-500/10 p-4">
733
- <div className="flex items-center gap-2 text-sm text-purple-200">
734
- <PhoneIcon className="h-4 w-4" />
735
- <span>
736
- Screen readers need context about the call
737
- destination
738
- </span>
739
- </div>
740
- </div>
741
- </div>
742
- </div>
743
- </div>
744
- </div>
745
-
746
- {/* Related Icons */}
747
- <div className="!space-y-8">
748
- <h2 className="text-center text-3xl font-bold !text-white">
749
- Related Icons
750
- </h2>
751
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
752
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
753
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
754
- <span className="!text-2xl !text-white">📧</span>
755
- </div>
756
- <div>
757
- <div className="font-medium text-white">EmailIcon</div>
758
- <div className="text-xs text-white/60">Send email</div>
759
- </div>
760
- </div>
761
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
762
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
763
- <span className="!text-2xl !text-white">💬</span>
764
- </div>
765
- <div>
766
- <div className="font-medium text-white">MessageIcon</div>
767
- <div className="text-xs text-white/60">Send message</div>
768
- </div>
769
- </div>
770
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
771
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
772
- <span className="!text-2xl !text-white">📱</span>
773
- </div>
774
- <div>
775
- <div className="font-medium text-white">MobileIcon</div>
776
- <div className="text-xs text-white/60">Mobile device</div>
777
- </div>
778
- </div>
779
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
780
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-orange-500/20">
781
- <span className="!text-2xl !text-white">👤</span>
782
- </div>
783
- <div>
784
- <div className="font-medium text-white">UserIcon</div>
785
- <div className="text-xs text-white/60">
786
- Contact profile
787
- </div>
788
- </div>
789
- </div>
790
- </div>
791
- </div>
792
- </div>
793
-
794
- {/* Footer */}
795
- <div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
796
- <div className="!mx-auto max-w-7xl px-6 py-8">
797
- <div className="!space-y-4 text-center">
798
- <p className="!text-white/60">
799
- PhoneIcon is part of the Aural UI icon library, built with
800
- accessibility and communication best practices in mind.
801
- </p>
802
- <p className="text-sm !text-white/40">
803
- All icons use Radix UI's AccessibleIcon for screen reader
804
- compatibility and follow WCAG guidelines.
805
- </p>
806
- </div>
807
- </div>
808
- </div>
809
- </div>
810
- </>
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
+ />
811
86
  ),
812
87
  },
813
88
  },
814
89
  tags: ["autodocs"],
815
90
  argTypes: {
816
- width: {
817
- control: { type: "range", min: 8, max: 96, step: 2 },
818
- description: "Width of the icon in pixels",
819
- },
820
- withAccessibility: {
821
- control: "boolean",
822
- description: "Whether to wrap the icon with accessibility features",
823
- },
824
- height: {
825
- control: { type: "range", min: 8, max: 96, step: 2 },
826
- description: "Height of the icon in pixels",
827
- },
828
- stroke: {
829
- control: "color",
830
- description: "Stroke color of the icon",
831
- },
832
- strokeWidth: {
833
- control: { type: "range", min: 0.5, max: 4, step: 0.5 },
834
- description: "Width of the stroke",
835
- },
836
91
  className: {
837
92
  control: "text",
838
- description: "CSS classes for styling (use for overrides)",
93
+ description: "CSS classes including color token",
839
94
  },
840
- onClick: {
841
- action: "clicked",
842
- description: "Click handler for interactive use",
95
+ withAccessibility: {
96
+ control: "boolean",
97
+ description: "Wrap with accessibility label",
843
98
  },
844
99
  },
845
100
  }
@@ -847,196 +102,78 @@ function ContactCard() {
847
102
  export default meta
848
103
  type Story = StoryObj<typeof PhoneIcon>
849
104
 
850
- // Story parameters for consistent dark theme
851
- const storyParameters = {
852
- backgrounds: {
853
- default: "dark",
854
- values: [
855
- { name: "dark", value: "#0a0a0a" },
856
- { name: "darker", value: "#000000" },
857
- ],
858
- },
859
- }
860
-
861
105
  export const Default: Story = {
862
106
  args: {
863
- className: "h-8 w-8",
107
+ className: "h-6 w-6 text-fm-icon-active",
864
108
  withAccessibility: true,
865
109
  },
866
- parameters: storyParameters,
867
110
  render: (args) => (
868
- <div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
111
+ <IconDefaultCanvas>
869
112
  <PhoneIcon {...args} />
870
- </div>
113
+ </IconDefaultCanvas>
871
114
  ),
872
115
  }
873
116
 
874
117
  export const SizeVariations: Story = {
875
- parameters: {
876
- ...storyParameters,
877
- docs: {
878
- description: {
879
- story:
880
- "PhoneIcon in different sizes, from small UI elements to large displays.",
881
- },
882
- },
883
- },
884
- render: () => (
885
- <div className="flex h-64 min-h-dvh items-center justify-center gap-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
886
- <div className="text-center">
887
- <PhoneIcon className="!mx-auto mb-2 h-3 w-3" />
888
- <span className="text-xs text-white/60">12px</span>
889
- </div>
890
- <div className="text-center">
891
- <PhoneIcon className="!mx-auto mb-2 h-4 w-4" />
892
- <span className="text-xs text-white/60">16px</span>
893
- </div>
894
- <div className="text-center">
895
- <PhoneIcon className="!mx-auto mb-2 h-5 w-5" />
896
- <span className="text-xs text-white/60">20px</span>
897
- </div>
898
- <div className="text-center">
899
- <PhoneIcon className="!mx-auto mb-2 h-6 w-6" />
900
- <span className="text-xs text-white/60">24px</span>
901
- </div>
902
- <div className="text-center">
903
- <PhoneIcon className="!mx-auto mb-2 h-8 w-8" />
904
- <span className="text-xs text-white/60">32px</span>
905
- </div>
906
- <div className="text-center">
907
- <PhoneIcon className="!mx-auto mb-2 h-12 w-12" />
908
- <span className="text-xs text-white/60">48px</span>
909
- </div>
910
- </div>
911
- ),
118
+ render: () => <IconSizeVariations icon={PhoneIcon} />,
912
119
  }
913
120
 
914
121
  export const ColorVariations: Story = {
915
- parameters: {
916
- ...storyParameters,
917
- docs: {
918
- description: {
919
- story: "PhoneIcon in different semantic colors for various use cases.",
920
- },
921
- },
922
- },
923
- render: () => (
924
- <div className="grid min-h-dvh grid-cols-2 items-center justify-center gap-6 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8 md:grid-cols-4">
925
- <div className="text-center">
926
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-purple-500/30 bg-purple-500/20">
927
- <PhoneIcon className="h-8 w-8" />
928
- </div>
929
- <div className="text-sm font-medium text-white">Primary</div>
930
- <div className="text-xs">text-purple-400</div>
931
- </div>
932
- <div className="text-center">
933
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-violet-500/30 bg-violet-500/20">
934
- <PhoneIcon className="h-8 w-8 text-violet-400" />
935
- </div>
936
- <div className="text-sm font-medium text-white">Secondary</div>
937
- <div className="text-xs text-violet-400">text-violet-400</div>
938
- </div>
939
- <div className="text-center">
940
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-fuchsia-500/30 bg-fuchsia-500/20">
941
- <PhoneIcon className="h-8 w-8 text-fuchsia-400" />
942
- </div>
943
- <div className="text-sm font-medium text-white">Accent</div>
944
- <div className="text-xs text-fuchsia-400">text-fuchsia-400</div>
945
- </div>
946
- <div className="text-center">
947
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/10 bg-white/5">
948
- <PhoneIcon className="h-8 w-8 text-white/40" />
949
- </div>
950
- <div className="text-sm font-medium text-white">Disabled</div>
951
- <div className="text-xs text-white/40">text-white/40</div>
952
- </div>
953
- </div>
954
- ),
122
+ render: () => <IconColorVariations icon={PhoneIcon} />,
955
123
  }
956
124
 
957
125
  export const UsageExamples: Story = {
958
- parameters: {
959
- ...storyParameters,
960
- docs: {
961
- description: {
962
- story:
963
- "Real-world usage examples showing PhoneIcon in different communication contexts.",
964
- },
965
- },
966
- },
967
126
  render: () => (
968
- <div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
969
- {/* Contact Card */}
970
- <div className="!space-y-2">
971
- <h3 className="text-sm font-medium text-white">Contact Card</h3>
972
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
973
- <div className="mb-4 flex items-center gap-3">
974
- <div className="h-12 w-12 rounded-full bg-gradient-to-br from-purple-500/20 to-violet-500/20" />
975
- <div>
976
- <div className="text-sm font-medium text-white">John Doe</div>
977
- <div className="text-xs text-white/60">+1 (555) 123-4567</div>
978
- </div>
979
- </div>
980
- <div className="flex items-center justify-center gap-4">
981
- <button className="rounded-lg border border-purple-500/20 bg-purple-500/10 p-3 transition-colors hover:bg-purple-500/20">
982
- <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>
983
152
  </button>
984
- </div>
153
+ ))}
985
154
  </div>
986
- </div>
987
-
988
- {/* Call History */}
989
- <div className="!space-y-2">
990
- <h3 className="text-sm font-medium text-white">Call History</h3>
991
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
992
- <div className="!space-y-3">
993
- <div className="flex items-center justify-between">
994
- <div>
995
- <div className="text-sm font-medium text-white">Jane Smith</div>
996
- <div className="text-xs text-white/60">Today, 2:30 PM</div>
997
- </div>
998
- <button className="rounded-lg p-2 hover:bg-white/10">
999
- <PhoneIcon className="h-5 w-5" />
1000
- </button>
1001
- </div>
1002
- <div className="flex items-center justify-between">
1003
- <div>
1004
- <div className="text-sm font-medium text-white">
1005
- Bob Johnson
1006
- </div>
1007
- <div className="text-xs text-white/60">Yesterday, 4:15 PM</div>
1008
- </div>
1009
- <button className="rounded-lg p-2 hover:bg-white/10">
1010
- <PhoneIcon className="h-5 w-5" />
1011
- </button>
1012
- </div>
1013
- </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>
1014
163
  </div>
1015
- </div>
1016
- </div>
164
+ </IconUsageSection>
165
+ </IconUsageCanvas>
1017
166
  ),
1018
167
  }
1019
168
 
1020
169
  export const Playground: Story = {
1021
- parameters: {
1022
- ...storyParameters,
1023
- docs: {
1024
- description: {
1025
- story:
1026
- "Interactive playground to experiment with different PhoneIcon configurations.",
1027
- },
1028
- },
1029
- },
1030
170
  args: {
1031
- width: 24,
1032
- height: 24,
1033
- className: "text-purple-400",
171
+ className: "h-8 w-8 text-fm-icon-active",
172
+ withAccessibility: true,
1034
173
  },
1035
174
  render: (args) => (
1036
- <div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
1037
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
1038
- <PhoneIcon {...args} />
1039
- </div>
1040
- </div>
175
+ <IconPlaygroundCanvas>
176
+ <PhoneIcon {...args} />
177
+ </IconPlaygroundCanvas>
1041
178
  ),
1042
179
  }