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,954 @@
|
|
|
1
|
+
import React, { useState } from "react"
|
|
2
|
+
import { Button } from "@components/button"
|
|
3
|
+
import { AlertIcon } from "@icons/alert-icon"
|
|
4
|
+
import { ChevronRightIcon } from "@icons/chevron-right-icon"
|
|
5
|
+
import { CrossIcon } from "@icons/cross-icon"
|
|
6
|
+
import { MaintenanceIcon } from "@icons/maintenance-icon"
|
|
7
|
+
import { SearchIcon } from "@icons/search-icon"
|
|
8
|
+
import { TickCircleIcon } from "@icons/tick-circle-icon"
|
|
9
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
10
|
+
|
|
11
|
+
import { Overlay } from "."
|
|
12
|
+
|
|
13
|
+
const meta: Meta<typeof Overlay> = {
|
|
14
|
+
title: "Components/UI/Overlay",
|
|
15
|
+
component: Overlay,
|
|
16
|
+
parameters: {
|
|
17
|
+
layout: "fullscreen",
|
|
18
|
+
backgrounds: {
|
|
19
|
+
default: "dark",
|
|
20
|
+
values: [
|
|
21
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
22
|
+
{ name: "light", value: "#ffffff" },
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
docs: {
|
|
26
|
+
description: {
|
|
27
|
+
component: `
|
|
28
|
+
# Overlay Component
|
|
29
|
+
|
|
30
|
+
A flexible overlay component for creating modal backgrounds, loading states, and layered content with customizable opacity, glass effects, and noise textures.
|
|
31
|
+
|
|
32
|
+
## Features
|
|
33
|
+
|
|
34
|
+
- **Multiple Opacity Levels**: High (80%), medium (60%), low (40%), or none
|
|
35
|
+
- **Glass Effect**: Backdrop blur with high, medium, low, or no blur
|
|
36
|
+
- **Noise Texture**: Visual noise patterns for enhanced aesthetics
|
|
37
|
+
- **Animation Support**: Built-in fade in/out animations
|
|
38
|
+
- **Z-Index Management**: Proper layering with configurable z-index
|
|
39
|
+
- **Content Positioning**: Automatic centering of overlay content
|
|
40
|
+
- **Event Handling**: Pointer events management for interactive overlays
|
|
41
|
+
|
|
42
|
+
## Variant Options
|
|
43
|
+
|
|
44
|
+
### Opacity Variants
|
|
45
|
+
- **high**: 80% black background - Maximum dimming
|
|
46
|
+
- **medium**: 60% black background - Balanced dimming (default)
|
|
47
|
+
- **low**: 40% black background - Subtle dimming
|
|
48
|
+
- **none**: Solid black background - Complete coverage
|
|
49
|
+
|
|
50
|
+
### Glass Effect Variants
|
|
51
|
+
- **high**: Strong backdrop blur - Heavy glass effect
|
|
52
|
+
- **medium**: Medium backdrop blur - Moderate glass effect
|
|
53
|
+
- **low**: Light backdrop blur - Subtle glass effect (default)
|
|
54
|
+
- **none**: No backdrop blur - No glass effect
|
|
55
|
+
|
|
56
|
+
### Noise Variants
|
|
57
|
+
- **high**: Strong noise texture - Pronounced texture
|
|
58
|
+
- **medium**: Medium noise texture - Balanced texture
|
|
59
|
+
- **low**: Light noise texture - Subtle texture (default)
|
|
60
|
+
- **none**: No noise texture - Clean overlay
|
|
61
|
+
|
|
62
|
+
## Usage Examples
|
|
63
|
+
|
|
64
|
+
### Basic Overlay
|
|
65
|
+
\`\`\`tsx
|
|
66
|
+
<Overlay>
|
|
67
|
+
<div>Overlay content</div>
|
|
68
|
+
</Overlay>
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
### Custom Configuration
|
|
72
|
+
\`\`\`tsx
|
|
73
|
+
<Overlay opacity="high" glass="medium" noise="low">
|
|
74
|
+
<div className="bg-white/10 p-4 rounded-lg">Modal content</div>
|
|
75
|
+
</Overlay>
|
|
76
|
+
\`\`\`
|
|
77
|
+
|
|
78
|
+
### Loading State
|
|
79
|
+
\`\`\`tsx
|
|
80
|
+
<Overlay opacity="medium" glass="high">
|
|
81
|
+
<div className="text-white">Loading...</div>
|
|
82
|
+
</Overlay>
|
|
83
|
+
\`\`\`
|
|
84
|
+
`,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
tags: ["autodocs"],
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export default meta
|
|
92
|
+
type Story = StoryObj<typeof Overlay>
|
|
93
|
+
|
|
94
|
+
// Demo background content component
|
|
95
|
+
const BackgroundContent = () => (
|
|
96
|
+
<div className="min-h-screen bg-gradient-to-br from-blue-900 via-purple-900 to-pink-900 p-8">
|
|
97
|
+
<div className="mx-auto max-w-4xl space-y-8">
|
|
98
|
+
<header className="text-center">
|
|
99
|
+
<h1 className="mb-4 text-4xl font-bold text-white">
|
|
100
|
+
Background Content
|
|
101
|
+
</h1>
|
|
102
|
+
<p className="text-white/80">
|
|
103
|
+
This content sits behind the overlay to demonstrate the effects
|
|
104
|
+
</p>
|
|
105
|
+
</header>
|
|
106
|
+
|
|
107
|
+
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
108
|
+
{Array.from({ length: 6 }, (_, i) => (
|
|
109
|
+
<div
|
|
110
|
+
key={i}
|
|
111
|
+
className="rounded-lg border border-white/20 bg-white/10 p-6"
|
|
112
|
+
>
|
|
113
|
+
<div className="mb-4">
|
|
114
|
+
<h3 className="text-lg font-semibold text-white">Card {i + 1}</h3>
|
|
115
|
+
<p className="text-sm text-white/70">
|
|
116
|
+
Sample card content with some description text
|
|
117
|
+
</p>
|
|
118
|
+
</div>
|
|
119
|
+
<div className="space-y-3">
|
|
120
|
+
<div className="flex h-32 items-center justify-center rounded-lg bg-gradient-to-r from-cyan-500 to-blue-600">
|
|
121
|
+
<span className="font-medium text-white">
|
|
122
|
+
Image Placeholder
|
|
123
|
+
</span>
|
|
124
|
+
</div>
|
|
125
|
+
<p className="text-sm text-white/80">
|
|
126
|
+
This is some sample content that demonstrates how the overlay
|
|
127
|
+
affects background visibility and readability.
|
|
128
|
+
</p>
|
|
129
|
+
<div className="flex gap-2">
|
|
130
|
+
<Button size="sm" variant="outline">
|
|
131
|
+
Action
|
|
132
|
+
</Button>
|
|
133
|
+
<Button size="sm">Primary</Button>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
))}
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
// 1. Opacity Variants
|
|
144
|
+
export const OpacityVariants: Story = {
|
|
145
|
+
render: () => {
|
|
146
|
+
const [activeOverlay, setActiveOverlay] = useState<string | null>(null)
|
|
147
|
+
|
|
148
|
+
return (
|
|
149
|
+
<div className="relative">
|
|
150
|
+
<BackgroundContent />
|
|
151
|
+
|
|
152
|
+
{/* Control Panel */}
|
|
153
|
+
<div className="fixed top-4 left-4 z-50 space-y-2">
|
|
154
|
+
<div className="space-y-2 rounded-lg bg-black/80 p-4 backdrop-blur-sm">
|
|
155
|
+
<h3 className="text-sm font-medium text-white">Opacity Variants</h3>
|
|
156
|
+
<div className="space-y-2">
|
|
157
|
+
<Button
|
|
158
|
+
size="sm"
|
|
159
|
+
variant={activeOverlay === "low" ? "primary" : "outline"}
|
|
160
|
+
onClick={() =>
|
|
161
|
+
setActiveOverlay(activeOverlay === "low" ? null : "low")
|
|
162
|
+
}
|
|
163
|
+
className="w-full"
|
|
164
|
+
>
|
|
165
|
+
Low (40%)
|
|
166
|
+
</Button>
|
|
167
|
+
<Button
|
|
168
|
+
size="sm"
|
|
169
|
+
variant={activeOverlay === "medium" ? "primary" : "outline"}
|
|
170
|
+
onClick={() =>
|
|
171
|
+
setActiveOverlay(activeOverlay === "medium" ? null : "medium")
|
|
172
|
+
}
|
|
173
|
+
className="w-full"
|
|
174
|
+
>
|
|
175
|
+
Medium (60%)
|
|
176
|
+
</Button>
|
|
177
|
+
<Button
|
|
178
|
+
size="sm"
|
|
179
|
+
variant={activeOverlay === "high" ? "primary" : "outline"}
|
|
180
|
+
onClick={() =>
|
|
181
|
+
setActiveOverlay(activeOverlay === "high" ? null : "high")
|
|
182
|
+
}
|
|
183
|
+
className="w-full"
|
|
184
|
+
>
|
|
185
|
+
High (80%)
|
|
186
|
+
</Button>
|
|
187
|
+
<Button
|
|
188
|
+
size="sm"
|
|
189
|
+
variant={activeOverlay === "none" ? "primary" : "outline"}
|
|
190
|
+
onClick={() =>
|
|
191
|
+
setActiveOverlay(activeOverlay === "none" ? null : "none")
|
|
192
|
+
}
|
|
193
|
+
className="w-full"
|
|
194
|
+
>
|
|
195
|
+
None (100%)
|
|
196
|
+
</Button>
|
|
197
|
+
</div>
|
|
198
|
+
{activeOverlay && (
|
|
199
|
+
<Button
|
|
200
|
+
size="sm"
|
|
201
|
+
variant="secondary"
|
|
202
|
+
onClick={() => setActiveOverlay(null)}
|
|
203
|
+
className="w-full"
|
|
204
|
+
>
|
|
205
|
+
Clear Overlay
|
|
206
|
+
</Button>
|
|
207
|
+
)}
|
|
208
|
+
</div>
|
|
209
|
+
</div>
|
|
210
|
+
|
|
211
|
+
{/* Overlays */}
|
|
212
|
+
{activeOverlay === "low" && (
|
|
213
|
+
<Overlay opacity="low">
|
|
214
|
+
<div className="max-w-md rounded-lg border border-white/20 bg-white/10 p-6 backdrop-blur-sm">
|
|
215
|
+
<h3 className="mb-2 text-lg font-semibold text-white">
|
|
216
|
+
Low Opacity Overlay
|
|
217
|
+
</h3>
|
|
218
|
+
<p className="text-sm text-white/70">
|
|
219
|
+
40% background dimming - Background remains quite visible
|
|
220
|
+
</p>
|
|
221
|
+
</div>
|
|
222
|
+
</Overlay>
|
|
223
|
+
)}
|
|
224
|
+
|
|
225
|
+
{activeOverlay === "medium" && (
|
|
226
|
+
<Overlay opacity="medium">
|
|
227
|
+
<div className="max-w-md rounded-lg border border-white/20 bg-white/10 p-6 backdrop-blur-sm">
|
|
228
|
+
<h3 className="mb-2 text-lg font-semibold text-white">
|
|
229
|
+
Medium Opacity Overlay
|
|
230
|
+
</h3>
|
|
231
|
+
<p className="text-sm text-white/70">
|
|
232
|
+
60% background dimming - Balanced visibility
|
|
233
|
+
</p>
|
|
234
|
+
</div>
|
|
235
|
+
</Overlay>
|
|
236
|
+
)}
|
|
237
|
+
|
|
238
|
+
{activeOverlay === "high" && (
|
|
239
|
+
<Overlay opacity="high">
|
|
240
|
+
<div className="max-w-md rounded-lg border border-white/20 bg-white/10 p-6 backdrop-blur-sm">
|
|
241
|
+
<h3 className="mb-2 text-lg font-semibold text-white">
|
|
242
|
+
High Opacity Overlay
|
|
243
|
+
</h3>
|
|
244
|
+
<p className="text-sm text-white/70">
|
|
245
|
+
80% background dimming - Strong focus on overlay content
|
|
246
|
+
</p>
|
|
247
|
+
</div>
|
|
248
|
+
</Overlay>
|
|
249
|
+
)}
|
|
250
|
+
|
|
251
|
+
{activeOverlay === "none" && (
|
|
252
|
+
<Overlay opacity="none">
|
|
253
|
+
<div className="max-w-md rounded-lg border border-white/20 bg-white/10 p-6 backdrop-blur-sm">
|
|
254
|
+
<h3 className="mb-2 text-lg font-semibold text-white">
|
|
255
|
+
No Opacity Overlay
|
|
256
|
+
</h3>
|
|
257
|
+
<p className="text-sm text-white/70">
|
|
258
|
+
100% background coverage - Complete background blocking
|
|
259
|
+
</p>
|
|
260
|
+
</div>
|
|
261
|
+
</Overlay>
|
|
262
|
+
)}
|
|
263
|
+
</div>
|
|
264
|
+
)
|
|
265
|
+
},
|
|
266
|
+
parameters: {
|
|
267
|
+
docs: {
|
|
268
|
+
description: {
|
|
269
|
+
story:
|
|
270
|
+
"Interactive demonstration of different opacity levels showing how background visibility changes from 40% to 100% coverage.",
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
},
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// 2. Glass Effect Variants
|
|
277
|
+
export const GlassEffectVariants: Story = {
|
|
278
|
+
render: () => {
|
|
279
|
+
const [activeGlass, setActiveGlass] = useState<string | null>(null)
|
|
280
|
+
|
|
281
|
+
return (
|
|
282
|
+
<div className="relative">
|
|
283
|
+
<BackgroundContent />
|
|
284
|
+
|
|
285
|
+
{/* Control Panel */}
|
|
286
|
+
<div className="fixed top-4 right-4 z-50 space-y-2">
|
|
287
|
+
<div className="space-y-2 rounded-lg bg-black/80 p-4 backdrop-blur-sm">
|
|
288
|
+
<h3 className="text-sm font-medium text-white">
|
|
289
|
+
Glass Effect Variants
|
|
290
|
+
</h3>
|
|
291
|
+
<div className="space-y-2">
|
|
292
|
+
<Button
|
|
293
|
+
size="sm"
|
|
294
|
+
variant={activeGlass === "none" ? "primary" : "outline"}
|
|
295
|
+
onClick={() =>
|
|
296
|
+
setActiveGlass(activeGlass === "none" ? null : "none")
|
|
297
|
+
}
|
|
298
|
+
className="w-full"
|
|
299
|
+
>
|
|
300
|
+
No Glass
|
|
301
|
+
</Button>
|
|
302
|
+
<Button
|
|
303
|
+
size="sm"
|
|
304
|
+
variant={activeGlass === "low" ? "primary" : "outline"}
|
|
305
|
+
onClick={() =>
|
|
306
|
+
setActiveGlass(activeGlass === "low" ? null : "low")
|
|
307
|
+
}
|
|
308
|
+
className="w-full"
|
|
309
|
+
>
|
|
310
|
+
Low Blur
|
|
311
|
+
</Button>
|
|
312
|
+
<Button
|
|
313
|
+
size="sm"
|
|
314
|
+
variant={activeGlass === "medium" ? "primary" : "outline"}
|
|
315
|
+
onClick={() =>
|
|
316
|
+
setActiveGlass(activeGlass === "medium" ? null : "medium")
|
|
317
|
+
}
|
|
318
|
+
className="w-full"
|
|
319
|
+
>
|
|
320
|
+
Medium Blur
|
|
321
|
+
</Button>
|
|
322
|
+
<Button
|
|
323
|
+
size="sm"
|
|
324
|
+
variant={activeGlass === "high" ? "primary" : "outline"}
|
|
325
|
+
onClick={() =>
|
|
326
|
+
setActiveGlass(activeGlass === "high" ? null : "high")
|
|
327
|
+
}
|
|
328
|
+
className="w-full"
|
|
329
|
+
>
|
|
330
|
+
High Blur
|
|
331
|
+
</Button>
|
|
332
|
+
</div>
|
|
333
|
+
{activeGlass && (
|
|
334
|
+
<Button
|
|
335
|
+
size="sm"
|
|
336
|
+
variant="secondary"
|
|
337
|
+
onClick={() => setActiveGlass(null)}
|
|
338
|
+
className="w-full"
|
|
339
|
+
>
|
|
340
|
+
Clear Overlay
|
|
341
|
+
</Button>
|
|
342
|
+
)}
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
|
|
346
|
+
{/* Glass Effect Overlays */}
|
|
347
|
+
{activeGlass === "none" && (
|
|
348
|
+
<Overlay opacity="medium" glass="none">
|
|
349
|
+
<div className="max-w-md rounded-lg border border-white/20 bg-white/10 p-6">
|
|
350
|
+
<h3 className="mb-2 text-lg font-semibold text-white">
|
|
351
|
+
No Glass Effect
|
|
352
|
+
</h3>
|
|
353
|
+
<p className="text-sm text-white/70">
|
|
354
|
+
Clean overlay without backdrop blur
|
|
355
|
+
</p>
|
|
356
|
+
</div>
|
|
357
|
+
</Overlay>
|
|
358
|
+
)}
|
|
359
|
+
|
|
360
|
+
{activeGlass === "low" && (
|
|
361
|
+
<Overlay opacity="medium" glass="low">
|
|
362
|
+
<div className="max-w-md rounded-lg border border-white/20 bg-white/10 p-6">
|
|
363
|
+
<h3 className="mb-2 text-lg font-semibold text-white">
|
|
364
|
+
Low Glass Effect
|
|
365
|
+
</h3>
|
|
366
|
+
<p className="text-sm text-white/70">
|
|
367
|
+
Subtle backdrop blur for gentle glass effect
|
|
368
|
+
</p>
|
|
369
|
+
</div>
|
|
370
|
+
</Overlay>
|
|
371
|
+
)}
|
|
372
|
+
|
|
373
|
+
{activeGlass === "medium" && (
|
|
374
|
+
<Overlay opacity="medium" glass="medium">
|
|
375
|
+
<div className="max-w-md rounded-lg border border-white/20 bg-white/10 p-6">
|
|
376
|
+
<h3 className="mb-2 text-lg font-semibold text-white">
|
|
377
|
+
Medium Glass Effect
|
|
378
|
+
</h3>
|
|
379
|
+
<p className="text-sm text-white/70">
|
|
380
|
+
Balanced backdrop blur for modern glass aesthetics
|
|
381
|
+
</p>
|
|
382
|
+
</div>
|
|
383
|
+
</Overlay>
|
|
384
|
+
)}
|
|
385
|
+
|
|
386
|
+
{activeGlass === "high" && (
|
|
387
|
+
<Overlay opacity="medium" glass="high">
|
|
388
|
+
<div className="max-w-md rounded-lg border border-white/20 bg-white/10 p-6">
|
|
389
|
+
<h3 className="mb-2 text-lg font-semibold text-white">
|
|
390
|
+
High Glass Effect
|
|
391
|
+
</h3>
|
|
392
|
+
<p className="text-sm text-white/70">
|
|
393
|
+
Strong backdrop blur for premium frosted glass look
|
|
394
|
+
</p>
|
|
395
|
+
</div>
|
|
396
|
+
</Overlay>
|
|
397
|
+
)}
|
|
398
|
+
</div>
|
|
399
|
+
)
|
|
400
|
+
},
|
|
401
|
+
parameters: {
|
|
402
|
+
docs: {
|
|
403
|
+
description: {
|
|
404
|
+
story:
|
|
405
|
+
"Interactive demonstration of glass effect variants showing different levels of backdrop blur from none to high intensity.",
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
// 3. Loading States
|
|
412
|
+
export const LoadingStates: Story = {
|
|
413
|
+
render: () => {
|
|
414
|
+
const [loadingType, setLoadingType] = useState<string | null>(null)
|
|
415
|
+
|
|
416
|
+
const startLoading = (type: string) => {
|
|
417
|
+
setLoadingType(type)
|
|
418
|
+
setTimeout(() => setLoadingType(null), 3000)
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
return (
|
|
422
|
+
<div className="relative">
|
|
423
|
+
<BackgroundContent />
|
|
424
|
+
|
|
425
|
+
{/* Control Panel */}
|
|
426
|
+
<div className="fixed top-4 left-1/2 z-50 -translate-x-1/2 transform">
|
|
427
|
+
<div className="space-y-2 rounded-lg bg-black/80 p-4 backdrop-blur-sm">
|
|
428
|
+
<h3 className="text-center text-sm font-medium text-white">
|
|
429
|
+
Loading States
|
|
430
|
+
</h3>
|
|
431
|
+
<div className="flex gap-2">
|
|
432
|
+
<Button
|
|
433
|
+
size="sm"
|
|
434
|
+
onClick={() => startLoading("spinner")}
|
|
435
|
+
disabled={!!loadingType}
|
|
436
|
+
>
|
|
437
|
+
Spinner Loading
|
|
438
|
+
</Button>
|
|
439
|
+
<Button
|
|
440
|
+
size="sm"
|
|
441
|
+
onClick={() => startLoading("progress")}
|
|
442
|
+
disabled={!!loadingType}
|
|
443
|
+
>
|
|
444
|
+
Progress Loading
|
|
445
|
+
</Button>
|
|
446
|
+
<Button
|
|
447
|
+
size="sm"
|
|
448
|
+
onClick={() => startLoading("dots")}
|
|
449
|
+
disabled={!!loadingType}
|
|
450
|
+
>
|
|
451
|
+
Dots Loading
|
|
452
|
+
</Button>
|
|
453
|
+
</div>
|
|
454
|
+
</div>
|
|
455
|
+
</div>
|
|
456
|
+
|
|
457
|
+
{/* Loading Overlays */}
|
|
458
|
+
{loadingType === "spinner" && (
|
|
459
|
+
<Overlay opacity="high" glass="medium">
|
|
460
|
+
<div className="text-center text-white">
|
|
461
|
+
<div className="mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-white"></div>
|
|
462
|
+
<h3 className="mb-2 text-lg font-medium">Loading...</h3>
|
|
463
|
+
<p className="text-white/70">
|
|
464
|
+
Please wait while we process your request
|
|
465
|
+
</p>
|
|
466
|
+
</div>
|
|
467
|
+
</Overlay>
|
|
468
|
+
)}
|
|
469
|
+
|
|
470
|
+
{loadingType === "progress" && (
|
|
471
|
+
<Overlay opacity="high" glass="low">
|
|
472
|
+
<div className="min-w-80 rounded-lg border border-white/20 bg-white/10 p-6 backdrop-blur-sm">
|
|
473
|
+
<div className="text-center text-white">
|
|
474
|
+
<h3 className="mb-4 text-lg font-medium">Uploading Files</h3>
|
|
475
|
+
<div className="mb-4 h-2 w-full rounded-full bg-white/20">
|
|
476
|
+
<div
|
|
477
|
+
className="h-2 animate-pulse rounded-full bg-blue-500"
|
|
478
|
+
style={{ width: "65%" }}
|
|
479
|
+
></div>
|
|
480
|
+
</div>
|
|
481
|
+
<p className="text-white/70">
|
|
482
|
+
65% complete - 3 of 5 files uploaded
|
|
483
|
+
</p>
|
|
484
|
+
</div>
|
|
485
|
+
</div>
|
|
486
|
+
</Overlay>
|
|
487
|
+
)}
|
|
488
|
+
|
|
489
|
+
{loadingType === "dots" && (
|
|
490
|
+
<Overlay opacity="medium" glass="high">
|
|
491
|
+
<div className="text-center text-white">
|
|
492
|
+
<div className="mb-4 flex items-center justify-center space-x-2">
|
|
493
|
+
<div className="h-3 w-3 animate-bounce rounded-full bg-white"></div>
|
|
494
|
+
<div
|
|
495
|
+
className="h-3 w-3 animate-bounce rounded-full bg-white"
|
|
496
|
+
style={{ animationDelay: "0.1s" }}
|
|
497
|
+
></div>
|
|
498
|
+
<div
|
|
499
|
+
className="h-3 w-3 animate-bounce rounded-full bg-white"
|
|
500
|
+
style={{ animationDelay: "0.2s" }}
|
|
501
|
+
></div>
|
|
502
|
+
</div>
|
|
503
|
+
<h3 className="mb-2 text-lg font-medium">Processing</h3>
|
|
504
|
+
<p className="text-white/70">Analyzing your data...</p>
|
|
505
|
+
</div>
|
|
506
|
+
</Overlay>
|
|
507
|
+
)}
|
|
508
|
+
</div>
|
|
509
|
+
)
|
|
510
|
+
},
|
|
511
|
+
parameters: {
|
|
512
|
+
docs: {
|
|
513
|
+
description: {
|
|
514
|
+
story:
|
|
515
|
+
"Common loading state patterns using overlays with different animations and progress indicators.",
|
|
516
|
+
},
|
|
517
|
+
},
|
|
518
|
+
},
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
// 4. Interactive Examples
|
|
522
|
+
export const InteractiveExamples: Story = {
|
|
523
|
+
render: () => {
|
|
524
|
+
const [showSearch, setShowSearch] = useState(false)
|
|
525
|
+
const [showSettings, setShowSettings] = useState(false)
|
|
526
|
+
const [showConfirm, setShowConfirm] = useState(false)
|
|
527
|
+
|
|
528
|
+
return (
|
|
529
|
+
<div className="relative">
|
|
530
|
+
<BackgroundContent />
|
|
531
|
+
|
|
532
|
+
{/* Control Panel */}
|
|
533
|
+
<div className="fixed top-4 left-1/2 z-50 -translate-x-1/2 transform">
|
|
534
|
+
<div className="space-y-2 rounded-lg bg-black/80 p-4 backdrop-blur-sm">
|
|
535
|
+
<h3 className="text-center text-sm font-medium text-white">
|
|
536
|
+
Interactive Examples
|
|
537
|
+
</h3>
|
|
538
|
+
<div className="flex gap-2">
|
|
539
|
+
<Button size="sm" onClick={() => setShowSearch(true)}>
|
|
540
|
+
Search Modal
|
|
541
|
+
</Button>
|
|
542
|
+
<Button size="sm" onClick={() => setShowSettings(true)}>
|
|
543
|
+
Settings
|
|
544
|
+
</Button>
|
|
545
|
+
<Button
|
|
546
|
+
size="sm"
|
|
547
|
+
variant="primary"
|
|
548
|
+
onClick={() => setShowConfirm(true)}
|
|
549
|
+
>
|
|
550
|
+
Confirm Action
|
|
551
|
+
</Button>
|
|
552
|
+
</div>
|
|
553
|
+
</div>
|
|
554
|
+
</div>
|
|
555
|
+
|
|
556
|
+
{/* Search Modal */}
|
|
557
|
+
{showSearch && (
|
|
558
|
+
<Overlay opacity="medium" glass="medium">
|
|
559
|
+
<div className="w-full max-w-lg rounded-lg border border-white/20 bg-white/10 p-6 backdrop-blur-sm">
|
|
560
|
+
<div className="mb-4 flex items-center justify-between">
|
|
561
|
+
<h3 className="text-lg font-semibold text-white">Search</h3>
|
|
562
|
+
<button
|
|
563
|
+
onClick={() => setShowSearch(false)}
|
|
564
|
+
className="rounded-full p-2 text-white hover:bg-white/10"
|
|
565
|
+
>
|
|
566
|
+
<CrossIcon className="h-4 w-4" />
|
|
567
|
+
</button>
|
|
568
|
+
</div>
|
|
569
|
+
<div className="space-y-4">
|
|
570
|
+
<div className="relative">
|
|
571
|
+
<SearchIcon className="absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 text-white/60" />
|
|
572
|
+
<input
|
|
573
|
+
type="text"
|
|
574
|
+
placeholder="Search anything..."
|
|
575
|
+
className="w-full rounded-lg border border-white/20 bg-white/10 py-3 pr-4 pl-10 text-white placeholder-white/60 focus:border-white/40 focus:outline-none"
|
|
576
|
+
/>
|
|
577
|
+
</div>
|
|
578
|
+
<div className="space-y-2">
|
|
579
|
+
{["Recent searches", "Popular items", "Suggestions"].map(
|
|
580
|
+
(item, i) => (
|
|
581
|
+
<div
|
|
582
|
+
key={i}
|
|
583
|
+
className="flex items-center gap-3 rounded-lg p-3 hover:bg-white/10"
|
|
584
|
+
>
|
|
585
|
+
<SearchIcon className="h-4 w-4 text-white/60" />
|
|
586
|
+
<span className="text-white">{item}</span>
|
|
587
|
+
</div>
|
|
588
|
+
)
|
|
589
|
+
)}
|
|
590
|
+
</div>
|
|
591
|
+
</div>
|
|
592
|
+
</div>
|
|
593
|
+
</Overlay>
|
|
594
|
+
)}
|
|
595
|
+
|
|
596
|
+
{/* Settings Modal */}
|
|
597
|
+
{showSettings && (
|
|
598
|
+
<Overlay opacity="high" glass="low">
|
|
599
|
+
<div className="w-full max-w-md rounded-lg border border-white/20 bg-white/10 p-6 backdrop-blur-sm">
|
|
600
|
+
<div className="mb-4 flex items-center justify-between">
|
|
601
|
+
<h3 className="text-lg font-semibold text-white">Settings</h3>
|
|
602
|
+
<button
|
|
603
|
+
onClick={() => setShowSettings(false)}
|
|
604
|
+
className="rounded-full p-2 text-white hover:bg-white/10"
|
|
605
|
+
>
|
|
606
|
+
<CrossIcon className="h-4 w-4" />
|
|
607
|
+
</button>
|
|
608
|
+
</div>
|
|
609
|
+
<div className="space-y-4">
|
|
610
|
+
{[
|
|
611
|
+
{ label: "Notifications", icon: AlertIcon },
|
|
612
|
+
{ label: "Privacy", icon: MaintenanceIcon },
|
|
613
|
+
{ label: "Account", icon: TickCircleIcon },
|
|
614
|
+
].map((item, i) => (
|
|
615
|
+
<div
|
|
616
|
+
key={i}
|
|
617
|
+
className="flex items-center justify-between rounded-lg p-3 hover:bg-white/10"
|
|
618
|
+
>
|
|
619
|
+
<div className="flex items-center gap-3">
|
|
620
|
+
<item.icon className="h-5 w-5 text-white/60" />
|
|
621
|
+
<span className="text-white">{item.label}</span>
|
|
622
|
+
</div>
|
|
623
|
+
<ChevronRightIcon className="h-4 w-4 text-white/60" />
|
|
624
|
+
</div>
|
|
625
|
+
))}
|
|
626
|
+
</div>
|
|
627
|
+
</div>
|
|
628
|
+
</Overlay>
|
|
629
|
+
)}
|
|
630
|
+
|
|
631
|
+
{/* Confirmation Modal */}
|
|
632
|
+
{showConfirm && (
|
|
633
|
+
<Overlay opacity="high" glass="high">
|
|
634
|
+
<div className="w-full max-w-sm rounded-lg border border-red-500/30 bg-red-900/20 p-6 backdrop-blur-sm">
|
|
635
|
+
<div className="text-center">
|
|
636
|
+
<AlertIcon className="mx-auto mb-4 h-12 w-12 text-red-400" />
|
|
637
|
+
<h3 className="mb-2 text-lg font-semibold text-white">
|
|
638
|
+
Confirm Action
|
|
639
|
+
</h3>
|
|
640
|
+
<p className="mb-6 text-sm text-white/70">
|
|
641
|
+
This action cannot be undone. Are you sure you want to
|
|
642
|
+
continue?
|
|
643
|
+
</p>
|
|
644
|
+
<div className="flex gap-3">
|
|
645
|
+
<Button
|
|
646
|
+
variant="outline"
|
|
647
|
+
size="sm"
|
|
648
|
+
onClick={() => setShowConfirm(false)}
|
|
649
|
+
className="flex-1"
|
|
650
|
+
>
|
|
651
|
+
Cancel
|
|
652
|
+
</Button>
|
|
653
|
+
<Button
|
|
654
|
+
variant="secondary"
|
|
655
|
+
size="sm"
|
|
656
|
+
onClick={() => setShowConfirm(false)}
|
|
657
|
+
className="flex-1"
|
|
658
|
+
>
|
|
659
|
+
Confirm
|
|
660
|
+
</Button>
|
|
661
|
+
</div>
|
|
662
|
+
</div>
|
|
663
|
+
</div>
|
|
664
|
+
</Overlay>
|
|
665
|
+
)}
|
|
666
|
+
</div>
|
|
667
|
+
)
|
|
668
|
+
},
|
|
669
|
+
parameters: {
|
|
670
|
+
docs: {
|
|
671
|
+
description: {
|
|
672
|
+
story:
|
|
673
|
+
"Interactive overlay examples including search modals, settings panels, and confirmation dialogs demonstrating real-world usage patterns.",
|
|
674
|
+
},
|
|
675
|
+
},
|
|
676
|
+
},
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
// 5. Noise Texture Variants
|
|
680
|
+
export const NoiseTextureVariants: Story = {
|
|
681
|
+
render: () => {
|
|
682
|
+
const [activeNoise, setActiveNoise] = useState<string | null>(null)
|
|
683
|
+
|
|
684
|
+
return (
|
|
685
|
+
<div className="relative">
|
|
686
|
+
<BackgroundContent />
|
|
687
|
+
|
|
688
|
+
{/* Control Panel */}
|
|
689
|
+
<div className="fixed bottom-4 left-1/2 z-50 -translate-x-1/2 transform">
|
|
690
|
+
<div className="space-y-2 rounded-lg bg-black/80 p-4 backdrop-blur-sm">
|
|
691
|
+
<h3 className="text-center text-sm font-medium text-white">
|
|
692
|
+
Noise Texture Variants
|
|
693
|
+
</h3>
|
|
694
|
+
<div className="flex gap-2">
|
|
695
|
+
<Button
|
|
696
|
+
size="sm"
|
|
697
|
+
variant={activeNoise === "none" ? "primary" : "outline"}
|
|
698
|
+
onClick={() =>
|
|
699
|
+
setActiveNoise(activeNoise === "none" ? null : "none")
|
|
700
|
+
}
|
|
701
|
+
>
|
|
702
|
+
No Noise
|
|
703
|
+
</Button>
|
|
704
|
+
<Button
|
|
705
|
+
size="sm"
|
|
706
|
+
variant={activeNoise === "low" ? "primary" : "outline"}
|
|
707
|
+
onClick={() =>
|
|
708
|
+
setActiveNoise(activeNoise === "low" ? null : "low")
|
|
709
|
+
}
|
|
710
|
+
>
|
|
711
|
+
Low Noise
|
|
712
|
+
</Button>
|
|
713
|
+
<Button
|
|
714
|
+
size="sm"
|
|
715
|
+
variant={activeNoise === "medium" ? "primary" : "outline"}
|
|
716
|
+
onClick={() =>
|
|
717
|
+
setActiveNoise(activeNoise === "medium" ? null : "medium")
|
|
718
|
+
}
|
|
719
|
+
>
|
|
720
|
+
Medium Noise
|
|
721
|
+
</Button>
|
|
722
|
+
<Button
|
|
723
|
+
size="sm"
|
|
724
|
+
variant={activeNoise === "high" ? "primary" : "outline"}
|
|
725
|
+
onClick={() =>
|
|
726
|
+
setActiveNoise(activeNoise === "high" ? null : "high")
|
|
727
|
+
}
|
|
728
|
+
>
|
|
729
|
+
High Noise
|
|
730
|
+
</Button>
|
|
731
|
+
</div>
|
|
732
|
+
{activeNoise && (
|
|
733
|
+
<Button
|
|
734
|
+
size="sm"
|
|
735
|
+
variant="secondary"
|
|
736
|
+
onClick={() => setActiveNoise(null)}
|
|
737
|
+
className="w-full"
|
|
738
|
+
>
|
|
739
|
+
Clear Overlay
|
|
740
|
+
</Button>
|
|
741
|
+
)}
|
|
742
|
+
</div>
|
|
743
|
+
</div>
|
|
744
|
+
|
|
745
|
+
{/* Noise Overlays */}
|
|
746
|
+
{activeNoise === "none" && (
|
|
747
|
+
<Overlay opacity="medium" glass="low" noise="none">
|
|
748
|
+
<div className="max-w-md rounded-lg border border-white/20 bg-white/10 p-6 backdrop-blur-sm">
|
|
749
|
+
<h3 className="mb-2 text-lg font-semibold text-white">
|
|
750
|
+
No Noise Texture
|
|
751
|
+
</h3>
|
|
752
|
+
<p className="text-sm text-white/70">
|
|
753
|
+
Clean overlay without any texture patterns
|
|
754
|
+
</p>
|
|
755
|
+
</div>
|
|
756
|
+
</Overlay>
|
|
757
|
+
)}
|
|
758
|
+
|
|
759
|
+
{activeNoise === "low" && (
|
|
760
|
+
<Overlay opacity="medium" glass="low" noise="low">
|
|
761
|
+
<div className="max-w-md rounded-lg border border-white/20 bg-white/10 p-6 backdrop-blur-sm">
|
|
762
|
+
<h3 className="mb-2 text-lg font-semibold text-white">
|
|
763
|
+
Low Noise Texture
|
|
764
|
+
</h3>
|
|
765
|
+
<p className="text-sm text-white/70">
|
|
766
|
+
Subtle noise pattern for added visual interest
|
|
767
|
+
</p>
|
|
768
|
+
</div>
|
|
769
|
+
</Overlay>
|
|
770
|
+
)}
|
|
771
|
+
|
|
772
|
+
{activeNoise === "medium" && (
|
|
773
|
+
<Overlay opacity="medium" glass="low" noise="medium">
|
|
774
|
+
<div className="max-w-md rounded-lg border border-white/20 bg-white/10 p-6 backdrop-blur-sm">
|
|
775
|
+
<h3 className="mb-2 text-lg font-semibold text-white">
|
|
776
|
+
Medium Noise Texture
|
|
777
|
+
</h3>
|
|
778
|
+
<p className="text-sm text-white/70">
|
|
779
|
+
Balanced noise pattern for enhanced texture
|
|
780
|
+
</p>
|
|
781
|
+
</div>
|
|
782
|
+
</Overlay>
|
|
783
|
+
)}
|
|
784
|
+
|
|
785
|
+
{activeNoise === "high" && (
|
|
786
|
+
<Overlay opacity="medium" glass="low" noise="high">
|
|
787
|
+
<div className="max-w-md rounded-lg border border-white/20 bg-white/10 p-6 backdrop-blur-sm">
|
|
788
|
+
<h3 className="mb-2 text-lg font-semibold text-white">
|
|
789
|
+
High Noise Texture
|
|
790
|
+
</h3>
|
|
791
|
+
<p className="text-sm text-white/70">
|
|
792
|
+
Prominent noise pattern for dramatic effect
|
|
793
|
+
</p>
|
|
794
|
+
</div>
|
|
795
|
+
</Overlay>
|
|
796
|
+
)}
|
|
797
|
+
</div>
|
|
798
|
+
)
|
|
799
|
+
},
|
|
800
|
+
parameters: {
|
|
801
|
+
docs: {
|
|
802
|
+
description: {
|
|
803
|
+
story:
|
|
804
|
+
"Demonstration of noise texture variants that add visual interest and depth to overlays with different intensity levels.",
|
|
805
|
+
},
|
|
806
|
+
},
|
|
807
|
+
},
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
// 6. Combined Effects Showcase
|
|
811
|
+
export const CombinedEffectsShowcase: Story = {
|
|
812
|
+
render: () => {
|
|
813
|
+
const [currentCombo, setCurrentCombo] = useState<string | null>(null)
|
|
814
|
+
|
|
815
|
+
const combinations = [
|
|
816
|
+
{
|
|
817
|
+
id: "minimal",
|
|
818
|
+
name: "Minimal",
|
|
819
|
+
opacity: "low",
|
|
820
|
+
glass: "none",
|
|
821
|
+
noise: "none",
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
id: "subtle",
|
|
825
|
+
name: "Subtle",
|
|
826
|
+
opacity: "medium",
|
|
827
|
+
glass: "low",
|
|
828
|
+
noise: "low",
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
id: "balanced",
|
|
832
|
+
name: "Balanced",
|
|
833
|
+
opacity: "medium",
|
|
834
|
+
glass: "medium",
|
|
835
|
+
noise: "medium",
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
id: "dramatic",
|
|
839
|
+
name: "Dramatic",
|
|
840
|
+
opacity: "high",
|
|
841
|
+
glass: "high",
|
|
842
|
+
noise: "low",
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
id: "premium",
|
|
846
|
+
name: "Premium",
|
|
847
|
+
opacity: "high",
|
|
848
|
+
glass: "high",
|
|
849
|
+
noise: "high",
|
|
850
|
+
},
|
|
851
|
+
] as const
|
|
852
|
+
|
|
853
|
+
return (
|
|
854
|
+
<div className="relative">
|
|
855
|
+
<BackgroundContent />
|
|
856
|
+
|
|
857
|
+
{/* Control Panel */}
|
|
858
|
+
<div className="fixed top-1/2 left-4 z-50 -translate-y-1/2 transform">
|
|
859
|
+
<div className="space-y-2 rounded-lg bg-black/80 p-4 backdrop-blur-sm">
|
|
860
|
+
<h3 className="text-sm font-medium text-white">
|
|
861
|
+
Effect Combinations
|
|
862
|
+
</h3>
|
|
863
|
+
<div className="space-y-2">
|
|
864
|
+
{combinations.map((combo) => (
|
|
865
|
+
<Button
|
|
866
|
+
key={combo.id}
|
|
867
|
+
size="sm"
|
|
868
|
+
variant={currentCombo === combo.id ? "primary" : "outline"}
|
|
869
|
+
onClick={() =>
|
|
870
|
+
setCurrentCombo(currentCombo === combo.id ? null : combo.id)
|
|
871
|
+
}
|
|
872
|
+
className="w-full justify-start"
|
|
873
|
+
>
|
|
874
|
+
{combo.name}
|
|
875
|
+
</Button>
|
|
876
|
+
))}
|
|
877
|
+
</div>
|
|
878
|
+
{currentCombo && (
|
|
879
|
+
<Button
|
|
880
|
+
size="sm"
|
|
881
|
+
variant="secondary"
|
|
882
|
+
onClick={() => setCurrentCombo(null)}
|
|
883
|
+
className="w-full"
|
|
884
|
+
>
|
|
885
|
+
Clear Overlay
|
|
886
|
+
</Button>
|
|
887
|
+
)}
|
|
888
|
+
</div>
|
|
889
|
+
</div>
|
|
890
|
+
|
|
891
|
+
{/* Effect Information Panel */}
|
|
892
|
+
{currentCombo && (
|
|
893
|
+
<div className="fixed top-1/2 right-4 z-50 -translate-y-1/2 transform">
|
|
894
|
+
<div className="max-w-xs space-y-2 rounded-lg bg-black/80 p-4 backdrop-blur-sm">
|
|
895
|
+
<h4 className="text-sm font-medium text-white">
|
|
896
|
+
{combinations.find((c) => c.id === currentCombo)?.name} Effect
|
|
897
|
+
</h4>
|
|
898
|
+
<div className="space-y-1 text-xs text-white/70">
|
|
899
|
+
<div>
|
|
900
|
+
Opacity:{" "}
|
|
901
|
+
{combinations.find((c) => c.id === currentCombo)?.opacity}
|
|
902
|
+
</div>
|
|
903
|
+
<div>
|
|
904
|
+
Glass:{" "}
|
|
905
|
+
{combinations.find((c) => c.id === currentCombo)?.glass}
|
|
906
|
+
</div>
|
|
907
|
+
<div>
|
|
908
|
+
Noise:{" "}
|
|
909
|
+
{combinations.find((c) => c.id === currentCombo)?.noise}
|
|
910
|
+
</div>
|
|
911
|
+
</div>
|
|
912
|
+
</div>
|
|
913
|
+
</div>
|
|
914
|
+
)}
|
|
915
|
+
|
|
916
|
+
{/* Combined Effect Overlays */}
|
|
917
|
+
{combinations.map(
|
|
918
|
+
(combo) =>
|
|
919
|
+
currentCombo === combo.id && (
|
|
920
|
+
<Overlay
|
|
921
|
+
key={combo.id}
|
|
922
|
+
opacity={combo.opacity}
|
|
923
|
+
glass={combo.glass}
|
|
924
|
+
noise={combo.noise}
|
|
925
|
+
>
|
|
926
|
+
<div className="max-w-md rounded-lg border border-white/20 bg-white/10 p-6 backdrop-blur-sm">
|
|
927
|
+
<h3 className="mb-2 text-lg font-semibold text-white">
|
|
928
|
+
{combo.name} Overlay
|
|
929
|
+
</h3>
|
|
930
|
+
<p className="mb-4 text-sm text-white/70">
|
|
931
|
+
Combination of {combo.opacity} opacity, {combo.glass} glass
|
|
932
|
+
effect, and {combo.noise} noise texture
|
|
933
|
+
</p>
|
|
934
|
+
<p className="text-sm text-white/80">
|
|
935
|
+
This combination creates a {combo.name.toLowerCase()}{" "}
|
|
936
|
+
overlay effect suitable for different design contexts and
|
|
937
|
+
user interface needs.
|
|
938
|
+
</p>
|
|
939
|
+
</div>
|
|
940
|
+
</Overlay>
|
|
941
|
+
)
|
|
942
|
+
)}
|
|
943
|
+
</div>
|
|
944
|
+
)
|
|
945
|
+
},
|
|
946
|
+
parameters: {
|
|
947
|
+
docs: {
|
|
948
|
+
description: {
|
|
949
|
+
story:
|
|
950
|
+
"Curated combinations of opacity, glass, and noise effects showing different aesthetic approaches from minimal to premium styling.",
|
|
951
|
+
},
|
|
952
|
+
},
|
|
953
|
+
},
|
|
954
|
+
}
|