aural-ui 4.0.1 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/dist/components/aspect-ratio/AspectRatio.stories.tsx +290 -1228
- package/dist/components/avatar/Avatar.stories.tsx +219 -235
- package/dist/components/badge/Badge.stories.tsx +379 -116
- package/dist/components/banner/Banner.stories.tsx +445 -391
- package/dist/components/breadcrumb/Breadcrumb.stories.tsx +453 -199
- package/dist/components/button/Button.stories.tsx +585 -230
- package/dist/components/card/Card.stories.tsx +619 -301
- package/dist/components/char-count/CharCount.stories.tsx +350 -248
- package/dist/components/checkbox/Checkbox.stories.tsx +309 -167
- package/dist/components/chip/Chip.stories.tsx +362 -168
- package/dist/components/circular-loader/CircularLoader.stories.tsx +221 -636
- package/dist/components/clamp-lines/ClampLines.stories.tsx +246 -117
- package/dist/components/collapsible/Collapsible.stories.tsx +391 -252
- package/dist/components/command/Command.stories.tsx +530 -867
- package/dist/components/dialog/Dialog.stories.tsx +501 -950
- package/dist/components/divider/Divider.stories.tsx +264 -527
- package/dist/components/dot-loader/DotLoader.stories.tsx +256 -257
- package/dist/components/drawer/Drawer.stories.tsx +659 -1023
- package/dist/components/dropdown/Dropdown.stories.tsx +643 -1028
- package/dist/components/form/Form.stories.tsx +560 -274
- package/dist/components/helper-text/HelperText.stories.tsx +199 -200
- package/dist/components/hover-card/HoverCard.stories.tsx +318 -1254
- package/dist/components/icon-button/IconButton.stories.tsx +837 -194
- package/dist/components/if-else/if-else.stories.tsx +370 -83
- package/dist/components/input/Input.stories.tsx +436 -368
- package/dist/components/label/Label.stories.tsx +156 -154
- package/dist/components/list/List.stories.tsx +484 -835
- package/dist/components/marquee/Marquee.stories.tsx +356 -712
- package/dist/components/otp-inputs/OtpInputs.stories.tsx +352 -422
- package/dist/components/overlay/Overlay.stories.tsx +452 -824
- package/dist/components/pagination/Pagination.stories.tsx +721 -210
- package/dist/components/popover/Popover.stories.tsx +481 -896
- package/dist/components/radio/Radio.stories.tsx +432 -124
- package/dist/components/resizable/Resizable.stories.tsx +495 -799
- package/dist/components/scroll-area/ScrollArea.stories.tsx +383 -1059
- package/dist/components/search/Search.stories.tsx +312 -595
- package/dist/components/select/Select.stories.tsx +684 -789
- package/dist/components/sheet/Sheet.stories.tsx +671 -950
- package/dist/components/skelton/Skelton.stories.tsx +230 -764
- package/dist/components/slider/Slider.stories.tsx +383 -760
- package/dist/components/stepper/Stepper.stories.tsx +371 -514
- package/dist/components/switch/Switch.stories.tsx +461 -208
- package/dist/components/switch-case/SwitchCase.stories.tsx +367 -188
- package/dist/components/table/Table.stories.tsx +770 -916
- package/dist/components/tabs/Tabs.stories.tsx +458 -1455
- package/dist/components/tag/Tag.stories.tsx +714 -542
- package/dist/components/textarea/TextArea.stories.tsx +621 -562
- package/dist/components/thumbnail-tags/ThumbnailTags.stories.tsx +228 -154
- package/dist/components/toast/Toast.stories.tsx +452 -1339
- package/dist/components/toggle/Toggle.stories.tsx +488 -931
- package/dist/components/tooltip/Tooltip.stories.tsx +344 -1388
- package/dist/components/typography/Typography.stories.tsx +406 -89
- package/dist/hooks/use-change-state/UseChangeState.stories.tsx +309 -606
- package/dist/hooks/use-previous/UsePrevious.stories.tsx +367 -917
- package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +639 -867
- package/dist/icons/Icons.stories.tsx +0 -12
- package/dist/icons/ai-avatar-icon/AiAvatarIcon.stories.tsx +223 -1060
- package/dist/icons/alert-icon/AlertIcon.stories.tsx +106 -968
- package/dist/icons/all-icons.tsx +37 -16
- package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +137 -1010
- package/dist/icons/apple-logo-icon/AppleLogoIcon.stories.tsx +145 -935
- package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +132 -1046
- package/dist/icons/arrow-corner-up-left-icon/ArrowCornerUpLeftIcon.stories.tsx +134 -986
- package/dist/icons/arrow-corner-up-right-icon/ArrowCornerUpRightIcon.stories.tsx +135 -1028
- package/dist/icons/arrow-left-icon/ArrowLeftIcon.stories.tsx +133 -971
- package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +145 -1123
- package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +143 -1252
- package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +123 -632
- package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +141 -1223
- package/dist/icons/backward-ten-seconds-icon/BackwardTenSecondsIcon.stories.tsx +164 -1018
- package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +121 -1236
- package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +121 -1213
- package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +116 -893
- package/dist/icons/camera-icon/CameraIcon.stories.tsx +109 -1254
- package/dist/icons/capital-a-letter-icon/CapitalALetterIcon.stories.tsx +114 -975
- package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +157 -994
- package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +160 -992
- package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +140 -970
- package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +126 -993
- package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +144 -987
- package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +141 -1007
- package/dist/icons/circle-tick-icon/CircleTickIcon.stories.tsx +147 -1187
- package/dist/icons/circular-play-icon/CircularPlayIcon.stories.tsx +110 -476
- package/dist/icons/coin-icon/CoinIcon.stories.tsx +120 -1364
- package/dist/icons/coin-toons-icon/CoinToonsIcon.stories.tsx +113 -1360
- package/dist/icons/column-wide-add-icon/ColumnWideAddIcon.stories.tsx +111 -942
- package/dist/icons/command-icon/CommandIcon.stories.tsx +124 -1087
- package/dist/icons/copy-icon/CopyIcon.stories.tsx +119 -996
- package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +144 -1046
- package/dist/icons/cross-icon/CrossIcon.stories.tsx +136 -999
- package/dist/icons/download-icon/DownloadIcon.stories.tsx +123 -857
- package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +121 -1080
- package/dist/icons/email-icon/EmailIcon.stories.tsx +112 -979
- package/dist/icons/expand-icon/ExpandIcon.stories.tsx +109 -1146
- package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +141 -1068
- package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +140 -1081
- package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +124 -1050
- package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +123 -1091
- package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +122 -633
- package/dist/icons/filter-bar-row-icon/FilterBarRowIcon.stories.tsx +116 -1087
- package/dist/icons/forward-ten-seconds-icon/ForwardTenSecondsIcon.stories.tsx +166 -1020
- package/dist/icons/git-branch-icon/GitBranchIcon.stories.tsx +112 -1182
- package/dist/icons/git-fork-icon/GitForkIcon.stories.tsx +112 -1155
- package/dist/icons/globe-icon/GlobeIcon.stories.tsx +127 -325
- package/dist/icons/google-logo-icon/GoogleLogoIcon.stories.tsx +142 -985
- package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +116 -1217
- package/dist/icons/head-icon/HeadIcon.stories.tsx +108 -953
- package/dist/icons/heart-icon/HeartIcon.stories.tsx +117 -1060
- package/dist/icons/image-avatar-sparkle-icon/ImageAvatarSparkleIcon.stories.tsx +116 -716
- package/dist/icons/image-icon/ImageIcon.stories.tsx +102 -1164
- package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +108 -1233
- package/dist/icons/import-left-arrow-folder-icon/ImportLeftArrowFolderIcon.stories.tsx +133 -1289
- package/dist/icons/indian-flag-icon/IndianFlagIcon.stories.tsx +155 -1012
- package/dist/icons/instagram-icon/InstagramIcon.stories.tsx +158 -1438
- package/dist/icons/layout-column-icon/LayoutColumnIcon.stories.tsx +121 -1011
- package/dist/icons/layout-left-icon/LayoutLeftIcon.stories.tsx +116 -981
- package/dist/icons/layout-right-icon/LayoutRightIcon.stories.tsx +116 -979
- package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +105 -1252
- package/dist/icons/linked-in-icon/LinkedInIcon.stories.tsx +151 -1554
- package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +107 -1227
- package/dist/icons/magic-edit-icon/MagicEditIcon.stories.tsx +116 -707
- package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +119 -1226
- package/dist/icons/message-icon/MessageIcon.stories.tsx +111 -557
- package/dist/icons/minimize-icon/MinimizeIcon.stories.tsx +112 -1198
- package/dist/icons/moon-icon/MoonIcon.stories.tsx +117 -557
- package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +106 -1235
- package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +112 -1185
- package/dist/icons/musical-note-icon/MusicalNoteIcon.stories.tsx +116 -1012
- package/dist/icons/notepad-icon/NotepadIcon.stories.tsx +108 -1137
- package/dist/icons/notes-icon/NotesIcon.stories.tsx +116 -1138
- package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +106 -1146
- package/dist/icons/page-text-icon/PageTextIcon.stories.tsx +119 -719
- package/dist/icons/paint-roll-icon/PaintRollIcon.stories.tsx +110 -999
- package/dist/icons/paper-plane-icon/PaperPlaneIcon.stories.tsx +109 -912
- package/dist/icons/pause-icon/PauseIcon.stories.tsx +110 -1041
- package/dist/icons/pencil-icon/PencilIcon.stories.tsx +112 -1109
- package/dist/icons/phone-icon/PhoneIcon.stories.tsx +112 -1023
- package/dist/icons/plus-icon/PlusIcon.stories.tsx +103 -1132
- package/dist/icons/pocket-studio-icon/PocketStudioIcon.stories.tsx +104 -870
- package/dist/icons/scroll-down-icon/ScrollDownIcon.stories.tsx +99 -476
- package/dist/icons/search-icon/SearchIcon.stories.tsx +108 -1161
- package/dist/icons/setting-icon/SettingIcon.stories.tsx +104 -1009
- package/dist/icons/share-icon/ShareIcon.stories.tsx +117 -1064
- package/dist/icons/shield-icon/ShieldIcon.stories.tsx +114 -974
- package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +134 -1160
- package/dist/icons/skip-backward-icon/SkipBackwardIcon.stories.tsx +169 -1017
- package/dist/icons/skip-forward-icon/SkipForwardIcon.stories.tsx +161 -1016
- package/dist/icons/sparkles-soft-icon/SparklesSoftIcon.stories.tsx +102 -1001
- package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +155 -593
- package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +155 -608
- package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +142 -712
- package/dist/icons/star-icon/StarIcon.stories.tsx +120 -946
- package/dist/icons/store-coin-icon/StoreCoinIcon.stories.tsx +109 -1013
- package/dist/icons/suggestion-icon/SuggestionIcon.stories.tsx +113 -891
- package/dist/icons/sun-icon/SunIcon.stories.tsx +117 -864
- package/dist/icons/text-color-icon/TextColorIcon.stories.tsx +113 -989
- package/dist/icons/text-indicator-icon/TextIndicatorIcon.stories.tsx +120 -1027
- package/dist/icons/threads-icon/ThreadsIcon.stories.tsx +153 -1476
- package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +143 -1187
- package/dist/icons/tick-icon/TickIcon.stories.tsx +142 -1322
- package/dist/icons/trash-icon/TrashIcon.stories.tsx +105 -970
- package/dist/icons/twitter-x-icon/TwitterXIcon.stories.tsx +154 -1457
- package/dist/icons/upload-icon/UploadIcon.stories.tsx +112 -930
- package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +115 -1019
- package/dist/icons/video-play-list-icon/VideoPlaylistIcon.stories.tsx +122 -1092
- package/dist/icons/voice-playing-icon/VoicePlayingIcon.stories.tsx +120 -1401
- package/dist/icons/volume-full-icon/VolumeFullIcon.stories.tsx +107 -1212
- package/dist/icons/volume-half-icon/VolumeHalfIcon.stories.tsx +109 -1122
- package/dist/icons/volume-off-icon/VolumeOffIcon.stories.tsx +112 -1124
- package/dist/icons/warning-icon/WarningIcon.stories.tsx +119 -1083
- package/dist/icons/youtube-icon/YoutubeIcon.stories.tsx +158 -983
- package/dist/index.cjs +90 -90
- package/dist/index.js +90 -90
- package/package.json +8 -3
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import type { Meta, StoryObj } from "@storybook/react-vite"
|
|
3
3
|
|
|
4
|
+
import { ArrowRightUpIcon } from "src/ui/icons/arrow-right-up-icon"
|
|
5
|
+
import { LayoutLeftIcon } from "src/ui/icons/layout-left-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 { ExpandIcon } from "."
|
|
5
19
|
|
|
6
20
|
const meta: Meta<typeof ExpandIcon> = {
|
|
@@ -18,1007 +32,68 @@ const meta: Meta<typeof ExpandIcon> = {
|
|
|
18
32
|
},
|
|
19
33
|
docs: {
|
|
20
34
|
page: () => (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
padding: 0 ;
|
|
33
|
-
margin: 0 ;
|
|
34
|
-
background: transparent ;
|
|
35
|
-
}
|
|
36
|
-
.docs-story {
|
|
37
|
-
background: transparent ;
|
|
38
|
-
}
|
|
39
|
-
.sbdocs {
|
|
40
|
-
background: transparent ;
|
|
41
|
-
}
|
|
42
|
-
body {
|
|
43
|
-
background: var(--color-fm-surface-primary) ;
|
|
44
|
-
}
|
|
45
|
-
#storybook-docs {
|
|
46
|
-
background: var(--color-fm-surface-primary) ;
|
|
47
|
-
}
|
|
48
|
-
.sbdocs-preview {
|
|
49
|
-
background: transparent ;
|
|
50
|
-
border: none ;
|
|
51
|
-
}
|
|
52
|
-
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
|
|
53
|
-
color: var(--color-fm-icon-active) ;
|
|
54
|
-
}
|
|
55
|
-
.sbdocs-p, .sbdocs-li {
|
|
56
|
-
color: var(--color-fm-secondary) ;
|
|
57
|
-
}
|
|
58
|
-
.sbdocs-code {
|
|
59
|
-
background: var(--color-fm-surface-secondary) ;
|
|
60
|
-
color: var(--color-fm-secondary-500) ;
|
|
61
|
-
border: 1px solid var(--color-fm-divider-secondary) ;
|
|
62
|
-
}
|
|
63
|
-
.sbdocs-pre {
|
|
64
|
-
background: var(--color-fm-surface-secondary) ;
|
|
65
|
-
border: 1px solid var(--color-fm-divider-secondary) ;
|
|
66
|
-
}
|
|
67
|
-
.sbdocs-table {
|
|
68
|
-
background: var(--color-fm-surface-secondary) ;
|
|
69
|
-
border: 1px solid var(--color-fm-divider-secondary) ;
|
|
70
|
-
}
|
|
71
|
-
.sbdocs-table th {
|
|
72
|
-
background: var(--color-fm-surface-secondary) ;
|
|
73
|
-
color: var(--color-fm-icon-active) ;
|
|
74
|
-
border-bottom: 1px solid var(--color-fm-divider-secondary) ;
|
|
75
|
-
}
|
|
76
|
-
.sbdocs-table td {
|
|
77
|
-
color: var(--color-fm-secondary) ;
|
|
78
|
-
border-bottom: 1px solid var(--color-fm-divider-tertiary) ;
|
|
79
|
-
}
|
|
80
|
-
`}
|
|
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
|
-
<ExpandIcon className="text-fm-icon-positive h-12 w-12" />
|
|
91
|
-
</div>
|
|
92
|
-
<h1 className="text-fm-icon-active! text-5xl font-bold">
|
|
93
|
-
ExpandIcon
|
|
94
|
-
</h1>
|
|
95
|
-
<p className="text-fm-secondary! !mx-auto max-w-3xl text-xl leading-relaxed">
|
|
96
|
-
A fullscreen and expand control icon for maximizing
|
|
97
|
-
interface elements. Features diagonal arrows pointing
|
|
98
|
-
outward, essential for media players, modal dialogs, image
|
|
99
|
-
viewers, and any interface where users need to expand
|
|
100
|
-
content to fullscreen mode.
|
|
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
|
-
Fullscreen
|
|
108
|
-
</div>
|
|
109
|
-
<div className="text-fm-tertiary text-sm">
|
|
110
|
-
Maximize content
|
|
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
|
-
Accessible
|
|
117
|
-
</div>
|
|
118
|
-
<div className="text-fm-tertiary text-sm">
|
|
119
|
-
Screen reader friendly
|
|
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
|
-
Universal
|
|
126
|
-
</div>
|
|
127
|
-
<div className="text-fm-tertiary text-sm">
|
|
128
|
-
Standard expand symbol
|
|
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 { ExpandIcon } from "@icons/expand-icon"
|
|
151
|
-
|
|
152
|
-
function VideoPlayer() {
|
|
35
|
+
<AuralIconDocsPage
|
|
36
|
+
accentToken="info"
|
|
37
|
+
features={[
|
|
38
|
+
{ title: "Expand View", description: "Enlarge panel or content" },
|
|
39
|
+
{ title: "Full Screen", description: "Enter full-screen mode" },
|
|
40
|
+
{ title: "Accessible", description: "ARIA-ready by default" },
|
|
41
|
+
]}
|
|
42
|
+
quickStart={{
|
|
43
|
+
codeExample: `import { ExpandIcon } from "src/ui/icons/expand-icon"
|
|
44
|
+
|
|
45
|
+
function ExpandButton() {
|
|
153
46
|
return (
|
|
154
|
-
<button
|
|
155
|
-
|
|
156
|
-
className="p-2 hover:bg-white/10 rounded-lg"
|
|
157
|
-
aria-label="Enter fullscreen mode"
|
|
158
|
-
>
|
|
159
|
-
<ExpandIcon className="h-6 w-6 text-emerald-400" />
|
|
47
|
+
<button>
|
|
48
|
+
<ExpandIcon className="h-5 w-5 text-fm-icon-active" />
|
|
160
49
|
</button>
|
|
161
50
|
)
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
-
24
|
|
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
|
-
stroke
|
|
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
|
-
Stroke 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
|
-
strokeWidth
|
|
256
|
-
</td>
|
|
257
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
258
|
-
string | number
|
|
259
|
-
</td>
|
|
260
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
261
|
-
1.5
|
|
262
|
-
</td>
|
|
263
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
264
|
-
Width of the stroke
|
|
265
|
-
</td>
|
|
266
|
-
</tr>
|
|
267
|
-
<tr className="border-fm-divider-tertiary border-b">
|
|
268
|
-
<td className="text-fm-icon-positive! px-6 py-4 font-mono text-sm">
|
|
269
|
-
strokeLinecap
|
|
270
|
-
</td>
|
|
271
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
272
|
-
string
|
|
273
|
-
</td>
|
|
274
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
275
|
-
square
|
|
276
|
-
</td>
|
|
277
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
278
|
-
Style of line endings (square for crisp corners)
|
|
279
|
-
</td>
|
|
280
|
-
</tr>
|
|
281
|
-
<tr className="border-fm-divider-tertiary bg-fm-surface-secondary! border-b">
|
|
282
|
-
<td className="text-fm-icon-positive! px-6 py-4 font-mono text-sm">
|
|
283
|
-
className
|
|
284
|
-
</td>
|
|
285
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
286
|
-
string
|
|
287
|
-
</td>
|
|
288
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
289
|
-
-
|
|
290
|
-
</td>
|
|
291
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
292
|
-
CSS classes for styling (use for overrides)
|
|
293
|
-
</td>
|
|
294
|
-
</tr>
|
|
295
|
-
<tr className="bg-fm-surface-secondary!">
|
|
296
|
-
<td className="text-fm-icon-positive! px-6 py-4 font-mono text-sm">
|
|
297
|
-
...svgProps
|
|
298
|
-
</td>
|
|
299
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
300
|
-
SVGProps
|
|
301
|
-
</td>
|
|
302
|
-
<td className="text-fm-placeholder! px-6 py-4 text-sm">
|
|
303
|
-
-
|
|
304
|
-
</td>
|
|
305
|
-
<td className="text-fm-secondary! px-6 py-4 text-sm">
|
|
306
|
-
All standard SVG element props
|
|
307
|
-
</td>
|
|
308
|
-
</tr>
|
|
309
|
-
</tbody>
|
|
310
|
-
</table>
|
|
311
|
-
</div>
|
|
312
|
-
</div>
|
|
313
|
-
|
|
314
|
-
{/* Size Variations */}
|
|
315
|
-
<div className="!space-y-8">
|
|
316
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
317
|
-
Size Variations
|
|
318
|
-
</h2>
|
|
319
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-8">
|
|
320
|
-
<div className="!space-y-6">
|
|
321
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
322
|
-
<div className="!space-y-4">
|
|
323
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
324
|
-
Standard Sizes
|
|
325
|
-
</h3>
|
|
326
|
-
<div className="bg-fm-surface-secondary flex items-end gap-6 rounded-lg p-6">
|
|
327
|
-
<div className="text-center">
|
|
328
|
-
<ExpandIcon className="text-fm-icon-positive !mx-auto mb-2 h-3 w-3" />
|
|
329
|
-
<span className="text-fm-tertiary text-xs">
|
|
330
|
-
12px
|
|
331
|
-
</span>
|
|
332
|
-
</div>
|
|
333
|
-
<div className="text-center">
|
|
334
|
-
<ExpandIcon className="text-fm-icon-positive !mx-auto mb-2 h-4 w-4" />
|
|
335
|
-
<span className="text-fm-tertiary text-xs">
|
|
336
|
-
16px
|
|
337
|
-
</span>
|
|
338
|
-
</div>
|
|
339
|
-
<div className="text-center">
|
|
340
|
-
<ExpandIcon className="text-fm-icon-positive !mx-auto mb-2 h-5 w-5" />
|
|
341
|
-
<span className="text-fm-tertiary text-xs">
|
|
342
|
-
20px
|
|
343
|
-
</span>
|
|
344
|
-
</div>
|
|
345
|
-
<div className="text-center">
|
|
346
|
-
<ExpandIcon className="text-fm-icon-positive !mx-auto mb-2 h-6 w-6" />
|
|
347
|
-
<span className="text-fm-tertiary text-xs">
|
|
348
|
-
24px
|
|
349
|
-
</span>
|
|
350
|
-
</div>
|
|
351
|
-
<div className="text-center">
|
|
352
|
-
<ExpandIcon className="text-fm-icon-positive !mx-auto mb-2 h-8 w-8" />
|
|
353
|
-
<span className="text-fm-tertiary text-xs">
|
|
354
|
-
32px
|
|
355
|
-
</span>
|
|
356
|
-
</div>
|
|
357
|
-
<div className="text-center">
|
|
358
|
-
<ExpandIcon className="text-fm-icon-positive !mx-auto mb-2 h-12 w-12" />
|
|
359
|
-
<span className="text-fm-tertiary text-xs">
|
|
360
|
-
48px
|
|
361
|
-
</span>
|
|
362
|
-
</div>
|
|
363
|
-
</div>
|
|
364
|
-
</div>
|
|
365
|
-
|
|
366
|
-
<div className="!space-y-4">
|
|
367
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
368
|
-
Code Example
|
|
369
|
-
</h3>
|
|
370
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
371
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
372
|
-
{`// Small (16px) - compact controls
|
|
373
|
-
<ExpandIcon className="h-4 w-4" />
|
|
374
|
-
|
|
375
|
-
// Medium (24px) - standard interface
|
|
376
|
-
<ExpandIcon className="h-6 w-6" />
|
|
377
|
-
|
|
378
|
-
// Large (32px) - prominent displays
|
|
379
|
-
<ExpandIcon className="h-8 w-8" />
|
|
380
|
-
|
|
381
|
-
// Custom size
|
|
382
|
-
<ExpandIcon width={40} height={40} />`}
|
|
383
|
-
</pre>
|
|
384
|
-
</div>
|
|
385
|
-
</div>
|
|
386
|
-
</div>
|
|
387
|
-
</div>
|
|
388
|
-
</div>
|
|
389
|
-
</div>
|
|
390
|
-
|
|
391
|
-
{/* Color Variations */}
|
|
392
|
-
<div className="!space-y-8">
|
|
393
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
394
|
-
Color Variations
|
|
395
|
-
</h2>
|
|
396
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
397
|
-
<div className="!space-y-4">
|
|
398
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
399
|
-
Semantic Colors
|
|
400
|
-
</h3>
|
|
401
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
402
|
-
<div className="flex items-center gap-4">
|
|
403
|
-
<ExpandIcon className="text-fm-icon-positive h-6 w-6" />
|
|
404
|
-
<div>
|
|
405
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
406
|
-
Expand/Fullscreen
|
|
407
|
-
</div>
|
|
408
|
-
<div className="text-fm-tertiary text-xs">
|
|
409
|
-
text-fm-icon-positive
|
|
410
|
-
</div>
|
|
411
|
-
</div>
|
|
412
|
-
</div>
|
|
413
|
-
<div className="flex items-center gap-4">
|
|
414
|
-
<ExpandIcon className="text-fm-icon-info h-6 w-6" />
|
|
415
|
-
<div>
|
|
416
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
417
|
-
Maximize View
|
|
418
|
-
</div>
|
|
419
|
-
<div className="text-fm-tertiary text-xs">
|
|
420
|
-
text-fm-icon-info
|
|
421
|
-
</div>
|
|
422
|
-
</div>
|
|
423
|
-
</div>
|
|
424
|
-
<div className="flex items-center gap-4">
|
|
425
|
-
<ExpandIcon className="text-fm-icon-positive h-6 w-6" />
|
|
426
|
-
<div>
|
|
427
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
428
|
-
Active/Available
|
|
429
|
-
</div>
|
|
430
|
-
<div className="text-fm-tertiary text-xs">
|
|
431
|
-
text-fm-icon-positive
|
|
432
|
-
</div>
|
|
433
|
-
</div>
|
|
434
|
-
</div>
|
|
435
|
-
<div className="flex items-center gap-4">
|
|
436
|
-
<ExpandIcon className="text-fm-icon-info h-6 w-6" />
|
|
437
|
-
<div>
|
|
438
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
439
|
-
Focus Mode
|
|
440
|
-
</div>
|
|
441
|
-
<div className="text-fm-tertiary text-xs">
|
|
442
|
-
text-fm-icon-info
|
|
443
|
-
</div>
|
|
444
|
-
</div>
|
|
445
|
-
</div>
|
|
446
|
-
</div>
|
|
447
|
-
</div>
|
|
448
|
-
|
|
449
|
-
<div className="!space-y-4">
|
|
450
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
451
|
-
Custom Colors
|
|
452
|
-
</h3>
|
|
453
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
454
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
455
|
-
{`// Using Tailwind classes
|
|
456
|
-
<ExpandIcon className="h-6 w-6 text-emerald-400" />
|
|
457
|
-
<ExpandIcon className="h-6 w-6 text-teal-500" />
|
|
458
|
-
|
|
459
|
-
// Using CSS custom properties
|
|
460
|
-
<ExpandIcon
|
|
461
|
-
className="h-6 w-6"
|
|
462
|
-
style={{ color: 'var(--color-expand)' }}
|
|
463
|
-
/>
|
|
464
|
-
|
|
465
|
-
// Direct stroke prop
|
|
466
|
-
<ExpandIcon
|
|
467
|
-
width={24}
|
|
468
|
-
height={24}
|
|
469
|
-
stroke="#10b981"
|
|
470
|
-
/>`}
|
|
471
|
-
</pre>
|
|
472
|
-
</div>
|
|
473
|
-
</div>
|
|
474
|
-
</div>
|
|
475
|
-
</div>
|
|
476
|
-
|
|
477
|
-
{/* Usage Examples */}
|
|
478
|
-
<div className="!space-y-8">
|
|
479
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
480
|
-
Usage Examples
|
|
481
|
-
</h2>
|
|
482
|
-
|
|
483
|
-
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
484
|
-
{/* Video Player */}
|
|
485
|
-
<div className="!space-y-4">
|
|
486
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
487
|
-
Video Player
|
|
488
|
-
</h3>
|
|
489
|
-
<div className="!space-y-4">
|
|
490
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
|
|
491
|
-
<div className="bg-fm-surface-secondary relative mb-4 aspect-video overflow-hidden rounded-lg">
|
|
492
|
-
<div className="from-fm-surface-secondary to-fm-surface-primary absolute inset-0 flex items-center justify-center bg-linear-to-br">
|
|
493
|
-
<div className="bg-fm-divider-primary flex h-16 w-16 items-center justify-center rounded-full">
|
|
494
|
-
<div className="ml-1 h-0 w-0 border-y-[8px] border-l-[12px] border-y-transparent border-l-white" />
|
|
495
|
-
</div>
|
|
496
|
-
</div>
|
|
497
|
-
<div className="from-fm-surface-primary/80 absolute right-0 bottom-0 left-0 bg-linear-to-t to-transparent p-4">
|
|
498
|
-
<div className="flex items-center justify-between">
|
|
499
|
-
<div className="flex items-center gap-3">
|
|
500
|
-
<button className="hover:bg-fm-divider-primary rounded p-2 transition-colors">
|
|
501
|
-
<div className="h-0 w-0 border-y-[6px] border-l-[8px] border-y-transparent border-l-white" />
|
|
502
|
-
</button>
|
|
503
|
-
<span className="text-fm-icon-active text-sm">
|
|
504
|
-
0:42 / 2:18
|
|
505
|
-
</span>
|
|
506
|
-
</div>
|
|
507
|
-
<div className="flex items-center gap-2">
|
|
508
|
-
<button className="hover:bg-fm-divider-primary rounded p-2 transition-colors">
|
|
509
|
-
<span className="text-fm-icon-active text-xs">
|
|
510
|
-
HD
|
|
511
|
-
</span>
|
|
512
|
-
</button>
|
|
513
|
-
<button className="border-fm-icon-positive/30 bg-fm-icon-positive/10 hover:bg-fm-icon-positive/20 rounded border p-2 transition-colors">
|
|
514
|
-
<ExpandIcon className="text-fm-icon-positive h-4 w-4" />
|
|
515
|
-
</button>
|
|
516
|
-
</div>
|
|
517
|
-
</div>
|
|
518
|
-
</div>
|
|
519
|
-
</div>
|
|
520
|
-
<div className="text-center">
|
|
521
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
522
|
-
"Exploring the Universe"
|
|
523
|
-
</div>
|
|
524
|
-
<div className="text-fm-tertiary text-xs">
|
|
525
|
-
Click expand to enter fullscreen mode
|
|
526
|
-
</div>
|
|
527
|
-
</div>
|
|
528
|
-
</div>
|
|
529
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
530
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
531
|
-
{`// Video player with fullscreen control
|
|
532
|
-
<div className="video-player">
|
|
533
|
-
<video ref={videoRef} className="video-element" />
|
|
534
|
-
<div className="video-controls">
|
|
535
|
-
<div className="control-group-left">
|
|
536
|
-
<PlayButton />
|
|
537
|
-
<TimeDisplay />
|
|
538
|
-
</div>
|
|
539
|
-
<div className="control-group-right">
|
|
540
|
-
<QualitySelector />
|
|
541
|
-
<button
|
|
542
|
-
onClick={enterFullscreen}
|
|
543
|
-
className="fullscreen-btn"
|
|
544
|
-
aria-label="Enter fullscreen"
|
|
545
|
-
>
|
|
546
|
-
<ExpandIcon className="h-4 w-4 text-emerald-400" />
|
|
547
|
-
</button>
|
|
548
|
-
</div>
|
|
549
|
-
</div>
|
|
550
|
-
</div>`}
|
|
551
|
-
</pre>
|
|
552
|
-
</div>
|
|
553
|
-
</div>
|
|
554
|
-
</div>
|
|
555
|
-
|
|
556
|
-
{/* Image Gallery */}
|
|
557
|
-
<div className="!space-y-4">
|
|
558
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
559
|
-
Image Gallery
|
|
560
|
-
</h3>
|
|
561
|
-
<div className="!space-y-4">
|
|
562
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
|
|
563
|
-
<div className="mb-4 grid grid-cols-2 gap-3">
|
|
564
|
-
{[1, 2, 3, 4].map((img) => (
|
|
565
|
-
<div
|
|
566
|
-
key={img}
|
|
567
|
-
className="group from-fm-surface-secondary to-fm-surface-secondary relative aspect-square overflow-hidden rounded-lg bg-linear-to-br"
|
|
568
|
-
>
|
|
569
|
-
<div className="bg-fm-surface-secondary absolute inset-0 flex items-center justify-center opacity-0 transition-opacity group-hover:opacity-100">
|
|
570
|
-
<button className="border-fm-icon-positive/30 bg-fm-icon-positive/20 hover:bg-fm-icon-positive/30 rounded-lg border p-3 transition-colors">
|
|
571
|
-
<ExpandIcon className="text-fm-icon-positive h-5 w-5" />
|
|
572
|
-
</button>
|
|
573
|
-
</div>
|
|
574
|
-
<div className="absolute right-2 bottom-2 opacity-0 transition-opacity group-hover:opacity-100">
|
|
575
|
-
<button className="border-fm-divider-primary bg-fm-surface-secondary hover:border-fm-icon-positive/30 hover:bg-fm-icon-positive/20 rounded border p-1.5 transition-colors">
|
|
576
|
-
<ExpandIcon className="text-fm-icon-active h-3 w-3" />
|
|
577
|
-
</button>
|
|
578
|
-
</div>
|
|
579
|
-
</div>
|
|
580
|
-
))}
|
|
581
|
-
</div>
|
|
582
|
-
<div className="text-center">
|
|
583
|
-
<div className="text-fm-icon-active text-sm font-medium">
|
|
584
|
-
Photography Portfolio
|
|
585
|
-
</div>
|
|
586
|
-
<div className="text-fm-tertiary text-xs">
|
|
587
|
-
Hover over images to see expand options
|
|
588
|
-
</div>
|
|
589
|
-
</div>
|
|
590
|
-
</div>
|
|
591
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
592
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
593
|
-
{`// Image gallery with lightbox expand
|
|
594
|
-
<div className="image-gallery">
|
|
595
|
-
{images.map((image, index) => (
|
|
596
|
-
<div key={image.id} className="gallery-item">
|
|
597
|
-
<img src={image.thumbnail} alt={image.alt} />
|
|
598
|
-
<div className="overlay">
|
|
599
|
-
<button
|
|
600
|
-
onClick={() => openLightbox(index)}
|
|
601
|
-
className="expand-btn"
|
|
602
|
-
aria-label="View full size image"
|
|
603
|
-
>
|
|
604
|
-
<ExpandIcon className="h-5 w-5 text-emerald-400" />
|
|
605
|
-
</button>
|
|
606
|
-
</div>
|
|
607
|
-
</div>
|
|
608
|
-
))}
|
|
609
|
-
</div>
|
|
610
|
-
|
|
611
|
-
<Lightbox
|
|
612
|
-
isOpen={lightboxOpen}
|
|
613
|
-
images={images}
|
|
614
|
-
currentIndex={currentIndex}
|
|
615
|
-
onClose={closeLightbox}
|
|
616
|
-
/>`}
|
|
617
|
-
</pre>
|
|
618
|
-
</div>
|
|
619
|
-
</div>
|
|
620
|
-
</div>
|
|
621
|
-
|
|
622
|
-
{/* Modal Dialog */}
|
|
623
|
-
<div className="!space-y-4">
|
|
624
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
625
|
-
Modal Dialog
|
|
626
|
-
</h3>
|
|
627
|
-
<div className="!space-y-4">
|
|
628
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
|
|
629
|
-
<div className="border-fm-divider-primary bg-fm-surface-secondary rounded-lg border p-6">
|
|
630
|
-
<div className="mb-4 flex items-start justify-between">
|
|
631
|
-
<div>
|
|
632
|
-
<h4 className="text-fm-icon-active text-lg font-semibold">
|
|
633
|
-
Document Preview
|
|
634
|
-
</h4>
|
|
635
|
-
<p className="text-fm-tertiary text-sm">
|
|
636
|
-
quarterly-report-2024.pdf
|
|
637
|
-
</p>
|
|
638
|
-
</div>
|
|
639
|
-
<div className="flex items-center gap-2">
|
|
640
|
-
<button className="border-fm-icon-positive/30 bg-fm-icon-positive/10 hover:bg-fm-icon-positive/20 rounded border p-2 transition-colors">
|
|
641
|
-
<ExpandIcon className="text-fm-icon-positive h-4 w-4" />
|
|
642
|
-
</button>
|
|
643
|
-
<button className="hover:bg-fm-divider-primary rounded p-2 transition-colors">
|
|
644
|
-
<div className="relative h-4 w-4">
|
|
645
|
-
<div className="border-fm-divider-contrast absolute inset-0 rotate-45 border"></div>
|
|
646
|
-
<div className="border-fm-divider-contrast absolute inset-0 -rotate-45 border"></div>
|
|
647
|
-
</div>
|
|
648
|
-
</button>
|
|
649
|
-
</div>
|
|
650
|
-
</div>
|
|
651
|
-
<div className="border-fm-divider-primary bg-fm-surface-secondary mb-4 flex aspect-[4/5] items-center justify-center rounded border">
|
|
652
|
-
<div className="text-center">
|
|
653
|
-
<div className="bg-fm-divider-primary mx-auto mb-2 h-20 w-16 rounded"></div>
|
|
654
|
-
<div className="text-fm-tertiary text-xs">
|
|
655
|
-
PDF Preview
|
|
656
|
-
</div>
|
|
657
|
-
</div>
|
|
658
|
-
</div>
|
|
659
|
-
<div className="flex items-center justify-between">
|
|
660
|
-
<span className="text-fm-tertiary text-xs">
|
|
661
|
-
Page 1 of 24
|
|
662
|
-
</span>
|
|
663
|
-
<div className="flex gap-2">
|
|
664
|
-
<button className="bg-fm-surface-secondary text-fm-icon-active hover:bg-fm-divider-primary rounded px-3 py-1 text-xs transition-colors">
|
|
665
|
-
Download
|
|
666
|
-
</button>
|
|
667
|
-
<button className="bg-fm-icon-positive/20 text-fm-icon-positive hover:bg-fm-icon-positive/30 rounded px-3 py-1 text-xs transition-colors">
|
|
668
|
-
Full View
|
|
669
|
-
</button>
|
|
670
|
-
</div>
|
|
671
|
-
</div>
|
|
672
|
-
</div>
|
|
673
|
-
</div>
|
|
674
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
675
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
676
|
-
{`// Modal with expand to fullscreen
|
|
677
|
-
<Modal isOpen={isModalOpen} onClose={closeModal}>
|
|
678
|
-
<div className="modal-header">
|
|
679
|
-
<div className="modal-title">
|
|
680
|
-
<h3>Document Preview</h3>
|
|
681
|
-
<p>{document.name}</p>
|
|
682
|
-
</div>
|
|
683
|
-
<div className="modal-actions">
|
|
684
|
-
<button
|
|
685
|
-
onClick={expandToFullscreen}
|
|
686
|
-
className="expand-btn"
|
|
687
|
-
aria-label="Expand to fullscreen"
|
|
688
|
-
>
|
|
689
|
-
<ExpandIcon className="h-4 w-4 text-emerald-400" />
|
|
690
|
-
</button>
|
|
691
|
-
<CloseButton onClick={closeModal} />
|
|
692
|
-
</div>
|
|
693
|
-
</div>
|
|
694
|
-
<div className="modal-content">
|
|
695
|
-
<DocumentViewer document={document} />
|
|
696
|
-
</div>
|
|
697
|
-
</Modal>`}
|
|
698
|
-
</pre>
|
|
699
|
-
</div>
|
|
700
|
-
</div>
|
|
701
|
-
</div>
|
|
702
|
-
|
|
703
|
-
{/* Dashboard Widget */}
|
|
704
|
-
<div className="!space-y-4">
|
|
705
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
706
|
-
Dashboard Widget
|
|
707
|
-
</h3>
|
|
708
|
-
<div className="!space-y-4">
|
|
709
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
|
|
710
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-4">
|
|
711
|
-
<div className="mb-4 flex items-center justify-between">
|
|
712
|
-
<div>
|
|
713
|
-
<h4 className="text-fm-icon-active text-sm font-semibold">
|
|
714
|
-
Analytics Overview
|
|
715
|
-
</h4>
|
|
716
|
-
<p className="text-fm-tertiary text-xs">
|
|
717
|
-
Last 30 days
|
|
718
|
-
</p>
|
|
719
|
-
</div>
|
|
720
|
-
<button className="border-fm-icon-positive/30 bg-fm-icon-positive/10 hover:bg-fm-icon-positive/20 rounded border p-1.5 transition-colors">
|
|
721
|
-
<ExpandIcon className="text-fm-icon-positive h-3 w-3" />
|
|
722
|
-
</button>
|
|
723
|
-
</div>
|
|
724
|
-
<div className="mb-4 grid grid-cols-2 gap-4">
|
|
725
|
-
<div className="text-center">
|
|
726
|
-
<div className="text-fm-icon-positive text-2xl font-bold">
|
|
727
|
-
12.5K
|
|
728
|
-
</div>
|
|
729
|
-
<div className="text-fm-tertiary text-xs">
|
|
730
|
-
Visitors
|
|
731
|
-
</div>
|
|
732
|
-
</div>
|
|
733
|
-
<div className="text-center">
|
|
734
|
-
<div className="text-fm-icon-info text-2xl font-bold">
|
|
735
|
-
84%
|
|
736
|
-
</div>
|
|
737
|
-
<div className="text-fm-tertiary text-xs">
|
|
738
|
-
Conversion
|
|
739
|
-
</div>
|
|
740
|
-
</div>
|
|
741
|
-
</div>
|
|
742
|
-
<div className="bg-fm-surface-secondary flex h-16 items-end gap-1 rounded p-2">
|
|
743
|
-
{[0.3, 0.7, 0.5, 0.8, 0.6, 0.9, 0.4, 0.7].map(
|
|
744
|
-
(height, i) => (
|
|
745
|
-
<div
|
|
746
|
-
key={i}
|
|
747
|
-
className="bg-fm-icon-positive/60 flex-1 rounded-sm"
|
|
748
|
-
style={{ height: `${height * 100}%` }}
|
|
749
|
-
/>
|
|
750
|
-
)
|
|
751
|
-
)}
|
|
752
|
-
</div>
|
|
753
|
-
</div>
|
|
754
|
-
</div>
|
|
755
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
756
|
-
<pre className="text-fm-icon-positive! overflow-x-auto text-sm">
|
|
757
|
-
{`// Dashboard widget with expand option
|
|
758
|
-
<div className="dashboard-widget">
|
|
759
|
-
<div className="widget-header">
|
|
760
|
-
<div className="widget-info">
|
|
761
|
-
<h3>{widget.title}</h3>
|
|
762
|
-
<p>{widget.subtitle}</p>
|
|
763
|
-
</div>
|
|
764
|
-
<button
|
|
765
|
-
onClick={() => expandWidget(widget.id)}
|
|
766
|
-
className="expand-widget-btn"
|
|
767
|
-
aria-label="Expand widget to full view"
|
|
768
|
-
>
|
|
769
|
-
<ExpandIcon className="h-3 w-3 text-emerald-400" />
|
|
770
|
-
</button>
|
|
771
|
-
</div>
|
|
772
|
-
<div className="widget-content">
|
|
773
|
-
<MetricsDisplay data={widget.data} />
|
|
774
|
-
<Chart data={widget.chartData} compact />
|
|
775
|
-
</div>
|
|
776
|
-
</div>`}
|
|
777
|
-
</pre>
|
|
778
|
-
</div>
|
|
779
|
-
</div>
|
|
780
|
-
</div>
|
|
781
|
-
</div>
|
|
782
|
-
</div>
|
|
783
|
-
|
|
784
|
-
{/* Accessibility */}
|
|
785
|
-
<div className="!space-y-8">
|
|
786
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
787
|
-
Accessibility Features
|
|
788
|
-
</h2>
|
|
789
|
-
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
790
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
791
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
792
|
-
✅ Built-in Features
|
|
793
|
-
</h3>
|
|
794
|
-
<ul className="text-fm-secondary! !space-y-2 text-sm">
|
|
795
|
-
<li className="text-fm-secondary!">
|
|
796
|
-
Uses Radix UI AccessibleIcon wrapper
|
|
797
|
-
</li>
|
|
798
|
-
<li className="text-fm-secondary!">
|
|
799
|
-
Provides screen reader label "Expand icon"
|
|
800
|
-
</li>
|
|
801
|
-
<li className="text-fm-secondary!">
|
|
802
|
-
Supports keyboard navigation when interactive
|
|
803
|
-
</li>
|
|
804
|
-
<li className="text-fm-secondary!">
|
|
805
|
-
Maintains proper color contrast ratios
|
|
806
|
-
</li>
|
|
807
|
-
<li className="text-fm-secondary!">
|
|
808
|
-
Uses square strokeLinecap for crisp visual clarity
|
|
809
|
-
</li>
|
|
810
|
-
</ul>
|
|
811
|
-
</div>
|
|
812
|
-
|
|
813
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-4 rounded-lg border p-6">
|
|
814
|
-
<h3 className="text-fm-icon-positive! text-lg font-semibold">
|
|
815
|
-
💡 Best Practices
|
|
816
|
-
</h3>
|
|
817
|
-
<ul className="text-fm-secondary !space-y-2 text-sm">
|
|
818
|
-
<li className="text-fm-secondary!">
|
|
819
|
-
Always provide descriptive aria-labels for expand
|
|
820
|
-
actions
|
|
821
|
-
</li>
|
|
822
|
-
<li className="text-fm-secondary!">
|
|
823
|
-
Use consistent placement in media control groups
|
|
824
|
-
</li>
|
|
825
|
-
<li className="text-fm-secondary!">
|
|
826
|
-
Ensure sufficient touch target size (44px minimum)
|
|
827
|
-
</li>
|
|
828
|
-
<li className="text-fm-secondary!">
|
|
829
|
-
Provide visible focus states for keyboard users
|
|
830
|
-
</li>
|
|
831
|
-
<li className="text-fm-secondary!">
|
|
832
|
-
Consider Escape key handling for fullscreen mode
|
|
833
|
-
</li>
|
|
834
|
-
</ul>
|
|
835
|
-
</div>
|
|
836
|
-
</div>
|
|
837
|
-
|
|
838
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary rounded-lg border p-6">
|
|
839
|
-
<h3 className="text-fm-icon-info! mb-4 text-lg font-semibold">
|
|
840
|
-
Proper ARIA Implementation
|
|
841
|
-
</h3>
|
|
842
|
-
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
843
|
-
<div className="bg-fm-surface-secondary rounded-lg p-4">
|
|
844
|
-
<pre className="text-fm-icon-info! overflow-x-auto text-sm">
|
|
845
|
-
{`// Video player fullscreen control
|
|
846
|
-
<div className="video-controls">
|
|
847
|
-
<button
|
|
848
|
-
aria-label="Enter fullscreen mode"
|
|
849
|
-
onClick={enterFullscreen}
|
|
850
|
-
onKeyDown={handleKeyDown}
|
|
851
|
-
>
|
|
852
|
-
<ExpandIcon className="h-6 w-6 text-emerald-400" />
|
|
853
|
-
</button>
|
|
854
|
-
</div>
|
|
855
|
-
|
|
856
|
-
// Modal expand button
|
|
857
|
-
<button
|
|
858
|
-
aria-label="Expand to fullscreen view"
|
|
859
|
-
aria-expanded={isFullscreen}
|
|
860
|
-
onClick={toggleFullscreen}
|
|
861
|
-
>
|
|
862
|
-
<ExpandIcon className="h-4 w-4" />
|
|
863
|
-
</button>
|
|
864
|
-
|
|
865
|
-
// Image gallery expand
|
|
866
|
-
<button
|
|
867
|
-
aria-label="View full size image"
|
|
868
|
-
onClick={() => openLightbox(imageIndex)}
|
|
869
|
-
aria-describedby="expand-hint"
|
|
870
|
-
>
|
|
871
|
-
<ExpandIcon className="h-5 w-5 text-emerald-400" />
|
|
872
|
-
</button>
|
|
873
|
-
<div id="expand-hint" className="sr-only">
|
|
874
|
-
Opens image in fullscreen lightbox
|
|
875
|
-
</div>
|
|
876
|
-
|
|
877
|
-
// Dashboard widget expand
|
|
878
|
-
<button
|
|
879
|
-
aria-label="Expand analytics widget"
|
|
880
|
-
aria-controls="analytics-widget"
|
|
881
|
-
onClick={() => expandWidget('analytics')}
|
|
882
|
-
>
|
|
883
|
-
<ExpandIcon className="h-3 w-3" />
|
|
884
|
-
</button>`}
|
|
885
|
-
</pre>
|
|
886
|
-
</div>
|
|
887
|
-
<div className="!space-y-4">
|
|
888
|
-
<p className="text-fm-secondary! text-sm">
|
|
889
|
-
When using ExpandIcon for fullscreen controls, always
|
|
890
|
-
provide clear context about what will be expanded and
|
|
891
|
-
how users can exit fullscreen mode.
|
|
892
|
-
</p>
|
|
893
|
-
<div className="border-fm-icon-positive/20 bg-fm-icon-positive/10 rounded-lg border p-4">
|
|
894
|
-
<div className="text-fm-icon-positive flex items-center gap-2 text-sm">
|
|
895
|
-
<ExpandIcon className="h-4 w-4" />
|
|
896
|
-
<span>
|
|
897
|
-
Include keyboard shortcuts (F11, Escape) in tooltips
|
|
898
|
-
</span>
|
|
899
|
-
</div>
|
|
900
|
-
</div>
|
|
901
|
-
</div>
|
|
902
|
-
</div>
|
|
903
|
-
</div>
|
|
904
|
-
</div>
|
|
905
|
-
|
|
906
|
-
{/* Related Icons */}
|
|
907
|
-
<div className="!space-y-8">
|
|
908
|
-
<h2 className="text-fm-icon-active! text-center text-3xl font-bold">
|
|
909
|
-
Related Icons
|
|
910
|
-
</h2>
|
|
911
|
-
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
912
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
913
|
-
<div className="bg-fm-icon-negative/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
914
|
-
<span className="text-fm-icon-active! !text-2xl">⤡</span>
|
|
915
|
-
</div>
|
|
916
|
-
<div>
|
|
917
|
-
<div className="text-fm-icon-active font-medium">
|
|
918
|
-
CollapseIcon
|
|
919
|
-
</div>
|
|
920
|
-
<div className="text-fm-tertiary text-xs">
|
|
921
|
-
Exit fullscreen
|
|
922
|
-
</div>
|
|
923
|
-
</div>
|
|
924
|
-
</div>
|
|
925
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
926
|
-
<div className="bg-fm-icon-info/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
927
|
-
<span className="text-fm-icon-active! !text-2xl">⛶</span>
|
|
928
|
-
</div>
|
|
929
|
-
<div>
|
|
930
|
-
<div className="text-fm-icon-active font-medium">
|
|
931
|
-
MaximizeIcon
|
|
932
|
-
</div>
|
|
933
|
-
<div className="text-fm-tertiary text-xs">
|
|
934
|
-
Window maximize
|
|
935
|
-
</div>
|
|
936
|
-
</div>
|
|
937
|
-
</div>
|
|
938
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
939
|
-
<div className="bg-fm-secondary-500/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
940
|
-
<span className="text-fm-icon-active! !text-2xl">🔍</span>
|
|
941
|
-
</div>
|
|
942
|
-
<div>
|
|
943
|
-
<div className="text-fm-icon-active font-medium">
|
|
944
|
-
ZoomInIcon
|
|
945
|
-
</div>
|
|
946
|
-
<div className="text-fm-tertiary text-xs">Zoom in</div>
|
|
947
|
-
</div>
|
|
948
|
-
</div>
|
|
949
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary !space-y-3 rounded-lg border p-4 text-center">
|
|
950
|
-
<div className="bg-fm-icon-warning/20 !mx-auto flex h-12 w-12 items-center justify-center rounded-lg">
|
|
951
|
-
<span className="text-fm-icon-active! !text-2xl">⊞</span>
|
|
952
|
-
</div>
|
|
953
|
-
<div>
|
|
954
|
-
<div className="text-fm-icon-active font-medium">
|
|
955
|
-
WindowIcon
|
|
956
|
-
</div>
|
|
957
|
-
<div className="text-fm-tertiary text-xs">
|
|
958
|
-
Window controls
|
|
959
|
-
</div>
|
|
960
|
-
</div>
|
|
961
|
-
</div>
|
|
962
|
-
</div>
|
|
963
|
-
</div>
|
|
964
|
-
</div>
|
|
965
|
-
|
|
966
|
-
{/* Footer */}
|
|
967
|
-
<div className="border-fm-divider-secondary bg-fm-surface-secondary border-t backdrop-blur-xl">
|
|
968
|
-
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
969
|
-
<div className="!space-y-4 text-center">
|
|
970
|
-
<p className="text-fm-tertiary!">
|
|
971
|
-
ExpandIcon is part of the Aural UI icon library, built with
|
|
972
|
-
accessibility and fullscreen interaction best practices in
|
|
973
|
-
mind.
|
|
974
|
-
</p>
|
|
975
|
-
<p className="text-fm-placeholder! text-sm">
|
|
976
|
-
All icons use Radix UI's AccessibleIcon for screen reader
|
|
977
|
-
compatibility and follow WCAG guidelines for interactive
|
|
978
|
-
elements and keyboard navigation.
|
|
979
|
-
</p>
|
|
980
|
-
</div>
|
|
981
|
-
</div>
|
|
982
|
-
</div>
|
|
983
|
-
</div>
|
|
984
|
-
</>
|
|
51
|
+
}`,
|
|
52
|
+
livePreview: (
|
|
53
|
+
<button>
|
|
54
|
+
<ExpandIcon className="text-fm-icon-active h-6 w-6" />
|
|
55
|
+
</button>
|
|
56
|
+
),
|
|
57
|
+
}}
|
|
58
|
+
relatedIcons={[
|
|
59
|
+
{
|
|
60
|
+
name: "MinimizeIcon",
|
|
61
|
+
description: "Minimize / collapse view",
|
|
62
|
+
icon: MinimizeIcon,
|
|
63
|
+
accentToken: "info",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "ArrowRightUpIcon",
|
|
67
|
+
description: "Open in new / external link",
|
|
68
|
+
icon: ArrowRightUpIcon,
|
|
69
|
+
accentToken: "positive",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "LayoutLeftIcon",
|
|
73
|
+
description: "Left-side panel layout",
|
|
74
|
+
icon: LayoutLeftIcon,
|
|
75
|
+
accentToken: "warning",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "LayoutRightIcon",
|
|
79
|
+
description: "Right-side panel layout",
|
|
80
|
+
icon: LayoutRightIcon,
|
|
81
|
+
accentToken: "negative",
|
|
82
|
+
},
|
|
83
|
+
]}
|
|
84
|
+
/>
|
|
985
85
|
),
|
|
986
86
|
},
|
|
987
87
|
},
|
|
988
88
|
tags: ["autodocs"],
|
|
989
89
|
argTypes: {
|
|
990
|
-
width: {
|
|
991
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
992
|
-
description: "Width of the icon in pixels",
|
|
993
|
-
},
|
|
994
|
-
withAccessibility: {
|
|
995
|
-
control: "boolean",
|
|
996
|
-
description: "Whether to wrap the icon with accessibility features",
|
|
997
|
-
},
|
|
998
|
-
height: {
|
|
999
|
-
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
1000
|
-
description: "Height of the icon in pixels",
|
|
1001
|
-
},
|
|
1002
|
-
stroke: {
|
|
1003
|
-
control: "color",
|
|
1004
|
-
description: "Stroke color of the icon",
|
|
1005
|
-
},
|
|
1006
|
-
strokeWidth: {
|
|
1007
|
-
control: { type: "range", min: 0.5, max: 4, step: 0.5 },
|
|
1008
|
-
description: "Width of the stroke",
|
|
1009
|
-
},
|
|
1010
|
-
strokeLinecap: {
|
|
1011
|
-
control: { type: "select" },
|
|
1012
|
-
options: ["round", "square", "butt"],
|
|
1013
|
-
description: "Style of line endings",
|
|
1014
|
-
},
|
|
1015
90
|
className: {
|
|
1016
91
|
control: "text",
|
|
1017
|
-
description: "CSS classes
|
|
92
|
+
description: "CSS classes including color token",
|
|
1018
93
|
},
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
description: "
|
|
94
|
+
withAccessibility: {
|
|
95
|
+
control: "boolean",
|
|
96
|
+
description: "Wrap with accessibility label",
|
|
1022
97
|
},
|
|
1023
98
|
},
|
|
1024
99
|
}
|
|
@@ -1026,188 +101,76 @@ function VideoPlayer() {
|
|
|
1026
101
|
export default meta
|
|
1027
102
|
type Story = StoryObj<typeof ExpandIcon>
|
|
1028
103
|
|
|
1029
|
-
// Story parameters for consistent dark theme
|
|
1030
|
-
const storyParameters = {
|
|
1031
|
-
backgrounds: {
|
|
1032
|
-
default: "dark",
|
|
1033
|
-
values: [
|
|
1034
|
-
{ name: "dark", value: "var(--color-fm-surface-primary)" },
|
|
1035
|
-
{ name: "darker", value: "var(--color-fm-neutral-0)" },
|
|
1036
|
-
],
|
|
1037
|
-
},
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
104
|
export const Default: Story = {
|
|
1041
105
|
args: {
|
|
1042
|
-
className: "h-
|
|
106
|
+
className: "h-6 w-6 text-fm-icon-active",
|
|
1043
107
|
withAccessibility: true,
|
|
1044
108
|
},
|
|
1045
|
-
parameters: storyParameters,
|
|
1046
109
|
render: (args) => (
|
|
1047
|
-
<
|
|
110
|
+
<IconDefaultCanvas>
|
|
1048
111
|
<ExpandIcon {...args} />
|
|
1049
|
-
</
|
|
112
|
+
</IconDefaultCanvas>
|
|
1050
113
|
),
|
|
1051
114
|
}
|
|
1052
115
|
|
|
1053
116
|
export const SizeVariations: Story = {
|
|
1054
|
-
|
|
1055
|
-
...storyParameters,
|
|
1056
|
-
docs: {
|
|
1057
|
-
description: {
|
|
1058
|
-
story:
|
|
1059
|
-
"ExpandIcon in different sizes, from small UI controls to large fullscreen buttons.",
|
|
1060
|
-
},
|
|
1061
|
-
},
|
|
1062
|
-
},
|
|
1063
|
-
render: () => (
|
|
1064
|
-
<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">
|
|
1065
|
-
<div className="text-center">
|
|
1066
|
-
<ExpandIcon className="text-fm-icon-positive !mx-auto mb-2 h-3 w-3" />
|
|
1067
|
-
<span className="text-fm-tertiary text-xs">12px</span>
|
|
1068
|
-
</div>
|
|
1069
|
-
<div className="text-center">
|
|
1070
|
-
<ExpandIcon className="text-fm-icon-positive !mx-auto mb-2 h-4 w-4" />
|
|
1071
|
-
<span className="text-fm-tertiary text-xs">16px</span>
|
|
1072
|
-
</div>
|
|
1073
|
-
<div className="text-center">
|
|
1074
|
-
<ExpandIcon className="text-fm-icon-positive !mx-auto mb-2 h-5 w-5" />
|
|
1075
|
-
<span className="text-fm-tertiary text-xs">20px</span>
|
|
1076
|
-
</div>
|
|
1077
|
-
<div className="text-center">
|
|
1078
|
-
<ExpandIcon className="text-fm-icon-positive !mx-auto mb-2 h-6 w-6" />
|
|
1079
|
-
<span className="text-fm-tertiary text-xs">24px</span>
|
|
1080
|
-
</div>
|
|
1081
|
-
<div className="text-center">
|
|
1082
|
-
<ExpandIcon className="text-fm-icon-positive !mx-auto mb-2 h-8 w-8" />
|
|
1083
|
-
<span className="text-fm-tertiary text-xs">32px</span>
|
|
1084
|
-
</div>
|
|
1085
|
-
<div className="text-center">
|
|
1086
|
-
<ExpandIcon className="text-fm-icon-positive !mx-auto mb-2 h-12 w-12" />
|
|
1087
|
-
<span className="text-fm-tertiary text-xs">48px</span>
|
|
1088
|
-
</div>
|
|
1089
|
-
</div>
|
|
1090
|
-
),
|
|
117
|
+
render: () => <IconSizeVariations icon={ExpandIcon} />,
|
|
1091
118
|
}
|
|
1092
119
|
|
|
1093
120
|
export const ColorVariations: Story = {
|
|
1094
|
-
|
|
1095
|
-
...storyParameters,
|
|
1096
|
-
docs: {
|
|
1097
|
-
description: {
|
|
1098
|
-
story:
|
|
1099
|
-
"ExpandIcon in different semantic colors for various expand and fullscreen applications.",
|
|
1100
|
-
},
|
|
1101
|
-
},
|
|
1102
|
-
},
|
|
1103
|
-
render: () => (
|
|
1104
|
-
<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">
|
|
1105
|
-
<div className="text-center">
|
|
1106
|
-
<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">
|
|
1107
|
-
<ExpandIcon className="text-fm-icon-positive h-8 w-8" />
|
|
1108
|
-
</div>
|
|
1109
|
-
<div className="text-fm-icon-active text-sm font-medium">Expand</div>
|
|
1110
|
-
<div className="text-fm-icon-positive text-xs">
|
|
1111
|
-
text-fm-icon-positive
|
|
1112
|
-
</div>
|
|
1113
|
-
</div>
|
|
1114
|
-
<div className="text-center">
|
|
1115
|
-
<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">
|
|
1116
|
-
<ExpandIcon className="text-fm-icon-info h-8 w-8" />
|
|
1117
|
-
</div>
|
|
1118
|
-
<div className="text-fm-icon-active text-sm font-medium">Maximize</div>
|
|
1119
|
-
<div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
|
|
1120
|
-
</div>
|
|
1121
|
-
<div className="text-center">
|
|
1122
|
-
<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">
|
|
1123
|
-
<ExpandIcon className="text-fm-icon-positive h-8 w-8" />
|
|
1124
|
-
</div>
|
|
1125
|
-
<div className="text-fm-icon-active text-sm font-medium">Active</div>
|
|
1126
|
-
<div className="text-fm-icon-positive text-xs">
|
|
1127
|
-
text-fm-icon-positive
|
|
1128
|
-
</div>
|
|
1129
|
-
</div>
|
|
1130
|
-
<div className="text-center">
|
|
1131
|
-
<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">
|
|
1132
|
-
<ExpandIcon className="text-fm-icon-info h-8 w-8" />
|
|
1133
|
-
</div>
|
|
1134
|
-
<div className="text-fm-icon-active text-sm font-medium">Focus</div>
|
|
1135
|
-
<div className="text-fm-icon-info text-xs">text-fm-icon-info</div>
|
|
1136
|
-
</div>
|
|
1137
|
-
</div>
|
|
1138
|
-
),
|
|
121
|
+
render: () => <IconColorVariations icon={ExpandIcon} />,
|
|
1139
122
|
}
|
|
1140
123
|
|
|
1141
124
|
export const UsageExamples: Story = {
|
|
1142
|
-
parameters: {
|
|
1143
|
-
...storyParameters,
|
|
1144
|
-
docs: {
|
|
1145
|
-
description: {
|
|
1146
|
-
story:
|
|
1147
|
-
"Real-world usage examples showing ExpandIcon in different fullscreen and maximize contexts.",
|
|
1148
|
-
},
|
|
1149
|
-
},
|
|
1150
|
-
},
|
|
1151
125
|
render: () => (
|
|
1152
|
-
<
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
<
|
|
1161
|
-
<div className="h-0 w-0 border-y-[6px] border-l-[8px] border-y-transparent border-l-white" />
|
|
1162
|
-
<span className="text-fm-icon-active text-sm">0:42 / 2:18</span>
|
|
1163
|
-
</div>
|
|
1164
|
-
<button className="border-fm-icon-positive/30 bg-fm-icon-positive/10 hover:bg-fm-icon-positive/20 rounded border p-2 transition-colors">
|
|
1165
|
-
<ExpandIcon className="text-fm-icon-positive h-4 w-4" />
|
|
1166
|
-
</button>
|
|
126
|
+
<IconUsageCanvas>
|
|
127
|
+
<IconUsageSection title="Media Player Expand">
|
|
128
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary flex w-full max-w-sm items-center justify-between rounded-xl border px-4 py-3">
|
|
129
|
+
<span className="text-fm-primary font-fm-text text-sm">
|
|
130
|
+
Now Playing
|
|
131
|
+
</span>
|
|
132
|
+
<div className="flex items-center gap-3">
|
|
133
|
+
<MinimizeIcon className="text-fm-icon-inactive h-4 w-4" />
|
|
134
|
+
<ExpandIcon className="text-fm-icon-active h-4 w-4" />
|
|
1167
135
|
</div>
|
|
1168
136
|
</div>
|
|
1169
|
-
</
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
137
|
+
</IconUsageSection>
|
|
138
|
+
|
|
139
|
+
<IconUsageSection title="Image Viewer">
|
|
140
|
+
<div className="border-fm-divider-secondary bg-fm-surface-secondary relative w-full max-w-sm overflow-hidden rounded-xl border">
|
|
141
|
+
<div className="bg-fm-divider-secondary h-32 w-full" />
|
|
142
|
+
<button className="bg-fm-surface-primary border-fm-divider-secondary absolute top-2 right-2 flex h-7 w-7 items-center justify-center rounded-lg border">
|
|
143
|
+
<ExpandIcon className="text-fm-icon-active h-4 w-4" />
|
|
144
|
+
</button>
|
|
145
|
+
</div>
|
|
146
|
+
</IconUsageSection>
|
|
147
|
+
|
|
148
|
+
<IconUsageSection title="Panel Toggle">
|
|
149
|
+
<div className="flex gap-2">
|
|
150
|
+
<button className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-2 rounded-xl border px-3 py-2">
|
|
151
|
+
<ExpandIcon className="text-fm-icon-active h-4 w-4" />
|
|
152
|
+
<span className="text-fm-primary font-fm-text text-sm">Expand</span>
|
|
153
|
+
</button>
|
|
154
|
+
<button className="border-fm-divider-secondary bg-fm-surface-secondary flex items-center gap-2 rounded-xl border px-3 py-2">
|
|
155
|
+
<MinimizeIcon className="text-fm-icon-inactive h-4 w-4" />
|
|
156
|
+
<span className="text-fm-secondary font-fm-text text-sm">
|
|
157
|
+
Minimize
|
|
158
|
+
</span>
|
|
159
|
+
</button>
|
|
1184
160
|
</div>
|
|
1185
|
-
</
|
|
1186
|
-
</
|
|
161
|
+
</IconUsageSection>
|
|
162
|
+
</IconUsageCanvas>
|
|
1187
163
|
),
|
|
1188
164
|
}
|
|
1189
165
|
|
|
1190
166
|
export const Playground: Story = {
|
|
1191
|
-
parameters: {
|
|
1192
|
-
...storyParameters,
|
|
1193
|
-
docs: {
|
|
1194
|
-
description: {
|
|
1195
|
-
story:
|
|
1196
|
-
"Interactive playground to experiment with different ExpandIcon configurations.",
|
|
1197
|
-
},
|
|
1198
|
-
},
|
|
1199
|
-
},
|
|
1200
167
|
args: {
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
className: "text-fm-icon-positive",
|
|
1204
|
-
strokeLinecap: "square",
|
|
168
|
+
className: "h-8 w-8 text-fm-icon-active",
|
|
169
|
+
withAccessibility: true,
|
|
1205
170
|
},
|
|
1206
171
|
render: (args) => (
|
|
1207
|
-
<
|
|
1208
|
-
<
|
|
1209
|
-
|
|
1210
|
-
</div>
|
|
1211
|
-
</div>
|
|
172
|
+
<IconPlaygroundCanvas>
|
|
173
|
+
<ExpandIcon {...args} />
|
|
174
|
+
</IconPlaygroundCanvas>
|
|
1212
175
|
),
|
|
1213
176
|
}
|