@dxc-technology/halstack-react 0.0.0-fce22b8 → 0.0.0-ff99b25
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/BackgroundColorContext.js +50 -0
- package/ThemeContext.js +246 -0
- package/V3Select/V3Select.js +455 -0
- package/V3Select/index.d.ts +27 -0
- package/{dist/textarea/Textarea.js → V3Textarea/V3Textarea.js} +39 -39
- package/V3Textarea/index.d.ts +27 -0
- package/accordion/Accordion.d.ts +4 -0
- package/accordion/Accordion.js +258 -0
- package/accordion/types.d.ts +68 -0
- package/accordion/types.js +5 -0
- package/accordion-group/AccordionGroup.d.ts +7 -0
- package/accordion-group/AccordionGroup.js +170 -0
- package/accordion-group/types.d.ts +72 -0
- package/accordion-group/types.js +5 -0
- package/alert/Alert.d.ts +4 -0
- package/alert/Alert.js +290 -0
- package/alert/types.d.ts +49 -0
- package/alert/types.js +5 -0
- package/badge/Badge.js +59 -0
- package/{dist/box → box}/Box.js +9 -21
- package/box/Box.stories.jsx +132 -0
- package/box/index.d.ts +25 -0
- package/button/Button.d.ts +4 -0
- package/button/Button.js +182 -0
- package/button/Button.stories.tsx +293 -0
- package/button/types.d.ts +57 -0
- package/button/types.js +5 -0
- package/card/Card.d.ts +4 -0
- package/{dist/card → card}/Card.js +32 -123
- package/card/types.d.ts +69 -0
- package/card/types.js +5 -0
- package/checkbox/Checkbox.d.ts +4 -0
- package/{dist/checkbox → checkbox}/Checkbox.js +44 -82
- package/checkbox/types.d.ts +60 -0
- package/checkbox/types.js +5 -0
- package/{dist/chip → chip}/Chip.js +42 -84
- package/chip/index.d.ts +22 -0
- package/{dist/common → common}/OpenSans.css +0 -0
- package/{dist/common → common}/RequiredComponent.js +3 -11
- package/{dist/common → common}/fonts/OpenSans-Bold.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-Italic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-Light.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-LightItalic.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-Regular.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-SemiBold.ttf +0 -0
- package/{dist/common → common}/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- package/{dist/common → common}/utils.js +0 -0
- package/common/variables.js +1569 -0
- package/{dist/date → date}/Date.js +33 -51
- package/date/index.d.ts +27 -0
- package/date-input/DateInput.d.ts +4 -0
- package/date-input/DateInput.js +361 -0
- package/date-input/types.d.ts +100 -0
- package/date-input/types.js +5 -0
- package/dialog/Dialog.d.ts +4 -0
- package/{dist/dialog → dialog}/Dialog.js +29 -100
- package/dialog/types.d.ts +43 -0
- package/dialog/types.js +5 -0
- package/dropdown/Dropdown.d.ts +4 -0
- package/dropdown/Dropdown.js +417 -0
- package/dropdown/types.d.ts +89 -0
- package/dropdown/types.js +5 -0
- package/file-input/FileInput.js +532 -0
- package/file-input/FileItem.js +193 -0
- package/file-input/index.d.ts +81 -0
- package/footer/Footer.d.ts +4 -0
- package/footer/Footer.js +266 -0
- package/footer/Footer.stories.jsx +151 -0
- package/footer/Icons.js +77 -0
- package/footer/types.d.ts +61 -0
- package/footer/types.js +5 -0
- package/header/Header.js +326 -0
- package/header/Icons.js +59 -0
- package/header/index.d.ts +25 -0
- package/{dist/heading → heading}/Heading.js +30 -76
- package/heading/index.d.ts +17 -0
- package/input-text/Icons.js +22 -0
- package/{dist/input-text → input-text}/InputText.js +120 -178
- package/input-text/index.d.ts +36 -0
- package/{dist/layout → layout}/ApplicationLayout.js +35 -131
- package/layout/Icons.js +55 -0
- package/link/Link.js +183 -0
- package/link/index.d.ts +23 -0
- package/main.d.ts +44 -0
- package/{dist/main.js → main.js} +121 -69
- package/number-input/NumberInput.js +128 -0
- package/number-input/NumberInput.stories.jsx +115 -0
- package/number-input/NumberInputContext.js +16 -0
- package/number-input/index.d.ts +113 -0
- package/package.json +34 -25
- package/paginator/Icons.js +66 -0
- package/paginator/Paginator.d.ts +4 -0
- package/paginator/Paginator.js +198 -0
- package/paginator/types.d.ts +38 -0
- package/paginator/types.js +5 -0
- package/password-input/PasswordInput.js +199 -0
- package/password-input/PasswordInput.stories.jsx +131 -0
- package/password-input/index.d.ts +94 -0
- package/progress-bar/ProgressBar.d.ts +4 -0
- package/progress-bar/ProgressBar.js +170 -0
- package/progress-bar/types.d.ts +37 -0
- package/progress-bar/types.js +5 -0
- package/radio/Radio.d.ts +4 -0
- package/{dist/radio → radio}/Radio.js +15 -50
- package/radio/types.d.ts +54 -0
- package/radio/types.js +5 -0
- package/{dist/resultsetTable → resultsetTable}/ResultsetTable.js +35 -136
- package/resultsetTable/index.d.ts +19 -0
- package/select/Select.js +865 -0
- package/select/index.d.ts +131 -0
- package/{dist/sidenav → sidenav}/Sidenav.js +20 -58
- package/sidenav/index.d.ts +13 -0
- package/slider/Slider.d.ts +4 -0
- package/slider/Slider.js +306 -0
- package/slider/types.d.ts +83 -0
- package/slider/types.js +5 -0
- package/spinner/Spinner.js +267 -0
- package/spinner/index.d.ts +17 -0
- package/switch/Switch.d.ts +4 -0
- package/{dist/switch → switch}/Switch.js +28 -71
- package/switch/types.d.ts +58 -0
- package/switch/types.js +5 -0
- package/table/Table.js +118 -0
- package/table/index.d.ts +13 -0
- package/tabs/Tabs.d.ts +4 -0
- package/tabs/Tabs.js +211 -0
- package/tabs/types.d.ts +71 -0
- package/tabs/types.js +5 -0
- package/{dist/tag → tag}/Tag.js +50 -122
- package/tag/index.d.ts +24 -0
- package/text-input/TextInput.js +825 -0
- package/text-input/index.d.ts +135 -0
- package/textarea/Textarea.js +317 -0
- package/textarea/Textarea.stories.jsx +135 -0
- package/textarea/index.d.ts +117 -0
- package/{dist/toggle → toggle}/Toggle.js +15 -49
- package/toggle/index.d.ts +21 -0
- package/toggle-group/ToggleGroup.js +243 -0
- package/toggle-group/index.d.ts +21 -0
- package/{dist/upload → upload}/Upload.js +11 -15
- package/upload/buttons-upload/ButtonsUpload.js +111 -0
- package/upload/buttons-upload/Icons.js +40 -0
- package/upload/dragAndDropArea/DragAndDropArea.js +225 -0
- package/upload/dragAndDropArea/Icons.js +39 -0
- package/upload/file-upload/FileToUpload.js +115 -0
- package/upload/file-upload/Icons.js +66 -0
- package/{dist/upload → upload}/files-upload/FilesToUpload.js +12 -26
- package/upload/index.d.ts +15 -0
- package/upload/transaction/Icons.js +160 -0
- package/upload/transaction/Transaction.js +104 -0
- package/upload/transactions/Transactions.js +94 -0
- package/{dist/useTheme.js → useTheme.js} +0 -0
- package/wizard/Icons.js +65 -0
- package/wizard/Wizard.js +271 -0
- package/wizard/index.d.ts +18 -0
- package/README.md +0 -66
- package/babel.config.js +0 -8
- package/dist/BackgroundColorContext.js +0 -46
- package/dist/ThemeContext.js +0 -216
- package/dist/accordion/Accordion.js +0 -340
- package/dist/accordion/Accordion.stories.js +0 -207
- package/dist/accordion/readme.md +0 -96
- package/dist/accordion-group/AccordionGroup.js +0 -188
- package/dist/accordion-group/AccordionGroup.stories.js +0 -207
- package/dist/accordion-group/readme.md +0 -70
- package/dist/alert/Alert.js +0 -388
- package/dist/alert/Alert.stories.js +0 -158
- package/dist/alert/close.svg +0 -4
- package/dist/alert/error.svg +0 -4
- package/dist/alert/info.svg +0 -4
- package/dist/alert/readme.md +0 -43
- package/dist/alert/success.svg +0 -4
- package/dist/alert/warning.svg +0 -4
- package/dist/badge/Badge.js +0 -61
- package/dist/button/Button.js +0 -228
- package/dist/button/Button.stories.js +0 -224
- package/dist/button/readme.md +0 -93
- package/dist/checkbox/Checkbox.stories.js +0 -144
- package/dist/checkbox/readme.md +0 -116
- package/dist/common/variables.js +0 -1154
- package/dist/date/Date.stories.js +0 -205
- package/dist/date/calendar.svg +0 -1
- package/dist/date/calendar_dark.svg +0 -1
- package/dist/date/readme.md +0 -73
- package/dist/dialog/Dialog.stories.js +0 -217
- package/dist/dialog/readme.md +0 -32
- package/dist/dropdown/Dropdown.js +0 -492
- package/dist/dropdown/Dropdown.stories.js +0 -249
- package/dist/dropdown/baseline-arrow_drop_down.svg +0 -1
- package/dist/dropdown/baseline-arrow_drop_down_wh.svg +0 -4
- package/dist/dropdown/baseline-arrow_drop_up.svg +0 -1
- package/dist/dropdown/baseline-arrow_drop_up_wh.svg +0 -4
- package/dist/dropdown/readme.md +0 -69
- package/dist/footer/Footer.js +0 -405
- package/dist/footer/Footer.stories.js +0 -94
- package/dist/footer/dxc_logo_wht.png +0 -0
- package/dist/footer/readme.md +0 -41
- package/dist/header/Header.js +0 -431
- package/dist/header/Header.stories.js +0 -176
- package/dist/header/close_icon.svg +0 -1
- package/dist/header/dxc_logo_black.png +0 -0
- package/dist/header/dxc_logo_blk_rgb.svg +0 -6
- package/dist/header/dxc_logo_white.png +0 -0
- package/dist/header/hamb_menu_black.svg +0 -1
- package/dist/header/hamb_menu_white.svg +0 -1
- package/dist/header/readme.md +0 -33
- package/dist/input-text/InputText.stories.js +0 -209
- package/dist/input-text/error.svg +0 -1
- package/dist/input-text/readme.md +0 -91
- package/dist/layout/facebook.svg +0 -45
- package/dist/layout/linkedin.svg +0 -50
- package/dist/layout/twitter.svg +0 -53
- package/dist/link/Link.js +0 -212
- package/dist/link/readme.md +0 -51
- package/dist/paginator/Paginator.js +0 -283
- package/dist/paginator/images/next.svg +0 -3
- package/dist/paginator/images/nextPage.svg +0 -3
- package/dist/paginator/images/previous.svg +0 -3
- package/dist/paginator/images/previousPage.svg +0 -3
- package/dist/paginator/readme.md +0 -50
- package/dist/progress-bar/ProgressBar.js +0 -206
- package/dist/progress-bar/ProgressBar.stories.js +0 -280
- package/dist/progress-bar/readme.md +0 -63
- package/dist/radio/Radio.stories.js +0 -166
- package/dist/radio/readme.md +0 -70
- package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
- package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
- package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
- package/dist/select/Select.js +0 -525
- package/dist/select/Select.stories.js +0 -235
- package/dist/select/readme.md +0 -72
- package/dist/slider/Slider.js +0 -315
- package/dist/slider/Slider.stories.js +0 -241
- package/dist/slider/readme.md +0 -64
- package/dist/spinner/Spinner.js +0 -214
- package/dist/spinner/Spinner.stories.js +0 -183
- package/dist/spinner/readme.md +0 -65
- package/dist/switch/Switch.stories.js +0 -134
- package/dist/switch/readme.md +0 -133
- package/dist/table/Table.js +0 -122
- package/dist/tabs/Tabs.js +0 -347
- package/dist/tabs/Tabs.stories.js +0 -130
- package/dist/tabs/readme.md +0 -78
- package/dist/tabs-for-sections/TabsForSections.js +0 -92
- package/dist/tabs-for-sections/readme.md +0 -78
- package/dist/toggle/Toggle.stories.js +0 -297
- package/dist/toggle/readme.md +0 -80
- package/dist/toggle-group/ToggleGroup.js +0 -241
- package/dist/toggle-group/readme.md +0 -82
- package/dist/upload/Upload.stories.js +0 -72
- package/dist/upload/buttons-upload/ButtonsUpload.js +0 -135
- package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
- package/dist/upload/buttons-upload/upload-button.svg +0 -1
- package/dist/upload/dragAndDropArea/DragAndDropArea.js +0 -325
- package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
- package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
- package/dist/upload/file-upload/FileToUpload.js +0 -184
- package/dist/upload/file-upload/audio-icon.svg +0 -4
- package/dist/upload/file-upload/close.svg +0 -4
- package/dist/upload/file-upload/file-icon.svg +0 -4
- package/dist/upload/file-upload/video-icon.svg +0 -4
- package/dist/upload/readme.md +0 -37
- package/dist/upload/transaction/Transaction.js +0 -171
- package/dist/upload/transaction/audio-icon-err.svg +0 -4
- package/dist/upload/transaction/audio-icon.svg +0 -4
- package/dist/upload/transaction/error-icon.svg +0 -4
- package/dist/upload/transaction/file-icon-err.svg +0 -4
- package/dist/upload/transaction/file-icon.svg +0 -4
- package/dist/upload/transaction/image-icon-err.svg +0 -4
- package/dist/upload/transaction/image-icon.svg +0 -4
- package/dist/upload/transaction/success-icon.svg +0 -4
- package/dist/upload/transaction/video-icon-err.svg +0 -4
- package/dist/upload/transaction/video-icon.svg +0 -4
- package/dist/upload/transactions/Transactions.js +0 -138
- package/dist/wizard/Wizard.js +0 -383
- package/dist/wizard/invalid_icon.svg +0 -6
- package/dist/wizard/valid_icon.svg +0 -6
- package/dist/wizard/validation-wrong.svg +0 -6
- package/test/Accordion.test.js +0 -33
- package/test/AccordionGroup.test.js +0 -125
- package/test/Alert.test.js +0 -53
- package/test/Box.test.js +0 -10
- package/test/Button.test.js +0 -18
- package/test/Card.test.js +0 -30
- package/test/Checkbox.test.js +0 -45
- package/test/Chip.test.js +0 -25
- package/test/Date.test.js +0 -393
- package/test/Dialog.test.js +0 -23
- package/test/Dropdown.test.js +0 -130
- package/test/Footer.test.js +0 -99
- package/test/Header.test.js +0 -39
- package/test/Heading.test.js +0 -35
- package/test/InputText.test.js +0 -240
- package/test/Link.test.js +0 -42
- package/test/Paginator.test.js +0 -177
- package/test/ProgressBar.test.js +0 -35
- package/test/Radio.test.js +0 -37
- package/test/ResultsetTable.test.js +0 -330
- package/test/Select.test.js +0 -192
- package/test/Sidenav.test.js +0 -45
- package/test/Slider.test.js +0 -82
- package/test/Spinner.test.js +0 -27
- package/test/Switch.test.js +0 -45
- package/test/Table.test.js +0 -36
- package/test/Tabs.test.js +0 -109
- package/test/TabsForSections.test.js +0 -34
- package/test/Tag.test.js +0 -32
- package/test/TextArea.test.js +0 -52
- package/test/ToggleGroup.test.js +0 -81
- package/test/Upload.test.js +0 -60
- package/test/Wizard.test.js +0 -130
- package/test/mocks/pngMock.js +0 -1
- package/test/mocks/svgMock.js +0 -1
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
6
|
-
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
|
|
9
|
-
var _react2 = require("@storybook/react");
|
|
10
|
-
|
|
11
|
-
var _addonActions = require("@storybook/addon-actions");
|
|
12
|
-
|
|
13
|
-
var _addonKnobs = require("@storybook/addon-knobs");
|
|
14
|
-
|
|
15
|
-
var _run_icon_black = _interopRequireDefault(require("../../.storybook/public/run_icon_black.png"));
|
|
16
|
-
|
|
17
|
-
var _readme = _interopRequireDefault(require("./readme.md"));
|
|
18
|
-
|
|
19
|
-
var _Button = _interopRequireDefault(require("./Button"));
|
|
20
|
-
|
|
21
|
-
var onClick = (0, _addonActions.action)("onClick");
|
|
22
|
-
|
|
23
|
-
onClick.toString = function () {
|
|
24
|
-
return "onClickHandler";
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
(0, _react2.storiesOf)("Form Components|Button", module).add("Types", function () {
|
|
28
|
-
return _react["default"].createElement("div", null, _react["default"].createElement("h3", null, "Light"), _react["default"].createElement("div", null, _react["default"].createElement(_Button["default"], {
|
|
29
|
-
mode: "basic",
|
|
30
|
-
theme: "light",
|
|
31
|
-
label: "Basic Button",
|
|
32
|
-
onClick: onClick
|
|
33
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
34
|
-
mode: "raised",
|
|
35
|
-
theme: "light",
|
|
36
|
-
label: "Raised Button",
|
|
37
|
-
onClick: onClick
|
|
38
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
39
|
-
mode: "flat",
|
|
40
|
-
theme: "light",
|
|
41
|
-
label: "Flat Button",
|
|
42
|
-
onClick: onClick
|
|
43
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
44
|
-
mode: "outlined",
|
|
45
|
-
theme: "light",
|
|
46
|
-
label: "Outlined Button",
|
|
47
|
-
onClick: onClick
|
|
48
|
-
})), _react["default"].createElement("div", null, _react["default"].createElement(_Button["default"], {
|
|
49
|
-
disabled: true,
|
|
50
|
-
mode: "basic",
|
|
51
|
-
theme: "light",
|
|
52
|
-
label: "Basic Button",
|
|
53
|
-
onClick: onClick
|
|
54
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
55
|
-
disabled: true,
|
|
56
|
-
mode: "raised",
|
|
57
|
-
theme: "light",
|
|
58
|
-
label: "Raised Button",
|
|
59
|
-
onClick: onClick
|
|
60
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
61
|
-
disabled: true,
|
|
62
|
-
mode: "flat",
|
|
63
|
-
theme: "light",
|
|
64
|
-
label: "Flat Button",
|
|
65
|
-
onClick: onClick
|
|
66
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
67
|
-
disabled: true,
|
|
68
|
-
mode: "outlined",
|
|
69
|
-
theme: "light",
|
|
70
|
-
label: "Outlined Button",
|
|
71
|
-
onClick: onClick
|
|
72
|
-
})), _react["default"].createElement("h3", null, "Dark"), _react["default"].createElement("div", {
|
|
73
|
-
style: {
|
|
74
|
-
background: "black"
|
|
75
|
-
}
|
|
76
|
-
}, _react["default"].createElement("div", null, _react["default"].createElement(_Button["default"], {
|
|
77
|
-
mode: "basic",
|
|
78
|
-
theme: "dark",
|
|
79
|
-
label: "Basic Button",
|
|
80
|
-
onClick: onClick
|
|
81
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
82
|
-
mode: "raised",
|
|
83
|
-
theme: "dark",
|
|
84
|
-
label: "Raised Button",
|
|
85
|
-
onClick: onClick
|
|
86
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
87
|
-
mode: "flat",
|
|
88
|
-
theme: "dark",
|
|
89
|
-
label: "Flat Button",
|
|
90
|
-
onClick: onClick
|
|
91
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
92
|
-
mode: "outlined",
|
|
93
|
-
theme: "dark",
|
|
94
|
-
label: "Outlined Button",
|
|
95
|
-
onClick: onClick
|
|
96
|
-
})), _react["default"].createElement("div", null, _react["default"].createElement(_Button["default"], {
|
|
97
|
-
disabled: true,
|
|
98
|
-
mode: "basic",
|
|
99
|
-
theme: "dark",
|
|
100
|
-
label: "Basic Button",
|
|
101
|
-
onClick: onClick
|
|
102
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
103
|
-
disabled: true,
|
|
104
|
-
mode: "raised",
|
|
105
|
-
theme: "dark",
|
|
106
|
-
label: "Raised Button",
|
|
107
|
-
onClick: onClick
|
|
108
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
109
|
-
disabled: true,
|
|
110
|
-
mode: "flat",
|
|
111
|
-
theme: "dark",
|
|
112
|
-
label: "Flat Button",
|
|
113
|
-
onClick: onClick
|
|
114
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
115
|
-
disabled: true,
|
|
116
|
-
mode: "outlined",
|
|
117
|
-
theme: "dark",
|
|
118
|
-
label: "Outlined Button",
|
|
119
|
-
onClick: onClick
|
|
120
|
-
}))), _react["default"].createElement("h3", null, "With icon"), _react["default"].createElement("div", null, _react["default"].createElement(_Button["default"], {
|
|
121
|
-
mode: "basic",
|
|
122
|
-
theme: "light",
|
|
123
|
-
label: "Basic Button",
|
|
124
|
-
onClick: onClick,
|
|
125
|
-
iconPosition: "after",
|
|
126
|
-
iconSrc: _run_icon_black["default"]
|
|
127
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
128
|
-
mode: "raised",
|
|
129
|
-
theme: "light",
|
|
130
|
-
label: "Raised Button",
|
|
131
|
-
onClick: onClick,
|
|
132
|
-
iconPosition: "after",
|
|
133
|
-
iconSrc: _run_icon_black["default"]
|
|
134
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
135
|
-
mode: "flat",
|
|
136
|
-
theme: "light",
|
|
137
|
-
label: "Flat Button",
|
|
138
|
-
onClick: onClick,
|
|
139
|
-
iconSrc: _run_icon_black["default"]
|
|
140
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
141
|
-
mode: "outlined",
|
|
142
|
-
theme: "light",
|
|
143
|
-
label: "Outlined Button",
|
|
144
|
-
onClick: onClick,
|
|
145
|
-
iconPosition: "after",
|
|
146
|
-
iconSrc: _run_icon_black["default"]
|
|
147
|
-
})), _react["default"].createElement("div", null, _react["default"].createElement(_Button["default"], {
|
|
148
|
-
disabled: true,
|
|
149
|
-
mode: "basic",
|
|
150
|
-
theme: "light",
|
|
151
|
-
label: "Basic Button",
|
|
152
|
-
onClick: onClick,
|
|
153
|
-
iconPosition: "after",
|
|
154
|
-
iconSrc: _run_icon_black["default"]
|
|
155
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
156
|
-
disabled: true,
|
|
157
|
-
mode: "raised",
|
|
158
|
-
theme: "light",
|
|
159
|
-
label: "Raised Button",
|
|
160
|
-
onClick: onClick,
|
|
161
|
-
iconPosition: "after",
|
|
162
|
-
iconSrc: _run_icon_black["default"]
|
|
163
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
164
|
-
disabled: true,
|
|
165
|
-
mode: "flat",
|
|
166
|
-
theme: "light",
|
|
167
|
-
label: "Flat Button",
|
|
168
|
-
onClick: onClick,
|
|
169
|
-
iconPosition: "after",
|
|
170
|
-
iconSrc: _run_icon_black["default"]
|
|
171
|
-
}), _react["default"].createElement(_Button["default"], {
|
|
172
|
-
disabled: true,
|
|
173
|
-
mode: "outlined",
|
|
174
|
-
theme: "light",
|
|
175
|
-
label: "Outlined Button",
|
|
176
|
-
onClick: onClick,
|
|
177
|
-
iconPosition: "after",
|
|
178
|
-
iconSrc: _run_icon_black["default"]
|
|
179
|
-
})));
|
|
180
|
-
}, {
|
|
181
|
-
notes: {
|
|
182
|
-
markdown: _readme["default"]
|
|
183
|
-
}
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
var knobProps = function knobProps() {
|
|
187
|
-
return {
|
|
188
|
-
label: (0, _addonKnobs.text)("label", "Test Button"),
|
|
189
|
-
mode: (0, _addonKnobs.select)("mode", {
|
|
190
|
-
basic: "basic",
|
|
191
|
-
raised: "raised",
|
|
192
|
-
flat: "flat",
|
|
193
|
-
outlined: "outlined"
|
|
194
|
-
}, "basic"),
|
|
195
|
-
theme: (0, _addonKnobs.select)("theme", {
|
|
196
|
-
light: "light",
|
|
197
|
-
dark: "dark"
|
|
198
|
-
}, "light"),
|
|
199
|
-
disabled: (0, _addonKnobs["boolean"])("disabled", false),
|
|
200
|
-
iconPosition: (0, _addonKnobs.select)("icon position", {
|
|
201
|
-
before: "before",
|
|
202
|
-
after: "after"
|
|
203
|
-
}, "before"),
|
|
204
|
-
icon: (0, _addonKnobs["boolean"])("With Icon", true)
|
|
205
|
-
};
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
(0, _react2.storiesOf)("Form Components|Button", module).add("Knobs example", function () {
|
|
209
|
-
var props = knobProps();
|
|
210
|
-
return _react["default"].createElement("div", {
|
|
211
|
-
style: {
|
|
212
|
-
background: props.theme === "dark" && "black" || "transparent"
|
|
213
|
-
}
|
|
214
|
-
}, props.icon && _react["default"].createElement(_Button["default"], (0, _extends2["default"])({}, props, {
|
|
215
|
-
onClick: onClick,
|
|
216
|
-
iconSrc: _run_icon_black["default"]
|
|
217
|
-
})) || _react["default"].createElement(_Button["default"], (0, _extends2["default"])({}, props, {
|
|
218
|
-
onClick: onClick
|
|
219
|
-
})));
|
|
220
|
-
}, {
|
|
221
|
-
notes: {
|
|
222
|
-
markdown: _readme["default"]
|
|
223
|
-
}
|
|
224
|
-
});
|
package/dist/button/readme.md
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
# DXC Button Component
|
|
2
|
-
|
|
3
|
-
## Usage
|
|
4
|
-
|
|
5
|
-
```js
|
|
6
|
-
import { DxcButton } from "@dxc-technology/halstack-react";
|
|
7
|
-
|
|
8
|
-
<DxcButton onClick={handleClick} label="Test Button" />;
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Props
|
|
12
|
-
|
|
13
|
-
<table>
|
|
14
|
-
<tr style="background-color: grey">
|
|
15
|
-
<td>Name</td>
|
|
16
|
-
<td>Default</td>
|
|
17
|
-
<td>Description</td>
|
|
18
|
-
</tr>
|
|
19
|
-
<tr>
|
|
20
|
-
<td>mode: 'basic' | 'outlined' | 'raised' | 'flat'</td>
|
|
21
|
-
<td><code>'basic'</code></td>
|
|
22
|
-
<td>Uses on of the available button modes.</td>
|
|
23
|
-
</tr>
|
|
24
|
-
<tr>
|
|
25
|
-
<td>theme: 'light' |'dark'</td>
|
|
26
|
-
<td><code>'light'</code></td>
|
|
27
|
-
<td>Uses one of the available button modes.</td>
|
|
28
|
-
</tr>
|
|
29
|
-
<tr>
|
|
30
|
-
<td>label: string</td>
|
|
31
|
-
<td><code>'basic'</code></td>
|
|
32
|
-
<td>Text to be placed next to the button.</td>
|
|
33
|
-
</tr>
|
|
34
|
-
<tr>
|
|
35
|
-
<td>iconSrc: string</td>
|
|
36
|
-
<td></td>
|
|
37
|
-
<td>URL of the icon that will be placed next to the button label.</td>
|
|
38
|
-
</tr>
|
|
39
|
-
<tr>
|
|
40
|
-
<td>iconPosition: 'before' | 'after'</td>
|
|
41
|
-
<td><code>'before'</code></td>
|
|
42
|
-
<td>Whether the icon should appear after or before the label.</td>
|
|
43
|
-
</tr>
|
|
44
|
-
<tr>
|
|
45
|
-
<td>disabled: boolean</td>
|
|
46
|
-
<td><code>false</code></td>
|
|
47
|
-
<td>If true, the component will be disabled.</td>
|
|
48
|
-
</tr>
|
|
49
|
-
<tr>
|
|
50
|
-
<td>disableRipple: boolean</td>
|
|
51
|
-
<td><code>false</code></td>
|
|
52
|
-
<td>If true, the ripple effect will be disabled.</td>
|
|
53
|
-
</tr>
|
|
54
|
-
<tr>
|
|
55
|
-
<td>onClick: function</td>
|
|
56
|
-
<td></td>
|
|
57
|
-
<td>This function will be called when the user clicks the button. The event object will be passed as a parameter.</td>
|
|
58
|
-
</tr>
|
|
59
|
-
|
|
60
|
-
</table>
|
|
61
|
-
|
|
62
|
-
## Examples
|
|
63
|
-
|
|
64
|
-
- Basic button - Light theme - Enabled - Icon after label - With ripple
|
|
65
|
-
|
|
66
|
-
```js
|
|
67
|
-
import React from "react";
|
|
68
|
-
|
|
69
|
-
import { DxcButton } from "@dxc-technology/halstack-react";
|
|
70
|
-
|
|
71
|
-
function App() {
|
|
72
|
-
const handleOnClick = event => {
|
|
73
|
-
console.log("Button clicked");
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
return (
|
|
77
|
-
<div>
|
|
78
|
-
<DxcButton
|
|
79
|
-
label="Basic"
|
|
80
|
-
mode="basic"
|
|
81
|
-
disabled={false}
|
|
82
|
-
theme="light"
|
|
83
|
-
disableRipple={false}
|
|
84
|
-
iconPosition="after"
|
|
85
|
-
iconSrc="/images/run_icon.png"
|
|
86
|
-
onClick={handleOnClick}
|
|
87
|
-
/>
|
|
88
|
-
</div>
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export default App;
|
|
93
|
-
```
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
6
|
-
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
|
|
9
|
-
var _react2 = require("@storybook/react");
|
|
10
|
-
|
|
11
|
-
var _addonActions = require("@storybook/addon-actions");
|
|
12
|
-
|
|
13
|
-
var _addonKnobs = require("@storybook/addon-knobs");
|
|
14
|
-
|
|
15
|
-
var _readme = _interopRequireDefault(require("./readme.md"));
|
|
16
|
-
|
|
17
|
-
var _Checkbox = _interopRequireDefault(require("./Checkbox"));
|
|
18
|
-
|
|
19
|
-
var onChange = (0, _addonActions.action)("onChange");
|
|
20
|
-
|
|
21
|
-
onChange.toString = function () {
|
|
22
|
-
return "onChangeHandler";
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
(0, _react2.storiesOf)("Form Components|Checkbox", module).add("Component", function () {
|
|
26
|
-
return _react["default"].createElement("div", null, _react["default"].createElement("h3", null, "Light"), _react["default"].createElement("div", null, _react["default"].createElement(_Checkbox["default"], {
|
|
27
|
-
checked: false,
|
|
28
|
-
theme: "light",
|
|
29
|
-
value: "TestValue",
|
|
30
|
-
label: "Checkbox",
|
|
31
|
-
labelPosition: "after",
|
|
32
|
-
onChange: onChange
|
|
33
|
-
}), _react["default"].createElement(_Checkbox["default"], {
|
|
34
|
-
checked: false,
|
|
35
|
-
theme: "light",
|
|
36
|
-
value: "TestValue",
|
|
37
|
-
label: "Label before",
|
|
38
|
-
labelPosition: "before",
|
|
39
|
-
onChange: onChange
|
|
40
|
-
}), _react["default"].createElement(_Checkbox["default"], {
|
|
41
|
-
checked: false,
|
|
42
|
-
theme: "light",
|
|
43
|
-
value: "TestValue",
|
|
44
|
-
label: "Label after",
|
|
45
|
-
labelPosition: "after",
|
|
46
|
-
onChange: onChange,
|
|
47
|
-
required: true
|
|
48
|
-
}), _react["default"].createElement(_Checkbox["default"], {
|
|
49
|
-
checked: false,
|
|
50
|
-
disabled: true,
|
|
51
|
-
theme: "light",
|
|
52
|
-
value: "TestValue",
|
|
53
|
-
label: "Disabled unchecked",
|
|
54
|
-
labelPosition: "after",
|
|
55
|
-
onChange: onChange
|
|
56
|
-
}), _react["default"].createElement(_Checkbox["default"], {
|
|
57
|
-
checked: true,
|
|
58
|
-
disabled: true,
|
|
59
|
-
theme: "light",
|
|
60
|
-
value: "TestValue",
|
|
61
|
-
label: "Disabled checked",
|
|
62
|
-
labelPosition: "after",
|
|
63
|
-
onChange: onChange
|
|
64
|
-
})), _react["default"].createElement("h3", null, "Dark"), _react["default"].createElement("div", {
|
|
65
|
-
style: {
|
|
66
|
-
background: "black"
|
|
67
|
-
}
|
|
68
|
-
}, _react["default"].createElement("div", null, _react["default"].createElement(_Checkbox["default"], {
|
|
69
|
-
checked: false,
|
|
70
|
-
theme: "dark",
|
|
71
|
-
value: "TestValue",
|
|
72
|
-
label: "Checkbox",
|
|
73
|
-
labelPosition: "after",
|
|
74
|
-
onChange: onChange,
|
|
75
|
-
required: true
|
|
76
|
-
}), _react["default"].createElement(_Checkbox["default"], {
|
|
77
|
-
checked: false,
|
|
78
|
-
theme: "dark",
|
|
79
|
-
value: "TestValue",
|
|
80
|
-
label: "Label before",
|
|
81
|
-
labelPosition: "before",
|
|
82
|
-
onChange: onChange
|
|
83
|
-
}), _react["default"].createElement(_Checkbox["default"], {
|
|
84
|
-
checked: false,
|
|
85
|
-
theme: "dark",
|
|
86
|
-
value: "TestValue",
|
|
87
|
-
label: "Label after",
|
|
88
|
-
labelPosition: "after",
|
|
89
|
-
onChange: onChange
|
|
90
|
-
}), _react["default"].createElement(_Checkbox["default"], {
|
|
91
|
-
checked: false,
|
|
92
|
-
disabled: true,
|
|
93
|
-
theme: "dark",
|
|
94
|
-
value: "TestValue",
|
|
95
|
-
label: "Disabled unchecked",
|
|
96
|
-
labelPosition: "after",
|
|
97
|
-
onChange: onChange
|
|
98
|
-
}), _react["default"].createElement(_Checkbox["default"], {
|
|
99
|
-
checked: true,
|
|
100
|
-
disabled: true,
|
|
101
|
-
theme: "dark",
|
|
102
|
-
value: "TestValue",
|
|
103
|
-
label: "Disabled checked",
|
|
104
|
-
labelPosition: "after",
|
|
105
|
-
onChange: onChange
|
|
106
|
-
}))));
|
|
107
|
-
}, {
|
|
108
|
-
notes: {
|
|
109
|
-
markdown: _readme["default"]
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
var knobProps = function knobProps() {
|
|
114
|
-
return {
|
|
115
|
-
label: (0, _addonKnobs.text)("Label", "Test Checkbox"),
|
|
116
|
-
disabled: (0, _addonKnobs["boolean"])("Disabled", false),
|
|
117
|
-
labelPosition: (0, _addonKnobs.select)("Label position", {
|
|
118
|
-
before: "before",
|
|
119
|
-
after: "after"
|
|
120
|
-
}, "before"),
|
|
121
|
-
theme: (0, _addonKnobs.select)("Theme", {
|
|
122
|
-
light: "light",
|
|
123
|
-
dark: "dark"
|
|
124
|
-
}, "light"),
|
|
125
|
-
disableRipple: (0, _addonKnobs["boolean"])("disableRipple", false),
|
|
126
|
-
required: (0, _addonKnobs["boolean"])("Required", false)
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
(0, _react2.storiesOf)("Form Components|Checkbox", module).add("Knobs example", function () {
|
|
131
|
-
var props = knobProps();
|
|
132
|
-
return _react["default"].createElement("div", {
|
|
133
|
-
style: {
|
|
134
|
-
background: props.theme === "dark" && "black" || "transparent"
|
|
135
|
-
}
|
|
136
|
-
}, _react["default"].createElement(_Checkbox["default"], (0, _extends2["default"])({}, props, {
|
|
137
|
-
value: "TestValue",
|
|
138
|
-
onChange: onChange
|
|
139
|
-
})));
|
|
140
|
-
}, {
|
|
141
|
-
notes: {
|
|
142
|
-
markdown: _readme["default"]
|
|
143
|
-
}
|
|
144
|
-
});
|
package/dist/checkbox/readme.md
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
# DXC Checkbox Component
|
|
2
|
-
|
|
3
|
-
## Usage
|
|
4
|
-
|
|
5
|
-
```js
|
|
6
|
-
import { DxcCheckbox } from "@dxc-technology/halstack-react";
|
|
7
|
-
|
|
8
|
-
<DxcCheckbox onChange={handleNewValue} label="Test Checkbox" checked={checked} />;
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Props
|
|
12
|
-
|
|
13
|
-
<table>
|
|
14
|
-
<tr style="background-color: grey">
|
|
15
|
-
<td>Name</td>
|
|
16
|
-
<td>Default</td>
|
|
17
|
-
<td>Description</td>
|
|
18
|
-
</tr>
|
|
19
|
-
<tr>
|
|
20
|
-
<td>checked: boolean</td>
|
|
21
|
-
<td><code>false</code></td>
|
|
22
|
-
<td>If true, the component is checked.</td>
|
|
23
|
-
</tr>
|
|
24
|
-
<tr>
|
|
25
|
-
<td>value: any</td>
|
|
26
|
-
<td></td>
|
|
27
|
-
<td>Will be passed to the value attribute of the html input element. When inside a form, this value will be only submitted if the checkbox is checked </td>
|
|
28
|
-
</tr>
|
|
29
|
-
<tr>
|
|
30
|
-
<td>label: string</td>
|
|
31
|
-
<td></td>
|
|
32
|
-
<td>Text to be placed next to the checkbox.</td>
|
|
33
|
-
</tr>
|
|
34
|
-
<tr>
|
|
35
|
-
<td>labelPosition: 'before' | 'after'</td>
|
|
36
|
-
<td><code>'before'</code></td>
|
|
37
|
-
<td>Whether the label should appear after or before the checkbox.</td>
|
|
38
|
-
</tr>
|
|
39
|
-
<tr>
|
|
40
|
-
<td>theme: 'light' | 'dark'</td>
|
|
41
|
-
<td><code>'light'</code></td>
|
|
42
|
-
<td>Uses one of the available component themes.</td>
|
|
43
|
-
</tr>
|
|
44
|
-
<tr>
|
|
45
|
-
<td>name: string</td>
|
|
46
|
-
<td></td>
|
|
47
|
-
<td>Name attribute of the input element.</td>
|
|
48
|
-
</tr>
|
|
49
|
-
<tr>
|
|
50
|
-
<td>disabled: boolean</td>
|
|
51
|
-
<td><code>false</code></td>
|
|
52
|
-
<td>If true, the component will be disabled.</td>
|
|
53
|
-
</tr>
|
|
54
|
-
<tr>
|
|
55
|
-
<td>required: boolean</td>
|
|
56
|
-
<td><code>false</code></td>
|
|
57
|
-
<td>If true, a red asterisk will appear before the label to indicate to the user that the field is required.</td>
|
|
58
|
-
</tr>
|
|
59
|
-
<tr>
|
|
60
|
-
<td>disableRipple: boolean</td>
|
|
61
|
-
<td><code>false</code></td>
|
|
62
|
-
<td>If true, the ripple effect will be disabled.</td>
|
|
63
|
-
</tr>
|
|
64
|
-
<tr>
|
|
65
|
-
<td>onChange: function</td>
|
|
66
|
-
<td></td>
|
|
67
|
-
<td>This function will be called when the user clicks the checkbox. The new value will be passed as a parameter.<br>
|
|
68
|
-
</td>
|
|
69
|
-
</tr>
|
|
70
|
-
</table>
|
|
71
|
-
|
|
72
|
-
## Examples
|
|
73
|
-
|
|
74
|
-
- Basic checkbox - Light theme - Enabled - Label after checkbox - With ripple
|
|
75
|
-
|
|
76
|
-
```js
|
|
77
|
-
import React from "react";
|
|
78
|
-
import { DxcCheckbox } from "@dxc-technology/halstack-react";
|
|
79
|
-
|
|
80
|
-
class App extends React.Component {
|
|
81
|
-
state = {
|
|
82
|
-
isChecked: true
|
|
83
|
-
};
|
|
84
|
-
constructor() {
|
|
85
|
-
super();
|
|
86
|
-
this.handleChange = this.handleChange.bind(this);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
handleChange(checked) {
|
|
90
|
-
this.setState({
|
|
91
|
-
isChecked: checked
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
render() {
|
|
96
|
-
return (
|
|
97
|
-
<div>
|
|
98
|
-
<DxcCheckbox
|
|
99
|
-
checked={this.state.isChecked}
|
|
100
|
-
value="Checkbox1"
|
|
101
|
-
label="Checkbox 1"
|
|
102
|
-
labelPosition="after"
|
|
103
|
-
theme="light"
|
|
104
|
-
name="Checkbox"
|
|
105
|
-
disabled={false}
|
|
106
|
-
disableRipple={false}
|
|
107
|
-
onChange={event => this.handleChange(event)}
|
|
108
|
-
/>
|
|
109
|
-
</div>
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
export default App;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
```
|