@dxc-technology/halstack-react 0.0.0-ecc45e2 → 0.0.0-ede733c
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 +1329 -5
- package/HalstackContext.js +117 -77
- package/accordion/Accordion.js +118 -110
- package/accordion/Accordion.stories.tsx +103 -15
- package/accordion/Accordion.test.js +10 -11
- package/accordion/types.d.ts +1 -0
- package/accordion-group/AccordionGroup.d.ts +4 -3
- package/accordion-group/AccordionGroup.js +24 -65
- package/accordion-group/AccordionGroup.stories.tsx +27 -1
- package/accordion-group/AccordionGroup.test.js +21 -46
- package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
- package/accordion-group/AccordionGroupAccordion.js +43 -0
- package/accordion-group/types.d.ts +7 -0
- package/alert/Alert.js +5 -9
- package/alert/Alert.stories.tsx +28 -0
- package/alert/Alert.test.js +1 -1
- package/bleed/Bleed.stories.tsx +1 -0
- package/box/Box.js +4 -6
- package/box/Box.stories.tsx +15 -0
- package/box/Box.test.js +1 -1
- package/box/types.d.ts +1 -0
- 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.js +13 -16
- package/button/Button.stories.tsx +151 -9
- package/button/Button.test.js +1 -1
- package/button/types.d.ts +3 -3
- package/card/Card.js +12 -13
- package/card/Card.stories.tsx +12 -13
- package/card/Card.test.js +1 -1
- package/card/types.d.ts +1 -0
- package/checkbox/Checkbox.d.ts +2 -2
- package/checkbox/Checkbox.js +94 -101
- package/checkbox/Checkbox.stories.tsx +131 -59
- package/checkbox/Checkbox.test.js +94 -17
- package/checkbox/types.d.ts +4 -0
- 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 +1482 -0
- package/common/variables.js +994 -1137
- package/date-input/Calendar.d.ts +4 -0
- package/date-input/Calendar.js +258 -0
- package/date-input/DateInput.js +134 -237
- package/date-input/DateInput.stories.tsx +199 -33
- package/date-input/DateInput.test.js +494 -138
- 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 +51 -0
- package/dialog/Dialog.js +60 -73
- package/dialog/Dialog.stories.tsx +229 -121
- package/dialog/Dialog.test.js +302 -3
- package/dialog/types.d.ts +3 -2
- package/dropdown/Dropdown.js +43 -42
- package/dropdown/Dropdown.stories.tsx +210 -84
- package/dropdown/Dropdown.test.js +22 -27
- package/dropdown/DropdownMenu.js +12 -18
- package/dropdown/DropdownMenuItem.js +5 -18
- package/dropdown/types.d.ts +3 -3
- package/file-input/FileInput.d.ts +2 -2
- package/file-input/FileInput.js +174 -220
- package/file-input/FileInput.stories.tsx +122 -11
- package/file-input/FileInput.test.js +14 -14
- package/file-input/FileItem.d.ts +4 -14
- package/file-input/FileItem.js +39 -63
- package/file-input/types.d.ts +17 -0
- package/flex/Flex.d.ts +1 -1
- package/flex/Flex.js +33 -19
- package/flex/Flex.stories.tsx +35 -26
- package/flex/types.d.ts +83 -7
- package/footer/Footer.js +6 -8
- package/footer/Footer.stories.tsx +99 -1
- package/footer/Footer.test.js +14 -26
- package/footer/types.d.ts +1 -0
- 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 +3 -2
- package/header/Header.js +21 -23
- package/header/Header.stories.tsx +152 -9
- package/header/Header.test.js +2 -2
- package/header/types.d.ts +3 -2
- package/heading/Heading.js +1 -1
- package/heading/Heading.test.js +1 -1
- package/inset/Inset.stories.tsx +2 -1
- package/layout/ApplicationLayout.d.ts +3 -3
- package/layout/ApplicationLayout.js +1 -1
- package/layout/ApplicationLayout.stories.tsx +1 -0
- package/layout/types.d.ts +2 -3
- package/link/Link.js +4 -4
- 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 +3 -2
- package/main.js +9 -1
- package/{tabs-nav → nav-tabs}/NavTabs.js +1 -1
- package/{tabs-nav → nav-tabs}/NavTabs.stories.tsx +96 -6
- package/{tabs-nav → nav-tabs}/NavTabs.test.js +1 -1
- package/{tabs-nav → nav-tabs}/Tab.js +38 -18
- package/nav-tabs/types.js +5 -0
- package/number-input/NumberInput.test.js +44 -8
- package/package.json +15 -20
- 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 +45 -48
- package/paragraph/Paragraph.d.ts +3 -4
- package/paragraph/Paragraph.js +5 -5
- package/password-input/PasswordInput.test.js +14 -13
- 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.js +11 -12
- package/quick-nav/QuickNav.stories.tsx +111 -19
- package/radio-group/Radio.d.ts +1 -1
- package/radio-group/Radio.js +43 -28
- package/radio-group/RadioGroup.js +15 -13
- package/radio-group/RadioGroup.stories.tsx +132 -18
- package/radio-group/RadioGroup.test.js +124 -97
- package/radio-group/types.d.ts +2 -2
- package/resultsetTable/Icons.d.ts +7 -0
- package/resultsetTable/Icons.js +51 -0
- package/resultsetTable/ResultsetTable.js +49 -108
- package/resultsetTable/ResultsetTable.stories.tsx +50 -25
- package/resultsetTable/ResultsetTable.test.js +41 -64
- package/resultsetTable/types.d.ts +1 -1
- package/select/Listbox.d.ts +1 -1
- package/select/Listbox.js +5 -35
- package/select/Option.js +11 -24
- package/select/Select.js +59 -36
- package/select/Select.stories.tsx +494 -150
- package/select/Select.test.js +341 -288
- 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.d.ts +2 -2
- package/slider/Slider.js +119 -95
- package/slider/Slider.stories.tsx +64 -1
- package/slider/Slider.test.js +88 -25
- package/slider/types.d.ts +4 -0
- package/spinner/Spinner.js +17 -23
- package/spinner/Spinner.stories.jsx +53 -27
- package/spinner/Spinner.test.js +1 -1
- package/switch/Switch.d.ts +3 -3
- package/switch/Switch.js +96 -85
- package/switch/Switch.stories.tsx +33 -0
- package/switch/Switch.test.js +27 -14
- package/switch/types.d.ts +8 -3
- package/table/Table.js +3 -3
- package/table/Table.stories.jsx +80 -1
- package/table/Table.test.js +2 -2
- package/tabs/Tab.d.ts +4 -0
- package/tabs/Tab.js +132 -0
- package/tabs/Tabs.js +358 -108
- package/tabs/Tabs.stories.tsx +119 -5
- package/tabs/Tabs.test.js +220 -10
- package/tabs/types.d.ts +12 -2
- package/tag/Tag.js +8 -10
- package/tag/Tag.stories.tsx +14 -1
- package/tag/Tag.test.js +1 -1
- package/text-input/Icons.d.ts +8 -0
- package/text-input/Icons.js +60 -0
- package/text-input/Suggestion.js +40 -11
- package/text-input/Suggestions.d.ts +4 -0
- package/text-input/Suggestions.js +134 -0
- package/text-input/TextInput.js +189 -277
- package/text-input/TextInput.stories.tsx +280 -184
- package/text-input/TextInput.test.js +736 -725
- package/text-input/types.d.ts +21 -2
- 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 +7 -4
- package/toggle-group/ToggleGroup.stories.tsx +42 -0
- package/toggle-group/ToggleGroup.test.js +1 -1
- package/toggle-group/types.d.ts +1 -1
- package/typography/Typography.d.ts +2 -2
- package/typography/Typography.js +14 -113
- package/typography/Typography.stories.tsx +1 -1
- package/useTheme.d.ts +1234 -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/common/RequiredComponent.js +0 -32
- /package/{tabs-nav → grid}/types.js +0 -0
- /package/{tabs-nav → nav-tabs}/NavTabs.d.ts +0 -0
- /package/{tabs-nav → nav-tabs}/Tab.d.ts +0 -0
- /package/{tabs-nav → nav-tabs}/types.d.ts +0 -0
|
@@ -2,14 +2,15 @@ import React from "react";
|
|
|
2
2
|
import DxcFileInput from "./FileInput";
|
|
3
3
|
import Title from "../../.storybook/components/Title";
|
|
4
4
|
import ExampleContainer from "../../.storybook/components/ExampleContainer";
|
|
5
|
+
import FileItem from "./FileItem";
|
|
6
|
+
import { HalstackProvider } from "../HalstackContext";
|
|
5
7
|
|
|
6
8
|
export default {
|
|
7
9
|
title: "File input",
|
|
8
10
|
component: DxcFileInput,
|
|
9
11
|
};
|
|
10
12
|
|
|
11
|
-
const picPreview =
|
|
12
|
-
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABmJLR0QA/wD/AP+gvaeTAAAEDklEQVRogdXaXaxcUxQH8J/etloajVT1I9qgCbdIUB8PXPeKBJHgsV5ExAuVivBUgtSDxgNBVMVHxEeRUhIhkpJ40BYhoTShaQglQtA2VR+ttjMe1j45c6cztzNnzszc+09Ocs/Za+39/++zzt5rr7l0D1diA35P14b0bMJgAE+g2uR6FpP7xq4NZCL2YjlOSNdt6VkVj/eNXYu4VhD9G+c3aL8gtVWS7bjEsfhRCFk2ht2yZPNT8hl3WCUIfoZJY9gdhY+T7QM94NUWFmEfDuHCFuyXJNv9OL2LvNrGO2KGn2rD55nks6ErjAog+8B3YXYbfrPwR/Lt+4d/NLYLMrcW8F+efL/DtBJ5tY17EpEvxEbYLgawJfVxXxObRZhbiF2LWCjfE4Y66OeS1Mc/OLnm+Uw8ggP4oYP+j4hHxUy+VEJfL6e+3hTL8/X4RZ7W/FvCGE1xOdZp7wNvhvny9CULtSo+1QMhZWImPpQL+A03YbouCpkqXn8ZqA+jg1iD41P7NF0QMiAy2N0ipDrFWUa/hU9wXp1N6UIuEktsNug3HfY3gD2pr4rYTxrlZ6UJmY3n0mBZ7JYhhDi3ZP1+i6sb2HQsZBJuEEfUqljjV+Ic5QkhzifZylTF+xisae9IyBIRr1nnb+PU1DaoXCHkk5blXfvxGGYoKGQWnhbpdZb/XFNn0w0hGebgBXm4fY/rtClkOn6Wz8j96Vk9uikkw5DRm2JLQrKV4hB2pr+niJznuPI5toRN4rx/u1jZiLfUMqZiBf4Ss7Bb7Bu1WW0v3kgt5mA17i7iPB8vymN1Cy5Obb0W0jFm4Fd5jFbEfjJsggl5UBDeiLvk4bZP/4RcJj76W1p1OE2sXAfFBkgcotYrL0UpghF5BfOkVhzeTQ5rGrRdIXbiVWWxaxNvCG6vHckwq4jsFPXa8YYF8gPYVc2MaisiN/eGVyGsEBy3C86H4d5k8LliFZFeYSq+FlwP218WiJWpIpbY8Y5heeXllNqGdcqriPQKrwrO67MHZwh1ezGvT6SKIKu8VLCYWGareKgPZEZECrS5oP/Dgvtq2Jpuzi6FWmuYh7XyfK5asJ9zk++X5EWARuePsjEZd9SM+afOhBwjz9TtSDeDY3mUgBH526/gFRHnnQhZLD9NejLdvG7sn8yKoj6MtuLSmvaiQibJ8781RNl+V3rwEZaKpGxKQeIZ6sNoD+5s0G87QqYkbksT1yydWpQZDMl/kS16bawb9AN5GK3VfGnvZMwd0qEv+w+ETTgTN4rEcRAninSgVdTP6oE2fFvFf6JIuA1v4XmRkXQVk+UFhGoacKXDJ6eTj72nmGt0DWCbONdkmDBCMgzjK6MrmAtNQCGUvyH2HfXhNmGFZBgRNYD3Ou3ofwlpcfptqgzTAAAAAElFTkSuQmCC";
|
|
13
|
+
const picPreview = "https://cdn.mos.cms.futurecdn.net/CAZ6JXi6huSuN4QGE627NR.jpg";
|
|
13
14
|
|
|
14
15
|
const file1 = new File(["file1"], "file.pdf", { type: "text/plain" });
|
|
15
16
|
const file2 = new File(["file2"], "file2.mp3", {
|
|
@@ -21,7 +22,7 @@ const file3 = new File(["file3"], "file3.png", {
|
|
|
21
22
|
const file4 = new File(["file4"], "file4file4file4file4file4file4file4file4file4.mp4", {
|
|
22
23
|
type: "video",
|
|
23
24
|
});
|
|
24
|
-
const file5 = new File(["
|
|
25
|
+
const file5 = new File(["file5"], "file5file5file5file5file5file5file5file5file5.mp4", {
|
|
25
26
|
type: "video",
|
|
26
27
|
});
|
|
27
28
|
|
|
@@ -53,7 +54,7 @@ const filesExamples = [
|
|
|
53
54
|
file: file4,
|
|
54
55
|
},
|
|
55
56
|
{
|
|
56
|
-
error: "
|
|
57
|
+
error: "This error message is a multiline paragraph for testing.",
|
|
57
58
|
file: file5,
|
|
58
59
|
},
|
|
59
60
|
{
|
|
@@ -63,19 +64,53 @@ const filesExamples = [
|
|
|
63
64
|
},
|
|
64
65
|
];
|
|
65
66
|
|
|
67
|
+
const opinionatedTheme = {
|
|
68
|
+
fileInput: {
|
|
69
|
+
fontColor: "#000000",
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
|
|
66
73
|
export const Chromatic = () => (
|
|
67
74
|
<>
|
|
75
|
+
<Title title="File item states" theme="light" level={2} />
|
|
68
76
|
<ExampleContainer pseudoState="pseudo-hover">
|
|
69
|
-
<Title title="
|
|
70
|
-
<
|
|
77
|
+
<Title title="Hovered" theme="light" level={4} />
|
|
78
|
+
<FileItem
|
|
79
|
+
fileName="file"
|
|
80
|
+
error=""
|
|
81
|
+
singleFileMode={false}
|
|
82
|
+
showPreview={false}
|
|
83
|
+
preview={picPreview}
|
|
84
|
+
type="image/png"
|
|
85
|
+
onDelete={() => {}}
|
|
86
|
+
tabIndex={0}
|
|
87
|
+
/>
|
|
71
88
|
</ExampleContainer>
|
|
72
89
|
<ExampleContainer pseudoState="pseudo-focus">
|
|
73
|
-
<Title title="
|
|
74
|
-
<
|
|
90
|
+
<Title title="Focused" theme="light" level={4} />
|
|
91
|
+
<FileItem
|
|
92
|
+
fileName="file"
|
|
93
|
+
error=""
|
|
94
|
+
singleFileMode={false}
|
|
95
|
+
showPreview={false}
|
|
96
|
+
preview={picPreview}
|
|
97
|
+
type="image/png"
|
|
98
|
+
onDelete={() => {}}
|
|
99
|
+
tabIndex={0}
|
|
100
|
+
/>
|
|
75
101
|
</ExampleContainer>
|
|
76
102
|
<ExampleContainer pseudoState="pseudo-active">
|
|
77
|
-
<Title title="
|
|
78
|
-
<
|
|
103
|
+
<Title title="Actived" theme="light" level={4} />
|
|
104
|
+
<FileItem
|
|
105
|
+
fileName="file"
|
|
106
|
+
error=""
|
|
107
|
+
singleFileMode={false}
|
|
108
|
+
showPreview={false}
|
|
109
|
+
preview={picPreview}
|
|
110
|
+
type="image/png"
|
|
111
|
+
onDelete={() => {}}
|
|
112
|
+
tabIndex={0}
|
|
113
|
+
/>
|
|
79
114
|
</ExampleContainer>
|
|
80
115
|
<Title title="File" theme="light" level={2} />
|
|
81
116
|
<ExampleContainer>
|
|
@@ -501,7 +536,83 @@ export const Chromatic = () => (
|
|
|
501
536
|
mode="dropzone"
|
|
502
537
|
margin="xxlarge"
|
|
503
538
|
/>
|
|
504
|
-
|
|
539
|
+
</ExampleContainer>
|
|
540
|
+
<Title title="Opinionated theme" theme="light" level={2} />
|
|
541
|
+
<ExampleContainer>
|
|
542
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
543
|
+
<Title title="Single file" theme="light" level={4} />
|
|
544
|
+
<DxcFileInput
|
|
545
|
+
label="File input"
|
|
546
|
+
helperText="Please select files"
|
|
547
|
+
value={fileExample}
|
|
548
|
+
multiple={false}
|
|
549
|
+
callbackFile={() => {}}
|
|
550
|
+
/>
|
|
551
|
+
</HalstackProvider>
|
|
552
|
+
</ExampleContainer>
|
|
553
|
+
<ExampleContainer>
|
|
554
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
555
|
+
<Title title="Invalid single file" theme="light" level={4} />
|
|
556
|
+
<DxcFileInput
|
|
557
|
+
label="File input"
|
|
558
|
+
helperText="Please select files"
|
|
559
|
+
value={fileExampleError}
|
|
560
|
+
multiple={false}
|
|
561
|
+
callbackFile={() => {}}
|
|
562
|
+
/>
|
|
563
|
+
</HalstackProvider>
|
|
564
|
+
</ExampleContainer>
|
|
565
|
+
<ExampleContainer>
|
|
566
|
+
<Title title="Single file" theme="light" level={4} />
|
|
567
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
568
|
+
<DxcFileInput
|
|
569
|
+
mode="filedrop"
|
|
570
|
+
label="File input"
|
|
571
|
+
helperText="Please select files"
|
|
572
|
+
value={fileExample}
|
|
573
|
+
multiple={false}
|
|
574
|
+
callbackFile={() => {}}
|
|
575
|
+
/>
|
|
576
|
+
</HalstackProvider>
|
|
577
|
+
</ExampleContainer>
|
|
578
|
+
<ExampleContainer>
|
|
579
|
+
<Title title="Invalid single file" theme="light" level={4} />
|
|
580
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
581
|
+
<DxcFileInput
|
|
582
|
+
mode="filedrop"
|
|
583
|
+
label="File input"
|
|
584
|
+
helperText="Please select files"
|
|
585
|
+
value={fileExampleError}
|
|
586
|
+
multiple={false}
|
|
587
|
+
callbackFile={() => {}}
|
|
588
|
+
/>
|
|
589
|
+
</HalstackProvider>
|
|
590
|
+
</ExampleContainer>
|
|
591
|
+
<ExampleContainer>
|
|
592
|
+
<Title title="Single file" theme="light" level={4} />
|
|
593
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
594
|
+
<DxcFileInput
|
|
595
|
+
label="File input"
|
|
596
|
+
helperText="Please select files"
|
|
597
|
+
mode="dropzone"
|
|
598
|
+
value={fileExample}
|
|
599
|
+
callbackFile={() => {}}
|
|
600
|
+
multiple={false}
|
|
601
|
+
/>
|
|
602
|
+
</HalstackProvider>
|
|
603
|
+
</ExampleContainer>
|
|
604
|
+
<ExampleContainer>
|
|
605
|
+
<Title title="Invalid single file" theme="light" level={4} />{" "}
|
|
606
|
+
<HalstackProvider theme={opinionatedTheme}>
|
|
607
|
+
<DxcFileInput
|
|
608
|
+
label="File input"
|
|
609
|
+
helperText="Please select files"
|
|
610
|
+
mode="dropzone"
|
|
611
|
+
value={fileExampleError}
|
|
612
|
+
callbackFile={() => {}}
|
|
613
|
+
multiple={false}
|
|
614
|
+
/>
|
|
615
|
+
</HalstackProvider>
|
|
505
616
|
</ExampleContainer>
|
|
506
617
|
</>
|
|
507
618
|
);
|
|
@@ -12,21 +12,21 @@ var _react2 = require("@testing-library/react");
|
|
|
12
12
|
|
|
13
13
|
var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
|
|
14
14
|
|
|
15
|
-
var _FileInput = _interopRequireDefault(require("./FileInput"));
|
|
16
|
-
|
|
15
|
+
var _FileInput = _interopRequireDefault(require("./FileInput.tsx"));
|
|
16
|
+
|
|
17
|
+
var file1 = new File(["file1"], "file1.png", {
|
|
18
|
+
type: "image/png"
|
|
19
|
+
});
|
|
20
|
+
var file2 = new File(["file2"], "file2.txt", {
|
|
21
|
+
type: "text/plain"
|
|
22
|
+
});
|
|
23
|
+
var allFiles = [{
|
|
24
|
+
file: file1
|
|
25
|
+
}, {
|
|
26
|
+
error: "Error message",
|
|
27
|
+
file: file2
|
|
28
|
+
}];
|
|
17
29
|
describe("FileInput component tests", function () {
|
|
18
|
-
var file1 = new File(["file1"], "file1.png", {
|
|
19
|
-
type: "image/png"
|
|
20
|
-
});
|
|
21
|
-
var file2 = new File(["file2"], "file2.txt", {
|
|
22
|
-
type: "text/plain"
|
|
23
|
-
});
|
|
24
|
-
var allFiles = [{
|
|
25
|
-
file: file1
|
|
26
|
-
}, {
|
|
27
|
-
error: "Error message",
|
|
28
|
-
file: file2
|
|
29
|
-
}];
|
|
30
30
|
test("Renders with correct labels and helper text in file mode", function () {
|
|
31
31
|
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_FileInput["default"], {
|
|
32
32
|
label: "File input label",
|
package/file-input/FileItem.d.ts
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
name?: string;
|
|
6
|
-
error?: string;
|
|
7
|
-
showPreview: any;
|
|
8
|
-
preview: any;
|
|
9
|
-
type: any;
|
|
10
|
-
numFiles: any;
|
|
11
|
-
onDelete: any;
|
|
12
|
-
tabIndex: any;
|
|
13
|
-
}) => JSX.Element;
|
|
14
|
-
export default FileItem;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FileItemProps } from "./types";
|
|
3
|
+
declare const _default: React.MemoExoticComponent<({ fileName, error, singleFileMode, showPreview, preview, type, onDelete, tabIndex, }: FileItemProps) => JSX.Element>;
|
|
4
|
+
export default _default;
|
package/file-input/FileItem.js
CHANGED
|
@@ -15,9 +15,13 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
|
|
16
16
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
17
17
|
|
|
18
|
+
var _main = require("../main");
|
|
19
|
+
|
|
18
20
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
19
21
|
|
|
20
|
-
var
|
|
22
|
+
var _useTranslatedLabels = _interopRequireDefault(require("../useTranslatedLabels"));
|
|
23
|
+
|
|
24
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
21
25
|
|
|
22
26
|
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); }
|
|
23
27
|
|
|
@@ -47,103 +51,76 @@ var errorIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
|
47
51
|
}));
|
|
48
52
|
|
|
49
53
|
var FileItem = function FileItem(_ref) {
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
_ref$name = _ref.name,
|
|
53
|
-
name = _ref$name === void 0 ? "" : _ref$name,
|
|
54
|
+
var _ref$fileName = _ref.fileName,
|
|
55
|
+
fileName = _ref$fileName === void 0 ? "" : _ref$fileName,
|
|
54
56
|
_ref$error = _ref.error,
|
|
55
57
|
error = _ref$error === void 0 ? "" : _ref$error,
|
|
58
|
+
singleFileMode = _ref.singleFileMode,
|
|
56
59
|
showPreview = _ref.showPreview,
|
|
57
60
|
preview = _ref.preview,
|
|
58
61
|
type = _ref.type,
|
|
59
|
-
numFiles = _ref.numFiles,
|
|
60
62
|
onDelete = _ref.onDelete,
|
|
61
63
|
tabIndex = _ref.tabIndex;
|
|
62
64
|
var colorsTheme = (0, _useTheme["default"])();
|
|
63
|
-
var
|
|
65
|
+
var translatedLabels = (0, _useTranslatedLabels["default"])();
|
|
64
66
|
|
|
65
67
|
var getIconAriaLabel = function getIconAriaLabel() {
|
|
66
|
-
if (type.includes("video"))
|
|
67
|
-
return "video";
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (type.includes("audio")) {
|
|
71
|
-
return "audio";
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return "file";
|
|
68
|
+
if (type.includes("video")) return "video";else if (type.includes("audio")) return "audio";else return "file";
|
|
75
69
|
};
|
|
76
70
|
|
|
77
71
|
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
78
72
|
theme: colorsTheme.fileInput
|
|
79
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
80
|
-
mode: mode,
|
|
81
|
-
multiple: multiple,
|
|
73
|
+
}, /*#__PURE__*/_react["default"].createElement(MainContainer, {
|
|
82
74
|
error: error,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}, showPreview && (
|
|
75
|
+
singleFileMode: singleFileMode,
|
|
76
|
+
showPreview: showPreview
|
|
77
|
+
}, showPreview && (type.includes("image") ? /*#__PURE__*/_react["default"].createElement(ImagePreview, {
|
|
86
78
|
src: preview,
|
|
87
|
-
alt:
|
|
88
|
-
}) : /*#__PURE__*/_react["default"].createElement(
|
|
79
|
+
alt: fileName
|
|
80
|
+
}) : /*#__PURE__*/_react["default"].createElement(IconPreview, {
|
|
89
81
|
error: error,
|
|
90
82
|
"aria-label": getIconAriaLabel()
|
|
91
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
mode: mode,
|
|
95
|
-
multiple: multiple,
|
|
96
|
-
error: error,
|
|
97
|
-
showPreview: showPreview,
|
|
98
|
-
numFiles: numFiles
|
|
99
|
-
}, name), error && /*#__PURE__*/_react["default"].createElement(ErrorIcon, {
|
|
100
|
-
"aria-label": "Error"
|
|
101
|
-
}, errorIcon), /*#__PURE__*/_react["default"].createElement(DeleteIcon, {
|
|
102
|
-
error: error,
|
|
83
|
+
}, preview)), /*#__PURE__*/_react["default"].createElement(FileItemContent, null, /*#__PURE__*/_react["default"].createElement(FileName, null, fileName), /*#__PURE__*/_react["default"].createElement(_main.DxcFlex, {
|
|
84
|
+
gap: "0.25rem"
|
|
85
|
+
}, error && /*#__PURE__*/_react["default"].createElement(ErrorIcon, null, errorIcon), /*#__PURE__*/_react["default"].createElement(DeleteFileAction, {
|
|
103
86
|
onClick: function onClick() {
|
|
104
|
-
|
|
87
|
+
onDelete(fileName);
|
|
105
88
|
},
|
|
106
|
-
|
|
89
|
+
type: "button",
|
|
90
|
+
title: translatedLabels.fileInput.deleteFileActionTitle,
|
|
91
|
+
"aria-label": translatedLabels.fileInput.deleteFileActionTitle,
|
|
107
92
|
tabIndex: tabIndex
|
|
108
|
-
}, deleteIcon)), error &&
|
|
93
|
+
}, deleteIcon)), error && !singleFileMode && /*#__PURE__*/_react["default"].createElement(ErrorMessage, null, error))));
|
|
109
94
|
};
|
|
110
95
|
|
|
111
|
-
var
|
|
112
|
-
return props.
|
|
113
|
-
}, function (props) {
|
|
114
|
-
return props.error && props.theme.errorFileItemBackgroundColor;
|
|
115
|
-
}, function (props) {
|
|
116
|
-
return props.theme.fileItemBorderRadius;
|
|
96
|
+
var MainContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n gap: 0.75rem;\n width: ", ";\n padding: ", ";\n ", ";\n border-color: ", ";\n border-width: ", ";\n border-style: ", ";\n border-radius: ", ";\n"])), function (props) {
|
|
97
|
+
return props.singleFileMode ? "230px" : "320px";
|
|
117
98
|
}, function (props) {
|
|
118
|
-
return props.
|
|
99
|
+
return props.showPreview ? "calc(8px - ".concat(props.theme.fileItemBorderThickness, ")") : "calc(8px - ".concat(props.theme.fileItemBorderThickness, ") calc(8px - ").concat(props.theme.fileItemBorderThickness, ") calc(8px - ").concat(props.theme.fileItemBorderThickness, ") 16px");
|
|
119
100
|
}, function (props) {
|
|
120
|
-
return props.
|
|
101
|
+
return props.error ? "background-color: ".concat(props.theme.errorFileItemBackgroundColor, ";") : "";
|
|
121
102
|
}, function (props) {
|
|
122
103
|
return props.error ? props.theme.errorFileItemBorderColor : props.theme.fileItemBorderColor;
|
|
123
104
|
}, function (props) {
|
|
124
105
|
return props.theme.fileItemBorderThickness;
|
|
125
106
|
}, function (props) {
|
|
126
107
|
return props.theme.fileItemBorderStyle;
|
|
108
|
+
}, function (props) {
|
|
109
|
+
return props.theme.fileItemBorderRadius;
|
|
127
110
|
});
|
|
128
111
|
|
|
129
|
-
var
|
|
130
|
-
|
|
131
|
-
var FileItemContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n align-items: center;\n"])));
|
|
132
|
-
|
|
133
|
-
var ImagePreview = _styledComponents["default"].img(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n width: 48px;\n height: 48px;\n object-fit: contain;\n margin-right: 12px;\n border-radius: 2px;\n"])));
|
|
112
|
+
var ImagePreview = _styledComponents["default"].img(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n width: 48px;\n height: 48px;\n border-radius: 2px;\n object-fit: contain;\n"])));
|
|
134
113
|
|
|
135
|
-
var
|
|
114
|
+
var IconPreview = _styledComponents["default"].span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ", ";\n width: 48px;\n height: 48px;\n padding: 15px;\n border-radius: 2px;\n color: ", ";\n\n svg {\n height: 18px;\n width: 18px;\n }\n"])), function (props) {
|
|
136
115
|
return props.error ? props.theme.errorFilePreviewBackgroundColor : props.theme.filePreviewBackgroundColor;
|
|
137
116
|
}, function (props) {
|
|
138
117
|
return props.error ? props.theme.errorFilePreviewIconColor : props.theme.filePreviewIconColor;
|
|
139
118
|
});
|
|
140
119
|
|
|
141
|
-
var
|
|
120
|
+
var FileItemContent = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n flex-grow: 1;\n display: grid;\n grid-template-columns: auto min-content;\n grid-template-rows: min-content auto;\n column-gap: 0.25rem;\n"])));
|
|
142
121
|
|
|
143
|
-
var FileName = _styledComponents["default"].span(
|
|
122
|
+
var FileName = _styledComponents["default"].span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n align-self: center;\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (props) {
|
|
144
123
|
return props.theme.fileNameFontColor;
|
|
145
|
-
}, function (props) {
|
|
146
|
-
return props.mode === "file" && !props.multiple && props.error && props.numFiles === 1 ? "calc(230px - 76px)" : props.mode === "file" && !props.multiple && !props.error && props.numFiles === 1 ? "calc(230px - 50px)" : !props.showPreview && !props.error ? "calc(320px - 52px)" : !props.showPreview && props.error ? "calc(320px - 76px)" : props.showPreview && props.error ? "calc(320px - 128px)" : props.showPreview && !props.error && "calc(320px - 102px)";
|
|
147
124
|
}, function (props) {
|
|
148
125
|
return props.theme.fileItemFontFamily;
|
|
149
126
|
}, function (props) {
|
|
@@ -154,9 +131,9 @@ var FileName = _styledComponents["default"].span(_templateObject7 || (_templateO
|
|
|
154
131
|
return props.theme.fileItemLineHeight;
|
|
155
132
|
});
|
|
156
133
|
|
|
157
|
-
var ErrorIcon = _styledComponents["default"].span(
|
|
134
|
+
var ErrorIcon = _styledComponents["default"].span(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n padding: 3px;\n height: 18px;\n width: 18px;\n color: #d0011b;\n"])));
|
|
158
135
|
|
|
159
|
-
var
|
|
136
|
+
var DeleteFileAction = _styledComponents["default"].button(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-wrap: wrap;\n align-content: center;\n height: 24px;\n width: 24px;\n font-size: 1rem;\n font-family: ", ";\n border: 1px solid transparent;\n border-radius: 2px;\n background-color: transparent;\n box-shadow: 0 0 0 2px transparent;\n padding: 3px;\n cursor: pointer;\n color: ", ";\n\n svg {\n line-height: 18px;\n }\n &:hover {\n background-color: ", ";\n }\n &:focus,\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px ", ";\n }\n &:active {\n background-color: ", ";\n }\n"])), function (props) {
|
|
160
137
|
return props.theme.fontFamily;
|
|
161
138
|
}, function (props) {
|
|
162
139
|
return props.theme.deleteFileItemColor;
|
|
@@ -164,13 +141,11 @@ var DeleteIcon = _styledComponents["default"].button(_templateObject9 || (_templ
|
|
|
164
141
|
return props.theme.hoverDeleteFileItemBackgroundColor;
|
|
165
142
|
}, function (props) {
|
|
166
143
|
return props.theme.focusDeleteFileItemBorderColor;
|
|
167
|
-
}, function (props) {
|
|
168
|
-
return props.theme.focusDeleteFileItemBorderColor;
|
|
169
144
|
}, function (props) {
|
|
170
145
|
return props.theme.activeDeleteFileItemBackgroundColor;
|
|
171
146
|
});
|
|
172
147
|
|
|
173
|
-
var ErrorMessage = _styledComponents["default"].span(
|
|
148
|
+
var ErrorMessage = _styledComponents["default"].span(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n line-height: ", ";\n"])), function (props) {
|
|
174
149
|
return props.theme.errorMessageFontColor;
|
|
175
150
|
}, function (props) {
|
|
176
151
|
return props.theme.errorMessageFontFamily;
|
|
@@ -182,5 +157,6 @@ var ErrorMessage = _styledComponents["default"].span(_templateObject10 || (_temp
|
|
|
182
157
|
return props.theme.errorMessageLineHeight;
|
|
183
158
|
});
|
|
184
159
|
|
|
185
|
-
var _default = FileItem;
|
|
160
|
+
var _default = /*#__PURE__*/_react["default"].memo(FileItem);
|
|
161
|
+
|
|
186
162
|
exports["default"] = _default;
|
package/file-input/types.d.ts
CHANGED
|
@@ -108,5 +108,22 @@ declare type FileModeProps = CommonProps & {
|
|
|
108
108
|
*/
|
|
109
109
|
dropAreaLabel?: never;
|
|
110
110
|
};
|
|
111
|
+
/**
|
|
112
|
+
* Reference to the component.
|
|
113
|
+
*/
|
|
114
|
+
export declare type RefType = HTMLDivElement;
|
|
111
115
|
declare type Props = DropModeProps | FileModeProps;
|
|
116
|
+
/**
|
|
117
|
+
* Single file item preview.
|
|
118
|
+
*/
|
|
119
|
+
export declare type FileItemProps = {
|
|
120
|
+
fileName?: string;
|
|
121
|
+
error?: string;
|
|
122
|
+
showPreview: boolean;
|
|
123
|
+
singleFileMode: boolean;
|
|
124
|
+
preview: string;
|
|
125
|
+
type: string;
|
|
126
|
+
onDelete: (fileName: string) => void;
|
|
127
|
+
tabIndex: number;
|
|
128
|
+
};
|
|
112
129
|
export default Props;
|
package/flex/Flex.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import FlexPropsType from "./types";
|
|
3
|
-
declare const DxcFlex: ({ children, ...props }: FlexPropsType) => JSX.Element;
|
|
3
|
+
declare const DxcFlex: ({ direction, wrap, gap, order, grow, shrink, basis, children, ...props }: FlexPropsType) => JSX.Element;
|
|
4
4
|
export default DxcFlex;
|
package/flex/Flex.js
CHANGED
|
@@ -11,6 +11,8 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
|
11
11
|
|
|
12
12
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
13
13
|
|
|
14
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
|
+
|
|
14
16
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
17
|
|
|
16
18
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -19,20 +21,41 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
19
21
|
|
|
20
22
|
var _templateObject;
|
|
21
23
|
|
|
22
|
-
var _excluded = ["children"]
|
|
24
|
+
var _excluded = ["direction", "wrap", "gap", "order", "grow", "shrink", "basis", "children"],
|
|
25
|
+
_excluded2 = ["justifyContent", "alignItems", "alignContent", "alignSelf"];
|
|
23
26
|
|
|
24
27
|
var DxcFlex = function DxcFlex(_ref) {
|
|
25
|
-
var
|
|
28
|
+
var _ref$direction = _ref.direction,
|
|
29
|
+
direction = _ref$direction === void 0 ? "row" : _ref$direction,
|
|
30
|
+
_ref$wrap = _ref.wrap,
|
|
31
|
+
wrap = _ref$wrap === void 0 ? "nowrap" : _ref$wrap,
|
|
32
|
+
_ref$gap = _ref.gap,
|
|
33
|
+
gap = _ref$gap === void 0 ? "0rem" : _ref$gap,
|
|
34
|
+
_ref$order = _ref.order,
|
|
35
|
+
order = _ref$order === void 0 ? 0 : _ref$order,
|
|
36
|
+
_ref$grow = _ref.grow,
|
|
37
|
+
grow = _ref$grow === void 0 ? 0 : _ref$grow,
|
|
38
|
+
_ref$shrink = _ref.shrink,
|
|
39
|
+
shrink = _ref$shrink === void 0 ? 1 : _ref$shrink,
|
|
40
|
+
_ref$basis = _ref.basis,
|
|
41
|
+
basis = _ref$basis === void 0 ? "auto" : _ref$basis,
|
|
42
|
+
children = _ref.children,
|
|
26
43
|
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
27
|
-
return /*#__PURE__*/_react["default"].createElement(Flex,
|
|
44
|
+
return /*#__PURE__*/_react["default"].createElement(Flex, (0, _extends2["default"])({
|
|
45
|
+
$direction: direction,
|
|
46
|
+
$wrap: wrap,
|
|
47
|
+
$order: order,
|
|
48
|
+
$grow: grow,
|
|
49
|
+
$shrink: shrink,
|
|
50
|
+
$basis: basis,
|
|
51
|
+
$gap: gap
|
|
52
|
+
}, props), children);
|
|
28
53
|
};
|
|
29
54
|
|
|
30
55
|
var Flex = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n ", "\n"])), function (_ref2) {
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
wrap = _ref2$wrap === void 0 ? "nowrap" : _ref2$wrap,
|
|
35
|
-
_ref2$justifyContent = _ref2.justifyContent,
|
|
56
|
+
var _props$$gap, _props$$gap$rowGap, _props$$gap$columnGap;
|
|
57
|
+
|
|
58
|
+
var _ref2$justifyContent = _ref2.justifyContent,
|
|
36
59
|
justifyContent = _ref2$justifyContent === void 0 ? "flex-start" : _ref2$justifyContent,
|
|
37
60
|
_ref2$alignItems = _ref2.alignItems,
|
|
38
61
|
alignItems = _ref2$alignItems === void 0 ? "stretch" : _ref2$alignItems,
|
|
@@ -40,17 +63,8 @@ var Flex = _styledComponents["default"].div(_templateObject || (_templateObject
|
|
|
40
63
|
alignContent = _ref2$alignContent === void 0 ? "normal" : _ref2$alignContent,
|
|
41
64
|
_ref2$alignSelf = _ref2.alignSelf,
|
|
42
65
|
alignSelf = _ref2$alignSelf === void 0 ? "auto" : _ref2$alignSelf,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
_ref2$order = _ref2.order,
|
|
46
|
-
order = _ref2$order === void 0 ? 0 : _ref2$order,
|
|
47
|
-
_ref2$grow = _ref2.grow,
|
|
48
|
-
grow = _ref2$grow === void 0 ? 0 : _ref2$grow,
|
|
49
|
-
_ref2$shrink = _ref2.shrink,
|
|
50
|
-
shrink = _ref2$shrink === void 0 ? 1 : _ref2$shrink,
|
|
51
|
-
_ref2$basis = _ref2.basis,
|
|
52
|
-
basis = _ref2$basis === void 0 ? "auto" : _ref2$basis;
|
|
53
|
-
return "\n flex-direction: ".concat(direction, "; \n flex-wrap: ").concat(wrap, "; \n justify-content: ").concat(justifyContent, "; \n align-items: ").concat(alignItems, ";\n align-content: ").concat(alignContent, ";\n align-self: ").concat(alignSelf, ";\n gap: ").concat((0, _typeof2["default"])(gap) === "object" ? "".concat(gap.rowGap, " ").concat(gap.columnGap) : gap, ";\n order: ").concat(order, ";\n flex-grow: ").concat(grow, ";\n flex-shrink: ").concat(shrink, ";\n flex-basis: ").concat(basis, ";\n ");
|
|
66
|
+
props = (0, _objectWithoutProperties2["default"])(_ref2, _excluded2);
|
|
67
|
+
return "\n flex-direction: ".concat(props.$direction, "; \n flex-wrap: ").concat(props.$wrap, "; \n justify-content: ").concat(justifyContent, "; \n align-items: ").concat(alignItems, ";\n align-content: ").concat(alignContent, ";\n align-self: ").concat(alignSelf, ";\n gap: ").concat(props.$gap != null && typeof props.$gap === "string" ? (_props$$gap = props.$gap) !== null && _props$$gap !== void 0 ? _props$$gap : "" : "", "}\n row-gap: ").concat(props.$gap != null && (0, _typeof2["default"])(props.$gap) === "object" ? (_props$$gap$rowGap = props.$gap.rowGap) !== null && _props$$gap$rowGap !== void 0 ? _props$$gap$rowGap : "" : "", "}\n column-gap: ").concat(props.$gap != null && (0, _typeof2["default"])(props.$gap) === "object" ? (_props$$gap$columnGap = props.$gap.columnGap) !== null && _props$$gap$columnGap !== void 0 ? _props$$gap$columnGap : "" : "", "}\n order: ").concat(props.$order, ";\n flex-grow: ").concat(props.$grow, ";\n flex-shrink: ").concat(props.$shrink, ";\n flex-basis: ").concat(props.$basis, ";\n ");
|
|
54
68
|
});
|
|
55
69
|
|
|
56
70
|
var _default = DxcFlex;
|