aural-ui 4.0.1 → 4.1.0

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