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,1340 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
3
|
+
|
|
4
|
+
import { TickIcon } from "."
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof TickIcon> = {
|
|
7
|
+
title: "Icons/TickIcon",
|
|
8
|
+
component: TickIcon,
|
|
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 !important;
|
|
27
|
+
max-width: none !important;
|
|
28
|
+
background: transparent !important;
|
|
29
|
+
}
|
|
30
|
+
.sbdocs-content {
|
|
31
|
+
max-width: none !important;
|
|
32
|
+
padding: 0 !important;
|
|
33
|
+
margin: 0 !important;
|
|
34
|
+
background: transparent !important;
|
|
35
|
+
}
|
|
36
|
+
.docs-story {
|
|
37
|
+
background: transparent !important;
|
|
38
|
+
}
|
|
39
|
+
.sbdocs {
|
|
40
|
+
background: transparent !important;
|
|
41
|
+
}
|
|
42
|
+
body {
|
|
43
|
+
background: #0a0a0a !important;
|
|
44
|
+
}
|
|
45
|
+
#storybook-docs {
|
|
46
|
+
background: #0a0a0a !important;
|
|
47
|
+
}
|
|
48
|
+
.sbdocs-preview {
|
|
49
|
+
background: transparent !important;
|
|
50
|
+
border: none !important;
|
|
51
|
+
}
|
|
52
|
+
.sbdocs-h1, .sbdocs-h2, .sbdocs-h3, .sbdocs-h4, .sbdocs-h5, .sbdocs-h6 {
|
|
53
|
+
color: white !important;
|
|
54
|
+
}
|
|
55
|
+
.sbdocs-p, .sbdocs-li {
|
|
56
|
+
color: rgba(255, 255, 255, 0.7) !important;
|
|
57
|
+
}
|
|
58
|
+
.sbdocs-code {
|
|
59
|
+
background: rgba(255, 255, 255, 0.1) !important;
|
|
60
|
+
color: rgba(168, 85, 247, 1) !important;
|
|
61
|
+
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
62
|
+
}
|
|
63
|
+
.sbdocs-pre {
|
|
64
|
+
background: rgba(0, 0, 0, 0.4) !important;
|
|
65
|
+
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
66
|
+
}
|
|
67
|
+
.sbdocs-table {
|
|
68
|
+
background: rgba(255, 255, 255, 0.05) !important;
|
|
69
|
+
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
70
|
+
}
|
|
71
|
+
.sbdocs-table th {
|
|
72
|
+
background: rgba(255, 255, 255, 0.05) !important;
|
|
73
|
+
color: white !important;
|
|
74
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
75
|
+
}
|
|
76
|
+
.sbdocs-table td {
|
|
77
|
+
color: rgba(255, 255, 255, 0.7) !important;
|
|
78
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
|
|
79
|
+
}
|
|
80
|
+
@keyframes tick-draw {
|
|
81
|
+
0% { stroke-dashoffset: 20; }
|
|
82
|
+
100% { stroke-dashoffset: 0; }
|
|
83
|
+
}
|
|
84
|
+
.animate-tick-draw {
|
|
85
|
+
stroke-dasharray: 20;
|
|
86
|
+
animation: tick-draw 0.5s ease-out forwards;
|
|
87
|
+
}
|
|
88
|
+
@keyframes tick-scale {
|
|
89
|
+
0%, 100% { transform: scale(1); }
|
|
90
|
+
50% { transform: scale(1.1); }
|
|
91
|
+
}
|
|
92
|
+
.animate-tick-scale {
|
|
93
|
+
animation: tick-scale 0.4s ease-in-out;
|
|
94
|
+
}
|
|
95
|
+
`}
|
|
96
|
+
</style>
|
|
97
|
+
|
|
98
|
+
<div className="min-h-screen bg-gradient-to-br from-gray-900 via-green-900/20 to-gray-900">
|
|
99
|
+
{/* Header */}
|
|
100
|
+
<div className="relative overflow-hidden border-b border-white/10 bg-black/20 backdrop-blur-xl">
|
|
101
|
+
<div className="absolute inset-0 bg-gradient-to-r from-green-500/10 via-transparent to-emerald-500/10" />
|
|
102
|
+
<div className="relative !mx-auto max-w-7xl px-6 py-16">
|
|
103
|
+
<div className="!space-y-6 text-center">
|
|
104
|
+
<div className="!mx-auto flex h-24 w-24 items-center justify-center rounded-2xl border border-green-500/30 bg-gradient-to-br from-green-500/20 to-emerald-500/20">
|
|
105
|
+
<TickIcon className="h-12 w-12 text-green-400" />
|
|
106
|
+
</div>
|
|
107
|
+
<h1 className="!text-fm-primary text-5xl font-bold">
|
|
108
|
+
TickIcon
|
|
109
|
+
</h1>
|
|
110
|
+
<p className="!mx-auto max-w-3xl text-xl leading-relaxed !text-white/70">
|
|
111
|
+
A simple checkmark icon for success states, completed tasks,
|
|
112
|
+
and positive feedback. Features a clean stroke-based design
|
|
113
|
+
that works perfectly for checkboxes, form validation, and
|
|
114
|
+
task completion indicators. Built with accessibility in mind
|
|
115
|
+
using Radix UI's AccessibleIcon wrapper.
|
|
116
|
+
</p>
|
|
117
|
+
|
|
118
|
+
{/* Stats */}
|
|
119
|
+
<div className="flex items-center justify-center gap-8 pt-8">
|
|
120
|
+
<div className="text-center">
|
|
121
|
+
<div className="text-3xl font-bold text-green-300">
|
|
122
|
+
Clean
|
|
123
|
+
</div>
|
|
124
|
+
<div className="text-sm text-white/60">
|
|
125
|
+
Minimal design
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
<div className="h-8 w-px bg-white/20" />
|
|
129
|
+
<div className="text-center">
|
|
130
|
+
<div className="text-3xl font-bold text-emerald-300">
|
|
131
|
+
Scalable
|
|
132
|
+
</div>
|
|
133
|
+
<div className="text-sm text-white/60">
|
|
134
|
+
Stroke-based vector
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
<div className="h-8 w-px bg-white/20" />
|
|
138
|
+
<div className="text-center">
|
|
139
|
+
<div className="text-3xl font-bold text-teal-300">
|
|
140
|
+
Versatile
|
|
141
|
+
</div>
|
|
142
|
+
<div className="text-sm text-white/60">
|
|
143
|
+
Multiple use cases
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
|
|
151
|
+
{/* Content */}
|
|
152
|
+
<div className="!mx-auto max-w-7xl !space-y-16 px-6 py-12">
|
|
153
|
+
{/* Quick Usage */}
|
|
154
|
+
<div className="!space-y-8">
|
|
155
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
156
|
+
Quick Start
|
|
157
|
+
</h2>
|
|
158
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
159
|
+
<div className="!space-y-4">
|
|
160
|
+
<h3 className="text-xl font-semibold !text-green-300">
|
|
161
|
+
Basic Usage
|
|
162
|
+
</h3>
|
|
163
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
164
|
+
<pre className="overflow-x-auto text-sm !text-green-300">
|
|
165
|
+
{`import { TickIcon } from "@icons/tick-icon"
|
|
166
|
+
|
|
167
|
+
function CheckboxComponent() {
|
|
168
|
+
return (
|
|
169
|
+
<div className="flex items-center gap-2">
|
|
170
|
+
<TickIcon className="h-5 w-5 text-green-500" />
|
|
171
|
+
<span>Task completed</span>
|
|
172
|
+
</div>
|
|
173
|
+
)
|
|
174
|
+
}`}
|
|
175
|
+
</pre>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
|
|
179
|
+
<div className="!space-y-4">
|
|
180
|
+
<h3 className="text-xl font-semibold !text-green-300">
|
|
181
|
+
Live Preview
|
|
182
|
+
</h3>
|
|
183
|
+
<div className="flex h-32 items-center justify-center rounded-lg border border-white/10 bg-white/5">
|
|
184
|
+
<div className="flex items-center gap-3 rounded-lg border border-green-500/20 bg-green-500/10 px-4 py-2">
|
|
185
|
+
<TickIcon className="h-5 w-5 text-green-400" />
|
|
186
|
+
<span className="text-white">Task completed</span>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
|
|
193
|
+
{/* Props Documentation */}
|
|
194
|
+
<div className="!space-y-8">
|
|
195
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
196
|
+
Props & Configuration
|
|
197
|
+
</h2>
|
|
198
|
+
|
|
199
|
+
<div className="overflow-hidden rounded-lg border border-white/10 bg-white/5">
|
|
200
|
+
<div className="bg-white/5 p-4">
|
|
201
|
+
<h3 className="text-xl font-semibold !text-white">Props</h3>
|
|
202
|
+
</div>
|
|
203
|
+
<table className="!my-0 w-full">
|
|
204
|
+
<thead className="bg-white/5">
|
|
205
|
+
<tr className="border-b border-white/10">
|
|
206
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
207
|
+
Prop
|
|
208
|
+
</th>
|
|
209
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
210
|
+
Type
|
|
211
|
+
</th>
|
|
212
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
213
|
+
Default
|
|
214
|
+
</th>
|
|
215
|
+
<th className="px-6 py-4 text-left text-sm font-semibold !text-white">
|
|
216
|
+
Description
|
|
217
|
+
</th>
|
|
218
|
+
</tr>
|
|
219
|
+
</thead>
|
|
220
|
+
<tbody>
|
|
221
|
+
<tr className="border-b border-white/5">
|
|
222
|
+
<td className="px-6 py-4 font-mono text-sm !text-green-300">
|
|
223
|
+
width
|
|
224
|
+
</td>
|
|
225
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
226
|
+
number | string
|
|
227
|
+
</td>
|
|
228
|
+
<td className="px-6 py-4 text-sm !text-white/50">24</td>
|
|
229
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
230
|
+
Width of the icon in pixels
|
|
231
|
+
</td>
|
|
232
|
+
</tr>
|
|
233
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
234
|
+
<td className="px-6 py-4 font-mono text-sm !text-green-300">
|
|
235
|
+
height
|
|
236
|
+
</td>
|
|
237
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
238
|
+
number | string
|
|
239
|
+
</td>
|
|
240
|
+
<td className="px-6 py-4 text-sm !text-white/50">24</td>
|
|
241
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
242
|
+
Height of the icon in pixels
|
|
243
|
+
</td>
|
|
244
|
+
</tr>
|
|
245
|
+
<tr className="border-b border-white/5">
|
|
246
|
+
<td className="px-6 py-4 font-mono text-sm !text-green-300">
|
|
247
|
+
stroke
|
|
248
|
+
</td>
|
|
249
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
250
|
+
string
|
|
251
|
+
</td>
|
|
252
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
253
|
+
currentColor
|
|
254
|
+
</td>
|
|
255
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
256
|
+
Stroke color of the checkmark
|
|
257
|
+
</td>
|
|
258
|
+
</tr>
|
|
259
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
260
|
+
<td className="px-6 py-4 font-mono text-sm !text-green-300">
|
|
261
|
+
strokeWidth
|
|
262
|
+
</td>
|
|
263
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
264
|
+
number | string
|
|
265
|
+
</td>
|
|
266
|
+
<td className="px-6 py-4 text-sm !text-white/50">2</td>
|
|
267
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
268
|
+
Width of the stroke line
|
|
269
|
+
</td>
|
|
270
|
+
</tr>
|
|
271
|
+
<tr className="border-b border-white/5">
|
|
272
|
+
<td className="px-6 py-4 font-mono text-sm !text-green-300">
|
|
273
|
+
className
|
|
274
|
+
</td>
|
|
275
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
276
|
+
string
|
|
277
|
+
</td>
|
|
278
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
279
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
280
|
+
CSS classes for styling
|
|
281
|
+
</td>
|
|
282
|
+
</tr>
|
|
283
|
+
<tr className="border-b border-white/5 !bg-black/10">
|
|
284
|
+
<td className="px-6 py-4 font-mono text-sm !text-green-300">
|
|
285
|
+
viewBox
|
|
286
|
+
</td>
|
|
287
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
288
|
+
string
|
|
289
|
+
</td>
|
|
290
|
+
<td className="px-6 py-4 text-sm !text-white/50">
|
|
291
|
+
"0 0 24 24"
|
|
292
|
+
</td>
|
|
293
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
294
|
+
SVG viewBox for scaling
|
|
295
|
+
</td>
|
|
296
|
+
</tr>
|
|
297
|
+
<tr className="!bg-black/10">
|
|
298
|
+
<td className="px-6 py-4 font-mono text-sm !text-green-300">
|
|
299
|
+
...svgProps
|
|
300
|
+
</td>
|
|
301
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
302
|
+
SVGProps
|
|
303
|
+
</td>
|
|
304
|
+
<td className="px-6 py-4 text-sm !text-white/50">-</td>
|
|
305
|
+
<td className="px-6 py-4 text-sm !text-white/70">
|
|
306
|
+
All standard SVG element props
|
|
307
|
+
</td>
|
|
308
|
+
</tr>
|
|
309
|
+
</tbody>
|
|
310
|
+
</table>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
|
|
314
|
+
{/* Size Variations */}
|
|
315
|
+
<div className="!space-y-8">
|
|
316
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
317
|
+
Size Variations
|
|
318
|
+
</h2>
|
|
319
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
320
|
+
<div className="!space-y-6">
|
|
321
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
322
|
+
<div className="!space-y-4">
|
|
323
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
324
|
+
Standard Sizes
|
|
325
|
+
</h3>
|
|
326
|
+
<div className="flex items-end gap-6 rounded-lg bg-black/20 p-6">
|
|
327
|
+
<div className="text-center">
|
|
328
|
+
<TickIcon className="!mx-auto mb-2 h-3 w-3 text-green-400" />
|
|
329
|
+
<span className="text-xs text-white/60">12px</span>
|
|
330
|
+
</div>
|
|
331
|
+
<div className="text-center">
|
|
332
|
+
<TickIcon className="!mx-auto mb-2 h-4 w-4 text-green-400" />
|
|
333
|
+
<span className="text-xs text-white/60">16px</span>
|
|
334
|
+
</div>
|
|
335
|
+
<div className="text-center">
|
|
336
|
+
<TickIcon className="!mx-auto mb-2 h-5 w-5 text-green-400" />
|
|
337
|
+
<span className="text-xs text-white/60">20px</span>
|
|
338
|
+
</div>
|
|
339
|
+
<div className="text-center">
|
|
340
|
+
<TickIcon className="!mx-auto mb-2 h-6 w-6 text-green-400" />
|
|
341
|
+
<span className="text-xs text-white/60">24px</span>
|
|
342
|
+
</div>
|
|
343
|
+
<div className="text-center">
|
|
344
|
+
<TickIcon className="!mx-auto mb-2 h-8 w-8 text-green-400" />
|
|
345
|
+
<span className="text-xs text-white/60">32px</span>
|
|
346
|
+
</div>
|
|
347
|
+
<div className="text-center">
|
|
348
|
+
<TickIcon className="!mx-auto mb-2 h-12 w-12 text-green-400" />
|
|
349
|
+
<span className="text-xs text-white/60">48px</span>
|
|
350
|
+
</div>
|
|
351
|
+
</div>
|
|
352
|
+
</div>
|
|
353
|
+
|
|
354
|
+
<div className="!space-y-4">
|
|
355
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
356
|
+
Code Example
|
|
357
|
+
</h3>
|
|
358
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
359
|
+
<pre className="overflow-x-auto text-sm !text-blue-300">
|
|
360
|
+
{`// Small (16px)
|
|
361
|
+
<TickIcon className="h-4 w-4" />
|
|
362
|
+
|
|
363
|
+
// Medium (24px) - Default
|
|
364
|
+
<TickIcon className="h-6 w-6" />
|
|
365
|
+
|
|
366
|
+
// Large (32px)
|
|
367
|
+
<TickIcon className="h-8 w-8" />
|
|
368
|
+
|
|
369
|
+
// Custom size with stroke width
|
|
370
|
+
<TickIcon width={40} height={40} strokeWidth={3} />
|
|
371
|
+
|
|
372
|
+
// Responsive sizing
|
|
373
|
+
<TickIcon className="h-4 w-4 md:h-6 md:w-6 lg:h-8 lg:w-8" />`}
|
|
374
|
+
</pre>
|
|
375
|
+
</div>
|
|
376
|
+
</div>
|
|
377
|
+
</div>
|
|
378
|
+
</div>
|
|
379
|
+
</div>
|
|
380
|
+
</div>
|
|
381
|
+
|
|
382
|
+
{/* Color Variations */}
|
|
383
|
+
<div className="!space-y-8">
|
|
384
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
385
|
+
Color Variations
|
|
386
|
+
</h2>
|
|
387
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
388
|
+
<div className="!space-y-4">
|
|
389
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
390
|
+
Semantic Colors
|
|
391
|
+
</h3>
|
|
392
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
393
|
+
<div className="flex items-center gap-4">
|
|
394
|
+
<TickIcon className="h-6 w-6 text-green-400" />
|
|
395
|
+
<div>
|
|
396
|
+
<div className="text-sm font-medium text-white">
|
|
397
|
+
Success
|
|
398
|
+
</div>
|
|
399
|
+
<div className="text-xs text-white/60">
|
|
400
|
+
text-green-400
|
|
401
|
+
</div>
|
|
402
|
+
</div>
|
|
403
|
+
</div>
|
|
404
|
+
<div className="flex items-center gap-4">
|
|
405
|
+
<TickIcon className="h-6 w-6 text-emerald-400" />
|
|
406
|
+
<div>
|
|
407
|
+
<div className="text-sm font-medium text-white">
|
|
408
|
+
Complete
|
|
409
|
+
</div>
|
|
410
|
+
<div className="text-xs text-white/60">
|
|
411
|
+
text-emerald-400
|
|
412
|
+
</div>
|
|
413
|
+
</div>
|
|
414
|
+
</div>
|
|
415
|
+
<div className="flex items-center gap-4">
|
|
416
|
+
<TickIcon className="h-6 w-6 text-blue-400" />
|
|
417
|
+
<div>
|
|
418
|
+
<div className="text-sm font-medium text-white">
|
|
419
|
+
Selected
|
|
420
|
+
</div>
|
|
421
|
+
<div className="text-xs text-white/60">
|
|
422
|
+
text-blue-400
|
|
423
|
+
</div>
|
|
424
|
+
</div>
|
|
425
|
+
</div>
|
|
426
|
+
<div className="flex items-center gap-4">
|
|
427
|
+
<TickIcon className="h-6 w-6 text-purple-400" />
|
|
428
|
+
<div>
|
|
429
|
+
<div className="text-sm font-medium text-white">
|
|
430
|
+
Verified
|
|
431
|
+
</div>
|
|
432
|
+
<div className="text-xs text-white/60">
|
|
433
|
+
text-purple-400
|
|
434
|
+
</div>
|
|
435
|
+
</div>
|
|
436
|
+
</div>
|
|
437
|
+
</div>
|
|
438
|
+
</div>
|
|
439
|
+
|
|
440
|
+
<div className="!space-y-4">
|
|
441
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
442
|
+
Custom Colors & Stroke Width
|
|
443
|
+
</h3>
|
|
444
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
445
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
446
|
+
{`// Using Tailwind classes
|
|
447
|
+
<TickIcon className="h-6 w-6 text-green-400" />
|
|
448
|
+
<TickIcon className="h-6 w-6 text-emerald-500" />
|
|
449
|
+
|
|
450
|
+
// Using CSS custom properties
|
|
451
|
+
<TickIcon
|
|
452
|
+
className="h-6 w-6"
|
|
453
|
+
style={{ color: 'var(--color-success)' }}
|
|
454
|
+
/>
|
|
455
|
+
|
|
456
|
+
// Direct stroke prop with custom width
|
|
457
|
+
<TickIcon
|
|
458
|
+
width={24}
|
|
459
|
+
height={24}
|
|
460
|
+
stroke="#10b981"
|
|
461
|
+
strokeWidth={3}
|
|
462
|
+
/>
|
|
463
|
+
|
|
464
|
+
// Thin stroke for subtle appearance
|
|
465
|
+
<TickIcon
|
|
466
|
+
className="h-6 w-6 text-green-400"
|
|
467
|
+
strokeWidth={1}
|
|
468
|
+
/>`}
|
|
469
|
+
</pre>
|
|
470
|
+
</div>
|
|
471
|
+
</div>
|
|
472
|
+
</div>
|
|
473
|
+
</div>
|
|
474
|
+
|
|
475
|
+
{/* Usage Examples */}
|
|
476
|
+
<div className="!space-y-8">
|
|
477
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
478
|
+
Usage Examples
|
|
479
|
+
</h2>
|
|
480
|
+
|
|
481
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
482
|
+
{/* Checkbox */}
|
|
483
|
+
<div className="!space-y-4">
|
|
484
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
485
|
+
Custom Checkbox
|
|
486
|
+
</h3>
|
|
487
|
+
<div className="!space-y-4">
|
|
488
|
+
<div className="!space-y-3">
|
|
489
|
+
<label className="flex cursor-pointer items-center gap-3">
|
|
490
|
+
<div className="relative">
|
|
491
|
+
<input
|
|
492
|
+
type="checkbox"
|
|
493
|
+
className="peer sr-only"
|
|
494
|
+
defaultChecked
|
|
495
|
+
/>
|
|
496
|
+
<div className="peer-unchecked:bg-transparent peer-unchecked:border-gray-400 h-5 w-5 rounded border-2 border-green-400 bg-green-400 transition-colors peer-checked:border-green-400 peer-checked:bg-green-400" />
|
|
497
|
+
<TickIcon
|
|
498
|
+
className="peer-unchecked:opacity-0 absolute inset-0 h-5 w-5 text-white opacity-100 transition-opacity"
|
|
499
|
+
strokeWidth={2}
|
|
500
|
+
/>
|
|
501
|
+
</div>
|
|
502
|
+
<span className="text-white">
|
|
503
|
+
Accept terms and conditions
|
|
504
|
+
</span>
|
|
505
|
+
</label>
|
|
506
|
+
<label className="flex cursor-pointer items-center gap-3">
|
|
507
|
+
<div className="relative">
|
|
508
|
+
<input type="checkbox" className="peer sr-only" />
|
|
509
|
+
<div className="h-5 w-5 rounded border-2 border-gray-400 bg-transparent transition-colors peer-checked:border-green-400 peer-checked:bg-green-400" />
|
|
510
|
+
<TickIcon
|
|
511
|
+
className="absolute inset-0 h-5 w-5 text-white opacity-0 transition-opacity peer-checked:opacity-100"
|
|
512
|
+
strokeWidth={2}
|
|
513
|
+
/>
|
|
514
|
+
</div>
|
|
515
|
+
<span className="text-white">
|
|
516
|
+
Subscribe to newsletter
|
|
517
|
+
</span>
|
|
518
|
+
</label>
|
|
519
|
+
</div>
|
|
520
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
521
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
522
|
+
{`<label className="flex items-center gap-3 cursor-pointer">
|
|
523
|
+
<div className="relative">
|
|
524
|
+
<input type="checkbox" className="sr-only peer" />
|
|
525
|
+
<div className="h-5 w-5 rounded border-2 border-gray-400 bg-transparent peer-checked:bg-green-400 peer-checked:border-green-400 transition-colors" />
|
|
526
|
+
<TickIcon className="absolute inset-0 h-5 w-5 text-white opacity-0 peer-checked:opacity-100 transition-opacity" strokeWidth={2} />
|
|
527
|
+
</div>
|
|
528
|
+
<span className="text-white">Accept terms and conditions</span>
|
|
529
|
+
</label>`}
|
|
530
|
+
</pre>
|
|
531
|
+
</div>
|
|
532
|
+
</div>
|
|
533
|
+
</div>
|
|
534
|
+
|
|
535
|
+
{/* Todo List */}
|
|
536
|
+
<div className="!space-y-4">
|
|
537
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
538
|
+
Todo List
|
|
539
|
+
</h3>
|
|
540
|
+
<div className="!space-y-4">
|
|
541
|
+
<div className="!space-y-3">
|
|
542
|
+
<div className="flex items-center gap-3 rounded-lg border border-white/10 bg-white/5 p-3">
|
|
543
|
+
<TickIcon className="h-5 w-5 text-green-400" />
|
|
544
|
+
<span className="flex-1 text-white line-through opacity-70">
|
|
545
|
+
Set up project repository
|
|
546
|
+
</span>
|
|
547
|
+
<span className="text-xs text-green-400">
|
|
548
|
+
Completed
|
|
549
|
+
</span>
|
|
550
|
+
</div>
|
|
551
|
+
<div className="flex items-center gap-3 rounded-lg border border-white/10 bg-white/5 p-3">
|
|
552
|
+
<TickIcon className="h-5 w-5 text-green-400" />
|
|
553
|
+
<span className="flex-1 text-white line-through opacity-70">
|
|
554
|
+
Design user interface
|
|
555
|
+
</span>
|
|
556
|
+
<span className="text-xs text-green-400">
|
|
557
|
+
Completed
|
|
558
|
+
</span>
|
|
559
|
+
</div>
|
|
560
|
+
<div className="flex items-center gap-3 rounded-lg border border-white/10 bg-white/5 p-3">
|
|
561
|
+
<div className="h-5 w-5 rounded-full border-2 border-white/30"></div>
|
|
562
|
+
<span className="flex-1 text-white">
|
|
563
|
+
Implement authentication
|
|
564
|
+
</span>
|
|
565
|
+
<span className="text-xs text-white/50">
|
|
566
|
+
In Progress
|
|
567
|
+
</span>
|
|
568
|
+
</div>
|
|
569
|
+
</div>
|
|
570
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
571
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
572
|
+
{`// Completed task
|
|
573
|
+
<div className="flex items-center gap-3 p-3 border border-white/10 bg-white/5 rounded-lg">
|
|
574
|
+
<TickIcon className="h-5 w-5 text-green-400" />
|
|
575
|
+
<span className="flex-1 text-white line-through opacity-70">Set up project repository</span>
|
|
576
|
+
<span className="text-xs text-green-400">Completed</span>
|
|
577
|
+
</div>
|
|
578
|
+
|
|
579
|
+
// Pending task
|
|
580
|
+
<div className="flex items-center gap-3 p-3 border border-white/10 bg-white/5 rounded-lg">
|
|
581
|
+
<div className="h-5 w-5 rounded-full border-2 border-white/30"></div>
|
|
582
|
+
<span className="flex-1 text-white">Implement authentication</span>
|
|
583
|
+
<span className="text-xs text-white/50">In Progress</span>
|
|
584
|
+
</div>`}
|
|
585
|
+
</pre>
|
|
586
|
+
</div>
|
|
587
|
+
</div>
|
|
588
|
+
</div>
|
|
589
|
+
|
|
590
|
+
{/* Form Validation */}
|
|
591
|
+
<div className="!space-y-4">
|
|
592
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
593
|
+
Form Validation
|
|
594
|
+
</h3>
|
|
595
|
+
<div className="!space-y-4">
|
|
596
|
+
<div className="!space-y-2">
|
|
597
|
+
<label className="text-sm font-medium !text-white">
|
|
598
|
+
Password
|
|
599
|
+
</label>
|
|
600
|
+
<div className="relative">
|
|
601
|
+
<input
|
|
602
|
+
type="password"
|
|
603
|
+
className="w-full rounded-lg border border-green-500/50 bg-white/5 px-3 py-2 pr-10 !text-white focus:border-green-500 focus:ring-2 focus:ring-green-500/20"
|
|
604
|
+
placeholder="Enter your password"
|
|
605
|
+
defaultValue="securepassword123"
|
|
606
|
+
/>
|
|
607
|
+
<TickIcon className="absolute top-1/2 right-3 h-4 w-4 -translate-y-1/2 text-green-400" />
|
|
608
|
+
</div>
|
|
609
|
+
<div className="flex items-center gap-2 text-sm text-green-400">
|
|
610
|
+
<TickIcon className="h-4 w-4" strokeWidth={2} />
|
|
611
|
+
<span>Password meets all requirements</span>
|
|
612
|
+
</div>
|
|
613
|
+
</div>
|
|
614
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
615
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
616
|
+
{`// Input with validation icon
|
|
617
|
+
<div className="relative">
|
|
618
|
+
<input className="pr-10 border-green-500/50" />
|
|
619
|
+
<TickIcon className="absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-green-400" />
|
|
620
|
+
</div>
|
|
621
|
+
|
|
622
|
+
// Success message
|
|
623
|
+
<div className="flex items-center gap-2 text-sm text-green-400">
|
|
624
|
+
<TickIcon className="h-4 w-4" strokeWidth={2} />
|
|
625
|
+
<span>Password meets all requirements</span>
|
|
626
|
+
</div>`}
|
|
627
|
+
</pre>
|
|
628
|
+
</div>
|
|
629
|
+
</div>
|
|
630
|
+
</div>
|
|
631
|
+
|
|
632
|
+
{/* Settings Toggle */}
|
|
633
|
+
<div className="!space-y-4">
|
|
634
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
635
|
+
Settings Options
|
|
636
|
+
</h3>
|
|
637
|
+
<div className="!space-y-4">
|
|
638
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4">
|
|
639
|
+
<div className="flex items-center justify-between">
|
|
640
|
+
<div className="flex items-center gap-3">
|
|
641
|
+
<TickIcon className="h-5 w-5 text-green-400" />
|
|
642
|
+
<div>
|
|
643
|
+
<div className="font-medium text-white">
|
|
644
|
+
Email Notifications
|
|
645
|
+
</div>
|
|
646
|
+
<div className="text-sm text-white/60">
|
|
647
|
+
Receive updates via email
|
|
648
|
+
</div>
|
|
649
|
+
</div>
|
|
650
|
+
</div>
|
|
651
|
+
<span className="text-xs text-green-400">
|
|
652
|
+
Enabled
|
|
653
|
+
</span>
|
|
654
|
+
</div>
|
|
655
|
+
<div className="flex items-center justify-between">
|
|
656
|
+
<div className="flex items-center gap-3">
|
|
657
|
+
<div className="h-5 w-5 rounded border border-white/30"></div>
|
|
658
|
+
<div>
|
|
659
|
+
<div className="font-medium text-white">
|
|
660
|
+
Push Notifications
|
|
661
|
+
</div>
|
|
662
|
+
<div className="text-sm text-white/60">
|
|
663
|
+
Receive browser notifications
|
|
664
|
+
</div>
|
|
665
|
+
</div>
|
|
666
|
+
</div>
|
|
667
|
+
<span className="text-xs text-white/50">
|
|
668
|
+
Disabled
|
|
669
|
+
</span>
|
|
670
|
+
</div>
|
|
671
|
+
</div>
|
|
672
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
673
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
674
|
+
{`// Enabled setting
|
|
675
|
+
<div className="flex items-center justify-between">
|
|
676
|
+
<div className="flex items-center gap-3">
|
|
677
|
+
<TickIcon className="h-5 w-5 text-green-400" />
|
|
678
|
+
<div>
|
|
679
|
+
<div className="font-medium text-white">Email Notifications</div>
|
|
680
|
+
<div className="text-sm text-white/60">Receive updates via email</div>
|
|
681
|
+
</div>
|
|
682
|
+
</div>
|
|
683
|
+
<span className="text-xs text-green-400">Enabled</span>
|
|
684
|
+
</div>`}
|
|
685
|
+
</pre>
|
|
686
|
+
</div>
|
|
687
|
+
</div>
|
|
688
|
+
</div>
|
|
689
|
+
|
|
690
|
+
{/* Step Indicator */}
|
|
691
|
+
<div className="!space-y-4">
|
|
692
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
693
|
+
Step Progress
|
|
694
|
+
</h3>
|
|
695
|
+
<div className="!space-y-4">
|
|
696
|
+
<div className="flex items-center gap-4">
|
|
697
|
+
<div className="flex items-center gap-2">
|
|
698
|
+
<div className="flex h-8 w-8 items-center justify-center rounded-full bg-green-500">
|
|
699
|
+
<TickIcon
|
|
700
|
+
className="h-4 w-4 text-white"
|
|
701
|
+
strokeWidth={2}
|
|
702
|
+
/>
|
|
703
|
+
</div>
|
|
704
|
+
<span className="text-sm text-green-400">
|
|
705
|
+
Account Setup
|
|
706
|
+
</span>
|
|
707
|
+
</div>
|
|
708
|
+
<div className="h-px flex-1 bg-green-500"></div>
|
|
709
|
+
<div className="flex items-center gap-2">
|
|
710
|
+
<div className="flex h-8 w-8 items-center justify-center rounded-full bg-green-500">
|
|
711
|
+
<TickIcon
|
|
712
|
+
className="h-4 w-4 text-white"
|
|
713
|
+
strokeWidth={2}
|
|
714
|
+
/>
|
|
715
|
+
</div>
|
|
716
|
+
<span className="text-sm text-green-400">
|
|
717
|
+
Profile Info
|
|
718
|
+
</span>
|
|
719
|
+
</div>
|
|
720
|
+
<div className="h-px flex-1 bg-white/20"></div>
|
|
721
|
+
<div className="flex items-center gap-2">
|
|
722
|
+
<div className="flex h-8 w-8 items-center justify-center rounded-full border-2 border-white/30 bg-white/10">
|
|
723
|
+
<span className="text-xs text-white">3</span>
|
|
724
|
+
</div>
|
|
725
|
+
<span className="text-sm text-white/60">
|
|
726
|
+
Verification
|
|
727
|
+
</span>
|
|
728
|
+
</div>
|
|
729
|
+
</div>
|
|
730
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
731
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
732
|
+
{`// Completed step
|
|
733
|
+
<div className="flex h-8 w-8 items-center justify-center rounded-full bg-green-500">
|
|
734
|
+
<TickIcon className="h-4 w-4 text-white" strokeWidth={2} />
|
|
735
|
+
</div>
|
|
736
|
+
|
|
737
|
+
// Current/pending step
|
|
738
|
+
<div className="flex h-8 w-8 items-center justify-center rounded-full border-2 border-white/30 bg-white/10">
|
|
739
|
+
<span className="text-xs text-white">3</span>
|
|
740
|
+
</div>`}
|
|
741
|
+
</pre>
|
|
742
|
+
</div>
|
|
743
|
+
</div>
|
|
744
|
+
</div>
|
|
745
|
+
|
|
746
|
+
{/* Success Message */}
|
|
747
|
+
<div className="!space-y-4">
|
|
748
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
749
|
+
Success Message
|
|
750
|
+
</h3>
|
|
751
|
+
<div className="!space-y-4">
|
|
752
|
+
<div className="rounded-lg border border-green-500/20 bg-green-500/10 p-4">
|
|
753
|
+
<div className="flex items-start gap-3">
|
|
754
|
+
<TickIcon
|
|
755
|
+
className="animate-tick-scale mt-0.5 h-5 w-5 flex-shrink-0 text-green-400"
|
|
756
|
+
strokeWidth={2}
|
|
757
|
+
/>
|
|
758
|
+
<div>
|
|
759
|
+
<h4 className="font-medium !text-green-200">
|
|
760
|
+
Changes Saved Successfully
|
|
761
|
+
</h4>
|
|
762
|
+
<p className="text-sm !text-green-300/80">
|
|
763
|
+
Your profile has been updated and all changes are
|
|
764
|
+
now active.
|
|
765
|
+
</p>
|
|
766
|
+
</div>
|
|
767
|
+
</div>
|
|
768
|
+
</div>
|
|
769
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
770
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
771
|
+
{`<div className="border border-green-500/20 bg-green-500/10 p-4 rounded-lg">
|
|
772
|
+
<div className="flex items-start gap-3">
|
|
773
|
+
<TickIcon className="h-5 w-5 text-green-400 mt-0.5 flex-shrink-0 animate-bounce" strokeWidth={2} />
|
|
774
|
+
<div>
|
|
775
|
+
<h4 className="font-medium text-green-200">Changes Saved Successfully</h4>
|
|
776
|
+
<p className="text-sm text-green-300/80">
|
|
777
|
+
Your profile has been updated and all changes are now active.
|
|
778
|
+
</p>
|
|
779
|
+
</div>
|
|
780
|
+
</div>
|
|
781
|
+
</div>`}
|
|
782
|
+
</pre>
|
|
783
|
+
</div>
|
|
784
|
+
</div>
|
|
785
|
+
</div>
|
|
786
|
+
</div>
|
|
787
|
+
</div>
|
|
788
|
+
|
|
789
|
+
{/* Interactive States */}
|
|
790
|
+
<div className="!space-y-8">
|
|
791
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
792
|
+
Interactive States & Animations
|
|
793
|
+
</h2>
|
|
794
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
795
|
+
<div className="!space-y-4">
|
|
796
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
797
|
+
Animation Effects
|
|
798
|
+
</h3>
|
|
799
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
800
|
+
<div className="flex items-center gap-4">
|
|
801
|
+
<TickIcon
|
|
802
|
+
className="animate-tick-draw h-8 w-8 text-green-400"
|
|
803
|
+
strokeWidth={2}
|
|
804
|
+
/>
|
|
805
|
+
<div>
|
|
806
|
+
<div className="text-sm font-medium text-white">
|
|
807
|
+
Draw Animation
|
|
808
|
+
</div>
|
|
809
|
+
<div className="text-xs text-white/60">
|
|
810
|
+
Stroke drawing effect
|
|
811
|
+
</div>
|
|
812
|
+
</div>
|
|
813
|
+
</div>
|
|
814
|
+
<div className="flex items-center gap-4">
|
|
815
|
+
<TickIcon
|
|
816
|
+
className="animate-tick-scale h-8 w-8 text-green-400"
|
|
817
|
+
strokeWidth={2}
|
|
818
|
+
/>
|
|
819
|
+
<div>
|
|
820
|
+
<div className="text-sm font-medium text-white">
|
|
821
|
+
Scale Effect
|
|
822
|
+
</div>
|
|
823
|
+
<div className="text-xs text-white/60">
|
|
824
|
+
Quick scale animation
|
|
825
|
+
</div>
|
|
826
|
+
</div>
|
|
827
|
+
</div>
|
|
828
|
+
<div className="flex items-center gap-4">
|
|
829
|
+
<TickIcon
|
|
830
|
+
className="h-8 w-8 text-green-400 transition-transform hover:scale-110"
|
|
831
|
+
strokeWidth={2}
|
|
832
|
+
/>
|
|
833
|
+
<div>
|
|
834
|
+
<div className="text-sm font-medium text-white">
|
|
835
|
+
Hover Scale
|
|
836
|
+
</div>
|
|
837
|
+
<div className="text-xs text-white/60">
|
|
838
|
+
Interactive growth
|
|
839
|
+
</div>
|
|
840
|
+
</div>
|
|
841
|
+
</div>
|
|
842
|
+
<div className="flex items-center gap-4">
|
|
843
|
+
<TickIcon
|
|
844
|
+
className="h-8 w-8 text-green-400 transition-colors hover:text-emerald-300"
|
|
845
|
+
strokeWidth={2}
|
|
846
|
+
/>
|
|
847
|
+
<div>
|
|
848
|
+
<div className="text-sm font-medium text-white">
|
|
849
|
+
Color Transition
|
|
850
|
+
</div>
|
|
851
|
+
<div className="text-xs text-white/60">
|
|
852
|
+
Smooth color change
|
|
853
|
+
</div>
|
|
854
|
+
</div>
|
|
855
|
+
</div>
|
|
856
|
+
</div>
|
|
857
|
+
</div>
|
|
858
|
+
|
|
859
|
+
<div className="!space-y-4">
|
|
860
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
861
|
+
Animation Code
|
|
862
|
+
</h3>
|
|
863
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
864
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
865
|
+
{`// Draw animation keyframes
|
|
866
|
+
@keyframes tick-draw {
|
|
867
|
+
0% { stroke-dashoffset: 20; }
|
|
868
|
+
100% { stroke-dashoffset: 0; }
|
|
869
|
+
}
|
|
870
|
+
.animate-tick-draw {
|
|
871
|
+
stroke-dasharray: 20;
|
|
872
|
+
animation: tick-draw 0.5s ease-out forwards;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
// Scale animation
|
|
876
|
+
@keyframes tick-scale {
|
|
877
|
+
0%, 100% { transform: scale(1); }
|
|
878
|
+
50% { transform: scale(1.1); }
|
|
879
|
+
}
|
|
880
|
+
.animate-tick-scale {
|
|
881
|
+
animation: tick-scale 0.4s ease-in-out;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
// Usage with animations
|
|
885
|
+
<TickIcon className="h-6 w-6 text-green-400 animate-tick-draw" />
|
|
886
|
+
<TickIcon className="h-6 w-6 text-green-400 animate-tick-scale" />
|
|
887
|
+
|
|
888
|
+
// Interactive hover effects
|
|
889
|
+
<TickIcon className="h-6 w-6 text-green-400 transition-transform hover:scale-110" />`}
|
|
890
|
+
</pre>
|
|
891
|
+
</div>
|
|
892
|
+
</div>
|
|
893
|
+
</div>
|
|
894
|
+
</div>
|
|
895
|
+
|
|
896
|
+
{/* Accessibility */}
|
|
897
|
+
<div className="!space-y-8">
|
|
898
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
899
|
+
Accessibility Features
|
|
900
|
+
</h2>
|
|
901
|
+
<div className="grid grid-cols-1 gap-8 md:grid-cols-2">
|
|
902
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
903
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
904
|
+
✅ Built-in Features
|
|
905
|
+
</h3>
|
|
906
|
+
<ul className="!space-y-2 text-sm !text-white/70">
|
|
907
|
+
<li className="!text-white/70">
|
|
908
|
+
Uses Radix UI AccessibleIcon wrapper
|
|
909
|
+
</li>
|
|
910
|
+
<li className="!text-white/70">
|
|
911
|
+
Provides screen reader label "Tick icon"
|
|
912
|
+
</li>
|
|
913
|
+
<li className="!text-white/70">
|
|
914
|
+
Supports keyboard navigation when interactive
|
|
915
|
+
</li>
|
|
916
|
+
<li className="!text-white/70">
|
|
917
|
+
Maintains proper color contrast ratios
|
|
918
|
+
</li>
|
|
919
|
+
<li className="!text-white/70">
|
|
920
|
+
Scales with user's font size preferences
|
|
921
|
+
</li>
|
|
922
|
+
<li className="!text-white/70">
|
|
923
|
+
Stroke-based design ensures clarity at all sizes
|
|
924
|
+
</li>
|
|
925
|
+
</ul>
|
|
926
|
+
</div>
|
|
927
|
+
|
|
928
|
+
<div className="!space-y-4 rounded-lg border border-white/10 bg-white/5 p-6">
|
|
929
|
+
<h3 className="text-lg font-semibold !text-green-300">
|
|
930
|
+
💡 Best Practices
|
|
931
|
+
</h3>
|
|
932
|
+
<ul className="!space-y-2 text-sm !text-white/70">
|
|
933
|
+
<li className="!text-white/70">
|
|
934
|
+
Always pair with descriptive text or labels
|
|
935
|
+
</li>
|
|
936
|
+
<li className="!text-white/70">
|
|
937
|
+
Use consistent colors for success states
|
|
938
|
+
</li>
|
|
939
|
+
<li className="!text-white/70">
|
|
940
|
+
Ensure sufficient color contrast (minimum 3:1)
|
|
941
|
+
</li>
|
|
942
|
+
<li className="!text-white/70">
|
|
943
|
+
Add focus states for interactive checkboxes
|
|
944
|
+
</li>
|
|
945
|
+
<li className="!text-white/70">
|
|
946
|
+
Consider motion sensitivity for animations
|
|
947
|
+
</li>
|
|
948
|
+
<li className="!text-white/70">
|
|
949
|
+
Use appropriate stroke width for visibility
|
|
950
|
+
</li>
|
|
951
|
+
</ul>
|
|
952
|
+
</div>
|
|
953
|
+
</div>
|
|
954
|
+
|
|
955
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-6">
|
|
956
|
+
<h3 className="mb-4 text-lg font-semibold !text-purple-300">
|
|
957
|
+
Custom Accessibility Implementation
|
|
958
|
+
</h3>
|
|
959
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
960
|
+
<div className="rounded-lg bg-black/40 p-4">
|
|
961
|
+
<pre className="overflow-x-auto text-sm !text-cyan-300">
|
|
962
|
+
{`// Custom implementation with specific label
|
|
963
|
+
import { AccessibleIcon } from "@radix-ui/react-accessible-icon"
|
|
964
|
+
|
|
965
|
+
function CompletionIcon({ label = "Completed", ...props }) {
|
|
966
|
+
return (
|
|
967
|
+
<AccessibleIcon label={label}>
|
|
968
|
+
<TickIcon {...props} />
|
|
969
|
+
</AccessibleIcon>
|
|
970
|
+
)
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
// Usage with specific context
|
|
974
|
+
<CompletionIcon
|
|
975
|
+
label="Task completed successfully"
|
|
976
|
+
className="h-4 w-4 text-green-400"
|
|
977
|
+
/>
|
|
978
|
+
|
|
979
|
+
// Checkbox with proper ARIA attributes
|
|
980
|
+
<label className="flex items-center gap-2">
|
|
981
|
+
<input
|
|
982
|
+
type="checkbox"
|
|
983
|
+
className="sr-only peer"
|
|
984
|
+
aria-describedby="checkbox-help"
|
|
985
|
+
/>
|
|
986
|
+
<div className="relative">
|
|
987
|
+
<div className="h-5 w-5 border-2 border-gray-400 peer-checked:bg-green-400 peer-checked:border-green-400" />
|
|
988
|
+
<TickIcon className="absolute inset-0 h-5 w-5 text-white opacity-0 peer-checked:opacity-100" />
|
|
989
|
+
</div>
|
|
990
|
+
<span>Accept terms</span>
|
|
991
|
+
</label>
|
|
992
|
+
<div id="checkbox-help" className="text-xs text-gray-500">
|
|
993
|
+
Required to proceed with registration
|
|
994
|
+
</div>`}
|
|
995
|
+
</pre>
|
|
996
|
+
</div>
|
|
997
|
+
<div className="!space-y-4">
|
|
998
|
+
<p className="text-sm !text-white/70">
|
|
999
|
+
When using TickIcon for checkboxes or task completion,
|
|
1000
|
+
ensure proper labeling and keyboard accessibility. The
|
|
1001
|
+
stroke-based design maintains clarity even when scaled
|
|
1002
|
+
for users with visual impairments.
|
|
1003
|
+
</p>
|
|
1004
|
+
<div className="rounded-lg border border-green-500/20 bg-green-500/10 p-4">
|
|
1005
|
+
<div className="flex items-center gap-2 text-sm text-green-200">
|
|
1006
|
+
<TickIcon className="h-4 w-4" strokeWidth={2} />
|
|
1007
|
+
<span>
|
|
1008
|
+
Clear visual feedback helps all users understand
|
|
1009
|
+
completion states
|
|
1010
|
+
</span>
|
|
1011
|
+
</div>
|
|
1012
|
+
</div>
|
|
1013
|
+
</div>
|
|
1014
|
+
</div>
|
|
1015
|
+
</div>
|
|
1016
|
+
</div>
|
|
1017
|
+
|
|
1018
|
+
{/* Related Icons */}
|
|
1019
|
+
<div className="!space-y-8">
|
|
1020
|
+
<h2 className="text-center text-3xl font-bold !text-white">
|
|
1021
|
+
Related Icons
|
|
1022
|
+
</h2>
|
|
1023
|
+
<div className="grid grid-cols-2 gap-6 md:grid-cols-4">
|
|
1024
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
1025
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-green-500/20">
|
|
1026
|
+
<span className="text-2xl">✅</span>
|
|
1027
|
+
</div>
|
|
1028
|
+
<div>
|
|
1029
|
+
<div className="font-medium text-white">
|
|
1030
|
+
TickCircleIcon
|
|
1031
|
+
</div>
|
|
1032
|
+
<div className="text-xs text-white/60">
|
|
1033
|
+
Checkmark in circle
|
|
1034
|
+
</div>
|
|
1035
|
+
</div>
|
|
1036
|
+
</div>
|
|
1037
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
1038
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-red-500/20">
|
|
1039
|
+
<span className="text-2xl">❌</span>
|
|
1040
|
+
</div>
|
|
1041
|
+
<div>
|
|
1042
|
+
<div className="font-medium text-white">CrossIcon</div>
|
|
1043
|
+
<div className="text-xs text-white/60">
|
|
1044
|
+
Close/cancel states
|
|
1045
|
+
</div>
|
|
1046
|
+
</div>
|
|
1047
|
+
</div>
|
|
1048
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
1049
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-blue-500/20">
|
|
1050
|
+
<span className="text-2xl">ℹ️</span>
|
|
1051
|
+
</div>
|
|
1052
|
+
<div>
|
|
1053
|
+
<div className="font-medium text-white">InfoIcon</div>
|
|
1054
|
+
<div className="text-xs text-white/60">
|
|
1055
|
+
Information states
|
|
1056
|
+
</div>
|
|
1057
|
+
</div>
|
|
1058
|
+
</div>
|
|
1059
|
+
<div className="!space-y-3 rounded-lg border border-white/10 bg-white/5 p-4 text-center">
|
|
1060
|
+
<div className="!mx-auto flex h-12 w-12 items-center justify-center rounded-lg bg-orange-500/20">
|
|
1061
|
+
<span className="text-2xl">⚠️</span>
|
|
1062
|
+
</div>
|
|
1063
|
+
<div>
|
|
1064
|
+
<div className="font-medium text-white">AlertIcon</div>
|
|
1065
|
+
<div className="text-xs text-white/60">
|
|
1066
|
+
Warning states
|
|
1067
|
+
</div>
|
|
1068
|
+
</div>
|
|
1069
|
+
</div>
|
|
1070
|
+
</div>
|
|
1071
|
+
</div>
|
|
1072
|
+
</div>
|
|
1073
|
+
|
|
1074
|
+
{/* Footer */}
|
|
1075
|
+
<div className="border-t border-white/10 bg-black/20 backdrop-blur-xl">
|
|
1076
|
+
<div className="!mx-auto max-w-7xl px-6 py-8">
|
|
1077
|
+
<div className="!space-y-4 text-center">
|
|
1078
|
+
<p className="!text-white/60">
|
|
1079
|
+
TickIcon is part of the Aural UI icon library, designed for
|
|
1080
|
+
checkboxes, task completion, and success feedback with a
|
|
1081
|
+
clean stroke-based design.
|
|
1082
|
+
</p>
|
|
1083
|
+
<p className="text-sm !text-white/40">
|
|
1084
|
+
All icons use Radix UI's AccessibleIcon for screen reader
|
|
1085
|
+
compatibility and follow WCAG guidelines for interactive
|
|
1086
|
+
elements.
|
|
1087
|
+
</p>
|
|
1088
|
+
</div>
|
|
1089
|
+
</div>
|
|
1090
|
+
</div>
|
|
1091
|
+
</div>
|
|
1092
|
+
</>
|
|
1093
|
+
),
|
|
1094
|
+
},
|
|
1095
|
+
},
|
|
1096
|
+
tags: ["autodocs"],
|
|
1097
|
+
argTypes: {
|
|
1098
|
+
width: {
|
|
1099
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
1100
|
+
description: "Width of the icon in pixels",
|
|
1101
|
+
},
|
|
1102
|
+
height: {
|
|
1103
|
+
control: { type: "range", min: 8, max: 96, step: 2 },
|
|
1104
|
+
description: "Height of the icon in pixels",
|
|
1105
|
+
},
|
|
1106
|
+
stroke: {
|
|
1107
|
+
control: "color",
|
|
1108
|
+
description: "Stroke color of the checkmark",
|
|
1109
|
+
},
|
|
1110
|
+
strokeWidth: {
|
|
1111
|
+
control: { type: "range", min: 1, max: 4, step: 0.5 },
|
|
1112
|
+
description: "Width of the stroke line",
|
|
1113
|
+
},
|
|
1114
|
+
className: {
|
|
1115
|
+
control: "text",
|
|
1116
|
+
description: "CSS classes for styling",
|
|
1117
|
+
},
|
|
1118
|
+
},
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
export default meta
|
|
1122
|
+
type Story = StoryObj<typeof TickIcon>
|
|
1123
|
+
|
|
1124
|
+
// Story parameters for consistent dark theme
|
|
1125
|
+
const storyParameters = {
|
|
1126
|
+
backgrounds: {
|
|
1127
|
+
default: "dark",
|
|
1128
|
+
values: [
|
|
1129
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
1130
|
+
{ name: "darker", value: "#000000" },
|
|
1131
|
+
],
|
|
1132
|
+
},
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
export const Default: Story = {
|
|
1136
|
+
args: {
|
|
1137
|
+
width: 24,
|
|
1138
|
+
height: 24,
|
|
1139
|
+
className: "text-green-400",
|
|
1140
|
+
},
|
|
1141
|
+
parameters: storyParameters,
|
|
1142
|
+
render: (args) => (
|
|
1143
|
+
<div className="flex h-32 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
1144
|
+
<TickIcon {...args} />
|
|
1145
|
+
</div>
|
|
1146
|
+
),
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
export const SizeVariations: Story = {
|
|
1150
|
+
parameters: {
|
|
1151
|
+
...storyParameters,
|
|
1152
|
+
docs: {
|
|
1153
|
+
description: {
|
|
1154
|
+
story:
|
|
1155
|
+
"TickIcon in different sizes, perfect for checkboxes, form validation, and task completion indicators.",
|
|
1156
|
+
},
|
|
1157
|
+
},
|
|
1158
|
+
},
|
|
1159
|
+
render: () => (
|
|
1160
|
+
<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">
|
|
1161
|
+
<div className="text-center">
|
|
1162
|
+
<TickIcon className="!mx-auto mb-2 h-3 w-3 text-green-400" />
|
|
1163
|
+
<span className="text-xs text-white/60">12px</span>
|
|
1164
|
+
</div>
|
|
1165
|
+
<div className="text-center">
|
|
1166
|
+
<TickIcon className="!mx-auto mb-2 h-4 w-4 text-green-400" />
|
|
1167
|
+
<span className="text-xs text-white/60">16px</span>
|
|
1168
|
+
</div>
|
|
1169
|
+
<div className="text-center">
|
|
1170
|
+
<TickIcon className="!mx-auto mb-2 h-5 w-5 text-green-400" />
|
|
1171
|
+
<span className="text-xs text-white/60">20px</span>
|
|
1172
|
+
</div>
|
|
1173
|
+
<div className="text-center">
|
|
1174
|
+
<TickIcon className="!mx-auto mb-2 h-6 w-6 text-green-400" />
|
|
1175
|
+
<span className="text-xs text-white/60">24px</span>
|
|
1176
|
+
</div>
|
|
1177
|
+
<div className="text-center">
|
|
1178
|
+
<TickIcon className="!mx-auto mb-2 h-8 w-8 text-green-400" />
|
|
1179
|
+
<span className="text-xs text-white/60">32px</span>
|
|
1180
|
+
</div>
|
|
1181
|
+
<div className="text-center">
|
|
1182
|
+
<TickIcon className="!mx-auto mb-2 h-12 w-12 text-green-400" />
|
|
1183
|
+
<span className="text-xs text-white/60">48px</span>
|
|
1184
|
+
</div>
|
|
1185
|
+
</div>
|
|
1186
|
+
),
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
export const ColorVariations: Story = {
|
|
1190
|
+
parameters: {
|
|
1191
|
+
...storyParameters,
|
|
1192
|
+
docs: {
|
|
1193
|
+
description: {
|
|
1194
|
+
story:
|
|
1195
|
+
"TickIcon in different semantic colors for various completion and success states.",
|
|
1196
|
+
},
|
|
1197
|
+
},
|
|
1198
|
+
},
|
|
1199
|
+
render: () => (
|
|
1200
|
+
<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">
|
|
1201
|
+
<div className="text-center">
|
|
1202
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-green-500/30 bg-green-500/20">
|
|
1203
|
+
<TickIcon className="h-8 w-8 text-green-400" strokeWidth={2} />
|
|
1204
|
+
</div>
|
|
1205
|
+
<div className="text-sm font-medium text-white">Success</div>
|
|
1206
|
+
<div className="text-xs text-green-400">text-green-400</div>
|
|
1207
|
+
</div>
|
|
1208
|
+
<div className="text-center">
|
|
1209
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-emerald-500/30 bg-emerald-500/20">
|
|
1210
|
+
<TickIcon className="h-8 w-8 text-emerald-400" strokeWidth={2} />
|
|
1211
|
+
</div>
|
|
1212
|
+
<div className="text-sm font-medium text-white">Complete</div>
|
|
1213
|
+
<div className="text-xs text-emerald-400">text-emerald-400</div>
|
|
1214
|
+
</div>
|
|
1215
|
+
<div className="text-center">
|
|
1216
|
+
<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">
|
|
1217
|
+
<TickIcon className="h-8 w-8 text-blue-400" strokeWidth={2} />
|
|
1218
|
+
</div>
|
|
1219
|
+
<div className="text-sm font-medium text-white">Selected</div>
|
|
1220
|
+
<div className="text-xs text-blue-400">text-blue-400</div>
|
|
1221
|
+
</div>
|
|
1222
|
+
<div className="text-center">
|
|
1223
|
+
<div className="!mx-auto mb-3 flex h-16 w-16 items-center justify-center rounded-lg border border-purple-500/30 bg-purple-500/20">
|
|
1224
|
+
<TickIcon className="h-8 w-8 text-purple-400" strokeWidth={2} />
|
|
1225
|
+
</div>
|
|
1226
|
+
<div className="text-sm font-medium text-white">Verified</div>
|
|
1227
|
+
<div className="text-xs text-purple-400">text-purple-400</div>
|
|
1228
|
+
</div>
|
|
1229
|
+
</div>
|
|
1230
|
+
),
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
export const UsageExamples: Story = {
|
|
1234
|
+
parameters: {
|
|
1235
|
+
...storyParameters,
|
|
1236
|
+
docs: {
|
|
1237
|
+
description: {
|
|
1238
|
+
story:
|
|
1239
|
+
"Real-world usage examples showing TickIcon in different UI contexts like checkboxes, todo lists, and form validation.",
|
|
1240
|
+
},
|
|
1241
|
+
},
|
|
1242
|
+
},
|
|
1243
|
+
render: () => (
|
|
1244
|
+
<div className="min-h-dvh !space-y-8 rounded-lg bg-gradient-to-br from-gray-900 to-gray-800 p-8">
|
|
1245
|
+
{/* Custom Checkbox */}
|
|
1246
|
+
<div className="!space-y-2">
|
|
1247
|
+
<h3 className="text-sm font-medium text-white">Custom Checkbox</h3>
|
|
1248
|
+
<div className="!space-y-3">
|
|
1249
|
+
<label className="flex cursor-pointer items-center gap-3">
|
|
1250
|
+
<div className="relative">
|
|
1251
|
+
<input type="checkbox" className="peer sr-only" defaultChecked />
|
|
1252
|
+
<div className="peer-unchecked:bg-transparent peer-unchecked:border-gray-400 h-5 w-5 rounded border-2 border-green-400 bg-green-400 transition-colors peer-checked:border-green-400 peer-checked:bg-green-400" />
|
|
1253
|
+
<TickIcon
|
|
1254
|
+
className="peer-unchecked:opacity-0 absolute inset-0 h-5 w-5 text-white opacity-100 transition-opacity"
|
|
1255
|
+
strokeWidth={2}
|
|
1256
|
+
/>
|
|
1257
|
+
</div>
|
|
1258
|
+
<span className="text-white">Accept terms and conditions</span>
|
|
1259
|
+
</label>
|
|
1260
|
+
<label className="flex cursor-pointer items-center gap-3">
|
|
1261
|
+
<div className="relative">
|
|
1262
|
+
<input type="checkbox" className="peer sr-only" />
|
|
1263
|
+
<div className="h-5 w-5 rounded border-2 border-gray-400 bg-transparent transition-colors peer-checked:border-green-400 peer-checked:bg-green-400" />
|
|
1264
|
+
<TickIcon
|
|
1265
|
+
className="absolute inset-0 h-5 w-5 text-white opacity-0 transition-opacity peer-checked:opacity-100"
|
|
1266
|
+
strokeWidth={2}
|
|
1267
|
+
/>
|
|
1268
|
+
</div>
|
|
1269
|
+
<span className="text-white">Subscribe to newsletter</span>
|
|
1270
|
+
</label>
|
|
1271
|
+
</div>
|
|
1272
|
+
</div>
|
|
1273
|
+
|
|
1274
|
+
{/* Todo List */}
|
|
1275
|
+
<div className="!space-y-2">
|
|
1276
|
+
<h3 className="text-sm font-medium text-white">Todo List</h3>
|
|
1277
|
+
<div className="!space-y-3">
|
|
1278
|
+
<div className="flex items-center gap-3 rounded-lg border border-white/10 bg-white/5 p-3">
|
|
1279
|
+
<TickIcon className="h-5 w-5 text-green-400" strokeWidth={2} />
|
|
1280
|
+
<span className="flex-1 text-white line-through opacity-70">
|
|
1281
|
+
Set up project repository
|
|
1282
|
+
</span>
|
|
1283
|
+
<span className="text-xs text-green-400">Completed</span>
|
|
1284
|
+
</div>
|
|
1285
|
+
<div className="flex items-center gap-3 rounded-lg border border-white/10 bg-white/5 p-3">
|
|
1286
|
+
<div className="h-5 w-5 rounded-full border-2 border-white/30"></div>
|
|
1287
|
+
<span className="flex-1 text-white">Implement authentication</span>
|
|
1288
|
+
<span className="text-xs text-white/50">In Progress</span>
|
|
1289
|
+
</div>
|
|
1290
|
+
</div>
|
|
1291
|
+
</div>
|
|
1292
|
+
|
|
1293
|
+
{/* Form Validation */}
|
|
1294
|
+
<div className="!space-y-2">
|
|
1295
|
+
<h3 className="text-sm font-medium text-white">Form Validation</h3>
|
|
1296
|
+
<div className="relative">
|
|
1297
|
+
<input
|
|
1298
|
+
type="password"
|
|
1299
|
+
className="w-full rounded-lg border border-green-500/50 bg-white/5 px-3 py-2 pr-10 text-white placeholder-white/50 focus:border-green-500 focus:ring-2 focus:ring-green-500/20"
|
|
1300
|
+
placeholder="Enter your password"
|
|
1301
|
+
defaultValue="securepassword123"
|
|
1302
|
+
/>
|
|
1303
|
+
<TickIcon
|
|
1304
|
+
className="absolute top-1/2 right-3 h-4 w-4 -translate-y-1/2 text-green-400"
|
|
1305
|
+
strokeWidth={2}
|
|
1306
|
+
/>
|
|
1307
|
+
</div>
|
|
1308
|
+
<div className="flex items-center gap-2 text-sm text-green-400">
|
|
1309
|
+
<TickIcon className="h-4 w-4" strokeWidth={2} />
|
|
1310
|
+
<span>Password meets all requirements</span>
|
|
1311
|
+
</div>
|
|
1312
|
+
</div>
|
|
1313
|
+
</div>
|
|
1314
|
+
),
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
export const Playground: Story = {
|
|
1318
|
+
parameters: {
|
|
1319
|
+
...storyParameters,
|
|
1320
|
+
docs: {
|
|
1321
|
+
description: {
|
|
1322
|
+
story:
|
|
1323
|
+
"Interactive playground to experiment with different TickIcon configurations including stroke width and colors.",
|
|
1324
|
+
},
|
|
1325
|
+
},
|
|
1326
|
+
},
|
|
1327
|
+
args: {
|
|
1328
|
+
width: 32,
|
|
1329
|
+
height: 32,
|
|
1330
|
+
className: "text-green-400",
|
|
1331
|
+
strokeWidth: 2,
|
|
1332
|
+
},
|
|
1333
|
+
render: (args) => (
|
|
1334
|
+
<div className="flex h-64 min-h-dvh items-center justify-center rounded-lg bg-gradient-to-br from-gray-900 to-gray-800">
|
|
1335
|
+
<div className="rounded-lg border border-white/10 bg-white/5 p-8">
|
|
1336
|
+
<TickIcon {...args} />
|
|
1337
|
+
</div>
|
|
1338
|
+
</div>
|
|
1339
|
+
),
|
|
1340
|
+
}
|