@dxc-technology/halstack-react 0.0.0-bd47c58 → 0.0.0-bdaadec
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.d.ts +1 -10
- package/BackgroundColorContext.js +4 -21
- package/HalstackContext.d.ts +43 -138
- package/HalstackContext.js +10 -35
- package/accordion/Accordion.accessibility.test.js +71 -0
- package/accordion/Accordion.js +31 -84
- package/accordion/Accordion.stories.tsx +5 -51
- package/accordion/Accordion.test.js +18 -33
- package/accordion/types.d.ts +6 -6
- package/accordion-group/AccordionGroup.accessibility.test.js +88 -0
- package/accordion-group/AccordionGroup.d.ts +2 -3
- package/accordion-group/AccordionGroup.js +17 -44
- package/accordion-group/AccordionGroup.stories.tsx +1 -1
- package/accordion-group/AccordionGroup.test.js +42 -60
- package/accordion-group/AccordionGroupAccordion.js +11 -23
- package/accordion-group/AccordionGroupContext.d.ts +3 -0
- package/accordion-group/AccordionGroupContext.js +8 -0
- package/accordion-group/types.d.ts +7 -7
- package/action-icon/ActionIcon.accessibility.test.js +63 -0
- package/action-icon/ActionIcon.d.ts +4 -0
- package/action-icon/ActionIcon.js +48 -0
- package/action-icon/ActionIcon.stories.tsx +41 -0
- package/action-icon/ActionIcon.test.js +64 -0
- package/action-icon/types.d.ts +26 -0
- package/alert/Alert.accessibility.test.js +95 -0
- package/alert/Alert.js +29 -118
- package/alert/Alert.test.js +28 -45
- package/alert/types.d.ts +5 -5
- package/badge/Badge.accessibility.test.js +129 -0
- package/badge/Badge.d.ts +1 -1
- package/badge/Badge.js +141 -43
- package/badge/Badge.stories.tsx +210 -0
- package/badge/Badge.test.js +30 -0
- package/badge/types.d.ts +52 -3
- package/bleed/Bleed.js +13 -21
- package/bleed/types.d.ts +2 -2
- package/box/Box.accessibility.test.js +33 -0
- package/box/Box.js +11 -33
- package/box/Box.test.js +1 -6
- package/box/types.d.ts +3 -3
- package/bulleted-list/BulletedList.accessibility.test.js +107 -0
- package/bulleted-list/BulletedList.js +22 -55
- package/bulleted-list/BulletedList.stories.tsx +2 -93
- package/bulleted-list/types.d.ts +5 -5
- package/button/Button.accessibility.test.js +127 -0
- package/button/Button.js +36 -59
- package/button/Button.stories.tsx +33 -133
- package/button/Button.test.js +13 -21
- package/button/types.d.ts +5 -5
- package/card/Card.accessibility.test.js +36 -0
- package/card/Card.js +21 -44
- package/card/Card.test.js +10 -21
- package/card/types.d.ts +5 -5
- package/checkbox/Checkbox.accessibility.test.js +87 -0
- package/checkbox/Checkbox.js +85 -120
- package/checkbox/Checkbox.stories.tsx +16 -54
- package/checkbox/Checkbox.test.js +107 -63
- package/checkbox/types.d.ts +8 -4
- package/chip/Chip.accessibility.test.js +67 -0
- package/chip/Chip.js +20 -36
- package/chip/Chip.stories.tsx +5 -24
- package/chip/Chip.test.js +17 -30
- package/chip/types.d.ts +4 -4
- package/common/coreTokens.d.ts +105 -14
- package/common/coreTokens.js +40 -23
- package/common/utils.js +2 -8
- package/common/variables.d.ts +44 -139
- package/common/variables.js +55 -157
- package/container/Container.d.ts +4 -0
- package/container/Container.js +194 -0
- package/container/Container.stories.tsx +214 -0
- package/container/types.d.ts +74 -0
- package/container/types.js +5 -0
- package/contextual-menu/ContextualMenu.accessibility.test.js +86 -0
- package/contextual-menu/ContextualMenu.d.ts +7 -0
- package/contextual-menu/ContextualMenu.js +71 -0
- package/contextual-menu/ContextualMenu.stories.tsx +182 -0
- package/contextual-menu/ContextualMenu.test.js +71 -0
- package/contextual-menu/MenuItemAction.d.ts +4 -0
- package/contextual-menu/MenuItemAction.js +46 -0
- package/contextual-menu/types.d.ts +22 -0
- package/contextual-menu/types.js +5 -0
- package/date-input/Calendar.js +13 -57
- package/date-input/DateInput.accessibility.test.js +216 -0
- package/date-input/DateInput.js +50 -96
- package/date-input/DateInput.stories.tsx +11 -30
- package/date-input/DateInput.test.js +674 -701
- package/date-input/DatePicker.js +11 -42
- package/date-input/Icons.d.ts +6 -6
- package/date-input/Icons.js +6 -23
- package/date-input/YearPicker.js +8 -34
- package/date-input/types.d.ts +28 -22
- package/dialog/Dialog.accessibility.test.js +69 -0
- package/dialog/Dialog.js +13 -40
- package/dialog/Dialog.stories.tsx +170 -0
- package/dialog/Dialog.test.js +126 -188
- package/dialog/types.d.ts +18 -13
- package/divider/Divider.accessibility.test.js +33 -0
- package/divider/Divider.d.ts +4 -0
- package/divider/Divider.js +36 -0
- package/divider/Divider.stories.tsx +223 -0
- package/divider/Divider.test.js +38 -0
- package/divider/types.d.ts +21 -0
- package/divider/types.js +5 -0
- package/dropdown/Dropdown.accessibility.test.js +180 -0
- package/dropdown/Dropdown.js +59 -128
- package/dropdown/Dropdown.stories.tsx +5 -16
- package/dropdown/Dropdown.test.js +391 -378
- package/dropdown/DropdownMenu.js +8 -19
- package/dropdown/DropdownMenuItem.js +11 -20
- package/dropdown/types.d.ts +20 -24
- package/file-input/FileInput.accessibility.test.js +160 -0
- package/file-input/FileInput.js +180 -284
- package/file-input/FileInput.stories.tsx +1 -1
- package/file-input/FileInput.test.js +279 -354
- package/file-input/FileItem.js +25 -66
- package/file-input/types.d.ts +9 -9
- package/flex/Flex.js +25 -39
- package/flex/types.d.ts +6 -6
- package/footer/Footer.accessibility.test.js +117 -0
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +43 -68
- package/footer/Footer.stories.tsx +54 -9
- package/footer/Footer.test.js +18 -32
- package/footer/Icons.d.ts +3 -2
- package/footer/Icons.js +66 -7
- package/footer/types.d.ts +17 -17
- package/grid/Grid.js +1 -16
- package/grid/types.d.ts +10 -10
- package/header/Header.accessibility.test.js +84 -0
- package/header/Header.d.ts +1 -1
- package/header/Header.js +28 -84
- package/header/Header.test.js +12 -25
- package/header/Icons.d.ts +2 -2
- package/header/Icons.js +2 -7
- package/header/types.d.ts +7 -8
- package/heading/Heading.accessibility.test.js +33 -0
- package/heading/Heading.js +9 -31
- package/heading/Heading.test.js +70 -87
- package/heading/types.d.ts +7 -7
- package/icon/Icon.accessibility.test.js +30 -0
- package/icon/Icon.d.ts +4 -0
- package/icon/Icon.js +33 -0
- package/icon/Icon.stories.tsx +28 -0
- package/icon/types.d.ts +4 -0
- package/icon/types.js +5 -0
- package/image/Image.accessibility.test.js +56 -0
- package/image/Image.d.ts +2 -2
- package/image/Image.js +17 -32
- package/image/Image.stories.tsx +3 -1
- package/image/types.d.ts +2 -2
- package/inset/Inset.js +13 -21
- package/inset/types.d.ts +2 -2
- package/layout/ApplicationLayout.d.ts +2 -2
- package/layout/ApplicationLayout.js +26 -66
- package/layout/ApplicationLayout.stories.tsx +1 -1
- package/layout/Icons.d.ts +8 -5
- package/layout/Icons.js +49 -59
- package/layout/types.d.ts +3 -3
- package/link/Link.accessibility.test.js +112 -0
- package/link/Link.js +28 -47
- package/link/Link.stories.tsx +2 -2
- package/link/Link.test.js +23 -41
- package/link/types.d.ts +14 -14
- package/main.d.ts +7 -4
- package/main.js +32 -60
- package/nav-tabs/NavTabs.accessibility.test.js +52 -0
- package/nav-tabs/NavTabs.d.ts +1 -2
- package/nav-tabs/NavTabs.js +19 -48
- package/nav-tabs/NavTabs.stories.tsx +7 -5
- package/nav-tabs/NavTabs.test.js +38 -44
- package/nav-tabs/NavTabsContext.d.ts +3 -0
- package/nav-tabs/NavTabsContext.js +8 -0
- package/nav-tabs/Tab.js +24 -52
- package/nav-tabs/types.d.ts +9 -9
- package/number-input/NumberInput.accessibility.test.js +228 -0
- package/number-input/NumberInput.d.ts +0 -7
- package/number-input/NumberInput.js +47 -39
- package/number-input/NumberInput.stories.tsx +42 -26
- package/number-input/NumberInput.test.js +839 -575
- package/number-input/NumberInputContext.d.ts +3 -0
- package/number-input/NumberInputContext.js +8 -0
- package/number-input/types.d.ts +17 -5
- package/package.json +39 -37
- package/paginator/Icons.d.ts +5 -5
- package/paginator/Icons.js +5 -19
- package/paginator/Paginator.accessibility.test.js +79 -0
- package/paginator/Paginator.js +15 -43
- package/paginator/Paginator.test.js +224 -207
- package/paginator/types.d.ts +3 -3
- package/paragraph/Paragraph.accessibility.test.js +28 -0
- package/paragraph/Paragraph.js +3 -19
- package/paragraph/Paragraph.stories.tsx +0 -17
- package/password-input/Icons.d.ts +3 -3
- package/password-input/Icons.js +1 -5
- package/password-input/PasswordInput.accessibility.test.js +153 -0
- package/password-input/PasswordInput.js +26 -48
- package/password-input/PasswordInput.stories.tsx +1 -34
- package/password-input/PasswordInput.test.js +153 -129
- package/password-input/types.d.ts +8 -7
- package/progress-bar/ProgressBar.accessibility.test.js +35 -0
- package/progress-bar/ProgressBar.js +21 -53
- package/progress-bar/{ProgressBar.stories.jsx → ProgressBar.stories.tsx} +1 -1
- package/progress-bar/ProgressBar.test.js +35 -52
- package/progress-bar/types.d.ts +3 -3
- package/quick-nav/QuickNav.accessibility.test.js +57 -0
- package/quick-nav/QuickNav.js +4 -27
- package/quick-nav/QuickNav.stories.tsx +1 -1
- package/quick-nav/types.d.ts +10 -10
- package/radio-group/Radio.d.ts +1 -1
- package/radio-group/Radio.js +22 -54
- package/radio-group/RadioGroup.accessibility.test.js +97 -0
- package/radio-group/RadioGroup.js +37 -83
- package/radio-group/RadioGroup.stories.tsx +10 -10
- package/radio-group/RadioGroup.test.js +504 -470
- package/radio-group/types.d.ts +8 -8
- package/resultset-table/Icons.d.ts +7 -0
- package/{resultsetTable → resultset-table}/Icons.js +1 -5
- package/resultset-table/ResultsetTable.accessibility.test.js +274 -0
- package/resultset-table/ResultsetTable.d.ts +7 -0
- package/{resultsetTable → resultset-table}/ResultsetTable.js +44 -69
- package/{resultsetTable → resultset-table}/ResultsetTable.stories.tsx +106 -5
- package/{resultsetTable → resultset-table}/ResultsetTable.test.js +148 -92
- package/{resultsetTable → resultset-table}/types.d.ts +44 -11
- package/resultset-table/types.js +5 -0
- package/select/Icons.d.ts +7 -7
- package/select/Icons.js +1 -5
- package/select/Listbox.js +13 -39
- package/select/Option.js +17 -27
- package/select/Select.accessibility.test.js +217 -0
- package/select/Select.js +87 -163
- package/select/Select.stories.tsx +3 -4
- package/select/Select.test.js +1946 -1804
- package/select/types.d.ts +14 -15
- package/sidenav/Icons.d.ts +4 -4
- package/sidenav/Icons.js +1 -5
- package/sidenav/Sidenav.accessibility.test.js +59 -0
- package/sidenav/Sidenav.js +29 -70
- package/sidenav/Sidenav.stories.tsx +0 -1
- package/sidenav/Sidenav.test.js +3 -10
- package/{layout → sidenav}/SidenavContext.d.ts +1 -1
- package/{layout → sidenav}/SidenavContext.js +3 -9
- package/sidenav/types.d.ts +18 -18
- package/slider/Slider.accessibility.test.js +104 -0
- package/slider/Slider.js +68 -125
- package/slider/Slider.test.js +107 -103
- package/slider/types.d.ts +4 -4
- package/spinner/Spinner.accessibility.test.js +96 -0
- package/spinner/Spinner.js +16 -54
- package/spinner/Spinner.test.js +25 -34
- package/spinner/types.d.ts +3 -3
- package/status-light/StatusLight.accessibility.test.js +157 -0
- package/status-light/StatusLight.d.ts +4 -0
- package/status-light/StatusLight.js +51 -0
- package/status-light/StatusLight.stories.tsx +74 -0
- package/status-light/StatusLight.test.js +25 -0
- package/status-light/types.d.ts +17 -0
- package/status-light/types.js +5 -0
- package/switch/Switch.accessibility.test.js +89 -0
- package/switch/Switch.js +49 -97
- package/switch/Switch.stories.tsx +0 -34
- package/switch/Switch.test.js +51 -96
- package/switch/types.d.ts +4 -4
- package/table/DropdownTheme.js +62 -0
- package/table/Table.accessibility.test.js +82 -0
- package/table/Table.d.ts +6 -2
- package/table/Table.js +76 -33
- package/table/{Table.stories.jsx → Table.stories.tsx} +297 -2
- package/table/Table.test.js +93 -6
- package/table/types.d.ts +34 -6
- package/tabs/Tab.js +17 -33
- package/tabs/Tabs.accessibility.test.js +56 -0
- package/tabs/Tabs.js +52 -129
- package/tabs/Tabs.stories.tsx +1 -1
- package/tabs/Tabs.test.js +62 -118
- package/tabs/types.d.ts +19 -19
- package/tag/Tag.accessibility.test.js +69 -0
- package/tag/Tag.js +21 -51
- package/tag/Tag.test.js +19 -30
- package/tag/types.d.ts +7 -7
- package/text-input/Suggestion.js +9 -26
- package/text-input/Suggestions.d.ts +1 -1
- package/text-input/Suggestions.js +19 -67
- package/text-input/TextInput.accessibility.test.js +321 -0
- package/text-input/TextInput.js +197 -287
- package/text-input/TextInput.stories.tsx +49 -153
- package/text-input/TextInput.test.js +1227 -1194
- package/text-input/types.d.ts +25 -17
- package/textarea/Textarea.accessibility.test.js +155 -0
- package/textarea/Textarea.js +67 -109
- package/textarea/{Textarea.stories.jsx → Textarea.stories.tsx} +58 -100
- package/textarea/Textarea.test.js +150 -179
- package/textarea/types.d.ts +9 -5
- package/toggle-group/ToggleGroup.accessibility.test.js +107 -0
- package/toggle-group/ToggleGroup.js +21 -61
- package/toggle-group/ToggleGroup.stories.tsx +4 -4
- package/toggle-group/ToggleGroup.test.js +48 -81
- package/toggle-group/types.d.ts +10 -10
- package/typography/Typography.accessibility.test.js +339 -0
- package/typography/Typography.js +4 -13
- package/typography/types.d.ts +1 -1
- package/useTheme.d.ts +41 -136
- package/useTheme.js +1 -8
- package/useTranslatedLabels.js +1 -7
- package/utils/BaseTypography.d.ts +2 -2
- package/utils/BaseTypography.js +16 -30
- package/utils/FocusLock.js +25 -39
- package/wizard/Wizard.accessibility.test.js +55 -0
- package/wizard/Wizard.js +14 -49
- package/wizard/Wizard.test.js +53 -80
- package/wizard/types.d.ts +7 -7
- package/common/OpenSans.css +0 -69
- package/common/fonts/OpenSans-Bold.ttf +0 -0
- package/common/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/common/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/common/fonts/OpenSans-Italic.ttf +0 -0
- package/common/fonts/OpenSans-Light.ttf +0 -0
- package/common/fonts/OpenSans-LightItalic.ttf +0 -0
- package/common/fonts/OpenSans-Regular.ttf +0 -0
- package/common/fonts/OpenSans-SemiBold.ttf +0 -0
- package/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- package/resultsetTable/Icons.d.ts +0 -7
- package/resultsetTable/ResultsetTable.d.ts +0 -4
- package/slider/Slider.stories.tsx +0 -240
- package/text-input/Icons.d.ts +0 -8
- package/text-input/Icons.js +0 -60
- /package/{resultsetTable → action-icon}/types.js +0 -0
- /package/spinner/{Spinner.stories.jsx → Spinner.stories.tsx} +0 -0
package/image/Image.js
CHANGED
|
@@ -1,51 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports["default"] = void 0;
|
|
11
|
-
|
|
12
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
-
|
|
14
10
|
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
|
|
16
11
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
17
|
-
|
|
18
12
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
19
|
-
|
|
20
13
|
var _BaseTypography = _interopRequireDefault(require("../utils/BaseTypography"));
|
|
21
|
-
|
|
22
14
|
var _templateObject;
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
-
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
28
17
|
var CaptionWrapper = function CaptionWrapper(_ref) {
|
|
29
18
|
var condition = _ref.condition,
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
wrapper = _ref.wrapper,
|
|
20
|
+
children = _ref.children;
|
|
32
21
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, condition ? wrapper(children) : children);
|
|
33
22
|
};
|
|
34
|
-
|
|
35
23
|
var DxcImage = function DxcImage(_ref2) {
|
|
36
24
|
var alt = _ref2.alt,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
25
|
+
caption = _ref2.caption,
|
|
26
|
+
_ref2$lazyLoading = _ref2.lazyLoading,
|
|
27
|
+
lazyLoading = _ref2$lazyLoading === void 0 ? false : _ref2$lazyLoading,
|
|
28
|
+
src = _ref2.src,
|
|
29
|
+
srcSet = _ref2.srcSet,
|
|
30
|
+
sizes = _ref2.sizes,
|
|
31
|
+
width = _ref2.width,
|
|
32
|
+
height = _ref2.height,
|
|
33
|
+
objectFit = _ref2.objectFit,
|
|
34
|
+
objectPosition = _ref2.objectPosition,
|
|
35
|
+
onLoad = _ref2.onLoad,
|
|
36
|
+
onError = _ref2.onError;
|
|
49
37
|
var colorsTheme = (0, _useTheme["default"])();
|
|
50
38
|
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
51
39
|
theme: colorsTheme.image
|
|
@@ -78,8 +66,5 @@ var DxcImage = function DxcImage(_ref2) {
|
|
|
78
66
|
}
|
|
79
67
|
})));
|
|
80
68
|
};
|
|
81
|
-
|
|
82
69
|
var Figure = _styledComponents["default"].figure(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n gap: 1rem;\n width: fit-content;\n margin: 0;\n padding: 0;\n"])));
|
|
83
|
-
|
|
84
|
-
var _default = DxcImage;
|
|
85
|
-
exports["default"] = _default;
|
|
70
|
+
var _default = exports["default"] = DxcImage;
|
package/image/Image.stories.tsx
CHANGED
|
@@ -2,7 +2,9 @@ import React from "react";
|
|
|
2
2
|
import DxcImage from "./Image";
|
|
3
3
|
import Title from "../../.storybook/components/Title";
|
|
4
4
|
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
5
|
-
import
|
|
5
|
+
import DxcFlex from "../flex/Flex";
|
|
6
|
+
import DxcInset from "../inset/Inset";
|
|
7
|
+
import DxcParagraph from "../paragraph/Paragraph";
|
|
6
8
|
|
|
7
9
|
export default {
|
|
8
10
|
title: "Image",
|
package/image/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
type Props = {
|
|
3
3
|
/**
|
|
4
4
|
* Alternative text description displayed when the specified image is not loaded.
|
|
5
5
|
*
|
|
@@ -64,7 +64,7 @@ declare type Props = {
|
|
|
64
64
|
*/
|
|
65
65
|
onError?: React.ReactEventHandler<HTMLImageElement>;
|
|
66
66
|
};
|
|
67
|
-
export
|
|
67
|
+
export type CaptionWrapperProps = {
|
|
68
68
|
condition: boolean;
|
|
69
69
|
wrapper: (children: React.ReactNode) => JSX.Element;
|
|
70
70
|
children: React.ReactNode;
|
package/inset/Inset.js
CHANGED
|
@@ -1,29 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = Inset;
|
|
9
|
-
|
|
10
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
9
|
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
10
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
|
-
|
|
16
11
|
var _templateObject;
|
|
17
|
-
|
|
18
12
|
function Inset(_ref) {
|
|
19
13
|
var space = _ref.space,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
horizontal = _ref.horizontal,
|
|
15
|
+
vertical = _ref.vertical,
|
|
16
|
+
top = _ref.top,
|
|
17
|
+
right = _ref.right,
|
|
18
|
+
bottom = _ref.bottom,
|
|
19
|
+
left = _ref.left,
|
|
20
|
+
children = _ref.children;
|
|
27
21
|
return /*#__PURE__*/_react["default"].createElement(StyledInset, {
|
|
28
22
|
space: space,
|
|
29
23
|
horizontal: horizontal,
|
|
@@ -34,18 +28,16 @@ function Inset(_ref) {
|
|
|
34
28
|
left: left
|
|
35
29
|
}, children);
|
|
36
30
|
}
|
|
37
|
-
|
|
38
31
|
function getSpacingValue(spacingName) {
|
|
39
32
|
return spacingName ? spacingName : "0rem";
|
|
40
33
|
}
|
|
41
|
-
|
|
42
34
|
var StyledInset = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n"])), function (_ref2) {
|
|
43
35
|
var space = _ref2.space,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
36
|
+
horizontal = _ref2.horizontal,
|
|
37
|
+
vertical = _ref2.vertical,
|
|
38
|
+
top = _ref2.top,
|
|
39
|
+
right = _ref2.right,
|
|
40
|
+
bottom = _ref2.bottom,
|
|
41
|
+
left = _ref2.left;
|
|
50
42
|
return "\n padding: ".concat(getSpacingValue(top || vertical || space), " ").concat(getSpacingValue(right || horizontal || space), "\n ").concat(getSpacingValue(bottom || vertical || space), " ").concat(getSpacingValue(left || horizontal || space), ";\n");
|
|
51
43
|
});
|
package/inset/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type Spacing = "0rem" | "0.125rem" | "0.25rem" | "0.5rem" | "1rem" | "1.5rem" | "2rem" | "3rem" | "4rem" | "5rem";
|
|
3
|
+
type Props = {
|
|
4
4
|
/**
|
|
5
5
|
* Applies the spacing scale to all sides.
|
|
6
6
|
*/
|
|
@@ -4,10 +4,10 @@ declare const DxcApplicationLayout: {
|
|
|
4
4
|
({ visibilityToggleLabel, header, sidenav, footer, children, }: AppLayoutPropsType): JSX.Element;
|
|
5
5
|
Header: {
|
|
6
6
|
({ underlined, content, responsiveContent, onClick, margin, tabIndex, }: import("../header/types").default): JSX.Element;
|
|
7
|
-
Dropdown: (props: import("../dropdown/types").default) => JSX.Element;
|
|
7
|
+
Dropdown: (props: import("../dropdown/types").default) => React.JSX.Element;
|
|
8
8
|
};
|
|
9
9
|
Main: ({ children }: AppLayoutMainPropsType) => JSX.Element;
|
|
10
|
-
Footer: ({ socialLinks, bottomLinks, copyright, children, margin, tabIndex, }: import("../footer/types").default) => JSX.Element;
|
|
10
|
+
Footer: ({ socialLinks, bottomLinks, copyright, children, margin, tabIndex, mode, }: import("../footer/types").default) => JSX.Element;
|
|
11
11
|
SideNav: {
|
|
12
12
|
({ title, children }: import("../sidenav/types").default): JSX.Element;
|
|
13
13
|
Section: ({ children }: import("../sidenav/types").SidenavSectionPropsType) => JSX.Element;
|
|
@@ -1,55 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
8
|
exports["default"] = void 0;
|
|
11
|
-
|
|
12
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
-
|
|
14
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
-
|
|
16
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
|
-
|
|
18
12
|
var _Header = _interopRequireDefault(require("../header/Header"));
|
|
19
|
-
|
|
20
13
|
var _Footer = _interopRequireDefault(require("../footer/Footer"));
|
|
21
|
-
|
|
22
14
|
var _Sidenav = _interopRequireDefault(require("../sidenav/Sidenav"));
|
|
23
|
-
|
|
24
15
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
25
|
-
|
|
26
16
|
var _variables = require("../common/variables");
|
|
27
|
-
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
var _SidenavContext = require("./SidenavContext");
|
|
31
|
-
|
|
17
|
+
var _Icons = _interopRequireDefault(require("./Icons"));
|
|
18
|
+
var _SidenavContext = require("../sidenav/SidenavContext");
|
|
32
19
|
var _useTranslatedLabels = _interopRequireDefault(require("../useTranslatedLabels"));
|
|
33
|
-
|
|
34
20
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
35
|
-
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
39
|
-
|
|
21
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
40
23
|
var year = new Date().getFullYear();
|
|
41
|
-
|
|
42
24
|
var Main = function Main(_ref) {
|
|
43
25
|
var children = _ref.children;
|
|
44
26
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, children);
|
|
45
27
|
};
|
|
46
|
-
|
|
47
28
|
var defaultHeader = function defaultHeader() {
|
|
48
29
|
return /*#__PURE__*/_react["default"].createElement(_Header["default"], {
|
|
49
30
|
underlined: true
|
|
50
31
|
});
|
|
51
32
|
};
|
|
52
|
-
|
|
53
33
|
var defaultFooter = function defaultFooter() {
|
|
54
34
|
return /*#__PURE__*/_react["default"].createElement(_Footer["default"], {
|
|
55
35
|
copyright: "\xA9 DXC Technology ".concat(year, "\u200B\u200B\u200B\u200B. All rights reserved."),
|
|
@@ -57,72 +37,62 @@ var defaultFooter = function defaultFooter() {
|
|
|
57
37
|
href: "https://www.linkedin.com/company/dxctechnology",
|
|
58
38
|
text: "Linkedin"
|
|
59
39
|
}, {
|
|
60
|
-
href: "https://
|
|
61
|
-
text: "
|
|
40
|
+
href: "https://x.com/dxctechnology",
|
|
41
|
+
text: "X"
|
|
62
42
|
}, {
|
|
63
43
|
href: "https://www.facebook.com/DXCTechnology/",
|
|
64
44
|
text: "Facebook"
|
|
65
45
|
}],
|
|
66
46
|
socialLinks: [{
|
|
67
47
|
href: "https://www.linkedin.com/company/dxctechnology",
|
|
68
|
-
logo: _Icons.linkedinLogo,
|
|
48
|
+
logo: _Icons["default"].linkedinLogo,
|
|
69
49
|
title: "Linkedin"
|
|
70
50
|
}, {
|
|
71
|
-
href: "https://
|
|
72
|
-
logo: _Icons.
|
|
73
|
-
title: "
|
|
51
|
+
href: "https://x.com/dxctechnology",
|
|
52
|
+
logo: _Icons["default"].xLogo,
|
|
53
|
+
title: "X"
|
|
74
54
|
}, {
|
|
75
55
|
href: "https://www.facebook.com/DXCTechnology/",
|
|
76
|
-
logo: _Icons.facebookLogo,
|
|
56
|
+
logo: _Icons["default"].facebookLogo,
|
|
77
57
|
title: "Facebook"
|
|
78
58
|
}]
|
|
79
59
|
});
|
|
80
60
|
};
|
|
81
|
-
|
|
82
61
|
var childTypeExists = function childTypeExists(children, childType) {
|
|
83
62
|
return children.find(function (child) {
|
|
84
63
|
return (child === null || child === void 0 ? void 0 : child.type) === childType;
|
|
85
64
|
});
|
|
86
65
|
};
|
|
87
|
-
|
|
88
66
|
var DxcApplicationLayout = function DxcApplicationLayout(_ref2) {
|
|
89
67
|
var _ref2$visibilityToggl = _ref2.visibilityToggleLabel,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
68
|
+
visibilityToggleLabel = _ref2$visibilityToggl === void 0 ? "" : _ref2$visibilityToggl,
|
|
69
|
+
header = _ref2.header,
|
|
70
|
+
sidenav = _ref2.sidenav,
|
|
71
|
+
footer = _ref2.footer,
|
|
72
|
+
children = _ref2.children;
|
|
96
73
|
var _useState = (0, _react.useState)(false),
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
74
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
75
|
+
isSidenavVisibleResponsive = _useState2[0],
|
|
76
|
+
setIsSidenavVisibleResponsive = _useState2[1];
|
|
101
77
|
var _useState3 = (0, _react.useState)(false),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
78
|
+
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
79
|
+
isResponsive = _useState4[0],
|
|
80
|
+
setIsResponsive = _useState4[1];
|
|
106
81
|
var ref = (0, _react.useRef)(null);
|
|
107
82
|
var translatedLabels = (0, _useTranslatedLabels["default"])();
|
|
108
|
-
|
|
109
83
|
var childrenArray = _react["default"].Children.toArray(children);
|
|
110
|
-
|
|
111
84
|
var headerContent = header || defaultHeader();
|
|
112
85
|
var footerContent = footer || defaultFooter();
|
|
113
86
|
var main = childTypeExists(childrenArray, Main);
|
|
114
|
-
|
|
115
87
|
var handleResize = function handleResize() {
|
|
116
88
|
setIsResponsive(window.matchMedia("(max-width: ".concat(_variables.responsiveSizes.medium, "rem)")).matches);
|
|
117
89
|
};
|
|
118
|
-
|
|
119
90
|
var handleSidenavVisibility = function handleSidenavVisibility() {
|
|
120
91
|
setIsSidenavVisibleResponsive(function (isSidenavVisibleResponsive) {
|
|
121
92
|
return !isSidenavVisibleResponsive;
|
|
122
93
|
});
|
|
123
94
|
};
|
|
124
|
-
|
|
125
|
-
(0, _react.useLayoutEffect)(function () {
|
|
95
|
+
(0, _react.useEffect)(function () {
|
|
126
96
|
handleResize();
|
|
127
97
|
window.addEventListener("resize", handleResize);
|
|
128
98
|
return function () {
|
|
@@ -140,35 +110,25 @@ var DxcApplicationLayout = function DxcApplicationLayout(_ref2) {
|
|
|
140
110
|
onClick: handleSidenavVisibility,
|
|
141
111
|
"aria-label": visibilityToggleLabel ? undefined : translatedLabels.applicationLayout.visibilityToggleTitle,
|
|
142
112
|
title: translatedLabels.applicationLayout.visibilityToggleTitle
|
|
143
|
-
}, _Icons.hamburgerIcon, visibilityToggleLabel)), /*#__PURE__*/_react["default"].createElement(BodyContainer, null, /*#__PURE__*/_react["default"].createElement(_SidenavContext.SidenavContextProvider, {
|
|
113
|
+
}, _Icons["default"].hamburgerIcon, visibilityToggleLabel)), /*#__PURE__*/_react["default"].createElement(BodyContainer, null, /*#__PURE__*/_react["default"].createElement(_SidenavContext.SidenavContextProvider, {
|
|
144
114
|
value: setIsSidenavVisibleResponsive
|
|
145
115
|
}, sidenav && (isResponsive ? isSidenavVisibleResponsive : true) && /*#__PURE__*/_react["default"].createElement(SidenavContainer, null, sidenav)), /*#__PURE__*/_react["default"].createElement(MainContainer, null, /*#__PURE__*/_react["default"].createElement(MainContentContainer, null, main), footerContent)));
|
|
146
116
|
};
|
|
147
|
-
|
|
148
117
|
var ApplicationLayoutContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 64px;\n bottom: 0;\n left: 0;\n right: 0;\n display: flex;\n flex-direction: column;\n\n @media (max-width: ", "rem) {\n ", ";\n ", "\n }\n"])), _variables.responsiveSizes.medium, function (props) {
|
|
149
118
|
return props.hasSidenav && "top: 116px";
|
|
150
119
|
}, function (props) {
|
|
151
120
|
return props.isSidenavVisible && "overflow: hidden;";
|
|
152
121
|
});
|
|
153
|
-
|
|
154
122
|
var HeaderContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n z-index: 3;\n"])));
|
|
155
|
-
|
|
156
123
|
var VisibilityToggle = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n top: 64px;\n left: 0;\n right: 0;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n padding: 4px 16px;\n width: 100%;\n background-color: #f2f2f2;\n user-select: none;\n z-index: 2;\n"])));
|
|
157
|
-
|
|
158
|
-
var HamburgerTrigger = _styledComponents["default"].button(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n border: 0px solid transparent;\n border-radius: 2px;\n padding: 12px 4px;\n background-color: transparent;\n box-shadow: 0 0 0 2px transparent;\n font-family: Open Sans, sans-serif;\n font-weight: 600;\n font-size: 14px;\n color: #000;\n cursor: pointer;\n :active {\n background-color: #cccccc;\n }\n :focus,\n :focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px #0095ff;\n }\n & > svg {\n height: 20px;\n width: 20px;\n }\n"])));
|
|
159
|
-
|
|
124
|
+
var HamburgerTrigger = _styledComponents["default"].button(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n border: 0px solid transparent;\n border-radius: 2px;\n padding: 12px 4px;\n background-color: transparent;\n box-shadow: 0 0 0 2px transparent;\n font-family: Open Sans, sans-serif;\n font-weight: 600;\n font-size: 14px;\n color: #000;\n cursor: pointer;\n\n :active {\n background-color: #cccccc;\n }\n :focus,\n :focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px #0095ff;\n }\n & > svg {\n height: 20px;\n width: 20px;\n }\n"])));
|
|
160
125
|
var BodyContainer = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n flex: 1;\n"])));
|
|
161
|
-
|
|
162
126
|
var SidenavContainer = _styledComponents["default"].div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n position: sticky;\n top: 64px;\n display: flex;\n height: calc(100vh - 64px);\n z-index: 1;\n\n @media (max-width: ", "rem) {\n position: absolute;\n top: 0px;\n height: 100%;\n }\n"])), _variables.responsiveSizes.medium);
|
|
163
|
-
|
|
164
127
|
var MainContainer = _styledComponents["default"].div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: column;\n width: 100%;\n"])));
|
|
165
|
-
|
|
166
128
|
var MainContentContainer = _styledComponents["default"].main(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n flex: 1;\n background-color: #fff;\n"])));
|
|
167
|
-
|
|
168
129
|
DxcApplicationLayout.Header = _Header["default"];
|
|
169
130
|
DxcApplicationLayout.Main = Main;
|
|
170
131
|
DxcApplicationLayout.Footer = _Footer["default"];
|
|
171
132
|
DxcApplicationLayout.SideNav = _Sidenav["default"];
|
|
172
133
|
DxcApplicationLayout.useResponsiveSidenavVisibility = _SidenavContext.useResponsiveSidenavVisibility;
|
|
173
|
-
var _default = DxcApplicationLayout;
|
|
174
|
-
exports["default"] = _default;
|
|
134
|
+
var _default = exports["default"] = DxcApplicationLayout;
|
|
@@ -4,7 +4,7 @@ import Title from "../../.storybook/components/Title";
|
|
|
4
4
|
import { INITIAL_VIEWPORTS } from "@storybook/addon-viewport";
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title: "Application Layout
|
|
7
|
+
title: "Application Layout",
|
|
8
8
|
component: DxcApplicationLayout,
|
|
9
9
|
parameters: {
|
|
10
10
|
viewport: {
|
package/layout/Icons.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare const layoutIcons: {
|
|
3
|
+
facebookLogo: React.JSX.Element;
|
|
4
|
+
xLogo: React.JSX.Element;
|
|
5
|
+
linkedinLogo: React.JSX.Element;
|
|
6
|
+
hamburgerIcon: React.JSX.Element;
|
|
7
|
+
};
|
|
8
|
+
export default layoutIcons;
|
package/layout/Icons.js
CHANGED
|
@@ -1,66 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
|
-
exports
|
|
9
|
-
|
|
7
|
+
exports["default"] = void 0;
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
height: "24",
|
|
60
|
-
width: "24",
|
|
61
|
-
viewBox: "0 0 24 24"
|
|
62
|
-
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
63
|
-
d: "M3 18V16H21V18ZM3 13V11H21V13ZM3 8V6H21V8Z"
|
|
64
|
-
}));
|
|
65
|
-
|
|
66
|
-
exports.hamburgerIcon = hamburgerIcon;
|
|
9
|
+
var layoutIcons = {
|
|
10
|
+
facebookLogo: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
11
|
+
version: "1.1",
|
|
12
|
+
x: "0px",
|
|
13
|
+
y: "0px",
|
|
14
|
+
width: "438.536px",
|
|
15
|
+
height: "438.536px",
|
|
16
|
+
viewBox: "0 0 438.536 438.536",
|
|
17
|
+
fill: "#FFFFFF"
|
|
18
|
+
}, /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("path", {
|
|
19
|
+
d: "M414.41,24.123C398.333,8.042,378.963,0,356.315,0H82.228C59.58,0,40.21,8.042,24.126,24.123 C8.045,40.207,0.003,59.576,0.003,82.225v274.084c0,22.647,8.042,42.018,24.123,58.102c16.084,16.084,35.454,24.126,58.102,24.126 h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225 C438.532,59.576,430.49,40.204,414.41,24.123z M373.155,225.548h-49.963V406.84h-74.802V225.548H210.99V163.02h37.401v-37.402 c0-26.838,6.283-47.107,18.843-60.813c12.559-13.706,33.304-20.555,62.242-20.555h49.963v62.526h-31.401 c-10.663,0-17.467,1.853-20.417,5.568c-2.949,3.711-4.428,10.23-4.428,19.558v31.119h56.534L373.155,225.548z"
|
|
20
|
+
}))),
|
|
21
|
+
xLogo: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
22
|
+
width: "256",
|
|
23
|
+
height: "256",
|
|
24
|
+
viewBox: "0 0 256 256",
|
|
25
|
+
fill: "none",
|
|
26
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
27
|
+
}, /*#__PURE__*/_react["default"].createElement("rect", {
|
|
28
|
+
width: "256",
|
|
29
|
+
height: "256",
|
|
30
|
+
rx: "40",
|
|
31
|
+
fill: "white"
|
|
32
|
+
}), /*#__PURE__*/_react["default"].createElement("path", {
|
|
33
|
+
d: "M140.192 118.205L187.848 64H176.556L135.158 111.056L102.117 64H64L113.975 135.163L64 192H75.2914L118.982 142.296L153.883 192H192L140.192 118.205ZM124.722 135.787L119.65 128.697L79.3634 72.3294H96.7094L129.232 117.837L134.282 124.927L176.551 184.076H159.205L124.722 135.787Z",
|
|
34
|
+
fill: "#0F1419"
|
|
35
|
+
})),
|
|
36
|
+
linkedinLogo: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
37
|
+
version: "1.1",
|
|
38
|
+
x: "0px",
|
|
39
|
+
y: "0px",
|
|
40
|
+
width: "438.536px",
|
|
41
|
+
height: "438.536px",
|
|
42
|
+
viewBox: "0 0 438.536 438.536",
|
|
43
|
+
fill: "#FFFFFF"
|
|
44
|
+
}, /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("path", {
|
|
45
|
+
d: "M414.41,24.123C398.333,8.042,378.963,0,356.315,0H82.228C59.58,0,40.21,8.042,24.126,24.123 C8.045,40.207,0.003,59.576,0.003,82.225v274.084c0,22.647,8.042,42.018,24.123,58.102c16.084,16.084,35.454,24.126,58.102,24.126 h274.084c22.648,0,42.018-8.042,58.095-24.126c16.084-16.084,24.126-35.454,24.126-58.102V82.225 C438.532,59.576,430.49,40.204,414.41,24.123z M133.618,367.157H67.666V169.016h65.952V367.157z M127.626,132.332 c-6.851,6.567-15.893,9.851-27.124,9.851h-0.288c-10.848,0-19.648-3.284-26.407-9.851c-6.76-6.567-10.138-14.703-10.138-24.41 c0-9.897,3.476-18.083,10.421-24.556c6.95-6.471,15.942-9.708,26.98-9.708c11.039,0,19.89,3.237,26.553,9.708 c6.661,6.473,10.088,14.659,10.277,24.556C137.899,117.625,134.477,125.761,127.626,132.332z M370.873,367.157h-65.952v-105.92 c0-29.879-11.036-44.823-33.116-44.823c-8.374,0-15.42,2.331-21.128,6.995c-5.715,4.661-9.996,10.324-12.847,16.991 c-1.335,3.422-1.999,8.75-1.999,15.981v110.775h-65.952c0.571-119.529,0.571-185.579,0-198.142h65.952v27.974 c13.867-21.681,33.558-32.544,59.101-32.544c22.84,0,41.21,7.52,55.104,22.554c13.895,15.037,20.841,37.214,20.841,66.519v113.64 H370.873z"
|
|
46
|
+
}))),
|
|
47
|
+
hamburgerIcon: /*#__PURE__*/_react["default"].createElement("svg", {
|
|
48
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
49
|
+
height: "24",
|
|
50
|
+
width: "24",
|
|
51
|
+
viewBox: "0 0 24 24"
|
|
52
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
53
|
+
d: "M3 18V16H21V18ZM3 13V11H21V13ZM3 8V6H21V8Z"
|
|
54
|
+
}))
|
|
55
|
+
};
|
|
56
|
+
var _default = exports["default"] = layoutIcons;
|
package/layout/types.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export
|
|
2
|
+
export type AppLayoutMainPropsType = {
|
|
3
3
|
/**
|
|
4
4
|
* Everything between the tags will be displayed as the content of the main part of the application.
|
|
5
5
|
*/
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type AppLayoutSidenavPropsType = {
|
|
9
9
|
/**
|
|
10
10
|
* The area inside the sidenav. This area can be used to render the content inside the sidenav.
|
|
11
11
|
*/
|
|
@@ -15,7 +15,7 @@ export declare type AppLayoutSidenavPropsType = {
|
|
|
15
15
|
*/
|
|
16
16
|
title?: React.ReactNode;
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
type AppLayoutPropsType = {
|
|
19
19
|
/**
|
|
20
20
|
* Text to be placed next to the hamburger button that toggles the
|
|
21
21
|
* visibility of the sidenav.
|