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.
- package/README.md +8 -1
- package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1228
- package/dist/components/avatar/Avatar.stories.tsx +219 -235
- package/dist/components/badge/Badge.stories.tsx +379 -116
- package/dist/components/banner/Banner.stories.tsx +445 -391
- package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
- package/dist/components/button/Button.stories.tsx +585 -230
- package/dist/components/card/Card.stories.tsx +619 -301
- package/dist/components/char-count/CharCount.stories.tsx +350 -248
- package/dist/components/checkbox/Checkbox.stories.tsx +309 -167
- package/dist/components/chip/Chip.stories.tsx +362 -168
- package/dist/components/circular-loader/CircularLoader.stories.tsx +221 -636
- package/dist/components/clamp-lines/ClampLines.stories.tsx +246 -117
- package/dist/components/collapsible/Collapsible.stories.tsx +391 -252
- package/dist/components/command/Command.stories.tsx +530 -867
- package/dist/components/dialog/Dialog.stories.tsx +501 -950
- package/dist/components/divider/Divider.stories.tsx +264 -527
- package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
- package/dist/components/drawer/Drawer.stories.tsx +659 -1023
- package/dist/components/dropdown/Dropdown.stories.tsx +643 -1028
- package/dist/components/form/Form.stories.tsx +560 -274
- package/dist/components/helper-text/HelperText.stories.tsx +199 -200
- package/dist/components/hover-card/HoverCard.stories.tsx +318 -1254
- package/dist/components/icon-button/IconButton.stories.tsx +837 -194
- package/dist/components/if-else/if-else.stories.tsx +370 -83
- package/dist/components/input/Input.stories.tsx +436 -368
- package/dist/components/label/Label.stories.tsx +156 -154
- package/dist/components/list/List.stories.tsx +484 -835
- package/dist/components/marquee/Marquee.stories.tsx +356 -712
- package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -422
- package/dist/components/overlay/Overlay.stories.tsx +452 -824
- package/dist/components/pagination/Pagination.stories.tsx +721 -210
- package/dist/components/popover/Popover.stories.tsx +481 -896
- package/dist/components/radio/Radio.stories.tsx +432 -124
- package/dist/components/resizable/Resizable.stories.tsx +495 -799
- package/dist/components/scroll-area/ScrollArea.stories.tsx +383 -1059
- package/dist/components/search/Search.stories.tsx +312 -595
- package/dist/components/select/Select.stories.tsx +684 -789
- package/dist/components/sheet/Sheet.stories.tsx +671 -950
- package/dist/components/skelton/Skelton.stories.tsx +230 -764
- package/dist/components/slider/Slider.stories.tsx +383 -760
- package/dist/components/stepper/Stepper.stories.tsx +371 -514
- package/dist/components/switch/Switch.stories.tsx +461 -208
- package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
- package/dist/components/table/Table.stories.tsx +770 -916
- package/dist/components/tabs/Tabs.stories.tsx +458 -1455
- package/dist/components/tag/Tag.stories.tsx +714 -542
- package/dist/components/textarea/TextArea.stories.tsx +621 -562
- package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -154
- package/dist/components/toast/Toast.stories.tsx +452 -1339
- package/dist/components/toggle/Toggle.stories.tsx +488 -931
- package/dist/components/tooltip/Tooltip.stories.tsx +344 -1388
- package/dist/components/typography/Typography.stories.tsx +406 -89
- package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
- package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
- package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
- package/dist/icons/Icons.stories.tsx +0 -12
- package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +223 -1060
- package/dist/icons/alert-icon/AlertIcon.stories.tsx +106 -968
- package/dist/icons/all-icons.tsx +37 -16
- package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +137 -1010
- package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +145 -935
- package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +132 -1046
- package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +134 -986
- package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +135 -1028
- package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +133 -971
- package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +145 -1123
- package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +143 -1252
- package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +123 -632
- package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +141 -1223
- package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +164 -1018
- package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +121 -1236
- package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +121 -1213
- package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +116 -893
- package/dist/icons/camera-icon/CameraIcon.stories.tsx +109 -1254
- package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +114 -975
- package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +157 -994
- package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +160 -992
- package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +140 -970
- package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +126 -993
- package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +144 -987
- package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +141 -1007
- package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +147 -1187
- package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +110 -476
- package/dist/icons/coin-icon/CoinIcon.stories.tsx +120 -1364
- package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +113 -1360
- package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +111 -942
- package/dist/icons/command-icon/CommandIcon.stories.tsx +124 -1087
- package/dist/icons/copy-icon/CopyIcon.stories.tsx +119 -996
- package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +144 -1046
- package/dist/icons/cross-icon/CrossIcon.stories.tsx +136 -999
- package/dist/icons/download-icon/DownloadIcon.stories.tsx +123 -857
- package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +121 -1080
- package/dist/icons/email-icon/EmailIcon.stories.tsx +112 -979
- package/dist/icons/expand-icon/ExpandIcon.stories.tsx +109 -1146
- package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +141 -1068
- package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +140 -1081
- package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +124 -1050
- package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +123 -1091
- package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +122 -633
- package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +116 -1087
- package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +166 -1020
- package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +112 -1182
- package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +112 -1155
- package/dist/icons/globe-icon/GlobeIcon.stories.tsx +127 -325
- package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +142 -985
- package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +116 -1217
- package/dist/icons/head-icon/HeadIcon.stories.tsx +108 -953
- package/dist/icons/heart-icon/HeartIcon.stories.tsx +117 -1060
- package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +116 -716
- package/dist/icons/image-icon/ImageIcon.stories.tsx +102 -1164
- package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +108 -1233
- package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +133 -1289
- package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +155 -1012
- package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +158 -1438
- package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +121 -1011
- package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +116 -981
- package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +116 -979
- package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +105 -1252
- package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +151 -1554
- package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +107 -1227
- package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +116 -707
- package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +119 -1226
- package/dist/icons/message-icon/MessageIcon.stories.tsx +111 -557
- package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +112 -1198
- package/dist/icons/moon-icon/MoonIcon.stories.tsx +117 -557
- package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +106 -1235
- package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +112 -1185
- package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +116 -1012
- package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +108 -1137
- package/dist/icons/notes-icon/NotesIcon.stories.tsx +116 -1138
- package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +106 -1146
- package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +119 -719
- package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +110 -999
- package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +109 -912
- package/dist/icons/pause-icon/PauseIcon.stories.tsx +110 -1041
- package/dist/icons/pencil-icon/PencilIcon.stories.tsx +112 -1109
- package/dist/icons/phone-icon/PhoneIcon.stories.tsx +112 -1023
- package/dist/icons/plus-icon/PlusIcon.stories.tsx +103 -1132
- package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +104 -870
- package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +99 -476
- package/dist/icons/search-icon/SearchIcon.stories.tsx +108 -1161
- package/dist/icons/setting-icon/SettingIcon.stories.tsx +104 -1009
- package/dist/icons/share-icon/ShareIcon.stories.tsx +117 -1064
- package/dist/icons/shield-icon/ShieldIcon.stories.tsx +114 -974
- package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +134 -1160
- package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +169 -1017
- package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +161 -1016
- package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +102 -1001
- package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +155 -593
- package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +155 -608
- package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +142 -712
- package/dist/icons/star-icon/StarIcon.stories.tsx +120 -946
- package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +109 -1013
- package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +113 -891
- package/dist/icons/sun-icon/SunIcon.stories.tsx +117 -864
- package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +113 -989
- package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +120 -1027
- package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +153 -1476
- package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +143 -1187
- package/dist/icons/tick-icon/TickIcon.stories.tsx +142 -1322
- package/dist/icons/trash-icon/TrashIcon.stories.tsx +105 -970
- package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +154 -1457
- package/dist/icons/upload-icon/UploadIcon.stories.tsx +112 -930
- package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +115 -1019
- package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +122 -1092
- package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +120 -1401
- package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +107 -1212
- package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +109 -1122
- package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +112 -1124
- package/dist/icons/warning-icon/WarningIcon.stories.tsx +119 -1083
- package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +158 -983
- package/dist/index.cjs +90 -90
- package/dist/index.js +90 -90
- package/package.json +8 -3
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-vite"
|
|
3
3
|
|
|
4
|
+
import { 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> = {
|
|
@@ -18,983 +32,72 @@ const meta: Meta<typeof GitBranchIcon> = {
|
|
|
18
32
|
},
|
|
19
33
|
docs: {
|
|
20
34
|
page: () => (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
padding: 0 ;
|
|
33
|
-
margin: 0 ;
|
|
34
|
-
background: transparent ;
|
|
35
|
-
}
|
|
36
|
-
.docs-story {
|
|
37
|
-
background: transparent ;
|
|
38
|
-
}
|
|
39
|
-
.sbdocs {
|
|
40
|
-
background: transparent ;
|
|
41
|
-
}
|
|
42
|
-
body {
|
|
43
|
-
background: var(--color-fm-surface-primary) ;
|
|
44
|
-
}
|
|
45
|
-
#storybook-docs {
|
|
46
|
-
background: var(--color-fm-surface-primary) ;
|
|
47
|
-
}
|
|
48
|
-
.sbdocs-preview {
|
|
49
|
-
background: transparent ;
|
|
50
|
-
border: none ;
|
|
51
|
-
}
|
|
52
|
-
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
|
|
53
|
-
color: var(--color-fm-icon-active) ;
|
|
54
|
-
}
|
|
55
|
-
.sbdocs-p, .sbdocs-li {
|
|
56
|
-
color: var(--color-fm-secondary) ;
|
|
57
|
-
}
|
|
58
|
-
.sbdocs-code {
|
|
59
|
-
background: var(--color-fm-surface-secondary) ;
|
|
60
|
-
color: var(--color-fm-secondary-500) ;
|
|
61
|
-
border: 1px solid var(--color-fm-divider-secondary) ;
|
|
62
|
-
}
|
|
63
|
-
.sbdocs-pre {
|
|
64
|
-
background: var(--color-fm-surface-secondary) ;
|
|
65
|
-
border: 1px solid var(--color-fm-divider-secondary) ;
|
|
66
|
-
}
|
|
67
|
-
.sbdocs-table {
|
|
68
|
-
background: var(--color-fm-surface-secondary) ;
|
|
69
|
-
border: 1px solid var(--color-fm-divider-secondary) ;
|
|
70
|
-
}
|
|
71
|
-
.sbdocs-table th {
|
|
72
|
-
background: var(--color-fm-surface-secondary) ;
|
|
73
|
-
color: var(--color-fm-icon-active) ;
|
|
74
|
-
border-bottom: 1px solid var(--color-fm-divider-secondary) ;
|
|
75
|
-
}
|
|
76
|
-
.sbdocs-table td {
|
|
77
|
-
color: var(--color-fm-secondary) ;
|
|
78
|
-
border-bottom: 1px solid var(--color-fm-divider-tertiary) ;
|
|
79
|
-
}
|
|
80
|
-
@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="from-fm-surface-primary via-fm-icon-info/5 to-fm-surface-primary min-h-screen bg-linear-to-br">
|
|
98
|
-
{/* Header */}
|
|
99
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary relative overflow-hidden border-b backdrop-blur-xl">
|
|
100
|
-
<div className="from-fm-icon-info/10 to-fm-icon-info/10 absolute inset-0 bg-linear-to-r via-transparent" />
|
|
101
|
-
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
102
|
-
<div className="!space-y-6 text-center">
|
|
103
|
-
<div className="border-fm-icon-info/30 from-fm-icon-info/20 to-fm-icon-info/20 !mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border bg-linear-to-br">
|
|
104
|
-
<GitBranchIcon className="text-fm-icon-info h-12 w-12" />
|
|
105
|
-
</div>
|
|
106
|
-
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
107
|
-
GitBranchIcon
|
|
108
|
-
</h1>
|
|
109
|
-
<p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
|
|
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-fm-icon-info text-3xl font-bold">
|
|
121
|
-
Branch
|
|
122
|
-
</div>
|
|
123
|
-
<div className="text-fm-tertiary text-sm">
|
|
124
|
-
Create features
|
|
125
|
-
</div>
|
|
126
|
-
</div>
|
|
127
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
128
|
-
<div className="text-center">
|
|
129
|
-
<div className="text-fm-icon-info text-3xl font-bold">
|
|
130
|
-
Merge
|
|
131
|
-
</div>
|
|
132
|
-
<div className="text-fm-tertiary text-sm">
|
|
133
|
-
Combine code
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
<div className="bg-fm-divider-primary h-8 w-px" />
|
|
137
|
-
<div className="text-center">
|
|
138
|
-
<div className="text-fm-icon-info text-3xl font-bold">
|
|
139
|
-
Deploy
|
|
140
|
-
</div>
|
|
141
|
-
<div className="text-fm-tertiary text-sm">
|
|
142
|
-
Ship changes
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
</div>
|
|
146
|
-
</div>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
|
|
150
|
-
{/* Content */}
|
|
151
|
-
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
152
|
-
{/* Quick Usage */}
|
|
153
|
-
<div className="!space-y-8">
|
|
154
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
155
|
-
Quick Start
|
|
156
|
-
</h2>
|
|
157
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
158
|
-
{/* Basic Usage */}
|
|
159
|
-
<div className="!space-y-4">
|
|
160
|
-
<h3 className="text-fm-icon-info! 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 { GitBranchIcon } from "@icons/git-branch-icon"
|
|
166
|
-
|
|
167
|
-
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() {
|
|
168
46
|
return (
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
>
|
|
173
|
-
<GitBranchIcon className="h-4 w-4" />
|
|
174
|
-
Branches
|
|
175
|
-
</button>
|
|
176
|
-
)
|
|
177
|
-
}ƒ`}
|
|
178
|
-
</pre>
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
|
|
182
|
-
{/* Live Preview */}
|
|
183
|
-
<div className="!space-y-4">
|
|
184
|
-
<h3 className="text-fm-icon-info! text-xl font-semibold">
|
|
185
|
-
Live Preview
|
|
186
|
-
</h3>
|
|
187
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex h-32 items-center justify-center rounded-lg border">
|
|
188
|
-
<button className="border-fm-icon-info/30 bg-fm-icon-info/10 text-fm-icon-info hover:bg-fm-icon-info/20 flex items-center gap-2 rounded border px-4 py-2 hover:cursor-pointer">
|
|
189
|
-
<GitBranchIcon className="h-4 w-4" />
|
|
190
|
-
Branches
|
|
191
|
-
</button>
|
|
192
|
-
</div>
|
|
193
|
-
</div>
|
|
194
|
-
</div>
|
|
195
|
-
</div>
|
|
196
|
-
|
|
197
|
-
{/* Props Documentation */}
|
|
198
|
-
<div className="!space-y-8">
|
|
199
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
200
|
-
Props & Configuration
|
|
201
|
-
</h2>
|
|
202
|
-
|
|
203
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary overflow-hidden rounded-lg border">
|
|
204
|
-
<div className="bg-fm-surface-secondary p-4">
|
|
205
|
-
<h3 className="text-fm-icon-active! text-xl font-semibold">
|
|
206
|
-
Props
|
|
207
|
-
</h3>
|
|
208
|
-
</div>
|
|
209
|
-
<table className="!my-0 w-full">
|
|
210
|
-
<thead className="bg-fm-surface-secondary">
|
|
211
|
-
<tr className="border-fm-divider-secondary border-b">
|
|
212
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
213
|
-
Prop
|
|
214
|
-
</th>
|
|
215
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
216
|
-
Type
|
|
217
|
-
</th>
|
|
218
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
219
|
-
Default
|
|
220
|
-
</th>
|
|
221
|
-
<th className="text-fm-icon-active! px-6 py-4 text-left text-sm font-semibold">
|
|
222
|
-
Description
|
|
223
|
-
</th>
|
|
224
|
-
</tr>
|
|
225
|
-
</thead>
|
|
226
|
-
<tbody>
|
|
227
|
-
{" "}
|
|
228
|
-
<tr className="bg-fm-surface-secondary!">
|
|
229
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
230
|
-
withAccessibility
|
|
231
|
-
</td>
|
|
232
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
233
|
-
boolean
|
|
234
|
-
</td>
|
|
235
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
236
|
-
true
|
|
237
|
-
</td>
|
|
238
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
239
|
-
Whether to wrap the icon with accessibility feature
|
|
240
|
-
</td>
|
|
241
|
-
</tr>
|
|
242
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
243
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
244
|
-
height
|
|
245
|
-
</td>
|
|
246
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
247
|
-
number | string
|
|
248
|
-
</td>
|
|
249
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
250
|
-
24
|
|
251
|
-
</td>
|
|
252
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
253
|
-
Height of the icon in pixels
|
|
254
|
-
</td>
|
|
255
|
-
</tr>
|
|
256
|
-
<tr className="border-fm-divider-tertiary border-b">
|
|
257
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
258
|
-
stroke
|
|
259
|
-
</td>
|
|
260
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
261
|
-
string
|
|
262
|
-
</td>
|
|
263
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
264
|
-
currentColor
|
|
265
|
-
</td>
|
|
266
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
267
|
-
Stroke color of the icon lines
|
|
268
|
-
</td>
|
|
269
|
-
</tr>
|
|
270
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
271
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
272
|
-
strokeWidth
|
|
273
|
-
</td>
|
|
274
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
275
|
-
number | string
|
|
276
|
-
</td>
|
|
277
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
278
|
-
1.5
|
|
279
|
-
</td>
|
|
280
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
281
|
-
Thickness of the stroke lines
|
|
282
|
-
</td>
|
|
283
|
-
</tr>
|
|
284
|
-
<tr className="border-fm-divider-tertiary border-b">
|
|
285
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
286
|
-
strokeLinecap
|
|
287
|
-
</td>
|
|
288
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
289
|
-
string
|
|
290
|
-
</td>
|
|
291
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
292
|
-
square
|
|
293
|
-
</td>
|
|
294
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
295
|
-
Style of line endings (e.g., butt, round, square)
|
|
296
|
-
</td>
|
|
297
|
-
</tr>
|
|
298
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
299
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
300
|
-
className
|
|
301
|
-
</td>
|
|
302
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
303
|
-
string
|
|
304
|
-
</td>
|
|
305
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
306
|
-
-
|
|
307
|
-
</td>
|
|
308
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
309
|
-
CSS classes for styling (use for size, color, etc.)
|
|
310
|
-
</td>
|
|
311
|
-
</tr>
|
|
312
|
-
<tr className="bg-fm-surface-secondary!">
|
|
313
|
-
<td className="text-fm-icon-info! px-6 py-4 font-mono text-sm">
|
|
314
|
-
...svgProps
|
|
315
|
-
</td>
|
|
316
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
317
|
-
SVGProps
|
|
318
|
-
</td>
|
|
319
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
320
|
-
-
|
|
321
|
-
</td>
|
|
322
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
323
|
-
All standard SVG element props supported by React
|
|
324
|
-
</td>
|
|
325
|
-
</tr>
|
|
326
|
-
</tbody>
|
|
327
|
-
</table>
|
|
328
|
-
</div>
|
|
329
|
-
</div>
|
|
330
|
-
|
|
331
|
-
{/* Size Variations */}
|
|
332
|
-
<div className="!space-y-8">
|
|
333
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
334
|
-
Size Variations
|
|
335
|
-
</h2>
|
|
336
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
|
|
337
|
-
<div className="!space-y-6">
|
|
338
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
339
|
-
<div className="!space-y-4">
|
|
340
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
341
|
-
Standard Sizes
|
|
342
|
-
</h3>
|
|
343
|
-
<div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
|
|
344
|
-
<div className="text-center">
|
|
345
|
-
<GitBranchIcon className="text-fm-icon-info !mx-auto mb-2 h-3 w-3" />
|
|
346
|
-
<span className="text-fm-tertiary text-xs">
|
|
347
|
-
12px
|
|
348
|
-
</span>
|
|
349
|
-
</div>
|
|
350
|
-
<div className="text-center">
|
|
351
|
-
<GitBranchIcon className="text-fm-icon-info !mx-auto mb-2 h-4 w-4" />
|
|
352
|
-
<span className="text-fm-tertiary text-xs">
|
|
353
|
-
16px
|
|
354
|
-
</span>
|
|
355
|
-
</div>
|
|
356
|
-
<div className="text-center">
|
|
357
|
-
<GitBranchIcon className="text-fm-icon-info !mx-auto mb-2 h-5 w-5" />
|
|
358
|
-
<span className="text-fm-tertiary text-xs">
|
|
359
|
-
20px
|
|
360
|
-
</span>
|
|
361
|
-
</div>
|
|
362
|
-
<div className="text-center">
|
|
363
|
-
<GitBranchIcon className="text-fm-icon-info !mx-auto mb-2 h-6 w-6" />
|
|
364
|
-
<span className="text-fm-tertiary text-xs">
|
|
365
|
-
24px
|
|
366
|
-
</span>
|
|
367
|
-
</div>
|
|
368
|
-
<div className="text-center">
|
|
369
|
-
<GitBranchIcon className="text-fm-icon-info !mx-auto mb-2 h-8 w-8" />
|
|
370
|
-
<span className="text-fm-tertiary text-xs">
|
|
371
|
-
32px
|
|
372
|
-
</span>
|
|
373
|
-
</div>
|
|
374
|
-
<div className="text-center">
|
|
375
|
-
<GitBranchIcon className="text-fm-icon-info !mx-auto mb-2 h-12 w-12" />
|
|
376
|
-
<span className="text-fm-tertiary text-xs">
|
|
377
|
-
48px
|
|
378
|
-
</span>
|
|
379
|
-
</div>
|
|
380
|
-
</div>
|
|
381
|
-
</div>
|
|
382
|
-
|
|
383
|
-
<div className="!space-y-4">
|
|
384
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
385
|
-
Code Example
|
|
386
|
-
</h3>
|
|
387
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
388
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
389
|
-
{`// Small (16px)
|
|
390
|
-
<GitBranchIcon className="h-4 w-4 " />
|
|
391
|
-
|
|
392
|
-
// Medium (24px)
|
|
393
|
-
<GitBranchIcon className="h-6 w-6 " />
|
|
394
|
-
|
|
395
|
-
// Large (32px)
|
|
396
|
-
<GitBranchIcon className="h-8 w-8 " />
|
|
397
|
-
|
|
398
|
-
// Custom size with props
|
|
399
|
-
<GitBranchIcon width={40} height={40} />`}
|
|
400
|
-
</pre>
|
|
401
|
-
</div>
|
|
402
|
-
</div>
|
|
403
|
-
</div>
|
|
404
|
-
</div>
|
|
405
|
-
</div>
|
|
406
|
-
</div>
|
|
407
|
-
|
|
408
|
-
{/* Color Variations */}
|
|
409
|
-
<div className="!space-y-8">
|
|
410
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
411
|
-
Color Variations
|
|
412
|
-
</h2>
|
|
413
|
-
|
|
414
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
415
|
-
{/* Semantic Colors */}
|
|
416
|
-
<div className="!space-y-4">
|
|
417
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
418
|
-
Semantic Colors
|
|
419
|
-
</h3>
|
|
420
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
421
|
-
<div className="flex items-center gap-4">
|
|
422
|
-
<GitBranchIcon className="text-fm-icon-info h-6 w-6" />
|
|
423
|
-
<div>
|
|
424
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
425
|
-
Primary
|
|
426
|
-
</div>
|
|
427
|
-
<div className="text-fm-tertiary text-xs">
|
|
428
|
-
text-fm-icon-info
|
|
429
|
-
</div>
|
|
430
|
-
</div>
|
|
431
|
-
</div>
|
|
432
|
-
<div className="flex items-center gap-4">
|
|
433
|
-
<GitBranchIcon className="text-fm-icon-info h-6 w-6" />
|
|
434
|
-
<div>
|
|
435
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
436
|
-
Active
|
|
437
|
-
</div>
|
|
438
|
-
<div className="text-fm-tertiary text-xs">
|
|
439
|
-
text-fm-icon-info
|
|
440
|
-
</div>
|
|
441
|
-
</div>
|
|
442
|
-
</div>
|
|
443
|
-
<div className="flex items-center gap-4">
|
|
444
|
-
<GitBranchIcon className="text-fm-placeholder h-6 w-6" />
|
|
445
|
-
<div>
|
|
446
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
447
|
-
Disabled
|
|
448
|
-
</div>
|
|
449
|
-
<div className="text-fm-tertiary text-xs">
|
|
450
|
-
text-fm-placeholder
|
|
451
|
-
</div>
|
|
452
|
-
</div>
|
|
453
|
-
</div>
|
|
454
|
-
<div className="flex items-center gap-4">
|
|
455
|
-
<GitBranchIcon className="text-fm-icon-info h-6 w-6" />
|
|
456
|
-
<div>
|
|
457
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
458
|
-
Info
|
|
459
|
-
</div>
|
|
460
|
-
<div className="text-fm-tertiary text-xs">
|
|
461
|
-
text-fm-icon-info
|
|
462
|
-
</div>
|
|
463
|
-
</div>
|
|
464
|
-
</div>
|
|
465
|
-
<div className="flex items-center gap-4">
|
|
466
|
-
<GitBranchIcon className="text-fm-icon-positive h-6 w-6" />
|
|
467
|
-
<div>
|
|
468
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
469
|
-
Success
|
|
470
|
-
</div>
|
|
471
|
-
<div className="text-fm-tertiary text-xs">
|
|
472
|
-
text-fm-icon-positive
|
|
473
|
-
</div>
|
|
474
|
-
</div>
|
|
475
|
-
</div>
|
|
476
|
-
<div className="flex items-center gap-4">
|
|
477
|
-
<GitBranchIcon className="text-fm-icon-warning h-6 w-6" />
|
|
478
|
-
<div>
|
|
479
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
480
|
-
Warning
|
|
481
|
-
</div>
|
|
482
|
-
<div className="text-fm-tertiary text-xs">
|
|
483
|
-
text-fm-icon-warning
|
|
484
|
-
</div>
|
|
485
|
-
</div>
|
|
486
|
-
</div>
|
|
487
|
-
<div className="flex items-center gap-4">
|
|
488
|
-
<GitBranchIcon className="text-fm-icon-negative h-6 w-6" />
|
|
489
|
-
<div>
|
|
490
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
491
|
-
Error
|
|
492
|
-
</div>
|
|
493
|
-
<div className="text-fm-tertiary text-xs">
|
|
494
|
-
text-fm-icon-negative
|
|
495
|
-
</div>
|
|
496
|
-
</div>
|
|
497
|
-
</div>
|
|
498
|
-
</div>
|
|
499
|
-
</div>
|
|
500
|
-
|
|
501
|
-
{/* Custom Colors */}
|
|
502
|
-
<div className="!space-y-4">
|
|
503
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
504
|
-
Custom Colors
|
|
505
|
-
</h3>
|
|
506
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
507
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
508
|
-
{`// Using Tailwind classes
|
|
509
|
-
<GitBranchIcon className="h-6 w-6 text-indigo-400" />
|
|
510
|
-
<GitBranchIcon className="h-6 w-6 text-cyan-500" />
|
|
511
|
-
|
|
512
|
-
// Using CSS custom properties
|
|
513
|
-
<GitBranchIcon
|
|
514
|
-
className="h-6 w-6"
|
|
515
|
-
style={{ color: 'var(--color-primary)' }}
|
|
516
|
-
/>
|
|
517
|
-
|
|
518
|
-
// Direct stroke prop
|
|
519
|
-
<GitBranchIcon
|
|
520
|
-
width={24}
|
|
521
|
-
height={24}
|
|
522
|
-
stroke="#3b82f6"
|
|
523
|
-
/>`}
|
|
524
|
-
</pre>
|
|
525
|
-
</div>
|
|
526
|
-
</div>
|
|
527
|
-
</div>
|
|
528
|
-
</div>
|
|
529
|
-
|
|
530
|
-
{/* Usage Examples */}
|
|
531
|
-
<div className="!space-y-8">
|
|
532
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
533
|
-
Usage Examples
|
|
534
|
-
</h2>
|
|
535
|
-
|
|
536
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
537
|
-
{/* Branch Creation Button */}
|
|
538
|
-
<div className="!space-y-4">
|
|
539
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
540
|
-
Create New Branch
|
|
541
|
-
</h3>
|
|
542
|
-
<div className="!space-y-4">
|
|
543
|
-
<div>
|
|
544
|
-
<button className="border-fm-icon-info/30 bg-fm-icon-info/10 text-fm-icon-info hover:bg-fm-icon-info/20 flex items-center gap-2 rounded-lg border px-4 py-2 transition-colors hover:cursor-pointer">
|
|
545
|
-
<GitBranchIcon className="h-4 w-4" />
|
|
546
|
-
Create Branch
|
|
547
|
-
</button>
|
|
548
|
-
</div>
|
|
549
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
550
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
551
|
-
{`<button className="flex items-center gap-2 bg-indigo-500/10 border border-indigo-500/30 px-4 py-2 rounded-lg">
|
|
552
|
-
<GitBranch className="h-4 w-4" />
|
|
553
|
-
Create Branch
|
|
554
|
-
</button>`}
|
|
555
|
-
</pre>
|
|
556
|
-
</div>
|
|
557
|
-
</div>
|
|
558
|
-
</div>
|
|
559
|
-
|
|
560
|
-
{/* Branch Status Row */}
|
|
561
|
-
<div className="!space-y-4">
|
|
562
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
563
|
-
Branch Status Display
|
|
564
|
-
</h3>
|
|
565
|
-
<div className="!space-y-4">
|
|
566
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
|
|
567
|
-
<div className="flex items-center gap-3">
|
|
568
|
-
<GitBranchIcon className="text-fm-icon-info h-5 w-5" />
|
|
569
|
-
<div className="flex-1">
|
|
570
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
571
|
-
Current branch:{" "}
|
|
572
|
-
<span className="text-fm-icon-info">
|
|
573
|
-
feature/user-auth
|
|
574
|
-
</span>
|
|
575
|
-
</div>
|
|
576
|
-
<div className="text-fm-tertiary text-xs">
|
|
577
|
-
3 commits ahead of main
|
|
578
|
-
</div>
|
|
579
|
-
</div>
|
|
580
|
-
</div>
|
|
581
|
-
</div>
|
|
582
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
583
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
584
|
-
{`<div className="flex items-center gap-3 p-4 border border-white/10 bg-white/5">
|
|
585
|
-
<GitBranch className="h-5 w-5 text-indigo-400" />
|
|
586
|
-
<div className="flex-1">
|
|
587
|
-
<div className="text-sm font-medium text-white">
|
|
588
|
-
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>
|
|
589
50
|
</div>
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
{/* No Branches State */}
|
|
599
|
-
<div className="!space-y-4">
|
|
600
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
601
|
-
No Branches Available
|
|
602
|
-
</h3>
|
|
603
|
-
<div className="!space-y-4">
|
|
604
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex flex-col items-center justify-center rounded-lg border p-8">
|
|
605
|
-
<GitBranchIcon className="text-fm-icon-active/30 mb-4 h-12 w-12" />
|
|
606
|
-
<h4 className="text-fm-icon-active!/80 mb-2 text-lg font-medium">
|
|
607
|
-
No feature branches found
|
|
608
|
-
</h4>
|
|
609
|
-
<p className="text-fm-placeholder! text-center text-sm">
|
|
610
|
-
Create your first branch to start working on new
|
|
611
|
-
features or bug fixes.
|
|
612
|
-
</p>
|
|
613
|
-
<button className="border-fm-icon-info/30 bg-fm-icon-info/20 text-fm-icon-info hover:bg-fm-icon-info/30 mt-4 flex items-center gap-2 rounded-lg border px-4 py-2 text-sm transition-colors hover:cursor-pointer">
|
|
614
|
-
<GitBranchIcon className="h-4 w-4" />
|
|
615
|
-
Create First Branch
|
|
616
|
-
</button>
|
|
617
|
-
</div>
|
|
618
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
619
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
620
|
-
{`<div className="flex flex-col items-center p-8 border border-white/10 bg-white/5">
|
|
621
|
-
<GitBranch className="h-12 w-12 text-white/30 mb-4" />
|
|
622
|
-
<h4 className="text-lg font-medium text-white/80 mb-2">
|
|
623
|
-
No feature branches found
|
|
624
|
-
</h4>
|
|
625
|
-
<p className="text-sm text-white/50 text-center">
|
|
626
|
-
Create your first branch to start working on new features or bug fixes.
|
|
627
|
-
</p>
|
|
628
|
-
<button className="mt-4 flex items-center gap-2 text-sm">
|
|
629
|
-
<GitBranch className="h-4 w-4" />
|
|
630
|
-
Create First Branch
|
|
631
|
-
</button>
|
|
632
|
-
</div>`}
|
|
633
|
-
</pre>
|
|
634
|
-
</div>
|
|
635
|
-
</div>
|
|
636
|
-
</div>
|
|
637
|
-
|
|
638
|
-
{/* Branch Merge Request */}
|
|
639
|
-
<div className="!space-y-4">
|
|
640
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
641
|
-
Merge Request Status
|
|
642
|
-
</h3>
|
|
643
|
-
<div className="!space-y-4">
|
|
644
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
|
|
645
|
-
<div className="flex items-center gap-3">
|
|
646
|
-
<GitBranchIcon className="text-fm-icon-info h-5 w-5" />
|
|
647
|
-
<div className="flex-1">
|
|
648
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
649
|
-
Ready to merge:{" "}
|
|
650
|
-
<span className="text-fm-icon-info">
|
|
651
|
-
feature/payment-gateway
|
|
652
|
-
</span>
|
|
653
|
-
</div>
|
|
654
|
-
<div className="text-fm-tertiary text-xs">
|
|
655
|
-
All checks passed • 2 approvals
|
|
656
|
-
</div>
|
|
657
|
-
</div>
|
|
658
|
-
<button className="border-fm-icon-positive/30 bg-fm-icon-positive/10 text-fm-icon-positive hover:bg-fm-icon-positive/20 rounded-lg border px-3 py-1 text-xs hover:cursor-pointer">
|
|
659
|
-
Merge
|
|
660
|
-
</button>
|
|
661
|
-
</div>
|
|
662
|
-
</div>
|
|
663
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
664
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
665
|
-
{`<div className="flex items-center gap-3 p-4 border border-white/10 bg-white/5">
|
|
666
|
-
<GitBranch className="h-5 w-5 text-indigo-400" />
|
|
667
|
-
<div className="flex-1">
|
|
668
|
-
<div className="text-sm font-medium text-white">
|
|
669
|
-
Ready to merge: feature/payment-gateway
|
|
670
|
-
</div>
|
|
671
|
-
<div className="text-xs text-white/60">All checks passed • 2 approvals</div>
|
|
672
|
-
</div>
|
|
673
|
-
<button className="px-3 py-1 text-xs bg-green-500/10 border border-green-500/30">
|
|
674
|
-
Merge
|
|
675
|
-
</button>
|
|
676
|
-
</div>`}
|
|
677
|
-
</pre>
|
|
678
|
-
</div>
|
|
679
|
-
</div>
|
|
680
|
-
</div>
|
|
681
|
-
</div>
|
|
682
|
-
</div>
|
|
683
|
-
|
|
684
|
-
{/* Interactive States */}
|
|
685
|
-
<div className="!space-y-8">
|
|
686
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
687
|
-
Interactive States & Animations
|
|
688
|
-
</h2>
|
|
689
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
690
|
-
<div className="!space-y-4">
|
|
691
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
692
|
-
Hover & Animation Effects
|
|
693
|
-
</h3>
|
|
694
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
695
|
-
<div className="flex items-center gap-4">
|
|
696
|
-
<GitBranchIcon className="text-fm-tertiary hover:text-fm-icon-info h-6 w-6 transition-colors" />
|
|
697
|
-
<div>
|
|
698
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
699
|
-
Color Change
|
|
700
|
-
</div>
|
|
701
|
-
<div className="text-fm-tertiary text-xs">
|
|
702
|
-
Hover to see effect
|
|
703
|
-
</div>
|
|
704
|
-
</div>
|
|
705
|
-
</div>
|
|
706
|
-
<div className="flex items-center gap-4">
|
|
707
|
-
<GitBranchIcon className="text-fm-icon-active h-6 w-6 transition-transform hover:scale-110" />
|
|
708
|
-
<div>
|
|
709
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
710
|
-
Scale Up
|
|
711
|
-
</div>
|
|
712
|
-
<div className="text-fm-tertiary text-xs">
|
|
713
|
-
Scale on hover
|
|
714
|
-
</div>
|
|
715
|
-
</div>
|
|
716
|
-
</div>
|
|
717
|
-
<div className="flex items-center gap-4">
|
|
718
|
-
<GitBranchIcon className="animate-search-pulse text-fm-icon-info h-6 w-6" />
|
|
719
|
-
<div>
|
|
720
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
721
|
-
Search Pulse
|
|
722
|
-
</div>
|
|
723
|
-
<div className="text-fm-tertiary text-xs">
|
|
724
|
-
Continuous animation
|
|
725
|
-
</div>
|
|
726
|
-
</div>
|
|
727
|
-
</div>
|
|
728
|
-
<div className="flex items-center gap-4">
|
|
729
|
-
<GitBranchIcon className="animate-document-slide text-fm-icon-info h-6 w-6" />
|
|
730
|
-
<div>
|
|
731
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
732
|
-
Document Slide
|
|
733
|
-
</div>
|
|
734
|
-
<div className="text-fm-tertiary text-xs">
|
|
735
|
-
Subtle movement
|
|
736
|
-
</div>
|
|
737
|
-
</div>
|
|
738
|
-
</div>
|
|
739
|
-
</div>
|
|
740
|
-
</div>
|
|
741
|
-
|
|
742
|
-
<div className="!space-y-4">
|
|
743
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
744
|
-
State Examples
|
|
745
|
-
</h3>
|
|
746
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
747
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
748
|
-
{`// Color change on hover
|
|
749
|
-
<GitBranchIcon className="h-6 w-6 text-white/60 transition-colors hover:text-indigo-400 " />
|
|
750
|
-
|
|
751
|
-
// Scale up on hover
|
|
752
|
-
<GitBranchIcon className="h-6 w-6 text-white transition-transform hover:scale-110 " />
|
|
753
|
-
|
|
754
|
-
// Loading/searching state
|
|
755
|
-
<GitBranchIcon className="h-6 w-6 animate-pulse text-indigo-400 " />
|
|
756
|
-
|
|
757
|
-
// Active search state
|
|
758
|
-
<GitBranchIcon className="h-6 w-6 text-cyan-400 animate-search-pulse " />
|
|
759
|
-
|
|
760
|
-
// Disabled state
|
|
761
|
-
<GitBranchIcon className="h-6 w-6 text-gray-400 opacity-50 " />`}
|
|
762
|
-
</pre>
|
|
763
|
-
</div>
|
|
764
|
-
</div>
|
|
765
|
-
</div>
|
|
766
|
-
</div>
|
|
767
|
-
|
|
768
|
-
{/* Accessibility */}
|
|
769
|
-
<div className="!space-y-8">
|
|
770
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
771
|
-
Accessibility Features
|
|
772
|
-
</h2>
|
|
773
|
-
|
|
774
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
775
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
776
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
777
|
-
✅ Built-in Features
|
|
778
|
-
</h3>
|
|
779
|
-
<ul className="text-fm-secondary! !space-y-2 text-sm">
|
|
780
|
-
<li className="text-fm-secondary!">
|
|
781
|
-
Uses Radix UI AccessibleIcon wrapper
|
|
782
|
-
</li>
|
|
783
|
-
<li className="text-fm-secondary!">
|
|
784
|
-
Provides screen reader label "Git branch icon"
|
|
785
|
-
</li>
|
|
786
|
-
<li className="text-fm-secondary!">
|
|
787
|
-
Maintains proper color contrast ratios
|
|
788
|
-
</li>
|
|
789
|
-
<li className="text-fm-secondary!">
|
|
790
|
-
Scales with user's font size preferences
|
|
791
|
-
</li>
|
|
792
|
-
</ul>
|
|
793
|
-
</div>
|
|
794
|
-
|
|
795
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
796
|
-
<h3 className="text-fm-icon-info! text-lg font-semibold">
|
|
797
|
-
💡 Best Practices
|
|
798
|
-
</h3>
|
|
799
|
-
<ul className="text-fm-secondary !space-y-2 text-sm">
|
|
800
|
-
<li className="text-fm-secondary!">
|
|
801
|
-
Always provide descriptive labels for branch-related
|
|
802
|
-
actions
|
|
803
|
-
</li>
|
|
804
|
-
<li className="text-fm-secondary!">
|
|
805
|
-
Use consistent placement in version control interfaces
|
|
806
|
-
</li>
|
|
807
|
-
<li className="text-fm-secondary!">
|
|
808
|
-
Ensure sufficient click/touch target sizes
|
|
809
|
-
</li>
|
|
810
|
-
<li className="text-fm-secondary!">
|
|
811
|
-
Add focus states for keyboard navigation
|
|
812
|
-
</li>
|
|
813
|
-
<li className="text-fm-secondary!">
|
|
814
|
-
Consider motion sensitivity for branching animations
|
|
815
|
-
</li>
|
|
816
|
-
</ul>
|
|
817
|
-
</div>
|
|
818
|
-
</div>
|
|
819
|
-
|
|
820
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
|
|
821
|
-
<h3 className="text-fm-secondary-600! mb-4 text-lg font-semibold">
|
|
822
|
-
Custom Accessibility Implementation
|
|
823
|
-
</h3>
|
|
824
|
-
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
825
|
-
{/* Code Example Block */}
|
|
826
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
827
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
828
|
-
{`// Branch toggle button with ARIA
|
|
829
|
-
<button
|
|
830
|
-
aria-label="Toggle git branch panel"
|
|
831
|
-
aria-pressed={branchOpen}
|
|
832
|
-
className="flex items-center gap-2 p-2"
|
|
833
|
-
>
|
|
834
|
-
<GitBranchIcon className="h-4 w-4" />
|
|
835
|
-
<span className="sr-only">Open Branch Panel</span>
|
|
836
|
-
</button>
|
|
837
|
-
|
|
838
|
-
// Branch group with description
|
|
839
|
-
<fieldset aria-labelledby="branch-heading" className="space-y-2">
|
|
840
|
-
<legend id="branch-heading" className="sr-only">Branch Options</legend>
|
|
841
|
-
<div>
|
|
842
|
-
<label className="inline-flex items-center gap-2">
|
|
843
|
-
<input type="checkbox" aria-describedby="branch-desc" />
|
|
844
|
-
Feature Branch
|
|
845
|
-
</label>
|
|
846
|
-
</div>
|
|
847
|
-
<div>
|
|
848
|
-
<label className="inline-flex items-center gap-2">
|
|
849
|
-
<input type="checkbox" />
|
|
850
|
-
Main Branch
|
|
851
|
-
</label>
|
|
852
|
-
</div>
|
|
853
|
-
</fieldset>
|
|
854
|
-
<p id="branch-desc" className="sr-only">
|
|
855
|
-
Choose one or more branches to compare or switch context.
|
|
856
|
-
</p>`}
|
|
857
|
-
</pre>
|
|
858
|
-
</div>
|
|
859
|
-
|
|
860
|
-
{/* Accessibility Note */}
|
|
861
|
-
<div className="!space-y-4">
|
|
862
|
-
<p className="text-fm-secondary! text-sm">
|
|
863
|
-
When using <code>GitBranchIcon</code> for toggling or
|
|
864
|
-
displaying branch-related panels, ensure ARIA labels
|
|
865
|
-
clearly explain what will be shown or changed. Group
|
|
866
|
-
options with semantic roles for screen reader clarity.
|
|
867
|
-
</p>
|
|
868
|
-
<div className="border-fm-icon-info/20 bg-fm-icon-info/10 rounded-lg border p-4">
|
|
869
|
-
<div className="text-fm-icon-info flex items-center gap-2 text-sm">
|
|
870
|
-
<GitBranchIcon className="h-4 w-4" />
|
|
871
|
-
<span>
|
|
872
|
-
Use <code>aria-pressed</code> or{" "}
|
|
873
|
-
<code>aria-expanded</code> for toggles and{" "}
|
|
874
|
-
<code>legend</code>/<code>fieldset</code> for
|
|
875
|
-
grouped version control options.
|
|
876
|
-
</span>
|
|
877
|
-
</div>
|
|
878
|
-
</div>
|
|
879
|
-
</div>
|
|
880
|
-
</div>
|
|
881
|
-
</div>
|
|
882
|
-
</div>
|
|
883
|
-
|
|
884
|
-
{/* Related Icons */}
|
|
885
|
-
<div className="!space-y-8">
|
|
886
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
887
|
-
Related Icons
|
|
888
|
-
</h2>
|
|
889
|
-
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
890
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
891
|
-
<div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
892
|
-
<span className="text-2xl">🔍</span>
|
|
893
|
-
</div>
|
|
894
|
-
<div>
|
|
895
|
-
<div className="text-fm-icon-active font-medium">
|
|
896
|
-
SearchIcon
|
|
897
|
-
</div>
|
|
898
|
-
<div className="text-fm-tertiary text-xs">
|
|
899
|
-
General search
|
|
900
|
-
</div>
|
|
901
|
-
</div>
|
|
902
|
-
</div>
|
|
903
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
904
|
-
<div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
905
|
-
<span className="text-2xl">📈</span>
|
|
906
|
-
</div>
|
|
907
|
-
<div>
|
|
908
|
-
<div className="text-fm-icon-active font-medium">
|
|
909
|
-
TrendingUpIcon
|
|
910
|
-
</div>
|
|
911
|
-
<div className="text-fm-tertiary text-xs">
|
|
912
|
-
Growth metrics
|
|
913
|
-
</div>
|
|
914
|
-
</div>
|
|
915
|
-
</div>
|
|
916
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
917
|
-
<div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
918
|
-
<span className="text-2xl">🗂️</span>
|
|
919
|
-
</div>
|
|
920
|
-
<div>
|
|
921
|
-
<div className="text-fm-icon-active font-medium">
|
|
922
|
-
FolderIcon
|
|
923
|
-
</div>
|
|
924
|
-
<div className="text-fm-tertiary text-xs">
|
|
925
|
-
File browsing
|
|
926
|
-
</div>
|
|
927
|
-
</div>
|
|
928
|
-
</div>
|
|
929
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
930
|
-
<div className="bg-fm-icon-positive/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
931
|
-
<span className="text-2xl">💾</span>
|
|
932
|
-
</div>
|
|
933
|
-
<div>
|
|
934
|
-
<div className="text-fm-icon-active font-medium">
|
|
935
|
-
SaveIcon
|
|
936
|
-
</div>
|
|
937
|
-
<div className="text-fm-tertiary text-xs">
|
|
938
|
-
Save changes
|
|
939
|
-
</div>
|
|
940
|
-
</div>
|
|
941
|
-
</div>
|
|
942
|
-
</div>
|
|
943
|
-
</div>
|
|
944
|
-
</div>
|
|
945
|
-
|
|
946
|
-
{/* Footer */}
|
|
947
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
|
|
948
|
-
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
949
|
-
<div className="!space-y-4 text-center">
|
|
950
|
-
<p className="text-fm-tertiary!">
|
|
951
|
-
FilterBarRowIcon is part of the Aural UI icon library, built
|
|
952
|
-
for document search, content discovery, and page navigation
|
|
953
|
-
functionality.
|
|
954
|
-
</p>
|
|
955
|
-
<p className="text-fm-placeholder! text-sm">
|
|
956
|
-
All icons use Radix UI's AccessibleIcon for screen reader
|
|
957
|
-
compatibility and follow WCAG guidelines for search
|
|
958
|
-
interfaces.
|
|
959
|
-
</p>
|
|
960
|
-
</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>
|
|
961
59
|
</div>
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
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
|
+
/>
|
|
965
89
|
),
|
|
966
90
|
},
|
|
967
91
|
},
|
|
968
92
|
tags: ["autodocs"],
|
|
969
93
|
argTypes: {
|
|
970
|
-
|
|
971
|
-
control:
|
|
972
|
-
description: "
|
|
94
|
+
className: {
|
|
95
|
+
control: "text",
|
|
96
|
+
description: "CSS classes including color token",
|
|
973
97
|
},
|
|
974
98
|
withAccessibility: {
|
|
975
99
|
control: "boolean",
|
|
976
|
-
description: "
|
|
977
|
-
},
|
|
978
|
-
height: {
|
|
979
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
980
|
-
description: "Height of the icon in pixels",
|
|
981
|
-
},
|
|
982
|
-
stroke: {
|
|
983
|
-
control: "color",
|
|
984
|
-
description: "Stroke color of the icon lines",
|
|
985
|
-
},
|
|
986
|
-
strokeWidth: {
|
|
987
|
-
control: { type: "range", min: 1, max: 4, step: 0.5 },
|
|
988
|
-
description: "Stroke width of the icon",
|
|
989
|
-
},
|
|
990
|
-
strokeLinecap: {
|
|
991
|
-
control: "select",
|
|
992
|
-
options: ["butt", "round", "square"],
|
|
993
|
-
description: "Style of line endings",
|
|
994
|
-
},
|
|
995
|
-
className: {
|
|
996
|
-
control: "text",
|
|
997
|
-
description: "CSS classes for styling (use for overrides)",
|
|
100
|
+
description: "Wrap with accessibility label",
|
|
998
101
|
},
|
|
999
102
|
},
|
|
1000
103
|
}
|
|
@@ -1002,255 +105,82 @@ function BranchButton() {
|
|
|
1002
105
|
export default meta
|
|
1003
106
|
type Story = StoryObj<typeof GitBranchIcon>
|
|
1004
107
|
|
|
1005
|
-
// Story parameters for consistent dark theme
|
|
1006
|
-
const storyParameters = {
|
|
1007
|
-
backgrounds: {
|
|
1008
|
-
default: "dark",
|
|
1009
|
-
values: [
|
|
1010
|
-
{ name: "dark", value: "var(--color-fm-surface-primary)" },
|
|
1011
|
-
{ name: "darker", value: "var(--color-fm-neutral-0)" },
|
|
1012
|
-
],
|
|
1013
|
-
},
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
108
|
export const Default: Story = {
|
|
1017
109
|
args: {
|
|
1018
|
-
|
|
1019
|
-
height: 24,
|
|
1020
|
-
className: "text-fm-icon-info ",
|
|
110
|
+
className: "h-6 w-6 text-fm-icon-active",
|
|
1021
111
|
withAccessibility: true,
|
|
1022
112
|
},
|
|
1023
|
-
parameters: storyParameters,
|
|
1024
113
|
render: (args) => (
|
|
1025
|
-
<
|
|
114
|
+
<IconDefaultCanvas>
|
|
1026
115
|
<GitBranchIcon {...args} />
|
|
1027
|
-
</
|
|
116
|
+
</IconDefaultCanvas>
|
|
1028
117
|
),
|
|
1029
118
|
}
|
|
1030
119
|
|
|
1031
120
|
export const SizeVariations: Story = {
|
|
1032
|
-
|
|
1033
|
-
...storyParameters,
|
|
1034
|
-
docs: {
|
|
1035
|
-
description: {
|
|
1036
|
-
story:
|
|
1037
|
-
"GitBranchIcon in different sizes, from small search inputs to large interface elements.",
|
|
1038
|
-
},
|
|
1039
|
-
},
|
|
1040
|
-
},
|
|
1041
|
-
render: () => (
|
|
1042
|
-
<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">
|
|
1043
|
-
<div className="text-center">
|
|
1044
|
-
<GitBranchIcon className="text-fm-icon-info !mx-auto mb-2 h-3 w-3" />
|
|
1045
|
-
<span className="text-fm-tertiary text-xs">12px</span>
|
|
1046
|
-
</div>
|
|
1047
|
-
<div className="text-center">
|
|
1048
|
-
<GitBranchIcon className="text-fm-icon-info !mx-auto mb-2 h-4 w-4" />
|
|
1049
|
-
<span className="text-fm-tertiary text-xs">16px</span>
|
|
1050
|
-
</div>
|
|
1051
|
-
<div className="text-center">
|
|
1052
|
-
<GitBranchIcon className="text-fm-icon-info !mx-auto mb-2 h-5 w-5" />
|
|
1053
|
-
<span className="text-fm-tertiary text-xs">20px</span>
|
|
1054
|
-
</div>
|
|
1055
|
-
<div className="text-center">
|
|
1056
|
-
<GitBranchIcon className="text-fm-icon-info !mx-auto mb-2 h-6 w-6" />
|
|
1057
|
-
<span className="text-fm-tertiary text-xs">24px</span>
|
|
1058
|
-
</div>
|
|
1059
|
-
<div className="text-center">
|
|
1060
|
-
<GitBranchIcon className="text-fm-icon-info !mx-auto mb-2 h-8 w-8" />
|
|
1061
|
-
<span className="text-fm-tertiary text-xs">32px</span>
|
|
1062
|
-
</div>
|
|
1063
|
-
<div className="text-center">
|
|
1064
|
-
<GitBranchIcon className="text-fm-icon-info !mx-auto mb-2 h-12 w-12" />
|
|
1065
|
-
<span className="text-fm-tertiary text-xs">48px</span>
|
|
1066
|
-
</div>
|
|
1067
|
-
</div>
|
|
1068
|
-
),
|
|
121
|
+
render: () => <IconSizeVariations icon={GitBranchIcon} />,
|
|
1069
122
|
}
|
|
1070
123
|
|
|
1071
124
|
export const ColorVariations: Story = {
|
|
1072
|
-
|
|
1073
|
-
...storyParameters,
|
|
1074
|
-
docs: {
|
|
1075
|
-
description: {
|
|
1076
|
-
story:
|
|
1077
|
-
"GitBranchIcon in different colors for various search states and contexts.",
|
|
1078
|
-
},
|
|
1079
|
-
},
|
|
1080
|
-
},
|
|
1081
|
-
render: () => (
|
|
1082
|
-
<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">
|
|
1083
|
-
<div className="text-center">
|
|
1084
|
-
<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">
|
|
1085
|
-
<GitBranchIcon className="text-fm-icon-info h-8 w-8" />
|
|
1086
|
-
</div>
|
|
1087
|
-
<div className="text-fm-icon-active text-sm font-medium">Primary</div>
|
|
1088
|
-
<div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
|
|
1089
|
-
</div>
|
|
1090
|
-
<div className="text-center">
|
|
1091
|
-
<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">
|
|
1092
|
-
<GitBranchIcon className="text-fm-icon-info h-8 w-8" />
|
|
1093
|
-
</div>
|
|
1094
|
-
<div className="text-fm-icon-active text-sm font-medium">Active</div>
|
|
1095
|
-
<div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
|
|
1096
|
-
</div>
|
|
1097
|
-
<div className="text-center">
|
|
1098
|
-
<div className="border-fm-divider-primary bg-fm-surface-tertiary/20 !mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border">
|
|
1099
|
-
<GitBranchIcon className="text-fm-placeholder h-8 w-8" />
|
|
1100
|
-
</div>
|
|
1101
|
-
<div className="text-fm-icon-active text-sm font-medium">Disabled</div>
|
|
1102
|
-
<div className="text-fm-placeholder text-xs">text-fm-placeholder</div>
|
|
1103
|
-
</div>
|
|
1104
|
-
<div className="text-center">
|
|
1105
|
-
<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">
|
|
1106
|
-
<GitBranchIcon className="text-fm-icon-info h-8 w-8" />
|
|
1107
|
-
</div>
|
|
1108
|
-
<div className="text-fm-icon-active text-sm font-medium">Info</div>
|
|
1109
|
-
<div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
|
|
1110
|
-
</div>
|
|
1111
|
-
</div>
|
|
1112
|
-
),
|
|
125
|
+
render: () => <IconColorVariations icon={GitBranchIcon} />,
|
|
1113
126
|
}
|
|
1114
127
|
|
|
1115
128
|
export const UsageExamples: Story = {
|
|
1116
|
-
parameters: {
|
|
1117
|
-
...storyParameters,
|
|
1118
|
-
docs: {
|
|
1119
|
-
description: {
|
|
1120
|
-
story:
|
|
1121
|
-
"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.",
|
|
1122
|
-
},
|
|
1123
|
-
},
|
|
1124
|
-
},
|
|
1125
129
|
render: () => (
|
|
1126
|
-
<
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
</h3>
|
|
1132
|
-
<div className="flex gap-4">
|
|
1133
|
-
<button className="border-fm-icon-info/30 bg-fm-icon-info/15 text-fm-icon-info hover:bg-fm-icon-info/25 flex items-center gap-2 rounded-lg border px-4 py-2 transition hover:cursor-pointer">
|
|
1134
|
-
<GitBranchIcon className="h-4 w-4" />
|
|
1135
|
-
Create Branch
|
|
1136
|
-
</button>
|
|
1137
|
-
<button className="border-fm-icon-info/30 bg-fm-icon-info/15 text-fm-icon-info hover:bg-fm-icon-info/25 flex items-center gap-2 rounded-lg border px-4 py-2 transition hover:cursor-pointer">
|
|
1138
|
-
<GitBranchIcon className="h-4 w-4" />
|
|
1139
|
-
Checkout
|
|
1140
|
-
</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>
|
|
1141
135
|
</div>
|
|
1142
|
-
</
|
|
136
|
+
</IconUsageSection>
|
|
1143
137
|
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
<h3 className="text-fm-icon-active text-sm font-medium">
|
|
1147
|
-
Recent Branches
|
|
1148
|
-
</h3>
|
|
1149
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary space-y-3 rounded-lg border 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">
|
|
1150
140
|
{[
|
|
1151
|
-
{
|
|
1152
|
-
{
|
|
1153
|
-
{
|
|
1154
|
-
].map((branch,
|
|
141
|
+
{ branch: "main", status: "active" },
|
|
142
|
+
{ branch: "feature/audio", status: "active" },
|
|
143
|
+
{ branch: "fix/player", status: "inactive" },
|
|
144
|
+
].map(({ branch, status }) => (
|
|
1155
145
|
<div
|
|
1156
|
-
key={
|
|
1157
|
-
className="border-fm-divider-secondary
|
|
146
|
+
key={branch}
|
|
147
|
+
className="border-fm-divider-secondary flex items-center gap-3 border-b px-4 py-3 last:border-b-0"
|
|
1158
148
|
>
|
|
1159
|
-
<GitBranchIcon
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
Updated {branch.updated}
|
|
1166
|
-
</div>
|
|
1167
|
-
</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>
|
|
1168
155
|
</div>
|
|
1169
156
|
))}
|
|
1170
157
|
</div>
|
|
1171
|
-
</
|
|
1172
|
-
|
|
1173
|
-
{/* Management Actions */}
|
|
1174
|
-
<div className="space-y-2">
|
|
1175
|
-
<h3 className="text-fm-icon-active text-sm font-medium">
|
|
1176
|
-
Manage Branches
|
|
1177
|
-
</h3>
|
|
1178
|
-
<div className="flex gap-4">
|
|
1179
|
-
<button className="border-fm-icon-warning/30 bg-fm-icon-warning/15 text-fm-icon-warning hover:bg-fm-icon-warning/25 flex items-center gap-2 rounded-lg border px-4 py-2 transition hover:cursor-pointer">
|
|
1180
|
-
<GitBranchIcon className="h-4 w-4" />
|
|
1181
|
-
Rename
|
|
1182
|
-
</button>
|
|
1183
|
-
<button className="border-fm-icon-negative/30 bg-fm-icon-negative/15 text-fm-icon-negative hover:bg-fm-icon-negative/25 flex items-center gap-2 rounded-lg border px-4 py-2 transition hover:cursor-pointer">
|
|
1184
|
-
<GitBranchIcon className="h-4 w-4" />
|
|
1185
|
-
Delete
|
|
1186
|
-
</button>
|
|
1187
|
-
</div>
|
|
1188
|
-
</div>
|
|
1189
|
-
</div>
|
|
1190
|
-
),
|
|
1191
|
-
}
|
|
1192
|
-
|
|
1193
|
-
export const InteractiveStates: Story = {
|
|
1194
|
-
parameters: {
|
|
1195
|
-
...storyParameters,
|
|
1196
|
-
docs: {
|
|
1197
|
-
description: {
|
|
1198
|
-
story:
|
|
1199
|
-
"Interactive states showing hover effects, animations, and different search states.",
|
|
1200
|
-
},
|
|
1201
|
-
},
|
|
1202
|
-
},
|
|
1203
|
-
render: () => (
|
|
1204
|
-
<div className="from-fm-surface-primary to-fm-surface-secondary min-h-dvh space-y-8 rounded-lg bg-linear-to-br p-8">
|
|
1205
|
-
<div className="space-y-4">
|
|
1206
|
-
<h3 className="text-fm-secondary text-sm font-medium">
|
|
1207
|
-
Interactive States & Motion
|
|
1208
|
-
</h3>
|
|
1209
|
-
<div className="flex gap-8">
|
|
1210
|
-
{/* Hover color transition */}
|
|
1211
|
-
<div className="flex flex-col items-center gap-2">
|
|
1212
|
-
<GitBranchIcon className="text-fm-tertiary hover:text-fm-icon-info h-8 w-8 transition-colors" />
|
|
1213
|
-
<span className="text-fm-tertiary text-xs">Hover to Highlight</span>
|
|
1214
|
-
</div>
|
|
1215
|
-
|
|
1216
|
-
{/* Hover scale up */}
|
|
1217
|
-
<div className="flex flex-col items-center gap-2">
|
|
1218
|
-
<GitBranchIcon className="text-fm-icon-active h-8 w-8 transition-transform duration-200 hover:scale-110" />
|
|
1219
|
-
<span className="text-fm-tertiary text-xs">Scale on Hover</span>
|
|
1220
|
-
</div>
|
|
158
|
+
</IconUsageSection>
|
|
1221
159
|
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
<
|
|
1226
|
-
|
|
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
|
+
))}
|
|
1227
170
|
</div>
|
|
1228
|
-
</
|
|
1229
|
-
</
|
|
171
|
+
</IconUsageSection>
|
|
172
|
+
</IconUsageCanvas>
|
|
1230
173
|
),
|
|
1231
174
|
}
|
|
1232
175
|
|
|
1233
176
|
export const Playground: Story = {
|
|
1234
|
-
parameters: {
|
|
1235
|
-
...storyParameters,
|
|
1236
|
-
docs: {
|
|
1237
|
-
description: {
|
|
1238
|
-
story:
|
|
1239
|
-
"Interactive playground to experiment with different GitBranchIcon configurations.",
|
|
1240
|
-
},
|
|
1241
|
-
},
|
|
1242
|
-
},
|
|
1243
177
|
args: {
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
className: "text-fm-icon-info ",
|
|
1247
|
-
strokeLinecap: "square",
|
|
178
|
+
className: "h-8 w-8 text-fm-icon-active",
|
|
179
|
+
withAccessibility: true,
|
|
1248
180
|
},
|
|
1249
181
|
render: (args) => (
|
|
1250
|
-
<
|
|
1251
|
-
<
|
|
1252
|
-
|
|
1253
|
-
</div>
|
|
1254
|
-
</div>
|
|
182
|
+
<IconPlaygroundCanvas>
|
|
183
|
+
<GitBranchIcon {...args} />
|
|
184
|
+
</IconPlaygroundCanvas>
|
|
1255
185
|
),
|
|
1256
186
|
}
|