@nobak/design-system 1.0.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/LICENSE +73 -0
- package/README.md +142 -0
- package/lib/assets/icons.js +67 -0
- package/lib/components/AccountOverview/AccountOverview.js +122 -0
- package/lib/components/AdminPanel.js +58 -0
- package/lib/components/AssetExchange/AssetExchange.js +189 -0
- package/lib/components/AuthenticationFlow.js +216 -0
- package/lib/components/ConversationInterface/ConversationInterface.js +232 -0
- package/lib/components/DevFooter.js +38 -0
- package/lib/components/DevMenu.js +35 -0
- package/lib/components/DevSidebar.js +28 -0
- package/lib/components/DigitalDisplay.js +83 -0
- package/lib/components/Footer.js +45 -0
- package/lib/components/HeroContainer.js +10 -0
- package/lib/components/IntentRecognition/IntentRecognition.js +174 -0
- package/lib/components/Logo.js +259 -0
- package/lib/components/MenuBar.js +56 -0
- package/lib/components/NetworkSettings.js +223 -0
- package/lib/components/RecoverySetup/RecoverySetup.js +354 -0
- package/lib/components/RisingSun.js +122 -0
- package/lib/components/Symbol.js +226 -0
- package/lib/components/TransactionComposer/TransactionComposer.js +258 -0
- package/lib/components/TransactionConfirmation.js +184 -0
- package/lib/components/WalletMenu.js +33 -0
- package/lib/components/console/code/CodeBlock.js +150 -0
- package/lib/components/console/code/index.js +9 -0
- package/lib/components/console/data/DataTable.js +245 -0
- package/lib/components/console/data/MetricCard.js +79 -0
- package/lib/components/console/data/index.js +11 -0
- package/lib/components/console/documentation/index.js +10 -0
- package/lib/components/console/forms/APIKeyGenerator.js +261 -0
- package/lib/components/console/forms/SearchBar.js +210 -0
- package/lib/components/console/forms/index.js +10 -0
- package/lib/components/console/index.js +29 -0
- package/lib/components/console/layout/ConsoleCard.js +82 -0
- package/lib/components/console/layout/ConsoleLayout.js +86 -0
- package/lib/components/console/layout/index.js +10 -0
- package/lib/components/console/monitoring/StatusIndicator.js +128 -0
- package/lib/components/console/monitoring/index.js +9 -0
- package/lib/components/console/navigation/DevFooter.js +38 -0
- package/lib/components/console/navigation/DevMenu.js +35 -0
- package/lib/components/console/navigation/DevSidebar.js +28 -0
- package/lib/components/console/navigation/index.js +11 -0
- package/lib/components/console/settings/index.js +10 -0
- package/lib/components/index.js +12 -0
- package/lib/design/ColorPicker.stories.js +9 -0
- package/lib/design/HSLTool-V1.js +345 -0
- package/lib/design/HSLTool-V2.js +475 -0
- package/lib/design/HSLTool-V3.js +543 -0
- package/lib/design/HSLTool-V4.js +1139 -0
- package/lib/design/HSLTool.js +374 -0
- package/lib/design/OKLCHColorPicker.stories.js +24 -0
- package/lib/design/OKLCHTool.js +1014 -0
- package/lib/index.js +4 -0
- package/lib/shared/components/Avatar/Avatar.js +18 -0
- package/lib/shared/components/Avatar/index.js +1 -0
- package/lib/shared/components/Badge/Badge.js +34 -0
- package/lib/shared/components/Badge/index.js +1 -0
- package/lib/shared/components/Breadcrumb/Breadcrumb.js +13 -0
- package/lib/shared/components/Breadcrumb/index.js +1 -0
- package/lib/shared/components/Button/Button.js +184 -0
- package/lib/shared/components/Button/index.js +1 -0
- package/lib/shared/components/Calendar/Calendar.js +155 -0
- package/lib/shared/components/Calendar/CalendarDay.js +251 -0
- package/lib/shared/components/Calendar/CalendarHeader.js +88 -0
- package/lib/shared/components/Calendar/CalendarMonth.js +106 -0
- package/lib/shared/components/Calendar/CalendarWeek.js +267 -0
- package/lib/shared/components/Calendar/constants.js +73 -0
- package/lib/shared/components/Calendar/index.js +3 -0
- package/lib/shared/components/Calendar/types.d.js +0 -0
- package/lib/shared/components/Cartel/Cartel.js +44 -0
- package/lib/shared/components/Cartel/index.js +1 -0
- package/lib/shared/components/Cell/Cell.js +105 -0
- package/lib/shared/components/Cell/index.js +1 -0
- package/lib/shared/components/Checkbox/Checkbox.js +27 -0
- package/lib/shared/components/Checkbox/index.js +1 -0
- package/lib/shared/components/Clock/Clock.js +6 -0
- package/lib/shared/components/Clock/index.js +1 -0
- package/lib/shared/components/ColorChecker/ColorChecker.js +89 -0
- package/lib/shared/components/ColorChecker/index.js +2 -0
- package/lib/shared/components/ColorChecker/utils.js +159 -0
- package/lib/shared/components/Command/Command.js +95 -0
- package/lib/shared/components/Command/index.js +1 -0
- package/lib/shared/components/Container/Container.js +18 -0
- package/lib/shared/components/Container/index.js +1 -0
- package/lib/shared/components/Cover/Cover.js +17 -0
- package/lib/shared/components/Cover/index.js +1 -0
- package/lib/shared/components/DatePicker/DatePicker.js +52 -0
- package/lib/shared/components/DatePicker/components/Calendar.js +125 -0
- package/lib/shared/components/DatePicker/components/CalendarDay.js +23 -0
- package/lib/shared/components/DatePicker/components/DateWrapper.js +15 -0
- package/lib/shared/components/DatePicker/components/index.js +2 -0
- package/lib/shared/components/DatePicker/index.js +1 -0
- package/lib/shared/components/DateTime/DateTime.js +51 -0
- package/lib/shared/components/DateTime/index.js +1 -0
- package/lib/shared/components/Debug/Debug.js +12 -0
- package/lib/shared/components/Debug/index.js +1 -0
- package/lib/shared/components/Disclosure/Disclosure.js +31 -0
- package/lib/shared/components/Disclosure/index.js +1 -0
- package/lib/shared/components/Dropdown/Dropdown.js +91 -0
- package/lib/shared/components/Dropdown/index.js +1 -0
- package/lib/shared/components/EmptyState/EmptyState.js +40 -0
- package/lib/shared/components/EmptyState/index.js +1 -0
- package/lib/shared/components/Form/Form.js +41 -0
- package/lib/shared/components/Form/components/DynamicForm.js +66 -0
- package/lib/shared/components/Form/components/StepperForm.js +266 -0
- package/lib/shared/components/Form/components/index.js +2 -0
- package/lib/shared/components/Form/context/Form.js +164 -0
- package/lib/shared/components/Form/context/index.js +1 -0
- package/lib/shared/components/Form/index.js +1 -0
- package/lib/shared/components/Form/types.d.js +1 -0
- package/lib/shared/components/Form/utils/index.js +31 -0
- package/lib/shared/components/GroupItems/GroupItems.js +17 -0
- package/lib/shared/components/GroupItems/index.js +1 -0
- package/lib/shared/components/Header/Header.js +26 -0
- package/lib/shared/components/Header/index.js +1 -0
- package/lib/shared/components/Heading/Heading.js +5 -0
- package/lib/shared/components/Heading/index.js +1 -0
- package/lib/shared/components/Icon/Icon.js +28 -0
- package/lib/shared/components/Icon/index.js +1 -0
- package/lib/shared/components/Identicons/Identicons.js +6 -0
- package/lib/shared/components/Identicons/index.d.js +0 -0
- package/lib/shared/components/Identicons/index.js +1 -0
- package/lib/shared/components/Image/Image.js +22 -0
- package/lib/shared/components/Image/index.js +1 -0
- package/lib/shared/components/Input/Input.js +201 -0
- package/lib/shared/components/Input/components/CheckBoxInput.js +81 -0
- package/lib/shared/components/Input/components/DateInput.js +89 -0
- package/lib/shared/components/Input/components/DefaultInput.js +102 -0
- package/lib/shared/components/Input/components/FileReaderInput.js +88 -0
- package/lib/shared/components/Input/components/NumberInput.js +141 -0
- package/lib/shared/components/Input/components/PickerInput.js +122 -0
- package/lib/shared/components/Input/components/RCInput.js +112 -0
- package/lib/shared/components/Input/components/Radiobox/RadioboxBasic.js +56 -0
- package/lib/shared/components/Input/components/Radiobox/RadioboxCard.js +27 -0
- package/lib/shared/components/Input/components/Radiobox/RadioboxFull.js +44 -0
- package/lib/shared/components/Input/components/Radiobox/index.js +3 -0
- package/lib/shared/components/Input/components/RadioboxInput.js +102 -0
- package/lib/shared/components/Input/components/SelectInput.js +70 -0
- package/lib/shared/components/Input/components/TextAreaInput.js +67 -0
- package/lib/shared/components/Input/components/TextInput.js +139 -0
- package/lib/shared/components/Input/components/TimeInput.js +37 -0
- package/lib/shared/components/Input/components/UploadFileInput.js +123 -0
- package/lib/shared/components/Input/components/index.js +13 -0
- package/lib/shared/components/Input/components/types.d.js +0 -0
- package/lib/shared/components/Input/index.js +1 -0
- package/lib/shared/components/Input/types.d.js +0 -0
- package/lib/shared/components/Layout/Layout.js +13 -0
- package/lib/shared/components/Layout/index.js +1 -0
- package/lib/shared/components/List/List.js +30 -0
- package/lib/shared/components/List/index.js +1 -0
- package/lib/shared/components/Loader/Loader.js +27 -0
- package/lib/shared/components/Loader/index.js +1 -0
- package/lib/shared/components/Modal/Modal.js +102 -0
- package/lib/shared/components/Modal/index.js +1 -0
- package/lib/shared/components/Notification/Notification.js +39 -0
- package/lib/shared/components/Notification/index.js +1 -0
- package/lib/shared/components/Person/Person.js +81 -0
- package/lib/shared/components/Person/index.js +1 -0
- package/lib/shared/components/Popover/Popover.js +39 -0
- package/lib/shared/components/Popover/index.js +1 -0
- package/lib/shared/components/QRCode/QRCode.js +329 -0
- package/lib/shared/components/QRCode/index.js +1 -0
- package/lib/shared/components/RadioGroup/RadioGroup.js +35 -0
- package/lib/shared/components/RadioGroup/components/DefaultGroup.js +71 -0
- package/lib/shared/components/RadioGroup/components/VerticalGroup.js +83 -0
- package/lib/shared/components/RadioGroup/components/index.js +2 -0
- package/lib/shared/components/RadioGroup/index.js +1 -0
- package/lib/shared/components/Search/Search.js +12 -0
- package/lib/shared/components/Search/index.js +1 -0
- package/lib/shared/components/Select/Select.js +90 -0
- package/lib/shared/components/Select/index.js +1 -0
- package/lib/shared/components/Sidebar/Sidebar.js +42 -0
- package/lib/shared/components/Sidebar/index.js +1 -0
- package/lib/shared/components/SlideOver/SlideOver.js +81 -0
- package/lib/shared/components/SlideOver/index.js +1 -0
- package/lib/shared/components/Slider/Slider.js +80 -0
- package/lib/shared/components/Slider/index.js +1 -0
- package/lib/shared/components/Stepper/Stepper.js +32 -0
- package/lib/shared/components/Stepper/index.js +1 -0
- package/lib/shared/components/Steps/Steps.js +53 -0
- package/lib/shared/components/Steps/index.js +1 -0
- package/lib/shared/components/Switch/Switch.js +26 -0
- package/lib/shared/components/Switch/index.js +1 -0
- package/lib/shared/components/Tab/Tab.js +59 -0
- package/lib/shared/components/Tab/index.js +1 -0
- package/lib/shared/components/Table/Table.js +47 -0
- package/lib/shared/components/Table/index.js +1 -0
- package/lib/shared/components/Text/Text.js +11 -0
- package/lib/shared/components/Text/index.js +1 -0
- package/lib/shared/components/TextList/TextList.js +15 -0
- package/lib/shared/components/TextList/index.js +1 -0
- package/lib/shared/components/TimePicker/TimePicker.js +161 -0
- package/lib/shared/components/TimePicker/index.js +1 -0
- package/lib/shared/components/Tooltip/Tooltip.js +13 -0
- package/lib/shared/components/Tooltip/index.js +1 -0
- package/lib/shared/components/Uploader/Uploader.js +63 -0
- package/lib/shared/components/Uploader/index.js +1 -0
- package/lib/shared/components/Video/Video.js +20 -0
- package/lib/shared/components/Video/index.js +1 -0
- package/lib/shared/components/index.d.js +0 -0
- package/lib/shared/components/index.js +50 -0
- package/lib/shared/elements/Color/ColorPallet.js +20 -0
- package/lib/shared/elements/Color/index.js +1 -0
- package/lib/shared/elements/Text.js +37 -0
- package/lib/shared/elements/index.js +1 -0
- package/lib/shared/helpers/FakeLink.js +8 -0
- package/lib/shared/helpers/constants.js +359 -0
- package/lib/shared/helpers/index.js +2 -0
- package/lib/shared/helpers/isEqual.js +56 -0
- package/lib/shared/index.d.js +0 -0
- package/lib/shared/index.js +1 -0
- package/lib/shared/stories/components/Avatar.stories.js +17 -0
- package/lib/shared/stories/components/Badge.stories.dev.js +37 -0
- package/lib/shared/stories/components/Button.stories.js +553 -0
- package/lib/shared/stories/components/Calendar.stories.js +62 -0
- package/lib/shared/stories/components/Cartel.stories.js +32 -0
- package/lib/shared/stories/components/Checkbox.stories.js +15 -0
- package/lib/shared/stories/components/ColorChecker.stories.dev.js +16 -0
- package/lib/shared/stories/components/DateTime.stories.js +27 -0
- package/lib/shared/stories/components/Disclosure.stories.js +30 -0
- package/lib/shared/stories/components/Dropdown.stories.js +39 -0
- package/lib/shared/stories/components/Form/Default.stories.js +201 -0
- package/lib/shared/stories/components/Form/DummyForm.stories.js +48 -0
- package/lib/shared/stories/components/Form/DynamicForm.stories.js +155 -0
- package/lib/shared/stories/components/Form/StepperForm.stories.js +138 -0
- package/lib/shared/stories/components/Form/ValidateForm.stories.js +70 -0
- package/lib/shared/stories/components/Form/Validation.stories.js +184 -0
- package/lib/shared/stories/components/GroupItems.stories.js +23 -0
- package/lib/shared/stories/components/Header.stories.js +29 -0
- package/lib/shared/stories/components/Heading.stories.js +27 -0
- package/lib/shared/stories/components/Icon.stories.js +22 -0
- package/lib/shared/stories/components/Image.stories.js +23 -0
- package/lib/shared/stories/components/Input/Checkbox.stories.js +45 -0
- package/lib/shared/stories/components/Input/DatePicker.stories.js +23 -0
- package/lib/shared/stories/components/Input/Defaut.stories.js +24 -0
- package/lib/shared/stories/components/Input/Number.stories.js +24 -0
- package/lib/shared/stories/components/Input/RCI.stories.js +59 -0
- package/lib/shared/stories/components/Input/Radiobox.stories.dev.js +28 -0
- package/lib/shared/stories/components/Input/Select.stories.dev.js +27 -0
- package/lib/shared/stories/components/Input/SelectMultiple.stories.dev.js +510 -0
- package/lib/shared/stories/components/Input/Textarea.stories.js +24 -0
- package/lib/shared/stories/components/List.stories.js +34 -0
- package/lib/shared/stories/components/Loader.stories.js +15 -0
- package/lib/shared/stories/components/Modal.stories.js +50 -0
- package/lib/shared/stories/components/Notification.stories.js +22 -0
- package/lib/shared/stories/components/Person.stories.js +41 -0
- package/lib/shared/stories/components/Picker.stories.js +15 -0
- package/lib/shared/stories/components/Popover.stories.js +36 -0
- package/lib/shared/stories/components/QRCode.stories.js +20 -0
- package/lib/shared/stories/components/RadioGroup.stories.js +56 -0
- package/lib/shared/stories/components/Select.stories.js +50 -0
- package/lib/shared/stories/components/Sidebar.stories.js +35 -0
- package/lib/shared/stories/components/Slider.stories.dev.js +48 -0
- package/lib/shared/stories/components/Stepper/Stepper.stories.js +38 -0
- package/lib/shared/stories/components/Steps.stories.js +15 -0
- package/lib/shared/stories/components/Switch.stories.js +15 -0
- package/lib/shared/stories/components/Tab.stories.js +15 -0
- package/lib/shared/stories/components/Table.stories.js +95 -0
- package/lib/shared/stories/components/TextList.stories.js +23 -0
- package/lib/shared/stories/components/Tooltip.stories.dev.js +40 -0
- package/lib/shared/stories/elements/Color.stories.js +269 -0
- package/lib/shared/stories/elements/Text.stories.js +45 -0
- package/lib/shared/types/index.js +1 -0
- package/lib/stories/Foundation/BrandIdentity.prod.stories.js +510 -0
- package/lib/stories/Foundation/Logo.stories.js +19 -0
- package/lib/stories/Foundation/RisingSun.stories.js +16 -0
- package/lib/stories/Foundation/Shadows.stories.js +601 -0
- package/lib/stories/Foundation/Symbol.stories.js +18 -0
- package/lib/stories/HeroContainer.stories.js +18 -0
- package/lib/styles/accessibilityTokens.js +72 -0
- package/lib/styles/borderWidth.js +10 -0
- package/lib/styles/colors.js +303 -0
- package/lib/styles/elevation.js +240 -0
- package/lib/styles/icons.js +218 -0
- package/lib/styles/index.js +29 -0
- package/lib/styles/motion.js +668 -0
- package/lib/styles/opacity.js +10 -0
- package/lib/styles/radius.js +11 -0
- package/lib/styles/sizing.js +35 -0
- package/lib/styles/space.js +24 -0
- package/lib/styles/theme/darkTheme.js +471 -0
- package/lib/styles/theme/index.js +44 -0
- package/lib/styles/theme/lightTheme.js +480 -0
- package/lib/styles/theme/themeTypes.js +1 -0
- package/lib/styles/theme/themeUtils.js +63 -0
- package/lib/styles/typography-advanced.js +510 -0
- package/lib/styles/typography.js +1419 -0
- package/lib/styles/zIndex.js +19 -0
- package/lib/tokens/borders.js +161 -0
- package/lib/tokens/colors.js +426 -0
- package/lib/tokens/components.js +499 -0
- package/lib/tokens/index.js +84 -0
- package/lib/tokens/lighting.js +384 -0
- package/lib/tokens/motion.js +284 -0
- package/lib/tokens/semantic.js +367 -0
- package/lib/tokens/shadows.js +114 -0
- package/lib/tokens/spacing.js +189 -0
- package/lib/tokens/typography.js +268 -0
- package/package.json +176 -0
- package/styles/generated-tokens.css +677 -0
- package/styles/index.css +2 -0
- package/styles/main.css +610 -0
- package/tailwind.config.js +64 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Form } from "../../../components/Form";
|
|
4
|
+
import "../../../../../styles/index.css";
|
|
5
|
+
var loadPayload = function loadPayload() {
|
|
6
|
+
return console.log('Loading Payload');
|
|
7
|
+
};
|
|
8
|
+
var validateText = function validateText(e) {
|
|
9
|
+
var valid = false;
|
|
10
|
+
if (e === "1234") valid = true;
|
|
11
|
+
return new Promise(function (resolve, reject) {
|
|
12
|
+
setTimeout(function () {
|
|
13
|
+
resolve({
|
|
14
|
+
valid: valid,
|
|
15
|
+
message: 'This field is required'
|
|
16
|
+
});
|
|
17
|
+
}, 800);
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
var validateNumber = function validateNumber(e) {
|
|
21
|
+
var valid = false;
|
|
22
|
+
if (e === "1") valid = true;
|
|
23
|
+
return new Promise(function (resolve, reject) {
|
|
24
|
+
setTimeout(function () {
|
|
25
|
+
resolve({
|
|
26
|
+
valid: valid,
|
|
27
|
+
message: 'This field Number is required'
|
|
28
|
+
});
|
|
29
|
+
}, 800);
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
var validateIsEmpty = function validateIsEmpty(e) {
|
|
33
|
+
var valid = false;
|
|
34
|
+
if (e.length > 0) valid = true;
|
|
35
|
+
return new Promise(function (resolve, reject) {
|
|
36
|
+
setTimeout(function () {
|
|
37
|
+
resolve({
|
|
38
|
+
valid: valid,
|
|
39
|
+
message: 'This field is required'
|
|
40
|
+
});
|
|
41
|
+
}, 800);
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
export default {
|
|
45
|
+
component: Form,
|
|
46
|
+
title: 'Data Handle / Form',
|
|
47
|
+
argTypes: {
|
|
48
|
+
type: {
|
|
49
|
+
options: ['stepper', 'fetcher', 'remix', 'dynamic', 'default'],
|
|
50
|
+
control: {
|
|
51
|
+
type: 'radio'
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
args: {
|
|
56
|
+
type: 'stepper',
|
|
57
|
+
debug: true,
|
|
58
|
+
button: {
|
|
59
|
+
text: 'Submit',
|
|
60
|
+
variant: 'primary'
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var fields = [[{
|
|
65
|
+
field: {
|
|
66
|
+
type: 'text',
|
|
67
|
+
id: 'name',
|
|
68
|
+
label: 'Text',
|
|
69
|
+
icon: 'user',
|
|
70
|
+
placeholder: 'write some at least 3 words',
|
|
71
|
+
maxLength: 10,
|
|
72
|
+
validation: {
|
|
73
|
+
fn: validateText
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}, {
|
|
77
|
+
field: {
|
|
78
|
+
type: 'select',
|
|
79
|
+
id: 'select',
|
|
80
|
+
label: 'Select',
|
|
81
|
+
placeholder: 'select',
|
|
82
|
+
options: [{
|
|
83
|
+
name: 'Option 1',
|
|
84
|
+
value: 1
|
|
85
|
+
}, {
|
|
86
|
+
name: 'Option 2',
|
|
87
|
+
value: 2
|
|
88
|
+
}]
|
|
89
|
+
}
|
|
90
|
+
}], {
|
|
91
|
+
field: {
|
|
92
|
+
type: 'text',
|
|
93
|
+
id: 'first_data',
|
|
94
|
+
label: 'First data',
|
|
95
|
+
icon: 'user',
|
|
96
|
+
placeholder: 'write some at least 3 words',
|
|
97
|
+
validation: {
|
|
98
|
+
fn: validateText
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
field: {
|
|
103
|
+
type: 'number',
|
|
104
|
+
id: 'quantity',
|
|
105
|
+
label: 'Quantity',
|
|
106
|
+
placeholder: '0'
|
|
107
|
+
}
|
|
108
|
+
}, [{
|
|
109
|
+
field: {
|
|
110
|
+
type: 'time',
|
|
111
|
+
id: 'duration',
|
|
112
|
+
label: 'Duration',
|
|
113
|
+
placeholder: 'Duration',
|
|
114
|
+
validation: {
|
|
115
|
+
fn: validateIsEmpty
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}, {
|
|
119
|
+
field: {
|
|
120
|
+
type: 'number',
|
|
121
|
+
id: 'price',
|
|
122
|
+
label: 'Price',
|
|
123
|
+
placeholder: '$ 00.00',
|
|
124
|
+
validation: {
|
|
125
|
+
fn: validateNumber
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}, {
|
|
129
|
+
field: {
|
|
130
|
+
type: 'select',
|
|
131
|
+
id: 'contracts_id',
|
|
132
|
+
label: 'Smart Contracts',
|
|
133
|
+
placeholder: 'Smart Contracts',
|
|
134
|
+
options: [{
|
|
135
|
+
name: '122',
|
|
136
|
+
value: '122-418a-4459-9fb7-ef85de7279b4'
|
|
137
|
+
}, {
|
|
138
|
+
name: '124',
|
|
139
|
+
value: '124-418a-4459-9fb7-ef85de7279b4'
|
|
140
|
+
}]
|
|
141
|
+
}
|
|
142
|
+
}]
|
|
143
|
+
// [{ field: {
|
|
144
|
+
// type: 'text',
|
|
145
|
+
// id: 'name',
|
|
146
|
+
// label: 'Text',
|
|
147
|
+
// icon: 'user',
|
|
148
|
+
// placeholder: 'write some at least 3 words',
|
|
149
|
+
// validation: {
|
|
150
|
+
// fn: validateText
|
|
151
|
+
// }
|
|
152
|
+
// }},
|
|
153
|
+
// { field: {
|
|
154
|
+
// type: 'text',
|
|
155
|
+
// id: 'user',
|
|
156
|
+
// label: 'Text',
|
|
157
|
+
// icon: 'user',
|
|
158
|
+
// placeholder: 'write some at least 3 words',
|
|
159
|
+
// }}],
|
|
160
|
+
// [{ field: {
|
|
161
|
+
// type: 'text',
|
|
162
|
+
// id: 'description',
|
|
163
|
+
// label: 'Text',
|
|
164
|
+
// icon: 'user',
|
|
165
|
+
// placeholder: 'write some at least 3 words',
|
|
166
|
+
// validation: {
|
|
167
|
+
// fn: validateText
|
|
168
|
+
// }
|
|
169
|
+
// }},
|
|
170
|
+
// ],
|
|
171
|
+
];
|
|
172
|
+
export var Validation = function Validation(args) {
|
|
173
|
+
return /*#__PURE__*/React.createElement(Form, _extends({}, args, {
|
|
174
|
+
fields: fields,
|
|
175
|
+
id: "1974"
|
|
176
|
+
}));
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
// Validation.parameters = {
|
|
180
|
+
// design: {
|
|
181
|
+
// type: 'figma',
|
|
182
|
+
// url: 'https://www.figma.com/file/vkIFRuwbONhF3qrGI7bHvL/App?node-id=2%3A129'
|
|
183
|
+
// }
|
|
184
|
+
// };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { GroupItems } from "../../components/GroupItems";
|
|
2
|
+
import "../../../../styles/index.css";
|
|
3
|
+
export default {
|
|
4
|
+
component: GroupItems,
|
|
5
|
+
title: 'Composes / GroupItems',
|
|
6
|
+
argTypes: {
|
|
7
|
+
items: {
|
|
8
|
+
type: {
|
|
9
|
+
summary: 'array'
|
|
10
|
+
},
|
|
11
|
+
defaultValue: [['cogwheel', 'a Description'], ['cogwheel', 'another Description'], ['cogwheel', 'other Description']]
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export var Default = function Default(args) {
|
|
16
|
+
return /*#__PURE__*/React.createElement(GroupItems, args);
|
|
17
|
+
};
|
|
18
|
+
Default.parameters = {
|
|
19
|
+
design: {
|
|
20
|
+
type: 'figma',
|
|
21
|
+
url: 'https://www.figma.com/file/OG2qkuEFEhNmf2wTA0wAGq/Design-System?node-id=754%3A6702'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Header } from "../../components/Header";
|
|
2
|
+
import "../../../../styles/index.css";
|
|
3
|
+
export default {
|
|
4
|
+
component: Header,
|
|
5
|
+
title: 'Components / Header',
|
|
6
|
+
args: {
|
|
7
|
+
section: {
|
|
8
|
+
title: 'Header'
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
section: {
|
|
13
|
+
title: {
|
|
14
|
+
type: {
|
|
15
|
+
summary: 'string'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
export var Default = function Default(args) {
|
|
22
|
+
return /*#__PURE__*/React.createElement(Header, args);
|
|
23
|
+
};
|
|
24
|
+
Default.parameters = {
|
|
25
|
+
design: {
|
|
26
|
+
type: 'figma',
|
|
27
|
+
url: 'https://www.figma.com/file/vkIFRuwbONhF3qrGI7bHvL/App?node-id=2%3A129'
|
|
28
|
+
}
|
|
29
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Heading } from "../../components/Heading";
|
|
2
|
+
import "../../../../styles/index.css";
|
|
3
|
+
export default {
|
|
4
|
+
component: Heading,
|
|
5
|
+
title: 'Components / Heading',
|
|
6
|
+
args: {
|
|
7
|
+
variant: 'h1'
|
|
8
|
+
},
|
|
9
|
+
argTypes: {
|
|
10
|
+
section: {
|
|
11
|
+
title: {
|
|
12
|
+
type: {
|
|
13
|
+
summary: 'string'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export var Default = function Default(args) {
|
|
20
|
+
return /*#__PURE__*/React.createElement(Heading, args);
|
|
21
|
+
};
|
|
22
|
+
Default.parameters = {
|
|
23
|
+
design: {
|
|
24
|
+
type: 'figma',
|
|
25
|
+
url: 'https://www.figma.com/file/vkIFRuwbONhF3qrGI7bHvL/App?node-id=2%3A129'
|
|
26
|
+
}
|
|
27
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Icon } from "../../components/Icon";
|
|
2
|
+
import { icons } from "../../../assets/icons";
|
|
3
|
+
import "../../../../styles/index.css";
|
|
4
|
+
export default {
|
|
5
|
+
component: Icon,
|
|
6
|
+
title: 'Elements / Icon'
|
|
7
|
+
};
|
|
8
|
+
export var Default = function Default() {
|
|
9
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, Object.keys(icons).map(function (key) {
|
|
10
|
+
return /*#__PURE__*/React.createElement(Icon, {
|
|
11
|
+
name: key,
|
|
12
|
+
color: "secondary",
|
|
13
|
+
size: "xlarge"
|
|
14
|
+
});
|
|
15
|
+
}));
|
|
16
|
+
};
|
|
17
|
+
Default.parameters = {
|
|
18
|
+
design: {
|
|
19
|
+
type: 'figma',
|
|
20
|
+
url: 'https://www.figma.com/file/vkIFRuwbONhF3qrGI7bHvL/App?node-id=1031%3A75'
|
|
21
|
+
}
|
|
22
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Image } from "../../components/Image";
|
|
2
|
+
import "../../../../styles/index.css";
|
|
3
|
+
export default {
|
|
4
|
+
component: Image,
|
|
5
|
+
title: 'Components / Image',
|
|
6
|
+
argTypes: {
|
|
7
|
+
imageUrl: {
|
|
8
|
+
type: {
|
|
9
|
+
summary: 'string'
|
|
10
|
+
},
|
|
11
|
+
defaultValue: 'https://images.unsplash.com/photo-1534528741775-53994a69daeb?ixlib=rb-=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=8&w=1024&h=1024&q=80'
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export var Default = function Default(args) {
|
|
16
|
+
return /*#__PURE__*/React.createElement(Image, args);
|
|
17
|
+
};
|
|
18
|
+
Default.parameters = {
|
|
19
|
+
design: {
|
|
20
|
+
type: 'figma',
|
|
21
|
+
url: 'https://www.figma.com/file/vkIFRuwbONhF3qrGI7bHvL/App?node-id=971%3A68'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Input } from "../../../components/Input";
|
|
2
|
+
import "../../../../../styles/index.css";
|
|
3
|
+
function mockFunction(value) {
|
|
4
|
+
// console.log(value);
|
|
5
|
+
}
|
|
6
|
+
export default {
|
|
7
|
+
component: Input,
|
|
8
|
+
title: 'Data Handle / Input',
|
|
9
|
+
args: {
|
|
10
|
+
type: 'checkbox',
|
|
11
|
+
id: 'recurrence',
|
|
12
|
+
label: 'Set Recurrence',
|
|
13
|
+
options: [{
|
|
14
|
+
name: 'SUN',
|
|
15
|
+
value: '0'
|
|
16
|
+
}, {
|
|
17
|
+
name: 'MON',
|
|
18
|
+
value: '1'
|
|
19
|
+
}, {
|
|
20
|
+
name: 'TUE',
|
|
21
|
+
value: '2'
|
|
22
|
+
}, {
|
|
23
|
+
name: 'WEN',
|
|
24
|
+
value: '3'
|
|
25
|
+
}, {
|
|
26
|
+
name: 'THU',
|
|
27
|
+
value: '4'
|
|
28
|
+
}, {
|
|
29
|
+
name: 'FRI',
|
|
30
|
+
value: '5'
|
|
31
|
+
}, {
|
|
32
|
+
name: 'SAT',
|
|
33
|
+
value: '6'
|
|
34
|
+
}]
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
export var Checkbox = function Checkbox(args) {
|
|
38
|
+
return /*#__PURE__*/React.createElement(Input, args);
|
|
39
|
+
};
|
|
40
|
+
Checkbox.parameters = {
|
|
41
|
+
design: {
|
|
42
|
+
type: 'figma',
|
|
43
|
+
url: 'https://www.figma.com/file/vkIFRuwbONhF3qrGI7bHvL/App?node-id=2%3A129'
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Input } from "../../../components/Input";
|
|
2
|
+
import "../../../../../styles/index.css";
|
|
3
|
+
function mockFunction(value) {
|
|
4
|
+
// console.log(value);
|
|
5
|
+
}
|
|
6
|
+
export default {
|
|
7
|
+
component: Input,
|
|
8
|
+
title: 'Data Handle / Input',
|
|
9
|
+
args: {
|
|
10
|
+
type: 'datepicker',
|
|
11
|
+
id: 'datepicker',
|
|
12
|
+
label: 'Date Picker'
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export var DatePicker = function DatePicker(args) {
|
|
16
|
+
return /*#__PURE__*/React.createElement(Input, args);
|
|
17
|
+
};
|
|
18
|
+
DatePicker.parameters = {
|
|
19
|
+
design: {
|
|
20
|
+
type: 'figma',
|
|
21
|
+
url: 'https://www.figma.com/file/vkIFRuwbONhF3qrGI7bHvL/App?node-id=2%3A129'
|
|
22
|
+
}
|
|
23
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Input } from "../../../components/Input";
|
|
2
|
+
import "../../../../../styles/index.css";
|
|
3
|
+
function mockFunction(value) {
|
|
4
|
+
// console.log(value);
|
|
5
|
+
}
|
|
6
|
+
export default {
|
|
7
|
+
component: Input,
|
|
8
|
+
title: 'Data Handle / Input',
|
|
9
|
+
args: {
|
|
10
|
+
type: 'email',
|
|
11
|
+
id: 'email',
|
|
12
|
+
label: 'Email',
|
|
13
|
+
placeholder: 'example@email.com'
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export var Default = function Default(args) {
|
|
17
|
+
return /*#__PURE__*/React.createElement(Input, args);
|
|
18
|
+
};
|
|
19
|
+
Default.parameters = {
|
|
20
|
+
design: {
|
|
21
|
+
type: 'figma',
|
|
22
|
+
url: 'https://www.figma.com/file/vkIFRuwbONhF3qrGI7bHvL/App?node-id=2%3A129'
|
|
23
|
+
}
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Input } from "../../../components/Input";
|
|
2
|
+
import "../../../../../styles/index.css";
|
|
3
|
+
function mockFunction(value) {
|
|
4
|
+
// console.log(value);
|
|
5
|
+
}
|
|
6
|
+
export default {
|
|
7
|
+
component: Input,
|
|
8
|
+
title: 'Data Handle / Input',
|
|
9
|
+
args: {
|
|
10
|
+
type: 'email',
|
|
11
|
+
id: 'email',
|
|
12
|
+
label: 'Email',
|
|
13
|
+
placeholder: 'example@email.com'
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export var Number = function Number(args) {
|
|
17
|
+
return /*#__PURE__*/React.createElement(Input, args);
|
|
18
|
+
};
|
|
19
|
+
Number.parameters = {
|
|
20
|
+
design: {
|
|
21
|
+
type: 'figma',
|
|
22
|
+
url: 'https://www.figma.com/file/vkIFRuwbONhF3qrGI7bHvL/App?node-id=2%3A129'
|
|
23
|
+
}
|
|
24
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { RCInput } from "../../../components/Input/components/RCInput";
|
|
15
|
+
import "../../../../../styles/index.css";
|
|
16
|
+
function mockFunction(value) {
|
|
17
|
+
// console.log(value);
|
|
18
|
+
}
|
|
19
|
+
var checkCodeApiMock = function checkCodeApiMock(code) {
|
|
20
|
+
return new Promise(function (r) {
|
|
21
|
+
return setTimeout(r, 350, code === '123456');
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
export default {
|
|
25
|
+
component: RCInput,
|
|
26
|
+
title: 'Data Handle / Input',
|
|
27
|
+
args: {
|
|
28
|
+
type: 'rci',
|
|
29
|
+
id: 'code',
|
|
30
|
+
maxLength: 6
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
export var RCI = function RCI(args) {
|
|
34
|
+
var _React$useState = React.useState('input'),
|
|
35
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
36
|
+
state = _React$useState2[0],
|
|
37
|
+
setState = _React$useState2[1];
|
|
38
|
+
var checkCodeApiMock = function checkCodeApiMock(code) {
|
|
39
|
+
if (code === '123456') {
|
|
40
|
+
setState('success');
|
|
41
|
+
} else {
|
|
42
|
+
setState('error');
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
return /*#__PURE__*/React.createElement(RCInput, {
|
|
46
|
+
config: _objectSpread(_objectSpread({}, args), {}, {
|
|
47
|
+
validation: {
|
|
48
|
+
state: state,
|
|
49
|
+
fn: checkCodeApiMock
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
RCI.parameters = {
|
|
55
|
+
design: {
|
|
56
|
+
type: 'figma',
|
|
57
|
+
url: 'https://www.figma.com/file/vkIFRuwbONhF3qrGI7bHvL/App?node-id=2%3A129'
|
|
58
|
+
}
|
|
59
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Input } from "../../../components/Input";
|
|
2
|
+
import "../../../../../styles/index.css";
|
|
3
|
+
function mockFunction(value) {
|
|
4
|
+
// console.log(value);
|
|
5
|
+
}
|
|
6
|
+
export default {
|
|
7
|
+
component: Input,
|
|
8
|
+
title: 'Data Handle / Input',
|
|
9
|
+
args: {
|
|
10
|
+
type: 'radiobox',
|
|
11
|
+
id: 'email',
|
|
12
|
+
label: 'Email',
|
|
13
|
+
variant: 'full',
|
|
14
|
+
options: [{
|
|
15
|
+
value: '1',
|
|
16
|
+
name: 'desc'
|
|
17
|
+
}]
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
export var Radiobox = function Radiobox(args) {
|
|
21
|
+
return /*#__PURE__*/React.createElement(Input, args);
|
|
22
|
+
};
|
|
23
|
+
Radiobox.parameters = {
|
|
24
|
+
design: {
|
|
25
|
+
type: 'figma',
|
|
26
|
+
url: 'https://www.figma.com/file/vkIFRuwbONhF3qrGI7bHvL/App?node-id=2%3A129'
|
|
27
|
+
}
|
|
28
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Input } from "../../../components/Input";
|
|
2
|
+
import "../../../../../styles/index.css";
|
|
3
|
+
function mockFunction(value) {
|
|
4
|
+
// console.log(value);
|
|
5
|
+
}
|
|
6
|
+
export default {
|
|
7
|
+
component: Input,
|
|
8
|
+
title: 'Data Handle / Input',
|
|
9
|
+
args: {
|
|
10
|
+
type: 'select',
|
|
11
|
+
options: [{
|
|
12
|
+
value: '1',
|
|
13
|
+
name: 'desc'
|
|
14
|
+
}],
|
|
15
|
+
id: 'options',
|
|
16
|
+
label: 'Select one option'
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
export var Select = function Select(args) {
|
|
20
|
+
return /*#__PURE__*/React.createElement(Input, args);
|
|
21
|
+
};
|
|
22
|
+
Select.parameters = {
|
|
23
|
+
design: {
|
|
24
|
+
type: 'figma',
|
|
25
|
+
url: 'https://www.figma.com/file/vkIFRuwbONhF3qrGI7bHvL/App?node-id=2%3A129'
|
|
26
|
+
}
|
|
27
|
+
};
|