linkedunion-design-kit 1.11.6 → 1.11.8
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.d.ts +1 -1
- package/dist/app/{layout.js → layout.jsx} +3 -2
- package/dist/app/page.d.ts +1 -1
- package/dist/app/page.jsx +5 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/src/components/Accordion/Accordion.stories.jsx +33 -0
- package/dist/src/components/Accordion/accordion.d.ts +4 -4
- package/dist/src/components/Accordion/{accordion.js → accordion.jsx} +11 -16
- package/dist/src/components/Alerts/Alert/alert.d.ts +7 -7
- package/dist/src/components/Alerts/Alert/{alert.js → alert.jsx} +21 -25
- package/dist/src/components/Alerts/Alert/alert.stories.d.ts +8 -8
- package/dist/src/components/Alerts/Alert/alert.stories.jsx +344 -0
- package/dist/src/components/Alerts/AlertDialog/alert-dialog.d.ts +11 -11
- package/dist/src/components/Alerts/AlertDialog/{alert-dialog.js → alert-dialog.jsx} +26 -24
- package/dist/src/components/Alerts/AlertDialog/alert-dialog.stories.d.ts +10 -10
- 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.js → AppIcon.jsx} +4 -15
- 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.js → Avatar.jsx} +13 -18
- package/dist/src/components/Avatar/Avatar/Avatar.stories.d.ts +7 -7
- package/dist/src/components/Avatar/Avatar/Avatar.stories.jsx +95 -0
- package/dist/src/components/Avatar/Avatar/{Avatar.test.js → Avatar.test.jsx} +1 -2
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.d.ts +1 -1
- 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.d.ts +2 -2
- package/dist/src/components/Avatar/StatusIndicator/{StatusIndicator.stories.js → StatusIndicator.stories.jsx} +12 -3
- package/dist/src/components/Badge/Badge.d.ts +1 -1
- package/dist/src/components/Badge/{Badge.js → Badge.jsx} +8 -13
- package/dist/src/components/Badge/Badge.stories.d.ts +10 -10
- package/dist/src/components/Badge/Badge.stories.jsx +201 -0
- package/dist/src/components/Button/Button/Button.d.ts +3 -2
- package/dist/src/components/Button/Button/{Button.js → Button.jsx} +24 -8
- package/dist/src/components/Button/Button/Button.stories.d.ts +5 -3
- package/dist/src/components/Button/Button/{Button.stories.js → Button.stories.jsx} +1 -13
- package/dist/src/components/Button/Button/Button.test.jsx +73 -0
- package/dist/src/components/Button/IconButton/IconButton.d.ts +1 -1
- package/dist/src/components/Button/IconButton/{IconButton.js → IconButton.jsx} +4 -13
- package/dist/src/components/Button/IconButton/IconButton.stories.d.ts +1 -1
- package/dist/src/components/Button/IconButton/{IconButton.stories.js → IconButton.stories.jsx} +1 -13
- package/dist/src/components/Button/IconButton/{IconButton.test.js → IconButton.test.jsx} +5 -6
- package/dist/src/components/Button/index.d.ts +1 -0
- package/dist/src/components/Button/index.js +3 -2
- package/dist/src/components/Card/MultipleNews/MultiNews.d.ts +1 -1
- package/dist/src/components/Card/MultipleNews/MultiNews.jsx +71 -0
- package/dist/src/components/Card/MultipleNews/{MultiNews.stories.js → MultiNews.stories.jsx} +1 -2
- package/dist/src/components/Card/PostByCategory/PostByCategory.d.ts +1 -1
- package/dist/src/components/Card/PostByCategory/PostByCategory.jsx +57 -0
- package/dist/src/components/Card/PostByCategory/{PostByCategory.stories.js → PostByCategory.stories.jsx} +1 -2
- package/dist/src/components/Card/SinglePost/SinglePost.d.ts +1 -1
- package/dist/src/components/Card/SinglePost/SinglePost.jsx +26 -0
- package/dist/src/components/Card/card.d.ts +2 -1
- package/dist/src/components/Card/{card.js → card.jsx} +2 -13
- package/dist/src/components/Card/contactProfile/ContactProfile.d.ts +1 -1
- package/dist/src/components/Card/contactProfile/ContactProfile.jsx +76 -0
- package/dist/src/components/Card/contactProfile/{ContactProfile.stories.js → ContactProfile.stories.jsx} +1 -2
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.d.ts +1 -1
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.jsx +41 -0
- package/dist/src/components/Card/photoAlbum/{PhotoAlbum.stories.js → PhotoAlbum.stories.jsx} +1 -13
- package/dist/src/components/Card/photoGallery/PhotoGallery.d.ts +1 -1
- package/dist/src/components/Card/photoGallery/PhotoGallery.jsx +17 -0
- package/dist/src/components/Card/photoGallery/{PhotoGallery.stories.js → PhotoGallery.stories.jsx} +1 -13
- package/dist/src/components/Checkbox/checkbox.d.ts +1 -1
- package/dist/src/components/Checkbox/{checkbox.js → checkbox.jsx} +6 -13
- package/dist/src/components/Checkbox/checkbox.stories.jsx +113 -0
- package/dist/src/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/dist/src/components/ColorPicker/{ColorPicker.js → ColorPicker.jsx} +6 -13
- package/dist/src/components/ColorPicker/ColorPicker.stories.d.ts +5 -5
- package/dist/src/components/ColorPicker/ColorPicker.stories.jsx +138 -0
- package/dist/src/components/Colors/color.d.ts +1 -1
- package/dist/src/components/Colors/{color.js → color.jsx} +1 -2
- package/dist/src/components/Colors/color.stories.jsx +20 -0
- package/dist/src/components/Colors/{color.test.js → color.test.jsx} +3 -4
- package/dist/src/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/src/components/DatePicker/DatePicker.jsx +67 -0
- package/dist/src/components/DatePicker/DatePicker.stories.d.ts +9 -9
- package/dist/src/components/DatePicker/DatePicker.stories.jsx +291 -0
- package/dist/src/components/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/dist/src/components/DateRangePicker/{DateRangePicker.js → DateRangePicker.jsx} +92 -44
- package/dist/src/components/DateRangePicker/DateRangePicker.stories.d.ts +19 -19
- package/dist/src/components/DateRangePicker/DateRangePicker.stories.jsx +582 -0
- package/dist/src/components/Dropdown/Combobox/Combobox.d.ts +1 -1
- package/dist/src/components/Dropdown/Combobox/{Combobox.js → Combobox.jsx} +67 -29
- package/dist/src/components/Dropdown/Combobox/Combobox.stories.d.ts +8 -8
- package/dist/src/components/Dropdown/Combobox/Combobox.stories.jsx +289 -0
- package/dist/src/components/Dropdown/Combobox/dialog.d.ts +10 -10
- package/dist/src/components/Dropdown/Combobox/dialog.jsx +66 -0
- package/dist/src/components/Dropdown/Combobox/utils/renderBadge.jsx +7 -0
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.d.ts +7 -3
- package/dist/src/components/Dropdown/DropdownMenu/{DropdownMenu.js → DropdownMenu.jsx} +29 -22
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.d.ts +19 -12
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.jsx +552 -0
- package/dist/src/components/Dropdown/DropdownMenu/SelectAllSection.jsx +19 -0
- package/dist/src/components/Dropdown/DropdownMenu/index.d.ts +5 -0
- package/dist/src/components/Dropdown/DropdownMenu/index.js +5 -0
- package/dist/src/components/Dropdown/Select.stories.d.ts +7 -6
- package/dist/src/components/Dropdown/{Select.stories.js → Select.stories.jsx} +71 -8
- package/dist/src/components/Dropdown/select.d.ts +10 -10
- package/dist/src/components/Dropdown/select.jsx +94 -0
- package/dist/src/components/Icons/LUIcon.d.ts +1 -1
- package/dist/src/components/Icons/{LUIcon.js → LUIcon.jsx} +10 -13
- 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.d.ts +5 -5
- package/dist/src/components/Icons/stories/{LUIcon.stories.js → LUIcon.stories.jsx} +23 -8
- package/dist/src/components/ImageUploader/imageUploader.d.ts +1 -1
- package/dist/src/components/ImageUploader/{imageUploader.js → imageUploader.jsx} +28 -13
- package/dist/src/components/Images/LuImage.d.ts +1 -1
- package/dist/src/components/Images/{LuImage.js → LuImage.jsx} +1 -13
- package/dist/src/components/Images/{LuImage.stories.js → LuImage.stories.jsx} +1 -13
- package/dist/src/components/Images/{LuImage.test.js → LuImage.test.jsx} +6 -18
- package/dist/src/components/Input/Input.stories.d.ts +9 -8
- package/dist/src/components/Input/Input.stories.jsx +250 -0
- package/dist/src/components/Input/input.d.ts +1 -1
- package/dist/src/components/Input/{input.js → input.jsx} +10 -13
- package/dist/src/components/Label/Label.d.ts +1 -1
- package/dist/src/components/Label/{Label.js → Label.jsx} +2 -13
- package/dist/src/components/Label/{Label.stories.js → Label.stories.jsx} +1 -13
- package/dist/src/components/Modal/Modal.d.ts +3 -3
- package/dist/src/components/Modal/{Modal.js → Modal.jsx} +20 -19
- package/dist/src/components/Modal/Modal.stories.d.ts +15 -15
- package/dist/src/components/Modal/Modal.stories.jsx +487 -0
- package/dist/src/components/Pagination/pagination.d.ts +5 -5
- package/dist/src/components/Pagination/{pagination.js → pagination.jsx} +18 -21
- package/dist/src/components/Pagination/pagination.stories.d.ts +6 -6
- package/dist/src/components/Pagination/pagination.stories.jsx +301 -0
- package/dist/src/components/RadioGroup/{RadioGroup.stories.js → RadioGroup.stories.jsx} +52 -22
- package/dist/src/components/RadioGroup/radio-group.d.ts +1 -1
- package/dist/src/components/RadioGroup/{radio-group.js → radio-group.jsx} +6 -14
- package/dist/src/components/Separator/Separator.stories.d.ts +15 -0
- package/dist/src/components/Separator/Separator.stories.jsx +94 -0
- package/dist/src/components/Separator/index.d.ts +1 -0
- package/dist/src/components/Separator/index.js +1 -0
- package/dist/src/components/Separator/separator.d.ts +4 -0
- package/dist/src/components/Separator/separator.jsx +20 -0
- package/dist/src/components/Sheet/index.d.ts +1 -0
- package/dist/src/components/Sheet/index.js +1 -0
- package/dist/src/components/Sheet/sheet.d.ts +25 -0
- package/dist/src/components/Sheet/sheet.jsx +73 -0
- package/dist/src/components/Sheet/sheet.stories.d.ts +4 -0
- package/dist/src/components/Sheet/sheet.stories.jsx +34 -0
- package/dist/src/components/Skeleton/skeleton.d.ts +14 -14
- package/dist/src/components/Skeleton/{skeleton.js → skeleton.jsx} +23 -27
- package/dist/src/components/Skeleton/skeleton.stories.d.ts +14 -14
- package/dist/src/components/Skeleton/skeleton.stories.jsx +734 -0
- package/dist/src/components/Slider/slider.d.ts +1 -1
- package/dist/src/components/Slider/slider.jsx +31 -0
- package/dist/src/components/SweetAlert/SweetAlert.d.ts +9 -9
- package/dist/src/components/SweetAlert/{SweetAlert.js → SweetAlert.jsx} +18 -21
- package/dist/src/components/SweetAlert/SweetAlert.stories.d.ts +7 -7
- package/dist/src/components/SweetAlert/{SweetAlert.stories.js → SweetAlert.stories.jsx} +215 -15
- package/dist/src/components/Switch/{Switch.stories.js → Switch.stories.jsx} +1 -13
- package/dist/src/components/Switch/switch.d.ts +1 -1
- package/dist/src/components/Switch/{switch.js → switch.jsx} +4 -13
- package/dist/src/components/Table/{Table.js → Table.jsx} +111 -58
- package/dist/src/components/Table/Table.stories.d.ts +13 -13
- package/dist/src/components/Table/{Table.stories.js → Table.stories.jsx} +299 -45
- package/dist/src/components/Table/{Table.test.js → Table.test.jsx} +39 -7
- package/dist/src/components/Tabs/{Tabs.stories.js → Tabs.stories.jsx} +10 -3
- package/dist/src/components/Tabs/tabs.d.ts +4 -4
- package/dist/src/components/Tabs/tabs.jsx +32 -0
- package/dist/src/components/TimePicker/TimePicker.d.ts +1 -1
- package/dist/src/components/TimePicker/{TimePicker.js → TimePicker.jsx} +54 -30
- package/dist/src/components/TimePicker/TimePicker.stories.d.ts +10 -10
- package/dist/src/components/TimePicker/TimePicker.stories.jsx +298 -0
- package/dist/src/components/Title/Title.d.ts +1 -1
- package/dist/src/components/Title/{Title.js → Title.jsx} +2 -2
- package/dist/src/components/Title/{Title.stories.js → Title.stories.jsx} +1 -13
- package/dist/src/components/Title/{Title.test.js → Title.test.jsx} +4 -5
- package/dist/src/components/ToolTip/Tooltip.d.ts +1 -1
- package/dist/src/components/ToolTip/Tooltip.jsx +18 -0
- package/dist/src/components/ToolTip/{Tooltip.stories.js → Tooltip.stories.jsx} +2 -14
- package/dist/src/components/Typography/Body/{Body.stories.js → Body.stories.jsx} +1 -13
- package/dist/src/components/Typography/Body/body.d.ts +1 -1
- package/dist/src/components/Typography/Body/{body.js → body.jsx} +4 -13
- package/dist/src/components/Typography/Caption/{Caption.stories.js → Caption.stories.jsx} +1 -13
- package/dist/src/components/Typography/Caption/caption.d.ts +1 -1
- package/dist/src/components/Typography/Caption/{caption.js → caption.jsx} +4 -13
- package/dist/src/components/Typography/Display/{Display.stories.js → Display.stories.jsx} +1 -13
- package/dist/src/components/Typography/Display/display.d.ts +1 -1
- package/dist/src/components/Typography/Display/{display.js → display.jsx} +4 -13
- package/dist/src/components/Typography/Heading/Heading.stories.d.ts +6 -6
- package/dist/src/components/Typography/Heading/Heading.stories.jsx +85 -0
- package/dist/src/components/Typography/Heading/{heading.js → heading.jsx} +5 -14
- package/dist/src/components/VerticalTabs/{VerticalTabs.js → VerticalTabs.jsx} +9 -17
- package/dist/src/components/VerticalTabs/VerticalTabs.stories.jsx +154 -0
- package/dist/src/components/VerticalTabs/VerticalTabs.test.jsx +97 -0
- package/dist/src/components/ui/calendar.d.ts +2 -2
- package/dist/src/components/ui/{calendar.js → calendar.jsx} +36 -22
- package/dist/src/components/ui/command.d.ts +9 -9
- package/dist/src/components/ui/command.jsx +67 -0
- package/dist/src/components/ui/popover.d.ts +4 -4
- package/dist/src/components/ui/popover.jsx +33 -0
- package/dist/src/components/ui/tooltip.d.ts +4 -4
- package/dist/src/components/ui/tooltip.jsx +38 -0
- package/dist/src/components/ui/typography.d.ts +1 -1
- package/dist/src/components/ui/{typography.js → typography.jsx} +4 -13
- package/dist/styles/global.css +107 -5
- package/package.json +4 -3
- package/dist/app/page.js +0 -4
- package/dist/src/components/Accordion/Accordion.stories.js +0 -32
- package/dist/src/components/Alerts/Alert/alert.stories.js +0 -166
- package/dist/src/components/Alerts/AlertDialog/alert-dialog.stories.js +0 -213
- package/dist/src/components/AppIcons/AndroidIcon.js +0 -28
- package/dist/src/components/AppIcons/AppleIcon.js +0 -28
- package/dist/src/components/AppIcons/PlayStoreIcon.js +0 -28
- package/dist/src/components/Avatar/Avatar/Avatar.stories.js +0 -69
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.js +0 -8
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.stories.js +0 -14
- package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.js +0 -18
- package/dist/src/components/Badge/Badge.stories.js +0 -145
- package/dist/src/components/Button/Button/Button.test.js +0 -10
- package/dist/src/components/Card/MultipleNews/MultiNews.js +0 -46
- package/dist/src/components/Card/PostByCategory/PostByCategory.js +0 -37
- package/dist/src/components/Card/SinglePost/SinglePost.js +0 -10
- package/dist/src/components/Card/contactProfile/ContactProfile.js +0 -39
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.js +0 -16
- package/dist/src/components/Card/photoGallery/PhotoGallery.js +0 -8
- package/dist/src/components/Checkbox/checkbox.stories.js +0 -78
- package/dist/src/components/ColorPicker/ColorPicker.stories.js +0 -77
- package/dist/src/components/Colors/color.stories.js +0 -32
- package/dist/src/components/DatePicker/DatePicker.js +0 -64
- package/dist/src/components/DatePicker/DatePicker.stories.js +0 -171
- package/dist/src/components/DateRangePicker/DateRangePicker.stories.js +0 -318
- package/dist/src/components/Dropdown/Combobox/Combobox.stories.js +0 -225
- package/dist/src/components/Dropdown/Combobox/dialog.js +0 -68
- package/dist/src/components/Dropdown/Combobox/utils/renderBadge.js +0 -5
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.js +0 -253
- package/dist/src/components/Dropdown/DropdownMenu/SelectAllSection.js +0 -9
- package/dist/src/components/Dropdown/select.js +0 -87
- package/dist/src/components/Icons/stories/IconDropdown.js +0 -38
- package/dist/src/components/Icons/stories/IconGallery.js +0 -31
- package/dist/src/components/Icons/stories/InteractiveIconSelector.js +0 -26
- package/dist/src/components/Input/Input.stories.js +0 -133
- package/dist/src/components/Modal/Modal.stories.js +0 -115
- package/dist/src/components/Pagination/pagination.stories.js +0 -168
- package/dist/src/components/Skeleton/skeleton.stories.js +0 -414
- package/dist/src/components/Slider/slider.js +0 -38
- package/dist/src/components/Tabs/tabs.js +0 -43
- package/dist/src/components/TimePicker/TimePicker.stories.js +0 -176
- package/dist/src/components/ToolTip/Tooltip.js +0 -8
- package/dist/src/components/Typography/Heading/Heading.stories.js +0 -67
- package/dist/src/components/VerticalTabs/VerticalTabs.stories.js +0 -100
- package/dist/src/components/VerticalTabs/VerticalTabs.test.js +0 -48
- package/dist/src/components/ui/command.js +0 -65
- package/dist/src/components/ui/popover.js +0 -42
- package/dist/src/components/ui/tooltip.js +0 -42
- /package/dist/src/components/AppIcons/{AppIcon.stories.js → AppIcon.stories.jsx} +0 -0
- /package/dist/src/components/Card/SinglePost/{SinglePost.stories.js → SinglePost.stories.jsx} +0 -0
- /package/dist/src/components/Icons/{LUIcon.test.js → LUIcon.test.jsx} +0 -0
- /package/dist/src/components/ImageUploader/{ImageUploader.stories.js → ImageUploader.stories.jsx} +0 -0
- /package/dist/src/components/Slider/{Slider.stories.js → Slider.stories.jsx} +0 -0
- /package/dist/src/components/ui/{collapsible.js → collapsible.jsx} +0 -0
package/dist/app/layout.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { Inter } from "next/font/google";
|
|
3
2
|
import "@/styles/globals.css";
|
|
4
3
|
var inter = Inter({ subsets: ["latin"] });
|
|
@@ -8,5 +7,7 @@ export var metadata = {
|
|
|
8
7
|
};
|
|
9
8
|
export default function RootLayout(_a) {
|
|
10
9
|
var children = _a.children;
|
|
11
|
-
return (
|
|
10
|
+
return (<html lang="en">
|
|
11
|
+
<body className={inter.className}>{children}</body>
|
|
12
|
+
</html>);
|
|
12
13
|
}
|
package/dist/app/page.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function Home(): import("react
|
|
1
|
+
export default function Home(): import("react").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -37,3 +37,6 @@ export { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, Dialog
|
|
|
37
37
|
export { DatePicker } from "./src/components/DatePicker/DatePicker";
|
|
38
38
|
export { DateRangePicker } from "./src/components/DateRangePicker/DateRangePicker";
|
|
39
39
|
export { TimePicker } from "./src/components/TimePicker/TimePicker";
|
|
40
|
+
export * from "./src/components/Sheet";
|
|
41
|
+
export * from "./src/components/Separator";
|
|
42
|
+
export { SweetAlert, SweetAlertTrigger, SweetAlertContent, SweetAlertFooter, SweetAlertTitle, SweetAlertDescription, SweetAlertAction, SweetAlertCancel, SweetAlertIcon, } from "./src/components/SweetAlert/SweetAlert";
|
package/dist/index.js
CHANGED
|
@@ -36,3 +36,6 @@ export { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, Dialog
|
|
|
36
36
|
export { DatePicker } from "./src/components/DatePicker/DatePicker";
|
|
37
37
|
export { DateRangePicker } from "./src/components/DateRangePicker/DateRangePicker";
|
|
38
38
|
export { TimePicker } from "./src/components/TimePicker/TimePicker";
|
|
39
|
+
export * from "./src/components/Sheet";
|
|
40
|
+
export * from "./src/components/Separator";
|
|
41
|
+
export { SweetAlert, SweetAlertTrigger, SweetAlertContent, SweetAlertFooter, SweetAlertTitle, SweetAlertDescription, SweetAlertAction, SweetAlertCancel, SweetAlertIcon, } from "./src/components/SweetAlert/SweetAlert";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "../../components/Accordion/accordion";
|
|
2
|
+
import ColorPicker from "../ColorPicker/ColorPicker";
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/Accordion",
|
|
5
|
+
component: Accordion,
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
};
|
|
8
|
+
var Template = function (args) { return (<Accordion type="single" collapsible defaultValue="menus" {...args}></Accordion>); };
|
|
9
|
+
export var _Accordion = Template.bind({});
|
|
10
|
+
_Accordion.args = {
|
|
11
|
+
children: (<>
|
|
12
|
+
<AccordionItem value="menus">
|
|
13
|
+
<AccordionTrigger>Menus</AccordionTrigger>
|
|
14
|
+
<AccordionContent>
|
|
15
|
+
<ColorPicker value="#000000" onChange={function () { return console.log("color"); }}/>
|
|
16
|
+
</AccordionContent>
|
|
17
|
+
</AccordionItem>
|
|
18
|
+
<AccordionItem value="second">
|
|
19
|
+
<AccordionTrigger>Menus</AccordionTrigger>
|
|
20
|
+
<AccordionContent>
|
|
21
|
+
<ColorPicker value="#000000" onChange={function () { return console.log("color"); }}/>
|
|
22
|
+
</AccordionContent>
|
|
23
|
+
</AccordionItem>
|
|
24
|
+
</>),
|
|
25
|
+
};
|
|
26
|
+
_Accordion.argTypes = {
|
|
27
|
+
children: {
|
|
28
|
+
description: "Pass `AccordionItem` components as children. Each item includes an `AccordionTrigger` (the clickable label) and `AccordionContent` (collapsible body). You can customize both with any valid React nodes \n\nFor more details and usage examples, refer to the [ShadCN Accordion documentation](https://ui.shadcn.com/docs/components/accordion).",
|
|
29
|
+
table: {
|
|
30
|
+
type: { summary: "React.ReactNode" },
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
3
|
-
declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>):
|
|
4
|
-
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>):
|
|
5
|
-
declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>):
|
|
6
|
-
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>):
|
|
3
|
+
declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): React.JSX.Element;
|
|
5
|
+
declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): React.JSX.Element;
|
|
6
|
+
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): React.JSX.Element;
|
|
7
7
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
2
|
var t = {};
|
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -20,18 +9,17 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
9
|
}
|
|
21
10
|
return t;
|
|
22
11
|
};
|
|
23
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
12
|
import * as React from "react";
|
|
25
13
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
26
14
|
import { cn } from "../../lib/utils";
|
|
27
15
|
import LUIcon from "../Icons/LUIcon";
|
|
28
16
|
function Accordion(_a) {
|
|
29
17
|
var props = __rest(_a, []);
|
|
30
|
-
return
|
|
18
|
+
return <AccordionPrimitive.Root data-slot="accordion" {...props}/>;
|
|
31
19
|
}
|
|
32
20
|
function AccordionItem(_a) {
|
|
33
21
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
34
|
-
return (
|
|
22
|
+
return (<AccordionPrimitive.Item data-slot="accordion-item" className={cn("!py-5 !border-b last:!border-b !border-gray-100", className)} {...props}/>);
|
|
35
23
|
}
|
|
36
24
|
function AccordionTrigger(_a) {
|
|
37
25
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
@@ -55,10 +43,17 @@ function AccordionTrigger(_a) {
|
|
|
55
43
|
}
|
|
56
44
|
return function () { return observer.disconnect(); };
|
|
57
45
|
}, []);
|
|
58
|
-
return (
|
|
46
|
+
return (<AccordionPrimitive.Header className="flex">
|
|
47
|
+
<AccordionPrimitive.Trigger ref={ref} data-slot="accordion-trigger" className={cn("flex items-center gap-2 cursor-pointer !text-sm !font-normal !leading-normal grow m-0", className)} {...props}>
|
|
48
|
+
<LUIcon color="light-gray" icon={isOpen ? "minus" : "plus"} size="md" className="pointer-events-none shrink-0"/>
|
|
49
|
+
{children}
|
|
50
|
+
</AccordionPrimitive.Trigger>
|
|
51
|
+
</AccordionPrimitive.Header>);
|
|
59
52
|
}
|
|
60
53
|
function AccordionContent(_a) {
|
|
61
54
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
62
|
-
return (
|
|
55
|
+
return (<AccordionPrimitive.Content data-slot="accordion-content" className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down !overflow-visible !text-sm !py-2" {...props}>
|
|
56
|
+
<div className={cn(className)}>{children}</div>
|
|
57
|
+
</AccordionPrimitive.Content>);
|
|
63
58
|
}
|
|
64
59
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -9,10 +9,10 @@ export declare const alertVariants: (props?: ({
|
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
10
|
export interface AlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color">, VariantProps<typeof alertVariants> {
|
|
11
11
|
}
|
|
12
|
-
export declare function Alert({ className, size, shadow, color, variant, ...props }: AlertProps):
|
|
13
|
-
export declare function AlertHeader({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>):
|
|
14
|
-
export declare function AlertTitle({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>):
|
|
15
|
-
export declare function AlertDescription({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>):
|
|
16
|
-
export declare function AlertFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>):
|
|
17
|
-
export declare const AlertAction: ({ className, color: colorProp, ...props }: React.ComponentProps<typeof Button>) =>
|
|
18
|
-
export declare const AlertCancel: ({ className, color: colorProp, ...props }: React.ComponentProps<typeof Button>) =>
|
|
12
|
+
export declare function Alert({ className, size, shadow, color, variant, ...props }: AlertProps): React.JSX.Element;
|
|
13
|
+
export declare function AlertHeader({ className, children, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
14
|
+
export declare function AlertTitle({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>): React.JSX.Element;
|
|
15
|
+
export declare function AlertDescription({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>): React.JSX.Element;
|
|
16
|
+
export declare function AlertFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
17
|
+
export declare const AlertAction: ({ className, color: colorProp, ...props }: React.ComponentProps<typeof Button>) => React.JSX.Element;
|
|
18
|
+
export declare const AlertCancel: ({ className, color: colorProp, ...props }: React.ComponentProps<typeof Button>) => React.JSX.Element;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
3
|
var t = {};
|
|
15
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -21,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
10
|
}
|
|
22
11
|
return t;
|
|
23
12
|
};
|
|
24
|
-
import
|
|
13
|
+
import * as React from "react";
|
|
25
14
|
import { createContext, useContext, Children, isValidElement, cloneElement, } from "react";
|
|
26
15
|
import { cva } from "class-variance-authority";
|
|
27
16
|
import { cn } from "../../../lib/utils";
|
|
@@ -95,12 +84,14 @@ var AlertContext = createContext({});
|
|
|
95
84
|
var useAlertContext = function () { return useContext(AlertContext); };
|
|
96
85
|
export function Alert(_a) {
|
|
97
86
|
var className = _a.className, size = _a.size, shadow = _a.shadow, color = _a.color, variant = _a.variant, props = __rest(_a, ["className", "size", "shadow", "color", "variant"]);
|
|
98
|
-
return (
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
87
|
+
return (<AlertContext.Provider value={{ color: color || undefined }}>
|
|
88
|
+
<div data-slot="inline-alert" className={cn(alertVariants({
|
|
89
|
+
size: size,
|
|
90
|
+
shadow: shadow,
|
|
91
|
+
color: color,
|
|
92
|
+
variant: variant,
|
|
93
|
+
}), className)} {...props}/>
|
|
94
|
+
</AlertContext.Provider>);
|
|
104
95
|
}
|
|
105
96
|
export function AlertHeader(_a) {
|
|
106
97
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
@@ -125,33 +116,38 @@ export function AlertHeader(_a) {
|
|
|
125
116
|
otherChildren_1.push(child);
|
|
126
117
|
}
|
|
127
118
|
});
|
|
128
|
-
return (
|
|
119
|
+
return (<div data-slot="alert-dialog-header" className={cn("flex flex-row gap-3 items-start text-left", className)} {...props}>
|
|
120
|
+
{iconWithClass_1}
|
|
121
|
+
<div>{otherChildren_1}</div>
|
|
122
|
+
</div>);
|
|
129
123
|
}
|
|
130
|
-
return (
|
|
124
|
+
return (<div data-slot="alert-dialog-header" className={cn("flex flex-col gap-2 text-center sm:text-left", className)} {...props}>
|
|
125
|
+
{children}
|
|
126
|
+
</div>);
|
|
131
127
|
}
|
|
132
128
|
export function AlertTitle(_a) {
|
|
133
129
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
134
|
-
return (
|
|
130
|
+
return (<h2 data-slot="alert-dialog-title" className={cn("text-lg font-semibold", className)} {...props}/>);
|
|
135
131
|
}
|
|
136
132
|
export function AlertDescription(_a) {
|
|
137
133
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
138
|
-
return (
|
|
134
|
+
return (<p data-slot="alert-dialog-description" className={cn("text-black text-sm", className)} {...props}/>);
|
|
139
135
|
}
|
|
140
136
|
export function AlertFooter(_a) {
|
|
141
137
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
142
|
-
return (
|
|
138
|
+
return (<div data-slot="alert-dialog-footer" className={cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className)} {...props}/>);
|
|
143
139
|
}
|
|
144
140
|
// Also create a simple button component that matches the style of AlertDialogAction
|
|
145
141
|
export var AlertAction = function (_a) {
|
|
146
142
|
var className = _a.className, colorProp = _a.color, props = __rest(_a, ["className", "color"]);
|
|
147
143
|
var contextColor = useAlertContext().color;
|
|
148
144
|
var color = colorProp || contextColor || undefined;
|
|
149
|
-
return (
|
|
145
|
+
return (<Button variant="link" color={color} data-slot="alert-dialog-action" className={cn("h-auto p-0", className)} {...props}/>);
|
|
150
146
|
};
|
|
151
147
|
// And a cancel button that matches AlertDialogCancel
|
|
152
148
|
export var AlertCancel = function (_a) {
|
|
153
149
|
var className = _a.className, colorProp = _a.color, props = __rest(_a, ["className", "color"]);
|
|
154
150
|
var contextColor = useAlertContext().color;
|
|
155
151
|
var color = colorProp || contextColor || undefined;
|
|
156
|
-
return (
|
|
152
|
+
return (<Button variant="link" color={color} data-slot="alert-dialog-cancel" className={cn("h-auto p-0", className)} {...props}/>);
|
|
157
153
|
};
|
|
@@ -3,7 +3,7 @@ declare const _default: Meta;
|
|
|
3
3
|
export default _default;
|
|
4
4
|
export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, any>;
|
|
5
5
|
export declare const Example: {
|
|
6
|
-
(): import("react
|
|
6
|
+
(): import("react").JSX.Element;
|
|
7
7
|
parameters: {
|
|
8
8
|
docs: {
|
|
9
9
|
description: {
|
|
@@ -12,14 +12,14 @@ export declare const Example: {
|
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
|
-
export declare const AllColors: () => import("react
|
|
16
|
-
export declare const AllSizes: () => import("react
|
|
17
|
-
export declare const Variants: () => import("react
|
|
18
|
-
export declare const ComparisonWithAlertDialog: () => import("react
|
|
19
|
-
export declare const NoButtons: () => import("react
|
|
20
|
-
export declare const WithShadow: () => import("react
|
|
15
|
+
export declare const AllColors: () => import("react").JSX.Element;
|
|
16
|
+
export declare const AllSizes: () => import("react").JSX.Element;
|
|
17
|
+
export declare const Variants: () => import("react").JSX.Element;
|
|
18
|
+
export declare const ComparisonWithAlertDialog: () => import("react").JSX.Element;
|
|
19
|
+
export declare const NoButtons: () => import("react").JSX.Element;
|
|
20
|
+
export declare const WithShadow: () => import("react").JSX.Element;
|
|
21
21
|
export declare const CustomizeAlert: {
|
|
22
|
-
(): import("react
|
|
22
|
+
(): import("react").JSX.Element;
|
|
23
23
|
parameters: {
|
|
24
24
|
docs: {
|
|
25
25
|
description: {
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { Alert, AlertAction, AlertCancel, AlertHeader, AlertTitle, AlertDescription, AlertFooter, colorOptions, sizeOptions, shadowOptions, variantOptions, getIconForColor, getContentForColor, } from "../AlertDialog/index";
|
|
2
|
+
import LUIcon from "../../Icons/LUIcon";
|
|
3
|
+
import { Button } from "../../Button/Button/Button";
|
|
4
|
+
import { Heading } from "../../Typography/Heading/heading";
|
|
5
|
+
import { Body } from "../../Typography/Body/body";
|
|
6
|
+
export default {
|
|
7
|
+
title: "Components/Alert/Alert",
|
|
8
|
+
component: Alert,
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
parameters: {
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component: "A non-modal alert component that uses the same styling as AlertDialog but renders directly in the page flow without requiring a dialog context.",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
// Template for stories with args
|
|
19
|
+
var Template = function (args) { return (<Alert size={args.size} shadow={args.shadow} color={args.color} variant={args.variant}>
|
|
20
|
+
<AlertHeader>
|
|
21
|
+
{args.Icon && <LUIcon icon={args.Icon} variant="padded"/>}
|
|
22
|
+
<AlertTitle>{args.title}</AlertTitle>
|
|
23
|
+
<AlertDescription>{args.description}</AlertDescription>
|
|
24
|
+
</AlertHeader>
|
|
25
|
+
<AlertFooter>
|
|
26
|
+
{args.showCancel && (<AlertCancel onClick={function () { return alert("Cancel clicked"); }} className="text-blue-600 hover:text-blue-700 hover:underline">
|
|
27
|
+
{args.cancelText}
|
|
28
|
+
</AlertCancel>)}
|
|
29
|
+
{args.showAction && (<AlertAction onClick={function () { return alert("Action clicked"); }} className="text-blue-600 hover:text-blue-700 hover:underline">
|
|
30
|
+
{args.actionText}
|
|
31
|
+
</AlertAction>)}
|
|
32
|
+
</AlertFooter>
|
|
33
|
+
</Alert>); };
|
|
34
|
+
// Default story with all controls
|
|
35
|
+
export var Default = Template.bind({});
|
|
36
|
+
Default.args = {
|
|
37
|
+
size: "md",
|
|
38
|
+
shadow: "none",
|
|
39
|
+
color: "blue",
|
|
40
|
+
variant: "outline",
|
|
41
|
+
Icon: "info",
|
|
42
|
+
title: "Update Available",
|
|
43
|
+
description: "A new version of the application is available. Would you like to update now? The update includes bug fixes and performance improvements.",
|
|
44
|
+
cancelText: "Later",
|
|
45
|
+
actionText: "Update Now",
|
|
46
|
+
showCancel: true,
|
|
47
|
+
showAction: true,
|
|
48
|
+
};
|
|
49
|
+
Default.argTypes = {
|
|
50
|
+
size: {
|
|
51
|
+
control: { type: "select" },
|
|
52
|
+
options: sizeOptions,
|
|
53
|
+
description: "Size variant for Alert",
|
|
54
|
+
table: {
|
|
55
|
+
defaultValue: { summary: "md" },
|
|
56
|
+
type: { summary: "enum" },
|
|
57
|
+
category: "Alert",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
shadow: {
|
|
61
|
+
control: { type: "select" },
|
|
62
|
+
options: shadowOptions,
|
|
63
|
+
description: "Shadow variant for Alert",
|
|
64
|
+
table: {
|
|
65
|
+
defaultValue: { summary: "none" },
|
|
66
|
+
type: { summary: "enum" },
|
|
67
|
+
category: "Alert",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
color: {
|
|
71
|
+
control: { type: "select" },
|
|
72
|
+
options: colorOptions,
|
|
73
|
+
description: "Color theme for Alert",
|
|
74
|
+
table: {
|
|
75
|
+
defaultValue: { summary: "blue" },
|
|
76
|
+
type: { summary: "enum" },
|
|
77
|
+
category: "Alert",
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
variant: {
|
|
81
|
+
control: { type: "select" },
|
|
82
|
+
options: variantOptions,
|
|
83
|
+
description: "Variant for Alert (outline | fill)",
|
|
84
|
+
table: {
|
|
85
|
+
defaultValue: { summary: "outline" },
|
|
86
|
+
type: { summary: "enum" },
|
|
87
|
+
category: "Alert",
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
Icon: {
|
|
91
|
+
control: { type: "text" },
|
|
92
|
+
description: "Icon to display in AlertHeader (LUIcon name)",
|
|
93
|
+
table: {
|
|
94
|
+
type: { summary: "string" },
|
|
95
|
+
category: "AlertHeader",
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
title: {
|
|
99
|
+
control: { type: "text" },
|
|
100
|
+
description: "Title text for AlertTitle",
|
|
101
|
+
table: {
|
|
102
|
+
type: { summary: "string" },
|
|
103
|
+
category: "AlertTitle",
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
description: {
|
|
107
|
+
control: { type: "text" },
|
|
108
|
+
description: "Description text for AlertDescription",
|
|
109
|
+
table: {
|
|
110
|
+
type: { summary: "string" },
|
|
111
|
+
category: "AlertDescription",
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
cancelText: {
|
|
115
|
+
control: { type: "text" },
|
|
116
|
+
description: "Text for AlertCancel button",
|
|
117
|
+
table: {
|
|
118
|
+
type: { summary: "string" },
|
|
119
|
+
category: "AlertCancel",
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
actionText: {
|
|
123
|
+
control: { type: "text" },
|
|
124
|
+
description: "Text for AlertAction button",
|
|
125
|
+
table: {
|
|
126
|
+
type: { summary: "string" },
|
|
127
|
+
category: "AlertAction",
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
showCancel: {
|
|
131
|
+
control: { type: "boolean" },
|
|
132
|
+
description: "Whether to show the cancel button",
|
|
133
|
+
table: {
|
|
134
|
+
type: { summary: "boolean" },
|
|
135
|
+
category: "Alert",
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
showAction: {
|
|
139
|
+
control: { type: "boolean" },
|
|
140
|
+
description: "Whether to show the action button",
|
|
141
|
+
table: {
|
|
142
|
+
type: { summary: "boolean" },
|
|
143
|
+
category: "Alert",
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
// Simple Example showing the exact code structure
|
|
148
|
+
export var Example = function () { return (<Alert color="blue" size="md" shadow="none">
|
|
149
|
+
<AlertHeader>
|
|
150
|
+
<LUIcon icon="info" variant="padded"/>
|
|
151
|
+
<AlertTitle>Update Available</AlertTitle>
|
|
152
|
+
<AlertDescription>
|
|
153
|
+
A new version of the application is available. Would you like to update
|
|
154
|
+
now? The update includes bug fixes and performance improvements.
|
|
155
|
+
</AlertDescription>
|
|
156
|
+
</AlertHeader>
|
|
157
|
+
<AlertFooter>
|
|
158
|
+
<AlertCancel className="text-blue-600 hover:text-blue-700 hover:underline" onClick={function () { return console.log("Later clicked"); }}>
|
|
159
|
+
Later
|
|
160
|
+
</AlertCancel>
|
|
161
|
+
<AlertAction className="text-blue-600 hover:text-blue-700 hover:underline" onClick={function () { return console.log("Update Now clicked"); }}>
|
|
162
|
+
Update Now
|
|
163
|
+
</AlertAction>
|
|
164
|
+
</AlertFooter>
|
|
165
|
+
</Alert>); };
|
|
166
|
+
Example.parameters = {
|
|
167
|
+
docs: {
|
|
168
|
+
description: {
|
|
169
|
+
story: "This example shows the exact code structure you should use to implement the Alert component.",
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
// All Colors Example
|
|
174
|
+
export var AllColors = function () { return (<div className="flex flex-col gap-4">
|
|
175
|
+
{colorOptions.map(function (color) {
|
|
176
|
+
var content = getContentForColor(color);
|
|
177
|
+
return (<Alert key={color} color={color}>
|
|
178
|
+
<AlertHeader>
|
|
179
|
+
<LUIcon icon={getIconForColor(color)} variant="padded"/>
|
|
180
|
+
<AlertTitle>{content.title}</AlertTitle>
|
|
181
|
+
<AlertDescription>{content.description}</AlertDescription>
|
|
182
|
+
</AlertHeader>
|
|
183
|
+
<AlertFooter>
|
|
184
|
+
<AlertCancel className={"text-".concat(color, "-600 hover:text-").concat(color, "-700 hover:underline")}>
|
|
185
|
+
Cancel
|
|
186
|
+
</AlertCancel>
|
|
187
|
+
<AlertAction className={"text-".concat(color, "-600 hover:text-").concat(color, "-700 hover:underline")}>
|
|
188
|
+
{content.button}
|
|
189
|
+
</AlertAction>
|
|
190
|
+
</AlertFooter>
|
|
191
|
+
</Alert>);
|
|
192
|
+
})}
|
|
193
|
+
</div>); };
|
|
194
|
+
// All Sizes Example
|
|
195
|
+
export var AllSizes = function () { return (<div className="flex flex-col gap-4">
|
|
196
|
+
{sizeOptions.map(function (size) { return (<Alert key={size} size={size} color="blue">
|
|
197
|
+
<AlertHeader>
|
|
198
|
+
<LUIcon icon="info" color="blue" variant="padded"/>
|
|
199
|
+
<AlertTitle>Size: {size.toUpperCase()}</AlertTitle>
|
|
200
|
+
<AlertDescription>
|
|
201
|
+
This is an example of the Alert component with size {size}.
|
|
202
|
+
</AlertDescription>
|
|
203
|
+
</AlertHeader>
|
|
204
|
+
<AlertFooter>
|
|
205
|
+
<AlertCancel className="text-blue-600 hover:text-blue-700 hover:underline">
|
|
206
|
+
Cancel
|
|
207
|
+
</AlertCancel>
|
|
208
|
+
<AlertAction className="text-blue-600 hover:text-blue-700 hover:underline">
|
|
209
|
+
Action
|
|
210
|
+
</AlertAction>
|
|
211
|
+
</AlertFooter>
|
|
212
|
+
</Alert>); })}
|
|
213
|
+
</div>); };
|
|
214
|
+
// Variants Example
|
|
215
|
+
export var Variants = function () { return (<div className="flex flex-col gap-4">
|
|
216
|
+
<Alert variant="outline" color="blue">
|
|
217
|
+
<AlertHeader>
|
|
218
|
+
<LUIcon icon="info" variant="padded"/>
|
|
219
|
+
<AlertTitle>Outline Variant</AlertTitle>
|
|
220
|
+
<AlertDescription>
|
|
221
|
+
This is an example of the Alert component with the outline variant.
|
|
222
|
+
</AlertDescription>
|
|
223
|
+
</AlertHeader>
|
|
224
|
+
<AlertFooter>
|
|
225
|
+
<AlertCancel className="text-blue-600 hover:text-blue-700 hover:underline">
|
|
226
|
+
Cancel
|
|
227
|
+
</AlertCancel>
|
|
228
|
+
<AlertAction className="text-blue-600 hover:text-blue-700 hover:underline">
|
|
229
|
+
Action
|
|
230
|
+
</AlertAction>
|
|
231
|
+
</AlertFooter>
|
|
232
|
+
</Alert>
|
|
233
|
+
|
|
234
|
+
<Alert variant="fill" color="blue">
|
|
235
|
+
<AlertHeader>
|
|
236
|
+
<LUIcon icon="info" variant="padded"/>
|
|
237
|
+
<AlertTitle>Fill Variant</AlertTitle>
|
|
238
|
+
<AlertDescription>
|
|
239
|
+
This is an example of the Alert component with the fill variant.
|
|
240
|
+
</AlertDescription>
|
|
241
|
+
</AlertHeader>
|
|
242
|
+
<AlertFooter>
|
|
243
|
+
<AlertCancel className="text-blue-600 hover:text-blue-700 hover:underline">
|
|
244
|
+
Cancel
|
|
245
|
+
</AlertCancel>
|
|
246
|
+
<AlertAction className="text-blue-600 hover:text-blue-700 hover:underline">
|
|
247
|
+
Action
|
|
248
|
+
</AlertAction>
|
|
249
|
+
</AlertFooter>
|
|
250
|
+
</Alert>
|
|
251
|
+
</div>); };
|
|
252
|
+
// Comparison with regular AlertDialog
|
|
253
|
+
export var ComparisonWithAlertDialog = function () { return (<div className="flex flex-col gap-8">
|
|
254
|
+
<div>
|
|
255
|
+
<h2 className="text-lg font-semibold mb-2">Alert (Non-Modal)</h2>
|
|
256
|
+
<p className="text-sm text-gray-600 mb-4">
|
|
257
|
+
This version renders directly in the page flow and does not create a
|
|
258
|
+
modal overlay.
|
|
259
|
+
</p>
|
|
260
|
+
<Alert color="green">
|
|
261
|
+
<AlertHeader>
|
|
262
|
+
<LUIcon icon="check" variant="padded"/>
|
|
263
|
+
<AlertTitle>Success!</AlertTitle>
|
|
264
|
+
<AlertDescription>
|
|
265
|
+
Your changes have been saved successfully.
|
|
266
|
+
</AlertDescription>
|
|
267
|
+
</AlertHeader>
|
|
268
|
+
<AlertFooter>
|
|
269
|
+
<AlertAction className="text-green-600 hover:text-green-700 hover:underline">
|
|
270
|
+
Close
|
|
271
|
+
</AlertAction>
|
|
272
|
+
</AlertFooter>
|
|
273
|
+
</Alert>
|
|
274
|
+
</div>
|
|
275
|
+
|
|
276
|
+
<div>
|
|
277
|
+
<h2 className="text-lg font-semibold mb-2">
|
|
278
|
+
AlertDialog Button (Modal - Click to Open)
|
|
279
|
+
</h2>
|
|
280
|
+
<p className="text-sm text-gray-600 mb-4">
|
|
281
|
+
This is the regular AlertDialog component that creates a modal overlay.
|
|
282
|
+
</p>
|
|
283
|
+
<Button color="light-green" onClick={function () { }}>
|
|
284
|
+
Open Modal AlertDialog (See in Stories)
|
|
285
|
+
</Button>
|
|
286
|
+
</div>
|
|
287
|
+
</div>); };
|
|
288
|
+
// No Buttons Example
|
|
289
|
+
export var NoButtons = function () { return (<Alert color="yellow">
|
|
290
|
+
<AlertHeader>
|
|
291
|
+
<LUIcon icon="info" variant="padded"/>
|
|
292
|
+
<AlertTitle>Maintenance Notice</AlertTitle>
|
|
293
|
+
<AlertDescription>
|
|
294
|
+
System maintenance is scheduled for tonight at 10:00 PM. The system will
|
|
295
|
+
be unavailable for approximately 30 minutes.
|
|
296
|
+
</AlertDescription>
|
|
297
|
+
</AlertHeader>
|
|
298
|
+
</Alert>); };
|
|
299
|
+
// With Shadow Example
|
|
300
|
+
export var WithShadow = function () { return (<Alert color="blue" shadow="lg">
|
|
301
|
+
<AlertHeader>
|
|
302
|
+
<LUIcon icon="info" variant="padded"/>
|
|
303
|
+
<AlertTitle>Information</AlertTitle>
|
|
304
|
+
<AlertDescription>
|
|
305
|
+
This alert has a large shadow applied to it.
|
|
306
|
+
</AlertDescription>
|
|
307
|
+
</AlertHeader>
|
|
308
|
+
<AlertFooter>
|
|
309
|
+
<AlertAction className="text-blue-600 hover:text-blue-700 hover:underline">
|
|
310
|
+
Got it
|
|
311
|
+
</AlertAction>
|
|
312
|
+
</AlertFooter>
|
|
313
|
+
</Alert>); };
|
|
314
|
+
// CustomizeAlert Example - showing how to customize with Typography components
|
|
315
|
+
export var CustomizeAlert = function () { return (<Alert color="red" size="md" variant="fill">
|
|
316
|
+
<AlertHeader>
|
|
317
|
+
<LUIcon icon="info" size="9xl" color="light-red" variant="padded"/>
|
|
318
|
+
<AlertTitle>
|
|
319
|
+
<Heading variant="h1-700">Customize Alert Title</Heading>
|
|
320
|
+
</AlertTitle>
|
|
321
|
+
<AlertDescription>
|
|
322
|
+
<Body variant="body-xs">
|
|
323
|
+
This Alert uses a customized icon size, custom typography variants,
|
|
324
|
+
and different button colors to demonstrate full customization
|
|
325
|
+
capabilities.
|
|
326
|
+
</Body>
|
|
327
|
+
</AlertDescription>
|
|
328
|
+
</AlertHeader>
|
|
329
|
+
<AlertFooter>
|
|
330
|
+
<AlertCancel variant="fill" color="indigo">
|
|
331
|
+
Close
|
|
332
|
+
</AlertCancel>
|
|
333
|
+
<AlertAction variant="outline" color="light-green">
|
|
334
|
+
OK
|
|
335
|
+
</AlertAction>
|
|
336
|
+
</AlertFooter>
|
|
337
|
+
</Alert>); };
|
|
338
|
+
CustomizeAlert.parameters = {
|
|
339
|
+
docs: {
|
|
340
|
+
description: {
|
|
341
|
+
story: "This example demonstrates how to customize the Alert component with different typography variants, icon sizes, colors, and button styles. The alert uses a fill variant with red color, custom typography components, a 9xl icon size, and mixed button variants with different colors.",
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
};
|