@dxc-technology/halstack-react 0.0.0-8d633bd → 0.0.0-8db6a95
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/README.md +27 -47
- package/dist/index.d.mts +6669 -0
- package/dist/index.d.ts +6669 -0
- package/dist/index.js +14523 -0
- package/dist/index.mjs +14465 -0
- package/package.json +76 -68
- package/babel.config.js +0 -8
- package/dist/BackgroundColorContext.js +0 -46
- package/dist/ThemeContext.js +0 -240
- package/dist/accordion/Accordion.js +0 -353
- package/dist/accordion-group/AccordionGroup.js +0 -186
- package/dist/alert/Alert.js +0 -403
- package/dist/alert/index.d.ts +0 -26
- package/dist/badge/Badge.js +0 -63
- package/dist/box/Box.js +0 -156
- package/dist/button/Button.js +0 -238
- package/dist/card/Card.js +0 -254
- package/dist/checkbox/Checkbox.js +0 -300
- package/dist/checkbox/Checkbox.stories.js +0 -144
- package/dist/checkbox/readme.md +0 -116
- package/dist/chip/Chip.js +0 -265
- package/dist/common/OpenSans.css +0 -81
- package/dist/common/RequiredComponent.js +0 -40
- package/dist/common/fonts/OpenSans-Bold.ttf +0 -0
- package/dist/common/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/dist/common/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/dist/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/dist/common/fonts/OpenSans-Italic.ttf +0 -0
- package/dist/common/fonts/OpenSans-Light.ttf +0 -0
- package/dist/common/fonts/OpenSans-LightItalic.ttf +0 -0
- package/dist/common/fonts/OpenSans-Regular.ttf +0 -0
- package/dist/common/fonts/OpenSans-SemiBold.ttf +0 -0
- package/dist/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- package/dist/common/utils.js +0 -22
- package/dist/common/variables.js +0 -1417
- package/dist/date/Date.js +0 -381
- package/dist/date/Date.stories.js +0 -205
- package/dist/date/readme.md +0 -73
- package/dist/dialog/Dialog.js +0 -218
- package/dist/dropdown/Dropdown.js +0 -544
- package/dist/file-input/FileInput.js +0 -641
- package/dist/file-input/FileItem.js +0 -263
- package/dist/footer/Footer.js +0 -395
- package/dist/footer/Footer.stories.js +0 -94
- package/dist/footer/dxc_logo.svg +0 -15
- package/dist/footer/readme.md +0 -41
- package/dist/header/Header.js +0 -403
- package/dist/header/Header.stories.js +0 -176
- package/dist/header/close_icon.svg +0 -1
- package/dist/header/dxc_logo_black.svg +0 -8
- 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/heading/Heading.js +0 -218
- package/dist/input-text/InputText.js +0 -707
- 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/ApplicationLayout.js +0 -331
- 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 -237
- package/dist/link/readme.md +0 -51
- package/dist/main.d.ts +0 -2
- package/dist/main.js +0 -359
- package/dist/new-date/NewDate.js +0 -403
- package/dist/new-input-text/NewInputText.js +0 -977
- package/dist/new-textarea/NewTextarea.js +0 -365
- package/dist/number/Number.js +0 -138
- package/dist/number/NumberContext.js +0 -16
- package/dist/paginator/Paginator.js +0 -289
- 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/password/Password.js +0 -200
- package/dist/password/styles.css +0 -3
- package/dist/progress-bar/ProgressBar.js +0 -242
- package/dist/progress-bar/ProgressBar.stories.js +0 -280
- package/dist/progress-bar/readme.md +0 -63
- package/dist/radio/Radio.js +0 -209
- package/dist/radio/Radio.stories.js +0 -166
- package/dist/radio/readme.md +0 -70
- package/dist/resultsetTable/ResultsetTable.js +0 -358
- 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 -549
- package/dist/sidenav/Sidenav.js +0 -179
- package/dist/slider/Slider.js +0 -319
- package/dist/slider/Slider.stories.js +0 -241
- package/dist/slider/readme.md +0 -64
- package/dist/spinner/Spinner.js +0 -381
- package/dist/spinner/Spinner.stories.js +0 -183
- package/dist/spinner/readme.md +0 -65
- package/dist/switch/Switch.js +0 -222
- package/dist/switch/Switch.stories.js +0 -134
- package/dist/switch/readme.md +0 -133
- package/dist/table/Table.js +0 -132
- package/dist/tabs/Tabs.js +0 -343
- 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/tag/Tag.js +0 -282
- package/dist/textarea/Textarea.js +0 -264
- package/dist/toggle/Toggle.js +0 -220
- package/dist/toggle/Toggle.stories.js +0 -297
- package/dist/toggle/readme.md +0 -80
- package/dist/toggle-group/ToggleGroup.js +0 -223
- package/dist/upload/Upload.js +0 -205
- package/dist/upload/Upload.stories.js +0 -72
- package/dist/upload/buttons-upload/ButtonsUpload.js +0 -139
- 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 -329
- 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/files-upload/FilesToUpload.js +0 -123
- package/dist/upload/readme.md +0 -37
- package/dist/upload/transaction/Transaction.js +0 -175
- 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/useTheme.js +0 -22
- package/dist/wizard/Wizard.js +0 -411
- package/dist/wizard/invalid_icon.svg +0 -5
- package/dist/wizard/valid_icon.svg +0 -5
- 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 -145
- package/test/FileInput.test.js +0 -39
- 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 -43
- package/test/NewDate.test.js +0 -203
- package/test/NewInputText.test.js +0 -866
- package/test/NewTextarea.test.js +0 -252
- package/test/Number.test.js +0 -241
- package/test/Paginator.test.js +0 -177
- package/test/Password.test.js +0 -76
- package/test/ProgressBar.test.js +0 -35
- package/test/Radio.test.js +0 -37
- package/test/ResultsetTable.test.js +0 -329
- package/test/Select.test.js +0 -212
- package/test/Sidenav.test.js +0 -45
- package/test/Slider.test.js +0 -82
- package/test/Spinner.test.js +0 -32
- 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,176 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _react = _interopRequireDefault(require("react"));
|
|
6
|
-
|
|
7
|
-
var _react2 = require("@storybook/react");
|
|
8
|
-
|
|
9
|
-
var _addonActions = require("@storybook/addon-actions");
|
|
10
|
-
|
|
11
|
-
require("../common/OpenSans.css");
|
|
12
|
-
|
|
13
|
-
var _addonKnobs = require("@storybook/addon-knobs");
|
|
14
|
-
|
|
15
|
-
var _readme = _interopRequireDefault(require("./readme.md"));
|
|
16
|
-
|
|
17
|
-
var _Header = _interopRequireDefault(require("./Header"));
|
|
18
|
-
|
|
19
|
-
var _Dropdown = _interopRequireDefault(require("../dropdown/Dropdown"));
|
|
20
|
-
|
|
21
|
-
var _Switch = _interopRequireDefault(require("../switch/Switch"));
|
|
22
|
-
|
|
23
|
-
var selectOption = function selectOption(option) {
|
|
24
|
-
console.log(option);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
var onChange = (0, _addonActions.action)("onChange");
|
|
28
|
-
var onClick = (0, _addonActions.action)("headerLogo Clicked");
|
|
29
|
-
var optionsWithoutIcon = [{
|
|
30
|
-
value: 1,
|
|
31
|
-
label: "Amazon"
|
|
32
|
-
}, {
|
|
33
|
-
value: 2,
|
|
34
|
-
label: "Ebay"
|
|
35
|
-
}, {
|
|
36
|
-
value: 3,
|
|
37
|
-
label: "Apple"
|
|
38
|
-
}];
|
|
39
|
-
(0, _react2.storiesOf)("Form Components|Header", module).add("Component", function () {
|
|
40
|
-
return _react["default"].createElement("div", {
|
|
41
|
-
style: {
|
|
42
|
-
background: "lightgrey"
|
|
43
|
-
}
|
|
44
|
-
}, _react["default"].createElement("div", null, _react["default"].createElement("div", {
|
|
45
|
-
style: {
|
|
46
|
-
marginBottom: "20px"
|
|
47
|
-
}
|
|
48
|
-
}, _react["default"].createElement(_Header["default"], {
|
|
49
|
-
theme: "light",
|
|
50
|
-
underlined: false,
|
|
51
|
-
onClick: onClick
|
|
52
|
-
}, _react["default"].createElement(_Dropdown["default"], {
|
|
53
|
-
theme: "light",
|
|
54
|
-
onSelectOption: selectOption,
|
|
55
|
-
options: optionsWithoutIcon
|
|
56
|
-
}), _react["default"].createElement(_Dropdown["default"], {
|
|
57
|
-
theme: "light",
|
|
58
|
-
onSelectOption: selectOption,
|
|
59
|
-
label: "Dropdown",
|
|
60
|
-
options: optionsWithoutIcon
|
|
61
|
-
}), _react["default"].createElement(_Switch["default"], {
|
|
62
|
-
checked: false,
|
|
63
|
-
label: "Switch component",
|
|
64
|
-
labelPosition: "after",
|
|
65
|
-
theme: "dark",
|
|
66
|
-
onChange: onChange
|
|
67
|
-
}))), _react["default"].createElement("div", null, _react["default"].createElement(_Header["default"], {
|
|
68
|
-
theme: "light",
|
|
69
|
-
underlined: true,
|
|
70
|
-
onClick: onClick
|
|
71
|
-
}, _react["default"].createElement(_Dropdown["default"], {
|
|
72
|
-
theme: "light",
|
|
73
|
-
onSelectOption: selectOption,
|
|
74
|
-
options: optionsWithoutIcon,
|
|
75
|
-
mode: "outlined"
|
|
76
|
-
}), _react["default"].createElement(_Dropdown["default"], {
|
|
77
|
-
theme: "light",
|
|
78
|
-
onSelectOption: selectOption,
|
|
79
|
-
label: "Dropdown",
|
|
80
|
-
options: optionsWithoutIcon,
|
|
81
|
-
mode: "outlined"
|
|
82
|
-
}), _react["default"].createElement(_Switch["default"], {
|
|
83
|
-
checked: false,
|
|
84
|
-
label: "Switch component",
|
|
85
|
-
labelPosition: "after",
|
|
86
|
-
theme: "light",
|
|
87
|
-
onChange: onChange
|
|
88
|
-
})))), _react["default"].createElement("div", {
|
|
89
|
-
style: {
|
|
90
|
-
paddingTop: "20px",
|
|
91
|
-
height: "200px"
|
|
92
|
-
}
|
|
93
|
-
}, _react["default"].createElement("div", null, _react["default"].createElement(_Header["default"], {
|
|
94
|
-
theme: "dark",
|
|
95
|
-
underlined: false
|
|
96
|
-
}, _react["default"].createElement(_Dropdown["default"], {
|
|
97
|
-
theme: "dark",
|
|
98
|
-
onSelectOption: selectOption,
|
|
99
|
-
options: optionsWithoutIcon,
|
|
100
|
-
mode: "basic"
|
|
101
|
-
}), _react["default"].createElement(_Dropdown["default"], {
|
|
102
|
-
theme: "dark",
|
|
103
|
-
onSelectOption: selectOption,
|
|
104
|
-
label: "Dropdown",
|
|
105
|
-
options: optionsWithoutIcon,
|
|
106
|
-
mode: "basic"
|
|
107
|
-
}), _react["default"].createElement(_Switch["default"], {
|
|
108
|
-
checked: false,
|
|
109
|
-
label: "Switch component",
|
|
110
|
-
labelPosition: "after",
|
|
111
|
-
theme: "light",
|
|
112
|
-
onChange: onChange
|
|
113
|
-
}))), _react["default"].createElement("div", {
|
|
114
|
-
style: {
|
|
115
|
-
marginTop: "20px"
|
|
116
|
-
}
|
|
117
|
-
}, _react["default"].createElement(_Header["default"], {
|
|
118
|
-
theme: "dark",
|
|
119
|
-
underlined: true
|
|
120
|
-
}, _react["default"].createElement(_Dropdown["default"], {
|
|
121
|
-
theme: "dark",
|
|
122
|
-
onSelectOption: selectOption,
|
|
123
|
-
options: optionsWithoutIcon,
|
|
124
|
-
mode: "outlined"
|
|
125
|
-
}), _react["default"].createElement(_Dropdown["default"], {
|
|
126
|
-
theme: "dark",
|
|
127
|
-
onSelectOption: selectOption,
|
|
128
|
-
label: "Dropdown",
|
|
129
|
-
options: optionsWithoutIcon,
|
|
130
|
-
mode: "outlined"
|
|
131
|
-
}), _react["default"].createElement(_Switch["default"], {
|
|
132
|
-
checked: false,
|
|
133
|
-
label: "Switch component",
|
|
134
|
-
labelPosition: "after",
|
|
135
|
-
theme: "dark",
|
|
136
|
-
onChange: onChange
|
|
137
|
-
})))));
|
|
138
|
-
}, {
|
|
139
|
-
notes: {
|
|
140
|
-
markdown: _readme["default"]
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
var knobProps = function knobProps() {
|
|
145
|
-
return {
|
|
146
|
-
theme: (0, _addonKnobs.select)("Theme", {
|
|
147
|
-
light: "light",
|
|
148
|
-
dark: "dark"
|
|
149
|
-
}, "light"),
|
|
150
|
-
underlined: (0, _addonKnobs["boolean"])("Underlined", false)
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
(0, _react2.storiesOf)("Form Components|Header", module).add("Knobs example", function () {
|
|
155
|
-
var props = knobProps();
|
|
156
|
-
return _react["default"].createElement("div", {
|
|
157
|
-
style: {
|
|
158
|
-
height: "250px",
|
|
159
|
-
background: props.theme === "dark" && "black" || "transparent"
|
|
160
|
-
}
|
|
161
|
-
}, _react["default"].createElement(_Header["default"], props, _react["default"].createElement(_Dropdown["default"], {
|
|
162
|
-
theme: props.theme,
|
|
163
|
-
mode: props.underlined ? "outlined" : "basic",
|
|
164
|
-
onSelectOption: selectOption,
|
|
165
|
-
options: optionsWithoutIcon,
|
|
166
|
-
label: "Dropdown"
|
|
167
|
-
})), _react["default"].createElement("div", {
|
|
168
|
-
style: {
|
|
169
|
-
marginTop: "20px"
|
|
170
|
-
}
|
|
171
|
-
}, _react["default"].createElement(_Header["default"], props)));
|
|
172
|
-
}, {
|
|
173
|
-
notes: {
|
|
174
|
-
markdown: _readme["default"]
|
|
175
|
-
}
|
|
176
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/><path d="M0 0h24v24H0z" fill="none"/></svg>
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="73" height="40" viewBox="0 0 73 40">
|
|
2
|
-
<g id="g10" transform="translate(0)">
|
|
3
|
-
<g id="g12">
|
|
4
|
-
<path id="path14" d="M91.613-28.177v2.514H90.231V-28.15l-2.415-3.82h1.616l1.5,2.532,1.526-2.532h1.571ZM83.9-25.555A3.15,3.15,0,0,1,80.6-28.8v-.018a3.231,3.231,0,0,1,3.294-3.262,3.442,3.442,0,0,1,2.469.865l-.87,1.054a2.311,2.311,0,0,0-1.643-.64,1.891,1.891,0,0,0-1.8,1.964v.018a1.886,1.886,0,0,0,1.9,2,2.2,2.2,0,0,0,1.3-.378v-.9H83.858v-1.2h2.729v2.738A4.071,4.071,0,0,1,83.9-25.555Zm-6.416-3.261a1.913,1.913,0,0,0-1.9-1.982A1.883,1.883,0,0,0,73.7-28.835v.018a1.913,1.913,0,0,0,1.9,1.982A1.883,1.883,0,0,0,77.486-28.8Zm-1.9,3.261a3.225,3.225,0,0,1-3.33-3.243v-.018A3.255,3.255,0,0,1,75.6-32.078a3.225,3.225,0,0,1,3.331,3.243v.018A3.255,3.255,0,0,1,75.583-25.555Zm-9.173-.108V-31.97h1.382v5.045h3.133v1.261Zm-3.433-3.153a1.913,1.913,0,0,0-1.9-1.982,1.883,1.883,0,0,0-1.886,1.964v.018a1.913,1.913,0,0,0,1.9,1.982A1.883,1.883,0,0,0,62.978-28.8Zm-1.9,3.261a3.225,3.225,0,0,1-3.33-3.243v-.018a3.255,3.255,0,0,1,3.348-3.262,3.225,3.225,0,0,1,3.331,3.243v.018A3.255,3.255,0,0,1,61.075-25.555Zm-6.508-.108-3.043-4.009v4.009H50.159V-31.97h1.275l2.944,3.883V-31.97h1.364v6.306Zm-8.246,0v-2.531h-2.55v2.531H42.389V-31.97h1.382v2.5h2.55v-2.5H47.7v6.306Zm-8.432.108A3.178,3.178,0,0,1,34.666-28.8v-.018a3.2,3.2,0,0,1,3.276-3.262,3.237,3.237,0,0,1,2.478.973l-.88,1.018a2.315,2.315,0,0,0-1.606-.712,1.866,1.866,0,0,0-1.822,1.964v.018a1.87,1.87,0,0,0,1.822,1.982,2.265,2.265,0,0,0,1.651-.739l.88.891A3.206,3.206,0,0,1,37.889-25.555Zm-9.805-.108V-31.97h4.739v1.235H29.458v1.279h2.962v1.234H29.458V-26.9h3.411v1.234ZM24.322-30.69v5.027H22.939V-30.69H21.028v-1.28h5.206v1.28H24.322" transform="translate(-21.028 65.555)" fill="#100f0d"/>
|
|
5
|
-
<path id="path16" d="M75.836-76.712a8.975,8.975,0,0,1,2.246-3.9,8.393,8.393,0,0,1,6.058-2.457h9.824v-5.67H84.139a14.611,14.611,0,0,0-10.232,4.221,14.509,14.509,0,0,0-3.076,4.536,11.913,11.913,0,0,0-.973,3.271Zm0,4.325a8.978,8.978,0,0,0,2.246,3.9,8.394,8.394,0,0,0,6.058,2.457h9.824v5.67H84.139A14.611,14.611,0,0,1,73.907-64.58a14.506,14.506,0,0,1-3.076-4.536,11.91,11.91,0,0,1-.973-3.271ZM57.522-69.832l-7.5,9.473H42.581L53.818-74.55,42.581-88.739H50.02l7.5,9.472,7.5-9.472h7.439L61.225-74.55l11.237,14.19H65.023Zm-12.336-6.88a11.935,11.935,0,0,0-.973-3.271,14.515,14.515,0,0,0-3.076-4.536A14.612,14.612,0,0,0,30.9-88.739H21.081v5.67H30.9a8.394,8.394,0,0,1,6.058,2.457,8.978,8.978,0,0,1,2.246,3.9Zm0,4.325a11.932,11.932,0,0,1-.973,3.271,14.511,14.511,0,0,1-3.076,4.536A14.611,14.611,0,0,1,30.9-60.359H21.081v-5.67H30.9a8.4,8.4,0,0,0,6.058-2.457,8.981,8.981,0,0,0,2.246-3.9h5.978" transform="translate(-21.049 88.739)" fill="#100f0d"/>
|
|
6
|
-
</g>
|
|
7
|
-
</g>
|
|
8
|
-
</svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3,8H21a1,1,0,0,0,0-2H3A1,1,0,0,0,3,8Zm18,8H3a1,1,0,0,0,0,2H21a1,1,0,0,0,0-2Zm0-5H3a1,1,0,0,0,0,2H21a1,1,0,0,0,0-2Z" fill="black"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3,8H21a1,1,0,0,0,0-2H3A1,1,0,0,0,3,8Zm18,8H3a1,1,0,0,0,0,2H21a1,1,0,0,0,0-2Zm0-5H3a1,1,0,0,0,0,2H21a1,1,0,0,0,0-2Z" fill="white"/></svg>
|
package/dist/header/readme.md
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# DXC Header Component
|
|
2
|
-
|
|
3
|
-
## Props
|
|
4
|
-
|
|
5
|
-
<table>
|
|
6
|
-
<tr style="background-color: grey">
|
|
7
|
-
<td>Name</td>
|
|
8
|
-
<td>Default</td>
|
|
9
|
-
<td>Description</td>
|
|
10
|
-
</tr>
|
|
11
|
-
<tr>
|
|
12
|
-
<td>theme: 'light' | 'dark'</td>
|
|
13
|
-
<td><code>'light'</code></td>
|
|
14
|
-
<td>Uses one of the available component themes.</td>
|
|
15
|
-
</tr>
|
|
16
|
-
<tr>
|
|
17
|
-
<td>underline: boolean</td>
|
|
18
|
-
<td><code>false</code></td>
|
|
19
|
-
<td>Wether a contrast line should appear at the bottom of the header.</td>
|
|
20
|
-
</tr>
|
|
21
|
-
<tr>
|
|
22
|
-
<td>logoSrc: string</td>
|
|
23
|
-
<td><code>'default'</code></td>
|
|
24
|
-
<td>The path of an icon to replace the theme logo.</td>
|
|
25
|
-
</tr>
|
|
26
|
-
<tr>
|
|
27
|
-
<td>onClick: function</td>
|
|
28
|
-
<td></td>
|
|
29
|
-
<td>This function will be called when the user clicks the header logo.<br>
|
|
30
|
-
</td>
|
|
31
|
-
</tr>
|
|
32
|
-
</table>
|
|
33
|
-
|
package/dist/heading/Heading.js
DELETED
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports["default"] = void 0;
|
|
11
|
-
|
|
12
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
|
-
|
|
14
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
15
|
-
|
|
16
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
17
|
-
|
|
18
|
-
var _react = _interopRequireDefault(require("react"));
|
|
19
|
-
|
|
20
|
-
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
21
|
-
|
|
22
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
|
-
|
|
24
|
-
var _variables = require("../common/variables.js");
|
|
25
|
-
|
|
26
|
-
var _useTheme = _interopRequireDefault(require("../useTheme.js"));
|
|
27
|
-
|
|
28
|
-
function _templateObject6() {
|
|
29
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n margin: 0;\n"]);
|
|
30
|
-
|
|
31
|
-
_templateObject6 = function _templateObject6() {
|
|
32
|
-
return data;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
return data;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function _templateObject5() {
|
|
39
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n margin: 0;\n"]);
|
|
40
|
-
|
|
41
|
-
_templateObject5 = function _templateObject5() {
|
|
42
|
-
return data;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
return data;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function _templateObject4() {
|
|
49
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n margin: 0;\n"]);
|
|
50
|
-
|
|
51
|
-
_templateObject4 = function _templateObject4() {
|
|
52
|
-
return data;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
return data;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function _templateObject3() {
|
|
59
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n margin: 0;\n"]);
|
|
60
|
-
|
|
61
|
-
_templateObject3 = function _templateObject3() {
|
|
62
|
-
return data;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
return data;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function _templateObject2() {
|
|
69
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-family: ", ";\n font-style: ", ";\n font-size: ", ";\n line-height: ", ";\n font-weight: ", ";\n letter-spacing: ", ";\n color: ", ";\n margin: 0;\n"]);
|
|
70
|
-
|
|
71
|
-
_templateObject2 = function _templateObject2() {
|
|
72
|
-
return data;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
return data;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function _templateObject() {
|
|
79
|
-
var data = (0, _taggedTemplateLiteral2["default"])(["\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"]);
|
|
80
|
-
|
|
81
|
-
_templateObject = function _templateObject() {
|
|
82
|
-
return data;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
return data;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
var DxcHeading = function DxcHeading(_ref) {
|
|
89
|
-
var _ref$level = _ref.level,
|
|
90
|
-
level = _ref$level === void 0 ? 1 : _ref$level,
|
|
91
|
-
_ref$text = _ref.text,
|
|
92
|
-
text = _ref$text === void 0 ? "" : _ref$text,
|
|
93
|
-
_ref$weight = _ref.weight,
|
|
94
|
-
weight = _ref$weight === void 0 ? "" : _ref$weight,
|
|
95
|
-
margin = _ref.margin;
|
|
96
|
-
var colorsTheme = (0, _useTheme["default"])();
|
|
97
|
-
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
98
|
-
theme: colorsTheme.heading
|
|
99
|
-
}, _react["default"].createElement(HeadingContainer, {
|
|
100
|
-
margin: margin
|
|
101
|
-
}, level === 1 ? _react["default"].createElement(HeadingLevel1, {
|
|
102
|
-
weight: weight
|
|
103
|
-
}, text) : level === 2 ? _react["default"].createElement(HeadingLevel2, {
|
|
104
|
-
weight: weight
|
|
105
|
-
}, text) : level === 3 ? _react["default"].createElement(HeadingLevel3, {
|
|
106
|
-
weight: weight
|
|
107
|
-
}, text) : level === 4 ? _react["default"].createElement(HeadingLevel4, {
|
|
108
|
-
weight: weight
|
|
109
|
-
}, text) : _react["default"].createElement(HeadingLevel5, {
|
|
110
|
-
weight: weight
|
|
111
|
-
}, text)));
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
var HeadingContainer = _styledComponents["default"].div(_templateObject(), function (props) {
|
|
115
|
-
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
116
|
-
}, function (props) {
|
|
117
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
|
|
118
|
-
}, function (props) {
|
|
119
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
|
|
120
|
-
}, function (props) {
|
|
121
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
|
|
122
|
-
}, function (props) {
|
|
123
|
-
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
var HeadingLevel1 = _styledComponents["default"].h1(_templateObject2(), function (props) {
|
|
127
|
-
return props.theme.level1FontFamily;
|
|
128
|
-
}, function (props) {
|
|
129
|
-
return props.theme.level1FontStyle;
|
|
130
|
-
}, function (props) {
|
|
131
|
-
return props.theme.level1FontSize;
|
|
132
|
-
}, function (props) {
|
|
133
|
-
return props.theme.level1LineHeight;
|
|
134
|
-
}, function (props) {
|
|
135
|
-
return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level1FontWeight;
|
|
136
|
-
}, function (props) {
|
|
137
|
-
return props.theme.level1LetterSpacing;
|
|
138
|
-
}, function (props) {
|
|
139
|
-
return props.theme.level1FontColor;
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
var HeadingLevel2 = _styledComponents["default"].h2(_templateObject3(), function (props) {
|
|
143
|
-
return props.theme.level2FontFamily;
|
|
144
|
-
}, function (props) {
|
|
145
|
-
return props.theme.level2FontStyle;
|
|
146
|
-
}, function (props) {
|
|
147
|
-
return props.theme.level2FontSize;
|
|
148
|
-
}, function (props) {
|
|
149
|
-
return props.theme.level2LineHeight;
|
|
150
|
-
}, function (props) {
|
|
151
|
-
return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level2FontWeight;
|
|
152
|
-
}, function (props) {
|
|
153
|
-
return props.theme.level2LetterSpacing;
|
|
154
|
-
}, function (props) {
|
|
155
|
-
return props.theme.level2FontColor;
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
var HeadingLevel3 = _styledComponents["default"].h3(_templateObject4(), function (props) {
|
|
159
|
-
return props.theme.level3FontFamily;
|
|
160
|
-
}, function (props) {
|
|
161
|
-
return props.theme.level3FontStyle;
|
|
162
|
-
}, function (props) {
|
|
163
|
-
return props.theme.level3FontSize;
|
|
164
|
-
}, function (props) {
|
|
165
|
-
return props.theme.level3LineHeight;
|
|
166
|
-
}, function (props) {
|
|
167
|
-
return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level3FontWeight;
|
|
168
|
-
}, function (props) {
|
|
169
|
-
return props.theme.level3LetterSpacing;
|
|
170
|
-
}, function (props) {
|
|
171
|
-
return props.theme.level3FontColor;
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
var HeadingLevel4 = _styledComponents["default"].h4(_templateObject5(), function (props) {
|
|
175
|
-
return props.theme.level4FontFamily;
|
|
176
|
-
}, function (props) {
|
|
177
|
-
return props.theme.level4FontStyle;
|
|
178
|
-
}, function (props) {
|
|
179
|
-
return props.theme.level4FontSize;
|
|
180
|
-
}, function (props) {
|
|
181
|
-
return props.theme.level4LineHeight;
|
|
182
|
-
}, function (props) {
|
|
183
|
-
return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level4FontWeight;
|
|
184
|
-
}, function (props) {
|
|
185
|
-
return props.theme.level4LetterSpacing;
|
|
186
|
-
}, function (props) {
|
|
187
|
-
return props.theme.level4FontColor;
|
|
188
|
-
});
|
|
189
|
-
|
|
190
|
-
var HeadingLevel5 = _styledComponents["default"].h5(_templateObject6(), function (props) {
|
|
191
|
-
return props.theme.level5FontFamily;
|
|
192
|
-
}, function (props) {
|
|
193
|
-
return props.theme.level5FontStyle;
|
|
194
|
-
}, function (props) {
|
|
195
|
-
return props.theme.level5FontSize;
|
|
196
|
-
}, function (props) {
|
|
197
|
-
return props.theme.level5LineHeight;
|
|
198
|
-
}, function (props) {
|
|
199
|
-
return props.weight === "normal" ? "400" : props.weight === "light" ? "300" : props.weight === "bold" ? "600" : props.theme.level5FontWeight;
|
|
200
|
-
}, function (props) {
|
|
201
|
-
return props.theme.level5LetterSpacing;
|
|
202
|
-
}, function (props) {
|
|
203
|
-
return props.theme.level5FontColor;
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
DxcHeading.propTypes = {
|
|
207
|
-
level: _propTypes["default"].number,
|
|
208
|
-
text: _propTypes["default"].string,
|
|
209
|
-
weight: _propTypes["default"].oneOf(["light", "normal", "bold", ""]),
|
|
210
|
-
margin: _propTypes["default"].oneOfType([_propTypes["default"].shape({
|
|
211
|
-
top: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
212
|
-
bottom: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
213
|
-
left: _propTypes["default"].oneOf(Object.keys(_variables.spaces)),
|
|
214
|
-
right: _propTypes["default"].oneOf(Object.keys(_variables.spaces))
|
|
215
|
-
}), _propTypes["default"].oneOf((0, _toConsumableArray2["default"])(Object.keys(_variables.spaces)))])
|
|
216
|
-
};
|
|
217
|
-
var _default = DxcHeading;
|
|
218
|
-
exports["default"] = _default;
|