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 { GitForkIcon } from "src/ui/icons/git-fork-icon"
5
+ import { ImportFolderIcon } from "src/ui/icons/import-folder-icon"
6
+ import { SettingIcon } from "src/ui/icons/setting-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 { GitBranchIcon } from "."
5
19
 
6
20
  const meta: Meta<typeof GitBranchIcon> = {
@@ -11,956 +25,79 @@ const meta: Meta<typeof GitBranchIcon> = {
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
- @keyframes search-pulse {
81
- 0%, 100% { transform: scale(1); opacity: 1; }
82
- 50% { transform: scale(1.05); opacity: 0.8; }
83
- }
84
- .animate-search-pulse {
85
- animation: search-pulse 2s ease-in-out infinite;
86
- }
87
- @keyframes document-slide {
88
- 0%, 100% { transform: translateX(0) rotate(0deg); }
89
- 50% { transform: translateX(-2px) rotate(-1deg); }
90
- }
91
- .animate-document-slide {
92
- animation: document-slide 3s ease-in-out infinite;
93
- }
94
- `}
95
- </style>
96
-
97
- <div className="min-h-screen bg-gradient-to-br from-gray-900 via-indigo-900/20 to-gray-900">
98
- {/* Header */}
99
- <div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
100
- <div className="absolute inset-0 bg-gradient-to-r from-indigo-500/10 via-transparent to-cyan-500/10" />
101
- <div className="relative !mx-auto max-w-7xl px-6 py-16">
102
- <div className="!space-y-6 text-center">
103
- <div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-indigo-500/30 bg-gradient-to-br from-indigo-500/20 to-cyan-500/20">
104
- <GitBranchIcon className="h-12 w-12 text-indigo-400" />
105
- </div>
106
- <h1 className="!text-fm-primary text-5xl font-bold">
107
- GitBranchIcon
108
- </h1>
109
- <p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
110
- A Git branch icon symbolizing version control, branching,
111
- and collaborative development. Ideal for use in features
112
- like commit histories, branch selectors, repositories, or
113
- code collaboration dashboards. Built with accessibility in
114
- mind using Radix UI's AccessibleIcon wrapper.
115
- </p>
116
-
117
- {/* Stats */}
118
- <div className="flex items-center justify-center gap-8 pt-8">
119
- <div className="text-center">
120
- <div className="text-3xl font-bold text-indigo-300">
121
- Branch
122
- </div>
123
- <div className="text-sm text-white/60">
124
- Create features
125
- </div>
126
- </div>
127
- <div className="h-8 w-px bg-white/20" />
128
- <div className="text-center">
129
- <div className="text-3xl font-bold text-cyan-300">
130
- Merge
131
- </div>
132
- <div className="text-sm text-white/60">Combine code</div>
133
- </div>
134
- <div className="h-8 w-px bg-white/20" />
135
- <div className="text-center">
136
- <div className="text-3xl font-bold text-blue-300">
137
- Deploy
138
- </div>
139
- <div className="text-sm text-white/60">Ship changes</div>
140
- </div>
141
- </div>
142
- </div>
143
- </div>
144
- </div>
145
-
146
- {/* Content */}
147
- <div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
148
- {/* Quick Usage */}
149
- <div className="!space-y-8">
150
- <h2 className="text-center text-3xl font-bold !text-white">
151
- Quick Start
152
- </h2>
153
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
154
- {/* Basic Usage */}
155
- <div className="!space-y-4">
156
- <h3 className="text-xl font-semibold !text-indigo-300">
157
- Basic Usage
158
- </h3>
159
- <div className="rounded-lg bg-black/40 p-4">
160
- <pre className="overflow-x-auto text-sm !text-green-300">
161
- {`import { GitBranchIcon } from "@icons/git-branch-icon"
162
-
163
- function BranchButton() {
35
+ <AuralIconDocsPage
36
+ accentToken="info"
37
+ features={[
38
+ { title: "Version Control", description: "Git branch indicator" },
39
+ { title: "Dev Tooling", description: "Pipeline and workflow cue" },
40
+ { title: "Accessible", description: "ARIA-ready by default" },
41
+ ]}
42
+ quickStart={{
43
+ codeExample: `import { GitBranchIcon } from "src/ui/icons/git-branch-icon"
44
+
45
+ function BranchLabel() {
164
46
  return (
165
- <button
166
- aria-label="Git branch icon"
167
- className="flex items-center gap-2 rounded border border-indigo-500/30 bg-indigo-500/10 px-4 py-2 text-indigo-300 hover:bg-indigo-500/20 hover:cursor-pointer"
168
- >
169
- <GitBranchIcon className="h-4 w-4" />
170
- Branches
171
- </button>
172
- )
173
- }ƒ`}
174
- </pre>
175
- </div>
176
- </div>
177
-
178
- {/* Live Preview */}
179
- <div className="!space-y-4">
180
- <h3 className="text-xl font-semibold !text-indigo-300">
181
- Live Preview
182
- </h3>
183
- <div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
184
- <button className="flex items-center gap-2 rounded border border-indigo-500/30 bg-indigo-500/10 px-4 py-2 text-indigo-300 hover:cursor-pointer hover:bg-indigo-500/20">
185
- <GitBranchIcon className="h-4 w-4" />
186
- Branches
187
- </button>
188
- </div>
189
- </div>
190
- </div>
191
- </div>
192
-
193
- {/* Props Documentation */}
194
- <div className="!space-y-8">
195
- <h2 className="text-center text-3xl font-bold !text-white">
196
- Props & Configuration
197
- </h2>
198
-
199
- <div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
200
- <div className="bg-white/5 p-4">
201
- <h3 className="text-xl font-semibold !text-white">Props</h3>
202
- </div>
203
- <table className="!my-0 w-full">
204
- <thead className="bg-white/5">
205
- <tr className="border-b border-white/10">
206
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
207
- Prop
208
- </th>
209
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
210
- Type
211
- </th>
212
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
213
- Default
214
- </th>
215
- <th className="px-6 py-4 text-left text-sm font-semibold !text-white">
216
- Description
217
- </th>
218
- </tr>
219
- </thead>
220
- <tbody>
221
- {" "}
222
- <tr className="!bg-black/10">
223
- <td className="px-6 py-4 font-mono text-sm !text-blue-300">
224
- withAccessibility
225
- </td>
226
- <td className="px-6 py-4 text-sm !text-white/70">
227
- boolean
228
- </td>
229
- <td className="px-6 py-4 text-sm !text-white/50">
230
- true
231
- </td>
232
- <td className="px-6 py-4 text-sm !text-white/70">
233
- Whether to wrap the icon with accessibility feature
234
- </td>
235
- </tr>
236
- <tr className="border-b border-white/5 !bg-black/10">
237
- <td className="px-6 py-4 font-mono text-sm !text-indigo-300">
238
- height
239
- </td>
240
- <td className="px-6 py-4 text-sm !text-white/70">
241
- number | string
242
- </td>
243
- <td className="px-6 py-4 text-sm !text-white/50">24</td>
244
- <td className="px-6 py-4 text-sm !text-white/70">
245
- Height of the icon in pixels
246
- </td>
247
- </tr>
248
- <tr className="border-b border-white/5">
249
- <td className="px-6 py-4 font-mono text-sm !text-indigo-300">
250
- stroke
251
- </td>
252
- <td className="px-6 py-4 text-sm !text-white/70">
253
- string
254
- </td>
255
- <td className="px-6 py-4 text-sm !text-white/50">
256
- currentColor
257
- </td>
258
- <td className="px-6 py-4 text-sm !text-white/70">
259
- Stroke color of the icon lines
260
- </td>
261
- </tr>
262
- <tr className="border-b border-white/5 !bg-black/10">
263
- <td className="px-6 py-4 font-mono text-sm !text-indigo-300">
264
- strokeWidth
265
- </td>
266
- <td className="px-6 py-4 text-sm !text-white/70">
267
- number | string
268
- </td>
269
- <td className="px-6 py-4 text-sm !text-white/50">
270
- 1.5
271
- </td>
272
- <td className="px-6 py-4 text-sm !text-white/70">
273
- Thickness of the stroke lines
274
- </td>
275
- </tr>
276
- <tr className="border-b border-white/5">
277
- <td className="px-6 py-4 font-mono text-sm !text-indigo-300">
278
- strokeLinecap
279
- </td>
280
- <td className="px-6 py-4 text-sm !text-white/70">
281
- string
282
- </td>
283
- <td className="px-6 py-4 text-sm !text-white/50">
284
- square
285
- </td>
286
- <td className="px-6 py-4 text-sm !text-white/70">
287
- Style of line endings (e.g., butt, round, square)
288
- </td>
289
- </tr>
290
- <tr className="border-b border-white/5 !bg-black/10">
291
- <td className="px-6 py-4 font-mono text-sm !text-indigo-300">
292
- className
293
- </td>
294
- <td className="px-6 py-4 text-sm !text-white/70">
295
- string
296
- </td>
297
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
298
- <td className="px-6 py-4 text-sm !text-white/70">
299
- CSS classes for styling (use for size, color, etc.)
300
- </td>
301
- </tr>
302
- <tr className="!bg-black/10">
303
- <td className="px-6 py-4 font-mono text-sm !text-indigo-300">
304
- ...svgProps
305
- </td>
306
- <td className="px-6 py-4 text-sm !text-white/70">
307
- SVGProps
308
- </td>
309
- <td className="px-6 py-4 text-sm !text-white/50">-</td>
310
- <td className="px-6 py-4 text-sm !text-white/70">
311
- All standard SVG element props supported by React
312
- </td>
313
- </tr>
314
- </tbody>
315
- </table>
316
- </div>
317
- </div>
318
-
319
- {/* Size Variations */}
320
- <div className="!space-y-8">
321
- <h2 className="text-center text-3xl font-bold !text-white">
322
- Size Variations
323
- </h2>
324
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
325
- <div className="!space-y-6">
326
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
327
- <div className="!space-y-4">
328
- <h3 className="text-lg font-semibold !text-indigo-300">
329
- Standard Sizes
330
- </h3>
331
- <div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
332
- <div className="text-center">
333
- <GitBranchIcon className="!mx-auto mb-2 h-3 w-3 text-indigo-400" />
334
- <span className="text-xs text-white/60">12px</span>
335
- </div>
336
- <div className="text-center">
337
- <GitBranchIcon className="!mx-auto mb-2 h-4 w-4 text-indigo-400" />
338
- <span className="text-xs text-white/60">16px</span>
339
- </div>
340
- <div className="text-center">
341
- <GitBranchIcon className="!mx-auto mb-2 h-5 w-5 text-indigo-400" />
342
- <span className="text-xs text-white/60">20px</span>
343
- </div>
344
- <div className="text-center">
345
- <GitBranchIcon className="!mx-auto mb-2 h-6 w-6 text-indigo-400" />
346
- <span className="text-xs text-white/60">24px</span>
347
- </div>
348
- <div className="text-center">
349
- <GitBranchIcon className="!mx-auto mb-2 h-8 w-8 text-indigo-400" />
350
- <span className="text-xs text-white/60">32px</span>
351
- </div>
352
- <div className="text-center">
353
- <GitBranchIcon className="!mx-auto mb-2 h-12 w-12 text-indigo-400" />
354
- <span className="text-xs text-white/60">48px</span>
355
- </div>
356
- </div>
357
- </div>
358
-
359
- <div className="!space-y-4">
360
- <h3 className="text-lg font-semibold !text-indigo-300">
361
- Code Example
362
- </h3>
363
- <div className="rounded-lg bg-black/40 p-4">
364
- <pre className="overflow-x-auto text-sm !text-cyan-300">
365
- {`// Small (16px)
366
- <GitBranchIcon className="h-4 w-4 " />
367
-
368
- // Medium (24px)
369
- <GitBranchIcon className="h-6 w-6 " />
370
-
371
- // Large (32px)
372
- <GitBranchIcon className="h-8 w-8 " />
373
-
374
- // Custom size with props
375
- <GitBranchIcon width={40} height={40} />`}
376
- </pre>
377
- </div>
378
- </div>
379
- </div>
380
- </div>
381
- </div>
382
- </div>
383
-
384
- {/* Color Variations */}
385
- <div className="!space-y-8">
386
- <h2 className="text-center text-3xl font-bold !text-white">
387
- Color Variations
388
- </h2>
389
-
390
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
391
- {/* Semantic Colors */}
392
- <div className="!space-y-4">
393
- <h3 className="text-lg font-semibold !text-indigo-300">
394
- Semantic Colors
395
- </h3>
396
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
397
- <div className="flex items-center gap-4">
398
- <GitBranchIcon className="h-6 w-6 text-indigo-400" />
399
- <div>
400
- <div className="text-sm font-medium text-white">
401
- Primary
402
- </div>
403
- <div className="text-xs text-white/60">
404
- text-indigo-400
405
- </div>
406
- </div>
407
- </div>
408
- <div className="flex items-center gap-4">
409
- <GitBranchIcon className="h-6 w-6 text-cyan-400" />
410
- <div>
411
- <div className="text-sm font-medium text-white">
412
- Active
413
- </div>
414
- <div className="text-xs text-white/60">
415
- text-cyan-400
416
- </div>
417
- </div>
418
- </div>
419
- <div className="flex items-center gap-4">
420
- <GitBranchIcon className="h-6 w-6 text-gray-400" />
421
- <div>
422
- <div className="text-sm font-medium text-white">
423
- Disabled
424
- </div>
425
- <div className="text-xs text-white/60">
426
- text-gray-400
427
- </div>
428
- </div>
429
- </div>
430
- <div className="flex items-center gap-4">
431
- <GitBranchIcon className="h-6 w-6 text-blue-400" />
432
- <div>
433
- <div className="text-sm font-medium text-white">
434
- Info
435
- </div>
436
- <div className="text-xs text-white/60">
437
- text-blue-400
438
- </div>
439
- </div>
440
- </div>
441
- <div className="flex items-center gap-4">
442
- <GitBranchIcon className="h-6 w-6 text-green-400" />
443
- <div>
444
- <div className="text-sm font-medium text-white">
445
- Success
446
- </div>
447
- <div className="text-xs text-white/60">
448
- text-green-400
449
- </div>
450
- </div>
451
- </div>
452
- <div className="flex items-center gap-4">
453
- <GitBranchIcon className="h-6 w-6 text-yellow-400" />
454
- <div>
455
- <div className="text-sm font-medium text-white">
456
- Warning
457
- </div>
458
- <div className="text-xs text-white/60">
459
- text-yellow-400
460
- </div>
461
- </div>
462
- </div>
463
- <div className="flex items-center gap-4">
464
- <GitBranchIcon className="h-6 w-6 text-red-400" />
465
- <div>
466
- <div className="text-sm font-medium text-white">
467
- Error
468
- </div>
469
- <div className="text-xs text-white/60">
470
- text-red-400
471
- </div>
472
- </div>
473
- </div>
474
- </div>
475
- </div>
476
-
477
- {/* Custom Colors */}
478
- <div className="!space-y-4">
479
- <h3 className="text-lg font-semibold !text-indigo-300">
480
- Custom Colors
481
- </h3>
482
- <div className="rounded-lg bg-black/40 p-4">
483
- <pre className="overflow-x-auto text-sm !text-green-300">
484
- {`// Using Tailwind classes
485
- <GitBranchIcon className="h-6 w-6 text-indigo-400" />
486
- <GitBranchIcon className="h-6 w-6 text-cyan-500" />
487
-
488
- // Using CSS custom properties
489
- <GitBranchIcon
490
- className="h-6 w-6"
491
- style={{ color: 'var(--color-primary)' }}
492
- />
493
-
494
- // Direct stroke prop
495
- <GitBranchIcon
496
- width={24}
497
- height={24}
498
- stroke="#3b82f6"
499
- />`}
500
- </pre>
501
- </div>
502
- </div>
503
- </div>
504
- </div>
505
-
506
- {/* Usage Examples */}
507
- <div className="!space-y-8">
508
- <h2 className="text-center text-3xl font-bold !text-white">
509
- Usage Examples
510
- </h2>
511
-
512
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
513
- {/* Branch Creation Button */}
514
- <div className="!space-y-4">
515
- <h3 className="text-lg font-semibold !text-indigo-300">
516
- Create New Branch
517
- </h3>
518
- <div className="!space-y-4">
519
- <div>
520
- <button className="flex items-center gap-2 rounded-lg border border-indigo-500/30 bg-indigo-500/10 px-4 py-2 text-indigo-200 transition-colors hover:cursor-pointer hover:bg-indigo-500/20">
521
- <GitBranchIcon className="h-4 w-4" />
522
- Create Branch
523
- </button>
524
- </div>
525
- <div className="rounded-lg bg-black/40 p-4">
526
- <pre className="overflow-x-auto text-sm !text-green-300">
527
- {`<button className="flex items-center gap-2 bg-indigo-500/10 border border-indigo-500/30 px-4 py-2 rounded-lg">
528
- <GitBranch className="h-4 w-4" />
529
- Create Branch
530
- </button>`}
531
- </pre>
532
- </div>
533
- </div>
534
- </div>
535
-
536
- {/* Branch Status Row */}
537
- <div className="!space-y-4">
538
- <h3 className="text-lg font-semibold !text-indigo-300">
539
- Branch Status Display
540
- </h3>
541
- <div className="!space-y-4">
542
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
543
- <div className="flex items-center gap-3">
544
- <GitBranchIcon className="h-5 w-5 text-indigo-400" />
545
- <div className="flex-1">
546
- <div className="text-sm font-medium text-white">
547
- Current branch:{" "}
548
- <span className="text-indigo-300">
549
- feature/user-auth
550
- </span>
551
- </div>
552
- <div className="text-xs text-white/60">
553
- 3 commits ahead of main
554
- </div>
555
- </div>
556
- </div>
557
- </div>
558
- <div className="rounded-lg bg-black/40 p-4">
559
- <pre className="overflow-x-auto text-sm !text-green-300">
560
- {`<div className="flex items-center gap-3 p-4 border border-white/10 bg-white/5">
561
- <GitBranch className="h-5 w-5 text-indigo-400" />
562
- <div className="flex-1">
563
- <div className="text-sm font-medium text-white">
564
- Current branch: feature/user-auth
47
+ <div className="flex items-center gap-2">
48
+ <GitBranchIcon className="h-4 w-4 text-fm-icon-active" />
49
+ <span>main</span>
565
50
  </div>
566
- <div className="text-xs text-white/60">3 commits ahead of main</div>
567
- </div>
568
- </div>`}
569
- </pre>
570
- </div>
571
- </div>
572
- </div>
573
-
574
- {/* No Branches State */}
575
- <div className="!space-y-4">
576
- <h3 className="text-lg font-semibold !text-indigo-300">
577
- No Branches Available
578
- </h3>
579
- <div className="!space-y-4">
580
- <div className="flex flex-col items-center justify-center rounded-lg border border-white/10 bg-white/5 p-8">
581
- <GitBranchIcon className="mb-4 h-12 w-12 text-white/30" />
582
- <h4 className="mb-2 text-lg font-medium !text-white/80">
583
- No feature branches found
584
- </h4>
585
- <p className="text-center text-sm !text-white/50">
586
- Create your first branch to start working on new
587
- features or bug fixes.
588
- </p>
589
- <button className="mt-4 flex items-center gap-2 rounded-lg border border-indigo-500/30 bg-indigo-500/20 px-4 py-2 text-sm text-indigo-200 transition-colors hover:cursor-pointer hover:bg-indigo-500/30">
590
- <GitBranchIcon className="h-4 w-4" />
591
- Create First Branch
592
- </button>
593
- </div>
594
- <div className="rounded-lg bg-black/40 p-4">
595
- <pre className="overflow-x-auto text-sm !text-green-300">
596
- {`<div className="flex flex-col items-center p-8 border border-white/10 bg-white/5">
597
- <GitBranch className="h-12 w-12 text-white/30 mb-4" />
598
- <h4 className="text-lg font-medium text-white/80 mb-2">
599
- No feature branches found
600
- </h4>
601
- <p className="text-sm text-white/50 text-center">
602
- Create your first branch to start working on new features or bug fixes.
603
- </p>
604
- <button className="mt-4 flex items-center gap-2 text-sm">
605
- <GitBranch className="h-4 w-4" />
606
- Create First Branch
607
- </button>
608
- </div>`}
609
- </pre>
610
- </div>
611
- </div>
612
- </div>
613
-
614
- {/* Branch Merge Request */}
615
- <div className="!space-y-4">
616
- <h3 className="text-lg font-semibold !text-indigo-300">
617
- Merge Request Status
618
- </h3>
619
- <div className="!space-y-4">
620
- <div className="rounded-lg border border-white/10 bg-white/5 p-4">
621
- <div className="flex items-center gap-3">
622
- <GitBranchIcon className="h-5 w-5 text-indigo-400" />
623
- <div className="flex-1">
624
- <div className="text-sm font-medium text-white">
625
- Ready to merge:{" "}
626
- <span className="text-indigo-300">
627
- feature/payment-gateway
628
- </span>
629
- </div>
630
- <div className="text-xs text-white/60">
631
- All checks passed • 2 approvals
632
- </div>
633
- </div>
634
- <button className="rounded-lg border border-green-500/30 bg-green-500/10 px-3 py-1 text-xs text-green-200 hover:cursor-pointer hover:bg-green-500/20">
635
- Merge
636
- </button>
637
- </div>
638
- </div>
639
- <div className="rounded-lg bg-black/40 p-4">
640
- <pre className="overflow-x-auto text-sm !text-green-300">
641
- {`<div className="flex items-center gap-3 p-4 border border-white/10 bg-white/5">
642
- <GitBranch className="h-5 w-5 text-indigo-400" />
643
- <div className="flex-1">
644
- <div className="text-sm font-medium text-white">
645
- Ready to merge: feature/payment-gateway
646
- </div>
647
- <div className="text-xs text-white/60">All checks passed • 2 approvals</div>
648
- </div>
649
- <button className="px-3 py-1 text-xs bg-green-500/10 border border-green-500/30">
650
- Merge
651
- </button>
652
- </div>`}
653
- </pre>
654
- </div>
655
- </div>
656
- </div>
657
- </div>
658
- </div>
659
-
660
- {/* Interactive States */}
661
- <div className="!space-y-8">
662
- <h2 className="text-center text-3xl font-bold !text-white">
663
- Interactive States & Animations
664
- </h2>
665
- <div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
666
- <div className="!space-y-4">
667
- <h3 className="text-lg font-semibold !text-indigo-300">
668
- Hover & Animation Effects
669
- </h3>
670
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
671
- <div className="flex items-center gap-4">
672
- <GitBranchIcon className="h-6 w-6 text-white/60 transition-colors hover:text-indigo-400" />
673
- <div>
674
- <div className="text-sm font-medium text-white">
675
- Color Change
676
- </div>
677
- <div className="text-xs text-white/60">
678
- Hover to see effect
679
- </div>
680
- </div>
681
- </div>
682
- <div className="flex items-center gap-4">
683
- <GitBranchIcon className="h-6 w-6 text-white transition-transform hover:scale-110" />
684
- <div>
685
- <div className="text-sm font-medium text-white">
686
- Scale Up
687
- </div>
688
- <div className="text-xs text-white/60">
689
- Scale on hover
690
- </div>
691
- </div>
692
- </div>
693
- <div className="flex items-center gap-4">
694
- <GitBranchIcon className="animate-search-pulse h-6 w-6 text-indigo-400" />
695
- <div>
696
- <div className="text-sm font-medium text-white">
697
- Search Pulse
698
- </div>
699
- <div className="text-xs text-white/60">
700
- Continuous animation
701
- </div>
702
- </div>
703
- </div>
704
- <div className="flex items-center gap-4">
705
- <GitBranchIcon className="animate-document-slide h-6 w-6 text-cyan-400" />
706
- <div>
707
- <div className="text-sm font-medium text-white">
708
- Document Slide
709
- </div>
710
- <div className="text-xs text-white/60">
711
- Subtle movement
712
- </div>
713
- </div>
714
- </div>
715
- </div>
716
- </div>
717
-
718
- <div className="!space-y-4">
719
- <h3 className="text-lg font-semibold !text-indigo-300">
720
- State Examples
721
- </h3>
722
- <div className="rounded-lg bg-black/40 p-4">
723
- <pre className="overflow-x-auto text-sm !text-cyan-300">
724
- {`// Color change on hover
725
- <GitBranchIcon className="h-6 w-6 text-white/60 transition-colors hover:text-indigo-400 " />
726
-
727
- // Scale up on hover
728
- <GitBranchIcon className="h-6 w-6 text-white transition-transform hover:scale-110 " />
729
-
730
- // Loading/searching state
731
- <GitBranchIcon className="h-6 w-6 animate-pulse text-indigo-400 " />
732
-
733
- // Active search state
734
- <GitBranchIcon className="h-6 w-6 text-cyan-400 animate-search-pulse " />
735
-
736
- // Disabled state
737
- <GitBranchIcon className="h-6 w-6 text-gray-400 opacity-50 " />`}
738
- </pre>
739
- </div>
740
- </div>
741
- </div>
742
- </div>
743
-
744
- {/* Accessibility */}
745
- <div className="!space-y-8">
746
- <h2 className="text-center text-3xl font-bold !text-white">
747
- Accessibility Features
748
- </h2>
749
-
750
- <div className="grid grid-cols-1 gap-8 md:grid-cols-2">
751
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
752
- <h3 className="text-lg font-semibold !text-green-300">
753
- ✅ Built-in Features
754
- </h3>
755
- <ul className="!space-y-2 text-sm !text-white/70">
756
- <li className="!text-white/70">
757
- Uses Radix UI AccessibleIcon wrapper
758
- </li>
759
- <li className="!text-white/70">
760
- Provides screen reader label "Git branch icon"
761
- </li>
762
- <li className="!text-white/70">
763
- Maintains proper color contrast ratios
764
- </li>
765
- <li className="!text-white/70">
766
- Scales with user's font size preferences
767
- </li>
768
- </ul>
769
- </div>
770
-
771
- <div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
772
- <h3 className="text-lg font-semibold !text-indigo-300">
773
- 💡 Best Practices
774
- </h3>
775
- <ul className="!space-y-2 text-sm text-white/70">
776
- <li className="!text-white/70">
777
- Always provide descriptive labels for branch-related
778
- actions
779
- </li>
780
- <li className="!text-white/70">
781
- Use consistent placement in version control interfaces
782
- </li>
783
- <li className="!text-white/70">
784
- Ensure sufficient click/touch target sizes
785
- </li>
786
- <li className="!text-white/70">
787
- Add focus states for keyboard navigation
788
- </li>
789
- <li className="!text-white/70">
790
- Consider motion sensitivity for branching animations
791
- </li>
792
- </ul>
793
- </div>
794
- </div>
795
-
796
- <div className="rounded-lg border border-white/10 bg-white/5 p-6">
797
- <h3 className="mb-4 text-lg font-semibold !text-purple-300">
798
- Custom Accessibility Implementation
799
- </h3>
800
- <div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
801
- {/* Code Example Block */}
802
- <div className="rounded-lg bg-black/40 p-4">
803
- <pre className="overflow-x-auto text-sm !text-cyan-300">
804
- {`// Branch toggle button with ARIA
805
- <button
806
- aria-label="Toggle git branch panel"
807
- aria-pressed={branchOpen}
808
- className="flex items-center gap-2 p-2"
809
- >
810
- <GitBranchIcon className="h-4 w-4" />
811
- <span className="sr-only">Open Branch Panel</span>
812
- </button>
813
-
814
- // Branch group with description
815
- <fieldset aria-labelledby="branch-heading" className="space-y-2">
816
- <legend id="branch-heading" className="sr-only">Branch Options</legend>
817
- <div>
818
- <label className="inline-flex items-center gap-2">
819
- <input type="checkbox" aria-describedby="branch-desc" />
820
- Feature Branch
821
- </label>
822
- </div>
823
- <div>
824
- <label className="inline-flex items-center gap-2">
825
- <input type="checkbox" />
826
- Main Branch
827
- </label>
828
- </div>
829
- </fieldset>
830
- <p id="branch-desc" className="sr-only">
831
- Choose one or more branches to compare or switch context.
832
- </p>`}
833
- </pre>
834
- </div>
835
-
836
- {/* Accessibility Note */}
837
- <div className="!space-y-4">
838
- <p className="text-sm !text-white/70">
839
- When using <code>GitBranchIcon</code> for toggling or
840
- displaying branch-related panels, ensure ARIA labels
841
- clearly explain what will be shown or changed. Group
842
- options with semantic roles for screen reader clarity.
843
- </p>
844
- <div className="rounded-lg border border-indigo-500/20 bg-indigo-500/10 p-4">
845
- <div className="flex items-center gap-2 text-sm text-indigo-200">
846
- <GitBranchIcon className="h-4 w-4" />
847
- <span>
848
- Use <code>aria-pressed</code> or{" "}
849
- <code>aria-expanded</code> for toggles and{" "}
850
- <code>legend</code>/<code>fieldset</code> for
851
- grouped version control options.
852
- </span>
853
- </div>
854
- </div>
855
- </div>
856
- </div>
857
- </div>
858
- </div>
859
-
860
- {/* Related Icons */}
861
- <div className="!space-y-8">
862
- <h2 className="text-center text-3xl font-bold !text-white">
863
- Related Icons
864
- </h2>
865
- <div className="grid grid-cols-2 gap-6 md:grid-cols-4">
866
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
867
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
868
- <span className="text-2xl">🔍</span>
869
- </div>
870
- <div>
871
- <div className="font-medium text-white">SearchIcon</div>
872
- <div className="text-xs text-white/60">
873
- General search
874
- </div>
875
- </div>
876
- </div>
877
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
878
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
879
- <span className="text-2xl">📈</span>
880
- </div>
881
- <div>
882
- <div className="font-medium text-white">
883
- TrendingUpIcon
884
- </div>
885
- <div className="text-xs text-white/60">
886
- Growth metrics
887
- </div>
888
- </div>
889
- </div>
890
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
891
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-cyan-500/20">
892
- <span className="text-2xl">🗂️</span>
893
- </div>
894
- <div>
895
- <div className="font-medium text-white">FolderIcon</div>
896
- <div className="text-xs text-white/60">File browsing</div>
897
- </div>
898
- </div>
899
- <div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
900
- <div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
901
- <span className="text-2xl">💾</span>
902
- </div>
903
- <div>
904
- <div className="font-medium text-white">SaveIcon</div>
905
- <div className="text-xs text-white/60">Save changes</div>
906
- </div>
907
- </div>
908
- </div>
909
- </div>
910
- </div>
911
-
912
- {/* Footer */}
913
- <div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
914
- <div className="!mx-auto max-w-7xl px-6 py-8">
915
- <div className="!space-y-4 text-center">
916
- <p className="!text-white/60">
917
- FilterBarRowIcon is part of the Aural UI icon library, built
918
- for document search, content discovery, and page navigation
919
- functionality.
920
- </p>
921
- <p className="text-sm !text-white/40">
922
- All icons use Radix UI's AccessibleIcon for screen reader
923
- compatibility and follow WCAG guidelines for search
924
- interfaces.
925
- </p>
926
- </div>
51
+ )
52
+ }`,
53
+ livePreview: (
54
+ <div className="flex items-center gap-2">
55
+ <GitBranchIcon className="text-fm-icon-active h-5 w-5" />
56
+ <span className="text-fm-primary font-fm-text text-sm">
57
+ main
58
+ </span>
927
59
  </div>
928
- </div>
929
- </div>
930
- </>
60
+ ),
61
+ }}
62
+ relatedIcons={[
63
+ {
64
+ name: "GitForkIcon",
65
+ description: "Git fork indicator",
66
+ icon: GitForkIcon,
67
+ accentToken: "info",
68
+ },
69
+ {
70
+ name: "ShareIcon",
71
+ description: "Share content icon",
72
+ icon: ShareIcon,
73
+ accentToken: "positive",
74
+ },
75
+ {
76
+ name: "ImportFolderIcon",
77
+ description: "Import folder icon",
78
+ icon: ImportFolderIcon,
79
+ accentToken: "warning",
80
+ },
81
+ {
82
+ name: "SettingIcon",
83
+ description: "Settings / preferences icon",
84
+ icon: SettingIcon,
85
+ accentToken: "negative",
86
+ },
87
+ ]}
88
+ />
931
89
  ),
932
90
  },
933
91
  },
934
92
  tags: ["autodocs"],
935
93
  argTypes: {
936
- width: {
937
- control: { type: "range", min: 8, max: 96, step: 2 },
938
- description: "Width of the icon in pixels",
94
+ className: {
95
+ control: "text",
96
+ description: "CSS classes including color token",
939
97
  },
940
98
  withAccessibility: {
941
99
  control: "boolean",
942
- description: "Whether to wrap the icon with accessibility features",
943
- },
944
- height: {
945
- control: { type: "range", min: 8, max: 96, step: 2 },
946
- description: "Height of the icon in pixels",
947
- },
948
- stroke: {
949
- control: "color",
950
- description: "Stroke color of the icon lines",
951
- },
952
- strokeWidth: {
953
- control: { type: "range", min: 1, max: 4, step: 0.5 },
954
- description: "Stroke width of the icon",
955
- },
956
- strokeLinecap: {
957
- control: "select",
958
- options: ["butt", "round", "square"],
959
- description: "Style of line endings",
960
- },
961
- className: {
962
- control: "text",
963
- description: "CSS classes for styling (use for overrides)",
100
+ description: "Wrap with accessibility label",
964
101
  },
965
102
  },
966
103
  }
@@ -968,249 +105,82 @@ function BranchButton() {
968
105
  export default meta
969
106
  type Story = StoryObj<typeof GitBranchIcon>
970
107
 
971
- // Story parameters for consistent dark theme
972
- const storyParameters = {
973
- backgrounds: {
974
- default: "dark",
975
- values: [
976
- { name: "dark", value: "#0a0a0a" },
977
- { name: "darker", value: "#000000" },
978
- ],
979
- },
980
- }
981
-
982
108
  export const Default: Story = {
983
109
  args: {
984
- width: 24,
985
- height: 24,
986
- className: "text-indigo-400 ",
110
+ className: "h-6 w-6 text-fm-icon-active",
987
111
  withAccessibility: true,
988
112
  },
989
- parameters: storyParameters,
990
113
  render: (args) => (
991
- <div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
114
+ <IconDefaultCanvas>
992
115
  <GitBranchIcon {...args} />
993
- </div>
116
+ </IconDefaultCanvas>
994
117
  ),
995
118
  }
996
119
 
997
120
  export const SizeVariations: Story = {
998
- parameters: {
999
- ...storyParameters,
1000
- docs: {
1001
- description: {
1002
- story:
1003
- "GitBranchIcon in different sizes, from small search inputs to large interface elements.",
1004
- },
1005
- },
1006
- },
1007
- render: () => (
1008
- <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">
1009
- <div className="text-center">
1010
- <GitBranchIcon className="!mx-auto mb-2 h-3 w-3 text-indigo-400" />
1011
- <span className="text-xs text-white/60">12px</span>
1012
- </div>
1013
- <div className="text-center">
1014
- <GitBranchIcon className="!mx-auto mb-2 h-4 w-4 text-indigo-400" />
1015
- <span className="text-xs text-white/60">16px</span>
1016
- </div>
1017
- <div className="text-center">
1018
- <GitBranchIcon className="!mx-auto mb-2 h-5 w-5 text-indigo-400" />
1019
- <span className="text-xs text-white/60">20px</span>
1020
- </div>
1021
- <div className="text-center">
1022
- <GitBranchIcon className="!mx-auto mb-2 h-6 w-6 text-indigo-400" />
1023
- <span className="text-xs text-white/60">24px</span>
1024
- </div>
1025
- <div className="text-center">
1026
- <GitBranchIcon className="!mx-auto mb-2 h-8 w-8 text-indigo-400" />
1027
- <span className="text-xs text-white/60">32px</span>
1028
- </div>
1029
- <div className="text-center">
1030
- <GitBranchIcon className="!mx-auto mb-2 h-12 w-12 text-indigo-400" />
1031
- <span className="text-xs text-white/60">48px</span>
1032
- </div>
1033
- </div>
1034
- ),
121
+ render: () => <IconSizeVariations icon={GitBranchIcon} />,
1035
122
  }
1036
123
 
1037
124
  export const ColorVariations: Story = {
1038
- parameters: {
1039
- ...storyParameters,
1040
- docs: {
1041
- description: {
1042
- story:
1043
- "GitBranchIcon in different colors for various search states and contexts.",
1044
- },
1045
- },
1046
- },
1047
- render: () => (
1048
- <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">
1049
- <div className="text-center">
1050
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-indigo-500/30 bg-indigo-500/20">
1051
- <GitBranchIcon className="h-8 w-8 text-indigo-400" />
1052
- </div>
1053
- <div className="text-sm font-medium text-white">Primary</div>
1054
- <div className="text-xs text-indigo-400">text-indigo-400</div>
1055
- </div>
1056
- <div className="text-center">
1057
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-cyan-500/30 bg-cyan-500/20">
1058
- <GitBranchIcon className="h-8 w-8 text-cyan-400" />
1059
- </div>
1060
- <div className="text-sm font-medium text-white">Active</div>
1061
- <div className="text-xs text-cyan-400">text-cyan-400</div>
1062
- </div>
1063
- <div className="text-center">
1064
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-gray-500/30 bg-gray-500/20">
1065
- <GitBranchIcon className="h-8 w-8 text-gray-400" />
1066
- </div>
1067
- <div className="text-sm font-medium text-white">Disabled</div>
1068
- <div className="text-xs text-gray-400">text-gray-400</div>
1069
- </div>
1070
- <div className="text-center">
1071
- <div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-blue-500/30 bg-blue-500/20">
1072
- <GitBranchIcon className="h-8 w-8 text-blue-400" />
1073
- </div>
1074
- <div className="text-sm font-medium text-white">Info</div>
1075
- <div className="text-xs text-blue-400">text-blue-400</div>
1076
- </div>
1077
- </div>
1078
- ),
125
+ render: () => <IconColorVariations icon={GitBranchIcon} />,
1079
126
  }
1080
127
 
1081
128
  export const UsageExamples: Story = {
1082
- parameters: {
1083
- ...storyParameters,
1084
- docs: {
1085
- description: {
1086
- story:
1087
- "Real-world usage examples showing GitBranchIcon used in version control interfaces, including actions like creating branches, checking out branches, managing recent branches, and performing branch management tasks such as renaming or deleting branches.",
1088
- },
1089
- },
1090
- },
1091
129
  render: () => (
1092
- <div className="min-h-dvh space-y-8 rounded-lg bg-gradient-to-br from-gray-950 to-gray-900 p-8">
1093
- {/* Toolbar */}
1094
- <div className="space-y-2">
1095
- <h3 className="text-sm font-medium text-white">Branch Controls</h3>
1096
- <div className="flex gap-4">
1097
- <button className="flex items-center gap-2 rounded-lg border border-blue-500/30 bg-blue-500/15 px-4 py-2 text-blue-200 transition hover:cursor-pointer hover:bg-blue-500/25">
1098
- <GitBranchIcon className="h-4 w-4" />
1099
- Create Branch
1100
- </button>
1101
- <button className="flex items-center gap-2 rounded-lg border border-indigo-500/30 bg-indigo-500/15 px-4 py-2 text-indigo-200 transition hover:cursor-pointer hover:bg-indigo-500/25">
1102
- <GitBranchIcon className="h-4 w-4" />
1103
- Checkout
1104
- </button>
130
+ <IconUsageCanvas>
131
+ <IconUsageSection title="Branch Label">
132
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-1.5 rounded-xl border px-3 py-1.5">
133
+ <GitBranchIcon className="text-fm-icon-active h-3.5 w-3.5" />
134
+ <span className="text-fm-primary font-fm-text text-xs">main</span>
1105
135
  </div>
1106
- </div>
136
+ </IconUsageSection>
1107
137
 
1108
- {/* Recent Branches */}
1109
- <div className="space-y-2">
1110
- <h3 className="text-sm font-medium text-white">Recent Branches</h3>
1111
- <div className="space-y-3 rounded-lg border border-white/10 bg-white/5 p-4">
138
+ <IconUsageSection title="Pipeline Status">
139
+ <div className="border-fm-divider-secondary bg-fm-surface-secondary w-full max-w-sm overflow-hidden rounded-xl border">
1112
140
  {[
1113
- { name: "feature/auth-flow", updated: "Jun 25, 2025" },
1114
- { name: "fix/navbar-overlap", updated: "Jun 23, 2025" },
1115
- { name: "release/3.2.0", updated: "Jun 20, 2025" },
1116
- ].map((branch, index) => (
141
+ { branch: "main", status: "active" },
142
+ { branch: "feature/audio", status: "active" },
143
+ { branch: "fix/player", status: "inactive" },
144
+ ].map(({ branch, status }) => (
1117
145
  <div
1118
- key={index}
1119
- className="flex items-center gap-3 rounded border border-white/10 bg-white/5 p-3 transition hover:bg-white/10"
146
+ key={branch}
147
+ className="border-fm-divider-secondary flex items-center gap-3 border-b px-4 py-3 last:border-b-0"
1120
148
  >
1121
- <GitBranchIcon className="h-5 w-5 text-green-400" />
1122
- <div className="flex-1">
1123
- <div className="text-sm font-medium text-white">
1124
- {branch.name}
1125
- </div>
1126
- <div className="text-xs text-white/60">
1127
- Updated {branch.updated}
1128
- </div>
1129
- </div>
149
+ <GitBranchIcon
150
+ className={`h-4 w-4 ${status === "active" ? "text-fm-icon-positive" : "text-fm-icon-inactive"}`}
151
+ />
152
+ <span className="text-fm-primary font-fm-text text-sm">
153
+ {branch}
154
+ </span>
1130
155
  </div>
1131
156
  ))}
1132
157
  </div>
1133
- </div>
1134
-
1135
- {/* Management Actions */}
1136
- <div className="space-y-2">
1137
- <h3 className="text-sm font-medium text-white">Manage Branches</h3>
1138
- <div className="flex gap-4">
1139
- <button className="flex items-center gap-2 rounded-lg border border-yellow-500/30 bg-yellow-500/15 px-4 py-2 text-yellow-200 transition hover:cursor-pointer hover:bg-yellow-500/25">
1140
- <GitBranchIcon className="h-4 w-4" />
1141
- Rename
1142
- </button>
1143
- <button className="flex items-center gap-2 rounded-lg border border-red-500/30 bg-red-500/15 px-4 py-2 text-red-200 transition hover:cursor-pointer hover:bg-red-500/25">
1144
- <GitBranchIcon className="h-4 w-4" />
1145
- Delete
1146
- </button>
1147
- </div>
1148
- </div>
1149
- </div>
1150
- ),
1151
- }
1152
-
1153
- export const InteractiveStates: Story = {
1154
- parameters: {
1155
- ...storyParameters,
1156
- docs: {
1157
- description: {
1158
- story:
1159
- "Interactive states showing hover effects, animations, and different search states.",
1160
- },
1161
- },
1162
- },
1163
- render: () => (
1164
- <div className="min-h-dvh space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
1165
- <div className="space-y-4">
1166
- <h3 className="text-sm font-medium text-white/70">
1167
- Interactive States & Motion
1168
- </h3>
1169
- <div className="flex gap-8">
1170
- {/* Hover color transition */}
1171
- <div className="flex flex-col items-center gap-2">
1172
- <GitBranchIcon className="h-8 w-8 text-white/60 transition-colors hover:text-blue-400" />
1173
- <span className="text-xs text-white/60">Hover to Highlight</span>
1174
- </div>
1175
-
1176
- {/* Hover scale up */}
1177
- <div className="flex flex-col items-center gap-2">
1178
- <GitBranchIcon className="h-8 w-8 text-white transition-transform duration-200 hover:scale-110" />
1179
- <span className="text-xs text-white/60">Scale on Hover</span>
1180
- </div>
158
+ </IconUsageSection>
1181
159
 
1182
- {/* Pulse animation to show sync or branch update */}
1183
- <div className="flex flex-col items-center gap-2">
1184
- <GitBranchIcon className="h-8 w-8 animate-pulse text-green-400" />
1185
- <span className="text-xs text-white/60">Sync Pulse</span>
1186
- </div>
160
+ <IconUsageSection title="Dev Tools Row">
161
+ <div className="flex gap-3">
162
+ {[GitBranchIcon, GitForkIcon, ImportFolderIcon].map((Icon, i) => (
163
+ <div
164
+ key={i}
165
+ className="border-fm-divider-secondary bg-fm-surface-secondary flex h-10 w-10 items-center justify-center rounded-xl border"
166
+ >
167
+ <Icon className="text-fm-icon-active h-5 w-5" />
168
+ </div>
169
+ ))}
1187
170
  </div>
1188
- </div>
1189
- </div>
171
+ </IconUsageSection>
172
+ </IconUsageCanvas>
1190
173
  ),
1191
174
  }
1192
175
 
1193
176
  export const Playground: Story = {
1194
- parameters: {
1195
- ...storyParameters,
1196
- docs: {
1197
- description: {
1198
- story:
1199
- "Interactive playground to experiment with different GitBranchIcon configurations.",
1200
- },
1201
- },
1202
- },
1203
177
  args: {
1204
- width: 32,
1205
- height: 32,
1206
- className: "text-indigo-400 ",
1207
- strokeLinecap: "square",
178
+ className: "h-8 w-8 text-fm-icon-active",
179
+ withAccessibility: true,
1208
180
  },
1209
181
  render: (args) => (
1210
- <div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
1211
- <div className="rounded-lg border border-white/10 bg-white/5 p-8">
1212
- <GitBranchIcon {...args} />
1213
- </div>
1214
- </div>
182
+ <IconPlaygroundCanvas>
183
+ <GitBranchIcon {...args} />
184
+ </IconPlaygroundCanvas>
1215
185
  ),
1216
186
  }