linkedunion-design-kit 1.9.2 → 1.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/layout.jsx +13 -0
- package/dist/app/page.jsx +25 -0
- package/dist/build/types/app/layout.d.ts +12 -0
- package/dist/build/types/app/layout.js +22 -0
- package/dist/build/types/app/page.d.ts +12 -0
- package/dist/build/types/app/page.js +22 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/src/components/Accordion/Accordion.stories.jsx +33 -0
- package/dist/src/components/Accordion/accordion.jsx +59 -0
- package/dist/src/components/Alerts/Alert/alert.jsx +152 -0
- package/dist/src/components/Alerts/Alert/alert.stories.jsx +344 -0
- package/dist/src/components/Alerts/AlertDialog/alert-dialog.jsx +170 -0
- package/dist/src/components/Alerts/AlertDialog/alert-dialog.stories.jsx +552 -0
- package/dist/src/components/AppIcons/AndroidIcon.jsx +24 -0
- package/dist/src/components/AppIcons/AppIcon.jsx +29 -0
- package/dist/src/components/AppIcons/AppIcon.stories.jsx +223 -0
- package/dist/src/components/AppIcons/AppleIcon.jsx +31 -0
- package/dist/src/components/AppIcons/PlayStoreIcon.jsx +29 -0
- package/dist/src/components/Avatar/Avatar/Avatar.jsx +45 -0
- package/dist/src/components/Avatar/Avatar/Avatar.stories.jsx +95 -0
- package/dist/src/components/Avatar/Avatar/Avatar.test.jsx +9 -0
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.jsx +17 -0
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.stories.jsx +32 -0
- package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.jsx +20 -0
- package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.stories.jsx +50 -0
- package/dist/src/components/Badge/Badge.jsx +54 -0
- package/dist/src/components/Badge/Badge.stories.jsx +201 -0
- package/dist/src/components/Button/Button/Button.d.ts +7 -6
- package/dist/src/components/Button/Button/Button.js +32 -9
- package/dist/src/components/Button/Button/Button.jsx +101 -0
- package/dist/src/components/Button/Button/Button.stories.jsx +283 -0
- package/dist/src/components/Button/Button/Button.test.jsx +73 -0
- package/dist/src/components/Button/IconButton/IconButton.jsx +63 -0
- package/dist/src/components/Button/IconButton/IconButton.stories.jsx +128 -0
- package/dist/src/components/Button/IconButton/IconButton.test.jsx +28 -0
- package/dist/src/components/Button/index.js +3 -3
- package/dist/src/components/Card/MultipleNews/MultiNews.jsx +80 -0
- package/dist/src/components/Card/MultipleNews/MultiNews.stories.jsx +104 -0
- package/dist/src/components/Card/PostByCategory/PostByCategory.jsx +60 -0
- package/dist/src/components/Card/PostByCategory/PostByCategory.stories.jsx +106 -0
- package/dist/src/components/Card/SinglePost/SinglePost.jsx +26 -0
- package/dist/src/components/Card/SinglePost/SinglePost.stories.jsx +68 -0
- package/dist/src/components/Card/card.jsx +36 -0
- package/dist/src/components/Card/contactProfile/ContactProfile.jsx +60 -0
- package/dist/src/components/Card/contactProfile/ContactProfile.stories.jsx +103 -0
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.jsx +41 -0
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.stories.jsx +69 -0
- package/dist/src/components/Card/photoGallery/PhotoGallery.jsx +17 -0
- package/dist/src/components/Card/photoGallery/PhotoGallery.stories.jsx +39 -0
- package/dist/src/components/Checkbox/checkbox.jsx +47 -0
- package/dist/src/components/Checkbox/checkbox.stories.jsx +113 -0
- package/dist/src/components/ColorPicker/ColorPicker.jsx +67 -0
- package/dist/src/components/ColorPicker/ColorPicker.stories.jsx +138 -0
- package/dist/src/components/Colors/color.jsx +5 -0
- package/dist/src/components/Colors/color.stories.jsx +20 -0
- package/dist/src/components/Colors/color.test.jsx +23 -0
- package/dist/src/components/Dropdown/Combobox/Combobox.jsx +198 -0
- package/dist/src/components/Dropdown/Combobox/Combobox.stories.jsx +289 -0
- package/dist/src/components/Dropdown/Combobox/utils/renderBadge.jsx +7 -0
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.jsx +102 -0
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.jsx +464 -0
- package/dist/src/components/Dropdown/DropdownMenu/SelectAllSection.jsx +19 -0
- package/dist/src/components/Dropdown/Select.stories.jsx +201 -0
- package/dist/src/components/Dropdown/select.jsx +93 -0
- package/dist/src/components/Icons/LUIcon.jsx +41 -0
- package/dist/src/components/Icons/LUIcon.test.jsx +308 -0
- package/dist/src/components/Icons/stories/IconDropdown.jsx +67 -0
- package/dist/src/components/Icons/stories/IconGallery.jsx +77 -0
- package/dist/src/components/Icons/stories/InteractiveIconSelector.jsx +86 -0
- package/dist/src/components/Icons/stories/LUIcon.stories.jsx +108 -0
- package/dist/src/components/ImageUploader/ImageUploader.stories.jsx +50 -0
- package/dist/src/components/ImageUploader/imageUploader.jsx +94 -0
- package/dist/src/components/Images/LuImage.jsx +19 -0
- package/dist/src/components/Images/LuImage.stories.jsx +154 -0
- package/dist/src/components/Images/LuImage.test.jsx +44 -0
- package/dist/src/components/Input/Input.stories.jsx +250 -0
- package/dist/src/components/Input/input.jsx +110 -0
- package/dist/src/components/Label/Label.jsx +32 -0
- package/dist/src/components/Label/Label.stories.jsx +30 -0
- package/dist/src/components/Pagination/pagination.d.ts +33 -0
- package/dist/src/components/Pagination/pagination.js +68 -0
- package/dist/src/components/Pagination/pagination.jsx +68 -0
- package/dist/src/components/Pagination/pagination.stories.d.ts +74 -0
- package/dist/src/components/Pagination/pagination.stories.js +168 -0
- package/dist/src/components/Pagination/pagination.stories.jsx +114 -0
- package/dist/src/components/RadioGroup/RadioGroup.stories.jsx +146 -0
- package/dist/src/components/RadioGroup/radio-group.jsx +49 -0
- package/dist/src/components/Skeleton/skeleton.d.ts +117 -0
- package/dist/src/components/Skeleton/skeleton.js +140 -0
- package/dist/src/components/Skeleton/skeleton.stories.d.ts +153 -0
- package/dist/src/components/Skeleton/skeleton.stories.js +404 -0
- package/dist/src/components/Slider/Slider.stories.jsx +159 -0
- package/dist/src/components/Slider/slider.jsx +31 -0
- package/dist/src/components/SweetAlert/SweetAlert.jsx +147 -0
- package/dist/src/components/SweetAlert/SweetAlert.stories.jsx +505 -0
- package/dist/src/components/Switch/Switch.stories.jsx +66 -0
- package/dist/src/components/Switch/switch.jsx +61 -0
- package/dist/src/components/Table/Table.d.ts +26 -0
- package/dist/src/components/Table/Table.js +186 -0
- package/dist/src/components/Table/Table.jsx +221 -0
- package/dist/src/components/Table/Table.stories.d.ts +51 -0
- package/dist/src/components/Table/Table.stories.js +408 -0
- package/dist/src/components/Table/Table.stories.jsx +652 -0
- package/dist/src/components/Table/index.d.ts +20 -0
- package/dist/src/components/Table/index.js +20 -0
- package/dist/src/components/Tabs/Tabs.stories.jsx +29 -0
- package/dist/src/components/Tabs/tabs.jsx +32 -0
- package/dist/src/components/Title/Title.jsx +8 -0
- package/dist/src/components/Title/Title.stories.jsx +37 -0
- package/dist/src/components/Title/Title.test.jsx +24 -0
- package/dist/src/components/ToolTip/Tooltip.jsx +18 -0
- package/dist/src/components/ToolTip/Tooltip.stories.jsx +25 -0
- package/dist/src/components/Typography/Body/Body.stories.jsx +34 -0
- package/dist/src/components/Typography/Body/body.jsx +52 -0
- package/dist/src/components/Typography/Caption/Caption.stories.jsx +24 -0
- package/dist/src/components/Typography/Caption/caption.jsx +25 -0
- package/dist/src/components/Typography/Display/Display.stories.jsx +24 -0
- package/dist/src/components/Typography/Display/display.jsx +39 -0
- package/dist/src/components/Typography/Heading/Heading.stories.jsx +37 -0
- package/dist/src/components/Typography/Heading/heading.jsx +53 -0
- package/dist/src/components/ui/avatar.d.ts +3 -10
- package/dist/src/components/ui/avatar.js +12 -27
- package/dist/src/components/ui/avatar.jsx +27 -0
- package/dist/src/components/ui/button.d.ts +10 -0
- package/dist/src/components/ui/button.js +56 -0
- package/dist/src/components/ui/button.jsx +45 -0
- package/dist/src/components/ui/collapsible.d.ts +5 -0
- package/dist/src/components/ui/collapsible.js +5 -0
- package/dist/src/components/ui/collapsible.jsx +5 -0
- package/dist/src/components/ui/command.jsx +67 -0
- package/dist/src/components/ui/dialog.jsx +66 -0
- package/dist/src/components/ui/popover.jsx +33 -0
- package/dist/src/components/ui/tooltip.jsx +38 -0
- package/dist/src/components/ui/typography.jsx +56 -0
- package/dist/src/utils/colors.js +11 -11
- package/dist/src/utils/iconList.d.ts +4 -0
- package/dist/src/utils/iconList.js +4 -0
- package/dist/styles/global.css +209 -67
- package/package.json +1 -1
- package/dist/src/components/Avatar/Avatar/Avatar1.stories.d.ts +0 -17
- package/dist/src/components/Avatar/Avatar/Avatar1.stories.js +0 -68
|
@@ -0,0 +1,552 @@
|
|
|
1
|
+
import { useState } from "react";
|
|
2
|
+
import { Button } from "../../Button/Button/Button";
|
|
3
|
+
import { Heading } from "../../Typography/Heading/heading";
|
|
4
|
+
import { Body } from "../../Typography/Body/body";
|
|
5
|
+
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, colorOptions, sizeOptions, shadowOptions, variantOptions, getButtonColor, getIconForColor, getContentForColor, sizeExamples, shadowExamples, realWorldExamples, } from "./index";
|
|
6
|
+
import LUIcon from "../../Icons/LUIcon";
|
|
7
|
+
export default {
|
|
8
|
+
title: "Components/Alert/AlertDialog",
|
|
9
|
+
component: AlertDialog,
|
|
10
|
+
tags: ["autodocs"],
|
|
11
|
+
parameters: {
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component: "A modal dialog that interrupts the user with important content and expects a response. Built with Radix UI primitives.",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
// Component with eye icon to show code
|
|
20
|
+
var ColorVariantWithEyeIcon = function (_a) {
|
|
21
|
+
var color = _a.color, content = _a.content;
|
|
22
|
+
var _b = useState(false), showCode = _b[0], setShowCode = _b[1];
|
|
23
|
+
var triggerText = color.charAt(0).toUpperCase() + color.slice(1).replace("-", " ");
|
|
24
|
+
var alertDialogCode = "<AlertDialog>\n <AlertDialogTrigger asChild>\n <Button variant=\"outline\" color=\"".concat(getButtonColor(color), "\">\n ").concat(triggerText, "\n </Button>\n </AlertDialogTrigger>\n <AlertDialogContent color=\"").concat(color, "\">\n <AlertDialogHeader>\n <LUIcon icon=\"").concat(getIconForColor(color), "\" variant=\"padded\" />\n <AlertDialogTitle>").concat(content.title, "</AlertDialogTitle>\n <AlertDialogDescription>\n ").concat(content.description, "\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction>").concat(content.button, "</AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n</AlertDialog>");
|
|
25
|
+
return (<div className="space-y-2">
|
|
26
|
+
<div className="flex items-center gap-2">
|
|
27
|
+
<div className="flex-1">
|
|
28
|
+
<AlertDialogExample triggerText={triggerText} triggerColor={getButtonColor(color)} color={color} icon={getIconForColor(color)} title={content.title} description={content.description} cancelText="Cancel" actionText={content.button} className="w-full"/>
|
|
29
|
+
</div>
|
|
30
|
+
<Button onClick={function () { return setShowCode(!showCode); }} variant="ghost" size="sm" title={showCode ? "Hide Code" : "Show Code"} className="text-gray-600 hover:text-gray-800 hover:bg-gray-100">
|
|
31
|
+
<LUIcon icon={showCode ? "eye-slash" : "eye"}/>
|
|
32
|
+
</Button>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
{showCode && (<div className="p-3 bg-gray-50 border rounded-lg">
|
|
36
|
+
<div className="flex items-center justify-between mb-2">
|
|
37
|
+
<Body variant="body-sm" className="font-semibold text-gray-700">
|
|
38
|
+
{triggerText} - AlertDialog Code
|
|
39
|
+
</Body>
|
|
40
|
+
<Button onClick={function () { return navigator.clipboard.writeText(alertDialogCode); }} variant="ghost" size="sm" title="Copy code to clipboard" className="text-xs text-blue-700 hover:bg-blue-200 bg-blue-100">
|
|
41
|
+
Copy Code
|
|
42
|
+
</Button>
|
|
43
|
+
</div>
|
|
44
|
+
<pre className="text-xs bg-white p-3 rounded border overflow-x-auto">
|
|
45
|
+
<code className="text-gray-800">{alertDialogCode}</code>
|
|
46
|
+
</pre>
|
|
47
|
+
</div>)}
|
|
48
|
+
</div>);
|
|
49
|
+
};
|
|
50
|
+
// Component with eye icon to show size code
|
|
51
|
+
var SizeVariantWithEyeIcon = function (_a) {
|
|
52
|
+
var sizeExample = _a.sizeExample;
|
|
53
|
+
var _b = useState(false), showCode = _b[0], setShowCode = _b[1];
|
|
54
|
+
var alertDialogCode = "<AlertDialog>\n <AlertDialogTrigger asChild>\n <Button variant=\"outline\" color=\"blue\">\n ".concat(sizeExample.triggerText, "\n </Button>\n </AlertDialogTrigger>\n <AlertDialogContent size=\"").concat(sizeExample.size, "\" color=\"blue\">\n <AlertDialogHeader>\n <LUIcon icon=\"").concat(sizeExample.icon, "\" variant=\"padded\" />\n <AlertDialogTitle>").concat(sizeExample.title, "</AlertDialogTitle>\n <AlertDialogDescription>\n ").concat(sizeExample.description, "\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>").concat(sizeExample.cancelText, "</AlertDialogCancel>\n <AlertDialogAction>").concat(sizeExample.actionText, "</AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n</AlertDialog>");
|
|
55
|
+
return (<div className="space-y-2">
|
|
56
|
+
<div className="flex items-center gap-2">
|
|
57
|
+
<div className="flex-1">
|
|
58
|
+
<AlertDialogExample triggerText={sizeExample.triggerText} triggerColor="blue" size={sizeExample.size} color="blue" icon={sizeExample.icon} title={sizeExample.title} description={sizeExample.description} cancelText={sizeExample.cancelText} actionText={sizeExample.actionText}/>
|
|
59
|
+
</div>
|
|
60
|
+
<Button onClick={function () { return setShowCode(!showCode); }} variant="ghost" size="sm" title={showCode ? "Hide Code" : "Show Code"} className="text-gray-600 hover:text-gray-800 hover:bg-gray-100">
|
|
61
|
+
<LUIcon icon={showCode ? "eye-slash" : "eye"}/>
|
|
62
|
+
</Button>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
{showCode && (<div className="p-3 bg-gray-50 border rounded-lg">
|
|
66
|
+
<div className="flex items-center justify-between mb-2">
|
|
67
|
+
<Body variant="body-sm" className="font-semibold text-gray-700">
|
|
68
|
+
{sizeExample.size.toUpperCase()} Size - AlertDialog Code
|
|
69
|
+
</Body>
|
|
70
|
+
<Button onClick={function () { return navigator.clipboard.writeText(alertDialogCode); }} variant="ghost" size="sm" title="Copy code to clipboard" className="text-xs text-blue-700 hover:bg-blue-200 bg-blue-100">
|
|
71
|
+
Copy Code
|
|
72
|
+
</Button>
|
|
73
|
+
</div>
|
|
74
|
+
<pre className="text-xs bg-white p-3 rounded border overflow-x-auto">
|
|
75
|
+
<code className="text-gray-800">{alertDialogCode}</code>
|
|
76
|
+
</pre>
|
|
77
|
+
</div>)}
|
|
78
|
+
</div>);
|
|
79
|
+
};
|
|
80
|
+
// Component with eye icon to show shadow code
|
|
81
|
+
var ShadowVariantWithEyeIcon = function (_a) {
|
|
82
|
+
var shadowExample = _a.shadowExample;
|
|
83
|
+
var _b = useState(false), showCode = _b[0], setShowCode = _b[1];
|
|
84
|
+
var alertDialogCode = "<AlertDialog>\n <AlertDialogTrigger asChild>\n <Button variant=\"outline\" color=\"blue\">\n ".concat(shadowExample.triggerText, "\n </Button>\n </AlertDialogTrigger>\n <AlertDialogContent shadow=\"").concat(shadowExample.shadow, "\" color=\"blue\">\n <AlertDialogHeader>\n <LUIcon icon=\"").concat(shadowExample.icon, "\" variant=\"padded\" />\n <AlertDialogTitle>").concat(shadowExample.title, "</AlertDialogTitle>\n <AlertDialogDescription>\n ").concat(shadowExample.description, "\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>").concat(shadowExample.cancelText, "</AlertDialogCancel>\n <AlertDialogAction>").concat(shadowExample.actionText, "</AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n</AlertDialog>");
|
|
85
|
+
return (<div className="space-y-2">
|
|
86
|
+
<div className="flex items-center gap-2">
|
|
87
|
+
<div className="flex-1">
|
|
88
|
+
<AlertDialogExample triggerText={shadowExample.triggerText} triggerColor="blue" shadow={shadowExample.shadow} color="blue" icon={shadowExample.icon} title={shadowExample.title} description={shadowExample.description} cancelText={shadowExample.cancelText} actionText={shadowExample.actionText}/>
|
|
89
|
+
</div>
|
|
90
|
+
<Button onClick={function () { return setShowCode(!showCode); }} variant="ghost" size="sm" title={showCode ? "Hide Code" : "Show Code"} className="text-gray-600 hover:text-gray-800 hover:bg-gray-100">
|
|
91
|
+
<LUIcon icon={showCode ? "eye-slash" : "eye"}/>
|
|
92
|
+
</Button>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
{showCode && (<div className="p-3 bg-gray-50 border rounded-lg">
|
|
96
|
+
<div className="flex items-center justify-between mb-2">
|
|
97
|
+
<Body variant="body-sm" className="font-semibold text-gray-700">
|
|
98
|
+
{shadowExample.shadow === "none" ? "No Shadow" : "Large Shadow"} -
|
|
99
|
+
AlertDialog Code
|
|
100
|
+
</Body>
|
|
101
|
+
<Button onClick={function () { return navigator.clipboard.writeText(alertDialogCode); }} variant="ghost" size="sm" title="Copy code to clipboard" className="text-xs text-blue-700 hover:bg-blue-200 bg-blue-100">
|
|
102
|
+
Copy Code
|
|
103
|
+
</Button>
|
|
104
|
+
</div>
|
|
105
|
+
<pre className="text-xs bg-white p-3 rounded border overflow-x-auto">
|
|
106
|
+
<code className="text-gray-800">{alertDialogCode}</code>
|
|
107
|
+
</pre>
|
|
108
|
+
</div>)}
|
|
109
|
+
</div>);
|
|
110
|
+
};
|
|
111
|
+
// Reusable AlertDialog component
|
|
112
|
+
var AlertDialogExample = function (_a) {
|
|
113
|
+
var triggerText = _a.triggerText, triggerColor = _a.triggerColor, _b = _a.size, size = _b === void 0 ? "md" : _b, _c = _a.shadow, shadow = _c === void 0 ? "none" : _c, color = _a.color, variant = _a.variant, icon = _a.icon, title = _a.title, description = _a.description, cancelText = _a.cancelText, actionText = _a.actionText, _d = _a.showCancel, showCancel = _d === void 0 ? true : _d, _e = _a.showAction, showAction = _e === void 0 ? true : _e, _f = _a.className, className = _f === void 0 ? "" : _f;
|
|
114
|
+
return (<AlertDialog>
|
|
115
|
+
<AlertDialogTrigger asChild>
|
|
116
|
+
<Button size={size} variant="outline" color={triggerColor ? triggerColor : getButtonColor(color)} className={className}>
|
|
117
|
+
{triggerText}
|
|
118
|
+
</Button>
|
|
119
|
+
</AlertDialogTrigger>
|
|
120
|
+
<AlertDialogContent size={size} shadow={shadow} color={color} variant={variant}>
|
|
121
|
+
<AlertDialogHeader>
|
|
122
|
+
{icon && <LUIcon icon={icon} variant="padded"/>}
|
|
123
|
+
<AlertDialogTitle>{title}</AlertDialogTitle>
|
|
124
|
+
<AlertDialogDescription>{description}</AlertDialogDescription>
|
|
125
|
+
</AlertDialogHeader>
|
|
126
|
+
{(showCancel || showAction) && (<AlertDialogFooter>
|
|
127
|
+
{showCancel && (<AlertDialogCancel>{cancelText || "Cancel"}</AlertDialogCancel>)}
|
|
128
|
+
{showAction && (<AlertDialogAction>{actionText || "OK"}</AlertDialogAction>)}
|
|
129
|
+
</AlertDialogFooter>)}
|
|
130
|
+
</AlertDialogContent>
|
|
131
|
+
</AlertDialog>);
|
|
132
|
+
};
|
|
133
|
+
// Template for stories with args - Using actual AlertDialog components
|
|
134
|
+
var Template = function (args) { return (<AlertDialog>
|
|
135
|
+
<AlertDialogTrigger asChild>
|
|
136
|
+
<Button variant="outline" color="blue">
|
|
137
|
+
Show Alert Dialog
|
|
138
|
+
</Button>
|
|
139
|
+
</AlertDialogTrigger>
|
|
140
|
+
<AlertDialogContent size={args.size} shadow={args.shadow} color={args.color} variant={args.variant}>
|
|
141
|
+
<AlertDialogHeader>
|
|
142
|
+
{args.Icon && <LUIcon icon={args.Icon} variant="padded"/>}
|
|
143
|
+
<AlertDialogTitle>{args.title}</AlertDialogTitle>
|
|
144
|
+
<AlertDialogDescription>{args.description}</AlertDialogDescription>
|
|
145
|
+
</AlertDialogHeader>
|
|
146
|
+
<AlertDialogFooter>
|
|
147
|
+
<AlertDialogCancel>{args.cancelText}</AlertDialogCancel>
|
|
148
|
+
<AlertDialogAction>{args.actionText}</AlertDialogAction>
|
|
149
|
+
</AlertDialogFooter>
|
|
150
|
+
</AlertDialogContent>
|
|
151
|
+
</AlertDialog>); };
|
|
152
|
+
// Default story with all controls
|
|
153
|
+
export var Default = Template.bind({});
|
|
154
|
+
Default.args = {
|
|
155
|
+
size: "md",
|
|
156
|
+
shadow: "none",
|
|
157
|
+
color: "blue",
|
|
158
|
+
variant: "outline",
|
|
159
|
+
Icon: "info",
|
|
160
|
+
title: "Update Available",
|
|
161
|
+
description: "A new version of the application is available. Would you like to update now? The update includes bug fixes and performance improvements.",
|
|
162
|
+
cancelText: "Later",
|
|
163
|
+
actionText: "Update Now",
|
|
164
|
+
};
|
|
165
|
+
Default.argTypes = {
|
|
166
|
+
size: {
|
|
167
|
+
control: { type: "select" },
|
|
168
|
+
options: sizeOptions,
|
|
169
|
+
description: "Size variant for AlertDialogContent",
|
|
170
|
+
table: {
|
|
171
|
+
defaultValue: { summary: "md" },
|
|
172
|
+
type: { summary: "enum" },
|
|
173
|
+
category: "AlertDialogContent",
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
shadow: {
|
|
177
|
+
control: { type: "select" },
|
|
178
|
+
options: shadowOptions,
|
|
179
|
+
description: "Shadow variant for AlertDialogContent",
|
|
180
|
+
table: {
|
|
181
|
+
defaultValue: { summary: "none" },
|
|
182
|
+
type: { summary: "enum" },
|
|
183
|
+
category: "AlertDialogContent",
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
color: {
|
|
187
|
+
control: { type: "select" },
|
|
188
|
+
options: colorOptions,
|
|
189
|
+
description: "Color theme for AlertDialogContent",
|
|
190
|
+
table: {
|
|
191
|
+
defaultValue: { summary: "blue" },
|
|
192
|
+
type: { summary: "enum" },
|
|
193
|
+
category: "AlertDialogContent",
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
variant: {
|
|
197
|
+
control: { type: "select" },
|
|
198
|
+
options: variantOptions,
|
|
199
|
+
description: "Variant for AlertDialogContent (outline | fill)",
|
|
200
|
+
table: {
|
|
201
|
+
defaultValue: { summary: "outline" },
|
|
202
|
+
type: { summary: "enum" },
|
|
203
|
+
category: "AlertDialogContent",
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
Icon: {
|
|
207
|
+
control: { type: "text" },
|
|
208
|
+
description: "Icon to display in AlertDialogHeader (LUIcon name)",
|
|
209
|
+
table: {
|
|
210
|
+
type: { summary: "string" },
|
|
211
|
+
category: "AlertDialogHeader",
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
title: {
|
|
215
|
+
control: { type: "text" },
|
|
216
|
+
description: "Title text for AlertDialogTitle",
|
|
217
|
+
table: {
|
|
218
|
+
type: { summary: "string" },
|
|
219
|
+
category: "AlertDialogTitle",
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
description: {
|
|
223
|
+
control: { type: "text" },
|
|
224
|
+
description: "Description text for AlertDialogDescription",
|
|
225
|
+
table: {
|
|
226
|
+
type: { summary: "string" },
|
|
227
|
+
category: "AlertDialogDescription",
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
cancelText: {
|
|
231
|
+
control: { type: "text" },
|
|
232
|
+
description: "Text for AlertDialogCancel button",
|
|
233
|
+
table: {
|
|
234
|
+
type: { summary: "string" },
|
|
235
|
+
category: "AlertDialogCancel",
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
actionText: {
|
|
239
|
+
control: { type: "text" },
|
|
240
|
+
description: "Text for AlertDialogAction button",
|
|
241
|
+
table: {
|
|
242
|
+
type: { summary: "string" },
|
|
243
|
+
category: "AlertDialogAction",
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
// Simple Example showing the exact code structure
|
|
248
|
+
export var Example = function () { return (<AlertDialog>
|
|
249
|
+
<AlertDialogTrigger asChild>
|
|
250
|
+
<Button variant="outline" color="blue">
|
|
251
|
+
Show Alert Dialog
|
|
252
|
+
</Button>
|
|
253
|
+
</AlertDialogTrigger>
|
|
254
|
+
<AlertDialogContent color="blue" size="md" shadow="none">
|
|
255
|
+
<AlertDialogHeader>
|
|
256
|
+
<LUIcon icon="info" variant="padded"/>
|
|
257
|
+
<AlertDialogTitle>Update Available</AlertDialogTitle>
|
|
258
|
+
<AlertDialogDescription>
|
|
259
|
+
A new version of the application is available. Would you like to
|
|
260
|
+
update now? The update includes bug fixes and performance
|
|
261
|
+
improvements.
|
|
262
|
+
</AlertDialogDescription>
|
|
263
|
+
</AlertDialogHeader>
|
|
264
|
+
<AlertDialogFooter>
|
|
265
|
+
<AlertDialogCancel>Later</AlertDialogCancel>
|
|
266
|
+
<AlertDialogAction>Update Now</AlertDialogAction>
|
|
267
|
+
</AlertDialogFooter>
|
|
268
|
+
</AlertDialogContent>
|
|
269
|
+
</AlertDialog>); };
|
|
270
|
+
Example.parameters = {
|
|
271
|
+
docs: {
|
|
272
|
+
description: {
|
|
273
|
+
story: "This example shows the exact code structure you should use to implement the AlertDialog component.",
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
};
|
|
277
|
+
// Basic Example - Shows the actual component code
|
|
278
|
+
export var BasicExample = function () { return (<AlertDialog>
|
|
279
|
+
<AlertDialogTrigger asChild>
|
|
280
|
+
<Button variant="outline" color="blue">
|
|
281
|
+
Show Basic Alert
|
|
282
|
+
</Button>
|
|
283
|
+
</AlertDialogTrigger>
|
|
284
|
+
<AlertDialogContent color="blue" size="md" shadow="none">
|
|
285
|
+
<AlertDialogHeader>
|
|
286
|
+
<LUIcon icon="info" variant="padded"/>
|
|
287
|
+
<AlertDialogTitle>Update Available</AlertDialogTitle>
|
|
288
|
+
<AlertDialogDescription>
|
|
289
|
+
A new version of the application is available. Would you like to
|
|
290
|
+
update now? The update includes bug fixes and performance
|
|
291
|
+
improvements.
|
|
292
|
+
</AlertDialogDescription>
|
|
293
|
+
</AlertDialogHeader>
|
|
294
|
+
<AlertDialogFooter>
|
|
295
|
+
<AlertDialogCancel>Later</AlertDialogCancel>
|
|
296
|
+
<AlertDialogAction>Update Now</AlertDialogAction>
|
|
297
|
+
</AlertDialogFooter>
|
|
298
|
+
</AlertDialogContent>
|
|
299
|
+
</AlertDialog>); };
|
|
300
|
+
BasicExample.parameters = {
|
|
301
|
+
docs: {
|
|
302
|
+
description: {
|
|
303
|
+
story: "Basic AlertDialog example showing the actual component structure.",
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
};
|
|
307
|
+
export var AllSizes = function () { return (<div className="flex flex-col gap-8">
|
|
308
|
+
<Heading variant="h3" className="text-lg font-semibold">
|
|
309
|
+
All Size Variants
|
|
310
|
+
</Heading>
|
|
311
|
+
<Body variant="body-sm" className="text-gray-600">
|
|
312
|
+
Click the eye icon (👁️) to view the code for each size variant
|
|
313
|
+
</Body>
|
|
314
|
+
<div className="space-y-6">
|
|
315
|
+
{sizeExamples.map(function (example, index) { return (<SizeVariantWithEyeIcon key={index} sizeExample={example}/>); })}
|
|
316
|
+
</div>
|
|
317
|
+
</div>); };
|
|
318
|
+
AllSizes.parameters = {
|
|
319
|
+
docs: {
|
|
320
|
+
source: {
|
|
321
|
+
code: null, // This hides the source code
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
};
|
|
325
|
+
// Story showing both padded and default icon variants side-by-side
|
|
326
|
+
export var IconPaddedAndDefault = function () { return (<div className="flex flex-col gap-6 md:flex-row md:items-start md:gap-4">
|
|
327
|
+
<div className="flex-1">
|
|
328
|
+
<AlertDialog>
|
|
329
|
+
<AlertDialogTrigger asChild>
|
|
330
|
+
<Button variant="outline" color="blue">
|
|
331
|
+
Padded Icon
|
|
332
|
+
</Button>
|
|
333
|
+
</AlertDialogTrigger>
|
|
334
|
+
<AlertDialogContent color="blue" size="md">
|
|
335
|
+
<AlertDialogHeader>
|
|
336
|
+
<LUIcon icon="info" color="light-blue" variant="padded"/>
|
|
337
|
+
<AlertDialogTitle>Padded Icon</AlertDialogTitle>
|
|
338
|
+
<AlertDialogDescription>
|
|
339
|
+
This AlertDialog uses a padded icon (icon with background). The
|
|
340
|
+
icon size remains fixed.
|
|
341
|
+
</AlertDialogDescription>
|
|
342
|
+
</AlertDialogHeader>
|
|
343
|
+
<AlertDialogFooter>
|
|
344
|
+
<AlertDialogCancel>Close</AlertDialogCancel>
|
|
345
|
+
<AlertDialogAction>OK</AlertDialogAction>
|
|
346
|
+
</AlertDialogFooter>
|
|
347
|
+
</AlertDialogContent>
|
|
348
|
+
</AlertDialog>
|
|
349
|
+
</div>
|
|
350
|
+
|
|
351
|
+
<div className="flex-1">
|
|
352
|
+
<AlertDialog>
|
|
353
|
+
<AlertDialogTrigger asChild>
|
|
354
|
+
<Button variant="outline" color="blue">
|
|
355
|
+
Default Icon
|
|
356
|
+
</Button>
|
|
357
|
+
</AlertDialogTrigger>
|
|
358
|
+
<AlertDialogContent color="blue" size="md">
|
|
359
|
+
<AlertDialogHeader>
|
|
360
|
+
<LUIcon icon="info" variant="default"/>
|
|
361
|
+
<AlertDialogTitle>Default Icon</AlertDialogTitle>
|
|
362
|
+
<AlertDialogDescription>
|
|
363
|
+
This AlertDialog uses the default (non-padded) icon.
|
|
364
|
+
</AlertDialogDescription>
|
|
365
|
+
</AlertDialogHeader>
|
|
366
|
+
<AlertDialogFooter>
|
|
367
|
+
<AlertDialogCancel>Close</AlertDialogCancel>
|
|
368
|
+
<AlertDialogAction>OK</AlertDialogAction>
|
|
369
|
+
</AlertDialogFooter>
|
|
370
|
+
</AlertDialogContent>
|
|
371
|
+
</AlertDialog>
|
|
372
|
+
</div>
|
|
373
|
+
</div>); };
|
|
374
|
+
export var AllShadows = function () { return (<div className="flex flex-col gap-8">
|
|
375
|
+
<Heading variant="h3" className="text-lg font-semibold">
|
|
376
|
+
All Shadow Variants
|
|
377
|
+
</Heading>
|
|
378
|
+
<Body variant="body-sm" className="text-gray-600">
|
|
379
|
+
Click the eye icon (👁️) to view the code for each shadow variant
|
|
380
|
+
</Body>
|
|
381
|
+
<div className="space-y-6">
|
|
382
|
+
{shadowExamples.map(function (example, index) { return (<ShadowVariantWithEyeIcon key={index} shadowExample={example}/>); })}
|
|
383
|
+
</div>
|
|
384
|
+
</div>); };
|
|
385
|
+
AllShadows.parameters = {
|
|
386
|
+
docs: {
|
|
387
|
+
source: {
|
|
388
|
+
code: null, // This hides the source code
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
};
|
|
392
|
+
export var AllColors = function () { return (<div className="flex flex-col gap-8">
|
|
393
|
+
<Heading variant="h3" className="text-lg font-semibold">
|
|
394
|
+
All Color Variants
|
|
395
|
+
</Heading>
|
|
396
|
+
<Body variant="body-sm" className="text-gray-600">
|
|
397
|
+
Click the eye icon (👁️) to view the code for each color variant
|
|
398
|
+
</Body>
|
|
399
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
400
|
+
{colorOptions.map(function (color) {
|
|
401
|
+
var content = getContentForColor(color);
|
|
402
|
+
return (<ColorVariantWithEyeIcon key={color} color={color} content={content}/>);
|
|
403
|
+
})}
|
|
404
|
+
</div>
|
|
405
|
+
</div>); };
|
|
406
|
+
AllColors.parameters = {
|
|
407
|
+
docs: {
|
|
408
|
+
source: {
|
|
409
|
+
code: null, // This hides the source code
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
};
|
|
413
|
+
// Essential Layout Variants
|
|
414
|
+
export var WithoutIcon = function () { return (<AlertDialog>
|
|
415
|
+
<AlertDialogTrigger asChild>
|
|
416
|
+
<Button variant="outline" color="blue">
|
|
417
|
+
Show Alert Dialog
|
|
418
|
+
</Button>
|
|
419
|
+
</AlertDialogTrigger>
|
|
420
|
+
<AlertDialogContent color="blue">
|
|
421
|
+
<AlertDialogHeader>
|
|
422
|
+
<AlertDialogTitle>Save Draft</AlertDialogTitle>
|
|
423
|
+
<AlertDialogDescription>
|
|
424
|
+
You have unsaved changes in your document. Would you like to save them
|
|
425
|
+
as a draft before leaving?
|
|
426
|
+
</AlertDialogDescription>
|
|
427
|
+
</AlertDialogHeader>
|
|
428
|
+
<AlertDialogFooter>
|
|
429
|
+
<AlertDialogCancel>Discard Changes</AlertDialogCancel>
|
|
430
|
+
<AlertDialogAction>Save Draft</AlertDialogAction>
|
|
431
|
+
</AlertDialogFooter>
|
|
432
|
+
</AlertDialogContent>
|
|
433
|
+
</AlertDialog>); };
|
|
434
|
+
export var SingleActionButton = function () { return (<AlertDialog>
|
|
435
|
+
<AlertDialogTrigger asChild>
|
|
436
|
+
<Button variant="outline" color="green">
|
|
437
|
+
Show Success Message
|
|
438
|
+
</Button>
|
|
439
|
+
</AlertDialogTrigger>
|
|
440
|
+
<AlertDialogContent color="green">
|
|
441
|
+
<AlertDialogHeader>
|
|
442
|
+
<LUIcon icon="check" variant="padded"/>
|
|
443
|
+
<AlertDialogTitle>Success!</AlertDialogTitle>
|
|
444
|
+
<AlertDialogDescription>
|
|
445
|
+
Your message has been sent successfully.
|
|
446
|
+
</AlertDialogDescription>
|
|
447
|
+
</AlertDialogHeader>
|
|
448
|
+
<AlertDialogFooter>
|
|
449
|
+
<AlertDialogAction>Close</AlertDialogAction>
|
|
450
|
+
</AlertDialogFooter>
|
|
451
|
+
</AlertDialogContent>
|
|
452
|
+
</AlertDialog>); };
|
|
453
|
+
export var RealWorldUseCases = function () { return (<div className="flex flex-col gap-8">
|
|
454
|
+
<Heading variant="h3" className="text-lg font-semibold">
|
|
455
|
+
Real-world Use Cases
|
|
456
|
+
</Heading>
|
|
457
|
+
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
|
|
458
|
+
{realWorldExamples.map(function (example, index) { return (<AlertDialogExample key={index} triggerText={example.triggerText} triggerColor={example.triggerColor} size={example.size} shadow={example.shadow} color={example.color} icon={example.icon} title={example.title} description={example.description} cancelText={example.cancelText} actionText={example.actionText} className="w-full"/>); })}
|
|
459
|
+
</div>
|
|
460
|
+
</div>); };
|
|
461
|
+
RealWorldUseCases.parameters = {
|
|
462
|
+
docs: {
|
|
463
|
+
source: {
|
|
464
|
+
code: null, // This hides the source code
|
|
465
|
+
},
|
|
466
|
+
},
|
|
467
|
+
};
|
|
468
|
+
// Button Configuration Variants - Comprehensive Examples
|
|
469
|
+
var ButtonVariantsTemplate = function () { return (<div className="flex flex-col gap-8">
|
|
470
|
+
<Heading variant="h3" className="text-lg font-semibold">
|
|
471
|
+
Button Configuration Variants
|
|
472
|
+
</Heading>
|
|
473
|
+
|
|
474
|
+
{/* Single Button Examples */}
|
|
475
|
+
<div className="space-y-4">
|
|
476
|
+
<Heading variant="h4" className="font-medium text-gray-700">
|
|
477
|
+
Single Button (Action Only)
|
|
478
|
+
</Heading>
|
|
479
|
+
<div className="flex flex-wrap gap-4">
|
|
480
|
+
<AlertDialogExample triggerText="Success Message" triggerColor="light-green" size="md" color="green" icon="check" title="Message Sent" description="Your message has been delivered successfully to all recipients." showCancel={false} actionText="Close"/>
|
|
481
|
+
|
|
482
|
+
<AlertDialogExample triggerText="Error Alert" triggerColor="light-red" size="md" shadow="lg" color="red" icon="circle-exclamation" title="Connection Failed" description="Unable to connect to the server. Please check your internet connection and try again." showCancel={false} actionText="Retry"/>
|
|
483
|
+
|
|
484
|
+
<AlertDialogExample triggerText="Installation Complete" triggerColor="blue" size="md" color="green" icon="check" title="Installation Complete" description="The application has been successfully installed on your device. You can now start using all the features." showCancel={false} actionText="Start Using App"/>
|
|
485
|
+
</div>
|
|
486
|
+
</div>
|
|
487
|
+
|
|
488
|
+
{/* Both Buttons Examples */}
|
|
489
|
+
<div className="space-y-4">
|
|
490
|
+
<Heading variant="h4" className="font-medium text-gray-700">
|
|
491
|
+
Both Buttons (Cancel + Action)
|
|
492
|
+
</Heading>
|
|
493
|
+
<div className="flex flex-wrap gap-4">
|
|
494
|
+
<AlertDialogExample triggerText="Confirm Action" triggerColor="blue" size="md" color="blue" icon="info" title="Confirm Your Action" description="Do you want to proceed with this action? This will update your settings and preferences." cancelText="No, Cancel" actionText="Yes, Proceed"/>
|
|
495
|
+
|
|
496
|
+
<AlertDialogExample triggerText="Delete Confirmation" triggerColor="light-red" size="md" color="red" icon="circle-exclamation" title="Confirm Deletion" description="Are you sure you want to delete this item? This action cannot be undone." cancelText="Cancel" actionText="Delete"/>
|
|
497
|
+
|
|
498
|
+
<AlertDialogExample triggerText="Save Changes" triggerColor="blue" size="md" color="blue" title="Save Draft" description="You have unsaved changes in your document. Would you like to save them as a draft before leaving?" cancelText="Discard Changes" actionText="Save Draft"/>
|
|
499
|
+
</div>
|
|
500
|
+
</div>
|
|
501
|
+
|
|
502
|
+
{/* No Buttons Examples */}
|
|
503
|
+
<div className="space-y-4">
|
|
504
|
+
<Heading variant="h4" className="font-medium text-gray-700">
|
|
505
|
+
No Buttons (Information Only)
|
|
506
|
+
</Heading>
|
|
507
|
+
<div className="flex flex-wrap gap-4">
|
|
508
|
+
<AlertDialogExample triggerText="Loading State" triggerColor="blue" size="sm" color="blue" icon="clock" title="Syncing..." description="Synchronizing your data with the cloud. Please wait." showCancel={false} showAction={false}/>
|
|
509
|
+
|
|
510
|
+
<AlertDialogExample triggerText="System Info" triggerColor="yellow" size="md" color="yellow" icon="info" title="System Information" description="Server maintenance is currently in progress. Some features may be temporarily unavailable. We apologize for any inconvenience." showCancel={false} showAction={false}/>
|
|
511
|
+
|
|
512
|
+
<AlertDialogExample triggerText="Processing" triggerColor="yellow" size="md" color="yellow" icon="clock" title="Processing Your Request" description="Please wait while we process your request. This may take a few moments. Do not close this window." showCancel={false} showAction={false}/>
|
|
513
|
+
</div>
|
|
514
|
+
</div>
|
|
515
|
+
</div>); };
|
|
516
|
+
export var ButtonVariants = ButtonVariantsTemplate.bind({});
|
|
517
|
+
ButtonVariants.parameters = {
|
|
518
|
+
docs: {
|
|
519
|
+
source: {
|
|
520
|
+
code: null, // This hides the source code
|
|
521
|
+
},
|
|
522
|
+
},
|
|
523
|
+
};
|
|
524
|
+
// Story showing both padded and default icon variants side-by-side
|
|
525
|
+
export var CustomizeAlert = function () { return (<AlertDialog>
|
|
526
|
+
<AlertDialogTrigger asChild>
|
|
527
|
+
<Button variant="outline" color="blue">
|
|
528
|
+
Customize Alert
|
|
529
|
+
</Button>
|
|
530
|
+
</AlertDialogTrigger>
|
|
531
|
+
<AlertDialogContent color="red" size="md">
|
|
532
|
+
<AlertDialogHeader>
|
|
533
|
+
<LUIcon icon="info" size="9xl" color="light-red" variant="padded"/>
|
|
534
|
+
<AlertDialogTitle>
|
|
535
|
+
<Heading variant="h1-700"> Customize Alert Title</Heading>
|
|
536
|
+
</AlertDialogTitle>
|
|
537
|
+
<AlertDialogDescription>
|
|
538
|
+
<Body variant="body-xs">
|
|
539
|
+
This AlertDialog uses a Customize Alert Icon.
|
|
540
|
+
</Body>
|
|
541
|
+
</AlertDialogDescription>
|
|
542
|
+
</AlertDialogHeader>
|
|
543
|
+
<AlertDialogFooter>
|
|
544
|
+
<AlertDialogCancel variant="fill" color="indigo">
|
|
545
|
+
Close
|
|
546
|
+
</AlertDialogCancel>
|
|
547
|
+
<AlertDialogAction variant="outline" color="light-green">
|
|
548
|
+
OK
|
|
549
|
+
</AlertDialogAction>
|
|
550
|
+
</AlertDialogFooter>
|
|
551
|
+
</AlertDialogContent>
|
|
552
|
+
</AlertDialog>); };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from "react";
|
|
13
|
+
var AndroidIcon = function (_a) {
|
|
14
|
+
var _b = _a.width, width = _b === void 0 ? "177" : _b, _c = _a.height, height = _c === void 0 ? "60" : _c, _d = _a.fill, fill = _d === void 0 ? "#000000" : _d, _e = _a.textFill, textFill = _e === void 0 ? "#ffffff" : _e, _f = _a.iconFill, iconFill = _f === void 0 ? textFill : _f, className = _a.className, _g = _a.stroke, stroke = _g === void 0 ? textFill : _g, props = __rest(_a, ["width", "height", "fill", "textFill", "iconFill", "className", "stroke"]);
|
|
15
|
+
return (<svg width={width} height={height} viewBox="0 0 177 59" fill={fill} xmlns="http://www.w3.org/2000/svg" className={className} {...props}>
|
|
16
|
+
<path d="M2 0.5H175C175.828 0.5 176.5 1.17157 176.5 2V57C176.5 57.8284 175.828 58.5 175 58.5H2C1.17157 58.5 0.5 57.8284 0.5 57V2C0.5 1.17157 1.17157 0.5 2 0.5Z" stroke={stroke}/>
|
|
17
|
+
<g>
|
|
18
|
+
<path d="M31.3639 33.9716C31.1002 33.9716 30.8424 33.8934 30.6231 33.7469C30.4039 33.6004 30.233 33.3922 30.132 33.1485C30.0311 32.9049 30.0047 32.6368 30.0562 32.3782C30.1076 32.1195 30.2346 31.882 30.4211 31.6955C30.6075 31.509 30.8451 31.382 31.1038 31.3306C31.3624 31.2791 31.6305 31.3055 31.8741 31.4065C32.1178 31.5074 32.326 31.6783 32.4725 31.8975C32.619 32.1168 32.6972 32.3746 32.6972 32.6383C32.6972 32.9919 32.5567 33.3311 32.3067 33.5811C32.0567 33.8312 31.7175 33.9716 31.3639 33.9716ZM16.6361 33.9716C16.3724 33.9716 16.1146 33.8934 15.8954 33.7469C15.6761 33.6004 15.5052 33.3922 15.4043 33.1485C15.3034 32.9049 15.277 32.6368 15.3284 32.3782C15.3798 32.1195 15.5068 31.882 15.6933 31.6955C15.8798 31.509 16.1173 31.382 16.376 31.3306C16.6346 31.2791 16.9027 31.3055 17.1464 31.4065C17.39 31.5074 17.5982 31.6783 17.7447 31.8975C17.8912 32.1168 17.9694 32.3746 17.9694 32.6383C17.9694 32.9919 17.829 33.3311 17.5789 33.5811C17.3289 33.8312 16.9897 33.9716 16.6361 33.9716ZM31.8417 25.945L34.505 21.3339C34.5474 21.2707 34.5763 21.1995 34.5901 21.1247C34.6038 21.0499 34.6021 20.9731 34.5849 20.899C34.5678 20.8249 34.5356 20.7552 34.4904 20.694C34.4452 20.6329 34.3879 20.5816 34.3221 20.5435C34.2563 20.5054 34.1833 20.4812 34.1078 20.4725C34.0322 20.4637 33.9557 20.4705 33.8829 20.4925C33.8101 20.5145 33.7426 20.5513 33.6846 20.6004C33.6265 20.6496 33.5792 20.7101 33.5456 20.7783L30.8489 25.4489C28.6948 24.4828 26.3608 23.9833 24 23.9833C21.6392 23.9833 19.3052 24.4828 17.1511 25.4489L14.4544 20.7783C14.4208 20.7101 14.3735 20.6496 14.3154 20.6004C14.2574 20.5513 14.1899 20.5145 14.1171 20.4925C14.0443 20.4705 13.9678 20.4637 13.8922 20.4725C13.8167 20.4812 13.7438 20.5054 13.6779 20.5435C13.6121 20.5816 13.5548 20.6329 13.5096 20.694C13.4644 20.7552 13.4322 20.8249 13.4151 20.899C13.3979 20.9731 13.3962 21.0499 13.4099 21.1247C13.4237 21.1995 13.4526 21.2707 13.495 21.3339L16.1583 25.945C11.585 28.4322 8.45778 33.0616 8 38.5311H40C39.5422 33.0616 36.4144 28.4322 31.8417 25.945Z" fill={iconFill}/>
|
|
19
|
+
</g>
|
|
20
|
+
<path d="M56.47 12.07C56.1993 11.5007 55.8073 11.062 55.294 10.754C54.7807 10.4367 54.1833 10.278 53.502 10.278C52.8207 10.278 52.2047 10.4367 51.654 10.754C51.1127 11.062 50.6833 11.51 50.366 12.098C50.058 12.6767 49.904 13.3487 49.904 14.114C49.904 14.8793 50.058 15.5513 50.366 16.13C50.6833 16.7087 51.1127 17.1567 51.654 17.474C52.2047 17.782 52.8207 17.936 53.502 17.936C54.454 17.936 55.238 17.6513 55.854 17.082C56.47 16.5127 56.8293 15.7427 56.932 14.772H53.04V13.736H58.29V14.716C58.2153 15.5187 57.9633 16.256 57.534 16.928C57.1047 17.5907 56.54 18.118 55.84 18.51C55.14 18.8927 54.3607 19.084 53.502 19.084C52.5967 19.084 51.7707 18.874 51.024 18.454C50.2773 18.0247 49.6847 17.432 49.246 16.676C48.8167 15.92 48.602 15.066 48.602 14.114C48.602 13.162 48.8167 12.308 49.246 11.552C49.6847 10.7867 50.2773 10.194 51.024 9.774C51.7707 9.34467 52.5967 9.13 53.502 9.13C54.538 9.13 55.4527 9.38667 56.246 9.9C57.0487 10.4133 57.632 11.1367 57.996 12.07H56.47ZM66.9745 14.87C66.9745 15.1127 66.9605 15.3693 66.9325 15.64H60.8005C60.8472 16.396 61.1038 16.9887 61.5705 17.418C62.0465 17.838 62.6205 18.048 63.2925 18.048C63.8432 18.048 64.3005 17.922 64.6645 17.67C65.0378 17.4087 65.2992 17.0633 65.4485 16.634H66.8205C66.6152 17.3713 66.2045 17.9733 65.5885 18.44C64.9725 18.8973 64.2072 19.126 63.2925 19.126C62.5645 19.126 61.9112 18.9627 61.3325 18.636C60.7632 18.3093 60.3152 17.8473 59.9885 17.25C59.6618 16.6433 59.4985 15.9433 59.4985 15.15C59.4985 14.3567 59.6572 13.6613 59.9745 13.064C60.2918 12.4667 60.7352 12.0093 61.3045 11.692C61.8832 11.3653 62.5458 11.202 63.2925 11.202C64.0205 11.202 64.6645 11.3607 65.2245 11.678C65.7845 11.9953 66.2138 12.434 66.5125 12.994C66.8205 13.5447 66.9745 14.17 66.9745 14.87ZM65.6585 14.604C65.6585 14.1187 65.5512 13.7033 65.3365 13.358C65.1218 13.0033 64.8278 12.7373 64.4545 12.56C64.0905 12.3733 63.6845 12.28 63.2365 12.28C62.5925 12.28 62.0418 12.4853 61.5845 12.896C61.1365 13.3067 60.8798 13.876 60.8145 14.604H65.6585ZM70.2101 12.378V16.9C70.2101 17.2733 70.2895 17.5393 70.4481 17.698C70.6068 17.8473 70.8821 17.922 71.2741 17.922H72.2121V19H71.0641C70.3548 19 69.8228 18.8367 69.4681 18.51C69.1135 18.1833 68.9361 17.6467 68.9361 16.9V12.378H67.9421V11.328H68.9361V9.396H70.2101V11.328H72.2121V12.378H70.2101ZM78.1462 10.082C77.9035 10.082 77.6982 9.998 77.5302 9.83C77.3622 9.662 77.2782 9.45667 77.2782 9.214C77.2782 8.97133 77.3622 8.766 77.5302 8.598C77.6982 8.43 77.9035 8.346 78.1462 8.346C78.3795 8.346 78.5755 8.43 78.7342 8.598C78.9022 8.766 78.9862 8.97133 78.9862 9.214C78.9862 9.45667 78.9022 9.662 78.7342 9.83C78.5755 9.998 78.3795 10.082 78.1462 10.082ZM78.7622 11.328V19H77.4882V11.328H78.7622ZM82.4875 12.378V16.9C82.4875 17.2733 82.5668 17.5393 82.7255 17.698C82.8841 17.8473 83.1595 17.922 83.5515 17.922H84.4895V19H83.3415C82.6321 19 82.1001 18.8367 81.7455 18.51C81.3908 18.1833 81.2135 17.6467 81.2135 16.9V12.378H80.2195V11.328H81.2135V9.396H82.4875V11.328H84.4895V12.378H82.4875ZM93.1115 19.126C92.3928 19.126 91.7395 18.9627 91.1515 18.636C90.5728 18.3093 90.1155 17.8473 89.7795 17.25C89.4528 16.6433 89.2895 15.9433 89.2895 15.15C89.2895 14.366 89.4575 13.6753 89.7935 13.078C90.1388 12.4713 90.6055 12.0093 91.1935 11.692C91.7815 11.3653 92.4395 11.202 93.1675 11.202C93.8955 11.202 94.5535 11.3653 95.1415 11.692C95.7295 12.0093 96.1915 12.4667 96.5275 13.064C96.8728 13.6613 97.0455 14.3567 97.0455 15.15C97.0455 15.9433 96.8682 16.6433 96.5135 17.25C96.1682 17.8473 95.6968 18.3093 95.0995 18.636C94.5022 18.9627 93.8395 19.126 93.1115 19.126ZM93.1115 18.006C93.5688 18.006 93.9982 17.8987 94.3995 17.684C94.8008 17.4693 95.1228 17.1473 95.3655 16.718C95.6175 16.2887 95.7435 15.766 95.7435 15.15C95.7435 14.534 95.6222 14.0113 95.3795 13.582C95.1368 13.1527 94.8195 12.8353 94.4275 12.63C94.0355 12.4153 93.6108 12.308 93.1535 12.308C92.6868 12.308 92.2575 12.4153 91.8655 12.63C91.4828 12.8353 91.1748 13.1527 90.9415 13.582C90.7082 14.0113 90.5915 14.534 90.5915 15.15C90.5915 15.7753 90.7035 16.3027 90.9275 16.732C91.1608 17.1613 91.4688 17.4833 91.8515 17.698C92.2342 17.9033 92.6542 18.006 93.1115 18.006ZM102.459 11.188C103.392 11.188 104.148 11.4727 104.727 12.042C105.305 12.602 105.595 13.414 105.595 14.478V19H104.335V14.66C104.335 13.8947 104.143 13.3113 103.761 12.91C103.378 12.4993 102.855 12.294 102.193 12.294C101.521 12.294 100.984 12.504 100.583 12.924C100.191 13.344 99.9946 13.9553 99.9946 14.758V19H98.7206V11.328H99.9946V12.42C100.247 12.028 100.587 11.7247 101.017 11.51C101.455 11.2953 101.936 11.188 102.459 11.188Z" fill={textFill}/>
|
|
21
|
+
<path d="M57.88 44.16H52.06L51.06 47H48.68L53.66 33.08H56.3L61.28 47H58.88L57.88 44.16ZM57.24 42.3L54.98 35.84L52.7 42.3H57.24ZM69.0053 35.8C69.872 35.8 70.6453 35.98 71.3253 36.34C72.0186 36.7 72.5586 37.2333 72.9453 37.94C73.332 38.6467 73.5253 39.5 73.5253 40.5V47H71.2653V40.84C71.2653 39.8533 71.0186 39.1 70.5253 38.58C70.032 38.0467 69.3586 37.78 68.5053 37.78C67.652 37.78 66.972 38.0467 66.4653 38.58C65.972 39.1 65.7253 39.8533 65.7253 40.84V47H63.4453V35.98H65.7253V37.24C66.0986 36.7867 66.572 36.4333 67.1453 36.18C67.732 35.9267 68.352 35.8 69.0053 35.8ZM75.6736 41.44C75.6736 40.3333 75.9003 39.3533 76.3536 38.5C76.8203 37.6467 77.4469 36.9867 78.2336 36.52C79.0336 36.04 79.9203 35.8 80.8936 35.8C81.6136 35.8 82.3203 35.96 83.0136 36.28C83.7203 36.5867 84.2803 37 84.6936 37.52V32.2H86.9936V47H84.6936V45.34C84.3203 45.8733 83.8003 46.3133 83.1336 46.66C82.4803 47.0067 81.7269 47.18 80.8736 47.18C79.9136 47.18 79.0336 46.94 78.2336 46.46C77.4469 45.9667 76.8203 45.2867 76.3536 44.42C75.9003 43.54 75.6736 42.5467 75.6736 41.44ZM84.6936 41.48C84.6936 40.72 84.5336 40.06 84.2136 39.5C83.9069 38.94 83.5003 38.5133 82.9936 38.22C82.4869 37.9267 81.9403 37.78 81.3536 37.78C80.7669 37.78 80.2203 37.9267 79.7136 38.22C79.2069 38.5 78.7936 38.92 78.4736 39.48C78.1669 40.0267 78.0136 40.68 78.0136 41.44C78.0136 42.2 78.1669 42.8667 78.4736 43.44C78.7936 44.0133 79.2069 44.4533 79.7136 44.76C80.2336 45.0533 80.7803 45.2 81.3536 45.2C81.9403 45.2 82.4869 45.0533 82.9936 44.76C83.5003 44.4667 83.9069 44.04 84.2136 43.48C84.5336 42.9067 84.6936 42.24 84.6936 41.48ZM92.2683 37.58C92.6016 37.02 93.0416 36.5867 93.5883 36.28C94.1483 35.96 94.8083 35.8 95.5683 35.8V38.16H94.9883C94.0949 38.16 93.4149 38.3867 92.9483 38.84C92.4949 39.2933 92.2683 40.08 92.2683 41.2V47H89.9883V35.98H92.2683V37.58ZM102.444 47.18C101.404 47.18 100.464 46.9467 99.6241 46.48C98.7841 46 98.1241 45.3333 97.6441 44.48C97.1641 43.6133 96.9241 42.6133 96.9241 41.48C96.9241 40.36 97.1707 39.3667 97.6641 38.5C98.1574 37.6333 98.8307 36.9667 99.6841 36.5C100.537 36.0333 101.491 35.8 102.544 35.8C103.597 35.8 104.551 36.0333 105.404 36.5C106.257 36.9667 106.931 37.6333 107.424 38.5C107.917 39.3667 108.164 40.36 108.164 41.48C108.164 42.6 107.911 43.5933 107.404 44.46C106.897 45.3267 106.204 46 105.324 46.48C104.457 46.9467 103.497 47.18 102.444 47.18ZM102.444 45.2C103.031 45.2 103.577 45.06 104.084 44.78C104.604 44.5 105.024 44.08 105.344 43.52C105.664 42.96 105.824 42.28 105.824 41.48C105.824 40.68 105.671 40.0067 105.364 39.46C105.057 38.9 104.651 38.48 104.144 38.2C103.637 37.92 103.091 37.78 102.504 37.78C101.917 37.78 101.371 37.92 100.864 38.2C100.371 38.48 99.9774 38.9 99.6841 39.46C99.3907 40.0067 99.2441 40.68 99.2441 41.48C99.2441 42.6667 99.5441 43.5867 100.144 44.24C100.757 44.88 101.524 45.2 102.444 45.2ZM111.578 34.52C111.165 34.52 110.818 34.38 110.538 34.1C110.258 33.82 110.118 33.4733 110.118 33.06C110.118 32.6467 110.258 32.3 110.538 32.02C110.818 31.74 111.165 31.6 111.578 31.6C111.978 31.6 112.318 31.74 112.598 32.02C112.878 32.3 113.018 32.6467 113.018 33.06C113.018 33.4733 112.878 33.82 112.598 34.1C112.318 34.38 111.978 34.52 111.578 34.52ZM112.698 35.98V47H110.418V35.98H112.698ZM114.931 41.44C114.931 40.3333 115.158 39.3533 115.611 38.5C116.078 37.6467 116.705 36.9867 117.491 36.52C118.291 36.04 119.178 35.8 120.151 35.8C120.871 35.8 121.578 35.96 122.271 36.28C122.978 36.5867 123.538 37 123.951 37.52V32.2H126.251V47H123.951V45.34C123.578 45.8733 123.058 46.3133 122.391 46.66C121.738 47.0067 120.985 47.18 120.131 47.18C119.171 47.18 118.291 46.94 117.491 46.46C116.705 45.9667 116.078 45.2867 115.611 44.42C115.158 43.54 114.931 42.5467 114.931 41.44ZM123.951 41.48C123.951 40.72 123.791 40.06 123.471 39.5C123.165 38.94 122.758 38.5133 122.251 38.22C121.745 37.9267 121.198 37.78 120.611 37.78C120.025 37.78 119.478 37.9267 118.971 38.22C118.465 38.5 118.051 38.92 117.731 39.48C117.425 40.0267 117.271 40.68 117.271 41.44C117.271 42.2 117.425 42.8667 117.731 43.44C118.051 44.0133 118.465 44.4533 118.971 44.76C119.491 45.0533 120.038 45.2 120.611 45.2C121.198 45.2 121.745 45.0533 122.251 44.76C122.758 44.4667 123.165 44.04 123.471 43.48C123.791 42.9067 123.951 42.24 123.951 41.48Z" fill={textFill}/>
|
|
22
|
+
</svg>);
|
|
23
|
+
};
|
|
24
|
+
export default AndroidIcon;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from "react";
|
|
13
|
+
import AppleIcon from "./AppleIcon";
|
|
14
|
+
import PlayStoreIcon from "./PlayStoreIcon";
|
|
15
|
+
import AndroidIcon from "./AndroidIcon";
|
|
16
|
+
var AppIcon = function (_a) {
|
|
17
|
+
var name = _a.name, props = __rest(_a, ["name"]);
|
|
18
|
+
switch (name.toLowerCase()) {
|
|
19
|
+
case "apple":
|
|
20
|
+
return <AppleIcon {...props}/>;
|
|
21
|
+
case "playstore":
|
|
22
|
+
return <PlayStoreIcon {...props}/>;
|
|
23
|
+
case "android":
|
|
24
|
+
return <AndroidIcon {...props}/>;
|
|
25
|
+
default:
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export default AppIcon;
|