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,21 @@
1
1
  import React from "react"
2
2
  import type { Meta, StoryObj } from "@storybook/react-vite"
3
3
 
4
+ import { AlertIcon } from "src/ui/icons/alert-icon"
5
+ import { CircleTickIcon } from "src/ui/icons/circle-tick-icon"
6
+ import { CrossIcon } from "src/ui/icons/cross-icon"
7
+ import { TickCircleIcon } from "src/ui/icons/tick-circle-icon"
8
+ import {
9
+ IconColorVariations,
10
+ IconDefaultCanvas,
11
+ IconInteractiveStates,
12
+ IconPlaygroundCanvas,
13
+ IconSizeVariations,
14
+ IconUsageCanvas,
15
+ IconUsageSection,
16
+ } from "src/ui/story-spec/icons/icon-story-canvas"
17
+ import { AuralIconDocsPage } from "src/ui/story-spec/icons/icon-story-docs-page"
18
+
4
19
  import { TickIcon } from "."
5
20
 
6
21
  const meta: Meta<typeof TickIcon> = {
@@ -18,1141 +33,70 @@ const meta: Meta<typeof TickIcon> = {
18
33
  },
19
34
  docs: {
20
35
  page: () => (
21
- <>
22
- {/* Override default docs styling */}
23
- <style>
24
- {`
25
- .sbdocs-wrapper {
26
- padding: 0 !important;
27
- max-width: none !important;
28
- background: transparent !important;
29
- }
30
- .sbdocs-content {
31
- max-width: none !important;
32
- padding: 0 !important;
33
- margin: 0 !important;
34
- background: transparent !important;
35
- }
36
- .docs-story {
37
- background: transparent !important;
38
- }
39
- .sbdocs {
40
- background: transparent !important;
41
- }
42
- body {
43
- background: var(--color-fm-surface-primary) !important;
44
- }
45
- #storybook-docs {
46
- background: var(--color-fm-surface-primary) !important;
47
- }
48
- .sbdocs-preview {
49
- background: transparent !important;
50
- border: none !important;
51
- }
52
- .sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
53
- color: var(--color-fm-icon-active) !important;
54
- }
55
- .sbdocs-p, .sbdocs-li {
56
- color: var(--color-fm-secondary) !important;
57
- }
58
- .sbdocs-code {
59
- background: var(--color-fm-surface-secondary) !important;
60
- color: var(--color-fm-secondary-500) !important;
61
- border: 1px solid var(--color-fm-divider-secondary) !important;
62
- }
63
- .sbdocs-pre {
64
- background: var(--color-fm-surface-secondary) !important;
65
- border: 1px solid var(--color-fm-divider-secondary) !important;
66
- }
67
- .sbdocs-table {
68
- background: var(--color-fm-surface-secondary) !important;
69
- border: 1px solid var(--color-fm-divider-secondary) !important;
70
- }
71
- .sbdocs-table th {
72
- background: var(--color-fm-surface-secondary) !important;
73
- color: var(--color-fm-icon-active) !important;
74
- border-bottom: 1px solid var(--color-fm-divider-secondary) !important;
75
- }
76
- .sbdocs-table td {
77
- color: var(--color-fm-secondary) !important;
78
- border-bottom: 1px solid var(--color-fm-divider-tertiary) !important;
79
- }
80
- @keyframes tick-draw {
81
- 0% { stroke-dashoffset: 20; }
82
- 100% { stroke-dashoffset: 0; }
83
- }
84
- .animate-tick-draw {
85
- stroke-dasharray: 20;
86
- animation: tick-draw 0.5s ease-out forwards;
87
- }
88
- @keyframes tick-scale {
89
- 0%, 100% { transform: scale(1); }
90
- 50% { transform: scale(1.1); }
91
- }
92
- .animate-tick-scale {
93
- animation: tick-scale 0.4s ease-in-out;
94
- }
95
- `}
96
- </style>
97
-
98
- <div className="from-fm-surface-primary via-fm-icon-positive/5 to-fm-surface-primary min-h-screen bg-linear-to-br">
99
- {/* Header */}
100
- <div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
101
- <div className="from-fm-icon-positive/10 to-fm-icon-positive/10 absolute inset-0 bg-linear-to-r via-transparent" />
102
- <div className="relative !mx-auto max-w-7xl px-6 py-16">
103
- <div className="!space-y-6 text-center">
104
- <div className="border-fm-icon-positive/30 from-fm-icon-positive/20 to-fm-icon-positive/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
105
- <TickIcon className="text-fm-icon-positive h-12 w-12" />
106
- </div>
107
- <h1 className="!text-fm-primary text-5xl font-bold">
108
- TickIcon
109
- </h1>
110
- <p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
111
- A simple checkmark icon for success states, completed tasks,
112
- and positive feedback. Features a clean stroke-based design
113
- that works perfectly for checkboxes, form validation, and
114
- task completion indicators. Built with accessibility in mind
115
- using Radix UI's AccessibleIcon wrapper.
116
- </p>
117
-
118
- {/* Stats */}
119
- <div className="flex items-center justify-center gap-8 pt-8">
120
- <div className="text-center">
121
- <div className="text-fm-icon-positive text-3xl font-bold">
122
- Clean
123
- </div>
124
- <div className="text-fm-tertiary text-sm">
125
- Minimal design
126
- </div>
127
- </div>
128
- <div className="bg-fm-divider-primary h-8 w-px" />
129
- <div className="text-center">
130
- <div className="text-fm-icon-positive text-3xl font-bold">
131
- Scalable
132
- </div>
133
- <div className="text-fm-tertiary text-sm">
134
- Stroke-based vector
135
- </div>
136
- </div>
137
- <div className="bg-fm-divider-primary h-8 w-px" />
138
- <div className="text-center">
139
- <div className="text-fm-icon-info text-3xl font-bold">
140
- Versatile
141
- </div>
142
- <div className="text-fm-tertiary text-sm">
143
- Multiple use cases
144
- </div>
145
- </div>
146
- </div>
147
- </div>
148
- </div>
149
- </div>
150
-
151
- {/* Content */}
152
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
153
- {/* Quick Usage */}
154
- <div className="!space-y-8">
155
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
156
- Quick Start
157
- </h2>
158
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
159
- <div className="!space-y-4">
160
- <h3 className="text-fm-icon-positive! text-xl font-semibold">
161
- Basic Usage
162
- </h3>
163
- <div className="bg-fm-surface-secondary rounded-lg p-4">
164
- <pre className="text-fm-icon-positive! overflow-x-auto text-sm">
165
- {`import { TickIcon } from "@icons/tick-icon"
166
-
167
- function CheckboxComponent() {
36
+ <AuralIconDocsPage
37
+ accentToken="positive"
38
+ features={[
39
+ { title: "Confirmation", description: "Marks done or selected" },
40
+ { title: "currentColor", description: "Responds to text tokens" },
41
+ { title: "Accessible", description: "ARIA-ready by default" },
42
+ ]}
43
+ quickStart={{
44
+ codeExample: `import { TickIcon } from "src/ui/icons/tick-icon"
45
+
46
+ function CheckboxItem() {
168
47
  return (
169
48
  <div className="flex items-center gap-2">
170
- <TickIcon className="h-5 w-5 text-green-500" />
49
+ <TickIcon className="h-5 w-5 text-fm-icon-positive" />
171
50
  <span>Task completed</span>
172
51
  </div>
173
52
  )
174
- }`}
175
- </pre>
176
- </div>
177
- </div>
178
-
179
- <div className="!space-y-4">
180
- <h3 className="text-fm-icon-positive! text-xl font-semibold">
181
- Live Preview
182
- </h3>
183
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex h-32 items-center justify-center rounded-lg border">
184
- <div className="border-fm-icon-positive/20 bg-fm-icon-positive/10 flex items-center gap-3 rounded-lg border px-4 py-2">
185
- <TickIcon className="text-fm-icon-positive h-5 w-5" />
186
- <span className="text-fm-icon-active">
187
- Task completed
188
- </span>
189
- </div>
190
- </div>
191
- </div>
192
- </div>
193
- </div>
194
-
195
- {/* Props Documentation */}
196
- <div className="!space-y-8">
197
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
198
- Props & Configuration
199
- </h2>
200
-
201
- <div className="border-fm-divider-secondary bg-fm-surface-secondary overflow-hidden rounded-lg border">
202
- <div className="bg-fm-surface-secondary p-4">
203
- <h3 className="text-fm-icon-active! text-xl font-semibold">
204
- Props
205
- </h3>
206
- </div>
207
- <table className="!my-0 w-full">
208
- <thead className="bg-fm-surface-secondary">
209
- <tr className="border-fm-divider-secondary border-b">
210
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
211
- Prop
212
- </th>
213
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
214
- Type
215
- </th>
216
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
217
- Default
218
- </th>
219
- <th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
220
- Description
221
- </th>
222
- </tr>
223
- </thead>
224
- <tbody>
225
- {" "}
226
- <tr className="bg-fm-surface-secondary!">
227
- <td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
228
- withAccessibility
229
- </td>
230
- <td className="text-fm-secondary! px-6 py-4 text-sm">
231
- boolean
232
- </td>
233
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
234
- true
235
- </td>
236
- <td className="text-fm-secondary! px-6 py-4 text-sm">
237
- Whether to wrap the icon with accessibility feature
238
- </td>
239
- </tr>
240
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
241
- <td className="text-fm-icon-positive! px-6 py-4 font-mono text-sm">
242
- height
243
- </td>
244
- <td className="text-fm-secondary! px-6 py-4 text-sm">
245
- number | string
246
- </td>
247
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
248
- 24
249
- </td>
250
- <td className="text-fm-secondary! px-6 py-4 text-sm">
251
- Height of the icon in pixels
252
- </td>
253
- </tr>
254
- <tr className="border-fm-divider-tertiary border-b">
255
- <td className="text-fm-icon-positive! px-6 py-4 font-mono text-sm">
256
- stroke
257
- </td>
258
- <td className="text-fm-secondary! px-6 py-4 text-sm">
259
- string
260
- </td>
261
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
262
- currentColor
263
- </td>
264
- <td className="text-fm-secondary! px-6 py-4 text-sm">
265
- Stroke color of the checkmark
266
- </td>
267
- </tr>
268
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
269
- <td className="text-fm-icon-positive! px-6 py-4 font-mono text-sm">
270
- strokeWidth
271
- </td>
272
- <td className="text-fm-secondary! px-6 py-4 text-sm">
273
- number | string
274
- </td>
275
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
276
- 2
277
- </td>
278
- <td className="text-fm-secondary! px-6 py-4 text-sm">
279
- Width of the stroke line
280
- </td>
281
- </tr>
282
- <tr className="border-fm-divider-tertiary border-b">
283
- <td className="text-fm-icon-positive! px-6 py-4 font-mono text-sm">
284
- className
285
- </td>
286
- <td className="text-fm-secondary! px-6 py-4 text-sm">
287
- string
288
- </td>
289
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
290
- -
291
- </td>
292
- <td className="text-fm-secondary! px-6 py-4 text-sm">
293
- CSS classes for styling
294
- </td>
295
- </tr>
296
- <tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
297
- <td className="text-fm-icon-positive! px-6 py-4 font-mono text-sm">
298
- viewBox
299
- </td>
300
- <td className="text-fm-secondary! px-6 py-4 text-sm">
301
- string
302
- </td>
303
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
304
- "0 0 24 24"
305
- </td>
306
- <td className="text-fm-secondary! px-6 py-4 text-sm">
307
- SVG viewBox for scaling
308
- </td>
309
- </tr>
310
- <tr className="bg-fm-surface-secondary!">
311
- <td className="text-fm-icon-positive! px-6 py-4 font-mono text-sm">
312
- ...svgProps
313
- </td>
314
- <td className="text-fm-secondary! px-6 py-4 text-sm">
315
- SVGProps
316
- </td>
317
- <td className="text-fm-placeholder! px-6 py-4 text-sm">
318
- -
319
- </td>
320
- <td className="text-fm-secondary! px-6 py-4 text-sm">
321
- All standard SVG element props
322
- </td>
323
- </tr>
324
- </tbody>
325
- </table>
326
- </div>
327
- </div>
328
-
329
- {/* Size Variations */}
330
- <div className="!space-y-8">
331
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
332
- Size Variations
333
- </h2>
334
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
335
- <div className="!space-y-6">
336
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
337
- <div className="!space-y-4">
338
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
339
- Standard Sizes
340
- </h3>
341
- <div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
342
- <div className="text-center">
343
- <TickIcon className="text-fm-icon-positive !mx-auto mb-2 h-3 w-3" />
344
- <span className="text-fm-tertiary text-xs">
345
- 12px
346
- </span>
347
- </div>
348
- <div className="text-center">
349
- <TickIcon className="text-fm-icon-positive !mx-auto mb-2 h-4 w-4" />
350
- <span className="text-fm-tertiary text-xs">
351
- 16px
352
- </span>
353
- </div>
354
- <div className="text-center">
355
- <TickIcon className="text-fm-icon-positive !mx-auto mb-2 h-5 w-5" />
356
- <span className="text-fm-tertiary text-xs">
357
- 20px
358
- </span>
359
- </div>
360
- <div className="text-center">
361
- <TickIcon className="text-fm-icon-positive !mx-auto mb-2 h-6 w-6" />
362
- <span className="text-fm-tertiary text-xs">
363
- 24px
364
- </span>
365
- </div>
366
- <div className="text-center">
367
- <TickIcon className="text-fm-icon-positive !mx-auto mb-2 h-8 w-8" />
368
- <span className="text-fm-tertiary text-xs">
369
- 32px
370
- </span>
371
- </div>
372
- <div className="text-center">
373
- <TickIcon className="text-fm-icon-positive !mx-auto mb-2 h-12 w-12" />
374
- <span className="text-fm-tertiary text-xs">
375
- 48px
376
- </span>
377
- </div>
378
- </div>
379
- </div>
380
-
381
- <div className="!space-y-4">
382
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
383
- Code Example
384
- </h3>
385
- <div className="bg-fm-surface-secondary rounded-lg p-4">
386
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
387
- {`// Small (16px)
388
- <TickIcon className="h-4 w-4" />
389
-
390
- // Medium (24px) - Default
391
- <TickIcon className="h-6 w-6" />
392
-
393
- // Large (32px)
394
- <TickIcon className="h-8 w-8" />
395
-
396
- // Custom size with stroke width
397
- <TickIcon width={40} height={40} strokeWidth={3} />
398
-
399
- // Responsive sizing
400
- <TickIcon className="h-4 w-4 md:h-6 md:w-6 lg:h-8 lg:w-8" />`}
401
- </pre>
402
- </div>
403
- </div>
404
- </div>
405
- </div>
406
- </div>
407
- </div>
408
-
409
- {/* Color Variations */}
410
- <div className="!space-y-8">
411
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
412
- Color Variations
413
- </h2>
414
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
415
- <div className="!space-y-4">
416
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
417
- Semantic Colors
418
- </h3>
419
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
420
- <div className="flex items-center gap-4">
421
- <TickIcon className="text-fm-icon-positive h-6 w-6" />
422
- <div>
423
- <div className="text-fm-icon-active text-sm font-medium">
424
- Success
425
- </div>
426
- <div className="text-fm-tertiary text-xs">
427
- text-fm-icon-positive
428
- </div>
429
- </div>
430
- </div>
431
- <div className="flex items-center gap-4">
432
- <TickIcon className="text-fm-icon-positive h-6 w-6" />
433
- <div>
434
- <div className="text-fm-icon-active text-sm font-medium">
435
- Complete
436
- </div>
437
- <div className="text-fm-tertiary text-xs">
438
- text-fm-icon-positive
439
- </div>
440
- </div>
441
- </div>
442
- <div className="flex items-center gap-4">
443
- <TickIcon className="text-fm-icon-info h-6 w-6" />
444
- <div>
445
- <div className="text-fm-icon-active text-sm font-medium">
446
- Selected
447
- </div>
448
- <div className="text-fm-tertiary text-xs">
449
- text-fm-icon-info
450
- </div>
451
- </div>
452
- </div>
453
- <div className="flex items-center gap-4">
454
- <TickIcon className="text-fm-secondary-600 h-6 w-6" />
455
- <div>
456
- <div className="text-fm-icon-active text-sm font-medium">
457
- Verified
458
- </div>
459
- <div className="text-fm-tertiary text-xs">
460
- text-fm-secondary-600
461
- </div>
462
- </div>
463
- </div>
464
- </div>
465
- </div>
466
-
467
- <div className="!space-y-4">
468
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
469
- Custom Colors & Stroke Width
470
- </h3>
471
- <div className="bg-fm-surface-secondary rounded-lg p-4">
472
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
473
- {`// Using Tailwind classes
474
- <TickIcon className="h-6 w-6 text-green-400" />
475
- <TickIcon className="h-6 w-6 text-emerald-500" />
476
-
477
- // Using CSS custom properties
478
- <TickIcon
479
- className="h-6 w-6"
480
- style={{ color: 'var(--color-success)' }}
481
- />
482
-
483
- // Direct stroke prop with custom width
484
- <TickIcon
485
- width={24}
486
- height={24}
487
- stroke="#10b981"
488
- strokeWidth={3}
489
- />
490
-
491
- // Thin stroke for subtle appearance
492
- <TickIcon
493
- className="h-6 w-6 text-green-400"
494
- strokeWidth={1}
495
- />`}
496
- </pre>
497
- </div>
498
- </div>
499
- </div>
500
- </div>
501
-
502
- {/* Usage Examples */}
503
- <div className="!space-y-8">
504
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
505
- Usage Examples
506
- </h2>
507
-
508
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
509
- {/* Checkbox */}
510
- <div className="!space-y-4">
511
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
512
- Custom Checkbox
513
- </h3>
514
- <div className="!space-y-4">
515
- <div className="!space-y-3">
516
- <label className="flex cursor-pointer items-center gap-3">
517
- <div className="relative">
518
- <input
519
- type="checkbox"
520
- className="peer sr-only"
521
- defaultChecked
522
- />
523
- <div className="peer-unchecked:bg-transparent peer-unchecked:border-fm-divider-primary border-fm-icon-positive bg-fm-icon-positive peer-checked:border-fm-icon-positive peer-checked:bg-fm-icon-positive h-5 w-5 rounded border-2 transition-colors" />
524
- <TickIcon
525
- className="peer-unchecked:opacity-0 text-fm-icon-active absolute inset-0 h-5 w-5 opacity-100 transition-opacity"
526
- strokeWidth={2}
527
- />
528
- </div>
529
- <span className="text-fm-icon-active">
530
- Accept terms and conditions
531
- </span>
532
- </label>
533
- <label className="flex cursor-pointer items-center gap-3">
534
- <div className="relative">
535
- <input type="checkbox" className="peer sr-only" />
536
- <div className="border-fm-divider-primary peer-checked:border-fm-icon-positive peer-checked:bg-fm-icon-positive h-5 w-5 rounded border-2 bg-transparent transition-colors" />
537
- <TickIcon
538
- className="text-fm-icon-active absolute inset-0 h-5 w-5 opacity-0 transition-opacity peer-checked:opacity-100"
539
- strokeWidth={2}
540
- />
541
- </div>
542
- <span className="text-fm-icon-active">
543
- Subscribe to newsletter
544
- </span>
545
- </label>
546
- </div>
547
- <div className="bg-fm-surface-secondary rounded-lg p-4">
548
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
549
- {`<label className="flex items-center gap-3 cursor-pointer">
550
- <div className="relative">
551
- <input type="checkbox" className="sr-only peer" />
552
- <div className="h-5 w-5 rounded border-2 border-gray-400 bg-transparent peer-checked:bg-green-400 peer-checked:border-green-400 transition-colors" />
553
- <TickIcon className="absolute inset-0 h-5 w-5 text-white opacity-0 peer-checked:opacity-100 transition-opacity" strokeWidth={2} />
554
- </div>
555
- <span className="text-white">Accept terms and conditions</span>
556
- </label>`}
557
- </pre>
558
- </div>
559
- </div>
560
- </div>
561
-
562
- {/* Todo List */}
563
- <div className="!space-y-4">
564
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
565
- Todo List
566
- </h3>
567
- <div className="!space-y-4">
568
- <div className="!space-y-3">
569
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-3 rounded-lg border p-3">
570
- <TickIcon className="text-fm-icon-positive h-5 w-5" />
571
- <span className="text-fm-icon-active flex-1 line-through opacity-70">
572
- Set up project repository
573
- </span>
574
- <span className="text-fm-icon-positive text-xs">
575
- Completed
576
- </span>
577
- </div>
578
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-3 rounded-lg border p-3">
579
- <TickIcon className="text-fm-icon-positive h-5 w-5" />
580
- <span className="text-fm-icon-active flex-1 line-through opacity-70">
581
- Design user interface
582
- </span>
583
- <span className="text-fm-icon-positive text-xs">
584
- Completed
585
- </span>
586
- </div>
587
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-3 rounded-lg border p-3">
588
- <div className="border-fm-divider-primary h-5 w-5 rounded-full border-2"></div>
589
- <span className="text-fm-icon-active flex-1">
590
- Implement authentication
591
- </span>
592
- <span className="text-fm-placeholder text-xs">
593
- In Progress
594
- </span>
595
- </div>
596
- </div>
597
- <div className="bg-fm-surface-secondary rounded-lg p-4">
598
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
599
- {`// Completed task
600
- <div className="flex items-center gap-3 p-3 border border-white/10 bg-white/5 rounded-lg">
601
- <TickIcon className="h-5 w-5 text-green-400" />
602
- <span className="flex-1 text-white line-through opacity-70">Set up project repository</span>
603
- <span className="text-xs text-green-400">Completed</span>
604
- </div>
605
-
606
- // Pending task
607
- <div className="flex items-center gap-3 p-3 border border-white/10 bg-white/5 rounded-lg">
608
- <div className="h-5 w-5 rounded-full border-2 border-white/30"></div>
609
- <span className="flex-1 text-white">Implement authentication</span>
610
- <span className="text-xs text-white/50">In Progress</span>
611
- </div>`}
612
- </pre>
613
- </div>
614
- </div>
615
- </div>
616
-
617
- {/* Form Validation */}
618
- <div className="!space-y-4">
619
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
620
- Form Validation
621
- </h3>
622
- <div className="!space-y-4">
623
- <div className="!space-y-2">
624
- <label className="text-fm-icon-active! text-sm font-medium">
625
- Password
626
- </label>
627
- <div className="relative">
628
- <input
629
- type="password"
630
- className="border-fm-icon-positive/50 bg-fm-surface-secondary text-fm-icon-active! focus:border-fm-icon-positive w-full rounded-lg border px-3 py-2 pr-10 focus:ring-2 focus:ring-green-500/20"
631
- placeholder="Enter your password"
632
- defaultValue="securepassword123"
633
- />
634
- <TickIcon className="text-fm-icon-positive absolute top-1/2 right-3 h-4 w-4 -translate-y-1/2" />
635
- </div>
636
- <div className="text-fm-icon-positive flex items-center gap-2 text-sm">
637
- <TickIcon className="h-4 w-4" strokeWidth={2} />
638
- <span>Password meets all requirements</span>
639
- </div>
640
- </div>
641
- <div className="bg-fm-surface-secondary rounded-lg p-4">
642
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
643
- {`// Input with validation icon
644
- <div className="relative">
645
- <input className="pr-10 border-green-500/50" />
646
- <TickIcon className="absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-green-400" />
647
- </div>
648
-
649
- // Success message
650
- <div className="flex items-center gap-2 text-sm text-green-400">
651
- <TickIcon className="h-4 w-4" strokeWidth={2} />
652
- <span>Password meets all requirements</span>
653
- </div>`}
654
- </pre>
655
- </div>
656
- </div>
657
- </div>
658
-
659
- {/* Settings Toggle */}
660
- <div className="!space-y-4">
661
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
662
- Settings Options
663
- </h3>
664
- <div className="!space-y-4">
665
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4">
666
- <div className="flex items-center justify-between">
667
- <div className="flex items-center gap-3">
668
- <TickIcon className="text-fm-icon-positive h-5 w-5" />
669
- <div>
670
- <div className="text-fm-icon-active font-medium">
671
- Email Notifications
672
- </div>
673
- <div className="text-fm-tertiary text-sm">
674
- Receive updates via email
675
- </div>
676
- </div>
677
- </div>
678
- <span className="text-fm-icon-positive text-xs">
679
- Enabled
680
- </span>
681
- </div>
682
- <div className="flex items-center justify-between">
683
- <div className="flex items-center gap-3">
684
- <div className="border-fm-divider-primary h-5 w-5 rounded border"></div>
685
- <div>
686
- <div className="text-fm-icon-active font-medium">
687
- Push Notifications
688
- </div>
689
- <div className="text-fm-tertiary text-sm">
690
- Receive browser notifications
691
- </div>
692
- </div>
693
- </div>
694
- <span className="text-fm-placeholder text-xs">
695
- Disabled
696
- </span>
697
- </div>
698
- </div>
699
- <div className="bg-fm-surface-secondary rounded-lg p-4">
700
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
701
- {`// Enabled setting
702
- <div className="flex items-center justify-between">
703
- <div className="flex items-center gap-3">
704
- <TickIcon className="h-5 w-5 text-green-400" />
705
- <div>
706
- <div className="font-medium text-white">Email Notifications</div>
707
- <div className="text-sm text-white/60">Receive updates via email</div>
708
- </div>
709
- </div>
710
- <span className="text-xs text-green-400">Enabled</span>
711
- </div>`}
712
- </pre>
713
- </div>
714
- </div>
715
- </div>
716
-
717
- {/* Step Indicator */}
718
- <div className="!space-y-4">
719
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
720
- Step Progress
721
- </h3>
722
- <div className="!space-y-4">
723
- <div className="flex items-center gap-4">
724
- <div className="flex items-center gap-2">
725
- <div className="bg-fm-icon-positive flex h-8 w-8 items-center justify-center rounded-full">
726
- <TickIcon
727
- className="text-fm-icon-active h-4 w-4"
728
- strokeWidth={2}
729
- />
730
- </div>
731
- <span className="text-fm-icon-positive text-sm">
732
- Account Setup
733
- </span>
734
- </div>
735
- <div className="bg-fm-icon-positive h-px flex-1"></div>
736
- <div className="flex items-center gap-2">
737
- <div className="bg-fm-icon-positive flex h-8 w-8 items-center justify-center rounded-full">
738
- <TickIcon
739
- className="text-fm-icon-active h-4 w-4"
740
- strokeWidth={2}
741
- />
742
- </div>
743
- <span className="text-fm-icon-positive text-sm">
744
- Profile Info
745
- </span>
746
- </div>
747
- <div className="bg-fm-divider-primary h-px flex-1"></div>
748
- <div className="flex items-center gap-2">
749
- <div className="border-fm-divider-primary bg-fm-surface-secondary flex h-8 w-8 items-center justify-center rounded-full border-2">
750
- <span className="text-fm-icon-active text-xs">
751
- 3
752
- </span>
753
- </div>
754
- <span className="text-fm-tertiary text-sm">
755
- Verification
756
- </span>
757
- </div>
758
- </div>
759
- <div className="bg-fm-surface-secondary rounded-lg p-4">
760
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
761
- {`// Completed step
762
- <div className="flex h-8 w-8 items-center justify-center rounded-full bg-green-500">
763
- <TickIcon className="h-4 w-4 text-white" strokeWidth={2} />
764
- </div>
765
-
766
- // Current/pending step
767
- <div className="flex h-8 w-8 items-center justify-center rounded-full border-2 border-white/30 bg-white/10">
768
- <span className="text-xs text-white">3</span>
769
- </div>`}
770
- </pre>
771
- </div>
772
- </div>
773
- </div>
774
-
775
- {/* Success Message */}
776
- <div className="!space-y-4">
777
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
778
- Success Message
779
- </h3>
780
- <div className="!space-y-4">
781
- <div className="border-fm-icon-positive/20 bg-fm-icon-positive/10 rounded-lg border p-4">
782
- <div className="flex items-start gap-3">
783
- <TickIcon
784
- className="animate-tick-scale text-fm-icon-positive mt-0.5 h-5 w-5 flex-shrink-0"
785
- strokeWidth={2}
786
- />
787
- <div>
788
- <h4 className="text-fm-icon-positive! font-medium">
789
- Changes Saved Successfully
790
- </h4>
791
- <p className="text-fm-icon-positive!/80 text-sm">
792
- Your profile has been updated and all changes are
793
- now active.
794
- </p>
795
- </div>
796
- </div>
797
- </div>
798
- <div className="bg-fm-surface-secondary rounded-lg p-4">
799
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
800
- {`<div className="border border-green-500/20 bg-green-500/10 p-4 rounded-lg">
801
- <div className="flex items-start gap-3">
802
- <TickIcon className="h-5 w-5 text-green-400 mt-0.5 flex-shrink-0 animate-bounce" strokeWidth={2} />
803
- <div>
804
- <h4 className="font-medium text-green-200">Changes Saved Successfully</h4>
805
- <p className="text-sm text-green-300/80">
806
- Your profile has been updated and all changes are now active.
807
- </p>
808
- </div>
809
- </div>
810
- </div>`}
811
- </pre>
812
- </div>
813
- </div>
814
- </div>
815
- </div>
816
- </div>
817
-
818
- {/* Interactive States */}
819
- <div className="!space-y-8">
820
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
821
- Interactive States & Animations
822
- </h2>
823
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
824
- <div className="!space-y-4">
825
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
826
- Animation Effects
827
- </h3>
828
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
829
- <div className="flex items-center gap-4">
830
- <TickIcon
831
- className="animate-tick-draw text-fm-icon-positive h-8 w-8"
832
- strokeWidth={2}
833
- />
834
- <div>
835
- <div className="text-fm-icon-active text-sm font-medium">
836
- Draw Animation
837
- </div>
838
- <div className="text-fm-tertiary text-xs">
839
- Stroke drawing effect
840
- </div>
841
- </div>
842
- </div>
843
- <div className="flex items-center gap-4">
844
- <TickIcon
845
- className="animate-tick-scale text-fm-icon-positive h-8 w-8"
846
- strokeWidth={2}
847
- />
848
- <div>
849
- <div className="text-fm-icon-active text-sm font-medium">
850
- Scale Effect
851
- </div>
852
- <div className="text-fm-tertiary text-xs">
853
- Quick scale animation
854
- </div>
855
- </div>
856
- </div>
857
- <div className="flex items-center gap-4">
858
- <TickIcon
859
- className="text-fm-icon-positive h-8 w-8 transition-transform hover:scale-110"
860
- strokeWidth={2}
861
- />
862
- <div>
863
- <div className="text-fm-icon-active text-sm font-medium">
864
- Hover Scale
865
- </div>
866
- <div className="text-fm-tertiary text-xs">
867
- Interactive growth
868
- </div>
869
- </div>
870
- </div>
871
- <div className="flex items-center gap-4">
872
- <TickIcon
873
- className="text-fm-icon-positive hover:text-fm-icon-positive h-8 w-8 transition-colors"
874
- strokeWidth={2}
875
- />
876
- <div>
877
- <div className="text-fm-icon-active text-sm font-medium">
878
- Color Transition
879
- </div>
880
- <div className="text-fm-tertiary text-xs">
881
- Smooth color change
882
- </div>
883
- </div>
884
- </div>
885
- </div>
886
- </div>
887
-
888
- <div className="!space-y-4">
889
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
890
- Animation Code
891
- </h3>
892
- <div className="bg-fm-surface-secondary rounded-lg p-4">
893
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
894
- {`// Draw animation keyframes
895
- @keyframes tick-draw {
896
- 0% { stroke-dashoffset: 20; }
897
- 100% { stroke-dashoffset: 0; }
898
- }
899
- .animate-tick-draw {
900
- stroke-dasharray: 20;
901
- animation: tick-draw 0.5s ease-out forwards;
902
- }
903
-
904
- // Scale animation
905
- @keyframes tick-scale {
906
- 0%, 100% { transform: scale(1); }
907
- 50% { transform: scale(1.1); }
908
- }
909
- .animate-tick-scale {
910
- animation: tick-scale 0.4s ease-in-out;
911
- }
912
-
913
- // Usage with animations
914
- <TickIcon className="h-6 w-6 text-green-400 animate-tick-draw" />
915
- <TickIcon className="h-6 w-6 text-green-400 animate-tick-scale" />
916
-
917
- // Interactive hover effects
918
- <TickIcon className="h-6 w-6 text-green-400 transition-transform hover:scale-110" />`}
919
- </pre>
920
- </div>
921
- </div>
922
- </div>
923
- </div>
924
-
925
- {/* Accessibility */}
926
- <div className="!space-y-8">
927
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
928
- Accessibility Features
929
- </h2>
930
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
931
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
932
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
933
- ✅ Built-in Features
934
- </h3>
935
- <ul className="text-fm-secondary! !space-y-2 text-sm">
936
- <li className="text-fm-secondary!">
937
- Uses Radix UI AccessibleIcon wrapper
938
- </li>
939
- <li className="text-fm-secondary!">
940
- Provides screen reader label "Tick icon"
941
- </li>
942
- <li className="text-fm-secondary!">
943
- Supports keyboard navigation when interactive
944
- </li>
945
- <li className="text-fm-secondary!">
946
- Maintains proper color contrast ratios
947
- </li>
948
- <li className="text-fm-secondary!">
949
- Scales with user's font size preferences
950
- </li>
951
- <li className="text-fm-secondary!">
952
- Stroke-based design ensures clarity at all sizes
953
- </li>
954
- </ul>
955
- </div>
956
-
957
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
958
- <h3 className="text-fm-icon-positive! text-lg font-semibold">
959
- 💡 Best Practices
960
- </h3>
961
- <ul className="text-fm-secondary! !space-y-2 text-sm">
962
- <li className="text-fm-secondary!">
963
- Always pair with descriptive text or labels
964
- </li>
965
- <li className="text-fm-secondary!">
966
- Use consistent colors for success states
967
- </li>
968
- <li className="text-fm-secondary!">
969
- Ensure sufficient color contrast (minimum 3:1)
970
- </li>
971
- <li className="text-fm-secondary!">
972
- Add focus states for interactive checkboxes
973
- </li>
974
- <li className="text-fm-secondary!">
975
- Consider motion sensitivity for animations
976
- </li>
977
- <li className="text-fm-secondary!">
978
- Use appropriate stroke width for visibility
979
- </li>
980
- </ul>
981
- </div>
982
- </div>
983
-
984
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
985
- <h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
986
- Custom Accessibility Implementation
987
- </h3>
988
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
989
- <div className="bg-fm-surface-secondary rounded-lg p-4">
990
- <pre className="text-fm-icon-info! overflow-x-auto text-sm">
991
- {`// Custom implementation with specific label
992
- import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
993
-
994
- function CompletionIcon({ label = "Completed", ...props }) {
995
- return (
996
- <AccessibleIcon label={label}>
997
- <TickIcon {...props} />
998
- </AccessibleIcon>
999
- )
1000
- }
1001
-
1002
- // Usage with specific context
1003
- <CompletionIcon
1004
- label="Task completed successfully"
1005
- className="h-4 w-4 text-green-400"
1006
- />
1007
-
1008
- // Checkbox with proper ARIA attributes
1009
- <label className="flex items-center gap-2">
1010
- <input
1011
- type="checkbox"
1012
- className="sr-only peer"
1013
- aria-describedby="checkbox-help"
1014
- />
1015
- <div className="relative">
1016
- <div className="h-5 w-5 border-2 border-gray-400 peer-checked:bg-green-400 peer-checked:border-green-400" />
1017
- <TickIcon className="absolute inset-0 h-5 w-5 text-white opacity-0 peer-checked:opacity-100" />
1018
- </div>
1019
- <span>Accept terms</span>
1020
- </label>
1021
- <div id="checkbox-help" className="text-xs text-gray-500">
1022
- Required to proceed with registration
1023
- </div>`}
1024
- </pre>
1025
- </div>
1026
- <div className="!space-y-4">
1027
- <p className="text-fm-secondary! text-sm">
1028
- When using TickIcon for checkboxes or task completion,
1029
- ensure proper labeling and keyboard accessibility. The
1030
- stroke-based design maintains clarity even when scaled
1031
- for users with visual impairments.
1032
- </p>
1033
- <div className="border-fm-icon-positive/20 bg-fm-icon-positive/10 rounded-lg border p-4">
1034
- <div className="text-fm-icon-positive flex items-center gap-2 text-sm">
1035
- <TickIcon className="h-4 w-4" strokeWidth={2} />
1036
- <span>
1037
- Clear visual feedback helps all users understand
1038
- completion states
1039
- </span>
1040
- </div>
1041
- </div>
1042
- </div>
1043
- </div>
1044
- </div>
1045
- </div>
1046
-
1047
- {/* Related Icons */}
1048
- <div className="!space-y-8">
1049
- <h2 className="text-fm-icon-active! text-center text-3xl font-bold">
1050
- Related Icons
1051
- </h2>
1052
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
1053
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
1054
- <div className="bg-fm-icon-positive/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
1055
- <span className="text-2xl">✅</span>
1056
- </div>
1057
- <div>
1058
- <div className="text-fm-icon-active font-medium">
1059
- TickCircleIcon
1060
- </div>
1061
- <div className="text-fm-tertiary text-xs">
1062
- Checkmark in circle
1063
- </div>
1064
- </div>
1065
- </div>
1066
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
1067
- <div className="bg-fm-icon-negative/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
1068
- <span className="text-2xl">❌</span>
1069
- </div>
1070
- <div>
1071
- <div className="text-fm-icon-active font-medium">
1072
- CrossIcon
1073
- </div>
1074
- <div className="text-fm-tertiary text-xs">
1075
- Close/cancel states
1076
- </div>
1077
- </div>
1078
- </div>
1079
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
1080
- <div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
1081
- <span className="text-2xl">ℹ️</span>
1082
- </div>
1083
- <div>
1084
- <div className="text-fm-icon-active font-medium">
1085
- InfoIcon
1086
- </div>
1087
- <div className="text-fm-tertiary text-xs">
1088
- Information states
1089
- </div>
1090
- </div>
1091
- </div>
1092
- <div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
1093
- <div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
1094
- <span className="text-2xl">⚠️</span>
1095
- </div>
1096
- <div>
1097
- <div className="text-fm-icon-active font-medium">
1098
- AlertIcon
1099
- </div>
1100
- <div className="text-fm-tertiary text-xs">
1101
- Warning states
1102
- </div>
1103
- </div>
1104
- </div>
1105
- </div>
53
+ }`,
54
+ livePreview: (
55
+ <div className="text-fm-primary font-fm-text flex items-center gap-2 text-sm">
56
+ <TickIcon className="text-fm-icon-positive h-5 w-5" />
57
+ Task completed
1106
58
  </div>
1107
- </div>
1108
-
1109
- {/* Footer */}
1110
- <div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
1111
- <div className="!mx-auto max-w-7xl px-6 py-8">
1112
- <div className="!space-y-4 text-center">
1113
- <p className="text-fm-tertiary!">
1114
- TickIcon is part of the Aural UI icon library, designed for
1115
- checkboxes, task completion, and success feedback with a
1116
- clean stroke-based design.
1117
- </p>
1118
- <p className="text-fm-placeholder! text-sm">
1119
- All icons use Radix UI's AccessibleIcon for screen reader
1120
- compatibility and follow WCAG guidelines for interactive
1121
- elements.
1122
- </p>
1123
- </div>
1124
- </div>
1125
- </div>
1126
- </div>
1127
- </>
59
+ ),
60
+ }}
61
+ relatedIcons={[
62
+ {
63
+ name: "CircleTickIcon",
64
+ description: "Circle tick outline",
65
+ icon: CircleTickIcon,
66
+ accentToken: "positive",
67
+ },
68
+ {
69
+ name: "TickCircleIcon",
70
+ description: "Filled tick circle",
71
+ icon: TickCircleIcon,
72
+ accentToken: "info",
73
+ },
74
+ {
75
+ name: "CrossIcon",
76
+ description: "Dismiss or close",
77
+ icon: CrossIcon,
78
+ accentToken: "negative",
79
+ },
80
+ {
81
+ name: "AlertIcon",
82
+ description: "Warning or alert",
83
+ icon: AlertIcon,
84
+ accentToken: "warning",
85
+ },
86
+ ]}
87
+ />
1128
88
  ),
1129
89
  },
