@platformatic/ui-components 0.3.6 → 0.5.0
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/.nvmrc +1 -1
- package/dist/assets/index-BHLxMHb5.js +40 -0
- package/dist/assets/{index-BJ-rQoWR.css → index-Of0we_2v.css} +1 -1
- package/dist/index.html +2 -2
- package/dist/main.css +14 -4
- package/index.js +0 -2
- package/package.json +13 -12
- package/setupTests.js +1 -0
- package/src/components/BorderedBox.jsx +9 -20
- package/src/components/Button.jsx +14 -30
- package/src/components/ButtonFullRounded.jsx +13 -31
- package/src/components/ButtonOnlyIcon.jsx +13 -36
- package/src/components/Checkbox.jsx +5 -6
- package/src/components/CopyAndPaste.jsx +8 -19
- package/src/components/HorizontalSeparator.jsx +6 -8
- package/src/components/LoadingSpinnerV2.jsx +4 -11
- package/src/components/LoginButton.test.jsx +0 -1
- package/src/components/Modal.jsx +11 -25
- package/src/components/PlatformaticIcon.jsx +9 -21
- package/src/components/TabbedWindow.jsx +11 -10
- package/src/components/TabbedWindow.module.css +4 -4
- package/src/components/Tag.jsx +9 -11
- package/src/components/VerticalSeparator.jsx +6 -4
- package/src/components/icons/APIDocsIcon.jsx +6 -7
- package/src/components/icons/AddIcon.jsx +6 -7
- package/src/components/icons/AlertIcon.jsx +6 -7
- package/src/components/icons/AllAppsIcon.jsx +6 -7
- package/src/components/icons/AllInOneIcon.jsx +6 -7
- package/src/components/icons/ApiCloudIcon.jsx +6 -7
- package/src/components/icons/ApiEmptyIcon.jsx +6 -7
- package/src/components/icons/ApiIcon.jsx +6 -7
- package/src/components/icons/ApiIconClosed.jsx +10 -6
- package/src/components/icons/ApiPerformanceIcon.jsx +6 -7
- package/src/components/icons/AppConfigurationIcon.jsx +6 -7
- package/src/components/icons/AppDetailsIcon.jsx +6 -7
- package/src/components/icons/AppEditIcon.jsx +6 -7
- package/src/components/icons/AppEmptyIcon.jsx +6 -7
- package/src/components/icons/AppIcon.jsx +6 -7
- package/src/components/icons/AppListIcon.jsx +6 -7
- package/src/components/icons/AppSettingsIcon.jsx +6 -7
- package/src/components/icons/AppWorkspace.jsx +10 -7
- package/src/components/icons/ApplicationTypeIcon.jsx +6 -7
- package/src/components/icons/ArrowDownFullIcon.jsx +6 -7
- package/src/components/icons/ArrowDownIcon.jsx +6 -7
- package/src/components/icons/ArrowLeftIcon.jsx +6 -7
- package/src/components/icons/ArrowLongLeftIcon.jsx +6 -7
- package/src/components/icons/ArrowLongRightIcon.jsx +6 -7
- package/src/components/icons/ArrowRightIcon.jsx +6 -7
- package/src/components/icons/ArrowUpIcon.jsx +6 -7
- package/src/components/icons/BellIcon.jsx +6 -7
- package/src/components/icons/BillingIcon.jsx +6 -7
- package/src/components/icons/BuiltInLoggingIcon.jsx +6 -7
- package/src/components/icons/CLIIcon.jsx +6 -7
- package/src/components/icons/Calendar1DayIcon.jsx +6 -7
- package/src/components/icons/Calendar7DaysIcon.jsx +6 -7
- package/src/components/icons/CalendarIcon.jsx +6 -7
- package/src/components/icons/CheckListIcon.jsx +6 -7
- package/src/components/icons/CircleAddIcon.jsx +6 -7
- package/src/components/icons/CircleArrowLeftIcon.jsx +6 -7
- package/src/components/icons/CircleArrowRightIcon.jsx +6 -7
- package/src/components/icons/CircleCheckMarkButtonIcon.jsx +6 -8
- package/src/components/icons/CircleCheckMarkFullIcon.jsx +6 -7
- package/src/components/icons/CircleCheckMarkIcon.jsx +7 -6
- package/src/components/icons/CircleCloseHoverIcon.jsx +6 -7
- package/src/components/icons/CircleCloseIcon.jsx +6 -7
- package/src/components/icons/CircleCopyPasteIcon.jsx +6 -7
- package/src/components/icons/CircleDownloadIcon.jsx +6 -7
- package/src/components/icons/CircleEditIcon.jsx +6 -7
- package/src/components/icons/CircleExclamationIcon.jsx +7 -7
- package/src/components/icons/CircleFullIcon.jsx +6 -7
- package/src/components/icons/CircleGearIcon.jsx +6 -7
- package/src/components/icons/CirclePlayIcon.jsx +6 -7
- package/src/components/icons/CircleRestartIcon.jsx +6 -7
- package/src/components/icons/CircleStopIcon.jsx +6 -7
- package/src/components/icons/CircleSubtractIcon.jsx +6 -7
- package/src/components/icons/CircleTwoArrowsDownIcon.jsx +6 -7
- package/src/components/icons/CircleTwoArrowsUpIcon.jsx +6 -7
- package/src/components/icons/CloseIcon.jsx +6 -7
- package/src/components/icons/CloudIcon.jsx +6 -7
- package/src/components/icons/CodeTestingIcon.jsx +6 -7
- package/src/components/icons/ComputerIcon.jsx +6 -7
- package/src/components/icons/ConfigureDatabaseIcon.jsx +6 -7
- package/src/components/icons/CopyPasteIcon.jsx +6 -7
- package/src/components/icons/CreateAppIcon.jsx +6 -7
- package/src/components/icons/CreditCardIcon.jsx +6 -7
- package/src/components/icons/DatabaseIcon.jsx +6 -7
- package/src/components/icons/DatabaseMigrationIcon.jsx +6 -7
- package/src/components/icons/DepencenciesReloadIcon.jsx +6 -7
- package/src/components/icons/EditDocumentIcon.jsx +6 -7
- package/src/components/icons/EditIcon.jsx +6 -7
- package/src/components/icons/EnlargeIcon.jsx +6 -7
- package/src/components/icons/EntryIcon.jsx +6 -7
- package/src/components/icons/EntrypointIcon.jsx +6 -7
- package/src/components/icons/ExpandIcon.jsx +6 -7
- package/src/components/icons/ExploreDocIcon.jsx +6 -7
- package/src/components/icons/EyeClosedIcon.jsx +6 -7
- package/src/components/icons/EyeOpenedIcon.jsx +6 -7
- package/src/components/icons/FolderIcon.jsx +6 -7
- package/src/components/icons/FoldersIcon.jsx +6 -7
- package/src/components/icons/GearIcon.jsx +6 -7
- package/src/components/icons/GenerationLoadingIcon.jsx +6 -7
- package/src/components/icons/GitHubRepo2Icon.jsx +6 -7
- package/src/components/icons/GitHubRepoIcon.jsx +6 -7
- package/src/components/icons/GiveOwnershipIcon.jsx +6 -7
- package/src/components/icons/GraphQLIcon.jsx +6 -7
- package/src/components/icons/ImportAppIcon.jsx +6 -7
- package/src/components/icons/KeyIcon.jsx +6 -7
- package/src/components/icons/LabelIcon.jsx +6 -7
- package/src/components/icons/LayersIcon.jsx +6 -7
- package/src/components/icons/LensIcon.jsx +6 -7
- package/src/components/icons/LiveIcon.jsx +6 -7
- package/src/components/icons/LoadingAppIcon.jsx +6 -7
- package/src/components/icons/LogOutIcon.jsx +7 -7
- package/src/components/icons/LogsRiskIcon.jsx +6 -7
- package/src/components/icons/MetricsIcon.jsx +6 -7
- package/src/components/icons/MetricsLoadingIcon.jsx +6 -7
- package/src/components/icons/MissingTemplateIcon.jsx +6 -7
- package/src/components/icons/NameAppIcon.jsx +6 -7
- package/src/components/icons/NoMetricsIcon.jsx +6 -7
- package/src/components/icons/OrganizationIcon.jsx +6 -7
- package/src/components/icons/OutOfBoxGraphQLIcon.jsx +6 -7
- package/src/components/icons/PlatformaticComposerIcon.jsx +6 -7
- package/src/components/icons/PlatformaticDBIcon.jsx +6 -7
- package/src/components/icons/PlatformaticRuntimeIcon.jsx +6 -7
- package/src/components/icons/PlatformaticServiceIcon.jsx +6 -7
- package/src/components/icons/PlayIcon.jsx +6 -7
- package/src/components/icons/PreviewPRIcon.jsx +6 -7
- package/src/components/icons/PullRequestIcon.jsx +6 -7
- package/src/components/icons/PullRequestLoadingIcon.jsx +6 -7
- package/src/components/icons/RecentAppsIcon.jsx +6 -7
- package/src/components/icons/RequestOwnershipIcon.jsx +6 -7
- package/src/components/icons/RestartIcon.jsx +6 -7
- package/src/components/icons/RocketIcon.jsx +6 -7
- package/src/components/icons/RunningAppIcon.jsx +6 -7
- package/src/components/icons/RunningIcon.jsx +6 -7
- package/src/components/icons/SendIcon.jsx +6 -7
- package/src/components/icons/ServiceIcon.jsx +6 -7
- package/src/components/icons/SlotIcon.jsx +6 -7
- package/src/components/icons/SocialDiscordIcon.jsx +6 -7
- package/src/components/icons/SocialGitHubIcon.jsx +6 -7
- package/src/components/icons/SocialGitLabIcon.jsx +6 -7
- package/src/components/icons/SocialLinkedInIcon.jsx +6 -7
- package/src/components/icons/SocialNPMIcon.jsx +6 -7
- package/src/components/icons/SocialXIcon.jsx +6 -7
- package/src/components/icons/SortDownIcon.jsx +6 -7
- package/src/components/icons/SortIcon.jsx +6 -7
- package/src/components/icons/SortUpIcon.jsx +6 -7
- package/src/components/icons/SortableIcon.jsx +6 -7
- package/src/components/icons/StackablesIcon.jsx +6 -7
- package/src/components/icons/StackablesPluginIcon.jsx +6 -7
- package/src/components/icons/StackablesTemplateIcon.jsx +6 -7
- package/src/components/icons/StopIcon.jsx +6 -7
- package/src/components/icons/StoppedAppIcon.jsx +6 -7
- package/src/components/icons/SwitchIcon.jsx +6 -7
- package/src/components/icons/TeamsIcon.jsx +6 -7
- package/src/components/icons/TerminalIcon.jsx +6 -7
- package/src/components/icons/TrashIcon.jsx +6 -8
- package/src/components/icons/TwoUsersIcon.jsx +6 -7
- package/src/components/icons/UpgradeIcon.jsx +6 -7
- package/src/components/icons/UserComputerIcon.jsx +6 -7
- package/src/components/icons/UserIcon.jsx +6 -7
- package/src/components/icons/UserRemoveIcon.jsx +7 -7
- package/src/components/icons/UserRoleIcon.jsx +7 -7
- package/src/components/icons/WorkspaceDynamicIcon.jsx +6 -7
- package/src/components/icons/WorkspaceEmptyIcon.jsx +6 -7
- package/src/components/icons/WorkspaceFailIcon.jsx +6 -7
- package/src/components/icons/WorkspaceGitHubIcon.jsx +6 -7
- package/src/components/icons/WorkspaceLoadingIcon.jsx +6 -7
- package/src/components/icons/WorkspaceReadyIcon.jsx +6 -7
- package/src/components/icons/WorkspaceStaticIcon.jsx +6 -7
- package/src/components/layouts/Layout.jsx +4 -6
- package/src/components/logos/AdvancedLogo.jsx +5 -7
- package/src/components/logos/BasicLogo.jsx +5 -7
- package/src/components/logos/FreeLogo.jsx +5 -7
- package/src/components/logos/ProLogo.jsx +5 -7
- package/src/stories/BorderedBox.stories.jsx +3 -1
- package/src/stories/Button.stories.jsx +224 -47
- package/src/stories/ButtonFullRounded.stories.jsx +31 -6
- package/src/stories/ButtonOnlyIcon.stories.jsx +13 -3
- package/src/stories/DropDown.stories.jsx +43 -20
- package/src/stories/InfoBox.stories.jsx +12 -3
- package/src/stories/{Introduction.stories.mdx → Introduction.mdx} +115 -117
- package/src/stories/List.stories.jsx +28 -5
- package/src/stories/ListElement.stories.jsx +2 -1
- package/src/stories/Loadable.stories.jsx +6 -5
- package/src/stories/LoadingSpinner.stories.jsx +4 -2
- package/src/stories/LogoDropDown.stories.jsx +38 -24
- package/src/stories/Modal.stories.jsx +72 -17
- package/src/stories/ModalDirectional.stories.jsx +12 -2
- package/src/stories/ModalStepsForward.stories.jsx +82 -13
- package/src/stories/PlatformaticIcon.stories.jsx +44 -9
- package/src/stories/SearchBar.stories.jsx +0 -1
- package/src/stories/SearchBarV2.stories.jsx +0 -1
- package/src/stories/Sidebar.stories.jsx +41 -10
- package/src/stories/TabbedWindow.stories.jsx +71 -31
- package/src/stories/TextWithLabel.stories.jsx +5 -1
- package/src/stories/Tooltip.stories.jsx +10 -2
- package/src/stories/TwoColumnsLayout.stories.jsx +7 -2
- package/src/stories/forms/Field.stories.jsx +53 -15
- package/src/stories/forms/Input.stories.jsx +8 -2
- package/src/stories/forms/InputWithSeparator.stories.jsx +31 -9
- package/src/stories/forms/Password.stories.jsx +5 -1
- package/src/stories/forms/Preview.stories.jsx +6 -1
- package/src/stories/forms/RadioGroup.stories.jsx +5 -1
- package/src/stories/forms/Select.stories.jsx +60 -38
- package/src/stories/forms/SelectWithInput.stories.jsx +78 -41
- package/src/stories/forms/ToggleSwitch.stories.jsx +14 -4
- package/src/stories/icons/Icons.stories.jsx +40 -13
- package/src/stories/logos/Logos.stories.jsx +9 -2
- package/vitest.config.js +2 -1
- package/dist/assets/index-YI7s19_T.js +0 -40
- package/src/components/TabbedWindowV2.jsx +0 -82
- package/src/components/TabbedWindowV2.module.css +0 -17
|
@@ -4,7 +4,17 @@ import Button from '../components/Button'
|
|
|
4
4
|
import BorderedBox from '../components/BorderedBox'
|
|
5
5
|
import DropDown from '../components/DropDown'
|
|
6
6
|
import HorizontalSeparator from '../components/HorizontalSeparator'
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
FULL_WIDTH,
|
|
9
|
+
MAIN_DARK_BLUE,
|
|
10
|
+
MAIN_GREEN,
|
|
11
|
+
MODAL_COVER,
|
|
12
|
+
MODAL_FULL_DARK,
|
|
13
|
+
MODAL_FULL_LIGHT,
|
|
14
|
+
MODAL_LAYOUTS,
|
|
15
|
+
MODAL_POPUP_V2,
|
|
16
|
+
MODAL_SIZES
|
|
17
|
+
} from '../components/constants'
|
|
8
18
|
export default {
|
|
9
19
|
title: 'Platformatic/Modal',
|
|
10
20
|
component: Modal,
|
|
@@ -33,14 +43,32 @@ const Template = (args) => {
|
|
|
33
43
|
return (
|
|
34
44
|
<main style={{ height: '1440px', overflow: 'scroll' }}>
|
|
35
45
|
<BorderedBox>This Is another Content</BorderedBox>
|
|
36
|
-
<Button
|
|
37
|
-
|
|
46
|
+
<Button
|
|
47
|
+
color={MAIN_GREEN}
|
|
48
|
+
backgroundColor={MAIN_DARK_BLUE}
|
|
49
|
+
onClick={() => setIsOpen(true)}
|
|
50
|
+
label='Open Modal'
|
|
51
|
+
/>
|
|
52
|
+
{isOpen && (
|
|
53
|
+
<Modal setIsOpen={setIsOpen} {...rest}>
|
|
54
|
+
{text}
|
|
55
|
+
</Modal>
|
|
56
|
+
)}
|
|
38
57
|
|
|
39
58
|
<BorderedBox style={{ position: 'relative' }}>
|
|
40
59
|
<p>This Is another Component with Modal inside</p>
|
|
41
60
|
|
|
42
|
-
<Button
|
|
43
|
-
|
|
61
|
+
<Button
|
|
62
|
+
color={MAIN_GREEN}
|
|
63
|
+
backgroundColor={MAIN_DARK_BLUE}
|
|
64
|
+
onClick={() => setIsOpenInside(true)}
|
|
65
|
+
label='Open Modal Inside'
|
|
66
|
+
/>
|
|
67
|
+
{isOpenInside && (
|
|
68
|
+
<Modal setIsOpen={setIsOpenInside} {...rest}>
|
|
69
|
+
{text}
|
|
70
|
+
</Modal>
|
|
71
|
+
)}
|
|
44
72
|
</BorderedBox>
|
|
45
73
|
</main>
|
|
46
74
|
)
|
|
@@ -49,7 +77,11 @@ const Template = (args) => {
|
|
|
49
77
|
const ContentThatLoads = () => {
|
|
50
78
|
const [content, setContent] = useState(null)
|
|
51
79
|
setTimeout(() => {
|
|
52
|
-
setContent(
|
|
80
|
+
setContent(
|
|
81
|
+
<div className='mt-4'>
|
|
82
|
+
<BorderedBox>This is a Future Component</BorderedBox>
|
|
83
|
+
</div>
|
|
84
|
+
)
|
|
53
85
|
}, 1000)
|
|
54
86
|
|
|
55
87
|
return content
|
|
@@ -75,14 +107,26 @@ const MenuTemplate = () => {
|
|
|
75
107
|
const dropDownArgs = {
|
|
76
108
|
header: 'My Menu',
|
|
77
109
|
items: [
|
|
78
|
-
<span
|
|
110
|
+
<span
|
|
111
|
+
className='hover:cursor-pointer'
|
|
112
|
+
key='2'
|
|
113
|
+
onClick={() => setIsOpen(true)}
|
|
114
|
+
>
|
|
115
|
+
Show Modal
|
|
116
|
+
</span>
|
|
79
117
|
]
|
|
80
118
|
}
|
|
81
119
|
return (
|
|
82
120
|
<div>
|
|
83
|
-
<div className='text-white'
|
|
121
|
+
<div className='text-white'>
|
|
122
|
+
<DropDown {...dropDownArgs} />
|
|
123
|
+
</div>
|
|
84
124
|
<HorizontalSeparator />
|
|
85
|
-
{isOpen &&
|
|
125
|
+
{isOpen && (
|
|
126
|
+
<Modal setIsOpen={setIsOpen} title='Modal Title'>
|
|
127
|
+
Hello world!
|
|
128
|
+
</Modal>
|
|
129
|
+
)}
|
|
86
130
|
<ContentThatLoads />
|
|
87
131
|
</div>
|
|
88
132
|
)
|
|
@@ -115,15 +159,21 @@ const NestedModalsTemplate = () => {
|
|
|
115
159
|
|
|
116
160
|
return (
|
|
117
161
|
<main style={{ height: '1440px', overflow: 'scroll' }}>
|
|
118
|
-
<Button
|
|
162
|
+
<Button
|
|
163
|
+
color={MAIN_GREEN}
|
|
164
|
+
backgroundColor={MAIN_DARK_BLUE}
|
|
165
|
+
onClick={() => setIsOpen1(true)}
|
|
166
|
+
label='Open 1st Modal'
|
|
167
|
+
/>
|
|
119
168
|
{isOpen1 && (
|
|
120
|
-
<Modal
|
|
121
|
-
setIsOpen={setIsOpen1}
|
|
122
|
-
title='Fist One'
|
|
123
|
-
layout={MODAL_POPUP_V2}
|
|
124
|
-
>
|
|
169
|
+
<Modal setIsOpen={setIsOpen1} title='Fist One' layout={MODAL_POPUP_V2}>
|
|
125
170
|
<p style={{ color: 'white' }}>This Is the first</p>
|
|
126
|
-
<Button
|
|
171
|
+
<Button
|
|
172
|
+
color={MAIN_GREEN}
|
|
173
|
+
backgroundColor={MAIN_DARK_BLUE}
|
|
174
|
+
onClick={() => setIsOpen2(true)}
|
|
175
|
+
label='Open 2nd Modal'
|
|
176
|
+
/>
|
|
127
177
|
{isOpen2 && (
|
|
128
178
|
<Modal
|
|
129
179
|
setIsOpen={setIsOpen2}
|
|
@@ -131,7 +181,12 @@ const NestedModalsTemplate = () => {
|
|
|
131
181
|
layout={MODAL_POPUP_V2}
|
|
132
182
|
>
|
|
133
183
|
<p style={{ color: 'white' }}>This Is the second</p>
|
|
134
|
-
<Button
|
|
184
|
+
<Button
|
|
185
|
+
color={MAIN_GREEN}
|
|
186
|
+
backgroundColor={MAIN_DARK_BLUE}
|
|
187
|
+
onClick={() => setIsOpen3(true)}
|
|
188
|
+
label='Open 3rd Modal'
|
|
189
|
+
/>
|
|
135
190
|
{isOpen3 && (
|
|
136
191
|
<Modal
|
|
137
192
|
setIsOpen={setIsOpen3}
|
|
@@ -32,9 +32,19 @@ const Template = (args) => {
|
|
|
32
32
|
return (
|
|
33
33
|
<div style={divStyle}>
|
|
34
34
|
<div>
|
|
35
|
-
<Button
|
|
35
|
+
<Button
|
|
36
|
+
type='button'
|
|
37
|
+
color={MAIN_GREEN}
|
|
38
|
+
backgroundColor={MAIN_DARK_BLUE}
|
|
39
|
+
onClick={() => setIsOpen(true)}
|
|
40
|
+
label='Open Modal'
|
|
41
|
+
/>
|
|
36
42
|
</div>
|
|
37
|
-
{isOpen &&
|
|
43
|
+
{isOpen && (
|
|
44
|
+
<ModalDirectional setIsOpen={setIsOpen} {...rest}>
|
|
45
|
+
{text}
|
|
46
|
+
</ModalDirectional>
|
|
47
|
+
)}
|
|
38
48
|
</div>
|
|
39
49
|
)
|
|
40
50
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import React, { useState } from 'react'
|
|
2
2
|
import ModalStepsForward from '../components/ModalStepsForward'
|
|
3
3
|
import Button from '../components/Button'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
MAIN_DARK_BLUE,
|
|
6
|
+
MAIN_GREEN,
|
|
7
|
+
MODAL_LAYOUTS,
|
|
8
|
+
MODAL_SIZES
|
|
9
|
+
} from '../components/constants'
|
|
5
10
|
export default {
|
|
6
11
|
title: 'Platformatic/ModalStepsForward',
|
|
7
12
|
component: ModalStepsForward,
|
|
@@ -28,8 +33,18 @@ const Template = (args) => {
|
|
|
28
33
|
const { text, ...rest } = args
|
|
29
34
|
return (
|
|
30
35
|
<main>
|
|
31
|
-
<Button
|
|
32
|
-
|
|
36
|
+
<Button
|
|
37
|
+
color={MAIN_GREEN}
|
|
38
|
+
backgroundColor={MAIN_DARK_BLUE}
|
|
39
|
+
onClick={() => setIsOpen(true)}
|
|
40
|
+
label='Open Modal'
|
|
41
|
+
bold
|
|
42
|
+
/>
|
|
43
|
+
{isOpen && (
|
|
44
|
+
<ModalStepsForward setIsOpen={setIsOpen} {...rest}>
|
|
45
|
+
{text}
|
|
46
|
+
</ModalStepsForward>
|
|
47
|
+
)}
|
|
33
48
|
</main>
|
|
34
49
|
)
|
|
35
50
|
}
|
|
@@ -39,22 +54,76 @@ Default.args = {}
|
|
|
39
54
|
|
|
40
55
|
export const SmallContentLeft = Template.bind({})
|
|
41
56
|
SmallContentLeft.args = {
|
|
42
|
-
left:
|
|
57
|
+
left: (
|
|
58
|
+
<div>
|
|
59
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin iaculis,
|
|
60
|
+
elit aliquam ullamcorper consectetur, nunc erat blandit turpis, dignissim
|
|
61
|
+
efficitur risus eros a erat. Vestibulum rutrum odio turpis, vel mollis
|
|
62
|
+
neque ullamcorper at. Orci varius natoque penatibus et magnis dis
|
|
63
|
+
parturient montes, nascetur ridiculus mus. Proin accumsan leo sed nunc
|
|
64
|
+
tristique tempor. Duis sit amet viverra nunc. Aliquam vehicula elit ut
|
|
65
|
+
sodales pharetra. Sed imperdiet tempor urna id porta. Nullam ante velit,
|
|
66
|
+
aliquet a eleifend quis, vulputate sit amet metus. Nullam faucibus libero
|
|
67
|
+
at velit mattis tempus. Suspendisse potenti. Sed vitae enim ut magna
|
|
68
|
+
rutrum volutpat at sed augue. Sed sed neque porttitor, gravida lorem
|
|
69
|
+
vitae, semper felis.
|
|
70
|
+
</div>
|
|
71
|
+
)
|
|
43
72
|
}
|
|
44
73
|
|
|
45
74
|
export const LongContentLeft = Template.bind({})
|
|
46
75
|
LongContentLeft.args = {
|
|
47
76
|
left: (
|
|
48
77
|
<div>
|
|
49
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin iaculis,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
78
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin iaculis,
|
|
79
|
+
elit aliquam ullamcorper consectetur, nunc erat blandit turpis, dignissim
|
|
80
|
+
efficitur risus eros a erat. Vestibulum rutrum odio turpis, vel mollis
|
|
81
|
+
neque ullamcorper at. Orci varius natoque penatibus et magnis dis
|
|
82
|
+
parturient montes, nascetur ridiculus mus. Proin accumsan leo sed nunc
|
|
83
|
+
tristique tempor. Duis sit amet viverra nunc. Aliquam vehicula elit ut
|
|
84
|
+
sodales pharetra. Sed imperdiet tempor urna id porta. Nullam ante velit,
|
|
85
|
+
aliquet a eleifend quis, vulputate sit amet metus. Nullam faucibus libero
|
|
86
|
+
at velit mattis tempus. Suspendisse potenti. Sed vitae enim ut magna
|
|
87
|
+
rutrum volutpat at sed augue. Sed sed neque porttitor, gravida lorem
|
|
88
|
+
vitae, semper felis.
|
|
89
|
+
<br />
|
|
90
|
+
<br />
|
|
91
|
+
Mauris eget ultrices eros. Maecenas condimentum tristique odio, sit amet
|
|
92
|
+
pellentesque lacus pretium sit amet. Etiam sed egestas nibh. Curabitur
|
|
93
|
+
auctor posuere ante vel tempor. Etiam a vehicula erat. Cras aliquet eros
|
|
94
|
+
ut magna vestibulum rhoncus. Sed sed vestibulum metus. Nam sed magna
|
|
95
|
+
velit. Sed sit amet fermentum libero. Maecenas et faucibus elit. Integer
|
|
96
|
+
ligula magna, congue et posuere nec, lobortis sed dui. Suspendisse
|
|
97
|
+
potenti. Cras vestibulum nunc non volutpat tempus. In ultrices elementum
|
|
98
|
+
consectetur. Vestibulum justo risus, rutrum et augue ac, suscipit lobortis
|
|
99
|
+
erat. Sed rutrum sem at tortor molestie, tempus sagittis diam pulvinar.
|
|
100
|
+
<br />
|
|
101
|
+
<br />
|
|
102
|
+
Nullam lacinia tortor ipsum. Curabitur nec nulla ut orci volutpat pulvinar
|
|
103
|
+
ac ut sapien. Vestibulum aliquet ultricies leo, in cursus nibh cursus nec.
|
|
104
|
+
In eget faucibus lorem. Sed fringilla efficitur tellus. Cras faucibus
|
|
105
|
+
mauris eget dolor vehicula auctor. Vestibulum dignissim orci id fringilla
|
|
106
|
+
bibendum.
|
|
107
|
+
<br />
|
|
108
|
+
<br />
|
|
109
|
+
Morbi maximus sem ac nulla bibendum, eleifend blandit nunc sodales.
|
|
110
|
+
Quisque maximus dapibus diam eu condimentum. Aenean ac justo viverra,
|
|
111
|
+
pellentesque eros id, porta lectus. In ac risus orci. Fusce eleifend
|
|
112
|
+
sollicitudin pellentesque. Nulla facilisi. Aenean nec nunc ut felis
|
|
113
|
+
bibendum bibendum. Sed quam neque, scelerisque nec luctus a, facilisis non
|
|
114
|
+
ante.
|
|
115
|
+
<br />
|
|
116
|
+
<br />
|
|
117
|
+
Nullam id mauris vitae mi dignissim consequat eget sed leo. Maecenas
|
|
118
|
+
venenatis orci sed blandit lobortis. Donec a purus risus. Phasellus mollis
|
|
119
|
+
sem a ipsum cursus ultricies. Sed malesuada sit amet mi a ullamcorper.
|
|
120
|
+
Mauris sodales eget nulla at porttitor. Etiam arcu mi, efficitur hendrerit
|
|
121
|
+
metus ut, blandit molestie sapien. Nunc commodo justo nec mi volutpat, sit
|
|
122
|
+
amet cursus tortor eleifend. Pellentesque tincidunt ac mauris at faucibus.
|
|
123
|
+
Quisque sed purus quis nibh aliquet ullamcorper. Nunc est sem, accumsan eu
|
|
124
|
+
pellentesque non, volutpat a nisl. Proin eu dolor ac quam dictum lobortis
|
|
125
|
+
at ut elit. Aenean nec dui orci. Praesent aliquet eget metus vel
|
|
126
|
+
elementum.
|
|
58
127
|
</div>
|
|
59
128
|
)
|
|
60
129
|
}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PlatformaticIcon from '../components/PlatformaticIcon'
|
|
3
3
|
import Icons from '../components/icons'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
COLORS_ICON,
|
|
6
|
+
EXTRA_LARGE,
|
|
7
|
+
EXTRA_SMALL,
|
|
8
|
+
LARGE,
|
|
9
|
+
MEDIUM,
|
|
10
|
+
SIZES,
|
|
11
|
+
SMALL,
|
|
12
|
+
WHITE
|
|
13
|
+
} from '../components/constants'
|
|
5
14
|
|
|
6
15
|
const divStyle = {
|
|
7
16
|
width: '100%'
|
|
@@ -67,26 +76,52 @@ const AllIconsTemplate = (args) => {
|
|
|
67
76
|
{icons.map((icon, index) => (
|
|
68
77
|
<div style={row} key={index}>
|
|
69
78
|
<div style={col}>
|
|
70
|
-
<p style={paragraph}
|
|
79
|
+
<p style={paragraph}>
|
|
80
|
+
#{index + 1}: {icon}
|
|
81
|
+
</p>
|
|
71
82
|
</div>
|
|
72
83
|
<div style={col}>
|
|
73
|
-
<PlatformaticIcon
|
|
84
|
+
<PlatformaticIcon
|
|
85
|
+
key={icon}
|
|
86
|
+
iconName={icon}
|
|
87
|
+
size={EXTRA_SMALL}
|
|
88
|
+
{...args}
|
|
89
|
+
/>
|
|
74
90
|
</div>
|
|
75
91
|
<div style={col}>
|
|
76
|
-
<PlatformaticIcon
|
|
92
|
+
<PlatformaticIcon
|
|
93
|
+
key={icon}
|
|
94
|
+
iconName={icon}
|
|
95
|
+
size={SMALL}
|
|
96
|
+
{...args}
|
|
97
|
+
/>
|
|
77
98
|
</div>
|
|
78
99
|
<div style={col}>
|
|
79
|
-
<PlatformaticIcon
|
|
100
|
+
<PlatformaticIcon
|
|
101
|
+
key={icon}
|
|
102
|
+
iconName={icon}
|
|
103
|
+
size={MEDIUM}
|
|
104
|
+
{...args}
|
|
105
|
+
/>
|
|
80
106
|
</div>
|
|
81
107
|
<div style={col}>
|
|
82
|
-
<PlatformaticIcon
|
|
108
|
+
<PlatformaticIcon
|
|
109
|
+
key={icon}
|
|
110
|
+
iconName={icon}
|
|
111
|
+
size={LARGE}
|
|
112
|
+
{...args}
|
|
113
|
+
/>
|
|
83
114
|
</div>
|
|
84
115
|
<div style={col}>
|
|
85
|
-
<PlatformaticIcon
|
|
116
|
+
<PlatformaticIcon
|
|
117
|
+
key={icon}
|
|
118
|
+
iconName={icon}
|
|
119
|
+
size={EXTRA_LARGE}
|
|
120
|
+
{...args}
|
|
121
|
+
/>
|
|
86
122
|
</div>
|
|
87
123
|
</div>
|
|
88
|
-
)
|
|
89
|
-
)}
|
|
124
|
+
))}
|
|
90
125
|
</div>
|
|
91
126
|
</>
|
|
92
127
|
)
|
|
@@ -17,7 +17,15 @@ export default {
|
|
|
17
17
|
(Story) => (
|
|
18
18
|
<div style={divStyle}>
|
|
19
19
|
<Story />
|
|
20
|
-
<BorderedBox>
|
|
20
|
+
<BorderedBox>
|
|
21
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
|
|
22
|
+
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
|
|
23
|
+
minim veniam, quis nostrud exercitation ullamco laboris nisi ut
|
|
24
|
+
aliquip ex ea commodo consequat. Duis aute irure dolor in
|
|
25
|
+
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
|
|
26
|
+
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
|
|
27
|
+
culpa qui officia deserunt mollit anim id est laborum.
|
|
28
|
+
</BorderedBox>
|
|
21
29
|
</div>
|
|
22
30
|
)
|
|
23
31
|
]
|
|
@@ -36,19 +44,27 @@ EmptySidebar.args = {
|
|
|
36
44
|
|
|
37
45
|
const FullSidebarTemplate = (args) => {
|
|
38
46
|
const [items, setItems] = useState([
|
|
39
|
-
{
|
|
47
|
+
{
|
|
48
|
+
id: '1',
|
|
49
|
+
iconName: 'WorkspaceStaticIcon',
|
|
50
|
+
subTitle: 'Subtitle',
|
|
51
|
+
title: 'a very very very very very long title 1'
|
|
52
|
+
},
|
|
40
53
|
{ id: '2', title: 'Title number 2', subTitle: 'Subtitle 2' },
|
|
41
|
-
{
|
|
54
|
+
{
|
|
55
|
+
id: '3',
|
|
56
|
+
title: 'Another Title',
|
|
57
|
+
subTitle: 'Subtitle 3',
|
|
58
|
+
iconName: 'WorkspaceDynamicIcon'
|
|
59
|
+
}
|
|
42
60
|
])
|
|
43
61
|
function onClickAdd () {
|
|
44
|
-
const tmpItem = items.map(item => item)
|
|
62
|
+
const tmpItem = items.map((item) => item)
|
|
45
63
|
tmpItem.push('Title number ' + (items.length + 1))
|
|
46
64
|
setItems(tmpItem)
|
|
47
65
|
}
|
|
48
66
|
|
|
49
|
-
return (
|
|
50
|
-
<Sidebar items={items} onClickAdd={() => onClickAdd()} {...args} />
|
|
51
|
-
)
|
|
67
|
+
return <Sidebar items={items} onClickAdd={() => onClickAdd()} {...args} />
|
|
52
68
|
}
|
|
53
69
|
|
|
54
70
|
export const FullSidebar = FullSidebarTemplate.bind({})
|
|
@@ -68,9 +84,24 @@ AlreadySelected.args = {
|
|
|
68
84
|
addTitle: 'Create',
|
|
69
85
|
defaultSelected: '3',
|
|
70
86
|
items: [
|
|
71
|
-
{
|
|
72
|
-
|
|
73
|
-
|
|
87
|
+
{
|
|
88
|
+
id: '1',
|
|
89
|
+
iconName: 'WorkspaceStaticIcon',
|
|
90
|
+
title: 'Static 1',
|
|
91
|
+
subTitle: 'Subtitle 1'
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: '2',
|
|
95
|
+
iconName: 'WorkspaceStaticIcon',
|
|
96
|
+
title: 'Static 2',
|
|
97
|
+
subTitle: 'Subtitle 2'
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: '3',
|
|
101
|
+
iconName: 'WorkspaceDynamicIcon',
|
|
102
|
+
title: 'Dynamic',
|
|
103
|
+
subTitle: 'Subtitle 3'
|
|
104
|
+
}
|
|
74
105
|
],
|
|
75
106
|
onClickItemSelected: (index) => alert('selected: ' + index),
|
|
76
107
|
onClickSettings: () => alert('settings')
|
|
@@ -10,45 +10,85 @@ const Template = (args) => {
|
|
|
10
10
|
<>
|
|
11
11
|
<TabbedWindow {...args} />
|
|
12
12
|
</>
|
|
13
|
-
|
|
14
13
|
)
|
|
15
14
|
}
|
|
16
15
|
export const Default = Template.bind({})
|
|
17
16
|
|
|
18
17
|
Default.args = {
|
|
19
|
-
tabs: [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
18
|
+
tabs: [
|
|
19
|
+
{
|
|
20
|
+
label: 'First',
|
|
21
|
+
key: 'first',
|
|
22
|
+
component: () => (
|
|
23
|
+
<TextWithLabel
|
|
24
|
+
label='First component'
|
|
25
|
+
text='Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
|
|
26
|
+
/>
|
|
27
|
+
)
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
label: 'Second',
|
|
31
|
+
key: 'second',
|
|
32
|
+
component: () => (
|
|
33
|
+
<TextWithLabel
|
|
34
|
+
label='Second component'
|
|
35
|
+
text='Sed et dui facilisis, molestie urna sed, volutpat nibh'
|
|
36
|
+
/>
|
|
37
|
+
)
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: 'Third Third Third',
|
|
41
|
+
key: 'third',
|
|
42
|
+
component: () => (
|
|
43
|
+
<TextWithLabel
|
|
44
|
+
label='Third component'
|
|
45
|
+
text='ivamus est nisl, maximus aliquet urna eu, consequat semper nisi'
|
|
46
|
+
/>
|
|
47
|
+
)
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
label: 'Fourth',
|
|
51
|
+
key: 'fourth',
|
|
52
|
+
component: () => (
|
|
53
|
+
<TextWithLabel label='Fourth component' text='Ipse dixit' />
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
]
|
|
36
57
|
}
|
|
37
58
|
|
|
38
59
|
export const DefaultSelected = Template.bind({})
|
|
39
60
|
DefaultSelected.args = {
|
|
40
|
-
tabs: [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
61
|
+
tabs: [
|
|
62
|
+
{
|
|
63
|
+
label: 'First',
|
|
64
|
+
key: 'first',
|
|
65
|
+
component: () => (
|
|
66
|
+
<TextWithLabel
|
|
67
|
+
label='First component'
|
|
68
|
+
text='Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
|
|
69
|
+
/>
|
|
70
|
+
)
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: 'Second',
|
|
74
|
+
key: 'second',
|
|
75
|
+
component: () => (
|
|
76
|
+
<TextWithLabel
|
|
77
|
+
label='Second component'
|
|
78
|
+
text='Sed et dui facilisis, molestie urna sed, volutpat nibh'
|
|
79
|
+
/>
|
|
80
|
+
)
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
label: 'Third',
|
|
84
|
+
key: 'third',
|
|
85
|
+
component: () => (
|
|
86
|
+
<TextWithLabel
|
|
87
|
+
label='Third component'
|
|
88
|
+
text='ivamus est nisl, maximus aliquet urna eu, consequat semper nisi'
|
|
89
|
+
/>
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
],
|
|
53
93
|
keySelected: 'second'
|
|
54
94
|
}
|
|
@@ -18,7 +18,11 @@ Standard.args = {
|
|
|
18
18
|
text: 'Platformatic Team'
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
export const WithLink = (args) =>
|
|
21
|
+
export const WithLink = (args) => (
|
|
22
|
+
<TextWithLabel {...args}>
|
|
23
|
+
<a href='https://example.com'>Standard Link</a>
|
|
24
|
+
</TextWithLabel>
|
|
25
|
+
)
|
|
22
26
|
|
|
23
27
|
WithLink.args = {
|
|
24
28
|
label: 'External Link'
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
import Tooltip from '../components/Tooltip'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
ANTI_FLASH_WHITE,
|
|
6
|
+
CHANGE_BACKGROUND_COLOR,
|
|
7
|
+
COLORS_BUTTON,
|
|
8
|
+
HOVER_EFFECTS_BUTTONS,
|
|
9
|
+
RICH_BLACK,
|
|
10
|
+
SIZES,
|
|
11
|
+
WHITE
|
|
12
|
+
} from '../components/constants'
|
|
5
13
|
import Button from '../components/Button'
|
|
6
14
|
|
|
7
15
|
const divStyle = {
|
|
@@ -79,7 +87,7 @@ const TemplateWithButton = (args) => (
|
|
|
79
87
|
export const TooltipBase = TemplateWithButton.bind({})
|
|
80
88
|
// More on args: https://storybook.js.org/docs/react/writing-stories/args
|
|
81
89
|
TooltipBase.args = {
|
|
82
|
-
content:
|
|
90
|
+
content: <span>I'm a tooltip over a button</span>,
|
|
83
91
|
delay: 100,
|
|
84
92
|
offset: 44
|
|
85
93
|
}
|
|
@@ -17,11 +17,16 @@ export default {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
// More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
|
|
20
|
-
const Template = (args) =>
|
|
20
|
+
const Template = (args) => (
|
|
21
|
+
<TwoColumnsLayout {...args}>
|
|
22
|
+
<BorderedBox>1st</BorderedBox>
|
|
23
|
+
<BorderedBox>2nd</BorderedBox>
|
|
24
|
+
</TwoColumnsLayout>
|
|
25
|
+
)
|
|
21
26
|
|
|
22
27
|
export const Default = Template.bind({})
|
|
23
28
|
|
|
24
|
-
Default.args = {
|
|
29
|
+
Default.args = {}
|
|
25
30
|
|
|
26
31
|
export const Columns = Template.bind({})
|
|
27
32
|
|