aural-ui 4.0.1 → 4.2.0

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