blixify-ui-web-mcp 0.1.18 → 0.1.19
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/lib/components/action/button/button.stories.tsx +35 -18
- package/lib/components/action/buttonGroup/buttonGroup.stories.tsx +79 -7
- package/lib/components/action/iconButton/README.md +1 -0
- package/lib/components/action/iconButton/iconButton.stories.tsx +3 -3
- package/lib/components/action/radioList/radioList.stories.tsx +7 -7
- package/lib/components/action/slider/slider.stories.tsx +6 -6
- package/lib/components/action/textButton/textButton.stories.tsx +3 -3
- package/lib/components/action/toggle/toggle.stories.tsx +3 -3
- package/lib/components/advanced/collapse/collapse.stories.tsx +238 -16
- package/lib/components/advanced/infoWindow/infoWindow.stories.tsx +7 -7
- package/lib/components/advanced/popUp/README.md +12 -0
- package/lib/components/advanced/popUp/popUp.stories.tsx +6 -6
- package/lib/components/auth/bareSignIn/bareSignIn.stories.tsx +8 -8
- package/lib/components/auth/bareSignUp/bareSignUp.stories.tsx +4 -4
- package/lib/components/chart/areaChart/areaChart.stories.tsx +6 -6
- package/lib/components/chart/barChart/barChart.stories.tsx +6 -6
- package/lib/components/chart/boxPlotChart/boxPlotChart.stories.tsx +4 -4
- package/lib/components/chart/bubbleChart/bubbleChart.stories.tsx +4 -4
- package/lib/components/chart/card/card.stories.tsx +170 -30
- package/lib/components/chart/ganttChart/ganttChart.stories.tsx +7 -7
- package/lib/components/chart/heatmapChart/heatmapChart.stories.tsx +8 -8
- package/lib/components/chart/lineChart/lineChart.stories.tsx +5 -5
- package/lib/components/chart/pieChart/pieChart.stories.tsx +8 -8
- package/lib/components/chart/polarAreaChart/polarAreaChart.stories.tsx +4 -4
- package/lib/components/chart/radarChart/radarChart.stories.tsx +3 -3
- package/lib/components/chart/rangeBarChart/rangeBarChart.stories.tsx +5 -5
- package/lib/components/chart/statsCard/statsCard.stories.tsx +9 -9
- package/lib/components/chart/treemapChart/treemapChart.stories.tsx +4 -4
- package/lib/components/chat/chatAnchor/README.md +7 -0
- package/lib/components/chat/chatAnchor/chatAnchor.stories.tsx +3 -3
- package/lib/components/chat/chatBase/chatBase.stories.tsx +15 -15
- package/lib/components/chat/chatDashboard/chatDashboard.stories.tsx +5 -5
- package/lib/components/data/dataGraph/dataGraph.stories.tsx +5 -5
- package/lib/components/data/dataReference/dataReference.stories.tsx +6 -6
- package/lib/components/data/dataTemplate/README.md +361 -74
- package/lib/components/data/dataTemplate/dataModule.stories.tsx +7 -6
- package/lib/components/data/dataTemplate/dataTemplate.stories.tsx +18 -26
- package/lib/components/data/dataWrapper/README.md +205 -83
- package/lib/components/data/dataWrapper/dataWrapper.consumer.stories.tsx +2125 -0
- package/lib/components/data/dataWrapper/dataWrapper.edit.stories.tsx +607 -0
- package/lib/components/data/dataWrapper/dataWrapper.utils.stories.tsx +576 -0
- package/lib/components/data/dataWrapper/dataWrapper.view.stories.tsx +1273 -0
- package/lib/components/data/flexFilter/flexFilter.stories.tsx +171 -0
- package/lib/components/data/queryForm/queryForm.stories.tsx +3 -3
- package/lib/components/data/readQuery/readQuery.stories.tsx +3 -3
- package/lib/components/data/readQueryHoc/readQueryHoc.stories.tsx +3 -3
- package/lib/components/data/writeQuery/README.md +21 -10
- package/lib/components/data/writeQuery/writeQuery.stories.tsx +3 -3
- package/lib/components/design/actionSection/actionSection.stories.tsx +5 -5
- package/lib/components/design/banner/banner.stories.tsx +3 -3
- package/lib/components/design/bannerAction/bannerAction.stories.tsx +98 -13
- package/lib/components/design/blogSection/blogSection.stories.tsx +3 -3
- package/lib/components/design/carouselSection/carouselSection.stories.tsx +3 -3
- package/lib/components/design/designList/designList.stories.tsx +3 -3
- package/lib/components/design/faq/faq.stories.tsx +51 -23
- package/lib/components/design/fileGrid/fileGrid.stories.tsx +7 -7
- package/lib/components/design/fileViewer/fileViewer.stories.tsx +3 -3
- package/lib/components/design/footerSection/footerSection.stories.tsx +3 -3
- package/lib/components/design/googleReview/googleReview.stories.tsx +3 -3
- package/lib/components/design/heroSection/heroSection.stories.tsx +7 -7
- package/lib/components/design/iconList/iconList.stories.tsx +3 -3
- package/lib/components/design/imageGallery/imageGallery.stories.tsx +3 -3
- package/lib/components/design/imageZoom/imageZoom.stories.tsx +3 -3
- package/lib/components/design/leftContent/leftContent.stories.tsx +3 -3
- package/lib/components/design/logoCloud/logoCloud.stories.tsx +3 -3
- package/lib/components/design/onboarding/onboarding.stories.tsx +5 -5
- package/lib/components/design/pricing/pricing.stories.tsx +3 -3
- package/lib/components/design/rightContent/rightContent.stories.tsx +3 -3
- package/lib/components/design/sectionList/sectionList.stories.tsx +3 -3
- package/lib/components/design/teams/teams.stories.tsx +3 -3
- package/lib/components/display/alert/alert.stories.tsx +5 -5
- package/lib/components/display/calendar/calendar.stories.tsx +9 -9
- package/lib/components/display/clipboard/clipboard.stories.tsx +3 -3
- package/lib/components/display/detailList/detailList.stories.tsx +167 -38
- package/lib/components/display/drawer/README.md +44 -11
- package/lib/components/display/drawer/drawer.stories.tsx +69 -9
- package/lib/components/display/emptyState/emptyState.stories.tsx +45 -7
- package/lib/components/display/feeds/feeds.stories.tsx +3 -3
- package/lib/components/display/flexTable/flexTable.stories.tsx +210 -15
- package/lib/components/display/grid/README.md +4 -6
- package/lib/components/display/grid/grid.stories.tsx +13 -14
- package/lib/components/display/kanban/kanban.stories.tsx +4 -4
- package/lib/components/display/list/list.stories.tsx +8 -8
- package/lib/components/display/loading/loading.stories.tsx +3 -3
- package/lib/components/display/mapView/mapView.stories.tsx +6 -6
- package/lib/components/display/modal/modal.stories.tsx +3 -3
- package/lib/components/display/newCalendar/README.md +163 -0
- package/lib/components/display/newCalendar/newCalendar.stories.tsx +292 -0
- package/lib/components/display/newFeeds/README.md +53 -0
- package/lib/components/display/newFeeds/newFeeds.stories.tsx +104 -0
- package/lib/components/display/newKanban/README.md +25 -0
- package/lib/components/display/newKanban/newKanban.stories.tsx +131 -0
- package/lib/components/display/newList/README.md +30 -0
- package/lib/components/display/newList/newList.stories.tsx +231 -0
- package/lib/components/display/newPagination/README.md +15 -0
- package/lib/components/display/newTable/README.md +121 -0
- package/lib/components/display/newTable/newTable.stories.tsx +551 -0
- package/lib/components/display/notification/notification.stories.tsx +3 -3
- package/lib/components/display/progress/progress.stories.tsx +3 -3
- package/lib/components/display/stepper/README.md +4 -0
- package/lib/components/display/stepper/stepper.stories.tsx +67 -15
- package/lib/components/display/table/table.stories.tsx +28 -24
- package/lib/components/display/tag/tag.stories.tsx +31 -31
- package/lib/components/input/address/address.stories.tsx +9 -9
- package/lib/components/input/canvas/canvas.stories.tsx +9 -9
- package/lib/components/input/checkbox/checkbox.stories.tsx +4 -4
- package/lib/components/input/datePicker/datePicker.stories.tsx +38 -2
- package/lib/components/input/form/form.stories.tsx +8 -8
- package/lib/components/input/markdown/README.md +80 -2
- package/lib/components/input/markdown/markdown.stories.tsx +81 -25
- package/lib/components/input/monthYearPicker/monthYearPicker.stories.tsx +50 -16
- package/lib/components/input/netPromoterScore/netPromoterScore.stories.tsx +3 -3
- package/lib/components/input/rating/rating.stories.tsx +3 -3
- package/lib/components/input/select/README.md +2 -1
- package/lib/components/input/select/select.stories.tsx +30 -30
- package/lib/components/input/signature/signature.stories.tsx +9 -9
- package/lib/components/input/textArea/textArea.stories.tsx +3 -3
- package/lib/components/input/textInput/textinput.stories.tsx +11 -11
- package/lib/components/input/uploadInput/uploadInput.stories.tsx +14 -14
- package/lib/components/navigation/bars/README.md +27 -0
- package/lib/components/navigation/bars/bars.stories.tsx +54 -11
- package/lib/components/navigation/bottomTab/bottomTab.stories.tsx +3 -3
- package/lib/components/navigation/breadcrumb/breadcrumb.stories.tsx +5 -5
- package/lib/components/navigation/header/header.stories.tsx +11 -11
- package/lib/components/navigation/leftNav/leftNav.stories.tsx +7 -7
- package/lib/components/navigation/tabs/tabs.stories.tsx +7 -7
- package/lib/components/structure/column/column.stories.tsx +6 -6
- package/lib/components/structure/container/container.stories.tsx +4 -4
- package/lib/components/structure/link/link.stories.tsx +8 -8
- package/lib/components/structure/text/text.stories.tsx +8 -8
- package/lib/components/template/calendarView/calendarView.stories.tsx +726 -0
- package/lib/components/template/chatDashboard/chatDashboard.stories.tsx +497 -0
- package/lib/components/template/landingPage/landingPage.stories.tsx +2 -1
- package/lib/components/template/mapLayout/mapLayout.stories.tsx +519 -0
- package/lib/components/template/userHomePage/userHomePage.stories.tsx +380 -521
- package/lib/components/template/userRankingDashboard/userRankingDashboard.stories.tsx +142 -66
- package/lib/mcp/tools/componentsRoot.d.ts +2 -0
- package/lib/mcp/tools/componentsRoot.d.ts.map +1 -0
- package/lib/mcp/tools/componentsRoot.js +59 -0
- package/lib/mcp/tools/componentsRoot.js.map +1 -0
- package/lib/mcp/tools/getBackendComponent.d.ts.map +1 -1
- package/lib/mcp/tools/getBackendComponent.js +2 -5
- package/lib/mcp/tools/getBackendComponent.js.map +1 -1
- package/lib/mcp/tools/getComponent.d.ts.map +1 -1
- package/lib/mcp/tools/getComponent.js +2 -5
- package/lib/mcp/tools/getComponent.js.map +1 -1
- package/lib/mcp/tools/listComponents.d.ts.map +1 -1
- package/lib/mcp/tools/listComponents.js +15 -10
- package/lib/mcp/tools/listComponents.js.map +1 -1
- package/lib/mcp/tools/suggestTemplate.d.ts.map +1 -1
- package/lib/mcp/tools/suggestTemplate.js +107 -21
- package/lib/mcp/tools/suggestTemplate.js.map +1 -1
- package/package.json +1 -1
- package/lib/components/data/dataWrapper/dataWrapper.stories.tsx +0 -600
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Button } from ".";
|
|
2
|
+
import { Button as ButtonImpl } from ".";
|
|
3
3
|
import { StorySection } from "../../storyUtils";
|
|
4
4
|
|
|
5
5
|
const meta = { title: "Action/Button" };
|
|
6
6
|
export default meta;
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
export const
|
|
9
|
+
export const Button = () => (
|
|
10
10
|
<div className="font-sans max-w-2xl p-6">
|
|
11
11
|
<StorySection
|
|
12
12
|
title="Button Types"
|
|
@@ -19,11 +19,28 @@ export const ButtonStory = () => (
|
|
|
19
19
|
</>
|
|
20
20
|
}
|
|
21
21
|
>
|
|
22
|
-
<
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
<
|
|
22
|
+
<ButtonImpl text="Normal" size="small" type="normal" />
|
|
23
|
+
<ButtonImpl text="Dark" size="small" type="dark" />
|
|
24
|
+
<ButtonImpl text="Light" size="small" type="light" />
|
|
25
|
+
<ButtonImpl text="Icon" size="small" type="icon" />
|
|
26
|
+
<ButtonImpl text="Danger" size="small" type="danger" />
|
|
27
|
+
</StorySection>
|
|
28
|
+
|
|
29
|
+
<StorySection
|
|
30
|
+
title="Pill"
|
|
31
|
+
description={
|
|
32
|
+
<>
|
|
33
|
+
Use <code>type="pill"</code> for a chip-style affordance — useful as
|
|
34
|
+
a standalone primary tag or call-out. For a selectable row of pills
|
|
35
|
+
(one active at a time) use{" "}
|
|
36
|
+
<code>{`<ButtonGroup variant="pill" />`}</code> instead, since
|
|
37
|
+
selection state lives at the group level.
|
|
38
|
+
</>
|
|
39
|
+
}
|
|
40
|
+
>
|
|
41
|
+
<ButtonImpl text="Add entry" type="pill" />
|
|
42
|
+
<ButtonImpl text="New record" type="pill" />
|
|
43
|
+
<ButtonImpl text="Sync" type="pill" disable />
|
|
27
44
|
</StorySection>
|
|
28
45
|
|
|
29
46
|
<StorySection
|
|
@@ -36,7 +53,7 @@ export const ButtonStory = () => (
|
|
|
36
53
|
}
|
|
37
54
|
dark
|
|
38
55
|
>
|
|
39
|
-
<
|
|
56
|
+
<ButtonImpl text="Dark Mode" size="small" type="darkMode" />
|
|
40
57
|
</StorySection>
|
|
41
58
|
|
|
42
59
|
<StorySection
|
|
@@ -49,9 +66,9 @@ export const ButtonStory = () => (
|
|
|
49
66
|
}
|
|
50
67
|
>
|
|
51
68
|
<div className="flex flex-wrap gap-3 items-end">
|
|
52
|
-
<
|
|
53
|
-
<
|
|
54
|
-
<
|
|
69
|
+
<ButtonImpl text="Default" type="normal" />
|
|
70
|
+
<ButtonImpl text="Small" size="small" type="normal" />
|
|
71
|
+
<ButtonImpl text="Extra Small" size="extraSmall" type="normal" />
|
|
55
72
|
</div>
|
|
56
73
|
</StorySection>
|
|
57
74
|
|
|
@@ -64,13 +81,13 @@ export const ButtonStory = () => (
|
|
|
64
81
|
</>
|
|
65
82
|
}
|
|
66
83
|
>
|
|
67
|
-
<
|
|
84
|
+
<ButtonImpl
|
|
68
85
|
text="Add Item"
|
|
69
86
|
size="small"
|
|
70
87
|
type="normal"
|
|
71
88
|
icon={<span className="mr-1.5">+</span>}
|
|
72
89
|
/>
|
|
73
|
-
<
|
|
90
|
+
<ButtonImpl
|
|
74
91
|
text="Settings"
|
|
75
92
|
size="small"
|
|
76
93
|
type="icon"
|
|
@@ -89,7 +106,7 @@ export const ButtonStory = () => (
|
|
|
89
106
|
</>
|
|
90
107
|
}
|
|
91
108
|
>
|
|
92
|
-
<
|
|
109
|
+
<ButtonImpl
|
|
93
110
|
text="Opens Below Left"
|
|
94
111
|
size="small"
|
|
95
112
|
type="normal"
|
|
@@ -101,7 +118,7 @@ export const ButtonStory = () => (
|
|
|
101
118
|
popUpDirection="bottom"
|
|
102
119
|
popUpAnchor="left"
|
|
103
120
|
/>
|
|
104
|
-
<
|
|
121
|
+
<ButtonImpl
|
|
105
122
|
text="Opens Below Right"
|
|
106
123
|
size="small"
|
|
107
124
|
type="light"
|
|
@@ -124,9 +141,9 @@ export const ButtonStory = () => (
|
|
|
124
141
|
</>
|
|
125
142
|
}
|
|
126
143
|
>
|
|
127
|
-
<
|
|
128
|
-
<
|
|
129
|
-
<
|
|
144
|
+
<ButtonImpl text="Normal" size="small" type="normal" disable={true} />
|
|
145
|
+
<ButtonImpl text="Light" size="small" type="light" disable={true} />
|
|
146
|
+
<ButtonImpl text="Danger" size="small" type="danger" disable={true} />
|
|
130
147
|
</StorySection>
|
|
131
148
|
</div>
|
|
132
149
|
)
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ArrowDownTrayIcon,
|
|
3
|
+
ArrowPathIcon,
|
|
4
|
+
PlusIcon,
|
|
5
|
+
SparklesIcon,
|
|
6
|
+
} from "@heroicons/react/24/outline";
|
|
1
7
|
import React, { useState } from "react";
|
|
2
|
-
import { ButtonGroup } from ".";
|
|
8
|
+
import { ButtonGroup as ButtonGroupImpl } from ".";
|
|
3
9
|
import { StorySection } from "../../storyUtils";
|
|
4
10
|
|
|
5
11
|
const meta = { title: "Action/Button Group" };
|
|
@@ -12,7 +18,7 @@ const defaultSelection = [
|
|
|
12
18
|
{ id: "item3", name: "Item 3" },
|
|
13
19
|
];
|
|
14
20
|
|
|
15
|
-
export const
|
|
21
|
+
export const ButtonGroup = () => {
|
|
16
22
|
const [selectedId, setSelectedId] = useState("item1");
|
|
17
23
|
|
|
18
24
|
return (
|
|
@@ -21,7 +27,7 @@ export const ButtonGroupStory = () => {
|
|
|
21
27
|
title="Default"
|
|
22
28
|
description="Standard segmented button group. Each item is a bordered button; the selected item is highlighted with the primary color ring."
|
|
23
29
|
>
|
|
24
|
-
<
|
|
30
|
+
<ButtonGroupImpl
|
|
25
31
|
selection={defaultSelection}
|
|
26
32
|
containerClassName="w-full"
|
|
27
33
|
onClick={setSelectedId}
|
|
@@ -38,7 +44,7 @@ export const ButtonGroupStory = () => {
|
|
|
38
44
|
</>
|
|
39
45
|
}
|
|
40
46
|
>
|
|
41
|
-
<
|
|
47
|
+
<ButtonGroupImpl
|
|
42
48
|
selection={defaultSelection}
|
|
43
49
|
containerClassName="w-full"
|
|
44
50
|
onClick={setSelectedId}
|
|
@@ -57,14 +63,14 @@ export const ButtonGroupStory = () => {
|
|
|
57
63
|
</>
|
|
58
64
|
}
|
|
59
65
|
>
|
|
60
|
-
<
|
|
66
|
+
<ButtonGroupImpl
|
|
61
67
|
selection={defaultSelection}
|
|
62
68
|
containerClassName="w-full"
|
|
63
69
|
onClick={setSelectedId}
|
|
64
70
|
selectedId={selectedId}
|
|
65
71
|
variant="tag"
|
|
66
72
|
/>
|
|
67
|
-
<
|
|
73
|
+
<ButtonGroupImpl
|
|
68
74
|
selection={defaultSelection}
|
|
69
75
|
containerClassName="w-full"
|
|
70
76
|
onClick={setSelectedId}
|
|
@@ -74,6 +80,72 @@ export const ButtonGroupStory = () => {
|
|
|
74
80
|
/>
|
|
75
81
|
</StorySection>
|
|
76
82
|
|
|
83
|
+
<StorySection
|
|
84
|
+
title="Variant: Pill"
|
|
85
|
+
description={
|
|
86
|
+
<>
|
|
87
|
+
Use <code>variant="pill"</code> for a chip-style row of toggleable
|
|
88
|
+
actions — typical for quick-action bars on home pages. Items render
|
|
89
|
+
with a rounded-full primary chip; the selected one fills with{" "}
|
|
90
|
+
<code>primary-500</code>. Each <code>Selection</code> can pass an{" "}
|
|
91
|
+
<code>icon</code> to render before the label.
|
|
92
|
+
</>
|
|
93
|
+
}
|
|
94
|
+
>
|
|
95
|
+
<ButtonGroupImpl
|
|
96
|
+
selection={[
|
|
97
|
+
{
|
|
98
|
+
id: "add",
|
|
99
|
+
name: "Add entry",
|
|
100
|
+
icon: (
|
|
101
|
+
<PlusIcon
|
|
102
|
+
className={`h-4 w-4 ${
|
|
103
|
+
selectedId === "add" ? "text-white" : "text-primary-600"
|
|
104
|
+
}`}
|
|
105
|
+
/>
|
|
106
|
+
),
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: "new",
|
|
110
|
+
name: "New record",
|
|
111
|
+
icon: (
|
|
112
|
+
<SparklesIcon
|
|
113
|
+
className={`h-4 w-4 ${
|
|
114
|
+
selectedId === "new" ? "text-white" : "text-primary-600"
|
|
115
|
+
}`}
|
|
116
|
+
/>
|
|
117
|
+
),
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
id: "sync",
|
|
121
|
+
name: "Sync",
|
|
122
|
+
icon: (
|
|
123
|
+
<ArrowPathIcon
|
|
124
|
+
className={`h-4 w-4 ${
|
|
125
|
+
selectedId === "sync" ? "text-white" : "text-primary-600"
|
|
126
|
+
}`}
|
|
127
|
+
/>
|
|
128
|
+
),
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: "export",
|
|
132
|
+
name: "Export",
|
|
133
|
+
icon: (
|
|
134
|
+
<ArrowDownTrayIcon
|
|
135
|
+
className={`h-4 w-4 ${
|
|
136
|
+
selectedId === "export" ? "text-white" : "text-primary-600"
|
|
137
|
+
}`}
|
|
138
|
+
/>
|
|
139
|
+
),
|
|
140
|
+
},
|
|
141
|
+
]}
|
|
142
|
+
containerClassName="w-full"
|
|
143
|
+
onClick={setSelectedId}
|
|
144
|
+
selectedId={selectedId}
|
|
145
|
+
variant="pill"
|
|
146
|
+
/>
|
|
147
|
+
</StorySection>
|
|
148
|
+
|
|
77
149
|
<StorySection
|
|
78
150
|
title="Dark Mode"
|
|
79
151
|
description={
|
|
@@ -85,7 +157,7 @@ export const ButtonGroupStory = () => {
|
|
|
85
157
|
}
|
|
86
158
|
dark
|
|
87
159
|
>
|
|
88
|
-
<
|
|
160
|
+
<ButtonGroupImpl
|
|
89
161
|
selection={defaultSelection}
|
|
90
162
|
containerClassName="w-full"
|
|
91
163
|
onClick={setSelectedId}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Bars3Icon } from "@heroicons/react/24/solid";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { IconButton } from ".";
|
|
3
|
+
import { IconButton as IconButtonImpl } from ".";
|
|
4
4
|
|
|
5
5
|
const meta = { title: "Action/Icon Button" };
|
|
6
6
|
export default meta;
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
export const
|
|
9
|
+
export const IconButton = () => {
|
|
10
10
|
return (
|
|
11
|
-
<
|
|
11
|
+
<IconButtonImpl
|
|
12
12
|
icon={<Bars3Icon className="h-5 w-5 text-gray-400" />}
|
|
13
13
|
onClick={() => {}}
|
|
14
14
|
/>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import { RadioList, RadioListItem } from ".";
|
|
2
|
+
import { RadioList as RadioListImpl, RadioListItem } from ".";
|
|
3
3
|
import { TextButton } from "../textButton";
|
|
4
4
|
import { StorySection } from "../../storyUtils";
|
|
5
5
|
|
|
@@ -46,7 +46,7 @@ const baseList: RadioListItem[] = [
|
|
|
46
46
|
},
|
|
47
47
|
];
|
|
48
48
|
|
|
49
|
-
export const
|
|
49
|
+
export const RadioList = () => {
|
|
50
50
|
const [singleValue, setSingleValue] = useState("");
|
|
51
51
|
const [multiValue, setMultiValue] = useState<string[]>([]);
|
|
52
52
|
|
|
@@ -63,7 +63,7 @@ export const RadioListStory = () => {
|
|
|
63
63
|
}
|
|
64
64
|
>
|
|
65
65
|
<div className="w-full">
|
|
66
|
-
<
|
|
66
|
+
<RadioListImpl
|
|
67
67
|
id="single-vertical"
|
|
68
68
|
list={baseList}
|
|
69
69
|
value={singleValue}
|
|
@@ -89,7 +89,7 @@ export const RadioListStory = () => {
|
|
|
89
89
|
}
|
|
90
90
|
>
|
|
91
91
|
<div className="w-full">
|
|
92
|
-
<
|
|
92
|
+
<RadioListImpl
|
|
93
93
|
id="single-horizontal"
|
|
94
94
|
list={baseList}
|
|
95
95
|
value={singleValue}
|
|
@@ -111,7 +111,7 @@ export const RadioListStory = () => {
|
|
|
111
111
|
}
|
|
112
112
|
>
|
|
113
113
|
<div className="w-full">
|
|
114
|
-
<
|
|
114
|
+
<RadioListImpl
|
|
115
115
|
id="multi"
|
|
116
116
|
list={baseList}
|
|
117
117
|
value={multiValue}
|
|
@@ -136,7 +136,7 @@ export const RadioListStory = () => {
|
|
|
136
136
|
}
|
|
137
137
|
>
|
|
138
138
|
<div className="w-full">
|
|
139
|
-
<
|
|
139
|
+
<RadioListImpl
|
|
140
140
|
id="new-value"
|
|
141
141
|
list={baseList}
|
|
142
142
|
value={multiValue}
|
|
@@ -159,7 +159,7 @@ export const RadioListStory = () => {
|
|
|
159
159
|
}
|
|
160
160
|
>
|
|
161
161
|
<div className="w-full">
|
|
162
|
-
<
|
|
162
|
+
<RadioListImpl
|
|
163
163
|
id="disabled-items"
|
|
164
164
|
list={baseList.map((item, i) =>
|
|
165
165
|
i === 1 || i === 3 ? { ...item, disabled: true } : item
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import { Slider } from ".";
|
|
2
|
+
import { Slider as SliderImpl } from ".";
|
|
3
3
|
import { StorySection } from "../../storyUtils";
|
|
4
4
|
|
|
5
5
|
const meta = { title: "Action/Slider" };
|
|
6
6
|
export default meta;
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
export const
|
|
9
|
+
export const Slider = () => {
|
|
10
10
|
const [single, setSingle] = useState("50");
|
|
11
11
|
const [steppedValue, setSteppedValue] = useState("50");
|
|
12
12
|
const [rangeMin, setRangeMin] = useState("20");
|
|
@@ -28,7 +28,7 @@ export const SliderStory = () => {
|
|
|
28
28
|
}
|
|
29
29
|
>
|
|
30
30
|
<div className="w-full space-y-2">
|
|
31
|
-
<
|
|
31
|
+
<SliderImpl
|
|
32
32
|
value={single}
|
|
33
33
|
minValue="0"
|
|
34
34
|
maxValue="100"
|
|
@@ -50,7 +50,7 @@ export const SliderStory = () => {
|
|
|
50
50
|
}
|
|
51
51
|
>
|
|
52
52
|
<div className="w-full space-y-2">
|
|
53
|
-
<
|
|
53
|
+
<SliderImpl
|
|
54
54
|
value={steppedValue}
|
|
55
55
|
minValue="0"
|
|
56
56
|
maxValue="100"
|
|
@@ -76,7 +76,7 @@ export const SliderStory = () => {
|
|
|
76
76
|
}
|
|
77
77
|
>
|
|
78
78
|
<div className="w-full space-y-2">
|
|
79
|
-
<
|
|
79
|
+
<SliderImpl
|
|
80
80
|
type="range"
|
|
81
81
|
min={rangeMin}
|
|
82
82
|
max={rangeMax}
|
|
@@ -105,7 +105,7 @@ export const SliderStory = () => {
|
|
|
105
105
|
}
|
|
106
106
|
>
|
|
107
107
|
<div className="w-full space-y-2">
|
|
108
|
-
<
|
|
108
|
+
<SliderImpl
|
|
109
109
|
type="range"
|
|
110
110
|
min={invalidMin}
|
|
111
111
|
max={invalidMax}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { TextButton } from ".";
|
|
2
|
+
import { TextButton as TextButtonImpl } from ".";
|
|
3
3
|
|
|
4
4
|
const meta = { title: "Action/Text Button" };
|
|
5
5
|
export default meta;
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
export const
|
|
9
|
-
return <
|
|
8
|
+
export const TextButton = () => {
|
|
9
|
+
return <TextButtonImpl text="Click Me" onClick={() => {}} />;
|
|
10
10
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Toggle } from ".";
|
|
2
|
+
import { Toggle as ToggleImpl } from ".";
|
|
3
3
|
|
|
4
4
|
const meta = { title: "Action/Toggle" };
|
|
5
5
|
export default meta;
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
export const
|
|
8
|
+
export const Toggle = () => {
|
|
9
9
|
return (
|
|
10
|
-
<
|
|
10
|
+
<ToggleImpl
|
|
11
11
|
direction="right"
|
|
12
12
|
text="Toggle Sample"
|
|
13
13
|
value={true}
|