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,1098 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
|
|
4
|
+
import { CommandIcon } from "."
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof CommandIcon> = {
|
|
7
|
+
title: "Icons/CommandIcon",
|
|
8
|
+
component: CommandIcon,
|
|
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
|
+
`}
|
|
81
|
+
</style>
|
|
82
|
+
|
|
83
|
+
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-purple-900/20 to-gray-900">
|
|
84
|
+
{/* Header */}
|
|
85
|
+
<div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
|
|
86
|
+
<div className="absolute inset-0 bg-gradient-to-r from-blue-500/10 via-transparent to-cyan-500/10" />
|
|
87
|
+
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
88
|
+
<div className="!space-y-6 text-center">
|
|
89
|
+
<div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-blue-500/30 bg-gradient-to-br from-blue-500/20 to-cyan-500/20">
|
|
90
|
+
<CommandIcon className="h-12 w-12 text-blue-400" />
|
|
91
|
+
</div>
|
|
92
|
+
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
93
|
+
CommandIcon
|
|
94
|
+
</h1>
|
|
95
|
+
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
96
|
+
A distinctive command key icon representing keyboard
|
|
97
|
+
shortcuts, system commands, and power user functionality.
|
|
98
|
+
Built with accessibility in mind using Radix UI's
|
|
99
|
+
AccessibleIcon wrapper.
|
|
100
|
+
</p>
|
|
101
|
+
|
|
102
|
+
{/* Stats */}
|
|
103
|
+
<div className="flex items-center justify-center gap-8 pt-8">
|
|
104
|
+
<div className="text-center">
|
|
105
|
+
<div className="text-3xl font-bold text-blue-300">
|
|
106
|
+
Accessible
|
|
107
|
+
</div>
|
|
108
|
+
<div className="text-sm text-white/60">
|
|
109
|
+
Screen reader friendly
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
<div className="h-8 w-px bg-white/20" />
|
|
113
|
+
<div className="text-center">
|
|
114
|
+
<div className="text-3xl font-bold text-cyan-300">
|
|
115
|
+
Scalable
|
|
116
|
+
</div>
|
|
117
|
+
<div className="text-sm text-white/60">
|
|
118
|
+
Any size needed
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
<div className="h-8 w-px bg-white/20" />
|
|
122
|
+
<div className="text-center">
|
|
123
|
+
<div className="text-3xl font-bold text-indigo-300">
|
|
124
|
+
Shortcuts
|
|
125
|
+
</div>
|
|
126
|
+
<div className="text-sm text-white/60">
|
|
127
|
+
Command symbols
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
{/* Content */}
|
|
136
|
+
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
137
|
+
{/* Quick Usage */}
|
|
138
|
+
<div className="!space-y-8">
|
|
139
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
140
|
+
Quick Start
|
|
141
|
+
</h2>
|
|
142
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
143
|
+
<div className="!space-y-4">
|
|
144
|
+
<h3 className="text-xl font-semibold !text-blue-300">
|
|
145
|
+
Basic Usage
|
|
146
|
+
</h3>
|
|
147
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
148
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
149
|
+
{`import { CommandIcon } from "@icons/command-icon"
|
|
150
|
+
|
|
151
|
+
function ShortcutHint() {
|
|
152
|
+
return (
|
|
153
|
+
<div className="flex items-center gap-2">
|
|
154
|
+
<CommandIcon className="h-4 w-4 text-blue-400 " />
|
|
155
|
+
<span>+ K to open command palette</span>
|
|
156
|
+
</div>
|
|
157
|
+
)
|
|
158
|
+
}`}
|
|
159
|
+
</pre>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
<div className="!space-y-4">
|
|
164
|
+
<h3 className="text-xl font-semibold !text-blue-300">
|
|
165
|
+
Live Preview
|
|
166
|
+
</h3>
|
|
167
|
+
<div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
168
|
+
<div className="flex items-center gap-3 rounded-lg border border-blue-500/20 bg-blue-500/10 px-4 py-2">
|
|
169
|
+
<CommandIcon className="h-4 w-4 text-blue-400" />
|
|
170
|
+
<span className="text-white">+ K to search</span>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
{/* Props Documentation */}
|
|
178
|
+
<div className="!space-y-8">
|
|
179
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
180
|
+
Props & Configuration
|
|
181
|
+
</h2>
|
|
182
|
+
|
|
183
|
+
<div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
|
|
184
|
+
<div className="bg-white/5 p-4">
|
|
185
|
+
<h3 className="text-xl font-semibold !text-white">Props</h3>
|
|
186
|
+
</div>
|
|
187
|
+
<table className="!my-0 w-full">
|
|
188
|
+
<thead className="bg-white/5">
|
|
189
|
+
<tr className="border-b border-white/10">
|
|
190
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
191
|
+
Prop
|
|
192
|
+
</th>
|
|
193
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
194
|
+
Type
|
|
195
|
+
</th>
|
|
196
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
197
|
+
Default
|
|
198
|
+
</th>
|
|
199
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
200
|
+
Description
|
|
201
|
+
</th>
|
|
202
|
+
</tr>
|
|
203
|
+
</thead>
|
|
204
|
+
<tbody>
|
|
205
|
+
<tr className="border-b border-white/5">
|
|
206
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
207
|
+
width
|
|
208
|
+
</td>
|
|
209
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
210
|
+
number | string
|
|
211
|
+
</td>
|
|
212
|
+
<td className="px-6 py-4 text-sm !text-white/50">24</td>
|
|
213
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
214
|
+
Width of the icon in pixels
|
|
215
|
+
</td>
|
|
216
|
+
</tr>
|
|
217
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
218
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
219
|
+
height
|
|
220
|
+
</td>
|
|
221
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
222
|
+
number | string
|
|
223
|
+
</td>
|
|
224
|
+
<td className="px-6 py-4 text-sm !text-white/50">24</td>
|
|
225
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
226
|
+
Height of the icon in pixels
|
|
227
|
+
</td>
|
|
228
|
+
</tr>
|
|
229
|
+
<tr className="border-b border-white/5">
|
|
230
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
231
|
+
stroke
|
|
232
|
+
</td>
|
|
233
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
234
|
+
string
|
|
235
|
+
</td>
|
|
236
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
237
|
+
currentColor
|
|
238
|
+
</td>
|
|
239
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
240
|
+
Stroke color of the icon
|
|
241
|
+
</td>
|
|
242
|
+
</tr>
|
|
243
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
244
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
245
|
+
className
|
|
246
|
+
</td>
|
|
247
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
248
|
+
string
|
|
249
|
+
</td>
|
|
250
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
251
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
252
|
+
CSS classes for styling (use for overrides)
|
|
253
|
+
</td>
|
|
254
|
+
</tr>
|
|
255
|
+
<tr className="border-b border-white/5">
|
|
256
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
257
|
+
strokeWidth
|
|
258
|
+
</td>
|
|
259
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
260
|
+
number | string
|
|
261
|
+
</td>
|
|
262
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
263
|
+
1.5
|
|
264
|
+
</td>
|
|
265
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
266
|
+
Stroke width of the command symbol
|
|
267
|
+
</td>
|
|
268
|
+
</tr>
|
|
269
|
+
<tr className="!bg-black/10">
|
|
270
|
+
<td className="px-6 py-4 font-mono text-sm !text-blue-300">
|
|
271
|
+
...svgProps
|
|
272
|
+
</td>
|
|
273
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
274
|
+
SVGProps
|
|
275
|
+
</td>
|
|
276
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
277
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
278
|
+
All standard SVG element props
|
|
279
|
+
</td>
|
|
280
|
+
</tr>
|
|
281
|
+
</tbody>
|
|
282
|
+
</table>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
|
|
286
|
+
{/* Size Variations */}
|
|
287
|
+
<div className="!space-y-8">
|
|
288
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
289
|
+
Size Variations
|
|
290
|
+
</h2>
|
|
291
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
292
|
+
<div className="!space-y-6">
|
|
293
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
294
|
+
<div className="!space-y-4">
|
|
295
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
296
|
+
Standard Sizes
|
|
297
|
+
</h3>
|
|
298
|
+
<div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
|
|
299
|
+
<div className="text-center">
|
|
300
|
+
<CommandIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
|
|
301
|
+
<span className="text-xs text-white/60">12px</span>
|
|
302
|
+
</div>
|
|
303
|
+
<div className="text-center">
|
|
304
|
+
<CommandIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
|
|
305
|
+
<span className="text-xs text-white/60">16px</span>
|
|
306
|
+
</div>
|
|
307
|
+
<div className="text-center">
|
|
308
|
+
<CommandIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
|
|
309
|
+
<span className="text-xs text-white/60">20px</span>
|
|
310
|
+
</div>
|
|
311
|
+
<div className="text-center">
|
|
312
|
+
<CommandIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
|
|
313
|
+
<span className="text-xs text-white/60">24px</span>
|
|
314
|
+
</div>
|
|
315
|
+
<div className="text-center">
|
|
316
|
+
<CommandIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
|
|
317
|
+
<span className="text-xs text-white/60">32px</span>
|
|
318
|
+
</div>
|
|
319
|
+
<div className="text-center">
|
|
320
|
+
<CommandIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
|
|
321
|
+
<span className="text-xs text-white/60">48px</span>
|
|
322
|
+
</div>
|
|
323
|
+
</div>
|
|
324
|
+
</div>
|
|
325
|
+
|
|
326
|
+
<div className="!space-y-4">
|
|
327
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
328
|
+
Code Example
|
|
329
|
+
</h3>
|
|
330
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
331
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
332
|
+
{`// Small (16px)
|
|
333
|
+
<CommandIcon className="h-4 w-4 " />
|
|
334
|
+
|
|
335
|
+
// Medium (24px)
|
|
336
|
+
<CommandIcon className="h-6 w-6 " />
|
|
337
|
+
|
|
338
|
+
// Large (32px)
|
|
339
|
+
<CommandIcon className="h-8 w-8 " />
|
|
340
|
+
|
|
341
|
+
// Custom size
|
|
342
|
+
<CommandIcon width={40} height={40} />`}
|
|
343
|
+
</pre>
|
|
344
|
+
</div>
|
|
345
|
+
</div>
|
|
346
|
+
</div>
|
|
347
|
+
</div>
|
|
348
|
+
</div>
|
|
349
|
+
</div>
|
|
350
|
+
|
|
351
|
+
{/* Color Variations */}
|
|
352
|
+
<div className="!space-y-8">
|
|
353
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
354
|
+
Color Variations
|
|
355
|
+
</h2>
|
|
356
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
357
|
+
<div className="!space-y-4">
|
|
358
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
359
|
+
Semantic Colors
|
|
360
|
+
</h3>
|
|
361
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
362
|
+
<div className="flex items-center gap-4">
|
|
363
|
+
<CommandIcon className="h-6 w-6 text-blue-400" />
|
|
364
|
+
<div>
|
|
365
|
+
<div className="text-sm font-medium text-white">
|
|
366
|
+
Primary
|
|
367
|
+
</div>
|
|
368
|
+
<div className="text-xs text-white/60">
|
|
369
|
+
text-blue-400
|
|
370
|
+
</div>
|
|
371
|
+
</div>
|
|
372
|
+
</div>
|
|
373
|
+
<div className="flex items-center gap-4">
|
|
374
|
+
<CommandIcon className="h-6 w-6 text-gray-400" />
|
|
375
|
+
<div>
|
|
376
|
+
<div className="text-sm font-medium text-white">
|
|
377
|
+
Secondary
|
|
378
|
+
</div>
|
|
379
|
+
<div className="text-xs text-white/60">
|
|
380
|
+
text-gray-400
|
|
381
|
+
</div>
|
|
382
|
+
</div>
|
|
383
|
+
</div>
|
|
384
|
+
<div className="flex items-center gap-4">
|
|
385
|
+
<CommandIcon className="h-6 w-6 text-cyan-400" />
|
|
386
|
+
<div>
|
|
387
|
+
<div className="text-sm font-medium text-white">
|
|
388
|
+
Accent
|
|
389
|
+
</div>
|
|
390
|
+
<div className="text-xs text-white/60">
|
|
391
|
+
text-cyan-400
|
|
392
|
+
</div>
|
|
393
|
+
</div>
|
|
394
|
+
</div>
|
|
395
|
+
<div className="flex items-center gap-4">
|
|
396
|
+
<CommandIcon className="h-6 w-6 text-white/40" />
|
|
397
|
+
<div>
|
|
398
|
+
<div className="text-sm font-medium text-white">
|
|
399
|
+
Disabled
|
|
400
|
+
</div>
|
|
401
|
+
<div className="text-xs text-white/60">
|
|
402
|
+
text-white/40
|
|
403
|
+
</div>
|
|
404
|
+
</div>
|
|
405
|
+
</div>
|
|
406
|
+
</div>
|
|
407
|
+
</div>
|
|
408
|
+
|
|
409
|
+
<div className="!space-y-4">
|
|
410
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
411
|
+
Custom Colors
|
|
412
|
+
</h3>
|
|
413
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
414
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
415
|
+
{`// Using Tailwind classes with
|
|
416
|
+
<CommandIcon className="h-6 w-6 text-blue-400 " />
|
|
417
|
+
<CommandIcon className="h-6 w-6 text-cyan-500 " />
|
|
418
|
+
|
|
419
|
+
// Using CSS custom properties
|
|
420
|
+
<CommandIcon
|
|
421
|
+
className="h-6 w-6 "
|
|
422
|
+
style={{ color: 'var(--color-primary)' }}
|
|
423
|
+
/>
|
|
424
|
+
|
|
425
|
+
// Direct stroke prop
|
|
426
|
+
<CommandIcon
|
|
427
|
+
width={24}
|
|
428
|
+
height={24}
|
|
429
|
+
stroke="#3b82f6"
|
|
430
|
+
/>`}
|
|
431
|
+
</pre>
|
|
432
|
+
</div>
|
|
433
|
+
</div>
|
|
434
|
+
</div>
|
|
435
|
+
</div>
|
|
436
|
+
|
|
437
|
+
{/* Usage Examples */}
|
|
438
|
+
<div className="!space-y-8">
|
|
439
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
440
|
+
Usage Examples
|
|
441
|
+
</h2>
|
|
442
|
+
|
|
443
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
444
|
+
{/* Keyboard Shortcuts */}
|
|
445
|
+
<div className="!space-y-4">
|
|
446
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
447
|
+
Keyboard Shortcuts
|
|
448
|
+
</h3>
|
|
449
|
+
<div className="!space-y-4">
|
|
450
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
451
|
+
<div className="space-y-3">
|
|
452
|
+
<div className="flex items-center justify-between">
|
|
453
|
+
<span className="text-white">Quick Search</span>
|
|
454
|
+
<div className="flex items-center gap-1">
|
|
455
|
+
<kbd className="flex h-6 w-6 items-center justify-center rounded border border-white/20 bg-white/10 text-xs">
|
|
456
|
+
<CommandIcon className="h-3 w-3 text-white/70" />
|
|
457
|
+
</kbd>
|
|
458
|
+
<span className="text-white/60">+</span>
|
|
459
|
+
<kbd className="flex h-6 w-6 items-center justify-center rounded border border-white/20 bg-white/10 text-xs text-white/70">
|
|
460
|
+
K
|
|
461
|
+
</kbd>
|
|
462
|
+
</div>
|
|
463
|
+
</div>
|
|
464
|
+
<div className="flex items-center justify-between">
|
|
465
|
+
<span className="text-white">New File</span>
|
|
466
|
+
<div className="flex items-center gap-1">
|
|
467
|
+
<kbd className="flex h-6 w-6 items-center justify-center rounded border border-white/20 bg-white/10 text-xs">
|
|
468
|
+
<CommandIcon className="h-3 w-3 text-white/70" />
|
|
469
|
+
</kbd>
|
|
470
|
+
<span className="text-white/60">+</span>
|
|
471
|
+
<kbd className="flex h-6 w-6 items-center justify-center rounded border border-white/20 bg-white/10 text-xs text-white/70">
|
|
472
|
+
N
|
|
473
|
+
</kbd>
|
|
474
|
+
</div>
|
|
475
|
+
</div>
|
|
476
|
+
<div className="flex items-center justify-between">
|
|
477
|
+
<span className="text-white">Save</span>
|
|
478
|
+
<div className="flex items-center gap-1">
|
|
479
|
+
<kbd className="flex h-6 w-6 items-center justify-center rounded border border-white/20 bg-white/10 text-xs">
|
|
480
|
+
<CommandIcon className="h-3 w-3 text-white/70" />
|
|
481
|
+
</kbd>
|
|
482
|
+
<span className="text-white/60">+</span>
|
|
483
|
+
<kbd className="flex h-6 w-6 items-center justify-center rounded border border-white/20 bg-white/10 text-xs text-white/70">
|
|
484
|
+
S
|
|
485
|
+
</kbd>
|
|
486
|
+
</div>
|
|
487
|
+
</div>
|
|
488
|
+
</div>
|
|
489
|
+
</div>
|
|
490
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
491
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
492
|
+
{`// Keyboard shortcut display
|
|
493
|
+
<div className="flex items-center gap-1">
|
|
494
|
+
<kbd className="flex h-6 w-6 items-center justify-center rounded border border-white/20 bg-white/10">
|
|
495
|
+
<CommandIcon className="h-3 w-3 text-white/70 " />
|
|
496
|
+
</kbd>
|
|
497
|
+
<span>+</span>
|
|
498
|
+
<kbd className="flex h-6 w-6 items-center justify-center rounded border border-white/20 bg-white/10">
|
|
499
|
+
K
|
|
500
|
+
</kbd>
|
|
501
|
+
</div>
|
|
502
|
+
|
|
503
|
+
// Shortcut hint
|
|
504
|
+
<div className="flex items-center gap-2 text-sm text-white/60">
|
|
505
|
+
<CommandIcon className="h-3 w-3 " />
|
|
506
|
+
<span>+ K to open command palette</span>
|
|
507
|
+
</div>`}
|
|
508
|
+
</pre>
|
|
509
|
+
</div>
|
|
510
|
+
</div>
|
|
511
|
+
</div>
|
|
512
|
+
|
|
513
|
+
{/* Command Palette */}
|
|
514
|
+
<div className="!space-y-4">
|
|
515
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
516
|
+
Command Palette
|
|
517
|
+
</h3>
|
|
518
|
+
<div className="!space-y-4">
|
|
519
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
520
|
+
<div className="space-y-3">
|
|
521
|
+
<div className="flex items-center gap-3 border-b border-white/10 pb-3">
|
|
522
|
+
<CommandIcon className="h-5 w-5 text-blue-400" />
|
|
523
|
+
<input
|
|
524
|
+
type="text"
|
|
525
|
+
placeholder="Type a command..."
|
|
526
|
+
className="flex-1 bg-transparent text-white placeholder-white/50 focus:outline-none"
|
|
527
|
+
/>
|
|
528
|
+
</div>
|
|
529
|
+
<div className="space-y-1">
|
|
530
|
+
<div className="flex items-center gap-3 rounded px-2 py-1 hover:bg-white/10">
|
|
531
|
+
<CommandIcon className="h-4 w-4 text-white/60" />
|
|
532
|
+
<span className="text-white">
|
|
533
|
+
Create new file
|
|
534
|
+
</span>
|
|
535
|
+
</div>
|
|
536
|
+
<div className="flex items-center gap-3 rounded px-2 py-1 hover:bg-white/10">
|
|
537
|
+
<CommandIcon className="h-4 w-4 text-white/60" />
|
|
538
|
+
<span className="text-white">Open recent</span>
|
|
539
|
+
</div>
|
|
540
|
+
<div className="flex items-center gap-3 rounded px-2 py-1 hover:bg-white/10">
|
|
541
|
+
<CommandIcon className="h-4 w-4 text-white/60" />
|
|
542
|
+
<span className="text-white">Toggle sidebar</span>
|
|
543
|
+
</div>
|
|
544
|
+
</div>
|
|
545
|
+
</div>
|
|
546
|
+
</div>
|
|
547
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
548
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
549
|
+
{`// Command palette header
|
|
550
|
+
<div className="flex items-center gap-3 border-b border-white/10 pb-3">
|
|
551
|
+
<CommandIcon className="h-5 w-5 text-blue-400 " />
|
|
552
|
+
<input
|
|
553
|
+
type="text"
|
|
554
|
+
placeholder="Type a command..."
|
|
555
|
+
className="flex-1 bg-transparent text-white placeholder-white/50"
|
|
556
|
+
/>
|
|
557
|
+
</div>
|
|
558
|
+
|
|
559
|
+
// Command items
|
|
560
|
+
<div className="flex items-center gap-3 rounded px-2 py-1 hover:bg-white/10">
|
|
561
|
+
<CommandIcon className="h-4 w-4 text-white/60 " />
|
|
562
|
+
<span className="text-white">Create new file</span>
|
|
563
|
+
</div>`}
|
|
564
|
+
</pre>
|
|
565
|
+
</div>
|
|
566
|
+
</div>
|
|
567
|
+
</div>
|
|
568
|
+
|
|
569
|
+
{/* Button Integration */}
|
|
570
|
+
<div className="!space-y-4">
|
|
571
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
572
|
+
Button Integration
|
|
573
|
+
</h3>
|
|
574
|
+
<div className="!space-y-4">
|
|
575
|
+
<div className="flex gap-4">
|
|
576
|
+
<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">
|
|
577
|
+
<CommandIcon className="h-4 w-4" />
|
|
578
|
+
Open Command Menu
|
|
579
|
+
</button>
|
|
580
|
+
<button className="flex items-center gap-2 rounded-lg border border-gray-500/30 bg-gray-500/20 px-4 py-2 text-gray-200 transition-colors hover:bg-gray-500/30">
|
|
581
|
+
<CommandIcon className="h-4 w-4" />
|
|
582
|
+
Shortcuts
|
|
583
|
+
</button>
|
|
584
|
+
</div>
|
|
585
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
586
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
587
|
+
{`// Command menu button
|
|
588
|
+
<button className="flex items-center gap-2 bg-blue-500/20 border border-blue-500/30 px-4 py-2 rounded-lg">
|
|
589
|
+
<CommandIcon className="h-4 w-4 " />
|
|
590
|
+
Open Command Menu
|
|
591
|
+
</button>
|
|
592
|
+
|
|
593
|
+
// Shortcuts button
|
|
594
|
+
<button className="flex items-center gap-2 bg-gray-500/20 border border-gray-500/30 px-4 py-2 rounded-lg">
|
|
595
|
+
<CommandIcon className="h-4 w-4 " />
|
|
596
|
+
Shortcuts
|
|
597
|
+
</button>`}
|
|
598
|
+
</pre>
|
|
599
|
+
</div>
|
|
600
|
+
</div>
|
|
601
|
+
</div>
|
|
602
|
+
|
|
603
|
+
{/* Help Documentation */}
|
|
604
|
+
<div className="!space-y-4">
|
|
605
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
606
|
+
Help Documentation
|
|
607
|
+
</h3>
|
|
608
|
+
<div className="!space-y-4">
|
|
609
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
610
|
+
<div className="space-y-4">
|
|
611
|
+
<div className="flex items-start gap-3">
|
|
612
|
+
<CommandIcon className="mt-0.5 h-5 w-5 flex-shrink-0 text-blue-400" />
|
|
613
|
+
<div>
|
|
614
|
+
<h4 className="font-medium !text-white">
|
|
615
|
+
Power User Tips
|
|
616
|
+
</h4>
|
|
617
|
+
<p className="text-sm !text-white/70">
|
|
618
|
+
Use Command key combinations to navigate faster
|
|
619
|
+
and boost your productivity.
|
|
620
|
+
</p>
|
|
621
|
+
</div>
|
|
622
|
+
</div>
|
|
623
|
+
<div className="ml-8 space-y-2 text-sm text-white/60">
|
|
624
|
+
<div>
|
|
625
|
+
<CommandIcon className="mr-2 inline h-3 w-3" />+
|
|
626
|
+
K: Quick search
|
|
627
|
+
</div>
|
|
628
|
+
<div>
|
|
629
|
+
<CommandIcon className="mr-2 inline h-3 w-3" />+
|
|
630
|
+
P: Command palette
|
|
631
|
+
</div>
|
|
632
|
+
<div>
|
|
633
|
+
<CommandIcon className="mr-2 inline h-3 w-3" />+
|
|
634
|
+
/: Show all shortcuts
|
|
635
|
+
</div>
|
|
636
|
+
</div>
|
|
637
|
+
</div>
|
|
638
|
+
</div>
|
|
639
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
640
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
641
|
+
{`// Help section with command icon
|
|
642
|
+
<div className="flex items-start gap-3">
|
|
643
|
+
<CommandIcon className="mt-0.5 h-5 w-5 flex-shrink-0 text-blue-400 " />
|
|
644
|
+
<div>
|
|
645
|
+
<h4 className="font-medium text-white">Power User Tips</h4>
|
|
646
|
+
<p className="text-sm text-white/70">
|
|
647
|
+
Use Command key combinations to navigate faster and boost your productivity.
|
|
648
|
+
</p>
|
|
649
|
+
</div>
|
|
650
|
+
</div>
|
|
651
|
+
|
|
652
|
+
// Inline shortcut references
|
|
653
|
+
<div>
|
|
654
|
+
<CommandIcon className="mr-2 inline h-3 w-3 " />
|
|
655
|
+
+ K: Quick search
|
|
656
|
+
</div>`}
|
|
657
|
+
</pre>
|
|
658
|
+
</div>
|
|
659
|
+
</div>
|
|
660
|
+
</div>
|
|
661
|
+
</div>
|
|
662
|
+
</div>
|
|
663
|
+
|
|
664
|
+
{/* Accessibility */}
|
|
665
|
+
<div className="!space-y-8">
|
|
666
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
667
|
+
Accessibility Features
|
|
668
|
+
</h2>
|
|
669
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
670
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
671
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
672
|
+
✅ Built-in Features
|
|
673
|
+
</h3>
|
|
674
|
+
<ul className="!space-y-2 text-sm !text-white/70">
|
|
675
|
+
<li className="!text-white/70">
|
|
676
|
+
Uses Radix UI AccessibleIcon wrapper
|
|
677
|
+
</li>
|
|
678
|
+
<li className="!text-white/70">
|
|
679
|
+
Provides screen reader label "Command icon"
|
|
680
|
+
</li>
|
|
681
|
+
<li className="!text-white/70">
|
|
682
|
+
Supports keyboard navigation when interactive
|
|
683
|
+
</li>
|
|
684
|
+
<li className="!text-white/70">
|
|
685
|
+
Maintains proper color contrast ratios
|
|
686
|
+
</li>
|
|
687
|
+
<li className="!text-white/70">
|
|
688
|
+
Scales with user's font size preferences
|
|
689
|
+
</li>
|
|
690
|
+
</ul>
|
|
691
|
+
</div>
|
|
692
|
+
|
|
693
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
694
|
+
<h3 className="text-lg font-semibold !text-blue-300">
|
|
695
|
+
💡 Best Practices
|
|
696
|
+
</h3>
|
|
697
|
+
<ul className="!space-y-2 text-sm text-white/70">
|
|
698
|
+
<li className="!text-white/70">
|
|
699
|
+
Always pair with descriptive text or alt text
|
|
700
|
+
</li>
|
|
701
|
+
<li className="!text-white/70">
|
|
702
|
+
Use consistent shortcut patterns across your app
|
|
703
|
+
</li>
|
|
704
|
+
<li className="!text-white/70">
|
|
705
|
+
Provide alternative navigation methods
|
|
706
|
+
</li>
|
|
707
|
+
<li className="!text-white/70">
|
|
708
|
+
Add focus states for interactive elements
|
|
709
|
+
</li>
|
|
710
|
+
<li className="!text-white/70">
|
|
711
|
+
Consider screen reader announcements for shortcuts
|
|
712
|
+
</li>
|
|
713
|
+
</ul>
|
|
714
|
+
</div>
|
|
715
|
+
</div>
|
|
716
|
+
|
|
717
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
718
|
+
<h3 className="mb-4 text-lg font-semibold !text-purple-300">
|
|
719
|
+
Proper ARIA Implementation
|
|
720
|
+
</h3>
|
|
721
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
722
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
723
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
724
|
+
{`// Keyboard shortcut with proper ARIA
|
|
725
|
+
<button
|
|
726
|
+
aria-label="Open command palette (Cmd+K)"
|
|
727
|
+
className="flex items-center gap-2"
|
|
728
|
+
>
|
|
729
|
+
<CommandIcon className="h-4 w-4 " />
|
|
730
|
+
Command Menu
|
|
731
|
+
</button>
|
|
732
|
+
|
|
733
|
+
// Shortcut display with screen reader text
|
|
734
|
+
<div
|
|
735
|
+
role="group"
|
|
736
|
+
aria-label="Keyboard shortcut: Command plus K"
|
|
737
|
+
>
|
|
738
|
+
<CommandIcon className="h-4 w-4 " />
|
|
739
|
+
<span aria-hidden="true">+ K</span>
|
|
740
|
+
<span className="sr-only">Command plus K</span>
|
|
741
|
+
</div>
|
|
742
|
+
|
|
743
|
+
// Command palette with live region
|
|
744
|
+
<div
|
|
745
|
+
role="combobox"
|
|
746
|
+
aria-expanded="true"
|
|
747
|
+
aria-label="Command palette"
|
|
748
|
+
>
|
|
749
|
+
<CommandIcon className="h-5 w-5 " />
|
|
750
|
+
<input
|
|
751
|
+
type="text"
|
|
752
|
+
aria-label="Search commands"
|
|
753
|
+
placeholder="Type a command..."
|
|
754
|
+
/>
|
|
755
|
+
</div>`}
|
|
756
|
+
</pre>
|
|
757
|
+
</div>
|
|
758
|
+
<div className="!space-y-4">
|
|
759
|
+
<p className="text-sm !text-white/70">
|
|
760
|
+
Always provide context-appropriate ARIA labels for
|
|
761
|
+
command interfaces. The Command icon should indicate
|
|
762
|
+
keyboard-driven functionality and shortcuts.
|
|
763
|
+
</p>
|
|
764
|
+
<div className="rounded-lg border border-blue-500/20 bg-blue-500/10 p-4">
|
|
765
|
+
<div className="flex items-center gap-2 text-sm text-blue-200">
|
|
766
|
+
<CommandIcon className="h-4 w-4" />
|
|
767
|
+
<span>
|
|
768
|
+
Consider the user's platform (⌘ on Mac, Ctrl on
|
|
769
|
+
Windows)
|
|
770
|
+
</span>
|
|
771
|
+
</div>
|
|
772
|
+
</div>
|
|
773
|
+
</div>
|
|
774
|
+
</div>
|
|
775
|
+
</div>
|
|
776
|
+
</div>
|
|
777
|
+
|
|
778
|
+
{/* Related Icons */}
|
|
779
|
+
<div className="!space-y-8">
|
|
780
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
781
|
+
Related Icons
|
|
782
|
+
</h2>
|
|
783
|
+
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
784
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
785
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-purple-500/20">
|
|
786
|
+
<span className="text-2xl">⌨️</span>
|
|
787
|
+
</div>
|
|
788
|
+
<div>
|
|
789
|
+
<div className="font-medium text-white">KeyboardIcon</div>
|
|
790
|
+
<div className="text-xs text-white/60">
|
|
791
|
+
Keyboard input
|
|
792
|
+
</div>
|
|
793
|
+
</div>
|
|
794
|
+
</div>
|
|
795
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
796
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
|
|
797
|
+
<span className="text-2xl">🔍</span>
|
|
798
|
+
</div>
|
|
799
|
+
<div>
|
|
800
|
+
<div className="font-medium text-white">SearchIcon</div>
|
|
801
|
+
<div className="text-xs text-white/60">
|
|
802
|
+
Search function
|
|
803
|
+
</div>
|
|
804
|
+
</div>
|
|
805
|
+
</div>
|
|
806
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
807
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-orange-500/20">
|
|
808
|
+
<span className="text-2xl">⚙️</span>
|
|
809
|
+
</div>
|
|
810
|
+
<div>
|
|
811
|
+
<div className="font-medium text-white">SettingsIcon</div>
|
|
812
|
+
<div className="text-xs text-white/60">Configuration</div>
|
|
813
|
+
</div>
|
|
814
|
+
</div>
|
|
815
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
816
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-pink-500/20">
|
|
817
|
+
<span className="text-2xl">📋</span>
|
|
818
|
+
</div>
|
|
819
|
+
<div>
|
|
820
|
+
<div className="font-medium text-white">MenuIcon</div>
|
|
821
|
+
<div className="text-xs text-white/60">Menu options</div>
|
|
822
|
+
</div>
|
|
823
|
+
</div>
|
|
824
|
+
</div>
|
|
825
|
+
</div>
|
|
826
|
+
</div>
|
|
827
|
+
|
|
828
|
+
{/* Footer */}
|
|
829
|
+
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
830
|
+
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
831
|
+
<div className="!space-y-4 text-center">
|
|
832
|
+
<p className="!text-white/60">
|
|
833
|
+
CommandIcon is part of the Aural UI icon library, built with
|
|
834
|
+
accessibility and keyboard navigation in mind.
|
|
835
|
+
</p>
|
|
836
|
+
<p className="text-sm !text-white/40">
|
|
837
|
+
All icons use Radix UI's AccessibleIcon for screen reader
|
|
838
|
+
compatibility and follow WCAG guidelines.
|
|
839
|
+
</p>
|
|
840
|
+
</div>
|
|
841
|
+
</div>
|
|
842
|
+
</div>
|
|
843
|
+
</div>
|
|
844
|
+
</>
|
|
845
|
+
),
|
|
846
|
+
},
|
|
847
|
+
},
|
|
848
|
+
tags: ["autodocs"],
|
|
849
|
+
argTypes: {
|
|
850
|
+
width: {
|
|
851
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
852
|
+
description: "Width of the icon in pixels",
|
|
853
|
+
},
|
|
854
|
+
height: {
|
|
855
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
856
|
+
description: "Height of the icon in pixels",
|
|
857
|
+
},
|
|
858
|
+
stroke: {
|
|
859
|
+
control: "color",
|
|
860
|
+
description: "Stroke color of the icon",
|
|
861
|
+
},
|
|
862
|
+
strokeWidth: {
|
|
863
|
+
control: { type: "range", min: 0.5, max: 3, step: 0.1 },
|
|
864
|
+
description: "Stroke width of the command symbol",
|
|
865
|
+
},
|
|
866
|
+
className: {
|
|
867
|
+
control: "text",
|
|
868
|
+
description: "CSS classes for styling (use for overrides)",
|
|
869
|
+
},
|
|
870
|
+
},
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
export default meta
|
|
874
|
+
type Story = StoryObj<typeof CommandIcon>
|
|
875
|
+
|
|
876
|
+
// Story parameters for consistent dark theme
|
|
877
|
+
const storyParameters = {
|
|
878
|
+
backgrounds: {
|
|
879
|
+
default: "dark",
|
|
880
|
+
values: [
|
|
881
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
882
|
+
{ name: "darker", value: "#000000" },
|
|
883
|
+
],
|
|
884
|
+
},
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
export const Default: Story = {
|
|
888
|
+
args: {
|
|
889
|
+
width: 24,
|
|
890
|
+
height: 24,
|
|
891
|
+
className: "text-blue-400 ",
|
|
892
|
+
},
|
|
893
|
+
parameters: storyParameters,
|
|
894
|
+
render: (args) => (
|
|
895
|
+
<div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
896
|
+
<CommandIcon {...args} />
|
|
897
|
+
</div>
|
|
898
|
+
),
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
export const SizeVariations: Story = {
|
|
902
|
+
parameters: {
|
|
903
|
+
...storyParameters,
|
|
904
|
+
docs: {
|
|
905
|
+
description: {
|
|
906
|
+
story:
|
|
907
|
+
"CommandIcon in different sizes, from small shortcuts to large command interfaces.",
|
|
908
|
+
},
|
|
909
|
+
},
|
|
910
|
+
},
|
|
911
|
+
render: () => (
|
|
912
|
+
<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">
|
|
913
|
+
<div className="text-center">
|
|
914
|
+
<CommandIcon className="!mx-auto mb-2 h-3 w-3 text-blue-400" />
|
|
915
|
+
<span className="text-xs text-white/60">12px</span>
|
|
916
|
+
</div>
|
|
917
|
+
<div className="text-center">
|
|
918
|
+
<CommandIcon className="!mx-auto mb-2 h-4 w-4 text-blue-400" />
|
|
919
|
+
<span className="text-xs text-white/60">16px</span>
|
|
920
|
+
</div>
|
|
921
|
+
<div className="text-center">
|
|
922
|
+
<CommandIcon className="!mx-auto mb-2 h-5 w-5 text-blue-400" />
|
|
923
|
+
<span className="text-xs text-white/60">20px</span>
|
|
924
|
+
</div>
|
|
925
|
+
<div className="text-center">
|
|
926
|
+
<CommandIcon className="!mx-auto mb-2 h-6 w-6 text-blue-400" />
|
|
927
|
+
<span className="text-xs text-white/60">24px</span>
|
|
928
|
+
</div>
|
|
929
|
+
<div className="text-center">
|
|
930
|
+
<CommandIcon className="!mx-auto mb-2 h-8 w-8 text-blue-400" />
|
|
931
|
+
<span className="text-xs text-white/60">32px</span>
|
|
932
|
+
</div>
|
|
933
|
+
<div className="text-center">
|
|
934
|
+
<CommandIcon className="!mx-auto mb-2 h-12 w-12 text-blue-400" />
|
|
935
|
+
<span className="text-xs text-white/60">48px</span>
|
|
936
|
+
</div>
|
|
937
|
+
</div>
|
|
938
|
+
),
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
export const ColorVariations: Story = {
|
|
942
|
+
parameters: {
|
|
943
|
+
...storyParameters,
|
|
944
|
+
docs: {
|
|
945
|
+
description: {
|
|
946
|
+
story:
|
|
947
|
+
"CommandIcon in different semantic colors for various command contexts.",
|
|
948
|
+
},
|
|
949
|
+
},
|
|
950
|
+
},
|
|
951
|
+
render: () => (
|
|
952
|
+
<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">
|
|
953
|
+
<div className="text-center">
|
|
954
|
+
<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">
|
|
955
|
+
<CommandIcon className="h-8 w-8 text-blue-400" />
|
|
956
|
+
</div>
|
|
957
|
+
<div className="text-sm font-medium text-white">Primary</div>
|
|
958
|
+
<div className="text-xs text-blue-400">text-blue-400</div>
|
|
959
|
+
</div>
|
|
960
|
+
<div className="text-center">
|
|
961
|
+
<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">
|
|
962
|
+
<CommandIcon className="h-8 w-8 text-gray-400" />
|
|
963
|
+
</div>
|
|
964
|
+
<div className="text-sm font-medium text-white">Secondary</div>
|
|
965
|
+
<div className="text-xs text-gray-400">text-gray-400</div>
|
|
966
|
+
</div>
|
|
967
|
+
<div className="text-center">
|
|
968
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-cyan-500/30 bg-cyan-500/20">
|
|
969
|
+
<CommandIcon className="h-8 w-8 text-cyan-400" />
|
|
970
|
+
</div>
|
|
971
|
+
<div className="text-sm font-medium text-white">Accent</div>
|
|
972
|
+
<div className="text-xs text-cyan-400">text-cyan-400</div>
|
|
973
|
+
</div>
|
|
974
|
+
<div className="text-center">
|
|
975
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
976
|
+
<CommandIcon className="h-8 w-8 text-white/40" />
|
|
977
|
+
</div>
|
|
978
|
+
<div className="text-sm font-medium text-white">Disabled</div>
|
|
979
|
+
<div className="text-xs text-white/40">text-white/40</div>
|
|
980
|
+
</div>
|
|
981
|
+
</div>
|
|
982
|
+
),
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
export const UsageExamples: Story = {
|
|
986
|
+
parameters: {
|
|
987
|
+
...storyParameters,
|
|
988
|
+
docs: {
|
|
989
|
+
description: {
|
|
990
|
+
story:
|
|
991
|
+
"Real-world usage examples showing CommandIcon in different command interface contexts.",
|
|
992
|
+
},
|
|
993
|
+
},
|
|
994
|
+
},
|
|
995
|
+
render: () => (
|
|
996
|
+
<div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
997
|
+
{/* Keyboard Shortcuts */}
|
|
998
|
+
<div className="!space-y-2">
|
|
999
|
+
<h3 className="text-sm font-medium text-white">Keyboard Shortcuts</h3>
|
|
1000
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
1001
|
+
<div className="space-y-3">
|
|
1002
|
+
<div className="flex items-center justify-between">
|
|
1003
|
+
<span className="text-white">Quick Search</span>
|
|
1004
|
+
<div className="flex items-center gap-1">
|
|
1005
|
+
<kbd className="flex h-6 w-6 items-center justify-center rounded border border-white/20 bg-white/10 text-xs">
|
|
1006
|
+
<CommandIcon className="h-3 w-3 text-white/70" />
|
|
1007
|
+
</kbd>
|
|
1008
|
+
<span className="text-white/60">+</span>
|
|
1009
|
+
<kbd className="flex h-6 w-6 items-center justify-center rounded border border-white/20 bg-white/10 text-xs text-white/70">
|
|
1010
|
+
K
|
|
1011
|
+
</kbd>
|
|
1012
|
+
</div>
|
|
1013
|
+
</div>
|
|
1014
|
+
<div className="flex items-center justify-between">
|
|
1015
|
+
<span className="text-white">New File</span>
|
|
1016
|
+
<div className="flex items-center gap-1">
|
|
1017
|
+
<kbd className="flex h-6 w-6 items-center justify-center rounded border border-white/20 bg-white/10 text-xs">
|
|
1018
|
+
<CommandIcon className="h-3 w-3 text-white/70" />
|
|
1019
|
+
</kbd>
|
|
1020
|
+
<span className="text-white/60">+</span>
|
|
1021
|
+
<kbd className="flex h-6 w-6 items-center justify-center rounded border border-white/20 bg-white/10 text-xs text-white/70">
|
|
1022
|
+
N
|
|
1023
|
+
</kbd>
|
|
1024
|
+
</div>
|
|
1025
|
+
</div>
|
|
1026
|
+
</div>
|
|
1027
|
+
</div>
|
|
1028
|
+
</div>
|
|
1029
|
+
|
|
1030
|
+
{/* Command Palette */}
|
|
1031
|
+
<div className="!space-y-2">
|
|
1032
|
+
<h3 className="text-sm font-medium text-white">Command Palette</h3>
|
|
1033
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-4">
|
|
1034
|
+
<div className="space-y-3">
|
|
1035
|
+
<div className="flex items-center gap-3 border-b border-white/10 pb-3">
|
|
1036
|
+
<CommandIcon className="h-5 w-5 text-blue-400" />
|
|
1037
|
+
<input
|
|
1038
|
+
type="text"
|
|
1039
|
+
placeholder="Type a command..."
|
|
1040
|
+
className="flex-1 bg-transparent text-white placeholder-white/50 focus:outline-none"
|
|
1041
|
+
/>
|
|
1042
|
+
</div>
|
|
1043
|
+
<div className="space-y-1">
|
|
1044
|
+
<div className="flex items-center gap-3 rounded px-2 py-1 hover:bg-white/10">
|
|
1045
|
+
<CommandIcon className="h-4 w-4 text-white/60" />
|
|
1046
|
+
<span className="text-white">Create new file</span>
|
|
1047
|
+
</div>
|
|
1048
|
+
<div className="flex items-center gap-3 rounded px-2 py-1 hover:bg-white/10">
|
|
1049
|
+
<CommandIcon className="h-4 w-4 text-white/60" />
|
|
1050
|
+
<span className="text-white">Toggle sidebar</span>
|
|
1051
|
+
</div>
|
|
1052
|
+
</div>
|
|
1053
|
+
</div>
|
|
1054
|
+
</div>
|
|
1055
|
+
</div>
|
|
1056
|
+
|
|
1057
|
+
{/* Button Integration */}
|
|
1058
|
+
<div className="!space-y-2">
|
|
1059
|
+
<h3 className="text-sm font-medium text-white">Button Integration</h3>
|
|
1060
|
+
<div className="flex gap-4">
|
|
1061
|
+
<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">
|
|
1062
|
+
<CommandIcon className="h-4 w-4" />
|
|
1063
|
+
Open Command Menu
|
|
1064
|
+
</button>
|
|
1065
|
+
<button className="flex items-center gap-2 rounded-lg border border-gray-500/30 bg-gray-500/20 px-4 py-2 text-gray-200 transition-colors hover:bg-gray-500/30">
|
|
1066
|
+
<CommandIcon className="h-4 w-4" />
|
|
1067
|
+
Shortcuts
|
|
1068
|
+
</button>
|
|
1069
|
+
</div>
|
|
1070
|
+
</div>
|
|
1071
|
+
</div>
|
|
1072
|
+
),
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
export const Playground: Story = {
|
|
1076
|
+
parameters: {
|
|
1077
|
+
...storyParameters,
|
|
1078
|
+
docs: {
|
|
1079
|
+
description: {
|
|
1080
|
+
story:
|
|
1081
|
+
"Interactive playground to experiment with different CommandIcon configurations.",
|
|
1082
|
+
},
|
|
1083
|
+
},
|
|
1084
|
+
},
|
|
1085
|
+
args: {
|
|
1086
|
+
width: 32,
|
|
1087
|
+
height: 32,
|
|
1088
|
+
className: "text-blue-400 ",
|
|
1089
|
+
strokeWidth: 1.5,
|
|
1090
|
+
},
|
|
1091
|
+
render: (args) => (
|
|
1092
|
+
<div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
1093
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
1094
|
+
<CommandIcon {...args} />
|
|
1095
|
+
</div>
|
|
1096
|
+
</div>
|
|
1097
|
+
),
|
|
1098
|
+
}
|