@syscore/ui-library 1.1.10 → 1.1.12
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/client/App.tsx +47 -0
- package/client/components/icons/ConceptIcons.tsx +667 -0
- package/client/components/icons/NavAccount.tsx +31 -0
- package/client/components/icons/NavBullet.tsx +19 -0
- package/client/components/icons/NavLogo.tsx +36 -0
- package/client/components/icons/ProviderBadges.tsx +295 -0
- package/client/components/icons/ProviderSeals.tsx +319 -0
- package/client/components/icons/SealHealthSafetyRating.tsx +65 -0
- package/client/components/icons/SealIwbiMember.tsx +86 -0
- package/client/components/icons/SealWell.tsx +84 -0
- package/client/components/icons/SealWellCertification.tsx +138 -0
- package/client/components/icons/SealWellCommunity.tsx +122 -0
- package/client/components/icons/SealWellResidence.tsx +122 -0
- package/client/components/icons/SealWorksWithWell.tsx +140 -0
- package/client/components/icons/UtilityAccordion.tsx +21 -0
- package/client/components/icons/UtilityChevronDown.tsx +36 -0
- package/client/components/icons/UtilityClassification.tsx +45 -0
- package/client/components/icons/UtilityClose.tsx +41 -0
- package/client/components/icons/UtilityDrag.tsx +69 -0
- package/client/components/icons/UtilityEdit.tsx +42 -0
- package/client/components/icons/UtilityOptions.tsx +45 -0
- package/client/components/icons/UtilityPortfolio.tsx +87 -0
- package/client/components/icons/UtilityReset.tsx +41 -0
- package/client/components/icons/UtilityScoring.tsx +43 -0
- package/client/components/icons/UtilitySearch.tsx +38 -0
- package/client/components/icons/UtilitySort.tsx +52 -0
- package/client/components/icons/UtilityText.tsx +34 -0
- package/client/components/icons/WaterMarkWWWProducts.tsx +26 -0
- package/client/components/icons/WaterMarkWellProjects.tsx +30 -0
- package/client/components/icons/WatermarkMemberOrg.tsx +59 -0
- package/client/components/icons/WellSeal.tsx +79 -0
- package/client/components/icons/X.tsx +35 -0
- package/client/hooks/UseTabs.tsx +35 -0
- package/client/hooks/use-mobile.tsx +21 -0
- package/client/hooks/use-segmented-control.ts +42 -0
- package/client/hooks/use-toast.ts +188 -0
- package/client/pages/Index.tsx +88 -0
- package/client/pages/NotFound.tsx +29 -0
- package/client/ui/Accordion/Accordion.stories.tsx +74 -0
- package/client/ui/Alert/Alert.stories.tsx +82 -0
- package/client/ui/AlertDialog/AlertDialog.stories.tsx +106 -0
- package/client/ui/AspectRatio.stories.tsx +78 -0
- package/client/ui/Avatar/Avatar.stories.tsx +94 -0
- package/client/ui/Badge/Badge.stories.tsx +60 -0
- package/client/ui/Breadcrumb/Breadcrumb.stories.tsx +97 -0
- package/client/ui/Button.stories.tsx +429 -0
- package/client/ui/Calendar/Calendar.stories.tsx +99 -0
- package/client/ui/Card.stories.tsx +84 -0
- package/client/ui/Carousel/Carousel.stories.tsx +85 -0
- package/client/ui/Chart/Chart.stories.tsx +58 -0
- package/client/ui/Checkbox/Checkbox.stories.tsx +112 -0
- package/client/ui/Collapsible/Collapsible.stories.tsx +101 -0
- package/client/ui/Colors.stories.tsx +1041 -0
- package/client/ui/Command/Command.stories.tsx +97 -0
- package/client/ui/ContextMenu/ContextMenu.stories.tsx +74 -0
- package/client/ui/Dialog.stories.tsx +69 -0
- package/client/ui/Drawer/Drawer.stories.tsx +87 -0
- package/client/ui/DropdownMenu/DropdownMenu.stories.tsx +139 -0
- package/client/ui/Form/Form.stories.tsx +74 -0
- package/client/ui/HoverCard/HoverCard.stories.tsx +94 -0
- package/client/ui/Icons.stories.tsx +328 -0
- package/client/ui/Input/Input.stories.tsx +69 -0
- package/client/ui/InputOTP/InputOTP.stories.tsx +85 -0
- package/client/ui/Label.stories.tsx +66 -0
- package/client/ui/Menubar/Menubar.stories.tsx +88 -0
- package/client/ui/Navigation.stories.tsx +57 -0
- package/client/ui/NavigationMenu/NavigationMenu.stories.tsx +106 -0
- package/client/ui/Pagination/Pagination.stories.tsx +115 -0
- package/client/ui/Popover/Popover.stories.tsx +99 -0
- package/client/ui/Progress/Progress.stories.tsx +63 -0
- package/client/ui/RadioGroup/RadioGroup.stories.tsx +110 -0
- package/client/ui/Resizable/Resizable.stories.tsx +88 -0
- package/client/ui/ScrollArea/ScrollArea.stories.tsx +64 -0
- package/client/ui/SearchField.stories.tsx +63 -0
- package/client/ui/Select/Select.stories.tsx +111 -0
- package/client/ui/Separator/Separator.stories.tsx +67 -0
- package/client/ui/Sheet/Sheet.stories.tsx +138 -0
- package/client/ui/Sidebar/Sidebar.stories.tsx +92 -0
- package/client/ui/Skeleton/Skeleton.stories.tsx +65 -0
- package/client/ui/Slider/Slider.stories.tsx +101 -0
- package/client/ui/Sonner/Sonner.stories.tsx +48 -0
- package/client/ui/StrategyTable.stories.tsx +138 -0
- package/client/ui/Switch/Switch.stories.tsx +96 -0
- package/client/ui/Table/Table.stories.tsx +135 -0
- package/client/ui/Tabs.stories.tsx +33 -0
- package/client/ui/Tag.stories.tsx +190 -0
- package/client/ui/Textarea/Textarea.stories.tsx +56 -0
- package/client/ui/Toast/Toast.stories.tsx +76 -0
- package/client/ui/Toaster/Toaster.stories.tsx +52 -0
- package/client/ui/Toggle.stories.tsx +248 -0
- package/client/ui/ToggleGroup/ToggleGroup.stories.tsx +88 -0
- package/client/ui/Tooltip.stories.tsx +72 -0
- package/client/ui/Typography.stories.tsx +421 -0
- package/client/ui/WELLDashboard/WELLDashboard.stories.tsx +115 -0
- package/client/ui/WELLDashboard/index.tsx +317 -0
- package/client/vite-env.d.ts +1 -0
- package/dist/ui/index.cjs.js +1 -1
- package/dist/ui/index.d.ts +10 -1
- package/dist/ui/index.es.js +2233 -447
- package/package.json +2 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
const meta = {
|
|
4
|
+
title: "UI/Chart",
|
|
5
|
+
tags: ["autodocs"],
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: "padded",
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default meta;
|
|
12
|
+
|
|
13
|
+
type Story = StoryObj;
|
|
14
|
+
|
|
15
|
+
export const Default: Story = {
|
|
16
|
+
render: () => (
|
|
17
|
+
<div className="w-full max-w-2xl p-4 border rounded-lg">
|
|
18
|
+
<h3 className="font-semibold mb-4">Chart Component</h3>
|
|
19
|
+
<p className="text-sm text-gray-600 mb-4">
|
|
20
|
+
Chart component for data visualization. This can be configured with
|
|
21
|
+
various chart types and data sets.
|
|
22
|
+
</p>
|
|
23
|
+
<div className="bg-gray-50 p-8 rounded text-center text-gray-500">
|
|
24
|
+
Chart visualization would be rendered here
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
),
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const Placeholder: Story = {
|
|
31
|
+
render: () => (
|
|
32
|
+
<div className="space-y-4 w-full max-w-2xl">
|
|
33
|
+
<div className="p-4 border rounded-lg">
|
|
34
|
+
<h4 className="font-medium mb-2">Bar Chart</h4>
|
|
35
|
+
<div className="bg-gray-100 h-40 rounded flex items-end gap-2 p-4">
|
|
36
|
+
{[60, 85, 45, 90, 70].map((height, i) => (
|
|
37
|
+
<div
|
|
38
|
+
key={i}
|
|
39
|
+
className="flex-1 bg-blue-500 rounded-t"
|
|
40
|
+
style={{ height: `${height * 1.5}px` }}
|
|
41
|
+
></div>
|
|
42
|
+
))}
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div className="p-4 border rounded-lg">
|
|
46
|
+
<h4 className="font-medium mb-2">Line Chart</h4>
|
|
47
|
+
<svg className="w-full h-40" viewBox="0 0 400 100">
|
|
48
|
+
<polyline
|
|
49
|
+
fill="none"
|
|
50
|
+
stroke="#3b82f6"
|
|
51
|
+
strokeWidth="2"
|
|
52
|
+
points="0,80 50,60 100,70 150,40 200,50 250,30 300,45 350,20 400,35"
|
|
53
|
+
/>
|
|
54
|
+
</svg>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
),
|
|
58
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Checkbox } from "../../components/ui/checkbox";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
|
|
5
|
+
const meta = {
|
|
6
|
+
title: "UI/Checkbox",
|
|
7
|
+
component: Checkbox,
|
|
8
|
+
tags: ["autodocs"],
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "centered",
|
|
11
|
+
},
|
|
12
|
+
} satisfies Meta<typeof Checkbox>;
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
|
|
18
|
+
export const Default: Story = {
|
|
19
|
+
render: () => {
|
|
20
|
+
const [checked, setChecked] = useState(false);
|
|
21
|
+
return <Checkbox checked={checked} onCheckedChange={setChecked} />;
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const Checked: Story = {
|
|
26
|
+
render: () => {
|
|
27
|
+
const [checked, setChecked] = useState(true);
|
|
28
|
+
return <Checkbox checked={checked} onCheckedChange={setChecked} />;
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const Disabled: Story = {
|
|
33
|
+
render: () => <Checkbox disabled />,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const DisabledAndChecked: Story = {
|
|
37
|
+
render: () => <Checkbox disabled checked />,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export const WithLabel: Story = {
|
|
41
|
+
render: () => {
|
|
42
|
+
const [checked, setChecked] = useState(false);
|
|
43
|
+
return (
|
|
44
|
+
<div className="flex items-center space-x-2">
|
|
45
|
+
<Checkbox id="terms" checked={checked} onCheckedChange={setChecked} />
|
|
46
|
+
<label
|
|
47
|
+
htmlFor="terms"
|
|
48
|
+
className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
49
|
+
>
|
|
50
|
+
Accept terms and conditions
|
|
51
|
+
</label>
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const Multiple: Story = {
|
|
58
|
+
render: () => {
|
|
59
|
+
const [checked, setChecked] = useState({
|
|
60
|
+
terms: false,
|
|
61
|
+
newsletter: false,
|
|
62
|
+
privacy: false,
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<div className="space-y-3">
|
|
67
|
+
<div className="flex items-center space-x-2">
|
|
68
|
+
<Checkbox
|
|
69
|
+
id="terms"
|
|
70
|
+
checked={checked.terms}
|
|
71
|
+
onCheckedChange={(value) =>
|
|
72
|
+
setChecked({ ...checked, terms: Boolean(value) })
|
|
73
|
+
}
|
|
74
|
+
/>
|
|
75
|
+
<label htmlFor="terms" className="text-sm font-medium cursor-pointer">
|
|
76
|
+
I agree to the terms
|
|
77
|
+
</label>
|
|
78
|
+
</div>
|
|
79
|
+
<div className="flex items-center space-x-2">
|
|
80
|
+
<Checkbox
|
|
81
|
+
id="newsletter"
|
|
82
|
+
checked={checked.newsletter}
|
|
83
|
+
onCheckedChange={(value) =>
|
|
84
|
+
setChecked({ ...checked, newsletter: Boolean(value) })
|
|
85
|
+
}
|
|
86
|
+
/>
|
|
87
|
+
<label
|
|
88
|
+
htmlFor="newsletter"
|
|
89
|
+
className="text-sm font-medium cursor-pointer"
|
|
90
|
+
>
|
|
91
|
+
Subscribe to newsletter
|
|
92
|
+
</label>
|
|
93
|
+
</div>
|
|
94
|
+
<div className="flex items-center space-x-2">
|
|
95
|
+
<Checkbox
|
|
96
|
+
id="privacy"
|
|
97
|
+
checked={checked.privacy}
|
|
98
|
+
onCheckedChange={(value) =>
|
|
99
|
+
setChecked({ ...checked, privacy: Boolean(value) })
|
|
100
|
+
}
|
|
101
|
+
/>
|
|
102
|
+
<label
|
|
103
|
+
htmlFor="privacy"
|
|
104
|
+
className="text-sm font-medium cursor-pointer"
|
|
105
|
+
>
|
|
106
|
+
Accept privacy policy
|
|
107
|
+
</label>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
);
|
|
111
|
+
},
|
|
112
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import {
|
|
3
|
+
Collapsible,
|
|
4
|
+
CollapsibleTrigger,
|
|
5
|
+
CollapsibleContent,
|
|
6
|
+
} from "../../components/ui/collapsible";
|
|
7
|
+
import { Button } from "../../components/ui/button";
|
|
8
|
+
import { ChevronDown } from "lucide-react";
|
|
9
|
+
import { useState } from "react";
|
|
10
|
+
|
|
11
|
+
const meta = {
|
|
12
|
+
title: "UI/Collapsible",
|
|
13
|
+
component: Collapsible,
|
|
14
|
+
tags: ["autodocs"],
|
|
15
|
+
parameters: {
|
|
16
|
+
layout: "padded",
|
|
17
|
+
},
|
|
18
|
+
} satisfies Meta<typeof Collapsible>;
|
|
19
|
+
|
|
20
|
+
export default meta;
|
|
21
|
+
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
|
|
24
|
+
export const Default: Story = {
|
|
25
|
+
render: () => {
|
|
26
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
27
|
+
return (
|
|
28
|
+
<Collapsible
|
|
29
|
+
open={isOpen}
|
|
30
|
+
onOpenChange={setIsOpen}
|
|
31
|
+
className="w-full max-w-sm space-y-2"
|
|
32
|
+
>
|
|
33
|
+
<div className="flex items-center justify-between space-x-4 px-4">
|
|
34
|
+
<h4 className="text-sm font-semibold">Show Details</h4>
|
|
35
|
+
<CollapsibleTrigger asChild>
|
|
36
|
+
<Button variant="ghost" size="sm" className="w-9 p-0">
|
|
37
|
+
<ChevronDown className="h-4 w-4" />
|
|
38
|
+
<span className="sr-only">Toggle</span>
|
|
39
|
+
</Button>
|
|
40
|
+
</CollapsibleTrigger>
|
|
41
|
+
</div>
|
|
42
|
+
<CollapsibleContent className="space-y-2">
|
|
43
|
+
<div className="rounded-md border px-4 py-3 text-sm">
|
|
44
|
+
This is the hidden content that appears when expanded.
|
|
45
|
+
</div>
|
|
46
|
+
<div className="rounded-md border px-4 py-3 text-sm">
|
|
47
|
+
You can put multiple elements inside the collapsible content.
|
|
48
|
+
</div>
|
|
49
|
+
</CollapsibleContent>
|
|
50
|
+
</Collapsible>
|
|
51
|
+
);
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const Multiple: Story = {
|
|
56
|
+
render: () => {
|
|
57
|
+
const [openItems, setOpenItems] = useState({ item1: false, item2: false });
|
|
58
|
+
|
|
59
|
+
const toggleItem = (key: string) => {
|
|
60
|
+
setOpenItems((prev) => ({ ...prev, [key]: !prev[key] }));
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<div className="space-y-4 w-full max-w-sm">
|
|
65
|
+
<Collapsible
|
|
66
|
+
open={openItems.item1}
|
|
67
|
+
onOpenChange={() => toggleItem("item1")}
|
|
68
|
+
>
|
|
69
|
+
<CollapsibleTrigger asChild>
|
|
70
|
+
<Button variant="ghost" className="w-full justify-start">
|
|
71
|
+
<ChevronDown
|
|
72
|
+
className={`h-4 w-4 mr-2 transition-transform ${openItems.item1 ? "rotate-180" : ""}`}
|
|
73
|
+
/>
|
|
74
|
+
Section 1
|
|
75
|
+
</Button>
|
|
76
|
+
</CollapsibleTrigger>
|
|
77
|
+
<CollapsibleContent className="pl-6 space-y-2">
|
|
78
|
+
<p className="text-sm">Content for section 1</p>
|
|
79
|
+
</CollapsibleContent>
|
|
80
|
+
</Collapsible>
|
|
81
|
+
|
|
82
|
+
<Collapsible
|
|
83
|
+
open={openItems.item2}
|
|
84
|
+
onOpenChange={() => toggleItem("item2")}
|
|
85
|
+
>
|
|
86
|
+
<CollapsibleTrigger asChild>
|
|
87
|
+
<Button variant="ghost" className="w-full justify-start">
|
|
88
|
+
<ChevronDown
|
|
89
|
+
className={`h-4 w-4 mr-2 transition-transform ${openItems.item2 ? "rotate-180" : ""}`}
|
|
90
|
+
/>
|
|
91
|
+
Section 2
|
|
92
|
+
</Button>
|
|
93
|
+
</CollapsibleTrigger>
|
|
94
|
+
<CollapsibleContent className="pl-6 space-y-2">
|
|
95
|
+
<p className="text-sm">Content for section 2</p>
|
|
96
|
+
</CollapsibleContent>
|
|
97
|
+
</Collapsible>
|
|
98
|
+
</div>
|
|
99
|
+
);
|
|
100
|
+
},
|
|
101
|
+
};
|