aural-ui 2.0.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/LICENSE +21 -0
- package/README.md +456 -0
- package/dist/components/aspect-ratio/AspectRatio.stories.tsx +1327 -0
- package/dist/components/aspect-ratio/index.tsx +10 -0
- package/dist/components/aspect-ratio/meta.ts +8 -0
- package/dist/components/avatar/Avatar.stories.tsx +645 -0
- package/dist/components/avatar/index.tsx +50 -0
- package/dist/components/avatar/meta.ts +8 -0
- package/dist/components/badge/Badge.stories.tsx +169 -0
- package/dist/components/badge/index.tsx +28 -0
- package/dist/components/badge/meta.ts +6 -0
- package/dist/components/banner/Banner.stories.tsx +475 -0
- package/dist/components/banner/index.tsx +256 -0
- package/dist/components/banner/meta.ts +36 -0
- package/dist/components/button/Button.stories.tsx +74 -0
- package/dist/components/button/index.tsx +158 -0
- package/dist/components/button/meta.ts +33 -0
- package/dist/components/card/Card.stories.tsx +377 -0
- package/dist/components/card/index.tsx +85 -0
- package/dist/components/card/meta.ts +14 -0
- package/dist/components/char-count/CharCount.stories.tsx +334 -0
- package/dist/components/char-count/index.tsx +51 -0
- package/dist/components/char-count/meta.ts +13 -0
- package/dist/components/checkbox/Checkbox.stories.tsx +209 -0
- package/dist/components/checkbox/index.tsx +34 -0
- package/dist/components/checkbox/meta.ts +19 -0
- package/dist/components/chip/Chip.stories.tsx +207 -0
- package/dist/components/chip/index.tsx +92 -0
- package/dist/components/chip/meta.ts +17 -0
- package/dist/components/circular-loader/CircularLoader.stories.tsx +741 -0
- package/dist/components/circular-loader/index.tsx +138 -0
- package/dist/components/circular-loader/meta.ts +11 -0
- package/dist/components/collapsible/Collapsible.stories.tsx +319 -0
- package/dist/components/collapsible/index.tsx +158 -0
- package/dist/components/collapsible/meta.ts +22 -0
- package/dist/components/command/Command.stories.tsx +996 -0
- package/dist/components/command/index.tsx +324 -0
- package/dist/components/command/meta.ts +18 -0
- package/dist/components/dialog/Dialog.stories.tsx +963 -0
- package/dist/components/dialog/index.tsx +250 -0
- package/dist/components/dialog/meta.ts +28 -0
- package/dist/components/divider/Divider.stories.tsx +633 -0
- package/dist/components/divider/index.tsx +181 -0
- package/dist/components/divider/meta.ts +12 -0
- package/dist/components/dot-loader/DotLoader.stories.tsx +352 -0
- package/dist/components/dot-loader/index.tsx +78 -0
- package/dist/components/dot-loader/meta.ts +14 -0
- package/dist/components/dropdown/Dropdown.stories.tsx +1210 -0
- package/dist/components/dropdown/index.tsx +479 -0
- package/dist/components/dropdown/meta.ts +21 -0
- package/dist/components/form/Form.stories.tsx +320 -0
- package/dist/components/form/index.tsx +183 -0
- package/dist/components/form/meta.ts +11 -0
- package/dist/components/helper-text/HelperText.stories.tsx +254 -0
- package/dist/components/helper-text/index.tsx +102 -0
- package/dist/components/helper-text/meta.ts +18 -0
- package/dist/components/hover-card/HoverCard.stories.tsx +1328 -0
- package/dist/components/hover-card/index.tsx +42 -0
- package/dist/components/hover-card/meta.ts +12 -0
- package/dist/components/icon-button/IconButton.stories.tsx +252 -0
- package/dist/components/icon-button/index.tsx +130 -0
- package/dist/components/icon-button/meta.ts +20 -0
- package/dist/components/if-else/if-else.stories.tsx +100 -0
- package/dist/components/if-else/index.tsx +56 -0
- package/dist/components/if-else/meta.ts +6 -0
- package/dist/components/index.ts +70 -0
- package/dist/components/input/Input.stories.tsx +431 -0
- package/dist/components/input/index.tsx +487 -0
- package/dist/components/input/meta.ts +28 -0
- package/dist/components/label/Label.stories.tsx +200 -0
- package/dist/components/label/index.tsx +43 -0
- package/dist/components/label/meta.ts +14 -0
- package/dist/components/list/List.stories.tsx +963 -0
- package/dist/components/list/index.tsx +567 -0
- package/dist/components/list/meta.ts +24 -0
- package/dist/components/marquee/Marquee.stories.tsx +819 -0
- package/dist/components/marquee/index.tsx +107 -0
- package/dist/components/marquee/meta.ts +6 -0
- package/dist/components/overlay/Overlay.stories.tsx +954 -0
- package/dist/components/overlay/index.tsx +58 -0
- package/dist/components/overlay/meta.ts +10 -0
- package/dist/components/pagination/Pagination.stories.tsx +354 -0
- package/dist/components/pagination/index.tsx +455 -0
- package/dist/components/pagination/meta.ts +29 -0
- package/dist/components/popover/Popover.stories.tsx +1037 -0
- package/dist/components/popover/index.tsx +67 -0
- package/dist/components/popover/meta.ts +12 -0
- package/dist/components/radio/Radio.stories.tsx +146 -0
- package/dist/components/radio/index.tsx +41 -0
- package/dist/components/radio/meta.ts +19 -0
- package/dist/components/resizable/Resizable.stories.tsx +866 -0
- package/dist/components/resizable/index.tsx +55 -0
- package/dist/components/resizable/meta.ts +12 -0
- package/dist/components/scroll-area/ScrollArea.stories.tsx +1104 -0
- package/dist/components/scroll-area/index.tsx +55 -0
- package/dist/components/scroll-area/meta.ts +8 -0
- package/dist/components/search/Search.stories.tsx +678 -0
- package/dist/components/search/index.tsx +141 -0
- package/dist/components/search/meta.ts +6 -0
- package/dist/components/select/Select.stories.tsx +962 -0
- package/dist/components/select/index.tsx +512 -0
- package/dist/components/select/meta.ts +40 -0
- package/dist/components/sheet/Sheet.stories.tsx +1060 -0
- package/dist/components/sheet/index.tsx +440 -0
- package/dist/components/sheet/meta.ts +38 -0
- package/dist/components/skelton/Skelton.stories.tsx +859 -0
- package/dist/components/skelton/index.tsx +17 -0
- package/dist/components/skelton/meta.ts +6 -0
- package/dist/components/slider/Slider.stories.tsx +876 -0
- package/dist/components/slider/index.tsx +156 -0
- package/dist/components/slider/meta.ts +29 -0
- package/dist/components/stepper/Stepper.stories.tsx +639 -0
- package/dist/components/stepper/index.tsx +650 -0
- package/dist/components/stepper/meta.ts +19 -0
- package/dist/components/switch/Switch.stories.tsx +85 -0
- package/dist/components/switch/index.tsx +37 -0
- package/dist/components/switch/meta.ts +24 -0
- package/dist/components/switch-case/SwitchCase.stories.tsx +209 -0
- package/dist/components/switch-case/index.tsx +89 -0
- package/dist/components/switch-case/meta.ts +6 -0
- package/dist/components/table/Table.stories.tsx +1095 -0
- package/dist/components/table/index.tsx +113 -0
- package/dist/components/table/meta.ts +20 -0
- package/dist/components/tabs/Tabs.stories.tsx +1379 -0
- package/dist/components/tabs/index.tsx +186 -0
- package/dist/components/tabs/meta.ts +25 -0
- package/dist/components/tag/Tag.stories.tsx +625 -0
- package/dist/components/tag/index.tsx +320 -0
- package/dist/components/tag/meta.ts +52 -0
- package/dist/components/textarea/TextArea.stories.tsx +723 -0
- package/dist/components/textarea/index.tsx +480 -0
- package/dist/components/textarea/meta.ts +23 -0
- package/dist/components/toast/Toast.stories.tsx +1427 -0
- package/dist/components/toast/index.tsx +26 -0
- package/dist/components/toast/meta.ts +19 -0
- package/dist/components/toggle/Toggle.stories.tsx +1093 -0
- package/dist/components/toggle/index.tsx +44 -0
- package/dist/components/toggle/meta.ts +19 -0
- package/dist/components/tooltip/Tooltip.stories.tsx +1548 -0
- package/dist/components/tooltip/index.tsx +304 -0
- package/dist/components/tooltip/meta.ts +21 -0
- package/dist/components/typography/Typography.stories.tsx +197 -0
- package/dist/components/typography/index.tsx +184 -0
- package/dist/components/typography/meta.ts +38 -0
- package/dist/fonts/LabGrotesque-Regular.ttf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Bold.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Light.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Medium.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Regular.otf +0 -0
- package/dist/fonts/PPSupplySans-Regular (1).otf +0 -0
- package/dist/fonts/PPSupplySans-Regular.otf +0 -0
- package/dist/fonts/PPSupplySans-Ultralight.otf +0 -0
- package/dist/hooks/index.ts +3 -0
- package/dist/hooks/use-previous/UsePrevious.stories.tsx +997 -0
- package/dist/hooks/use-previous/index.ts +15 -0
- package/dist/hooks/use-previous/meta.ts +6 -0
- package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +983 -0
- package/dist/hooks/use-standalone-pagination/index.ts +146 -0
- package/dist/hooks/use-standalone-pagination/meta.ts +6 -0
- package/dist/icons/Icons.stories.tsx +29 -0
- package/dist/icons/alert-icon/AlertIcon.stories.tsx +991 -0
- package/dist/icons/alert-icon/index.tsx +48 -0
- package/dist/icons/alert-icon/meta.ts +8 -0
- package/dist/icons/all-icons.tsx +738 -0
- package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +1031 -0
- package/dist/icons/angle-down-icon/index.tsx +25 -0
- package/dist/icons/angle-down-icon/meta.ts +8 -0
- package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +1080 -0
- package/dist/icons/arrow-box-left-icon/index.tsx +24 -0
- package/dist/icons/arrow-box-left-icon/meta.ts +8 -0
- package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +1151 -0
- package/dist/icons/arrow-right-icon/index.tsx +26 -0
- package/dist/icons/arrow-right-icon/meta.ts +8 -0
- package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +1273 -0
- package/dist/icons/arrow-right-up-icon/index.tsx +24 -0
- package/dist/icons/arrow-right-up-icon/meta.ts +8 -0
- package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +670 -0
- package/dist/icons/art-board-icon/index.tsx +24 -0
- package/dist/icons/art-board-icon/meta.ts +7 -0
- package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +1244 -0
- package/dist/icons/audio-bar-icon/index.tsx +19 -0
- package/dist/icons/audio-bar-icon/meta.ts +8 -0
- package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +1239 -0
- package/dist/icons/bubble-check-icon/index.tsx +24 -0
- package/dist/icons/bubble-check-icon/meta.ts +8 -0
- package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +1228 -0
- package/dist/icons/bubble-crossed-icon/index.tsx +24 -0
- package/dist/icons/bubble-crossed-icon/meta.ts +8 -0
- package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +912 -0
- package/dist/icons/bubble-sparkle-icon/index.tsx +26 -0
- package/dist/icons/bubble-sparkle-icon/meta.ts +8 -0
- package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-double-left-icon/index.tsx +34 -0
- package/dist/icons/chevron-double-left-icon/meta.ts +8 -0
- package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-double-right-icon/index.tsx +34 -0
- package/dist/icons/chevron-double-right-icon/meta.ts +8 -0
- package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +1001 -0
- package/dist/icons/chevron-down-icon/index.tsx +27 -0
- package/dist/icons/chevron-down-icon/meta.ts +8 -0
- package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +1029 -0
- package/dist/icons/chevron-left-icon/index.tsx +27 -0
- package/dist/icons/chevron-left-icon/meta.ts +8 -0
- package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-right-icon/index.tsx +27 -0
- package/dist/icons/chevron-right-icon/meta.ts +8 -0
- package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +1036 -0
- package/dist/icons/chevron-up-icon/index.tsx +27 -0
- package/dist/icons/chevron-up-icon/meta.ts +8 -0
- package/dist/icons/command-icon/CommandIcon.stories.tsx +1098 -0
- package/dist/icons/command-icon/index.tsx +24 -0
- package/dist/icons/command-icon/meta.ts +8 -0
- package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +1061 -0
- package/dist/icons/cross-circle-icon/index.tsx +23 -0
- package/dist/icons/cross-circle-icon/meta.ts +8 -0
- package/dist/icons/cross-icon/CrossIcon.stories.tsx +1027 -0
- package/dist/icons/cross-icon/index.tsx +24 -0
- package/dist/icons/cross-icon/meta.ts +8 -0
- package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +1092 -0
- package/dist/icons/edit-big-icon/index.tsx +22 -0
- package/dist/icons/edit-big-icon/meta.ts +8 -0
- package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +1090 -0
- package/dist/icons/eye-close-icon/index.tsx +26 -0
- package/dist/icons/eye-close-icon/meta.ts +8 -0
- package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +1098 -0
- package/dist/icons/eye-open-icon/index.tsx +24 -0
- package/dist/icons/eye-open-icon/meta.ts +8 -0
- package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +1071 -0
- package/dist/icons/feature-shine-icon/index.tsx +29 -0
- package/dist/icons/feature-shine-icon/meta.ts +8 -0
- package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +1115 -0
- package/dist/icons/file-chart-icon/index.tsx +24 -0
- package/dist/icons/file-chart-icon/meta.ts +8 -0
- package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +668 -0
- package/dist/icons/file-text-icon/index.tsx +24 -0
- package/dist/icons/file-text-icon/meta.ts +8 -0
- package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +1239 -0
- package/dist/icons/grip-vertical-icon/index.tsx +28 -0
- package/dist/icons/grip-vertical-icon/meta.ts +8 -0
- package/dist/icons/image-icon/ImageIcon.stories.tsx +1181 -0
- package/dist/icons/image-icon/index.tsx +24 -0
- package/dist/icons/image-icon/meta.ts +8 -0
- package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +1248 -0
- package/dist/icons/import-folder-icon/index.tsx +22 -0
- package/dist/icons/import-folder-icon/meta.ts +8 -0
- package/dist/icons/index.ts +46 -0
- package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +1272 -0
- package/dist/icons/light-bulb-simple-icon/index.tsx +24 -0
- package/dist/icons/light-bulb-simple-icon/meta.ts +8 -0
- package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +1245 -0
- package/dist/icons/magic-book-icon/index.tsx +32 -0
- package/dist/icons/magic-book-icon/meta.ts +8 -0
- package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +1251 -0
- package/dist/icons/maintenance-icon/index.tsx +23 -0
- package/dist/icons/maintenance-icon/meta.ts +8 -0
- package/dist/icons/message-icon/MessageIcon.stories.tsx +595 -0
- package/dist/icons/message-icon/index.tsx +30 -0
- package/dist/icons/message-icon/meta.ts +8 -0
- package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +1245 -0
- package/dist/icons/move-horizontal-icon/index.tsx +23 -0
- package/dist/icons/move-horizontal-icon/meta.ts +8 -0
- package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +1196 -0
- package/dist/icons/move-vertical-icon/index.tsx +23 -0
- package/dist/icons/move-vertical-icon/meta.ts +8 -0
- package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +1167 -0
- package/dist/icons/page-search-icon/index.tsx +21 -0
- package/dist/icons/page-search-icon/meta.ts +8 -0
- package/dist/icons/pencil-icon/PencilIcon.stories.tsx +1131 -0
- package/dist/icons/pencil-icon/index.tsx +21 -0
- package/dist/icons/pencil-icon/meta.ts +8 -0
- package/dist/icons/plus-icon/PlusIcon.stories.tsx +1151 -0
- package/dist/icons/plus-icon/index.tsx +24 -0
- package/dist/icons/plus-icon/meta.ts +8 -0
- package/dist/icons/search-icon/SearchIcon.stories.tsx +1181 -0
- package/dist/icons/search-icon/index.tsx +24 -0
- package/dist/icons/search-icon/meta.ts +8 -0
- package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +1167 -0
- package/dist/icons/site-logo-icon/index.tsx +79 -0
- package/dist/icons/site-logo-icon/meta.ts +8 -0
- package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +637 -0
- package/dist/icons/spinner-gradient-icon/index.tsx +53 -0
- package/dist/icons/spinner-gradient-icon/meta.ts +8 -0
- package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +644 -0
- package/dist/icons/spinner-solid-icon/index.tsx +59 -0
- package/dist/icons/spinner-solid-icon/meta.ts +8 -0
- package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +736 -0
- package/dist/icons/spinner-solid-neutral-icon/index.tsx +53 -0
- package/dist/icons/spinner-solid-neutral-icon/meta.ts +8 -0
- package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +1204 -0
- package/dist/icons/tick-circle-icon/index.tsx +23 -0
- package/dist/icons/tick-circle-icon/meta.ts +8 -0
- package/dist/icons/tick-icon/TickIcon.stories.tsx +1340 -0
- package/dist/icons/tick-icon/index.tsx +24 -0
- package/dist/icons/tick-icon/meta.ts +8 -0
- package/dist/icons/trash-icon/TrashIcon.stories.tsx +996 -0
- package/dist/icons/trash-icon/index.tsx +24 -0
- package/dist/icons/trash-icon/meta.ts +8 -0
- package/dist/icons/upload-icon/UploadIcon.stories.tsx +947 -0
- package/dist/icons/upload-icon/index.tsx +24 -0
- package/dist/icons/upload-icon/meta.ts +8 -0
- package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +1045 -0
- package/dist/icons/vertical-menu-icon/index.tsx +27 -0
- package/dist/icons/vertical-menu-icon/meta.ts +8 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +206 -0
- package/dist/lib/utils.ts +6 -0
- package/dist/styles/aural-theme.css +1008 -0
- package/package.json +142 -0
|
@@ -0,0 +1,1181 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
|
|
4
|
+
import { ImageIcon } from "."
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof ImageIcon> = {
|
|
7
|
+
title: "Icons/ImageIcon",
|
|
8
|
+
component: ImageIcon,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "fullscreen",
|
|
11
|
+
backgrounds: {
|
|
12
|
+
default: "dark",
|
|
13
|
+
values: [
|
|
14
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
15
|
+
{ name: "darker", value: "#000000" },
|
|
16
|
+
{ name: "light", value: "#ffffff" },
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
docs: {
|
|
20
|
+
page: () => (
|
|
21
|
+
<>
|
|
22
|
+
{/* Override default docs styling */}
|
|
23
|
+
<style>
|
|
24
|
+
{`
|
|
25
|
+
.sbdocs-wrapper {
|
|
26
|
+
padding: 0 ;
|
|
27
|
+
max-width: none ;
|
|
28
|
+
background: transparent ;
|
|
29
|
+
}
|
|
30
|
+
.sbdocs-content {
|
|
31
|
+
max-width: none ;
|
|
32
|
+
padding: 0 ;
|
|
33
|
+
margin: 0 ;
|
|
34
|
+
background: transparent ;
|
|
35
|
+
}
|
|
36
|
+
.docs-story {
|
|
37
|
+
background: transparent ;
|
|
38
|
+
}
|
|
39
|
+
.sbdocs {
|
|
40
|
+
background: transparent ;
|
|
41
|
+
}
|
|
42
|
+
body {
|
|
43
|
+
background: #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
|
+
@keyframes shimmer {
|
|
81
|
+
0% { transform: translateX(-100%); }
|
|
82
|
+
100% { transform: translateX(100%); }
|
|
83
|
+
}
|
|
84
|
+
.animate-shimmer {
|
|
85
|
+
animation: shimmer 2s ease-in-out infinite;
|
|
86
|
+
}
|
|
87
|
+
`}
|
|
88
|
+
</style>
|
|
89
|
+
|
|
90
|
+
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-purple-900/20 to-gray-900">
|
|
91
|
+
{/* Header */}
|
|
92
|
+
<div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
|
|
93
|
+
<div className="absolute inset-0 bg-gradient-to-r from-blue-500/10 via-transparent to-green-500/10" />
|
|
94
|
+
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
95
|
+
<div className="!space-y-6 text-center">
|
|
96
|
+
<div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-blue-500/30 bg-gradient-to-br from-blue-500/20 to-green-500/20">
|
|
97
|
+
<ImageIcon className="h-12 w-12 text-blue-400" />
|
|
98
|
+
</div>
|
|
99
|
+
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
100
|
+
ImageIcon
|
|
101
|
+
</h1>
|
|
102
|
+
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
103
|
+
A versatile image icon for media representations,
|
|
104
|
+
placeholders, and visual content indicators. Features a
|
|
105
|
+
clean design with a mountain landscape silhouette and a sun
|
|
106
|
+
element. Built with accessibility in mind using Radix UI's
|
|
107
|
+
AccessibleIcon wrapper.
|
|
108
|
+
</p>
|
|
109
|
+
|
|
110
|
+
{/* Stats */}
|
|
111
|
+
<div className="flex items-center justify-center gap-8 pt-8">
|
|
112
|
+
<div className="text-center">
|
|
113
|
+
<div className="text-3xl font-bold text-blue-300">
|
|
114
|
+
Visual
|
|
115
|
+
</div>
|
|
116
|
+
<div className="text-sm text-white/60">
|
|
117
|
+
Media representation
|
|
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
|
+
Flexible
|
|
124
|
+
</div>
|
|
125
|
+
<div className="text-sm text-white/60">
|
|
126
|
+
Gallery & uploads
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
<div className="h-8 w-px bg-white/20" />
|
|
130
|
+
<div className="text-center">
|
|
131
|
+
<div className="text-3xl font-bold text-cyan-300">
|
|
132
|
+
Intuitive
|
|
133
|
+
</div>
|
|
134
|
+
<div className="text-sm text-white/60">
|
|
135
|
+
Universal recognition
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
|
|
143
|
+
{/* Content */}
|
|
144
|
+
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
145
|
+
{/* Quick Usage */}
|
|
146
|
+
<div className="!space-y-8">
|
|
147
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
148
|
+
Quick Start
|
|
149
|
+
</h2>
|
|
150
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
151
|
+
<div className="!space-y-4">
|
|
152
|
+
<h3 className="text-xl font-semibold !text-blue-300">
|
|
153
|
+
Basic Usage
|
|
154
|
+
</h3>
|
|
155
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
156
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
157
|
+
{`import { ImageIcon } from "@icons/image-icon"
|
|
158
|
+
|
|
159
|
+
function MediaUpload() {
|
|
160
|
+
return (
|
|
161
|
+
<div className="flex items-center gap-3">
|
|
162
|
+
<ImageIcon className="h-6 w-6 text-blue-400 " />
|
|
163
|
+
<span>Upload Images</span>
|
|
164
|
+
</div>
|
|
165
|
+
)
|
|
166
|
+
}`}
|
|
167
|
+
</pre>
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
<div className="!space-y-4">
|
|
172
|
+
<h3 className="text-xl font-semibold !text-blue-300">
|
|
173
|
+
Live Preview
|
|
174
|
+
</h3>
|
|
175
|
+
<div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
176
|
+
<div className="flex items-center gap-3 rounded-lg border border-blue-500/20 bg-blue-500/10 px-4 py-3">
|
|
177
|
+
<ImageIcon className="h-6 w-6 text-blue-400" />
|
|
178
|
+
<span className="text-white">Upload Images</span>
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
</div>
|
|
184
|
+
|
|
185
|
+
{/* Props Documentation */}
|
|
186
|
+
<div className="!space-y-8">
|
|
187
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
188
|
+
Props & Configuration
|
|
189
|
+
</h2>
|
|
190
|
+
|
|
191
|
+
<div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
|
|
192
|
+
<div className="bg-white/5 p-4">
|
|
193
|
+
<h3 className="text-xl font-semibold !text-white">Props</h3>
|
|
194
|
+
</div>
|
|
195
|
+
<table className="!my-0 w-full">
|
|
196
|
+
<thead className="bg-white/5">
|
|
197
|
+
<tr className="border-b border-white/10">
|
|
198
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
199
|
+
Prop
|
|
200
|
+
</th>
|
|
201
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
202
|
+
Type
|
|
203
|
+
</th>
|
|
204
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
205
|
+
Default
|
|
206
|
+
</th>
|
|
207
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
208
|
+
Description
|
|
209
|
+
</th>
|
|
210
|
+
</tr>
|
|
211
|
+
</thead>
|
|
212
|
+
<tbody>
|
|
213
|
+
<tr className="border-b border-white/5">
|
|
214
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
215
|
+
width
|
|
216
|
+
</td>
|
|
217
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
218
|
+
number | string
|
|
219
|
+
</td>
|
|
220
|
+
<td className="px-6 py-4 text-sm !text-white/50">24</td>
|
|
221
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
222
|
+
Width of the icon in pixels
|
|
223
|
+
</td>
|
|
224
|
+
</tr>
|
|
225
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
226
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
227
|
+
height
|
|
228
|
+
</td>
|
|
229
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
230
|
+
number | string
|
|
231
|
+
</td>
|
|
232
|
+
<td className="px-6 py-4 text-sm !text-white/50">24</td>
|
|
233
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
234
|
+
Height of the icon in pixels
|
|
235
|
+
</td>
|
|
236
|
+
</tr>
|
|
237
|
+
<tr className="border-b border-white/5">
|
|
238
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
239
|
+
stroke
|
|
240
|
+
</td>
|
|
241
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
242
|
+
string
|
|
243
|
+
</td>
|
|
244
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
245
|
+
currentColor
|
|
246
|
+
</td>
|
|
247
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
248
|
+
Stroke color of the image outline
|
|
249
|
+
</td>
|
|
250
|
+
</tr>
|
|
251
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
252
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
253
|
+
strokeWidth
|
|
254
|
+
</td>
|
|
255
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
256
|
+
string | number
|
|
257
|
+
</td>
|
|
258
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
259
|
+
1.5
|
|
260
|
+
</td>
|
|
261
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
262
|
+
Stroke width of the outline
|
|
263
|
+
</td>
|
|
264
|
+
</tr>
|
|
265
|
+
<tr className="border-b border-white/5">
|
|
266
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
267
|
+
fill
|
|
268
|
+
</td>
|
|
269
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
270
|
+
string
|
|
271
|
+
</td>
|
|
272
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
273
|
+
none
|
|
274
|
+
</td>
|
|
275
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
276
|
+
Fill color of the icon
|
|
277
|
+
</td>
|
|
278
|
+
</tr>
|
|
279
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
280
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
281
|
+
className
|
|
282
|
+
</td>
|
|
283
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
284
|
+
string
|
|
285
|
+
</td>
|
|
286
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
287
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
288
|
+
CSS classes for styling (use for overrides)
|
|
289
|
+
</td>
|
|
290
|
+
</tr>
|
|
291
|
+
<tr className="!bg-black/10">
|
|
292
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
293
|
+
...svgProps
|
|
294
|
+
</td>
|
|
295
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
296
|
+
SVGProps
|
|
297
|
+
</td>
|
|
298
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
299
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
300
|
+
All standard SVG element props
|
|
301
|
+
</td>
|
|
302
|
+
</tr>
|
|
303
|
+
</tbody>
|
|
304
|
+
</table>
|
|
305
|
+
</div>
|
|
306
|
+
</div>
|
|
307
|
+
|
|
308
|
+
{/* Size Variations */}
|
|
309
|
+
<div className="!space-y-8">
|
|
310
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
311
|
+
Size Variations
|
|
312
|
+
</h2>
|
|
313
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
314
|
+
<div className="!space-y-6">
|
|
315
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
316
|
+
<div className="!space-y-4">
|
|
317
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
318
|
+
Standard Sizes
|
|
319
|
+
</h3>
|
|
320
|
+
<div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
|
|
321
|
+
<div className="text-center">
|
|
322
|
+
<ImageIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
|
|
323
|
+
<span className="text-xs text-white/60">12px</span>
|
|
324
|
+
</div>
|
|
325
|
+
<div className="text-center">
|
|
326
|
+
<ImageIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
|
|
327
|
+
<span className="text-xs text-white/60">16px</span>
|
|
328
|
+
</div>
|
|
329
|
+
<div className="text-center">
|
|
330
|
+
<ImageIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
|
|
331
|
+
<span className="text-xs text-white/60">20px</span>
|
|
332
|
+
</div>
|
|
333
|
+
<div className="text-center">
|
|
334
|
+
<ImageIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
|
|
335
|
+
<span className="text-xs text-white/60">24px</span>
|
|
336
|
+
</div>
|
|
337
|
+
<div className="text-center">
|
|
338
|
+
<ImageIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
|
|
339
|
+
<span className="text-xs text-white/60">32px</span>
|
|
340
|
+
</div>
|
|
341
|
+
<div className="text-center">
|
|
342
|
+
<ImageIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
|
|
343
|
+
<span className="text-xs text-white/60">48px</span>
|
|
344
|
+
</div>
|
|
345
|
+
</div>
|
|
346
|
+
</div>
|
|
347
|
+
|
|
348
|
+
<div className="!space-y-4">
|
|
349
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
350
|
+
Code Example
|
|
351
|
+
</h3>
|
|
352
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
353
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
354
|
+
{`// Small (16px)
|
|
355
|
+
<ImageIcon className="h-4 w-4 " />
|
|
356
|
+
|
|
357
|
+
// Medium (24px)
|
|
358
|
+
<ImageIcon className="h-6 w-6 " />
|
|
359
|
+
|
|
360
|
+
// Large (32px)
|
|
361
|
+
<ImageIcon className="h-8 w-8 " />
|
|
362
|
+
|
|
363
|
+
// Custom size for placeholders
|
|
364
|
+
<ImageIcon
|
|
365
|
+
width={64}
|
|
366
|
+
height={64}
|
|
367
|
+
className="text-gray-400 "
|
|
368
|
+
/>`}
|
|
369
|
+
</pre>
|
|
370
|
+
</div>
|
|
371
|
+
</div>
|
|
372
|
+
</div>
|
|
373
|
+
</div>
|
|
374
|
+
</div>
|
|
375
|
+
</div>
|
|
376
|
+
|
|
377
|
+
{/* Color Variations */}
|
|
378
|
+
<div className="!space-y-8">
|
|
379
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
380
|
+
Color Variations
|
|
381
|
+
</h2>
|
|
382
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
383
|
+
<div className="!space-y-4">
|
|
384
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
385
|
+
Semantic Colors
|
|
386
|
+
</h3>
|
|
387
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
388
|
+
<div className="flex items-center gap-4">
|
|
389
|
+
<ImageIcon className="h-6 w-6 text-blue-400" />
|
|
390
|
+
<div>
|
|
391
|
+
<div className="text-sm font-medium text-white">
|
|
392
|
+
Primary
|
|
393
|
+
</div>
|
|
394
|
+
<div className="text-xs text-white/60">
|
|
395
|
+
text-blue-400
|
|
396
|
+
</div>
|
|
397
|
+
</div>
|
|
398
|
+
</div>
|
|
399
|
+
<div className="flex items-center gap-4">
|
|
400
|
+
<ImageIcon className="h-6 w-6 text-green-400" />
|
|
401
|
+
<div>
|
|
402
|
+
<div className="text-sm font-medium text-white">
|
|
403
|
+
Success
|
|
404
|
+
</div>
|
|
405
|
+
<div className="text-xs text-white/60">
|
|
406
|
+
text-green-400
|
|
407
|
+
</div>
|
|
408
|
+
</div>
|
|
409
|
+
</div>
|
|
410
|
+
<div className="flex items-center gap-4">
|
|
411
|
+
<ImageIcon className="h-6 w-6 text-gray-400" />
|
|
412
|
+
<div>
|
|
413
|
+
<div className="text-sm font-medium text-white">
|
|
414
|
+
Muted
|
|
415
|
+
</div>
|
|
416
|
+
<div className="text-xs text-white/60">
|
|
417
|
+
text-gray-400
|
|
418
|
+
</div>
|
|
419
|
+
</div>
|
|
420
|
+
</div>
|
|
421
|
+
<div className="flex items-center gap-4">
|
|
422
|
+
<ImageIcon className="h-6 w-6 text-white/30" />
|
|
423
|
+
<div>
|
|
424
|
+
<div className="text-sm font-medium text-white">
|
|
425
|
+
Disabled
|
|
426
|
+
</div>
|
|
427
|
+
<div className="text-xs text-white/60">
|
|
428
|
+
text-white/30
|
|
429
|
+
</div>
|
|
430
|
+
</div>
|
|
431
|
+
</div>
|
|
432
|
+
</div>
|
|
433
|
+
</div>
|
|
434
|
+
|
|
435
|
+
<div className="!space-y-4">
|
|
436
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
437
|
+
Custom Colors
|
|
438
|
+
</h3>
|
|
439
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
440
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
441
|
+
{`// Using Tailwind classes with
|
|
442
|
+
<ImageIcon className="h-6 w-6 text-blue-400 " />
|
|
443
|
+
<ImageIcon className="h-6 w-6 text-green-500 " />
|
|
444
|
+
|
|
445
|
+
// Using CSS custom properties
|
|
446
|
+
<ImageIcon
|
|
447
|
+
className="h-6 w-6 "
|
|
448
|
+
style={{ color: 'var(--color-primary)' }}
|
|
449
|
+
/>
|
|
450
|
+
|
|
451
|
+
// Direct stroke prop
|
|
452
|
+
<ImageIcon
|
|
453
|
+
width={24}
|
|
454
|
+
height={24}
|
|
455
|
+
stroke="#3b82f6"
|
|
456
|
+
/>`}
|
|
457
|
+
</pre>
|
|
458
|
+
</div>
|
|
459
|
+
</div>
|
|
460
|
+
</div>
|
|
461
|
+
</div>
|
|
462
|
+
|
|
463
|
+
{/* Usage Examples */}
|
|
464
|
+
<div className="!space-y-8">
|
|
465
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
466
|
+
Usage Examples
|
|
467
|
+
</h2>
|
|
468
|
+
|
|
469
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
470
|
+
{/* Image Upload */}
|
|
471
|
+
<div className="!space-y-4">
|
|
472
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
473
|
+
Image Upload
|
|
474
|
+
</h3>
|
|
475
|
+
<div className="!space-y-4">
|
|
476
|
+
<div className="relative rounded-lg border-2 border-dashed border-white/20 bg-white/5 p-8 text-center transition-colors hover:border-blue-400/50 hover:bg-blue-500/10">
|
|
477
|
+
<ImageIcon className="!mx-auto h-12 w-12 text-white/40" />
|
|
478
|
+
<h4 className="mt-4 text-lg font-medium !text-white">
|
|
479
|
+
Upload Images
|
|
480
|
+
</h4>
|
|
481
|
+
<p className="mt-2 text-sm !text-white/60">
|
|
482
|
+
Drag and drop your images here, or click to browse
|
|
483
|
+
</p>
|
|
484
|
+
<button className="mt-4 rounded-lg bg-blue-500/20 px-4 py-2 text-blue-300 transition-colors hover:bg-blue-500/30">
|
|
485
|
+
Browse Files
|
|
486
|
+
</button>
|
|
487
|
+
</div>
|
|
488
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
489
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
490
|
+
{`<div className="relative border-2 border-dashed border-white/20 bg-white/5 p-8 text-center rounded-lg hover:border-blue-400/50 hover:bg-blue-500/10 transition-colors">
|
|
491
|
+
<ImageIcon className="mx-auto h-12 w-12 text-white/40 " />
|
|
492
|
+
<h4 className="mt-4 text-lg font-medium text-white">Upload Images</h4>
|
|
493
|
+
<p className="mt-2 text-sm text-white/60">
|
|
494
|
+
Drag and drop your images here, or click to browse
|
|
495
|
+
</p>
|
|
496
|
+
<button className="mt-4 bg-blue-500/20 px-4 py-2 rounded-lg text-blue-300 hover:bg-blue-500/30 transition-colors">
|
|
497
|
+
Browse Files
|
|
498
|
+
</button>
|
|
499
|
+
</div>`}
|
|
500
|
+
</pre>
|
|
501
|
+
</div>
|
|
502
|
+
</div>
|
|
503
|
+
</div>
|
|
504
|
+
|
|
505
|
+
{/* Gallery Placeholder */}
|
|
506
|
+
<div className="!space-y-4">
|
|
507
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
508
|
+
Gallery Placeholder
|
|
509
|
+
</h3>
|
|
510
|
+
<div className="!space-y-4">
|
|
511
|
+
<div className="grid grid-cols-3 gap-4">
|
|
512
|
+
{[1, 2, 3, 4, 5, 6].map((item) => (
|
|
513
|
+
<div
|
|
514
|
+
key={item}
|
|
515
|
+
className="flex aspect-square items-center justify-center rounded-lg border border-white/10 bg-white/5 p-4 transition-colors hover:bg-white/10"
|
|
516
|
+
>
|
|
517
|
+
<ImageIcon className="h-8 w-8 text-white/30" />
|
|
518
|
+
</div>
|
|
519
|
+
))}
|
|
520
|
+
</div>
|
|
521
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
522
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
523
|
+
{`// Gallery grid with placeholders
|
|
524
|
+
<div className="grid grid-cols-3 gap-4">
|
|
525
|
+
{placeholders.map((item) => (
|
|
526
|
+
<div
|
|
527
|
+
key={item}
|
|
528
|
+
className="aspect-square border border-white/10 bg-white/5 p-4 flex items-center justify-center rounded-lg hover:bg-white/10 transition-colors"
|
|
529
|
+
>
|
|
530
|
+
<ImageIcon className="h-8 w-8 text-white/30 " />
|
|
531
|
+
</div>
|
|
532
|
+
))}
|
|
533
|
+
</div>`}
|
|
534
|
+
</pre>
|
|
535
|
+
</div>
|
|
536
|
+
</div>
|
|
537
|
+
</div>
|
|
538
|
+
|
|
539
|
+
{/* Media Card */}
|
|
540
|
+
<div className="!space-y-4">
|
|
541
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
542
|
+
Media Cards
|
|
543
|
+
</h3>
|
|
544
|
+
<div className="!space-y-4">
|
|
545
|
+
<div className="!space-y-4">
|
|
546
|
+
{[
|
|
547
|
+
"Photo Gallery",
|
|
548
|
+
"Video Collection",
|
|
549
|
+
"Design Assets",
|
|
550
|
+
].map((title, index) => (
|
|
551
|
+
<div
|
|
552
|
+
key={index}
|
|
553
|
+
className="flex items-start gap-4 rounded-lg border border-white/10 bg-white/5 p-4 transition-colors hover:bg-white/10"
|
|
554
|
+
>
|
|
555
|
+
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
|
|
556
|
+
<ImageIcon className="h-6 w-6 text-blue-400" />
|
|
557
|
+
</div>
|
|
558
|
+
<div className="flex-1">
|
|
559
|
+
<h4 className="font-medium !text-white">
|
|
560
|
+
{title}
|
|
561
|
+
</h4>
|
|
562
|
+
<p className="text-sm !text-white/60">
|
|
563
|
+
{Math.floor(Math.random() * 50) + 10} items
|
|
564
|
+
</p>
|
|
565
|
+
</div>
|
|
566
|
+
<div className="text-xs text-white/40">
|
|
567
|
+
{new Date().toLocaleDateString()}
|
|
568
|
+
</div>
|
|
569
|
+
</div>
|
|
570
|
+
))}
|
|
571
|
+
</div>
|
|
572
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
573
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
574
|
+
{`// Media collection card
|
|
575
|
+
<div className="flex items-center gap-4 border border-white/10 bg-white/5 p-4 rounded-lg hover:bg-white/10 transition-colors">
|
|
576
|
+
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
|
|
577
|
+
<ImageIcon className="h-6 w-6 text-blue-400 " />
|
|
578
|
+
</div>
|
|
579
|
+
<div className="flex-1">
|
|
580
|
+
<h4 className="font-medium text-white">Photo Gallery</h4>
|
|
581
|
+
<p className="text-sm text-white/60">24 items</p>
|
|
582
|
+
</div>
|
|
583
|
+
<div className="text-xs text-white/40">
|
|
584
|
+
Dec 8, 2024
|
|
585
|
+
</div>
|
|
586
|
+
</div>`}
|
|
587
|
+
</pre>
|
|
588
|
+
</div>
|
|
589
|
+
</div>
|
|
590
|
+
</div>
|
|
591
|
+
|
|
592
|
+
{/* Button Integration */}
|
|
593
|
+
<div className="!space-y-4">
|
|
594
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
595
|
+
Button Integration
|
|
596
|
+
</h3>
|
|
597
|
+
<div className="!space-y-4">
|
|
598
|
+
<div className="flex flex-wrap gap-4">
|
|
599
|
+
<button className="flex items-center gap-2 rounded-lg border border-blue-500/30 bg-blue-500/20 px-4 py-2 text-blue-200 transition-colors hover:bg-blue-500/30">
|
|
600
|
+
<ImageIcon className="h-4 w-4" />
|
|
601
|
+
Add Photo
|
|
602
|
+
</button>
|
|
603
|
+
<button className="flex items-center gap-2 rounded-lg border border-green-500/30 bg-green-500/20 px-4 py-2 text-green-200 transition-colors hover:bg-green-500/30">
|
|
604
|
+
<ImageIcon className="h-4 w-4" />
|
|
605
|
+
Gallery
|
|
606
|
+
</button>
|
|
607
|
+
<button className="flex items-center gap-2 rounded-lg border border-white/20 bg-white/5 px-4 py-2 text-white/70 transition-colors hover:bg-white/10">
|
|
608
|
+
<ImageIcon className="h-4 w-4" />
|
|
609
|
+
Media Library
|
|
610
|
+
</button>
|
|
611
|
+
</div>
|
|
612
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
613
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
614
|
+
{`// Primary action button
|
|
615
|
+
<button className="flex items-center gap-2 bg-blue-500/20 border border-blue-500/30 px-4 py-2 rounded-lg">
|
|
616
|
+
<ImageIcon className="h-4 w-4 " />
|
|
617
|
+
Add Photo
|
|
618
|
+
</button>
|
|
619
|
+
|
|
620
|
+
// Secondary button
|
|
621
|
+
<button className="flex items-center gap-2 bg-white/5 border border-white/20 px-4 py-2 rounded-lg">
|
|
622
|
+
<ImageIcon className="h-4 w-4 " />
|
|
623
|
+
Media Library
|
|
624
|
+
</button>`}
|
|
625
|
+
</pre>
|
|
626
|
+
</div>
|
|
627
|
+
</div>
|
|
628
|
+
</div>
|
|
629
|
+
</div>
|
|
630
|
+
</div>
|
|
631
|
+
|
|
632
|
+
{/* Interactive States */}
|
|
633
|
+
<div className="!space-y-8">
|
|
634
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
635
|
+
Interactive States & Animations
|
|
636
|
+
</h2>
|
|
637
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
638
|
+
<div className="!space-y-4">
|
|
639
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
640
|
+
Hover & Loading States
|
|
641
|
+
</h3>
|
|
642
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
643
|
+
<div className="flex items-center gap-4">
|
|
644
|
+
<ImageIcon className="h-6 w-6 text-white/60 transition-colors hover:text-blue-400" />
|
|
645
|
+
<div>
|
|
646
|
+
<div className="text-sm font-medium text-white">
|
|
647
|
+
Color Change
|
|
648
|
+
</div>
|
|
649
|
+
<div className="text-xs text-white/60">
|
|
650
|
+
hover:text-blue-400
|
|
651
|
+
</div>
|
|
652
|
+
</div>
|
|
653
|
+
</div>
|
|
654
|
+
<div className="flex items-center gap-4">
|
|
655
|
+
<ImageIcon className="h-6 w-6 text-white transition-transform hover:scale-110" />
|
|
656
|
+
<div>
|
|
657
|
+
<div className="text-sm font-medium text-white">
|
|
658
|
+
Scale Effect
|
|
659
|
+
</div>
|
|
660
|
+
<div className="text-xs text-white/60">
|
|
661
|
+
hover:scale-110
|
|
662
|
+
</div>
|
|
663
|
+
</div>
|
|
664
|
+
</div>
|
|
665
|
+
<div className="flex items-center gap-4">
|
|
666
|
+
<div className="relative overflow-hidden">
|
|
667
|
+
<ImageIcon className="h-6 w-6 text-blue-400" />
|
|
668
|
+
<div className="animate-shimmer absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent"></div>
|
|
669
|
+
</div>
|
|
670
|
+
<div>
|
|
671
|
+
<div className="text-sm font-medium text-white">
|
|
672
|
+
Loading Shimmer
|
|
673
|
+
</div>
|
|
674
|
+
<div className="text-xs text-white/60">
|
|
675
|
+
animate-shimmer
|
|
676
|
+
</div>
|
|
677
|
+
</div>
|
|
678
|
+
</div>
|
|
679
|
+
<div className="flex items-center gap-4">
|
|
680
|
+
<div
|
|
681
|
+
className="rounded p-2 focus:ring-2 focus:ring-blue-500 focus:outline-none"
|
|
682
|
+
tabIndex={0}
|
|
683
|
+
>
|
|
684
|
+
<ImageIcon className="h-6 w-6 text-white" />
|
|
685
|
+
</div>
|
|
686
|
+
<div>
|
|
687
|
+
<div className="text-sm font-medium text-white">
|
|
688
|
+
Focus Ring
|
|
689
|
+
</div>
|
|
690
|
+
<div className="text-xs text-white/60">
|
|
691
|
+
focus:ring-2
|
|
692
|
+
</div>
|
|
693
|
+
</div>
|
|
694
|
+
</div>
|
|
695
|
+
</div>
|
|
696
|
+
</div>
|
|
697
|
+
|
|
698
|
+
<div className="!space-y-4">
|
|
699
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
700
|
+
Animation Examples
|
|
701
|
+
</h3>
|
|
702
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
703
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
704
|
+
{`// Hover effects
|
|
705
|
+
<ImageIcon className="h-6 w-6 text-white/60 hover:text-blue-400 transition-colors " />
|
|
706
|
+
|
|
707
|
+
// Scale on hover
|
|
708
|
+
<ImageIcon className="h-6 w-6 text-white hover:scale-110 transition-transform " />
|
|
709
|
+
|
|
710
|
+
// Loading shimmer animation
|
|
711
|
+
<div className="relative overflow-hidden">
|
|
712
|
+
<ImageIcon className="h-6 w-6 text-blue-400 " />
|
|
713
|
+
<div className="absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent animate-shimmer"></div>
|
|
714
|
+
</div>
|
|
715
|
+
|
|
716
|
+
// Shimmer keyframes
|
|
717
|
+
@keyframes shimmer {
|
|
718
|
+
0% { transform: translateX(-100%); }
|
|
719
|
+
100% { transform: translateX(100%); }
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
.animate-shimmer {
|
|
723
|
+
animation: shimmer 2s ease-in-out infinite;
|
|
724
|
+
}`}
|
|
725
|
+
</pre>
|
|
726
|
+
</div>
|
|
727
|
+
</div>
|
|
728
|
+
</div>
|
|
729
|
+
</div>
|
|
730
|
+
|
|
731
|
+
{/* Accessibility */}
|
|
732
|
+
<div className="!space-y-8">
|
|
733
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
734
|
+
Accessibility Features
|
|
735
|
+
</h2>
|
|
736
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
737
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
738
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
739
|
+
✅ Built-in Features
|
|
740
|
+
</h3>
|
|
741
|
+
<ul className="!space-y-2 text-sm !text-white/70">
|
|
742
|
+
<li className="!text-white/70">
|
|
743
|
+
Uses Radix UI AccessibleIcon wrapper
|
|
744
|
+
</li>
|
|
745
|
+
<li className="!text-white/70">
|
|
746
|
+
Provides screen reader label "Image icon"
|
|
747
|
+
</li>
|
|
748
|
+
<li className="!text-white/70">
|
|
749
|
+
Supports keyboard navigation when interactive
|
|
750
|
+
</li>
|
|
751
|
+
<li className="!text-white/70">
|
|
752
|
+
Maintains proper color contrast ratios
|
|
753
|
+
</li>
|
|
754
|
+
<li className="!text-white/70">
|
|
755
|
+
Scales with user's font size preferences
|
|
756
|
+
</li>
|
|
757
|
+
</ul>
|
|
758
|
+
</div>
|
|
759
|
+
|
|
760
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
761
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
762
|
+
💡 Best Practices
|
|
763
|
+
</h3>
|
|
764
|
+
<ul className="!space-y-2 text-sm text-white/70">
|
|
765
|
+
<li className="!text-white/70">
|
|
766
|
+
Always provide alt text for image content
|
|
767
|
+
</li>
|
|
768
|
+
<li className="!text-white/70">
|
|
769
|
+
Use descriptive labels for upload areas
|
|
770
|
+
</li>
|
|
771
|
+
<li className="!text-white/70">
|
|
772
|
+
Ensure sufficient color contrast
|
|
773
|
+
</li>
|
|
774
|
+
<li className="!text-white/70">
|
|
775
|
+
Add focus states for interactive elements
|
|
776
|
+
</li>
|
|
777
|
+
<li className="!text-white/70">
|
|
778
|
+
Consider motion sensitivity for animations
|
|
779
|
+
</li>
|
|
780
|
+
</ul>
|
|
781
|
+
</div>
|
|
782
|
+
</div>
|
|
783
|
+
|
|
784
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
785
|
+
<h3 className="mb-4 text-lg font-semibold !text-purple-300">
|
|
786
|
+
Custom Accessibility Implementation
|
|
787
|
+
</h3>
|
|
788
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
789
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
790
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
791
|
+
{`// Upload area with proper ARIA labels
|
|
792
|
+
<div
|
|
793
|
+
role="button"
|
|
794
|
+
aria-label="Upload images - drag and drop files or click to browse"
|
|
795
|
+
tabIndex={0}
|
|
796
|
+
className="border-2 border-dashed border-white/20 p-8 text-center rounded-lg focus:ring-2 focus:ring-blue-500"
|
|
797
|
+
onKeyDown={(e) => {
|
|
798
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
799
|
+
handleFileSelect()
|
|
800
|
+
}
|
|
801
|
+
}}
|
|
802
|
+
>
|
|
803
|
+
<ImageIcon className="mx-auto h-12 w-12 text-white/40 " />
|
|
804
|
+
<p className="mt-4 text-white">Drop images here or click to browse</p>
|
|
805
|
+
</div>
|
|
806
|
+
|
|
807
|
+
// Gallery with proper semantics
|
|
808
|
+
<div role="img" aria-label="Image gallery with 12 photos">
|
|
809
|
+
<ImageIcon className="h-6 w-6 " />
|
|
810
|
+
<span className="sr-only">Gallery contains landscape and portrait photos</span>
|
|
811
|
+
</div>`}
|
|
812
|
+
</pre>
|
|
813
|
+
</div>
|
|
814
|
+
<div className="!space-y-4">
|
|
815
|
+
<p className="text-sm !text-white/70">
|
|
816
|
+
When using ImageIcon for interactive elements like
|
|
817
|
+
upload areas or gallery triggers, provide comprehensive
|
|
818
|
+
ARIA labels and keyboard support.
|
|
819
|
+
</p>
|
|
820
|
+
<div className="rounded-lg border border-blue-500/20 bg-blue-500/10 p-4">
|
|
821
|
+
<div className="flex items-center gap-2 text-sm text-blue-200">
|
|
822
|
+
<ImageIcon className="h-4 w-4" />
|
|
823
|
+
<span>
|
|
824
|
+
Screen readers get context about image functionality
|
|
825
|
+
</span>
|
|
826
|
+
</div>
|
|
827
|
+
</div>
|
|
828
|
+
</div>
|
|
829
|
+
</div>
|
|
830
|
+
</div>
|
|
831
|
+
</div>
|
|
832
|
+
|
|
833
|
+
{/* Related Icons */}
|
|
834
|
+
<div className="!space-y-8">
|
|
835
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
836
|
+
Related Icons
|
|
837
|
+
</h2>
|
|
838
|
+
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
839
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
840
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-red-500/20">
|
|
841
|
+
<span className="text-2xl">📹</span>
|
|
842
|
+
</div>
|
|
843
|
+
<div>
|
|
844
|
+
<div className="font-medium text-white">VideoIcon</div>
|
|
845
|
+
<div className="text-xs text-white/60">Video content</div>
|
|
846
|
+
</div>
|
|
847
|
+
</div>
|
|
848
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
849
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-yellow-500/20">
|
|
850
|
+
<span className="text-2xl">📁</span>
|
|
851
|
+
</div>
|
|
852
|
+
<div>
|
|
853
|
+
<div className="font-medium text-white">FolderIcon</div>
|
|
854
|
+
<div className="text-xs text-white/60">
|
|
855
|
+
File organization
|
|
856
|
+
</div>
|
|
857
|
+
</div>
|
|
858
|
+
</div>
|
|
859
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
860
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
|
|
861
|
+
<span className="text-2xl">⬆️</span>
|
|
862
|
+
</div>
|
|
863
|
+
<div>
|
|
864
|
+
<div className="font-medium text-white">UploadIcon</div>
|
|
865
|
+
<div className="text-xs text-white/60">File uploads</div>
|
|
866
|
+
</div>
|
|
867
|
+
</div>
|
|
868
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
869
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
|
|
870
|
+
<span className="text-2xl">🎨</span>
|
|
871
|
+
</div>
|
|
872
|
+
<div>
|
|
873
|
+
<div className="font-medium text-white">PaletteIcon</div>
|
|
874
|
+
<div className="text-xs text-white/60">Design tools</div>
|
|
875
|
+
</div>
|
|
876
|
+
</div>
|
|
877
|
+
</div>
|
|
878
|
+
</div>
|
|
879
|
+
</div>
|
|
880
|
+
|
|
881
|
+
{/* Footer */}
|
|
882
|
+
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
883
|
+
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
884
|
+
<div className="!space-y-4 text-center">
|
|
885
|
+
<p className="!text-white/60">
|
|
886
|
+
ImageIcon is part of the Aural UI icon library, built for
|
|
887
|
+
media-rich applications and visual content management.
|
|
888
|
+
</p>
|
|
889
|
+
<p className="text-sm !text-white/40">
|
|
890
|
+
All icons use Radix UI's AccessibleIcon for screen reader
|
|
891
|
+
compatibility and follow WCAG guidelines for media
|
|
892
|
+
accessibility.
|
|
893
|
+
</p>
|
|
894
|
+
</div>
|
|
895
|
+
</div>
|
|
896
|
+
</div>
|
|
897
|
+
</div>
|
|
898
|
+
</>
|
|
899
|
+
),
|
|
900
|
+
},
|
|
901
|
+
},
|
|
902
|
+
tags: ["autodocs"],
|
|
903
|
+
argTypes: {
|
|
904
|
+
width: {
|
|
905
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
906
|
+
description: "Width of the icon in pixels",
|
|
907
|
+
},
|
|
908
|
+
height: {
|
|
909
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
910
|
+
description: "Height of the icon in pixels",
|
|
911
|
+
},
|
|
912
|
+
stroke: {
|
|
913
|
+
control: "color",
|
|
914
|
+
description: "Stroke color of the image outline",
|
|
915
|
+
},
|
|
916
|
+
strokeWidth: {
|
|
917
|
+
control: { type: "range", min: 0.5, max: 4, step: 0.5 },
|
|
918
|
+
description: "Stroke width of the outline",
|
|
919
|
+
},
|
|
920
|
+
fill: {
|
|
921
|
+
control: "color",
|
|
922
|
+
description: "Fill color of the icon",
|
|
923
|
+
},
|
|
924
|
+
className: {
|
|
925
|
+
control: "text",
|
|
926
|
+
description: "CSS classes for styling (use for overrides)",
|
|
927
|
+
},
|
|
928
|
+
},
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
export default meta
|
|
932
|
+
type Story = StoryObj<typeof ImageIcon>
|
|
933
|
+
|
|
934
|
+
// Story parameters for consistent dark theme
|
|
935
|
+
const storyParameters = {
|
|
936
|
+
backgrounds: {
|
|
937
|
+
default: "dark",
|
|
938
|
+
values: [
|
|
939
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
940
|
+
{ name: "darker", value: "#000000" },
|
|
941
|
+
],
|
|
942
|
+
},
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
export const Default: Story = {
|
|
946
|
+
args: {
|
|
947
|
+
className: "h-6 w-6 text-blue-400 ",
|
|
948
|
+
},
|
|
949
|
+
parameters: storyParameters,
|
|
950
|
+
render: (args) => (
|
|
951
|
+
<div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
952
|
+
<ImageIcon {...args} />
|
|
953
|
+
</div>
|
|
954
|
+
),
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
export const SizeVariations: Story = {
|
|
958
|
+
parameters: {
|
|
959
|
+
...storyParameters,
|
|
960
|
+
docs: {
|
|
961
|
+
description: {
|
|
962
|
+
story:
|
|
963
|
+
"ImageIcon in different sizes, from small UI elements to large placeholders.",
|
|
964
|
+
},
|
|
965
|
+
},
|
|
966
|
+
},
|
|
967
|
+
render: () => (
|
|
968
|
+
<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">
|
|
969
|
+
<div className="text-center">
|
|
970
|
+
<ImageIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
|
|
971
|
+
<span className="text-xs text-white/60">12px</span>
|
|
972
|
+
</div>
|
|
973
|
+
<div className="text-center">
|
|
974
|
+
<ImageIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
|
|
975
|
+
<span className="text-xs text-white/60">16px</span>
|
|
976
|
+
</div>
|
|
977
|
+
<div className="text-center">
|
|
978
|
+
<ImageIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
|
|
979
|
+
<span className="text-xs text-white/60">20px</span>
|
|
980
|
+
</div>
|
|
981
|
+
<div className="text-center">
|
|
982
|
+
<ImageIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
|
|
983
|
+
<span className="text-xs text-white/60">24px</span>
|
|
984
|
+
</div>
|
|
985
|
+
<div className="text-center">
|
|
986
|
+
<ImageIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
|
|
987
|
+
<span className="text-xs text-white/60">32px</span>
|
|
988
|
+
</div>
|
|
989
|
+
<div className="text-center">
|
|
990
|
+
<ImageIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
|
|
991
|
+
<span className="text-xs text-white/60">48px</span>
|
|
992
|
+
</div>
|
|
993
|
+
</div>
|
|
994
|
+
),
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
export const ColorVariations: Story = {
|
|
998
|
+
parameters: {
|
|
999
|
+
...storyParameters,
|
|
1000
|
+
docs: {
|
|
1001
|
+
description: {
|
|
1002
|
+
story:
|
|
1003
|
+
"ImageIcon in different colors for various media contexts and states.",
|
|
1004
|
+
},
|
|
1005
|
+
},
|
|
1006
|
+
},
|
|
1007
|
+
render: () => (
|
|
1008
|
+
<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">
|
|
1009
|
+
<div className="text-center">
|
|
1010
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-blue-500/30 bg-blue-500/20">
|
|
1011
|
+
<ImageIcon className="h-8 w-8 text-blue-400" />
|
|
1012
|
+
</div>
|
|
1013
|
+
<div className="text-sm font-medium text-white">Primary</div>
|
|
1014
|
+
<div className="text-xs text-blue-400">text-blue-400</div>
|
|
1015
|
+
</div>
|
|
1016
|
+
<div className="text-center">
|
|
1017
|
+
<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">
|
|
1018
|
+
<ImageIcon className="h-8 w-8 text-green-400" />
|
|
1019
|
+
</div>
|
|
1020
|
+
<div className="text-sm font-medium text-white">Success</div>
|
|
1021
|
+
<div className="text-xs text-green-400">text-green-400</div>
|
|
1022
|
+
</div>
|
|
1023
|
+
<div className="text-center">
|
|
1024
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-gray-500/30 bg-gray-500/20">
|
|
1025
|
+
<ImageIcon className="h-8 w-8 text-gray-400" />
|
|
1026
|
+
</div>
|
|
1027
|
+
<div className="text-sm font-medium text-white">Muted</div>
|
|
1028
|
+
<div className="text-xs text-gray-400">text-gray-400</div>
|
|
1029
|
+
</div>
|
|
1030
|
+
<div className="text-center">
|
|
1031
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
1032
|
+
<ImageIcon className="h-8 w-8 text-white/30" />
|
|
1033
|
+
</div>
|
|
1034
|
+
<div className="text-sm font-medium text-white">Disabled</div>
|
|
1035
|
+
<div className="text-xs text-white/30">text-white/30</div>
|
|
1036
|
+
</div>
|
|
1037
|
+
</div>
|
|
1038
|
+
),
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
export const UsageExamples: Story = {
|
|
1042
|
+
parameters: {
|
|
1043
|
+
...storyParameters,
|
|
1044
|
+
docs: {
|
|
1045
|
+
description: {
|
|
1046
|
+
story:
|
|
1047
|
+
"Real-world usage examples showing ImageIcon in different media and upload contexts.",
|
|
1048
|
+
},
|
|
1049
|
+
},
|
|
1050
|
+
},
|
|
1051
|
+
render: () => (
|
|
1052
|
+
<div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
1053
|
+
{/* Image Upload */}
|
|
1054
|
+
<div className="!space-y-2">
|
|
1055
|
+
<h3 className="text-sm font-medium text-white">Image Upload</h3>
|
|
1056
|
+
<div className="relative rounded-lg border-2 border-dashed border-white/20 bg-white/5 p-8 text-center transition-colors hover:border-blue-400/50 hover:bg-blue-500/10">
|
|
1057
|
+
<ImageIcon className="!mx-auto h-12 w-12 text-white/40" />
|
|
1058
|
+
<h4 className="mt-4 text-lg font-medium !text-white">
|
|
1059
|
+
Upload Images
|
|
1060
|
+
</h4>
|
|
1061
|
+
<p className="mt-2 text-sm !text-white/60">
|
|
1062
|
+
Drag and drop your images here, or click to browse
|
|
1063
|
+
</p>
|
|
1064
|
+
<button className="mt-4 rounded-lg bg-blue-500/20 px-4 py-2 text-blue-300 transition-colors hover:bg-blue-500/30">
|
|
1065
|
+
Browse Files
|
|
1066
|
+
</button>
|
|
1067
|
+
</div>
|
|
1068
|
+
</div>
|
|
1069
|
+
|
|
1070
|
+
{/* Gallery Placeholder */}
|
|
1071
|
+
<div className="!space-y-2">
|
|
1072
|
+
<h3 className="text-sm font-medium text-white">Gallery Placeholder</h3>
|
|
1073
|
+
<div className="grid grid-cols-6 gap-4">
|
|
1074
|
+
{[1, 2, 3, 4, 5, 6].map((item) => (
|
|
1075
|
+
<div
|
|
1076
|
+
key={item}
|
|
1077
|
+
className="flex aspect-square items-center justify-center rounded-lg border border-white/10 bg-white/5 p-4 transition-colors hover:bg-white/10"
|
|
1078
|
+
>
|
|
1079
|
+
<ImageIcon className="h-6 w-6 text-white/30" />
|
|
1080
|
+
</div>
|
|
1081
|
+
))}
|
|
1082
|
+
</div>
|
|
1083
|
+
</div>
|
|
1084
|
+
|
|
1085
|
+
{/* Button Integration */}
|
|
1086
|
+
<div className="!space-y-2">
|
|
1087
|
+
<h3 className="text-sm font-medium text-white">Button Integration</h3>
|
|
1088
|
+
<div className="flex flex-wrap gap-4">
|
|
1089
|
+
<button className="flex items-center gap-2 rounded-lg border border-blue-500/30 bg-blue-500/20 px-4 py-2 text-blue-200 transition-colors hover:bg-blue-500/30">
|
|
1090
|
+
<ImageIcon className="h-4 w-4" />
|
|
1091
|
+
Add Photo
|
|
1092
|
+
</button>
|
|
1093
|
+
<button className="flex items-center gap-2 rounded-lg border border-green-500/30 bg-green-500/20 px-4 py-2 text-green-200 transition-colors hover:bg-green-500/30">
|
|
1094
|
+
<ImageIcon className="h-4 w-4" />
|
|
1095
|
+
Gallery
|
|
1096
|
+
</button>
|
|
1097
|
+
<button className="flex items-center gap-2 rounded-lg border border-white/20 bg-white/5 px-4 py-2 text-white/70 transition-colors hover:bg-white/10">
|
|
1098
|
+
<ImageIcon className="h-4 w-4" />
|
|
1099
|
+
Media Library
|
|
1100
|
+
</button>
|
|
1101
|
+
</div>
|
|
1102
|
+
</div>
|
|
1103
|
+
</div>
|
|
1104
|
+
),
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
export const InteractiveStates: Story = {
|
|
1108
|
+
parameters: {
|
|
1109
|
+
...storyParameters,
|
|
1110
|
+
docs: {
|
|
1111
|
+
description: {
|
|
1112
|
+
story:
|
|
1113
|
+
"Interactive states showing hover effects, loading animations, and focus states for the image icon.",
|
|
1114
|
+
},
|
|
1115
|
+
},
|
|
1116
|
+
},
|
|
1117
|
+
render: () => (
|
|
1118
|
+
<div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
1119
|
+
<div className="!space-y-4">
|
|
1120
|
+
<h3 className="text-sm font-medium text-white/70">Hover Effects</h3>
|
|
1121
|
+
<div className="flex gap-8">
|
|
1122
|
+
<div className="flex flex-col items-center gap-2">
|
|
1123
|
+
<ImageIcon className="h-8 w-8 text-white/60 transition-colors hover:text-blue-400" />
|
|
1124
|
+
<span className="text-xs text-white/60">Color Change</span>
|
|
1125
|
+
</div>
|
|
1126
|
+
<div className="flex flex-col items-center gap-2">
|
|
1127
|
+
<ImageIcon className="h-8 w-8 text-white transition-transform hover:scale-110" />
|
|
1128
|
+
<span className="text-xs text-white/60">Scale Up</span>
|
|
1129
|
+
</div>
|
|
1130
|
+
<div className="flex flex-col items-center gap-2">
|
|
1131
|
+
<div className="relative overflow-hidden">
|
|
1132
|
+
<ImageIcon className="h-8 w-8 text-blue-400" />
|
|
1133
|
+
<div className="animate-shimmer absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent"></div>
|
|
1134
|
+
</div>
|
|
1135
|
+
<span className="text-xs text-white/60">Loading Shimmer</span>
|
|
1136
|
+
</div>
|
|
1137
|
+
</div>
|
|
1138
|
+
</div>
|
|
1139
|
+
|
|
1140
|
+
<div className="!space-y-4">
|
|
1141
|
+
<h3 className="text-sm font-medium text-white/70">Focus States</h3>
|
|
1142
|
+
<div className="flex gap-8">
|
|
1143
|
+
<div className="flex flex-col items-center gap-2">
|
|
1144
|
+
<div
|
|
1145
|
+
className="rounded p-2 focus:ring-2 focus:ring-blue-500 focus:outline-none"
|
|
1146
|
+
tabIndex={0}
|
|
1147
|
+
>
|
|
1148
|
+
<ImageIcon className="h-8 w-8 text-white" />
|
|
1149
|
+
</div>
|
|
1150
|
+
<span className="text-xs text-white/60">Focus Ring</span>
|
|
1151
|
+
</div>
|
|
1152
|
+
</div>
|
|
1153
|
+
</div>
|
|
1154
|
+
</div>
|
|
1155
|
+
),
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
export const Playground: Story = {
|
|
1159
|
+
parameters: {
|
|
1160
|
+
...storyParameters,
|
|
1161
|
+
docs: {
|
|
1162
|
+
description: {
|
|
1163
|
+
story:
|
|
1164
|
+
"Interactive playground to experiment with different ImageIcon configurations.",
|
|
1165
|
+
},
|
|
1166
|
+
},
|
|
1167
|
+
},
|
|
1168
|
+
args: {
|
|
1169
|
+
width: 32,
|
|
1170
|
+
height: 32,
|
|
1171
|
+
className: "text-blue-400 ",
|
|
1172
|
+
strokeWidth: 1.5,
|
|
1173
|
+
},
|
|
1174
|
+
render: (args) => (
|
|
1175
|
+
<div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
1176
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
1177
|
+
<ImageIcon {...args} />
|
|
1178
|
+
</div>
|
|
1179
|
+
</div>
|
|
1180
|
+
),
|
|
1181
|
+
}
|