@dxc-technology/halstack-react 0.0.0-f54247d → 0.0.0-f6d6be5
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 +2 -2
- package/BackgroundColorContext.js +1 -1
- package/HalstackContext.d.ts +1337 -5
- package/HalstackContext.js +113 -72
- package/README.md +47 -0
- package/accordion/Accordion.d.ts +1 -1
- package/accordion/Accordion.js +14 -37
- package/accordion/Accordion.stories.tsx +104 -113
- package/accordion/Accordion.test.js +1 -1
- package/accordion/types.d.ts +2 -14
- package/accordion-group/AccordionGroup.d.ts +4 -3
- package/accordion-group/AccordionGroup.js +23 -44
- package/accordion-group/AccordionGroup.stories.tsx +77 -76
- package/accordion-group/AccordionGroup.test.js +7 -17
- package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
- package/accordion-group/AccordionGroupAccordion.js +43 -0
- package/accordion-group/types.d.ts +2 -14
- package/alert/Alert.js +4 -8
- package/alert/Alert.stories.tsx +28 -0
- package/alert/Alert.test.js +1 -1
- package/bleed/Bleed.stories.tsx +1 -0
- package/box/Box.d.ts +1 -1
- package/box/Box.js +7 -26
- package/box/Box.stories.tsx +38 -51
- package/box/Box.test.js +1 -1
- package/box/types.d.ts +0 -12
- package/bulleted-list/BulletedList.js +4 -2
- package/bulleted-list/BulletedList.stories.tsx +7 -1
- package/bulleted-list/types.d.ts +31 -4
- package/button/Button.d.ts +1 -1
- package/button/Button.js +48 -60
- package/button/Button.stories.tsx +151 -9
- package/button/Button.test.js +12 -1
- package/button/types.d.ts +7 -3
- package/card/Card.d.ts +1 -1
- package/card/Card.js +27 -45
- package/card/Card.stories.tsx +12 -42
- package/card/Card.test.js +1 -1
- package/card/types.d.ts +1 -7
- package/checkbox/Checkbox.js +3 -3
- package/checkbox/Checkbox.stories.tsx +52 -0
- package/checkbox/Checkbox.test.js +1 -1
- package/checkbox/types.d.ts +2 -2
- package/chip/Chip.js +28 -49
- package/chip/Chip.stories.tsx +121 -26
- package/chip/Chip.test.js +3 -5
- package/common/OpenSans.css +68 -80
- package/common/coreTokens.d.ts +146 -0
- package/common/coreTokens.js +167 -0
- package/common/utils.d.ts +1 -0
- package/common/utils.js +4 -4
- package/common/variables.d.ts +1490 -0
- package/common/variables.js +984 -1127
- package/date-input/Calendar.d.ts +1 -1
- package/date-input/Calendar.js +45 -45
- package/date-input/DateInput.js +74 -32
- package/date-input/DateInput.stories.tsx +183 -30
- package/date-input/DateInput.test.js +120 -37
- package/date-input/DatePicker.js +38 -52
- package/date-input/Icons.d.ts +6 -0
- package/date-input/Icons.js +75 -0
- package/date-input/YearPicker.d.ts +1 -1
- package/date-input/YearPicker.js +23 -12
- package/date-input/types.d.ts +6 -8
- package/dialog/Dialog.d.ts +1 -1
- package/dialog/Dialog.js +55 -86
- package/dialog/Dialog.stories.tsx +145 -217
- package/dialog/Dialog.test.js +302 -3
- package/dialog/types.d.ts +0 -13
- package/dropdown/Dropdown.js +5 -8
- package/dropdown/Dropdown.stories.tsx +210 -84
- package/dropdown/Dropdown.test.js +3 -2
- package/dropdown/DropdownMenu.js +12 -18
- package/dropdown/DropdownMenuItem.js +4 -17
- package/dropdown/types.d.ts +3 -3
- package/file-input/FileInput.js +4 -8
- package/file-input/FileInput.stories.tsx +85 -2
- package/file-input/FileInput.test.js +1 -42
- package/file-input/FileItem.js +3 -2
- package/file-input/types.d.ts +1 -1
- package/flex/Flex.js +4 -2
- package/flex/Flex.stories.tsx +35 -26
- package/flex/types.d.ts +70 -5
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +44 -64
- package/footer/Footer.stories.tsx +36 -21
- package/footer/Footer.test.js +16 -26
- package/footer/types.d.ts +10 -12
- package/grid/Grid.d.ts +7 -0
- package/grid/Grid.js +91 -0
- package/grid/Grid.stories.tsx +219 -0
- package/grid/types.d.ts +115 -0
- package/header/Header.d.ts +4 -3
- package/header/Header.js +20 -49
- package/header/Header.stories.tsx +115 -36
- package/header/Header.test.js +2 -2
- package/header/types.d.ts +1 -15
- package/heading/Heading.js +1 -1
- package/heading/Heading.test.js +1 -1
- package/image/Image.d.ts +4 -0
- package/image/Image.js +85 -0
- package/image/Image.stories.tsx +127 -0
- package/image/types.d.ts +72 -0
- package/inset/Inset.stories.tsx +2 -1
- package/layout/ApplicationLayout.d.ts +5 -5
- package/layout/ApplicationLayout.js +15 -12
- package/layout/ApplicationLayout.stories.tsx +1 -1
- package/layout/Icons.d.ts +7 -4
- package/layout/Icons.js +52 -56
- package/layout/types.d.ts +2 -3
- package/link/Link.js +3 -3
- package/link/Link.stories.tsx +60 -0
- package/link/Link.test.js +2 -4
- package/link/types.d.ts +2 -2
- package/main.d.ts +4 -2
- package/main.js +17 -1
- package/{tabs-nav → nav-tabs}/NavTabs.d.ts +2 -2
- package/{tabs-nav → nav-tabs}/NavTabs.js +8 -11
- package/{tabs-nav → nav-tabs}/NavTabs.stories.tsx +110 -6
- package/{tabs-nav → nav-tabs}/NavTabs.test.js +1 -1
- package/{tabs-nav → nav-tabs}/Tab.js +48 -32
- package/{tabs-nav → nav-tabs}/types.d.ts +8 -9
- package/nav-tabs/types.js +5 -0
- package/number-input/NumberInput.d.ts +7 -0
- package/number-input/NumberInput.js +6 -4
- package/number-input/NumberInput.test.js +279 -96
- package/package.json +3 -3
- package/paginator/Icons.d.ts +5 -0
- package/paginator/Icons.js +16 -28
- package/paginator/Paginator.js +7 -15
- package/paginator/Paginator.stories.tsx +24 -0
- package/paginator/Paginator.test.js +57 -47
- package/paragraph/Paragraph.d.ts +3 -4
- package/paragraph/Paragraph.js +5 -5
- package/password-input/Icons.d.ts +6 -0
- package/password-input/Icons.js +39 -0
- package/password-input/PasswordInput.js +35 -82
- package/password-input/PasswordInput.stories.tsx +1 -0
- package/password-input/PasswordInput.test.js +28 -35
- package/progress-bar/ProgressBar.d.ts +2 -2
- package/progress-bar/ProgressBar.js +5 -5
- package/progress-bar/ProgressBar.stories.jsx +35 -2
- package/progress-bar/ProgressBar.test.js +1 -1
- package/progress-bar/types.d.ts +4 -3
- package/quick-nav/QuickNav.stories.tsx +14 -0
- package/radio-group/Radio.js +10 -10
- package/radio-group/RadioGroup.js +8 -10
- package/radio-group/RadioGroup.stories.tsx +131 -18
- package/radio-group/RadioGroup.test.js +1 -1
- package/resultsetTable/ResultsetTable.js +2 -2
- package/resultsetTable/ResultsetTable.test.js +18 -23
- package/resultsetTable/types.d.ts +3 -3
- package/select/Listbox.d.ts +1 -1
- package/select/Listbox.js +5 -34
- package/select/Option.js +11 -24
- package/select/Select.js +56 -35
- package/select/Select.stories.tsx +495 -148
- package/select/Select.test.js +80 -85
- package/select/types.d.ts +2 -2
- package/sidenav/Icons.d.ts +7 -0
- package/sidenav/Icons.js +51 -0
- package/sidenav/Sidenav.d.ts +2 -2
- package/sidenav/Sidenav.js +66 -96
- package/sidenav/Sidenav.stories.tsx +165 -63
- package/sidenav/types.d.ts +21 -18
- package/slider/Slider.js +6 -7
- package/slider/Slider.stories.tsx +57 -0
- package/slider/Slider.test.js +1 -1
- package/slider/types.d.ts +2 -2
- package/spinner/Spinner.js +17 -23
- package/spinner/Spinner.stories.jsx +53 -27
- package/spinner/Spinner.test.js +1 -1
- package/switch/Switch.js +3 -3
- package/switch/Switch.stories.tsx +33 -0
- package/switch/Switch.test.js +1 -1
- package/switch/types.d.ts +2 -2
- package/table/Table.js +2 -2
- package/table/Table.stories.jsx +80 -1
- package/table/Table.test.js +1 -1
- package/tabs/Tab.js +12 -15
- package/tabs/Tabs.js +11 -17
- package/tabs/Tabs.stories.tsx +45 -5
- package/tabs/Tabs.test.js +4 -5
- package/tabs/types.d.ts +2 -2
- package/tag/Tag.js +7 -9
- package/tag/Tag.stories.tsx +14 -1
- package/tag/Tag.test.js +1 -1
- package/text-input/Suggestion.js +34 -7
- package/text-input/TextInput.js +71 -91
- package/text-input/TextInput.stories.tsx +93 -5
- package/text-input/TextInput.test.js +125 -26
- package/textarea/Textarea.js +3 -4
- package/textarea/Textarea.stories.jsx +60 -1
- package/textarea/Textarea.test.js +2 -4
- package/toggle-group/ToggleGroup.d.ts +2 -2
- package/toggle-group/ToggleGroup.js +85 -59
- package/toggle-group/ToggleGroup.stories.tsx +48 -3
- package/toggle-group/ToggleGroup.test.js +38 -24
- package/toggle-group/types.d.ts +22 -13
- package/typography/Typography.d.ts +2 -2
- package/typography/Typography.js +14 -113
- package/typography/Typography.stories.tsx +1 -1
- package/useTheme.d.ts +1242 -1
- package/useTheme.js +1 -1
- package/useTranslatedLabels.d.ts +84 -1
- package/utils/BaseTypography.d.ts +21 -0
- package/utils/BaseTypography.js +108 -0
- package/utils/FocusLock.d.ts +13 -0
- package/utils/FocusLock.js +138 -0
- package/wizard/Wizard.js +2 -2
- package/wizard/Wizard.stories.tsx +20 -0
- package/wizard/Wizard.test.js +1 -1
- package/wizard/types.d.ts +5 -6
- package/card/ice-cream.jpg +0 -0
- package/number-input/NumberInputContext.d.ts +0 -4
- package/number-input/NumberInputContext.js +0 -19
- package/number-input/numberInputContextTypes.d.ts +0 -19
- /package/{tabs-nav → grid}/types.js +0 -0
- /package/{number-input/numberInputContextTypes.js → image/types.js} +0 -0
- /package/{tabs-nav → nav-tabs}/Tab.d.ts +0 -0
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import DxcHeader from "./Header";
|
|
3
|
+
import DxcButton from "../button/Button";
|
|
3
4
|
import Title from "../../.storybook/components/Title";
|
|
4
5
|
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
5
6
|
import { userEvent, waitFor, within } from "@storybook/testing-library";
|
|
7
|
+
import DxcFlex from "../flex/Flex";
|
|
8
|
+
import DxcLink from "../link/Link";
|
|
9
|
+
import { HalstackProvider } from "../HalstackContext";
|
|
6
10
|
|
|
7
11
|
export default {
|
|
8
12
|
title: "Header",
|
|
@@ -16,16 +20,62 @@ const options: any = [
|
|
|
16
20
|
},
|
|
17
21
|
];
|
|
18
22
|
|
|
23
|
+
const options2: any = [
|
|
24
|
+
{
|
|
25
|
+
value: 1,
|
|
26
|
+
label: "Home",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
value: 2,
|
|
30
|
+
label: "Release notes",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
value: 3,
|
|
34
|
+
label: "Sign out",
|
|
35
|
+
},
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
const opinionatedTheme = {
|
|
39
|
+
header: {
|
|
40
|
+
baseColor: "#ffffff",
|
|
41
|
+
accentColor: "#000000",
|
|
42
|
+
fontColor: "#000000",
|
|
43
|
+
menuBaseColor: "#ffffff",
|
|
44
|
+
hamburguerColor: "#000000",
|
|
45
|
+
logo: "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b8/2021_Facebook_icon.svg/2048px-2021_Facebook_icon.svg.png",
|
|
46
|
+
logoResponsive:
|
|
47
|
+
"https://upload.wikimedia.org/wikipedia/commons/thumb/b/b8/2021_Facebook_icon.svg/2048px-2021_Facebook_icon.svg.png",
|
|
48
|
+
contentColor: "#000000",
|
|
49
|
+
overlayColor: "#000000b3",
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
|
|
19
53
|
export const Chromatic = () => (
|
|
20
54
|
<>
|
|
21
55
|
<ExampleContainer>
|
|
22
56
|
<Title title="Default with dropdown" theme="light" level={4} />
|
|
23
|
-
<DxcHeader
|
|
57
|
+
<DxcHeader
|
|
58
|
+
content={<DxcHeader.Dropdown options={options} label="Default Dropdown" onSelectOption={() => {}} />}
|
|
59
|
+
/>
|
|
24
60
|
</ExampleContainer>
|
|
25
61
|
<ExampleContainer>
|
|
26
62
|
<Title title="Underlined with text" theme="light" level={4} />
|
|
27
63
|
<DxcHeader underlined content={<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras felis.</p>} />
|
|
28
64
|
</ExampleContainer>
|
|
65
|
+
<ExampleContainer>
|
|
66
|
+
<Title title="Underlined, dropdown and links" theme="light" level={4} />
|
|
67
|
+
<DxcHeader
|
|
68
|
+
content={
|
|
69
|
+
<DxcFlex alignItems="center" gap="4rem">
|
|
70
|
+
<DxcLink>Link 1</DxcLink>
|
|
71
|
+
<DxcLink>Link 2</DxcLink>
|
|
72
|
+
<DxcLink>Link 3</DxcLink>
|
|
73
|
+
<DxcHeader.Dropdown options={options2} label="Label" onSelectOption={() => {}} />
|
|
74
|
+
</DxcFlex>
|
|
75
|
+
}
|
|
76
|
+
underlined
|
|
77
|
+
/>
|
|
78
|
+
</ExampleContainer>
|
|
29
79
|
<Title title="Margins" theme="light" level={2} />
|
|
30
80
|
<ExampleContainer>
|
|
31
81
|
<Title title="Xxsmall margin" theme="light" level={4} />
|
|
@@ -62,35 +112,20 @@ export const Chromatic = () => (
|
|
|
62
112
|
<DxcHeader underlined margin="xxlarge" />
|
|
63
113
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras felis.</p>
|
|
64
114
|
</ExampleContainer>
|
|
65
|
-
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
<ExampleContainer>
|
|
80
|
-
<Title title="Medium padding" theme="light" level={4} />
|
|
81
|
-
<DxcHeader underlined padding="medium" />
|
|
82
|
-
</ExampleContainer>
|
|
83
|
-
<ExampleContainer>
|
|
84
|
-
<Title title="Large padding" theme="light" level={4} />
|
|
85
|
-
<DxcHeader underlined padding="large" />
|
|
86
|
-
</ExampleContainer>
|
|
87
|
-
<ExampleContainer>
|
|
88
|
-
<Title title="Xlarge padding" theme="light" level={4} />
|
|
89
|
-
<DxcHeader underlined padding="xlarge" />
|
|
90
|
-
</ExampleContainer>
|
|
91
|
-
<ExampleContainer>
|
|
92
|
-
<Title title="Xxlarge padding" theme="light" level={4} />
|
|
93
|
-
<DxcHeader underlined padding="xxlarge" />
|
|
115
|
+
<Title title="Opinionated theme" theme="light" level={2} />
|
|
116
|
+
<ExampleContainer>
|
|
117
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
118
|
+
<DxcHeader
|
|
119
|
+
underlined
|
|
120
|
+
content={<DxcButton label={"Custom Button"} />}
|
|
121
|
+
responsiveContent={(closeHandler) => (
|
|
122
|
+
<>
|
|
123
|
+
<DxcButton label={"Custom Button"} onClick={closeHandler} />
|
|
124
|
+
Custom content
|
|
125
|
+
</>
|
|
126
|
+
)}
|
|
127
|
+
/>
|
|
128
|
+
</HalstackProvider>
|
|
94
129
|
</ExampleContainer>
|
|
95
130
|
</>
|
|
96
131
|
);
|
|
@@ -99,8 +134,10 @@ export const ResponsiveHeader = () => (
|
|
|
99
134
|
<ExampleContainer>
|
|
100
135
|
<Title title="Responsive" theme="light" level={4} />
|
|
101
136
|
<DxcHeader
|
|
102
|
-
content={<DxcHeader.Dropdown options={options} label="Default Dropdown" />}
|
|
103
|
-
responsiveContent={(closeHandler) =>
|
|
137
|
+
content={<DxcHeader.Dropdown options={options} label="Default Dropdown" onSelectOption={() => {}} />}
|
|
138
|
+
responsiveContent={(closeHandler) => (
|
|
139
|
+
<DxcHeader.Dropdown options={options} label="Default Dropdown" onSelectOption={() => {}} />
|
|
140
|
+
)}
|
|
104
141
|
underlined
|
|
105
142
|
/>
|
|
106
143
|
</ExampleContainer>
|
|
@@ -120,13 +157,29 @@ const RespHeaderHover = () => (
|
|
|
120
157
|
</ExampleContainer>
|
|
121
158
|
);
|
|
122
159
|
|
|
123
|
-
const
|
|
160
|
+
const RespHeaderMenuMobile = () => (
|
|
124
161
|
<ExampleContainer>
|
|
125
162
|
<Title title="Responsive menu" theme="light" level={4} />
|
|
126
163
|
<DxcHeader responsiveContent={(closeHandler) => <p>Lorem ipsum dolor sit amet.</p>} underlined />
|
|
127
164
|
</ExampleContainer>
|
|
128
165
|
);
|
|
129
166
|
|
|
167
|
+
const RespHeaderMenuTablet = () => (
|
|
168
|
+
<ExampleContainer>
|
|
169
|
+
<Title title="Responsive menu" theme="light" level={4} />
|
|
170
|
+
<DxcHeader responsiveContent={(closeHandler) => <p>Lorem ipsum dolor sit amet.</p>} underlined />
|
|
171
|
+
</ExampleContainer>
|
|
172
|
+
);
|
|
173
|
+
|
|
174
|
+
const RespHeaderMenuOpinionated = () => (
|
|
175
|
+
<ExampleContainer>
|
|
176
|
+
<Title title="Responsive menu" theme="light" level={4} />
|
|
177
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
178
|
+
<DxcHeader responsiveContent={(closeHandler) => <p>Lorem ipsum dolor sit amet.</p>} underlined />
|
|
179
|
+
</HalstackProvider>
|
|
180
|
+
</ExampleContainer>
|
|
181
|
+
);
|
|
182
|
+
|
|
130
183
|
ResponsiveHeader.parameters = {
|
|
131
184
|
viewport: {
|
|
132
185
|
defaultViewport: "iphonex",
|
|
@@ -158,14 +211,40 @@ ResponsiveHeaderHover.play = async ({ canvasElement }) => {
|
|
|
158
211
|
await waitFor(() => canvas.findByText("Menu"));
|
|
159
212
|
};
|
|
160
213
|
|
|
161
|
-
export const
|
|
162
|
-
|
|
214
|
+
export const ResponsiveHeaderMenuMobile = RespHeaderMenuMobile.bind({});
|
|
215
|
+
ResponsiveHeaderMenuMobile.parameters = {
|
|
163
216
|
viewport: {
|
|
164
217
|
defaultViewport: "iphonex",
|
|
165
218
|
},
|
|
166
219
|
chromatic: { viewports: [375] },
|
|
167
220
|
};
|
|
168
|
-
|
|
221
|
+
ResponsiveHeaderMenuMobile.play = async ({ canvasElement }) => {
|
|
222
|
+
const canvas = within(canvasElement);
|
|
223
|
+
await waitFor(() => canvas.findByText("Menu"));
|
|
224
|
+
await userEvent.click(canvas.getByText("Menu"));
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
export const ResponsiveHeaderMenuTablet = RespHeaderMenuTablet.bind({});
|
|
228
|
+
ResponsiveHeaderMenuTablet.parameters = {
|
|
229
|
+
viewport: {
|
|
230
|
+
defaultViewport: "pixelxl",
|
|
231
|
+
},
|
|
232
|
+
chromatic: { viewports: [720] },
|
|
233
|
+
};
|
|
234
|
+
ResponsiveHeaderMenuTablet.play = async ({ canvasElement }) => {
|
|
235
|
+
const canvas = within(canvasElement);
|
|
236
|
+
await waitFor(() => canvas.findByText("Menu"));
|
|
237
|
+
await userEvent.click(canvas.getByText("Menu"));
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
export const ResponsiveHeaderMenuOpinionated = RespHeaderMenuOpinionated.bind({});
|
|
241
|
+
ResponsiveHeaderMenuOpinionated.parameters = {
|
|
242
|
+
viewport: {
|
|
243
|
+
defaultViewport: "pixelxl",
|
|
244
|
+
},
|
|
245
|
+
chromatic: { viewports: [720] },
|
|
246
|
+
};
|
|
247
|
+
ResponsiveHeaderMenuOpinionated.play = async ({ canvasElement }) => {
|
|
169
248
|
const canvas = within(canvasElement);
|
|
170
249
|
await waitFor(() => canvas.findByText("Menu"));
|
|
171
250
|
await userEvent.click(canvas.getByText("Menu"));
|
package/header/Header.test.js
CHANGED
|
@@ -6,7 +6,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
6
6
|
|
|
7
7
|
var _react2 = require("@testing-library/react");
|
|
8
8
|
|
|
9
|
-
var _Header = _interopRequireDefault(require("./Header"));
|
|
9
|
+
var _Header = _interopRequireDefault(require("./Header.tsx"));
|
|
10
10
|
|
|
11
11
|
describe("Header component tests", function () {
|
|
12
12
|
beforeAll(function () {
|
|
@@ -68,7 +68,7 @@ describe("Header component tests", function () {
|
|
|
68
68
|
});
|
|
69
69
|
|
|
70
70
|
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Header["default"], {
|
|
71
|
-
responsiveContent: function responsiveContent(
|
|
71
|
+
responsiveContent: function responsiveContent() {
|
|
72
72
|
return /*#__PURE__*/_react["default"].createElement("p", null, "header-child-text");
|
|
73
73
|
}
|
|
74
74
|
})),
|
package/header/types.d.ts
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
export declare type Padding = {
|
|
4
|
-
top?: Space;
|
|
5
|
-
bottom?: Space;
|
|
6
|
-
left?: Space;
|
|
7
|
-
right?: Space;
|
|
8
|
-
};
|
|
2
|
+
declare type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
9
3
|
declare type Props = {
|
|
10
4
|
/**
|
|
11
5
|
* Wether a contrast line should appear at the bottom of the header.
|
|
@@ -31,14 +25,6 @@ declare type Props = {
|
|
|
31
25
|
* ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
32
26
|
*/
|
|
33
27
|
margin?: Space;
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated This prop will be removed shortly, consider using the Inset component for this purpose.
|
|
36
|
-
* Size of the padding to be applied to the custom area of the component
|
|
37
|
-
* ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
38
|
-
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in
|
|
39
|
-
* order to specify different padding sizes.
|
|
40
|
-
*/
|
|
41
|
-
padding?: Space | Padding;
|
|
42
28
|
/**
|
|
43
29
|
* Value of the tabindex for all interactuable elements, except those inside the
|
|
44
30
|
* custom area.
|
package/heading/Heading.js
CHANGED
|
@@ -17,7 +17,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
17
17
|
|
|
18
18
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
19
19
|
|
|
20
|
-
var _variables = require("../common/variables
|
|
20
|
+
var _variables = require("../common/variables");
|
|
21
21
|
|
|
22
22
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
23
23
|
|
package/heading/Heading.test.js
CHANGED
|
@@ -6,7 +6,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
6
6
|
|
|
7
7
|
var _react2 = require("@testing-library/react");
|
|
8
8
|
|
|
9
|
-
var _Heading = _interopRequireDefault(require("./Heading"));
|
|
9
|
+
var _Heading = _interopRequireDefault(require("./Heading.tsx"));
|
|
10
10
|
|
|
11
11
|
describe("Heading component tests", function () {
|
|
12
12
|
test("Heading renders with default level", function () {
|
package/image/Image.d.ts
ADDED
package/image/Image.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = void 0;
|
|
11
|
+
|
|
12
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
|
|
16
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
17
|
+
|
|
18
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
19
|
+
|
|
20
|
+
var _BaseTypography = _interopRequireDefault(require("../utils/BaseTypography"));
|
|
21
|
+
|
|
22
|
+
var _templateObject;
|
|
23
|
+
|
|
24
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
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
|
+
|
|
28
|
+
var CaptionWrapper = function CaptionWrapper(_ref) {
|
|
29
|
+
var condition = _ref.condition,
|
|
30
|
+
wrapper = _ref.wrapper,
|
|
31
|
+
children = _ref.children;
|
|
32
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, condition ? wrapper(children) : children);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
var DxcImage = function DxcImage(_ref2) {
|
|
36
|
+
var alt = _ref2.alt,
|
|
37
|
+
caption = _ref2.caption,
|
|
38
|
+
_ref2$lazyLoading = _ref2.lazyLoading,
|
|
39
|
+
lazyLoading = _ref2$lazyLoading === void 0 ? false : _ref2$lazyLoading,
|
|
40
|
+
src = _ref2.src,
|
|
41
|
+
srcSet = _ref2.srcSet,
|
|
42
|
+
sizes = _ref2.sizes,
|
|
43
|
+
width = _ref2.width,
|
|
44
|
+
height = _ref2.height,
|
|
45
|
+
objectFit = _ref2.objectFit,
|
|
46
|
+
objectPosition = _ref2.objectPosition,
|
|
47
|
+
onLoad = _ref2.onLoad,
|
|
48
|
+
onError = _ref2.onError;
|
|
49
|
+
var colorsTheme = (0, _useTheme["default"])();
|
|
50
|
+
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
51
|
+
theme: colorsTheme.image
|
|
52
|
+
}, /*#__PURE__*/_react["default"].createElement(CaptionWrapper, {
|
|
53
|
+
condition: caption != undefined,
|
|
54
|
+
wrapper: function wrapper(children) {
|
|
55
|
+
return /*#__PURE__*/_react["default"].createElement(Figure, null, children, /*#__PURE__*/_react["default"].createElement(_BaseTypography["default"], {
|
|
56
|
+
as: "figcaption",
|
|
57
|
+
color: colorsTheme.image.captionFontColor,
|
|
58
|
+
fontFamily: colorsTheme.image.captionFontFamily,
|
|
59
|
+
fontSize: colorsTheme.image.captionFontSize,
|
|
60
|
+
fontStyle: colorsTheme.image.captionFontStyle,
|
|
61
|
+
fontWeight: colorsTheme.image.captionFontWeight,
|
|
62
|
+
lineHeight: colorsTheme.image.captionLineHeight
|
|
63
|
+
}, caption));
|
|
64
|
+
}
|
|
65
|
+
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
66
|
+
alt: alt,
|
|
67
|
+
loading: lazyLoading ? "lazy" : undefined,
|
|
68
|
+
onLoad: onLoad,
|
|
69
|
+
onError: onError,
|
|
70
|
+
src: src,
|
|
71
|
+
srcSet: srcSet,
|
|
72
|
+
sizes: sizes,
|
|
73
|
+
style: {
|
|
74
|
+
objectFit: objectFit,
|
|
75
|
+
objectPosition: objectPosition,
|
|
76
|
+
width: width,
|
|
77
|
+
height: height
|
|
78
|
+
}
|
|
79
|
+
})));
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
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;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import DxcImage from "./Image";
|
|
3
|
+
import Title from "../../.storybook/components/Title";
|
|
4
|
+
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
5
|
+
import { DxcFlex, DxcInset, DxcParagraph } from "../main";
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: "Image",
|
|
9
|
+
component: DxcImage,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const Chromatic = () => (
|
|
13
|
+
<>
|
|
14
|
+
<Title title="Image component" theme="light" level={2} />
|
|
15
|
+
<ExampleContainer>
|
|
16
|
+
<Title title="Simple image" theme="light" level={4} />
|
|
17
|
+
<DxcImage
|
|
18
|
+
alt="Example image"
|
|
19
|
+
width="100%"
|
|
20
|
+
src="https://images.ctfassets.net/hrltx12pl8hq/5596z2BCR9KmT1KeRBrOQa/4070fd4e2f1a13f71c2c46afeb18e41c/shutterstock_451077043-hero1.jpg"
|
|
21
|
+
/>
|
|
22
|
+
</ExampleContainer>
|
|
23
|
+
<ExampleContainer>
|
|
24
|
+
<Title title="Image with text" theme="light" level={4} />
|
|
25
|
+
<DxcParagraph>
|
|
26
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
27
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
28
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh tristique
|
|
29
|
+
porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue diam in dui
|
|
30
|
+
morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo nisi. Vel mus
|
|
31
|
+
ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit augue. In fermentum
|
|
32
|
+
metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae. Commodo sagittis
|
|
33
|
+
volutpat id lorem.
|
|
34
|
+
</DxcParagraph>
|
|
35
|
+
<DxcInset top="2rem" bottom="2rem">
|
|
36
|
+
<DxcImage
|
|
37
|
+
alt="Ratatouille is a great movie"
|
|
38
|
+
caption="Ratatouille with a smile on his face."
|
|
39
|
+
src="https://hips.hearstapps.com/es.h-cdn.co/fotoes/images/cinefilia/por-que-ratatouille-nos-sigue-enamorando-10-anos-despues/136444706-1-esl-ES/Por-que-Ratatouille-nos-sigue-enamorando-10-anos-despues.jpg"
|
|
40
|
+
/>
|
|
41
|
+
</DxcInset>
|
|
42
|
+
<DxcParagraph>
|
|
43
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
44
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
45
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh tristique
|
|
46
|
+
porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue diam in dui
|
|
47
|
+
morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo nisi. Vel mus
|
|
48
|
+
ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit augue. In fermentum
|
|
49
|
+
metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae. Commodo sagittis
|
|
50
|
+
volutpat id lorem.
|
|
51
|
+
</DxcParagraph>
|
|
52
|
+
</ExampleContainer>
|
|
53
|
+
<ExampleContainer>
|
|
54
|
+
<Title title="Example image" theme="light" level={4} />
|
|
55
|
+
<DxcFlex gap="1rem">
|
|
56
|
+
<DxcImage
|
|
57
|
+
alt="Camera pic"
|
|
58
|
+
caption="Picture of a camera and the sunset."
|
|
59
|
+
width="500px"
|
|
60
|
+
src="https://assets.entrepreneur.com/content/3x2/2000/20191009140007-GettyImages-1053962188.jpeg"
|
|
61
|
+
/>
|
|
62
|
+
<DxcParagraph>
|
|
63
|
+
Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis volutpat urna. Hendrerit aliquet et
|
|
64
|
+
arcu purus. Sodales elementum sollicitudin consequat elementum tortor. Lectus eget cursus ut ac pharetra
|
|
65
|
+
lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus vitae vitae aenean arcu. Nibh
|
|
66
|
+
tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh est sed. Netus venenatis congue
|
|
67
|
+
diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu nec fringilla enim purus ut justo
|
|
68
|
+
nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper nullam sit sagittis hendrerit
|
|
69
|
+
augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed enim in sed vel nec ut vitae.
|
|
70
|
+
Commodo sagittis volutpat id lorem. Lorem ipsum dolor sit amet consectetur. Tincidunt sed pharetra mollis duis
|
|
71
|
+
volutpat urna. Hendrerit aliquet et arcu purus. Sodales elementum sollicitudin consequat elementum tortor.
|
|
72
|
+
Lectus eget cursus ut ac pharetra lobortis integer eu. Potenti amet ac id risus ac nunc orci nibh. Tempus
|
|
73
|
+
vitae vitae aenean arcu. Nibh tristique porta dui enim eget tristique rutrum. Quisque faucibus suscipit nibh
|
|
74
|
+
est sed. Netus venenatis congue diam in dui morbi dignissim lorem. Urna aliquet sem in tincidunt. Nunc arcu
|
|
75
|
+
nec fringilla enim purus ut justo nisi. Vel mus ut ornare faucibus blandit diam sit vestibulum massa. Semper
|
|
76
|
+
nullam sit sagittis hendrerit augue. In fermentum metus proin arcu faucibus proin nibh sit. Vel integer sed
|
|
77
|
+
enim in sed vel nec ut vitae. Commodo sagittis volutpat id lorem.
|
|
78
|
+
</DxcParagraph>
|
|
79
|
+
</DxcFlex>
|
|
80
|
+
</ExampleContainer>
|
|
81
|
+
<ExampleContainer>
|
|
82
|
+
<Title title="Object position" theme="light" level={4} />
|
|
83
|
+
<DxcImage
|
|
84
|
+
alt="Moon pic"
|
|
85
|
+
caption="Picture of the moon."
|
|
86
|
+
width="250px"
|
|
87
|
+
src="https://interactive-examples.mdn.mozilla.net/media/examples/moon.jpg"
|
|
88
|
+
objectPosition="right top"
|
|
89
|
+
objectFit="none"
|
|
90
|
+
/>
|
|
91
|
+
</ExampleContainer>
|
|
92
|
+
<ExampleContainer>
|
|
93
|
+
<Title title="Object fit: contain" theme="light" level={4} />
|
|
94
|
+
<div style={{ display: "flex", width: "fit-content", border: "1px solid #000", padding: "0.5rem" }}>
|
|
95
|
+
<DxcImage
|
|
96
|
+
alt="Dog pic"
|
|
97
|
+
src="https://cc-prod.scene7.com/is/image/CCProdAuthor/What-is-Stock-Photography_P1_mobile?$pjpeg$&jpegSize=200&wid=720"
|
|
98
|
+
width="200px"
|
|
99
|
+
height="200px"
|
|
100
|
+
objectFit="contain"
|
|
101
|
+
caption="Pretty dog."
|
|
102
|
+
/>
|
|
103
|
+
</div>
|
|
104
|
+
</ExampleContainer>
|
|
105
|
+
<ExampleContainer>
|
|
106
|
+
<Title title="Object fit: cover" theme="light" level={4} />
|
|
107
|
+
<div style={{ width: "75%", height: "300px" }}>
|
|
108
|
+
<DxcImage
|
|
109
|
+
alt="Spaceship pic"
|
|
110
|
+
src="https://media.istockphoto.com/id/1344443930/es/foto/lanzamiento-de-cohetes-del-transbordador-espacial-en-el-cielo-y-nubes-al-espacio-exterior.jpg?s=612x612&w=0&k=20&c=CO2A96GnnWvJsgZuj9WfYCVIBVzicnQDfnzwD1nomN0="
|
|
111
|
+
objectFit="cover"
|
|
112
|
+
width="50%"
|
|
113
|
+
height="100%"
|
|
114
|
+
objectPosition="0px 0px"
|
|
115
|
+
/>
|
|
116
|
+
<DxcImage
|
|
117
|
+
alt="Spaceship pic"
|
|
118
|
+
src="https://media.istockphoto.com/id/1344443930/es/foto/lanzamiento-de-cohetes-del-transbordador-espacial-en-el-cielo-y-nubes-al-espacio-exterior.jpg?s=612x612&w=0&k=20&c=CO2A96GnnWvJsgZuj9WfYCVIBVzicnQDfnzwD1nomN0="
|
|
119
|
+
objectFit="cover"
|
|
120
|
+
width="50%"
|
|
121
|
+
height="100%"
|
|
122
|
+
objectPosition="0px 0px"
|
|
123
|
+
/>
|
|
124
|
+
</div>
|
|
125
|
+
</ExampleContainer>
|
|
126
|
+
</>
|
|
127
|
+
);
|
package/image/types.d.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
/**
|
|
4
|
+
* Alternative text description displayed when the specified image is not loaded.
|
|
5
|
+
*
|
|
6
|
+
* See MDN: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt
|
|
7
|
+
* See W3C alt decision tree: https://www.w3.org/WAI/tutorials/images/decision-tree/
|
|
8
|
+
*/
|
|
9
|
+
alt: string;
|
|
10
|
+
/**
|
|
11
|
+
* Image legend with a descriptive purpose. It is placed below the image and is complementary to the alt attribute,
|
|
12
|
+
* which is required regardless of the presence of the caption or not.
|
|
13
|
+
*/
|
|
14
|
+
caption?: string;
|
|
15
|
+
/**
|
|
16
|
+
* If true, the image will be loaded only when it is visible on the screen (lazy loading).
|
|
17
|
+
* Otherwise and by default, the image will be loaded as soon as the component is mounted (eager loading).
|
|
18
|
+
*/
|
|
19
|
+
lazyLoading?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* URL of the image. This prop is required and must be valid.
|
|
22
|
+
*/
|
|
23
|
+
src: string;
|
|
24
|
+
/**
|
|
25
|
+
* List of one or more strings separated by commas indicating a set of possible images for the user agent to use.
|
|
26
|
+
*
|
|
27
|
+
* See MDN: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/srcset
|
|
28
|
+
*/
|
|
29
|
+
srcSet?: string;
|
|
30
|
+
/**
|
|
31
|
+
* One or more strings separated by commas, indicating a set of source sizes.
|
|
32
|
+
* If the srcSet attribute is absent or contains no values with a width descriptor,
|
|
33
|
+
* then this attribute has no effect.
|
|
34
|
+
*
|
|
35
|
+
* See MDN: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/sizes
|
|
36
|
+
*/
|
|
37
|
+
sizes?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Sets the rendered width of the image.
|
|
40
|
+
*/
|
|
41
|
+
width?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Sets the rendered height of the image.
|
|
44
|
+
*/
|
|
45
|
+
height?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Sets the object-fit CSS property.
|
|
48
|
+
*
|
|
49
|
+
* See MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
|
|
50
|
+
*/
|
|
51
|
+
objectFit?: "contain" | "cover" | "fill" | "none" | "scale-down";
|
|
52
|
+
/**
|
|
53
|
+
* Sets the object-position CSS property.
|
|
54
|
+
*
|
|
55
|
+
* See MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/object-position
|
|
56
|
+
*/
|
|
57
|
+
objectPosition?: string;
|
|
58
|
+
/**
|
|
59
|
+
* This function will be called when the image is loaded.
|
|
60
|
+
*/
|
|
61
|
+
onLoad?: React.ReactEventHandler<HTMLImageElement>;
|
|
62
|
+
/**
|
|
63
|
+
* This function will be called when the image fails to load.
|
|
64
|
+
*/
|
|
65
|
+
onError?: React.ReactEventHandler<HTMLImageElement>;
|
|
66
|
+
};
|
|
67
|
+
export declare type CaptionWrapperProps = {
|
|
68
|
+
condition: boolean;
|
|
69
|
+
wrapper: (children: React.ReactNode) => JSX.Element;
|
|
70
|
+
children: React.ReactNode;
|
|
71
|
+
};
|
|
72
|
+
export default Props;
|
package/inset/Inset.stories.tsx
CHANGED
|
@@ -205,7 +205,7 @@ export const Chromatic = () => (
|
|
|
205
205
|
</Container>
|
|
206
206
|
<Title title="Inside a flex column" level={4} />
|
|
207
207
|
<Container>
|
|
208
|
-
<DxcFlex direction="column" gap="
|
|
208
|
+
<DxcFlex direction="column" gap="1rem">
|
|
209
209
|
<Placeholder></Placeholder>
|
|
210
210
|
<DxcInset top="0.25rem" right="1.5rem" bottom="2rem" left="4rem">
|
|
211
211
|
<Placeholder></Placeholder>
|
|
@@ -225,5 +225,6 @@ const Placeholder = styled.div`
|
|
|
225
225
|
min-height: 40px;
|
|
226
226
|
min-width: 120px;
|
|
227
227
|
border: 1px solid #a46ede;
|
|
228
|
+
border-radius: 0.5rem;
|
|
228
229
|
background-color: #e5d5f6;
|
|
229
230
|
`;
|
|
@@ -3,15 +3,15 @@ import AppLayoutPropsType, { AppLayoutMainPropsType } from "./types";
|
|
|
3
3
|
declare const DxcApplicationLayout: {
|
|
4
4
|
({ visibilityToggleLabel, header, sidenav, footer, children, }: AppLayoutPropsType): JSX.Element;
|
|
5
5
|
Header: {
|
|
6
|
-
({ underlined, content, responsiveContent, onClick, margin,
|
|
7
|
-
Dropdown: (props:
|
|
6
|
+
({ underlined, content, responsiveContent, onClick, margin, tabIndex, }: import("../header/types").default): JSX.Element;
|
|
7
|
+
Dropdown: (props: import("../dropdown/types").default) => JSX.Element;
|
|
8
8
|
};
|
|
9
9
|
Main: ({ children }: AppLayoutMainPropsType) => JSX.Element;
|
|
10
|
-
Footer: ({ socialLinks, bottomLinks, copyright, children,
|
|
10
|
+
Footer: ({ socialLinks, bottomLinks, copyright, children, margin, tabIndex, }: 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;
|
|
14
|
-
Group: ({
|
|
14
|
+
Group: ({ title, collapsable, icon, children }: import("../sidenav/types").SidenavGroupPropsType) => JSX.Element;
|
|
15
15
|
Link: React.ForwardRefExoticComponent<import("../sidenav/types").SidenavLinkPropsType & React.RefAttributes<HTMLAnchorElement>>;
|
|
16
16
|
Title: ({ children }: import("../sidenav/types").SidenavTitlePropsType) => JSX.Element;
|
|
17
17
|
};
|