1130
90
  },
1131
91
  tags: ["autodocs"],
1132
92
  argTypes: {
1133
- width: {
1134
- control: { type: "range", min: 8, max: 96, step: 2 },
1135
- description: "Width of the icon in pixels",
93
+ className: {
94
+ control: "text",
95
+ description: "CSS classes including color token",
1136
96
  },
1137
97
  withAccessibility: {
1138
98
  control: "boolean",
1139
- description: "Whether to wrap the icon with accessibility features",
1140
- },
1141
- height: {
1142
- control: { type: "range", min: 8, max: 96, step: 2 },
1143
- description: "Height of the icon in pixels",
1144
- },
1145
- stroke: {
1146
- control: "color",
1147
- description: "Stroke color of the checkmark",
1148
- },
1149
- strokeWidth: {
1150
- control: { type: "range", min: 1, max: 4, step: 0.5 },
1151
- description: "Width of the stroke line",
1152
- },
1153
- className: {
1154
- control: "text",
1155
- description: "CSS classes for styling",
99
+ description: "Wrap with accessibility label",
1156
100
  },
1157
101
  },
1158
102
  }
@@ -1160,238 +104,114 @@ function CompletionIcon({ label = "Completed", ...props }) {
1160
104
  export default meta
1161
105
  type Story = StoryObj<typeof TickIcon>
1162
106
 
1163
- // Story parameters for consistent dark theme
1164
- const storyParameters = {
1165
- backgrounds: {
1166
- default: "dark",
1167
- values: [
1168
- { name: "dark", value: "var(--color-fm-surface-primary)" },
1169
- { name: "darker", value: "var(--color-fm-neutral-0)" },
1170
- ],
1171
- },
1172
- }
1173
-
1174
107
  export const Default: Story = {
1175
108
  args: {
1176
- width: 24,
1177
- height: 24,
1178
- className: "text-fm-icon-positive",
109
+ className: "h-6 w-6 text-fm-icon-positive",
1179
110
  withAccessibility: true,
1180
111
  },
1181
- parameters: storyParameters,
1182
112
  render: (args) => (
1183
- <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">
113
+ <IconDefaultCanvas>
1184
114
  <TickIcon {...args} />
1185
- </div>
115
+ </IconDefaultCanvas>
1186
116
  ),
1187
117
  }
1188
118
 
1189
119
  export const SizeVariations: Story = {
1190
- parameters: {
1191
- ...storyParameters,
1192
- docs: {
1193
- description: {
1194
- story:
1195
- "TickIcon in different sizes, perfect for checkboxes, form validation, and task completion indicators.",
1196
- },
1197
- },
1198
- },
1199
- render: () => (
1200
- <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">
1201
- <div className="text-center">
1202
- <TickIcon className="text-fm-icon-positive !mx-auto mb-2 h-3 w-3" />
1203
- <span className="text-fm-tertiary text-xs">12px</span>
1204
- </div>
1205
- <div className="text-center">
1206
- <TickIcon className="text-fm-icon-positive !mx-auto mb-2 h-4 w-4" />
1207
- <span className="text-fm-tertiary text-xs">16px</span>
1208
- </div>
1209
- <div className="text-center">
1210
- <TickIcon className="text-fm-icon-positive !mx-auto mb-2 h-5 w-5" />
1211
- <span className="text-fm-tertiary text-xs">20px</span>
1212
- </div>
1213
- <div className="text-center">
1214
- <TickIcon className="text-fm-icon-positive !mx-auto mb-2 h-6 w-6" />
1215
- <span className="text-fm-tertiary text-xs">24px</span>
1216
- </div>
1217
- <div className="text-center">
1218
- <TickIcon className="text-fm-icon-positive !mx-auto mb-2 h-8 w-8" />
1219
- <span className="text-fm-tertiary text-xs">32px</span>
1220
- </div>
1221
- <div className="text-center">
1222
- <TickIcon className="text-fm-icon-positive !mx-auto mb-2 h-12 w-12" />
1223
- <span className="text-fm-tertiary text-xs">48px</span>
1224
- </div>
1225
- </div>
1226
- ),
120
+ render: () => <IconSizeVariations icon={TickIcon} />,
1227
121
  }
1228
122
 
1229
123
  export const ColorVariations: Story = {
1230
- parameters: {
1231
- ...storyParameters,
1232
- docs: {
1233
- description: {
1234
- story:
1235
- "TickIcon in different semantic colors for various completion and success states.",
1236
- },
1237
- },
1238
- },
124
+ render: () => <IconColorVariations icon={TickIcon} />,
125
+ }
126
+
127
+ export const InteractiveStates: Story = {
1239
128
  render: () => (
1240
- <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">
1241
- <div className="text-center">
1242
- <div className="border-fm-icon-positive/30 bg-fm-icon-positive/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
1243
- <TickIcon className="text-fm-icon-positive h-8 w-8" strokeWidth={2} />
1244
- </div>
1245
- <div className="text-fm-icon-active text-sm font-medium">Success</div>
1246
- <div className="text-fm-icon-positive text-xs">
1247
- text-fm-icon-positive
1248
- </div>
1249
- </div>
1250
- <div className="text-center">
1251
- <div className="border-fm-icon-positive/30 bg-fm-icon-positive/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
1252
- <TickIcon className="text-fm-icon-positive h-8 w-8" strokeWidth={2} />
1253
- </div>
1254
- <div className="text-fm-icon-active text-sm font-medium">Complete</div>
1255
- <div className="text-fm-icon-positive text-xs">
1256
- text-fm-icon-positive
1257
- </div>
1258
- </div>
1259
- <div className="text-center">
1260
- <div className="border-fm-icon-info/30 bg-fm-icon-info/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
1261
- <TickIcon className="text-fm-icon-info h-8 w-8" strokeWidth={2} />
1262
- </div>
1263
- <div className="text-fm-icon-active text-sm font-medium">Selected</div>
1264
- <div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
1265
- </div>
1266
- <div className="text-center">
1267
- <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">
1268
- <TickIcon className="text-fm-secondary-600 h-8 w-8" strokeWidth={2} />
1269
- </div>
1270
- <div className="text-fm-icon-active text-sm font-medium">Verified</div>
1271
- <div className="text-fm-secondary-600 text-xs">
1272
- text-fm-secondary-600
1273
- </div>
1274
- </div>
1275
- </div>
129
+ <IconInteractiveStates
130
+ icon={TickIcon}
131
+ states={[
132
+ {
133
+ label: "Active",
134
+ className: "h-8 w-8 text-fm-icon-active",
135
+ description: "Default state",
136
+ },
137
+ {
138
+ label: "Positive",
139
+ className: "h-8 w-8 text-fm-icon-positive",
140
+ description: "Success / confirmed",
141
+ },
142
+ {
143
+ label: "Inactive",
144
+ className: "h-8 w-8 text-fm-icon-inactive",
145
+ description: "Disabled state",
146
+ },
147
+ ]}
148
+ />
1276
149
  ),
1277
150
  }
1278
151
 
1279
152
  export const UsageExamples: Story = {
1280
- parameters: {
1281
- ...storyParameters,
1282
- docs: {
1283
- description: {
1284
- story:
1285
- "Real-world usage examples showing TickIcon in different UI contexts like checkboxes, todo lists, and form validation.",
1286
- },
1287
- },
1288
- },
1289
153
  render: () => (
1290
- <div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh !space-y-8 rounded-lg bg-linear-to-br p-8">
1291
- {/* Custom Checkbox */}
1292
- <div className="!space-y-2">
1293
- <h3 className="text-fm-icon-active text-sm font-medium">
1294
- Custom Checkbox
1295
- </h3>
1296
- <div className="!space-y-3">
1297
- <label className="flex cursor-pointer items-center gap-3">
1298
- <div className="relative">
1299
- <input type="checkbox" className="peer sr-only" defaultChecked />
1300
- <div className="peer-unchecked:bg-transparent peer-unchecked:border-fm-divider-primary border-fm-icon-positive bg-fm-icon-positive peer-checked:border-fm-icon-positive peer-checked:bg-fm-icon-positive h-5 w-5 rounded border-2 transition-colors" />
1301
- <TickIcon
1302
- className="peer-unchecked:opacity-0 text-fm-icon-active absolute inset-0 h-5 w-5 opacity-100 transition-opacity"
1303
- strokeWidth={2}
1304
- />
1305
- </div>
1306
- <span className="text-fm-icon-active">
1307
- Accept terms and conditions
1308
- </span>
1309
- </label>
1310
- <label className="flex cursor-pointer items-center gap-3">
1311
- <div className="relative">
1312
- <input type="checkbox" className="peer sr-only" />
1313
- <div className="border-fm-divider-primary peer-checked:border-fm-icon-positive peer-checked:bg-fm-icon-positive h-5 w-5 rounded border-2 bg-transparent transition-colors" />
1314
- <TickIcon
1315
- className="text-fm-icon-active absolute inset-0 h-5 w-5 opacity-0 transition-opacity peer-checked:opacity-100"
1316
- strokeWidth={2}
1317
- />
154
+ <IconUsageCanvas>
155
+ <IconUsageSection title="Task List">
156
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm space-y-3 rounded-xl border p-4">
157
+ {[
158
+ { label: "Design review complete", done: true },
159
+ { label: "Code review approved", done: true },
160
+ { label: "Deploy to production", done: false },
161
+ ].map(({ label, done }) => (
162
+ <div key={label} className="flex items-center gap-3">
163
+ <div
164
+ className={`flex h-5 w-5 items-center justify-center rounded border ${done ? "border-fm-icon-positive/30 bg-fm-icon-positive/20" : "border-fm-divider-secondary bg-fm-surface-secondary"}`}
165
+ >
166
+ {done && <TickIcon className="text-fm-icon-positive h-4 w-4" />}
167
+ </div>
168
+ <span
169
+ className={`font-fm-text text-sm ${done ? "text-fm-secondary line-through" : "text-fm-primary"}`}
170
+ >
171
+ {label}
172
+ </span>
1318
173
  </div>
1319
- <span className="text-fm-icon-active">Subscribe to newsletter</span>
1320
- </label>
174
+ ))}
1321
175
  </div>
1322
- </div>
1323
-
1324
- {/* Todo List */}
1325
- <div className="!space-y-2">
1326
- <h3 className="text-fm-icon-active text-sm font-medium">Todo List</h3>
1327
- <div className="!space-y-3">
1328
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-3 rounded-lg border p-3">
1329
- <TickIcon
1330
- className="text-fm-icon-positive h-5 w-5"
1331
- strokeWidth={2}
1332
- />
1333
- <span className="text-fm-icon-active flex-1 line-through opacity-70">
1334
- Set up project repository
1335
- </span>
1336
- <span className="text-fm-icon-positive text-xs">Completed</span>
1337
- </div>
1338
- <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-3 rounded-lg border p-3">
1339
- <div className="border-fm-divider-primary h-5 w-5 rounded-full border-2"></div>
1340
- <span className="text-fm-icon-active flex-1">
1341
- Implement authentication
176
+ </IconUsageSection>
177
+
178
+ <IconUsageSection title="Form Validation">
179
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm space-y-2 rounded-xl border p-4">
180
+ <div className="border-fm-icon-positive/30 flex items-center gap-2 rounded-lg border px-3 py-2">
181
+ <TickIcon className="text-fm-icon-positive h-4 w-4 shrink-0" />
182
+ <span className="text-fm-secondary font-fm-text text-sm">
183
+ Email address is valid
1342
184
  </span>
1343
- <span className="text-fm-placeholder text-xs">In Progress</span>
1344
185
  </div>
1345
186
  </div>
1346
- </div>
1347
-
1348
- {/* Form Validation */}
1349
- <div className="!space-y-2">
1350
- <h3 className="text-fm-icon-active text-sm font-medium">
1351
- Form Validation
1352
- </h3>
1353
- <div className="relative">
1354
- <input
1355
- type="password"
1356
- className="border-fm-icon-positive/50 bg-fm-surface-secondary text-fm-icon-active focus:border-fm-icon-positive w-full rounded-lg border px-3 py-2 pr-10 placeholder-white/50 focus:ring-2 focus:ring-green-500/20"
1357
- placeholder="Enter your password"
1358
- defaultValue="securepassword123"
1359
- />
1360
- <TickIcon
1361
- className="text-fm-icon-positive absolute top-1/2 right-3 h-4 w-4 -translate-y-1/2"
1362
- strokeWidth={2}
1363
- />
1364
- </div>
1365
- <div className="text-fm-icon-positive flex items-center gap-2 text-sm">
1366
- <TickIcon className="h-4 w-4" strokeWidth={2} />
1367
- <span>Password meets all requirements</span>
187
+ </IconUsageSection>
188
+
189
+ <IconUsageSection title="Feature List">
190
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm space-y-2 rounded-xl border p-4">
191
+ {["Unlimited projects", "Priority support", "Custom domains"].map(
192
+ (feature) => (
193
+ <div key={feature} className="flex items-center gap-2">
194
+ <TickIcon className="text-fm-icon-positive h-4 w-4 shrink-0" />
195
+ <span className="text-fm-primary font-fm-text text-sm">
196
+ {feature}
197
+ </span>
198
+ </div>
199
+ )
200
+ )}
1368
201
  </div>
1369
- </div>
1370
- </div>
202
+ </IconUsageSection>
203
+ </IconUsageCanvas>
1371
204
  ),
1372
205
  }
1373
206
 
1374
207
  export const Playground: Story = {
1375
- parameters: {
1376
- ...storyParameters,
1377
- docs: {
1378
- description: {
1379
- story:
1380
- "Interactive playground to experiment with different TickIcon configurations including stroke width and colors.",
1381
- },
1382
- },
1383
- },
1384
208
  args: {
1385
- width: 32,
1386
- height: 32,
1387
- className: "text-fm-icon-positive",
1388
- strokeWidth: 2,
209
+ className: "h-8 w-8 text-fm-icon-positive",
210
+ withAccessibility: true,
1389
211
  },
1390
212
  render: (args) => (
1391
- <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">
1392
- <div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
1393
- <TickIcon {...args} />
1394
- </div>
1395
- </div>
213
+ <IconPlaygroundCanvas>
214
+ <TickIcon {...args} />
215
+ </IconPlaygroundCanvas>
1396
216
  ),
1397
217
  }