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
|
@@ -1,414 +0,0 @@
|
|
|
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
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { BadgeSkeletonSize, HeadingSkeletonSize, InputSkeletonSize, Skeleton, TextSkeletonSize, } from "./skeleton";
|
|
14
|
-
import { avatarSize } from "../Avatar/Avatar";
|
|
15
|
-
import { buttonStyles } from "../Button";
|
|
16
|
-
import { tableBodySize } from "../Table";
|
|
17
|
-
import { comboboxSizes } from "../Dropdown/Combobox";
|
|
18
|
-
import { iconSize as LUIconSizes } from "../Icons";
|
|
19
|
-
import { checkboxSize } from "../Checkbox/checkbox";
|
|
20
|
-
import { size as SwitchSizes } from "../Switch/switch";
|
|
21
|
-
import { Body } from "../Typography/Body/body";
|
|
22
|
-
import { Heading } from "../Typography/Heading/heading";
|
|
23
|
-
// Dynamically define Skeleton variants
|
|
24
|
-
var SKELETON_VARIANTS = [
|
|
25
|
-
"default",
|
|
26
|
-
"button",
|
|
27
|
-
"input",
|
|
28
|
-
"avatar",
|
|
29
|
-
"badge",
|
|
30
|
-
"card",
|
|
31
|
-
"tableRow",
|
|
32
|
-
"checkbox",
|
|
33
|
-
"switch",
|
|
34
|
-
"select",
|
|
35
|
-
"icon",
|
|
36
|
-
"text",
|
|
37
|
-
"heading",
|
|
38
|
-
"image",
|
|
39
|
-
];
|
|
40
|
-
var meta = {
|
|
41
|
-
title: "Components/Skeleton",
|
|
42
|
-
component: Skeleton,
|
|
43
|
-
tags: ["autodocs"],
|
|
44
|
-
parameters: {
|
|
45
|
-
docs: {
|
|
46
|
-
description: {
|
|
47
|
-
component: "A component for displaying loading skeleton placeholders. ",
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
controls: {
|
|
51
|
-
expanded: true,
|
|
52
|
-
sort: "requiredFirst",
|
|
53
|
-
hideNoControlsWarning: true,
|
|
54
|
-
exclude: [],
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
args: {
|
|
58
|
-
className: "",
|
|
59
|
-
variant: "default",
|
|
60
|
-
size: "md",
|
|
61
|
-
isIcon: true,
|
|
62
|
-
},
|
|
63
|
-
argTypes: {
|
|
64
|
-
variant: {
|
|
65
|
-
control: { type: "select" },
|
|
66
|
-
options: SKELETON_VARIANTS,
|
|
67
|
-
description: "Select the skeleton component variant",
|
|
68
|
-
table: {
|
|
69
|
-
defaultValue: { summary: "default" },
|
|
70
|
-
type: { summary: "enum" },
|
|
71
|
-
category: "Component",
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
size: {
|
|
75
|
-
control: { type: "select" },
|
|
76
|
-
options: Object.keys(avatarSize), // Will be dynamically updated by decorator
|
|
77
|
-
description: "Size for Avatar, Button, Badge, Input, TableRow, Select, Icon, Text, and Heading skeletons (when applicable)",
|
|
78
|
-
table: {
|
|
79
|
-
defaultValue: { summary: "md" },
|
|
80
|
-
type: { summary: "enum" },
|
|
81
|
-
category: "Size",
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
columns: {
|
|
85
|
-
control: { type: "number", min: 1, max: 10 },
|
|
86
|
-
description: "Number of columns for TableRow skeleton",
|
|
87
|
-
table: {
|
|
88
|
-
type: { summary: "number" },
|
|
89
|
-
category: "TableRow",
|
|
90
|
-
},
|
|
91
|
-
if: { arg: "variant", eq: "tableRow" },
|
|
92
|
-
},
|
|
93
|
-
lines: {
|
|
94
|
-
control: { type: "number", min: 1, max: 10 },
|
|
95
|
-
description: "Number of lines for Text skeleton",
|
|
96
|
-
table: {
|
|
97
|
-
type: { summary: "number" },
|
|
98
|
-
category: "Text",
|
|
99
|
-
},
|
|
100
|
-
if: { arg: "variant", eq: "text" },
|
|
101
|
-
},
|
|
102
|
-
aspectRatio: {
|
|
103
|
-
control: { type: "select" },
|
|
104
|
-
options: ["square", "video", "portrait"],
|
|
105
|
-
description: "Aspect ratio for Image skeleton",
|
|
106
|
-
table: {
|
|
107
|
-
type: { summary: '"square" | "video" | "portrait"' },
|
|
108
|
-
category: "Image",
|
|
109
|
-
},
|
|
110
|
-
if: { arg: "variant", eq: "image" },
|
|
111
|
-
},
|
|
112
|
-
isIcon: {
|
|
113
|
-
control: { type: "boolean" },
|
|
114
|
-
description: "Toggle placeholder icon inside Image skeleton",
|
|
115
|
-
table: {
|
|
116
|
-
type: { summary: "boolean" },
|
|
117
|
-
defaultValue: { summary: "true" },
|
|
118
|
-
category: "Image",
|
|
119
|
-
},
|
|
120
|
-
if: { arg: "variant", eq: "image" },
|
|
121
|
-
},
|
|
122
|
-
className: {
|
|
123
|
-
control: "text",
|
|
124
|
-
description: "Custom className to override default sizing",
|
|
125
|
-
table: {
|
|
126
|
-
type: { summary: "string" },
|
|
127
|
-
category: "Styling",
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
decorators: [
|
|
132
|
-
function (Story, context) {
|
|
133
|
-
var currentVariant = context.args.variant;
|
|
134
|
-
// Dynamically determine which variants support size
|
|
135
|
-
var variantsWithSize = SKELETON_VARIANTS.filter(function (v) {
|
|
136
|
-
return [
|
|
137
|
-
"button",
|
|
138
|
-
"avatar",
|
|
139
|
-
"badge",
|
|
140
|
-
"input",
|
|
141
|
-
"tableRow",
|
|
142
|
-
"select",
|
|
143
|
-
"icon",
|
|
144
|
-
"text",
|
|
145
|
-
"heading",
|
|
146
|
-
].includes(v);
|
|
147
|
-
});
|
|
148
|
-
if (context.argTypes && context.argTypes.size) {
|
|
149
|
-
// Hide size control for variants that don't support it
|
|
150
|
-
if (!variantsWithSize.includes(currentVariant !== null && currentVariant !== void 0 ? currentVariant : "")) {
|
|
151
|
-
context.argTypes.size.table = { disable: true };
|
|
152
|
-
delete context.argTypes.size.control;
|
|
153
|
-
}
|
|
154
|
-
else {
|
|
155
|
-
// Show size control and update options based on variant
|
|
156
|
-
context.argTypes.size.control = { type: "select" };
|
|
157
|
-
context.argTypes.size.table = {
|
|
158
|
-
defaultValue: { summary: "md" },
|
|
159
|
-
type: { summary: "enum" },
|
|
160
|
-
category: "Size",
|
|
161
|
-
};
|
|
162
|
-
// Set default size and options based on variant
|
|
163
|
-
if (currentVariant === "button") {
|
|
164
|
-
context.argTypes.size.options = Object.keys(buttonStyles.size);
|
|
165
|
-
// Set default size if not already set
|
|
166
|
-
if (!context.args.size || context.args.size === "md") {
|
|
167
|
-
context.args.size = "md";
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
else if (currentVariant === "avatar") {
|
|
171
|
-
context.argTypes.size.options = Object.keys(avatarSize);
|
|
172
|
-
if (!context.args.size || context.args.size === "md") {
|
|
173
|
-
context.args.size = "md";
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
else if (currentVariant === "badge") {
|
|
177
|
-
context.argTypes.size.options = Object.keys(BadgeSkeletonSize);
|
|
178
|
-
if (!context.args.size || context.args.size === "md") {
|
|
179
|
-
context.args.size = "md";
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
else if (currentVariant === "switch") {
|
|
183
|
-
context.argTypes.size.options = Object.keys(SwitchSizes);
|
|
184
|
-
if (!context.args.size || context.args.size === "md") {
|
|
185
|
-
context.args.size = "md";
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
else if (currentVariant === "input") {
|
|
189
|
-
context.argTypes.size.options = Object.keys(InputSkeletonSize);
|
|
190
|
-
if (!context.args.size || context.args.size === "md") {
|
|
191
|
-
context.args.size = "lg"; // Input default is lg
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
else if (currentVariant === "tableRow") {
|
|
195
|
-
context.argTypes.size.options = Object.keys(tableBodySize);
|
|
196
|
-
if (!context.args.size || context.args.size === "md") {
|
|
197
|
-
context.args.size = "md";
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
else if (currentVariant === "select") {
|
|
201
|
-
context.argTypes.size.options = Object.keys(comboboxSizes);
|
|
202
|
-
if (!context.args.size || context.args.size === "md") {
|
|
203
|
-
context.args.size = "md";
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
else if (currentVariant === "icon") {
|
|
207
|
-
context.argTypes.size.options = Object.keys(LUIconSizes);
|
|
208
|
-
if (!context.args.size || context.args.size === "md") {
|
|
209
|
-
context.args.size = "md";
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
else if (currentVariant === "text") {
|
|
213
|
-
context.argTypes.size.options = Object.keys(TextSkeletonSize);
|
|
214
|
-
if (!context.args.size || context.args.size === "md") {
|
|
215
|
-
context.args.size = "md";
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
else if (currentVariant === "checkbox") {
|
|
219
|
-
context.argTypes.size.options = Object.keys(checkboxSize);
|
|
220
|
-
if (!context.args.size || context.args.size === "md") {
|
|
221
|
-
context.args.size = "md";
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
else if (currentVariant === "heading") {
|
|
225
|
-
context.argTypes.size.options = Object.keys(HeadingSkeletonSize);
|
|
226
|
-
// Heading has a special default
|
|
227
|
-
if (!context.args.size || context.args.size === "md") {
|
|
228
|
-
context.args.size = "h2";
|
|
229
|
-
}
|
|
230
|
-
context.argTypes.size.table.defaultValue = { summary: "h2" };
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
return _jsx(Story, __assign({}, context));
|
|
235
|
-
},
|
|
236
|
-
],
|
|
237
|
-
};
|
|
238
|
-
export default meta;
|
|
239
|
-
// Default Skeleton
|
|
240
|
-
var Template = function (args) {
|
|
241
|
-
var _a = args.variant, variant = _a === void 0 ? "default" : _a, className = args.className, columns = args.columns, lines = args.lines, aspectRatio = args.aspectRatio, isIcon = args.isIcon;
|
|
242
|
-
// Set appropriate default size based on variant
|
|
243
|
-
// Narrow size type for each variant
|
|
244
|
-
var size = args.size;
|
|
245
|
-
if (!size) {
|
|
246
|
-
if (variant === "heading") {
|
|
247
|
-
size = "h2";
|
|
248
|
-
}
|
|
249
|
-
else {
|
|
250
|
-
size = "md";
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
switch (variant) {
|
|
254
|
-
case "button":
|
|
255
|
-
return (_jsx(Skeleton.Button, { size: size, className: className }));
|
|
256
|
-
case "input":
|
|
257
|
-
return (_jsx(Skeleton.Input, { size: size, className: className }));
|
|
258
|
-
case "avatar":
|
|
259
|
-
return (_jsx(Skeleton.Avatar, { size: size, className: className }));
|
|
260
|
-
case "badge":
|
|
261
|
-
return (_jsx(Skeleton.Badge, { size: size, className: className }));
|
|
262
|
-
case "card":
|
|
263
|
-
return _jsx(Skeleton.Card, { className: className });
|
|
264
|
-
case "tableRow":
|
|
265
|
-
return (_jsx(Skeleton.TableRow, { columns: columns, size: size, className: className }));
|
|
266
|
-
case "checkbox":
|
|
267
|
-
return _jsx(Skeleton.Checkbox, { className: className });
|
|
268
|
-
case "switch":
|
|
269
|
-
return _jsx(Skeleton.Switch, { className: className });
|
|
270
|
-
case "select":
|
|
271
|
-
return (_jsx(Skeleton.Select, { size: size, className: className }));
|
|
272
|
-
case "icon":
|
|
273
|
-
return (_jsx(Skeleton.Icon, { size: size, className: className }));
|
|
274
|
-
case "text":
|
|
275
|
-
return (_jsx(Skeleton.Text, { lines: lines, size: size, className: className }));
|
|
276
|
-
case "heading":
|
|
277
|
-
return (_jsx(Skeleton.Heading, { size: size, className: className }));
|
|
278
|
-
case "image":
|
|
279
|
-
return (_jsx(Skeleton.Image, { aspectRatio: aspectRatio, isIcon: isIcon, className: className }));
|
|
280
|
-
case "default":
|
|
281
|
-
default:
|
|
282
|
-
return _jsx(Skeleton, { className: "w-48 h-48 ".concat(className) });
|
|
283
|
-
}
|
|
284
|
-
};
|
|
285
|
-
export var Default = Template.bind({});
|
|
286
|
-
// Button Skeletons - All Sizes
|
|
287
|
-
export var ButtonSkeletons = function () { return (_jsxs("div", { className: "space-y-6", children: [_jsxs("div", { children: [_jsx(Heading, { variant: "h4", children: "Button Skeleton Sizes" }), _jsx("div", { className: "flex flex-col gap-4", children: Object.keys(buttonStyles.size).map(function (size) { return (_jsxs("div", { children: [_jsx("p", { children: size.toUpperCase() }), _jsx(Skeleton.Button, { size: size })] }, size)); }) })] }), _jsxs("div", { children: [_jsx(Heading, { variant: "h4", children: "Custom Width" }), _jsx(Skeleton.Button, { className: "w-64" })] })] })); };
|
|
288
|
-
ButtonSkeletons.parameters = {
|
|
289
|
-
docs: {
|
|
290
|
-
description: {
|
|
291
|
-
story: "Button skeleton placeholders in all available sizes (sm, md, lg, xl).",
|
|
292
|
-
},
|
|
293
|
-
},
|
|
294
|
-
};
|
|
295
|
-
// Input Skeletons - All Sizes
|
|
296
|
-
export var InputSkeletons = function () { return (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx(Body, { children: "Small Input" }), _jsx(Skeleton.Input, { size: "sm" })] }), _jsxs("div", { children: [_jsx(Body, { children: "Medium Input" }), _jsx(Skeleton.Input, { size: "md" })] }), _jsxs("div", { children: [_jsx(Body, { children: "Large Input (Default)" }), _jsx(Skeleton.Input, { size: "lg" })] }), _jsxs("div", { children: [_jsx(Body, { children: "Custom Width" }), _jsx(Skeleton.Input, { className: "w-1/2" })] })] })); };
|
|
297
|
-
InputSkeletons.parameters = {
|
|
298
|
-
docs: {
|
|
299
|
-
description: {
|
|
300
|
-
story: "Input skeleton placeholders with size options (sm, md, lg).",
|
|
301
|
-
},
|
|
302
|
-
},
|
|
303
|
-
};
|
|
304
|
-
// Avatar Skeletons - All Sizes
|
|
305
|
-
export var AvatarSkeletons = function () {
|
|
306
|
-
var allAvatarSizes = Object.keys(avatarSize);
|
|
307
|
-
return (_jsx("div", { className: "space-y-4", children: _jsx("div", { className: "flex items-center gap-4 flex-wrap", children: allAvatarSizes.map(function (size) { return (_jsxs("div", { className: "flex flex-col items-center gap-2", children: [_jsx(Skeleton.Avatar, { size: size }), _jsx("span", { className: "text-xs text-gray-500", children: size })] }, size)); }) }) }));
|
|
308
|
-
};
|
|
309
|
-
AvatarSkeletons.parameters = {
|
|
310
|
-
docs: {
|
|
311
|
-
description: {
|
|
312
|
-
story: "Avatar skeleton placeholders in all available sizes.",
|
|
313
|
-
},
|
|
314
|
-
},
|
|
315
|
-
};
|
|
316
|
-
// Badge Skeletons - All Sizes
|
|
317
|
-
export var BadgeSkeletons = function () { return (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx(Body, { children: "Small Badge" }), _jsx(Skeleton.Badge, { size: "sm" })] }), _jsxs("div", { children: [_jsx(Body, { children: "Medium Badge (Default)" }), _jsx(Skeleton.Badge, { size: "md" })] }), _jsxs("div", { children: [_jsx(Body, { children: "Large Badge" }), _jsx(Skeleton.Badge, { size: "lg" })] })] })); };
|
|
318
|
-
BadgeSkeletons.parameters = {
|
|
319
|
-
docs: {
|
|
320
|
-
description: {
|
|
321
|
-
story: "Badge skeleton placeholders with size options (sm, md, lg).",
|
|
322
|
-
},
|
|
323
|
-
},
|
|
324
|
-
};
|
|
325
|
-
// Card Skeleton
|
|
326
|
-
export var CardSkeleton = function () { return (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx(Body, { children: "Default Card Skeleton" }), _jsx(Skeleton.Card, {})] }), _jsxs("div", { children: [_jsx(Body, { children: "Custom Height" }), _jsx(Skeleton.Card, { className: "h-64" })] })] })); };
|
|
327
|
-
CardSkeleton.parameters = {
|
|
328
|
-
docs: {
|
|
329
|
-
description: {
|
|
330
|
-
story: "Card skeleton placeholder for card components.",
|
|
331
|
-
},
|
|
332
|
-
},
|
|
333
|
-
};
|
|
334
|
-
// Table Row Skeletons
|
|
335
|
-
export var TableRowSkeletons = function () { return (_jsxs("div", { className: "space-y-6", children: [_jsxs("div", { children: [_jsx(Body, { children: "3 Columns - Small" }), _jsx(Skeleton.TableRow, { columns: 3, size: "sm" })] }), _jsxs("div", { children: [_jsx(Body, { children: "4 Columns - Medium" }), _jsx(Skeleton.TableRow, { columns: 4, size: "md" })] }), _jsxs("div", { children: [_jsx(Body, { children: "5 Columns - Large" }), _jsx(Skeleton.TableRow, { columns: 5, size: "lg" })] }), _jsxs("div", { children: [_jsx(Body, { children: "Full Table Example" }), _jsxs("div", { className: "space-y-2", children: [_jsx(Skeleton.TableRow, { columns: 4, size: "md" }), _jsx(Skeleton.TableRow, { columns: 4, size: "md" }), _jsx(Skeleton.TableRow, { columns: 4, size: "md" })] })] })] })); };
|
|
336
|
-
TableRowSkeletons.parameters = {
|
|
337
|
-
docs: {
|
|
338
|
-
description: {
|
|
339
|
-
story: "Table row skeleton with customizable columns and sizes. Perfect for table loading states.",
|
|
340
|
-
},
|
|
341
|
-
},
|
|
342
|
-
};
|
|
343
|
-
// Form Elements Skeletons
|
|
344
|
-
export var FormElementsSkeletons = function () { return (_jsxs("div", { className: "space-y-6", children: [_jsxs("div", { children: [_jsx(Heading, { variant: "h4", children: "Checkbox" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Skeleton.Checkbox, {}), _jsx(Skeleton, { className: "h-4 w-24" })] })] }), _jsxs("div", { children: [_jsx(Heading, { variant: "h4", children: "Switch" }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Skeleton.Switch, {}), _jsx(Skeleton, { className: "h-4 w-32" })] })] }), _jsxs("div", { children: [_jsx(Heading, { variant: "h4", children: "Select/Dropdown" }), _jsxs("div", { className: "space-y-2", children: [_jsx(Skeleton.Select, { size: "sm" }), _jsx(Skeleton.Select, { size: "md" }), _jsx(Skeleton.Select, { size: "lg" })] })] })] })); };
|
|
345
|
-
FormElementsSkeletons.parameters = {
|
|
346
|
-
docs: {
|
|
347
|
-
description: {
|
|
348
|
-
story: "Skeleton loaders for form elements like checkbox, switch, and select.",
|
|
349
|
-
},
|
|
350
|
-
},
|
|
351
|
-
};
|
|
352
|
-
// Icon Skeletons
|
|
353
|
-
export var IconSkeletons = function () { return (_jsx("div", { className: "space-y-4", children: _jsxs("div", { className: "flex items-center gap-4", children: [_jsxs("div", { className: "flex flex-col items-center gap-2", children: [_jsx(Skeleton.Icon, { size: "sm" }), _jsx("span", { className: "text-xs text-gray-500", children: "Small" })] }), _jsxs("div", { className: "flex flex-col items-center gap-2", children: [_jsx(Skeleton.Icon, { size: "md" }), _jsx("span", { className: "text-xs text-gray-500", children: "Medium" })] }), _jsxs("div", { className: "flex flex-col items-center gap-2", children: [_jsx(Skeleton.Icon, { size: "lg" }), _jsx("span", { className: "text-xs text-gray-500", children: "Large" })] }), _jsxs("div", { className: "flex flex-col items-center gap-2", children: [_jsx(Skeleton.Icon, { size: "xl" }), _jsx("span", { className: "text-xs text-gray-500", children: "XLarge" })] })] }) })); };
|
|
354
|
-
IconSkeletons.parameters = {
|
|
355
|
-
docs: {
|
|
356
|
-
description: {
|
|
357
|
-
story: "Icon skeleton placeholders in different sizes (sm, md, lg, xl).",
|
|
358
|
-
},
|
|
359
|
-
},
|
|
360
|
-
};
|
|
361
|
-
// Text Skeletons
|
|
362
|
-
export var TextSkeletons = function () { return (_jsxs("div", { className: "space-y-6", children: [_jsxs("div", { children: [_jsx(Heading, { variant: "h4", children: "Text Sizes" }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx(Body, { children: "Extra Small (xs)" }), _jsx(Skeleton.Text, { lines: 1, size: "xs" })] }), _jsxs("div", { children: [_jsx(Body, { children: "Small (sm)" }), _jsx(Skeleton.Text, { lines: 1, size: "sm" })] }), _jsxs("div", { children: [_jsx(Body, { children: "Medium (md) - Default" }), _jsx(Skeleton.Text, { lines: 1, size: "md" })] }), _jsxs("div", { children: [_jsx(Body, { children: "Large (lg)" }), _jsx(Skeleton.Text, { lines: 1, size: "lg" })] }), _jsxs("div", { children: [_jsx(Body, { children: "Extra Large (xl)" }), _jsx(Skeleton.Text, { lines: 1, size: "xl" })] })] })] }), _jsxs("div", { children: [_jsx(Heading, { variant: "h4", children: "Multi-line Text" }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx(Body, { children: "Two Lines" }), _jsx(Skeleton.Text, { lines: 2 })] }), _jsxs("div", { children: [_jsx(Body, { children: "Three Lines" }), _jsx(Skeleton.Text, { lines: 3 })] }), _jsxs("div", { children: [_jsx(Body, { children: "Five Lines" }), _jsx(Skeleton.Text, { lines: 5 })] })] })] })] })); };
|
|
363
|
-
TextSkeletons.parameters = {
|
|
364
|
-
docs: {
|
|
365
|
-
description: {
|
|
366
|
-
story: "Text skeleton placeholders with multiple size options (xs, sm, md, lg, xl) and multi-line support. The last line is automatically 75% width for multi-line text.",
|
|
367
|
-
},
|
|
368
|
-
},
|
|
369
|
-
};
|
|
370
|
-
// Heading Skeletons
|
|
371
|
-
export var HeadingSkeletons = function () { return (_jsx("div", { className: "space-y-6", children: _jsxs("div", { children: [_jsx(Heading, { variant: "h4", children: "Heading Sizes" }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx(Body, { children: "H1 - Largest" }), _jsx(Skeleton.Heading, { size: "h1" })] }), _jsxs("div", { children: [_jsx(Body, { children: "H2 - Default" }), _jsx(Skeleton.Heading, { size: "h2" })] }), _jsxs("div", { children: [_jsx(Body, { children: "H3" }), _jsx(Skeleton.Heading, { size: "h3" })] }), _jsxs("div", { children: [_jsx(Body, { children: "H4" }), _jsx(Skeleton.Heading, { size: "h4" })] }), _jsxs("div", { children: [_jsx(Body, { children: "H5" }), _jsx(Skeleton.Heading, { size: "h5" })] }), _jsxs("div", { children: [_jsx(Body, { children: "H6 - Smallest" }), _jsx(Skeleton.Heading, { size: "h6" })] })] })] }) })); };
|
|
372
|
-
HeadingSkeletons.parameters = {
|
|
373
|
-
docs: {
|
|
374
|
-
description: {
|
|
375
|
-
story: "Heading skeleton placeholders with all heading sizes (h1 through h6). Default width is 75% but can be customized with className.",
|
|
376
|
-
},
|
|
377
|
-
},
|
|
378
|
-
};
|
|
379
|
-
// Image Skeletons
|
|
380
|
-
export var ImageSkeletons = function () { return (_jsxs("div", { className: "space-y-6", children: [_jsxs("div", { children: [_jsx(Body, { children: "Square Aspect Ratio" }), _jsx("div", { className: "w-64", children: _jsx(Skeleton.Image, { aspectRatio: "square" }) })] }), _jsxs("div", { children: [_jsx(Body, { children: "Video Aspect Ratio (16:9)" }), _jsx("div", { className: "w-64", children: _jsx(Skeleton.Image, { aspectRatio: "video" }) })] }), _jsxs("div", { children: [_jsx(Body, { children: "Portrait Aspect Ratio (3:4)" }), _jsx("div", { className: "w-48", children: _jsx(Skeleton.Image, { aspectRatio: "portrait" }) })] }), _jsxs("div", { children: [_jsx(Body, { children: "Icon Scale Variations" }), _jsxs("div", { className: "flex gap-6 flex-wrap", children: [_jsxs("div", { className: "w-40", children: [_jsx(Body, { children: "Scale: sm" }), _jsx(Skeleton.Image, { aspectRatio: "square" })] }), _jsxs("div", { className: "w-40", children: [_jsx(Body, { children: "Scale: md" }), _jsx(Skeleton.Image, { aspectRatio: "square" })] }), _jsxs("div", { className: "w-40", children: [_jsx(Body, { children: "Scale: lg" }), _jsx(Skeleton.Image, { aspectRatio: "square" })] }), _jsxs("div", { className: "w-40", children: [_jsx(Body, { children: "Scale: auto (responsive)" }), _jsx(Skeleton.Image, { aspectRatio: "square" })] })] })] })] })); };
|
|
381
|
-
ImageSkeletons.parameters = {
|
|
382
|
-
docs: {
|
|
383
|
-
description: {
|
|
384
|
-
story: "Image skeleton placeholders with different aspect ratio options (square, video, portrait).",
|
|
385
|
-
},
|
|
386
|
-
},
|
|
387
|
-
};
|
|
388
|
-
// Complete Card Example
|
|
389
|
-
export var CompleteCardExample = function () { return (_jsxs("div", { className: "w-80 rounded-lg border p-6", children: [_jsxs("div", { className: "flex items-center gap-4 mb-4", children: [_jsx(Skeleton.Avatar, { size: "lg" }), _jsxs("div", { className: "flex-1 space-y-2", children: [_jsx(Skeleton, { className: "h-4 w-3/4" }), _jsx(Skeleton, { className: "h-3 w-1/2" })] })] }), _jsx("div", { className: "space-y-2 mb-4", children: _jsx(Skeleton.Text, { lines: 3 }) }), _jsxs("div", { className: "flex gap-2", children: [_jsx(Skeleton.Button, { size: "md", className: "flex-1" }), _jsx(Skeleton.Button, { size: "md", className: "flex-1" })] })] })); };
|
|
390
|
-
CompleteCardExample.parameters = {
|
|
391
|
-
docs: {
|
|
392
|
-
description: {
|
|
393
|
-
story: "A complete card loading state example using multiple skeleton components.",
|
|
394
|
-
},
|
|
395
|
-
},
|
|
396
|
-
};
|
|
397
|
-
// Complete Form Example
|
|
398
|
-
export var CompleteFormExample = function () { return (_jsxs("div", { className: "w-96 space-y-4", children: [_jsxs("div", { children: [_jsx(Skeleton, { className: "h-4 w-20 mb-2" }), _jsx(Skeleton.Input, { size: "lg" })] }), _jsxs("div", { children: [_jsx(Skeleton, { className: "h-4 w-24 mb-2" }), _jsx(Skeleton.Input, { size: "lg" })] }), _jsxs("div", { children: [_jsx(Skeleton, { className: "h-4 w-32 mb-2" }), _jsx(Skeleton.Select, { size: "md" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Skeleton.Checkbox, {}), _jsx(Skeleton, { className: "h-4 w-40" })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Skeleton.Switch, {}), _jsx(Skeleton, { className: "h-4 w-36" })] }), _jsx(Skeleton.Button, { size: "lg", className: "w-full" })] })); };
|
|
399
|
-
CompleteFormExample.parameters = {
|
|
400
|
-
docs: {
|
|
401
|
-
description: {
|
|
402
|
-
story: "A complete form loading state example with various input types.",
|
|
403
|
-
},
|
|
404
|
-
},
|
|
405
|
-
};
|
|
406
|
-
// All Variants Together
|
|
407
|
-
export var AllVariants = function () { return (_jsxs("div", { className: "space-y-8", children: [_jsxs("div", { children: [_jsx(Heading, { variant: "h4", children: "Buttons" }), _jsxs("div", { className: "flex gap-4", children: [_jsx(Skeleton.Button, { size: "sm" }), _jsx(Skeleton.Button, { size: "md" }), _jsx(Skeleton.Button, { size: "lg" })] })] }), _jsxs("div", { children: [_jsx(Heading, { variant: "h4", children: "Inputs & Selects" }), _jsxs("div", { className: "space-y-2 max-w-md", children: [_jsx(Skeleton.Input, { size: "sm" }), _jsx(Skeleton.Input, { size: "md" }), _jsx(Skeleton.Select, { size: "lg" })] })] }), _jsxs("div", { children: [_jsx(Heading, { variant: "h4", children: "Avatars" }), _jsxs("div", { className: "flex gap-4 items-center", children: [_jsx(Skeleton.Avatar, { size: "sm" }), _jsx(Skeleton.Avatar, { size: "md" }), _jsx(Skeleton.Avatar, { size: "lg" }), _jsx(Skeleton.Avatar, { size: "xl" })] })] }), _jsxs("div", { children: [_jsx(Heading, { variant: "h4", children: "Badges" }), _jsxs("div", { className: "flex gap-4 items-center", children: [_jsx(Skeleton.Badge, { size: "sm" }), _jsx(Skeleton.Badge, { size: "md" }), _jsx(Skeleton.Badge, { size: "lg" })] })] }), _jsxs("div", { children: [_jsx(Heading, { variant: "h4", children: "Form Controls" }), _jsxs("div", { className: "flex gap-4 items-center", children: [_jsx(Skeleton.Checkbox, {}), _jsx(Skeleton.Switch, {}), _jsx(Skeleton.Icon, { size: "md" })] })] }), _jsxs("div", { children: [_jsx(Heading, { variant: "h4", children: "Text" }), _jsx("div", { className: "max-w-md", children: _jsx(Skeleton.Text, { lines: 3 }) })] }), _jsxs("div", { children: [_jsx(Heading, { variant: "h4", children: "Images" }), _jsxs("div", { className: "flex gap-4", children: [_jsx("div", { className: "w-32", children: _jsx(Skeleton.Image, { aspectRatio: "square" }) }), _jsx("div", { className: "w-48", children: _jsx(Skeleton.Image, { aspectRatio: "video" }) })] })] })] })); };
|
|
408
|
-
AllVariants.parameters = {
|
|
409
|
-
docs: {
|
|
410
|
-
description: {
|
|
411
|
-
story: "Overview of all skeleton variants and their common use cases.",
|
|
412
|
-
},
|
|
413
|
-
},
|
|
414
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
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
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
import * as React from "react";
|
|
25
|
-
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
26
|
-
import { cn } from "../../lib/utils";
|
|
27
|
-
function Slider(_a) {
|
|
28
|
-
var className = _a.className, defaultValue = _a.defaultValue, value = _a.value, _b = _a.min, min = _b === void 0 ? 0 : _b, _c = _a.max, max = _c === void 0 ? 100 : _c, props = __rest(_a, ["className", "defaultValue", "value", "min", "max"]);
|
|
29
|
-
var _values = React.useMemo(function () {
|
|
30
|
-
return Array.isArray(value)
|
|
31
|
-
? value
|
|
32
|
-
: Array.isArray(defaultValue)
|
|
33
|
-
? defaultValue
|
|
34
|
-
: [min, max];
|
|
35
|
-
}, [value, defaultValue, min, max]);
|
|
36
|
-
return (_jsxs(SliderPrimitive.Root, __assign({ "data-slot": "slider", defaultValue: defaultValue, value: value, min: min, max: max, className: cn("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className) }, props, { children: [_jsx(SliderPrimitive.Track, { "data-slot": "slider-track", className: cn("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"), children: _jsx(SliderPrimitive.Range, { "data-slot": "slider-range", className: cn("bg-blue-600 absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full") }) }), Array.from({ length: _values.length }, function (_, index) { return (_jsx(SliderPrimitive.Thumb, { "data-slot": "slider-thumb", className: "border-blue-600 bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50" }, index)); })] })));
|
|
37
|
-
}
|
|
38
|
-
export { Slider };
|
|
@@ -1,43 +0,0 @@
|
|
|
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
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
-
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
26
|
-
import { cn } from "../../lib/utils";
|
|
27
|
-
function Tabs(_a) {
|
|
28
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
29
|
-
return (_jsx(TabsPrimitive.Root, __assign({ "data-slot": "tabs", className: cn("flex flex-col gap-6", className) }, props)));
|
|
30
|
-
}
|
|
31
|
-
function TabsList(_a) {
|
|
32
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
33
|
-
return (_jsx(TabsPrimitive.List, __assign({ "data-slot": "tabs-list", className: cn("bg-blue-100 !p-1 rounded-lg", className) }, props)));
|
|
34
|
-
}
|
|
35
|
-
function TabsTrigger(_a) {
|
|
36
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
37
|
-
return (_jsx(TabsPrimitive.Trigger, __assign({ "data-slot": "tabs-trigger", className: cn("!py-2 !px-3 transition-all !rounded-sm !text-sm !font-normal !leading-5 w-1/2 max-sm:w-full", "data-[state=active]:bg-blue-600 data-[state=active]:text-blue-50", "data-[state=inactive]:bg-blue-100 data-[state=inactive]:text-blue-600", className) }, props)));
|
|
38
|
-
}
|
|
39
|
-
function TabsContent(_a) {
|
|
40
|
-
var className = _a.className, props = __rest(_a, ["className"]);
|
|
41
|
-
return (_jsx(TabsPrimitive.Content, __assign({ "data-slot": "tabs-content", className: cn("flex-1 outline-none", className) }, props)));
|
|
42
|
-
}
|
|
43
|
-
export { Tabs, TabsList, TabsTrigger, TabsContent };
|