@dxc-technology/halstack-react 0.0.0-da224ae → 0.0.0-da4b2be
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 +10 -0
- package/BackgroundColorContext.js +2 -5
- package/HalstackContext.d.ts +1336 -0
- package/HalstackContext.js +335 -0
- package/accordion/Accordion.d.ts +1 -1
- package/accordion/Accordion.js +118 -142
- package/accordion/Accordion.stories.tsx +395 -0
- package/accordion/Accordion.test.js +71 -0
- package/accordion/types.d.ts +9 -8
- package/accordion-group/AccordionGroup.d.ts +5 -4
- package/accordion-group/AccordionGroup.js +34 -76
- package/accordion-group/AccordionGroup.stories.tsx +251 -0
- package/accordion-group/AccordionGroup.test.js +126 -0
- package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
- package/accordion-group/AccordionGroupAccordion.js +43 -0
- package/accordion-group/types.d.ts +15 -8
- package/alert/Alert.js +11 -12
- package/alert/Alert.stories.tsx +28 -0
- package/alert/Alert.test.js +92 -0
- package/alert/types.d.ts +1 -1
- package/badge/Badge.d.ts +4 -0
- package/badge/Badge.js +6 -4
- package/badge/types.d.ts +5 -0
- package/bleed/Bleed.d.ts +3 -0
- package/bleed/Bleed.js +51 -0
- package/bleed/Bleed.stories.tsx +342 -0
- package/bleed/types.d.ts +37 -0
- package/bleed/types.js +5 -0
- package/box/Box.d.ts +1 -1
- package/box/Box.js +23 -55
- package/box/Box.stories.tsx +38 -51
- package/box/Box.test.js +18 -0
- package/box/types.d.ts +0 -15
- package/bulleted-list/BulletedList.d.ts +7 -0
- package/bulleted-list/BulletedList.js +125 -0
- package/bulleted-list/BulletedList.stories.tsx +206 -0
- package/bulleted-list/types.d.ts +38 -0
- package/bulleted-list/types.js +5 -0
- package/button/Button.d.ts +1 -1
- package/button/Button.js +61 -85
- package/button/Button.stories.tsx +163 -14
- package/button/Button.test.js +35 -0
- package/button/types.d.ts +8 -12
- package/card/Card.js +35 -40
- package/card/Card.stories.tsx +200 -0
- package/card/Card.test.js +50 -0
- package/card/ice-cream.jpg +0 -0
- package/card/types.d.ts +5 -6
- package/checkbox/Checkbox.d.ts +2 -2
- package/checkbox/Checkbox.js +108 -111
- package/checkbox/Checkbox.stories.tsx +198 -130
- package/checkbox/Checkbox.test.js +155 -0
- package/checkbox/types.d.ts +13 -5
- package/chip/Chip.d.ts +4 -0
- package/chip/Chip.js +37 -118
- package/chip/Chip.stories.tsx +123 -30
- package/chip/Chip.test.js +54 -0
- package/chip/types.d.ts +45 -0
- package/chip/types.js +5 -0
- 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 +1482 -0
- package/common/variables.js +1100 -1316
- package/date-input/Calendar.d.ts +4 -0
- package/date-input/Calendar.js +258 -0
- package/date-input/DateInput.js +174 -266
- package/date-input/DateInput.stories.tsx +199 -33
- package/date-input/DateInput.test.js +835 -0
- package/date-input/DatePicker.d.ts +4 -0
- package/date-input/DatePicker.js +146 -0
- package/date-input/Icons.d.ts +6 -0
- package/date-input/Icons.js +75 -0
- package/date-input/YearPicker.d.ts +4 -0
- package/date-input/YearPicker.js +126 -0
- package/date-input/types.d.ts +67 -9
- package/dialog/Dialog.d.ts +1 -1
- package/dialog/Dialog.js +69 -103
- package/dialog/Dialog.stories.tsx +154 -171
- package/dialog/Dialog.test.js +369 -0
- package/dialog/types.d.ts +0 -12
- package/dropdown/Dropdown.d.ts +1 -1
- package/dropdown/Dropdown.js +248 -277
- package/dropdown/Dropdown.stories.tsx +438 -0
- package/dropdown/Dropdown.test.js +586 -0
- package/dropdown/DropdownMenu.d.ts +4 -0
- package/dropdown/DropdownMenu.js +74 -0
- package/dropdown/DropdownMenuItem.d.ts +4 -0
- package/dropdown/DropdownMenuItem.js +79 -0
- package/dropdown/types.d.ts +28 -17
- package/file-input/FileInput.d.ts +4 -0
- package/file-input/FileInput.js +183 -168
- package/file-input/FileInput.stories.tsx +618 -0
- package/file-input/FileInput.test.js +457 -0
- package/file-input/FileItem.d.ts +4 -0
- package/file-input/FileItem.js +50 -81
- package/file-input/types.d.ts +129 -0
- package/file-input/types.js +5 -0
- package/flex/Flex.d.ts +4 -0
- package/flex/Flex.js +71 -0
- package/flex/Flex.stories.tsx +112 -0
- package/flex/types.d.ts +97 -0
- package/flex/types.js +5 -0
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +34 -117
- package/footer/Footer.stories.tsx +228 -0
- package/footer/Footer.test.js +97 -0
- package/footer/Icons.d.ts +2 -0
- package/footer/Icons.js +4 -4
- package/footer/types.d.ts +23 -18
- 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/grid/types.js +5 -0
- package/header/Header.d.ts +3 -2
- package/header/Header.js +110 -131
- package/header/Header.stories.tsx +315 -0
- package/header/Header.test.js +79 -0
- package/header/Icons.d.ts +2 -0
- package/header/Icons.js +2 -2
- package/header/types.d.ts +5 -2
- package/heading/Heading.js +2 -2
- package/heading/Heading.stories.tsx +54 -0
- package/heading/Heading.test.js +186 -0
- package/inset/Inset.d.ts +3 -0
- package/inset/Inset.js +51 -0
- package/inset/Inset.stories.tsx +230 -0
- package/inset/types.d.ts +37 -0
- package/inset/types.js +5 -0
- package/layout/ApplicationLayout.d.ts +20 -0
- package/layout/ApplicationLayout.js +72 -136
- package/layout/ApplicationLayout.stories.tsx +162 -0
- package/layout/Icons.d.ts +5 -0
- package/layout/Icons.js +13 -2
- package/layout/SidenavContext.d.ts +5 -0
- package/layout/SidenavContext.js +19 -0
- package/layout/types.d.ts +41 -0
- package/layout/types.js +5 -0
- package/link/Link.d.ts +3 -2
- package/link/Link.js +64 -89
- package/link/Link.stories.tsx +199 -16
- package/link/Link.test.js +81 -0
- package/link/types.d.ts +7 -27
- package/main.d.ts +13 -12
- package/main.js +68 -54
- package/nav-tabs/NavTabs.d.ts +8 -0
- package/nav-tabs/NavTabs.js +122 -0
- package/nav-tabs/NavTabs.stories.tsx +274 -0
- package/nav-tabs/NavTabs.test.js +82 -0
- package/nav-tabs/Tab.d.ts +4 -0
- package/nav-tabs/Tab.js +146 -0
- package/nav-tabs/types.d.ts +52 -0
- package/nav-tabs/types.js +5 -0
- package/number-input/NumberInput.js +14 -24
- package/number-input/NumberInput.stories.tsx +5 -5
- package/number-input/NumberInput.test.js +542 -0
- package/number-input/NumberInputContext.d.ts +4 -0
- package/number-input/NumberInputContext.js +5 -2
- package/number-input/numberInputContextTypes.d.ts +19 -0
- package/number-input/numberInputContextTypes.js +5 -0
- package/number-input/types.d.ts +17 -10
- package/package.json +22 -23
- package/paginator/Icons.d.ts +5 -0
- package/paginator/Icons.js +16 -28
- package/paginator/Paginator.js +22 -57
- package/paginator/Paginator.stories.tsx +24 -0
- package/paginator/Paginator.test.js +318 -0
- package/paragraph/Paragraph.d.ts +5 -0
- package/paragraph/Paragraph.js +38 -0
- package/paragraph/Paragraph.stories.tsx +44 -0
- package/password-input/PasswordInput.js +23 -19
- package/password-input/PasswordInput.stories.tsx +3 -3
- package/password-input/PasswordInput.test.js +181 -0
- package/password-input/types.d.ts +29 -19
- package/progress-bar/ProgressBar.js +63 -57
- package/progress-bar/ProgressBar.stories.jsx +47 -12
- package/progress-bar/ProgressBar.test.js +110 -0
- package/quick-nav/QuickNav.d.ts +4 -0
- package/quick-nav/QuickNav.js +117 -0
- package/quick-nav/QuickNav.stories.tsx +356 -0
- package/quick-nav/types.d.ts +21 -0
- package/quick-nav/types.js +5 -0
- package/radio-group/Radio.d.ts +4 -0
- package/radio-group/Radio.js +156 -0
- package/radio-group/RadioGroup.d.ts +4 -0
- package/radio-group/RadioGroup.js +281 -0
- package/radio-group/RadioGroup.stories.tsx +214 -0
- package/radio-group/RadioGroup.test.js +722 -0
- package/radio-group/types.d.ts +114 -0
- package/radio-group/types.js +5 -0
- package/resultsetTable/Icons.d.ts +7 -0
- package/resultsetTable/Icons.js +51 -0
- package/resultsetTable/ResultsetTable.d.ts +4 -0
- package/resultsetTable/ResultsetTable.js +54 -133
- package/resultsetTable/ResultsetTable.stories.tsx +300 -0
- package/resultsetTable/ResultsetTable.test.js +325 -0
- package/resultsetTable/types.d.ts +67 -0
- package/resultsetTable/types.js +5 -0
- package/select/Icons.d.ts +10 -0
- package/select/Icons.js +93 -0
- package/select/Listbox.d.ts +4 -0
- package/select/Listbox.js +169 -0
- package/select/Option.d.ts +4 -0
- package/select/Option.js +97 -0
- package/select/Select.d.ts +4 -0
- package/select/Select.js +202 -401
- package/select/Select.stories.tsx +600 -201
- package/select/Select.test.js +2228 -0
- package/select/types.d.ts +210 -0
- package/select/types.js +5 -0
- package/sidenav/Icons.d.ts +7 -0
- package/sidenav/Icons.js +51 -0
- package/sidenav/Sidenav.d.ts +6 -5
- package/sidenav/Sidenav.js +148 -46
- package/sidenav/Sidenav.stories.tsx +282 -0
- package/sidenav/Sidenav.test.js +44 -0
- package/sidenav/types.d.ts +52 -26
- package/slider/Slider.d.ts +2 -2
- package/slider/Slider.js +124 -99
- package/slider/Slider.stories.tsx +72 -9
- package/slider/Slider.test.js +250 -0
- package/slider/types.d.ts +8 -0
- package/spinner/Spinner.js +20 -26
- package/spinner/Spinner.stories.jsx +53 -26
- package/spinner/Spinner.test.js +64 -0
- package/switch/Switch.d.ts +2 -2
- package/switch/Switch.js +153 -70
- package/switch/Switch.stories.tsx +54 -43
- package/switch/Switch.test.js +225 -0
- package/switch/types.d.ts +10 -2
- package/table/Table.js +6 -6
- package/table/Table.stories.jsx +81 -1
- package/table/Table.test.js +26 -0
- package/tabs/Tab.d.ts +4 -0
- package/tabs/Tab.js +132 -0
- package/tabs/Tabs.d.ts +1 -1
- package/tabs/Tabs.js +362 -112
- package/tabs/Tabs.stories.tsx +226 -0
- package/tabs/Tabs.test.js +350 -0
- package/tabs/types.d.ts +39 -18
- package/tag/Tag.d.ts +1 -1
- package/tag/Tag.js +25 -37
- package/tag/Tag.stories.tsx +38 -28
- package/tag/Tag.test.js +60 -0
- package/tag/types.d.ts +23 -14
- package/text-input/Icons.d.ts +8 -0
- package/text-input/Icons.js +60 -0
- package/text-input/Suggestion.d.ts +4 -0
- package/text-input/Suggestion.js +84 -0
- package/text-input/Suggestions.d.ts +4 -0
- package/text-input/Suggestions.js +134 -0
- package/text-input/TextInput.d.ts +4 -0
- package/text-input/TextInput.js +236 -388
- package/text-input/TextInput.stories.tsx +569 -0
- package/text-input/TextInput.test.js +1723 -0
- package/text-input/types.d.ts +197 -0
- package/text-input/types.js +5 -0
- package/textarea/Textarea.d.ts +4 -0
- package/textarea/Textarea.js +41 -82
- package/textarea/Textarea.stories.jsx +96 -15
- package/textarea/Textarea.test.js +435 -0
- package/textarea/types.d.ts +137 -0
- package/textarea/types.js +5 -0
- package/toggle-group/ToggleGroup.d.ts +4 -0
- package/toggle-group/ToggleGroup.js +24 -49
- package/toggle-group/ToggleGroup.stories.tsx +69 -32
- package/toggle-group/ToggleGroup.test.js +156 -0
- package/toggle-group/types.d.ts +105 -0
- package/toggle-group/types.js +5 -0
- package/typography/Typography.d.ts +4 -0
- package/typography/Typography.js +32 -0
- package/typography/Typography.stories.tsx +198 -0
- package/typography/types.d.ts +18 -0
- package/typography/types.js +5 -0
- package/useTheme.d.ts +1235 -0
- package/useTheme.js +3 -3
- package/useTranslatedLabels.d.ts +85 -0
- package/useTranslatedLabels.js +20 -0
- 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.d.ts +1 -1
- package/wizard/Wizard.js +113 -59
- package/wizard/{Wizard.stories.jsx → Wizard.stories.tsx} +48 -19
- package/wizard/Wizard.test.js +141 -0
- package/wizard/types.d.ts +10 -10
- package/ThemeContext.js +0 -246
- package/V3Select/V3Select.js +0 -455
- package/V3Select/index.d.ts +0 -27
- package/V3Textarea/V3Textarea.js +0 -260
- package/V3Textarea/index.d.ts +0 -27
- package/chip/index.d.ts +0 -22
- package/common/RequiredComponent.js +0 -32
- package/date/Date.js +0 -373
- package/date/index.d.ts +0 -27
- package/file-input/index.d.ts +0 -81
- package/footer/Footer.stories.jsx +0 -151
- package/input-text/Icons.js +0 -22
- package/input-text/InputText.js +0 -611
- package/input-text/index.d.ts +0 -36
- package/radio/Radio.d.ts +0 -4
- package/radio/Radio.js +0 -174
- package/radio/Radio.stories.tsx +0 -192
- package/radio/types.d.ts +0 -54
- package/resultsetTable/index.d.ts +0 -19
- package/select/index.d.ts +0 -131
- package/text-input/index.d.ts +0 -135
- package/textarea/index.d.ts +0 -117
- package/toggle/Toggle.js +0 -186
- package/toggle/index.d.ts +0 -21
- package/toggle-group/index.d.ts +0 -21
- package/upload/Upload.js +0 -201
- package/upload/buttons-upload/ButtonsUpload.js +0 -111
- package/upload/buttons-upload/Icons.js +0 -40
- package/upload/dragAndDropArea/DragAndDropArea.js +0 -225
- package/upload/dragAndDropArea/Icons.js +0 -39
- package/upload/file-upload/FileToUpload.js +0 -115
- package/upload/file-upload/Icons.js +0 -66
- package/upload/files-upload/FilesToUpload.js +0 -109
- package/upload/index.d.ts +0 -15
- package/upload/transaction/Icons.js +0 -160
- package/upload/transaction/Transaction.js +0 -104
- package/upload/transactions/Transactions.js +0 -94
- package/wizard/Icons.js +0 -65
- /package/{radio → badge}/types.js +0 -0
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import Title from "../../.storybook/components/Title";
|
|
4
|
+
import DxcBleed from "./Bleed";
|
|
5
|
+
import DxcFlex from "../flex/Flex";
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: "Bleed",
|
|
9
|
+
component: DxcBleed,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const Chromatic = () => (
|
|
13
|
+
<>
|
|
14
|
+
<Title title="Space = none" theme="light" level={4} />
|
|
15
|
+
<Container>
|
|
16
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
17
|
+
<Placeholder></Placeholder>
|
|
18
|
+
<DxcBleed space="0rem">
|
|
19
|
+
<Placeholder></Placeholder>
|
|
20
|
+
</DxcBleed>
|
|
21
|
+
<Placeholder></Placeholder>
|
|
22
|
+
</DxcFlex>
|
|
23
|
+
</Container>
|
|
24
|
+
<Title title="Space = xxxsmall" theme="light" level={4} />
|
|
25
|
+
<Container>
|
|
26
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
27
|
+
<Placeholder></Placeholder>
|
|
28
|
+
<DxcBleed space="0.125rem">
|
|
29
|
+
<Placeholder></Placeholder>
|
|
30
|
+
</DxcBleed>
|
|
31
|
+
<Placeholder></Placeholder>
|
|
32
|
+
</DxcFlex>
|
|
33
|
+
</Container>
|
|
34
|
+
<Title title="Space = xxsmall" theme="light" level={4} />
|
|
35
|
+
<Container>
|
|
36
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
37
|
+
<Placeholder></Placeholder>
|
|
38
|
+
<DxcBleed space="0.25rem">
|
|
39
|
+
<Placeholder></Placeholder>
|
|
40
|
+
</DxcBleed>
|
|
41
|
+
<Placeholder></Placeholder>
|
|
42
|
+
</DxcFlex>
|
|
43
|
+
</Container>
|
|
44
|
+
<Title title="Space = xsmall" theme="light" level={4} />
|
|
45
|
+
<Container>
|
|
46
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
47
|
+
<Placeholder></Placeholder>
|
|
48
|
+
<DxcBleed space="0.5rem">
|
|
49
|
+
<Placeholder></Placeholder>
|
|
50
|
+
</DxcBleed>
|
|
51
|
+
<Placeholder></Placeholder>
|
|
52
|
+
</DxcFlex>
|
|
53
|
+
</Container>
|
|
54
|
+
<Title title="Space = small" theme="light" level={4} />
|
|
55
|
+
<Container>
|
|
56
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
57
|
+
<Placeholder></Placeholder>
|
|
58
|
+
<DxcBleed space="1rem">
|
|
59
|
+
<Placeholder></Placeholder>
|
|
60
|
+
</DxcBleed>
|
|
61
|
+
<Placeholder></Placeholder>
|
|
62
|
+
</DxcFlex>
|
|
63
|
+
</Container>
|
|
64
|
+
<Title title="Space = medium" theme="light" level={4} />
|
|
65
|
+
<Container>
|
|
66
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
67
|
+
<Placeholder></Placeholder>
|
|
68
|
+
<DxcBleed space="1.5rem">
|
|
69
|
+
<Placeholder></Placeholder>
|
|
70
|
+
</DxcBleed>
|
|
71
|
+
<Placeholder></Placeholder>
|
|
72
|
+
</DxcFlex>
|
|
73
|
+
</Container>
|
|
74
|
+
<Title title="Space = large" theme="light" level={4} />
|
|
75
|
+
<Container>
|
|
76
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
77
|
+
<Placeholder></Placeholder>
|
|
78
|
+
<DxcBleed space="2rem">
|
|
79
|
+
<Placeholder></Placeholder>
|
|
80
|
+
</DxcBleed>
|
|
81
|
+
<Placeholder></Placeholder>
|
|
82
|
+
</DxcFlex>
|
|
83
|
+
</Container>
|
|
84
|
+
<Title title="Space = xlarge" theme="light" level={4} />
|
|
85
|
+
<Container>
|
|
86
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
87
|
+
<Placeholder></Placeholder>
|
|
88
|
+
<DxcBleed space="3rem">
|
|
89
|
+
<Placeholder></Placeholder>
|
|
90
|
+
</DxcBleed>
|
|
91
|
+
<Placeholder></Placeholder>
|
|
92
|
+
</DxcFlex>
|
|
93
|
+
</Container>
|
|
94
|
+
<Title title="Space = xxlarge" theme="light" level={4} />
|
|
95
|
+
<Container>
|
|
96
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
97
|
+
<Placeholder></Placeholder>
|
|
98
|
+
<DxcBleed space="4rem">
|
|
99
|
+
<Placeholder></Placeholder>
|
|
100
|
+
</DxcBleed>
|
|
101
|
+
<Placeholder></Placeholder>
|
|
102
|
+
</DxcFlex>
|
|
103
|
+
</Container>
|
|
104
|
+
<Title title="Space = xxxlarge" theme="light" level={4} />
|
|
105
|
+
<Container>
|
|
106
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
107
|
+
<Placeholder></Placeholder>
|
|
108
|
+
<DxcBleed space="5rem">
|
|
109
|
+
<Placeholder></Placeholder>
|
|
110
|
+
</DxcBleed>
|
|
111
|
+
<Placeholder></Placeholder>
|
|
112
|
+
</DxcFlex>
|
|
113
|
+
</Container>
|
|
114
|
+
|
|
115
|
+
<Title title="Horizontal = none" theme="light" level={4} />
|
|
116
|
+
<Container>
|
|
117
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
118
|
+
<Placeholder></Placeholder>
|
|
119
|
+
<DxcBleed horizontal="0rem">
|
|
120
|
+
<Placeholder></Placeholder>
|
|
121
|
+
</DxcBleed>
|
|
122
|
+
<Placeholder></Placeholder>
|
|
123
|
+
</DxcFlex>
|
|
124
|
+
</Container>
|
|
125
|
+
<Title title="Horizontal = xxxsmall" theme="light" level={4} />
|
|
126
|
+
<Container>
|
|
127
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
128
|
+
<Placeholder></Placeholder>
|
|
129
|
+
<DxcBleed horizontal="0.125rem">
|
|
130
|
+
<Placeholder></Placeholder>
|
|
131
|
+
</DxcBleed>
|
|
132
|
+
<Placeholder></Placeholder>
|
|
133
|
+
</DxcFlex>
|
|
134
|
+
</Container>
|
|
135
|
+
<Title title="Horizontal = xxsmall" theme="light" level={4} />
|
|
136
|
+
<Container>
|
|
137
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
138
|
+
<Placeholder></Placeholder>
|
|
139
|
+
<DxcBleed horizontal="0.25rem">
|
|
140
|
+
<Placeholder></Placeholder>
|
|
141
|
+
</DxcBleed>
|
|
142
|
+
<Placeholder></Placeholder>
|
|
143
|
+
</DxcFlex>
|
|
144
|
+
</Container>
|
|
145
|
+
<Title title="Horizontal = xsmall" theme="light" level={4} />
|
|
146
|
+
<Container>
|
|
147
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
148
|
+
<Placeholder></Placeholder>
|
|
149
|
+
<DxcBleed horizontal="0.5rem">
|
|
150
|
+
<Placeholder></Placeholder>
|
|
151
|
+
</DxcBleed>
|
|
152
|
+
<Placeholder></Placeholder>
|
|
153
|
+
</DxcFlex>
|
|
154
|
+
</Container>
|
|
155
|
+
<Title title="Horizontal = small" theme="light" level={4} />
|
|
156
|
+
<Container>
|
|
157
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
158
|
+
<Placeholder></Placeholder>
|
|
159
|
+
<DxcBleed horizontal="1rem">
|
|
160
|
+
<Placeholder></Placeholder>
|
|
161
|
+
</DxcBleed>
|
|
162
|
+
<Placeholder></Placeholder>
|
|
163
|
+
</DxcFlex>
|
|
164
|
+
</Container>
|
|
165
|
+
<Title title="Horizontal = medium" theme="light" level={4} />
|
|
166
|
+
<Container>
|
|
167
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
168
|
+
<Placeholder></Placeholder>
|
|
169
|
+
<DxcBleed horizontal="1.5rem">
|
|
170
|
+
<Placeholder></Placeholder>
|
|
171
|
+
</DxcBleed>
|
|
172
|
+
<Placeholder></Placeholder>
|
|
173
|
+
</DxcFlex>
|
|
174
|
+
</Container>
|
|
175
|
+
<Title title="Horizontal = large" theme="light" level={4} />
|
|
176
|
+
<Container>
|
|
177
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
178
|
+
<Placeholder></Placeholder>
|
|
179
|
+
<DxcBleed horizontal="2rem">
|
|
180
|
+
<Placeholder></Placeholder>
|
|
181
|
+
</DxcBleed>
|
|
182
|
+
<Placeholder></Placeholder>
|
|
183
|
+
</DxcFlex>
|
|
184
|
+
</Container>
|
|
185
|
+
<Title title="Horizontal = xlarge" theme="light" level={4} />
|
|
186
|
+
<Container>
|
|
187
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
188
|
+
<Placeholder></Placeholder>
|
|
189
|
+
<DxcBleed horizontal="3rem">
|
|
190
|
+
<Placeholder></Placeholder>
|
|
191
|
+
</DxcBleed>
|
|
192
|
+
<Placeholder></Placeholder>
|
|
193
|
+
</DxcFlex>
|
|
194
|
+
</Container>
|
|
195
|
+
<Title title="Horizontal = xxlarge" theme="light" level={4} />
|
|
196
|
+
<Container>
|
|
197
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
198
|
+
<Placeholder></Placeholder>
|
|
199
|
+
<DxcBleed horizontal="4rem">
|
|
200
|
+
<Placeholder></Placeholder>
|
|
201
|
+
</DxcBleed>
|
|
202
|
+
<Placeholder></Placeholder>
|
|
203
|
+
</DxcFlex>
|
|
204
|
+
</Container>
|
|
205
|
+
<Title title="Horizontal = xxxlarge" theme="light" level={4} />
|
|
206
|
+
<Container>
|
|
207
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
208
|
+
<Placeholder></Placeholder>
|
|
209
|
+
<DxcBleed horizontal="5rem">
|
|
210
|
+
<Placeholder></Placeholder>
|
|
211
|
+
</DxcBleed>
|
|
212
|
+
<Placeholder></Placeholder>
|
|
213
|
+
</DxcFlex>
|
|
214
|
+
</Container>
|
|
215
|
+
|
|
216
|
+
<Title title="Vertical = none" theme="light" level={4} />
|
|
217
|
+
<Container>
|
|
218
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
219
|
+
<Placeholder></Placeholder>
|
|
220
|
+
<DxcBleed vertical="0rem">
|
|
221
|
+
<Placeholder></Placeholder>
|
|
222
|
+
</DxcBleed>
|
|
223
|
+
<Placeholder></Placeholder>
|
|
224
|
+
</DxcFlex>
|
|
225
|
+
</Container>
|
|
226
|
+
<Title title="Vertical = xxxsmall" theme="light" level={4} />
|
|
227
|
+
<Container>
|
|
228
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
229
|
+
<Placeholder></Placeholder>
|
|
230
|
+
<DxcBleed vertical="0.125rem">
|
|
231
|
+
<Placeholder></Placeholder>
|
|
232
|
+
</DxcBleed>
|
|
233
|
+
<Placeholder></Placeholder>
|
|
234
|
+
</DxcFlex>
|
|
235
|
+
</Container>
|
|
236
|
+
<Title title="Vertical = xxsmall" theme="light" level={4} />
|
|
237
|
+
<Container>
|
|
238
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
239
|
+
<Placeholder></Placeholder>
|
|
240
|
+
<DxcBleed vertical="0.25rem">
|
|
241
|
+
<Placeholder></Placeholder>
|
|
242
|
+
</DxcBleed>
|
|
243
|
+
<Placeholder></Placeholder>
|
|
244
|
+
</DxcFlex>
|
|
245
|
+
</Container>
|
|
246
|
+
<Title title="Vertical = xsmall" theme="light" level={4} />
|
|
247
|
+
<Container>
|
|
248
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
249
|
+
<Placeholder></Placeholder>
|
|
250
|
+
<DxcBleed vertical="0.5rem">
|
|
251
|
+
<Placeholder></Placeholder>
|
|
252
|
+
</DxcBleed>
|
|
253
|
+
<Placeholder></Placeholder>
|
|
254
|
+
</DxcFlex>
|
|
255
|
+
</Container>
|
|
256
|
+
<Title title="Vertical = small" theme="light" level={4} />
|
|
257
|
+
<Container>
|
|
258
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
259
|
+
<Placeholder></Placeholder>
|
|
260
|
+
<DxcBleed vertical="1rem">
|
|
261
|
+
<Placeholder></Placeholder>
|
|
262
|
+
</DxcBleed>
|
|
263
|
+
<Placeholder></Placeholder>
|
|
264
|
+
</DxcFlex>
|
|
265
|
+
</Container>
|
|
266
|
+
<Title title="Vertical = medium" theme="light" level={4} />
|
|
267
|
+
<Container>
|
|
268
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
269
|
+
<Placeholder></Placeholder>
|
|
270
|
+
<DxcBleed vertical="1.5rem">
|
|
271
|
+
<Placeholder></Placeholder>
|
|
272
|
+
</DxcBleed>
|
|
273
|
+
<Placeholder></Placeholder>
|
|
274
|
+
</DxcFlex>
|
|
275
|
+
</Container>
|
|
276
|
+
<Title title="Vertical = large" theme="light" level={4} />
|
|
277
|
+
<Container>
|
|
278
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
279
|
+
<Placeholder></Placeholder>
|
|
280
|
+
<DxcBleed vertical="2rem">
|
|
281
|
+
<Placeholder></Placeholder>
|
|
282
|
+
</DxcBleed>
|
|
283
|
+
<Placeholder></Placeholder>
|
|
284
|
+
</DxcFlex>
|
|
285
|
+
</Container>
|
|
286
|
+
<Title title="Vertical = xlarge" theme="light" level={4} />
|
|
287
|
+
<Container>
|
|
288
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
289
|
+
<Placeholder></Placeholder>
|
|
290
|
+
<DxcBleed vertical="3rem">
|
|
291
|
+
<Placeholder></Placeholder>
|
|
292
|
+
</DxcBleed>
|
|
293
|
+
<Placeholder></Placeholder>
|
|
294
|
+
</DxcFlex>
|
|
295
|
+
</Container>
|
|
296
|
+
<Title title="Vertical = xxlarge" theme="light" level={4} />
|
|
297
|
+
<Container>
|
|
298
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
299
|
+
<Placeholder></Placeholder>
|
|
300
|
+
<DxcBleed vertical="4rem">
|
|
301
|
+
<Placeholder></Placeholder>
|
|
302
|
+
</DxcBleed>
|
|
303
|
+
<Placeholder></Placeholder>
|
|
304
|
+
</DxcFlex>
|
|
305
|
+
</Container>
|
|
306
|
+
<Title title="Vertical = xxxlarge" theme="light" level={4} />
|
|
307
|
+
<Container>
|
|
308
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
309
|
+
<Placeholder></Placeholder>
|
|
310
|
+
<DxcBleed vertical="5rem">
|
|
311
|
+
<Placeholder></Placeholder>
|
|
312
|
+
</DxcBleed>
|
|
313
|
+
<Placeholder></Placeholder>
|
|
314
|
+
</DxcFlex>
|
|
315
|
+
</Container>
|
|
316
|
+
|
|
317
|
+
<Title title="Top = xsmall, right = small, bottom = medium and left = large" theme="light" level={4} />
|
|
318
|
+
<Container>
|
|
319
|
+
<DxcFlex direction="column" gap="1.5rem">
|
|
320
|
+
<Placeholder></Placeholder>
|
|
321
|
+
<DxcBleed top="0.5rem" right="1rem" bottom="1.5rem" left="2rem">
|
|
322
|
+
<Placeholder></Placeholder>
|
|
323
|
+
</DxcBleed>
|
|
324
|
+
<Placeholder></Placeholder>
|
|
325
|
+
</DxcFlex>
|
|
326
|
+
</Container>
|
|
327
|
+
</>
|
|
328
|
+
);
|
|
329
|
+
|
|
330
|
+
const Container = styled.div`
|
|
331
|
+
background: #f2eafa;
|
|
332
|
+
padding: 5rem;
|
|
333
|
+
margin: 2.5rem;
|
|
334
|
+
`;
|
|
335
|
+
|
|
336
|
+
const Placeholder = styled.div`
|
|
337
|
+
min-height: 40px;
|
|
338
|
+
min-width: 120px;
|
|
339
|
+
border: 1px solid #a46ede;
|
|
340
|
+
border-radius: 0.5rem;
|
|
341
|
+
background-color: #e5d5f6;
|
|
342
|
+
`;
|
package/bleed/types.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Spacing = "0rem" | "0.125rem" | "0.25rem" | "0.5rem" | "1rem" | "1.5rem" | "2rem" | "3rem" | "4rem" | "5rem";
|
|
3
|
+
declare type Props = {
|
|
4
|
+
/**
|
|
5
|
+
* Applies the spacing scale to all sides.
|
|
6
|
+
*/
|
|
7
|
+
space?: Spacing;
|
|
8
|
+
/**
|
|
9
|
+
* Applies the spacing scale to the left and right sides.
|
|
10
|
+
*/
|
|
11
|
+
horizontal?: Spacing;
|
|
12
|
+
/**
|
|
13
|
+
* Applies the spacing scale to the top and bottom sides.
|
|
14
|
+
*/
|
|
15
|
+
vertical?: Spacing;
|
|
16
|
+
/**
|
|
17
|
+
* Applies the spacing scale to the top side.
|
|
18
|
+
*/
|
|
19
|
+
top?: Spacing;
|
|
20
|
+
/**
|
|
21
|
+
* Applies the spacing scale to the right side.
|
|
22
|
+
*/
|
|
23
|
+
right?: Spacing;
|
|
24
|
+
/**
|
|
25
|
+
* Applies the spacing scale to the bottom side.
|
|
26
|
+
*/
|
|
27
|
+
bottom?: Spacing;
|
|
28
|
+
/**
|
|
29
|
+
* Applies the spacing scale to the left side.
|
|
30
|
+
*/
|
|
31
|
+
left?: Spacing;
|
|
32
|
+
/**
|
|
33
|
+
* Custom content inside the bleed.
|
|
34
|
+
*/
|
|
35
|
+
children: React.ReactNode;
|
|
36
|
+
};
|
|
37
|
+
export default Props;
|
package/bleed/types.js
ADDED
package/box/Box.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import BoxPropsType from "./types";
|
|
3
|
-
declare const DxcBox: ({ shadowDepth, display, children, margin,
|
|
3
|
+
declare const DxcBox: ({ shadowDepth, display, children, margin, size, }: BoxPropsType) => JSX.Element;
|
|
4
4
|
export default DxcBox;
|
package/box/Box.js
CHANGED
|
@@ -17,13 +17,13 @@ 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
|
-
var _utils = require("../common/utils
|
|
22
|
+
var _utils = require("../common/utils");
|
|
23
23
|
|
|
24
|
-
var _useTheme = _interopRequireDefault(require("../useTheme
|
|
24
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
25
25
|
|
|
26
|
-
var _BackgroundColorContext = require("../BackgroundColorContext
|
|
26
|
+
var _BackgroundColorContext = require("../BackgroundColorContext");
|
|
27
27
|
|
|
28
28
|
var _templateObject;
|
|
29
29
|
|
|
@@ -38,21 +38,16 @@ var DxcBox = function DxcBox(_ref) {
|
|
|
38
38
|
display = _ref$display === void 0 ? "inline-flex" : _ref$display,
|
|
39
39
|
children = _ref.children,
|
|
40
40
|
margin = _ref.margin,
|
|
41
|
-
padding = _ref.padding,
|
|
42
41
|
_ref$size = _ref.size,
|
|
43
|
-
size = _ref$size === void 0 ? "fitContent" : _ref$size
|
|
44
|
-
_ref$tabIndex = _ref.tabIndex,
|
|
45
|
-
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex;
|
|
42
|
+
size = _ref$size === void 0 ? "fitContent" : _ref$size;
|
|
46
43
|
var colorsTheme = (0, _useTheme["default"])();
|
|
47
44
|
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
48
45
|
theme: colorsTheme.box
|
|
49
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
46
|
+
}, /*#__PURE__*/_react["default"].createElement(Box, {
|
|
50
47
|
shadowDepth: shadowDepth,
|
|
51
48
|
display: display,
|
|
52
49
|
margin: margin,
|
|
53
|
-
|
|
54
|
-
size: size,
|
|
55
|
-
tabIndex: tabIndex
|
|
50
|
+
size: size
|
|
56
51
|
}, /*#__PURE__*/_react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
57
52
|
color: colorsTheme.box.backgroundColor
|
|
58
53
|
}, children)));
|
|
@@ -63,20 +58,15 @@ var sizes = {
|
|
|
63
58
|
medium: "240px",
|
|
64
59
|
large: "480px",
|
|
65
60
|
fillParent: "100%",
|
|
66
|
-
fitContent: "
|
|
61
|
+
fitContent: "fit-content"
|
|
67
62
|
};
|
|
68
63
|
|
|
69
|
-
var calculateWidth = function calculateWidth(margin, size
|
|
70
|
-
|
|
71
|
-
return "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), " -\n ").concat((0, _utils.getMargin)(padding, "left"), " - ").concat((0, _utils.getMargin)(padding, "right"), ")");
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return sizes[size];
|
|
64
|
+
var calculateWidth = function calculateWidth(margin, size) {
|
|
65
|
+
return size === "fillParent" ? "calc(".concat(sizes[size], " - ").concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")") : sizes[size];
|
|
75
66
|
};
|
|
76
67
|
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
return display;
|
|
68
|
+
var Box = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: ", ";\n border-radius: ", ";\n border-width: ", ";\n border-style: ", ";\n border-color: ", ";\n overflow: hidden;\n width: ", ";\n background-color: ", ";\n box-shadow: ", ";\n\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"])), function (props) {
|
|
69
|
+
return props.display;
|
|
80
70
|
}, function (props) {
|
|
81
71
|
return props.theme.borderRadius;
|
|
82
72
|
}, function (props) {
|
|
@@ -86,43 +76,21 @@ var StyledDxcBox = _styledComponents["default"].div(_templateObject || (_templat
|
|
|
86
76
|
}, function (props) {
|
|
87
77
|
return props.theme.borderColor;
|
|
88
78
|
}, function (props) {
|
|
89
|
-
return props.
|
|
90
|
-
}, function (props) {
|
|
91
|
-
return calculateWidth(props.margin, props.size, props.padding);
|
|
79
|
+
return calculateWidth(props.margin, props.size);
|
|
92
80
|
}, function (props) {
|
|
93
81
|
return props.theme.backgroundColor;
|
|
94
82
|
}, function (props) {
|
|
95
83
|
return props.shadowDepth === 1 ? "".concat(props.theme.oneShadowDepthShadowOffsetX, " ").concat(props.theme.oneShadowDepthShadowOffsetY, " ").concat(props.theme.oneShadowDepthShadowBlur, " ").concat(props.theme.oneShadowDepthShadowSpread, " ").concat(props.theme.oneShadowDepthShadowColor) : props.shadowDepth === 2 ? "".concat(props.theme.twoShadowDepthShadowOffsetX, " ").concat(props.theme.twoShadowDepthShadowOffsetY, " ").concat(props.theme.twoShadowDepthShadowBlur, " ").concat(props.theme.twoShadowDepthShadowSpread, " ").concat(props.theme.twoShadowDepthShadowColor) : "".concat(props.theme.noneShadowDepthShadowOffsetX, " ").concat(props.theme.noneShadowDepthShadowOffsetY, " ").concat(props.theme.noneShadowDepthShadowBlur, " ").concat(props.theme.noneShadowDepthShadowSpread, " ").concat(props.theme.noneShadowDepthShadowColor);
|
|
96
|
-
}, function (
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
return margin && margin.
|
|
102
|
-
}, function (
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
var margin = _ref6.margin;
|
|
107
|
-
return margin && margin.bottom ? _variables.spaces[margin.bottom] : "";
|
|
108
|
-
}, function (_ref7) {
|
|
109
|
-
var margin = _ref7.margin;
|
|
110
|
-
return margin && margin.left ? _variables.spaces[margin.left] : "";
|
|
111
|
-
}, function (_ref8) {
|
|
112
|
-
var padding = _ref8.padding;
|
|
113
|
-
return padding && (0, _typeof2["default"])(padding) !== "object" ? _variables.spaces[padding] : "0px";
|
|
114
|
-
}, function (_ref9) {
|
|
115
|
-
var padding = _ref9.padding;
|
|
116
|
-
return padding && padding.top ? _variables.spaces[padding.top] : "";
|
|
117
|
-
}, function (_ref10) {
|
|
118
|
-
var padding = _ref10.padding;
|
|
119
|
-
return padding && padding.right ? _variables.spaces[padding.right] : "";
|
|
120
|
-
}, function (_ref11) {
|
|
121
|
-
var padding = _ref11.padding;
|
|
122
|
-
return padding && padding.bottom ? _variables.spaces[padding.bottom] : "";
|
|
123
|
-
}, function (_ref12) {
|
|
124
|
-
var padding = _ref12.padding;
|
|
125
|
-
return padding && padding.left ? _variables.spaces[padding.left] : "";
|
|
84
|
+
}, function (props) {
|
|
85
|
+
return props.margin && (0, _typeof2["default"])(props.margin) !== "object" ? _variables.spaces[props.margin] : "0px";
|
|
86
|
+
}, function (props) {
|
|
87
|
+
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.top ? _variables.spaces[props.margin.top] : "";
|
|
88
|
+
}, function (props) {
|
|
89
|
+
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.right ? _variables.spaces[props.margin.right] : "";
|
|
90
|
+
}, function (props) {
|
|
91
|
+
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.bottom ? _variables.spaces[props.margin.bottom] : "";
|
|
92
|
+
}, function (props) {
|
|
93
|
+
return props.margin && (0, _typeof2["default"])(props.margin) === "object" && props.margin.left ? _variables.spaces[props.margin.left] : "";
|
|
126
94
|
});
|
|
127
95
|
|
|
128
96
|
var _default = DxcBox;
|
package/box/Box.stories.tsx
CHANGED
|
@@ -2,109 +2,88 @@ import React from "react";
|
|
|
2
2
|
import Title from "../../.storybook/components/Title";
|
|
3
3
|
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
4
4
|
import DxcBox from "./Box";
|
|
5
|
+
import DxcInset from "../inset/Inset";
|
|
6
|
+
import { HalstackProvider } from "../HalstackContext";
|
|
5
7
|
|
|
6
8
|
export default {
|
|
7
9
|
title: "Box ",
|
|
8
10
|
component: DxcBox,
|
|
9
11
|
};
|
|
10
12
|
|
|
13
|
+
const opinionatedTheme = {
|
|
14
|
+
box: {
|
|
15
|
+
baseColor: "#ffffff",
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
11
19
|
export const Chromatic = () => (
|
|
12
20
|
<>
|
|
13
21
|
<Title title="Display flex" theme="light" level={2} />
|
|
14
22
|
<ExampleContainer>
|
|
15
|
-
<DxcBox display="flex"
|
|
16
|
-
Box
|
|
23
|
+
<DxcBox display="flex">
|
|
24
|
+
<DxcInset space="2rem">Box</DxcInset>
|
|
17
25
|
</DxcBox>
|
|
18
26
|
</ExampleContainer>
|
|
19
27
|
<Title title="ShadowDepth" theme="light" level={2} />
|
|
20
28
|
<ExampleContainer>
|
|
21
29
|
<Title title="ShadowDepth 0" theme="light" level={4} />
|
|
22
|
-
<DxcBox shadowDepth={0} margin="medium"
|
|
23
|
-
Box
|
|
30
|
+
<DxcBox shadowDepth={0} margin="medium">
|
|
31
|
+
<DxcInset space="2rem">Box</DxcInset>
|
|
24
32
|
</DxcBox>
|
|
25
33
|
</ExampleContainer>
|
|
26
34
|
<ExampleContainer>
|
|
27
35
|
<Title title="ShadowDepth 1" theme="light" level={4} />
|
|
28
|
-
<DxcBox shadowDepth={1} margin="medium"
|
|
29
|
-
Box
|
|
36
|
+
<DxcBox shadowDepth={1} margin="medium">
|
|
37
|
+
<DxcInset space="2rem">Box</DxcInset>
|
|
30
38
|
</DxcBox>
|
|
31
39
|
</ExampleContainer>
|
|
32
40
|
<ExampleContainer>
|
|
33
41
|
<Title title="ShadowDepth 2" theme="light" level={4} />
|
|
34
|
-
<DxcBox shadowDepth={2} margin="medium"
|
|
35
|
-
Box
|
|
42
|
+
<DxcBox shadowDepth={2} margin="medium">
|
|
43
|
+
<DxcInset space="2rem">Box</DxcInset>
|
|
36
44
|
</DxcBox>
|
|
37
45
|
</ExampleContainer>
|
|
38
|
-
<Title title="Paddings" theme="light" level={2} />
|
|
39
|
-
<ExampleContainer>
|
|
40
|
-
<Title title="Xxsmall padding" theme="light" level={4} />
|
|
41
|
-
<DxcBox padding="xxsmall">Box</DxcBox>
|
|
42
|
-
</ExampleContainer>
|
|
43
|
-
<ExampleContainer>
|
|
44
|
-
<Title title="Xsmall padding" theme="light" level={4} />
|
|
45
|
-
<DxcBox padding="xsmall">Box</DxcBox>
|
|
46
|
-
</ExampleContainer>
|
|
47
|
-
<ExampleContainer>
|
|
48
|
-
<Title title="Small padding" theme="light" level={4} />
|
|
49
|
-
<DxcBox padding="small">Box</DxcBox>
|
|
50
|
-
</ExampleContainer>
|
|
51
|
-
<ExampleContainer>
|
|
52
|
-
<Title title="Medium padding" theme="light" level={4} />
|
|
53
|
-
<DxcBox padding="medium">Box</DxcBox>
|
|
54
|
-
</ExampleContainer>
|
|
55
|
-
<ExampleContainer>
|
|
56
|
-
<Title title="Large padding" theme="light" level={4} />
|
|
57
|
-
<DxcBox padding="large">Box</DxcBox>
|
|
58
|
-
</ExampleContainer>
|
|
59
|
-
<ExampleContainer>
|
|
60
|
-
<Title title="Xlarge padding" theme="light" level={4} />
|
|
61
|
-
<DxcBox padding="xlarge">Box</DxcBox>
|
|
62
|
-
</ExampleContainer>
|
|
63
|
-
<ExampleContainer>
|
|
64
|
-
<Title title="Xxlarge padding" theme="light" level={4} />
|
|
65
|
-
<DxcBox padding="xxlarge">Box</DxcBox>
|
|
66
|
-
</ExampleContainer>
|
|
67
46
|
<Title title="Margins" theme="light" level={2} />
|
|
68
47
|
<ExampleContainer>
|
|
69
48
|
<Title title="Xxsmall margin" theme="light" level={4} />
|
|
70
|
-
<DxcBox margin="xxsmall"
|
|
71
|
-
Box
|
|
49
|
+
<DxcBox margin="xxsmall">
|
|
50
|
+
<DxcInset space="2rem">Box</DxcInset>
|
|
72
51
|
</DxcBox>
|
|
73
52
|
</ExampleContainer>
|
|
74
53
|
<ExampleContainer>
|
|
75
54
|
<Title title="Xsmall margin" theme="light" level={4} />
|
|
76
|
-
<DxcBox margin="xsmall"
|
|
77
|
-
Box
|
|
55
|
+
<DxcBox margin="xsmall">
|
|
56
|
+
<DxcInset space="2rem">Box</DxcInset>
|
|
78
57
|
</DxcBox>
|
|
79
58
|
</ExampleContainer>
|
|
80
59
|
<ExampleContainer>
|
|
81
60
|
<Title title="Small margin" theme="light" level={4} />
|
|
82
|
-
<DxcBox margin="small"
|
|
83
|
-
Box
|
|
61
|
+
<DxcBox margin="small">
|
|
62
|
+
<DxcInset space="2rem">Box</DxcInset>
|
|
84
63
|
</DxcBox>
|
|
85
64
|
</ExampleContainer>
|
|
86
65
|
<ExampleContainer>
|
|
87
66
|
<Title title="Medium margin" theme="light" level={4} />
|
|
88
|
-
<DxcBox margin="medium"
|
|
89
|
-
Box
|
|
67
|
+
<DxcBox margin="medium">
|
|
68
|
+
<DxcInset space="2rem">Box</DxcInset>
|
|
90
69
|
</DxcBox>
|
|
91
70
|
</ExampleContainer>
|
|
92
71
|
<ExampleContainer>
|
|
93
72
|
<Title title="Large margin" theme="light" level={4} />
|
|
94
|
-
<DxcBox margin="large"
|
|
95
|
-
Box
|
|
73
|
+
<DxcBox margin="large">
|
|
74
|
+
<DxcInset space="2rem">Box</DxcInset>
|
|
96
75
|
</DxcBox>
|
|
97
76
|
</ExampleContainer>
|
|
98
77
|
<ExampleContainer>
|
|
99
78
|
<Title title="Xlarge margin" theme="light" level={4} />
|
|
100
|
-
<DxcBox margin="xlarge"
|
|
101
|
-
Box
|
|
79
|
+
<DxcBox margin="xlarge">
|
|
80
|
+
<DxcInset space="2rem">Box</DxcInset>
|
|
102
81
|
</DxcBox>
|
|
103
82
|
</ExampleContainer>
|
|
104
83
|
<ExampleContainer>
|
|
105
84
|
<Title title="Xxlarge margin" theme="light" level={4} />
|
|
106
|
-
<DxcBox margin="xxlarge"
|
|
107
|
-
Box
|
|
85
|
+
<DxcBox margin="xxlarge">
|
|
86
|
+
<DxcInset space="2rem">Box</DxcInset>
|
|
108
87
|
</DxcBox>
|
|
109
88
|
</ExampleContainer>
|
|
110
89
|
<Title title="Sizes" theme="light" level={2} />
|
|
@@ -128,5 +107,13 @@ export const Chromatic = () => (
|
|
|
128
107
|
<Title title="FitContent" theme="light" level={4} />
|
|
129
108
|
<DxcBox size="fitContent">Box</DxcBox>
|
|
130
109
|
</ExampleContainer>
|
|
110
|
+
<Title title="Opinionated theme" theme="light" level={2} />
|
|
111
|
+
<ExampleContainer>
|
|
112
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
113
|
+
<DxcBox display="flex">
|
|
114
|
+
<DxcInset space="2rem">Box</DxcInset>
|
|
115
|
+
</DxcBox>
|
|
116
|
+
</HalstackProvider>
|
|
117
|
+
</ExampleContainer>
|
|
131
118
|
</>
|
|
132
119
|
);
|