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