@dxc-technology/halstack-react 0.0.0-de7c6b0 → 0.0.0-dec566a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BackgroundColorContext.d.ts +1 -10
- package/BackgroundColorContext.js +4 -21
- package/HalstackContext.d.ts +52 -139
- package/HalstackContext.js +11 -36
- package/README.md +47 -0
- package/accordion/Accordion.js +31 -84
- package/accordion/Accordion.stories.tsx +5 -50
- package/accordion/Accordion.test.js +18 -33
- package/accordion/types.d.ts +6 -6
- package/accordion-group/AccordionGroup.d.ts +2 -3
- package/accordion-group/AccordionGroup.js +17 -44
- package/accordion-group/AccordionGroup.stories.tsx +1 -1
- package/accordion-group/AccordionGroup.test.js +42 -60
- package/accordion-group/AccordionGroupAccordion.js +11 -23
- package/accordion-group/AccordionGroupContext.d.ts +3 -0
- package/accordion-group/AccordionGroupContext.js +8 -0
- package/accordion-group/types.d.ts +7 -7
- package/action-icon/ActionIcon.d.ts +4 -0
- package/action-icon/ActionIcon.js +48 -0
- package/action-icon/ActionIcon.stories.tsx +41 -0
- package/action-icon/ActionIcon.test.js +64 -0
- package/action-icon/types.d.ts +26 -0
- package/alert/Alert.js +29 -118
- package/alert/Alert.test.js +28 -45
- package/alert/types.d.ts +5 -5
- package/badge/Badge.d.ts +1 -1
- package/badge/Badge.js +141 -43
- package/badge/Badge.stories.tsx +210 -0
- package/badge/Badge.test.js +30 -0
- package/badge/types.d.ts +52 -3
- package/bleed/Bleed.js +13 -21
- package/bleed/types.d.ts +2 -2
- package/box/Box.js +11 -33
- package/box/Box.test.js +1 -6
- package/box/types.d.ts +3 -3
- package/bulleted-list/BulletedList.js +22 -55
- package/bulleted-list/BulletedList.stories.tsx +2 -93
- package/bulleted-list/types.d.ts +5 -5
- package/button/Button.d.ts +1 -1
- package/button/Button.js +68 -100
- package/button/Button.stories.tsx +33 -132
- package/button/Button.test.js +19 -16
- package/button/types.d.ts +9 -5
- package/card/Card.js +21 -44
- package/card/Card.test.js +10 -21
- package/card/types.d.ts +5 -5
- package/checkbox/Checkbox.js +85 -120
- package/checkbox/Checkbox.stories.tsx +16 -54
- package/checkbox/Checkbox.test.js +107 -63
- package/checkbox/types.d.ts +8 -4
- package/chip/Chip.js +12 -31
- package/chip/Chip.stories.tsx +1 -1
- package/chip/Chip.test.js +15 -28
- package/chip/types.d.ts +4 -4
- package/common/coreTokens.d.ts +105 -14
- package/common/coreTokens.js +41 -24
- package/common/utils.js +2 -8
- package/common/variables.d.ts +52 -139
- package/common/variables.js +63 -157
- package/container/Container.d.ts +4 -0
- package/container/Container.js +194 -0
- package/container/Container.stories.tsx +214 -0
- package/container/types.d.ts +74 -0
- package/contextual-menu/ContextualMenu.d.ts +7 -0
- package/contextual-menu/ContextualMenu.js +71 -0
- package/contextual-menu/ContextualMenu.stories.tsx +182 -0
- package/contextual-menu/ContextualMenu.test.js +71 -0
- package/contextual-menu/MenuItemAction.d.ts +4 -0
- package/contextual-menu/MenuItemAction.js +46 -0
- package/contextual-menu/types.d.ts +22 -0
- package/contextual-menu/types.js +5 -0
- package/date-input/Calendar.js +15 -59
- package/date-input/DateInput.js +50 -96
- package/date-input/DateInput.stories.tsx +11 -30
- package/date-input/DateInput.test.js +674 -701
- package/date-input/DatePicker.js +11 -42
- package/date-input/Icons.d.ts +6 -6
- package/date-input/Icons.js +6 -23
- package/date-input/YearPicker.js +8 -34
- package/date-input/types.d.ts +28 -22
- package/dialog/Dialog.js +13 -40
- package/dialog/Dialog.stories.tsx +170 -0
- package/dialog/Dialog.test.js +125 -187
- package/dialog/types.d.ts +18 -13
- package/divider/Divider.d.ts +4 -0
- package/divider/Divider.js +36 -0
- package/divider/Divider.stories.tsx +223 -0
- package/divider/Divider.test.js +38 -0
- package/divider/types.d.ts +21 -0
- package/divider/types.js +5 -0
- package/dropdown/Dropdown.js +59 -128
- package/dropdown/Dropdown.stories.tsx +5 -16
- package/dropdown/Dropdown.test.js +391 -378
- package/dropdown/DropdownMenu.js +8 -19
- package/dropdown/DropdownMenuItem.js +11 -20
- package/dropdown/types.d.ts +20 -24
- package/file-input/FileInput.js +180 -248
- package/file-input/FileInput.stories.tsx +1 -1
- package/file-input/FileInput.test.js +356 -354
- package/file-input/FileItem.js +14 -41
- package/file-input/types.d.ts +10 -10
- package/flex/Flex.js +25 -39
- package/flex/types.d.ts +6 -6
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +70 -102
- package/footer/Footer.stories.tsx +37 -6
- package/footer/Footer.test.js +21 -33
- package/footer/Icons.d.ts +3 -2
- package/footer/Icons.js +66 -7
- package/footer/types.d.ts +25 -21
- package/grid/Grid.d.ts +1 -1
- package/grid/Grid.js +2 -17
- package/grid/Grid.stories.tsx +38 -38
- package/grid/types.d.ts +10 -10
- package/header/Header.d.ts +1 -1
- package/header/Header.js +28 -84
- package/header/Header.test.js +12 -25
- package/header/Icons.d.ts +2 -2
- package/header/Icons.js +2 -7
- package/header/types.d.ts +7 -8
- package/heading/Heading.js +9 -31
- package/heading/Heading.test.js +70 -87
- package/heading/types.d.ts +7 -7
- package/icon/Icon.d.ts +4 -0
- package/icon/Icon.js +33 -0
- package/icon/Icon.stories.tsx +28 -0
- package/icon/types.d.ts +4 -0
- package/icon/types.js +5 -0
- package/image/Image.d.ts +4 -0
- package/image/Image.js +70 -0
- package/image/Image.stories.tsx +129 -0
- package/image/types.d.ts +72 -0
- package/image/types.js +5 -0
- package/inset/Inset.js +13 -21
- package/inset/types.d.ts +2 -2
- package/layout/ApplicationLayout.d.ts +2 -2
- package/layout/ApplicationLayout.js +29 -66
- package/layout/ApplicationLayout.stories.tsx +1 -1
- package/layout/Icons.d.ts +8 -5
- package/layout/Icons.js +51 -59
- package/layout/types.d.ts +3 -3
- package/link/Link.js +21 -42
- package/link/Link.test.js +23 -41
- package/link/types.d.ts +14 -14
- package/main.d.ts +8 -4
- package/main.js +39 -59
- package/nav-tabs/NavTabs.d.ts +1 -2
- package/nav-tabs/NavTabs.js +19 -48
- package/nav-tabs/NavTabs.stories.tsx +7 -5
- package/nav-tabs/NavTabs.test.js +38 -44
- package/nav-tabs/NavTabsContext.d.ts +3 -0
- package/nav-tabs/NavTabsContext.js +8 -0
- package/nav-tabs/Tab.js +24 -52
- package/nav-tabs/types.d.ts +9 -9
- package/number-input/NumberInput.js +46 -36
- package/number-input/NumberInput.stories.tsx +42 -26
- package/number-input/NumberInput.test.js +859 -412
- package/number-input/NumberInputContext.d.ts +3 -4
- package/number-input/NumberInputContext.js +3 -14
- package/number-input/types.d.ts +17 -5
- package/package.json +30 -28
- package/paginator/Icons.d.ts +5 -5
- package/paginator/Icons.js +5 -19
- package/paginator/Paginator.js +15 -43
- package/paginator/Paginator.test.js +224 -207
- package/paginator/types.d.ts +3 -3
- package/paragraph/Paragraph.js +3 -19
- package/paragraph/Paragraph.stories.tsx +0 -17
- package/password-input/Icons.d.ts +6 -0
- package/password-input/Icons.js +35 -0
- package/password-input/PasswordInput.js +57 -126
- package/password-input/PasswordInput.stories.tsx +1 -33
- package/password-input/PasswordInput.test.js +157 -140
- package/password-input/types.d.ts +8 -7
- package/progress-bar/ProgressBar.js +21 -53
- package/progress-bar/{ProgressBar.stories.jsx → ProgressBar.stories.tsx} +1 -1
- package/progress-bar/ProgressBar.test.js +35 -52
- package/progress-bar/types.d.ts +3 -3
- package/quick-nav/QuickNav.js +4 -27
- package/quick-nav/QuickNav.stories.tsx +1 -1
- package/quick-nav/types.d.ts +10 -10
- package/radio-group/Radio.d.ts +1 -1
- package/radio-group/Radio.js +22 -54
- package/radio-group/RadioGroup.js +37 -83
- package/radio-group/RadioGroup.stories.tsx +10 -10
- package/radio-group/RadioGroup.test.js +504 -470
- package/radio-group/types.d.ts +8 -8
- package/resultset-table/Icons.d.ts +7 -0
- package/{resultsetTable → resultset-table}/Icons.js +1 -5
- package/resultset-table/ResultsetTable.d.ts +7 -0
- package/{resultsetTable → resultset-table}/ResultsetTable.js +44 -69
- package/{resultsetTable → resultset-table}/ResultsetTable.stories.tsx +106 -5
- package/{resultsetTable → resultset-table}/ResultsetTable.test.js +148 -92
- package/{resultsetTable → resultset-table}/types.d.ts +44 -11
- package/resultset-table/types.js +5 -0
- package/select/Icons.d.ts +7 -7
- package/select/Icons.js +1 -5
- package/select/Listbox.js +13 -39
- package/select/Option.js +17 -27
- package/select/Select.js +87 -163
- package/select/Select.stories.tsx +3 -3
- package/select/Select.test.js +1946 -1804
- package/select/types.d.ts +14 -15
- package/sidenav/Icons.d.ts +4 -4
- package/sidenav/Icons.js +1 -5
- package/sidenav/Sidenav.js +29 -70
- package/sidenav/Sidenav.test.js +3 -10
- package/{layout → sidenav}/SidenavContext.d.ts +1 -1
- package/{layout → sidenav}/SidenavContext.js +3 -9
- package/sidenav/types.d.ts +18 -18
- package/slider/Slider.js +68 -125
- package/slider/Slider.test.js +107 -103
- package/slider/types.d.ts +4 -4
- package/spinner/Spinner.js +16 -54
- package/spinner/Spinner.test.js +25 -34
- package/spinner/types.d.ts +3 -3
- package/status-light/StatusLight.d.ts +4 -0
- package/status-light/StatusLight.js +51 -0
- package/status-light/StatusLight.stories.tsx +74 -0
- package/status-light/StatusLight.test.js +25 -0
- package/status-light/types.d.ts +17 -0
- package/status-light/types.js +5 -0
- package/switch/Switch.js +49 -97
- package/switch/Switch.stories.tsx +0 -34
- package/switch/Switch.test.js +51 -96
- package/switch/types.d.ts +4 -4
- package/table/DropdownTheme.js +62 -0
- package/table/Table.d.ts +6 -2
- package/table/Table.js +76 -33
- package/table/{Table.stories.jsx → Table.stories.tsx} +297 -2
- package/table/Table.test.js +93 -6
- package/table/types.d.ts +34 -6
- package/tabs/Tab.js +17 -33
- package/tabs/Tabs.js +52 -129
- package/tabs/Tabs.stories.tsx +1 -1
- package/tabs/Tabs.test.js +62 -118
- package/tabs/types.d.ts +19 -19
- package/tag/Tag.js +21 -51
- package/tag/Tag.test.js +19 -30
- package/tag/types.d.ts +7 -7
- package/text-input/Suggestion.js +9 -26
- package/text-input/Suggestions.d.ts +1 -1
- package/text-input/Suggestions.js +19 -67
- package/text-input/TextInput.js +221 -327
- package/text-input/TextInput.stories.tsx +49 -153
- package/text-input/TextInput.test.js +1227 -1194
- package/text-input/types.d.ts +25 -17
- package/textarea/Textarea.js +67 -109
- package/textarea/{Textarea.stories.jsx → Textarea.stories.tsx} +58 -100
- package/textarea/Textarea.test.js +150 -179
- package/textarea/types.d.ts +9 -5
- package/toggle-group/ToggleGroup.js +90 -107
- package/toggle-group/ToggleGroup.stories.tsx +7 -4
- package/toggle-group/ToggleGroup.test.js +68 -87
- package/toggle-group/types.d.ts +26 -17
- package/typography/Typography.js +4 -13
- package/typography/types.d.ts +1 -1
- package/useTheme.d.ts +49 -136
- package/useTheme.js +1 -8
- package/useTranslatedLabels.js +1 -7
- package/utils/BaseTypography.d.ts +2 -2
- package/utils/BaseTypography.js +16 -30
- package/utils/FocusLock.js +25 -39
- package/wizard/Wizard.js +14 -49
- package/wizard/Wizard.test.js +53 -80
- package/wizard/types.d.ts +7 -7
- package/common/OpenSans.css +0 -69
- package/common/fonts/OpenSans-Bold.ttf +0 -0
- package/common/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/common/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/common/fonts/OpenSans-Italic.ttf +0 -0
- package/common/fonts/OpenSans-Light.ttf +0 -0
- package/common/fonts/OpenSans-LightItalic.ttf +0 -0
- package/common/fonts/OpenSans-Regular.ttf +0 -0
- package/common/fonts/OpenSans-SemiBold.ttf +0 -0
- package/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- package/number-input/numberInputContextTypes.d.ts +0 -19
- package/resultsetTable/Icons.d.ts +0 -7
- package/resultsetTable/ResultsetTable.d.ts +0 -4
- package/slider/Slider.stories.tsx +0 -240
- package/text-input/Icons.d.ts +0 -8
- package/text-input/Icons.js +0 -60
- /package/{resultsetTable → action-icon}/types.js +0 -0
- /package/{number-input/numberInputContextTypes.js → container/types.js} +0 -0
- /package/spinner/{Spinner.stories.jsx → Spinner.stories.tsx} +0 -0
package/switch/Switch.test.js
CHANGED
|
@@ -1,186 +1,143 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _react = _interopRequireDefault(require("react"));
|
|
6
|
-
|
|
7
5
|
var _react2 = require("@testing-library/react");
|
|
8
|
-
|
|
9
6
|
var _Switch = _interopRequireDefault(require("./Switch.tsx"));
|
|
10
|
-
|
|
11
7
|
describe("Switch component tests", function () {
|
|
12
8
|
test("Switch renders with correct text", function () {
|
|
13
9
|
var onChange = jest.fn(function (returnedValue) {
|
|
14
10
|
expect(returnedValue).toBe(true);
|
|
15
11
|
});
|
|
16
|
-
|
|
17
12
|
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
label: "SwitchComponent",
|
|
14
|
+
checked: false,
|
|
15
|
+
onChange: onChange
|
|
16
|
+
})),
|
|
17
|
+
getByText = _render.getByText;
|
|
24
18
|
expect(getByText("SwitchComponent")).toBeTruthy();
|
|
25
19
|
});
|
|
26
20
|
test("Calls correct function on click", function () {
|
|
27
21
|
var onChange = jest.fn();
|
|
28
|
-
|
|
29
22
|
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
23
|
+
label: "SwitchComponent",
|
|
24
|
+
checked: false,
|
|
25
|
+
onChange: onChange
|
|
26
|
+
})),
|
|
27
|
+
getByText = _render2.getByText;
|
|
36
28
|
_react2.fireEvent.click(getByText("SwitchComponent"));
|
|
37
|
-
|
|
38
29
|
expect(onChange).toHaveBeenCalled();
|
|
39
30
|
});
|
|
40
31
|
test("Calls correct function on key down", function () {
|
|
41
32
|
var onChange = jest.fn();
|
|
42
|
-
|
|
43
33
|
var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
34
|
+
label: "SwitchComponent",
|
|
35
|
+
checked: false,
|
|
36
|
+
onChange: onChange
|
|
37
|
+
})),
|
|
38
|
+
getByText = _render3.getByText;
|
|
50
39
|
_react2.fireEvent.focus(getByText("SwitchComponent"));
|
|
51
|
-
|
|
52
40
|
_react2.fireEvent.keyDown(getByText("SwitchComponent"), {
|
|
53
41
|
key: "Enter"
|
|
54
42
|
});
|
|
55
|
-
|
|
56
43
|
expect(onChange).toHaveBeenCalled();
|
|
57
|
-
|
|
58
44
|
_react2.fireEvent.keyDown(getByText("SwitchComponent"), {
|
|
59
45
|
key: " "
|
|
60
46
|
});
|
|
61
|
-
|
|
62
47
|
expect(onChange).toHaveBeenCalled();
|
|
63
48
|
});
|
|
64
49
|
test("Everytime the user clicks the component the onchange function is called with the correct value CONTROLLED COMPONENT", function () {
|
|
65
50
|
var onChange = jest.fn();
|
|
66
|
-
|
|
67
51
|
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
52
|
+
label: "SwitchComponent",
|
|
53
|
+
checked: false,
|
|
54
|
+
onChange: onChange
|
|
55
|
+
})),
|
|
56
|
+
getByText = _render4.getByText;
|
|
74
57
|
_react2.fireEvent.click(getByText("SwitchComponent"));
|
|
75
|
-
|
|
76
58
|
_react2.fireEvent.click(getByText("SwitchComponent"));
|
|
77
|
-
|
|
78
59
|
expect(onChange.mock.calls[0][0]).toBe(true);
|
|
79
60
|
expect(onChange.mock.calls[1][0]).toBe(true);
|
|
80
61
|
});
|
|
81
62
|
test("Everytime the user use enter in the component, the onchange function is called with the correct value CONTROLLED COMPONENT", function () {
|
|
82
63
|
var onChange = jest.fn();
|
|
83
|
-
|
|
84
64
|
var _render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
65
|
+
label: "SwitchComponent",
|
|
66
|
+
checked: false,
|
|
67
|
+
onChange: onChange
|
|
68
|
+
})),
|
|
69
|
+
getByText = _render5.getByText;
|
|
91
70
|
_react2.fireEvent.focus(getByText("SwitchComponent"));
|
|
92
|
-
|
|
93
71
|
_react2.fireEvent.keyDown(getByText("SwitchComponent"), {
|
|
94
72
|
key: "Enter"
|
|
95
73
|
});
|
|
96
|
-
|
|
97
74
|
_react2.fireEvent.keyDown(getByText("SwitchComponent"), {
|
|
98
75
|
key: "Enter"
|
|
99
76
|
});
|
|
100
|
-
|
|
101
77
|
expect(onChange.mock.calls[0][0]).toBe(true);
|
|
102
78
|
expect(onChange.mock.calls[1][0]).toBe(true);
|
|
103
79
|
});
|
|
104
80
|
test("Everytime the user use space in the component, the onchange function is called with the correct value CONTROLLED COMPONENT", function () {
|
|
105
81
|
var onChange = jest.fn();
|
|
106
|
-
|
|
107
82
|
var _render6 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
83
|
+
label: "SwitchComponent",
|
|
84
|
+
checked: false,
|
|
85
|
+
onChange: onChange
|
|
86
|
+
})),
|
|
87
|
+
getByText = _render6.getByText;
|
|
114
88
|
_react2.fireEvent.focus(getByText("SwitchComponent"));
|
|
115
|
-
|
|
116
89
|
_react2.fireEvent.keyDown(getByText("SwitchComponent"), {
|
|
117
90
|
key: " "
|
|
118
91
|
});
|
|
119
|
-
|
|
120
92
|
_react2.fireEvent.keyDown(getByText("SwitchComponent"), {
|
|
121
93
|
key: " "
|
|
122
94
|
});
|
|
123
|
-
|
|
124
95
|
expect(onChange.mock.calls[0][0]).toBe(true);
|
|
125
96
|
expect(onChange.mock.calls[1][0]).toBe(true);
|
|
126
97
|
});
|
|
127
98
|
test("Everytime the user clicks the component the onchange function is called with the correct value UNCONTROLLED COMPONENT", function () {
|
|
128
99
|
var onChange = jest.fn();
|
|
129
|
-
|
|
130
100
|
var _render7 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
101
|
+
label: "SwitchComponent",
|
|
102
|
+
onChange: onChange
|
|
103
|
+
})),
|
|
104
|
+
getByText = _render7.getByText;
|
|
136
105
|
_react2.fireEvent.click(getByText("SwitchComponent"));
|
|
137
|
-
|
|
138
106
|
_react2.fireEvent.click(getByText("SwitchComponent"));
|
|
139
|
-
|
|
140
107
|
expect(onChange.mock.calls[0][0]).toBe(true);
|
|
141
108
|
expect(onChange.mock.calls[1][0]).toBe(false);
|
|
142
109
|
});
|
|
143
110
|
test("Everytime the user use enter in the component, the onchange function is called with the correct value UNCONTROLLED COMPONENT", function () {
|
|
144
111
|
var onChange = jest.fn();
|
|
145
|
-
|
|
146
112
|
var _render8 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
113
|
+
label: "SwitchComponent",
|
|
114
|
+
onChange: onChange
|
|
115
|
+
})),
|
|
116
|
+
getByText = _render8.getByText;
|
|
152
117
|
_react2.fireEvent.focus(getByText("SwitchComponent"));
|
|
153
|
-
|
|
154
118
|
_react2.fireEvent.keyDown(getByText("SwitchComponent"), {
|
|
155
119
|
key: "Enter"
|
|
156
120
|
});
|
|
157
|
-
|
|
158
121
|
_react2.fireEvent.keyDown(getByText("SwitchComponent"), {
|
|
159
122
|
key: "Enter"
|
|
160
123
|
});
|
|
161
|
-
|
|
162
124
|
expect(onChange.mock.calls[0][0]).toBe(true);
|
|
163
125
|
expect(onChange.mock.calls[1][0]).toBe(false);
|
|
164
126
|
});
|
|
165
127
|
test("Everytime the user use space in the component, the onchange function is called with the correct value UNCONTROLLED COMPONENT", function () {
|
|
166
128
|
var onChange = jest.fn();
|
|
167
|
-
|
|
168
129
|
var _render9 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
130
|
+
label: "SwitchComponent",
|
|
131
|
+
onChange: onChange
|
|
132
|
+
})),
|
|
133
|
+
getByText = _render9.getByText;
|
|
174
134
|
_react2.fireEvent.focus(getByText("SwitchComponent"));
|
|
175
|
-
|
|
176
135
|
_react2.fireEvent.keyDown(getByText("SwitchComponent"), {
|
|
177
136
|
key: " "
|
|
178
137
|
});
|
|
179
|
-
|
|
180
138
|
_react2.fireEvent.keyDown(getByText("SwitchComponent"), {
|
|
181
139
|
key: " "
|
|
182
140
|
});
|
|
183
|
-
|
|
184
141
|
expect(onChange.mock.calls[0][0]).toBe(true);
|
|
185
142
|
expect(onChange.mock.calls[1][0]).toBe(false);
|
|
186
143
|
});
|
|
@@ -198,11 +155,10 @@ describe("Switch component tests", function () {
|
|
|
198
155
|
});
|
|
199
156
|
test("Renders with correct aria attributes", function () {
|
|
200
157
|
var _render10 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
158
|
+
label: "Default label"
|
|
159
|
+
})),
|
|
160
|
+
getByText = _render10.getByText,
|
|
161
|
+
getByRole = _render10.getByRole;
|
|
206
162
|
var switchEl = getByRole("switch");
|
|
207
163
|
var label = getByText("Default label");
|
|
208
164
|
expect(switchEl.getAttribute("aria-labelledby")).toBe(label.id);
|
|
@@ -210,12 +166,11 @@ describe("Switch component tests", function () {
|
|
|
210
166
|
});
|
|
211
167
|
test("Renders disabled switch correctly", function () {
|
|
212
168
|
var _render11 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
169
|
+
label: "Default label",
|
|
170
|
+
disabled: true
|
|
171
|
+
})),
|
|
172
|
+
getByText = _render11.getByText,
|
|
173
|
+
getByRole = _render11.getByRole;
|
|
219
174
|
var switchEl = getByRole("switch");
|
|
220
175
|
var label = getByText("Default label");
|
|
221
176
|
expect(switchEl.getAttribute("aria-labelledby")).toBe(label.id);
|
package/switch/types.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type Space = "xxsmall" | "xsmall" | "small" | "medium" | "large" | "xlarge" | "xxlarge";
|
|
2
|
+
type Margin = {
|
|
3
3
|
top?: Space;
|
|
4
4
|
bottom?: Space;
|
|
5
5
|
left?: Space;
|
|
6
6
|
right?: Space;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type Props = {
|
|
9
9
|
/**
|
|
10
10
|
* Initial state of the switch, only when it is uncontrolled.
|
|
11
11
|
*/
|
|
@@ -62,5 +62,5 @@ declare type Props = {
|
|
|
62
62
|
/**
|
|
63
63
|
* Reference to the component.
|
|
64
64
|
*/
|
|
65
|
-
export
|
|
65
|
+
export type RefType = HTMLDivElement;
|
|
66
66
|
export default Props;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _variables = require("../common/variables");
|
|
8
|
+
var _default = exports["default"] = {
|
|
9
|
+
dropdown: {
|
|
10
|
+
// ActionIcon size tokens
|
|
11
|
+
buttonIconSize: "16px",
|
|
12
|
+
buttonPaddingTop: "4px",
|
|
13
|
+
buttonPaddingBottom: "4px",
|
|
14
|
+
buttonPaddingLeft: "4px",
|
|
15
|
+
buttonPaddingRight: "4px",
|
|
16
|
+
buttonHeight: "24px",
|
|
17
|
+
buttonBorderRadius: "2px",
|
|
18
|
+
buttonBorderStyle: "none",
|
|
19
|
+
buttonBorderThickness: "0px",
|
|
20
|
+
buttonBorderColor: "transparent",
|
|
21
|
+
optionFontSize: "14px",
|
|
22
|
+
optionPaddingTop: "0px",
|
|
23
|
+
optionPaddingBottom: "0px",
|
|
24
|
+
optionPaddingLeft: "16px",
|
|
25
|
+
optionPaddingRight: "16px",
|
|
26
|
+
// Dropdown tokens
|
|
27
|
+
buttonBackgroundColor: _variables.componentTokens.table.actionBackgroundColor,
|
|
28
|
+
hoverButtonBackgroundColor: _variables.componentTokens.table.hoverActionBackgroundColor,
|
|
29
|
+
activeButtonBackgroundColor: _variables.componentTokens.table.activeActionBackgroundColor,
|
|
30
|
+
buttonFontFamily: _variables.componentTokens.dropdown.buttonFontFamily,
|
|
31
|
+
buttonFontSize: _variables.componentTokens.dropdown.buttonFontSize,
|
|
32
|
+
buttonFontStyle: _variables.componentTokens.dropdown.buttonFontStyle,
|
|
33
|
+
buttonFontWeight: _variables.componentTokens.dropdown.buttonFontWeight,
|
|
34
|
+
buttonFontColor: _variables.componentTokens.dropdown.buttonFontColor,
|
|
35
|
+
buttonIconSpacing: _variables.componentTokens.dropdown.buttonIconSpacing,
|
|
36
|
+
buttonIconColor: _variables.componentTokens.table.actionIconColor,
|
|
37
|
+
disabledColor: _variables.componentTokens.table.disabledActionIconColor,
|
|
38
|
+
disabledButtonBorderColor: _variables.componentTokens.dropdown.disabledButtonBorderColor,
|
|
39
|
+
disabledButtonBackgroundColor: _variables.componentTokens.table.disabledActionBackgroundColor,
|
|
40
|
+
disabledBorderColor: _variables.componentTokens.dropdown.disabledBorderColor,
|
|
41
|
+
optionBackgroundColor: _variables.componentTokens.dropdown.optionBackgroundColor,
|
|
42
|
+
hoverOptionBackgroundColor: _variables.componentTokens.dropdown.hoverOptionBackgroundColor,
|
|
43
|
+
activeOptionBackgroundColor: _variables.componentTokens.dropdown.activeOptionBackgroundColor,
|
|
44
|
+
optionFontFamily: _variables.componentTokens.dropdown.optionFontFamily,
|
|
45
|
+
optionFontStyle: _variables.componentTokens.dropdown.optionFontStyle,
|
|
46
|
+
optionFontWeight: _variables.componentTokens.dropdown.optionFontWeight,
|
|
47
|
+
optionFontColor: _variables.componentTokens.dropdown.optionFontColor,
|
|
48
|
+
optionIconSize: _variables.componentTokens.dropdown.optionIconSize,
|
|
49
|
+
optionIconSpacing: _variables.componentTokens.dropdown.optionIconSpacing,
|
|
50
|
+
optionIconColor: _variables.componentTokens.dropdown.optionIconColor,
|
|
51
|
+
caretIconSize: _variables.componentTokens.dropdown.caretIconSize,
|
|
52
|
+
caretIconColor: _variables.componentTokens.dropdown.caretIconColor,
|
|
53
|
+
caretIconSpacing: _variables.componentTokens.dropdown.caretIconSpacing,
|
|
54
|
+
borderRadius: _variables.componentTokens.dropdown.borderRadius,
|
|
55
|
+
borderStyle: _variables.componentTokens.dropdown.borderStyle,
|
|
56
|
+
borderThickness: _variables.componentTokens.dropdown.borderThickness,
|
|
57
|
+
borderColor: _variables.componentTokens.dropdown.borderColor,
|
|
58
|
+
scrollBarThumbColor: _variables.componentTokens.dropdown.scrollBarThumbColor,
|
|
59
|
+
scrollBarTrackColor: _variables.componentTokens.dropdown.scrollBarTrackColor,
|
|
60
|
+
focusColor: _variables.componentTokens.table.focusActionBorderColor
|
|
61
|
+
}
|
|
62
|
+
};
|
package/table/Table.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import TablePropsType from "./types";
|
|
3
|
-
declare const
|
|
2
|
+
import TablePropsType, { ActionCellsPropsType } from "./types";
|
|
3
|
+
export declare const DxcActionsCell: ({ actions }: ActionCellsPropsType) => JSX.Element;
|
|
4
|
+
declare const DxcTable: {
|
|
5
|
+
({ children, margin, mode }: TablePropsType): JSX.Element;
|
|
6
|
+
ActionsCell: ({ actions }: ActionCellsPropsType) => JSX.Element;
|
|
7
|
+
};
|
|
4
8
|
export default DxcTable;
|
package/table/Table.js
CHANGED
|
@@ -1,53 +1,88 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
|
-
exports["default"] = void 0;
|
|
11
|
-
|
|
8
|
+
exports["default"] = exports.DxcActionsCell = void 0;
|
|
12
9
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
|
-
|
|
14
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
15
|
-
|
|
16
11
|
var _react = _interopRequireDefault(require("react"));
|
|
17
|
-
|
|
18
12
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
19
|
-
|
|
20
13
|
var _variables = require("../common/variables");
|
|
21
|
-
|
|
22
14
|
var _utils = require("../common/utils");
|
|
23
|
-
|
|
24
15
|
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
25
|
-
|
|
26
|
-
var
|
|
27
|
-
|
|
16
|
+
var _DropdownTheme = _interopRequireDefault(require("./DropdownTheme"));
|
|
17
|
+
var _Dropdown = _interopRequireDefault(require("../dropdown/Dropdown"));
|
|
18
|
+
var _Flex = _interopRequireDefault(require("../flex/Flex"));
|
|
19
|
+
var _HalstackContext = require("../HalstackContext");
|
|
20
|
+
var _ActionIcon = _interopRequireDefault(require("../action-icon/ActionIcon"));
|
|
28
21
|
var _templateObject, _templateObject2;
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
23
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
24
|
+
var overwriteTheme = function overwriteTheme(theme) {
|
|
25
|
+
var newTheme = _DropdownTheme["default"];
|
|
26
|
+
newTheme.dropdown.buttonBackgroundColor = theme.table.actionBackgroundColor;
|
|
27
|
+
newTheme.dropdown.hoverButtonBackgroundColor = theme.table.hoverActionBackgroundColor;
|
|
28
|
+
newTheme.dropdown.activeButtonBackgroundColor = theme.table.activeActionBackgroundColor;
|
|
29
|
+
newTheme.dropdown.buttonIconColor = theme.table.actionIconColor;
|
|
30
|
+
newTheme.dropdown.disabledColor = theme.table.disabledActionIconColor;
|
|
31
|
+
newTheme.dropdown.disabledButtonBackgroundColor = theme.table.disabledActionBackgroundColor;
|
|
32
|
+
return newTheme;
|
|
33
|
+
};
|
|
34
|
+
var DxcActionsCell = exports.DxcActionsCell = function DxcActionsCell(_ref) {
|
|
35
|
+
var actions = _ref.actions;
|
|
36
|
+
var actionIcons = actions.filter(function (action) {
|
|
37
|
+
return !action.options;
|
|
38
|
+
});
|
|
39
|
+
var actionDropdown = actions.find(function (action) {
|
|
40
|
+
return action.options;
|
|
41
|
+
});
|
|
42
|
+
var maxNumberOfActions = actionDropdown ? 2 : 3;
|
|
43
|
+
var colorsTheme = (0, _useTheme["default"])();
|
|
44
|
+
return /*#__PURE__*/_react["default"].createElement(_Flex["default"], {
|
|
45
|
+
gap: "0.5rem",
|
|
46
|
+
alignItems: "center"
|
|
47
|
+
}, actionIcons.map(function (action, index) {
|
|
48
|
+
var _action$disabled, _action$tabIndex;
|
|
49
|
+
return index < maxNumberOfActions && /*#__PURE__*/_react["default"].createElement(_ActionIcon["default"], {
|
|
50
|
+
icon: action.icon,
|
|
51
|
+
title: action.title,
|
|
52
|
+
onClick: action.onClick,
|
|
53
|
+
disabled: (_action$disabled = action.disabled) !== null && _action$disabled !== void 0 ? _action$disabled : false,
|
|
54
|
+
tabIndex: (_action$tabIndex = action.tabIndex) !== null && _action$tabIndex !== void 0 ? _action$tabIndex : 0,
|
|
55
|
+
key: "action-".concat(index)
|
|
56
|
+
});
|
|
57
|
+
}), actionDropdown && /*#__PURE__*/_react["default"].createElement(_HalstackContext.HalstackProvider, {
|
|
58
|
+
advancedTheme: overwriteTheme(colorsTheme),
|
|
59
|
+
key: "provider-dropdown"
|
|
60
|
+
}, /*#__PURE__*/_react["default"].createElement(_Dropdown["default"], {
|
|
61
|
+
options: actionDropdown.options,
|
|
62
|
+
onSelectOption: actionDropdown.onClick,
|
|
63
|
+
disabled: actionDropdown.disabled,
|
|
64
|
+
icon: "more_vert",
|
|
65
|
+
tabIndex: actionDropdown.tabIndex,
|
|
66
|
+
caretHidden: true
|
|
67
|
+
})));
|
|
68
|
+
};
|
|
69
|
+
var DxcTable = function DxcTable(_ref2) {
|
|
70
|
+
var children = _ref2.children,
|
|
71
|
+
margin = _ref2.margin,
|
|
72
|
+
_ref2$mode = _ref2.mode,
|
|
73
|
+
mode = _ref2$mode === void 0 ? "default" : _ref2$mode;
|
|
37
74
|
var colorsTheme = (0, _useTheme["default"])();
|
|
38
75
|
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
39
76
|
theme: colorsTheme.table
|
|
40
77
|
}, /*#__PURE__*/_react["default"].createElement(DxcTableContainer, {
|
|
41
78
|
margin: margin
|
|
42
|
-
}, /*#__PURE__*/_react["default"].createElement(DxcTableContent,
|
|
43
|
-
|
|
44
|
-
}, children)))
|
|
79
|
+
}, /*#__PURE__*/_react["default"].createElement(DxcTableContent, {
|
|
80
|
+
mode: mode
|
|
81
|
+
}, children)));
|
|
45
82
|
};
|
|
46
|
-
|
|
47
83
|
var calculateWidth = function calculateWidth(margin) {
|
|
48
84
|
return "calc(100% - ".concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
|
|
49
85
|
};
|
|
50
|
-
|
|
51
86
|
var DxcTableContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n width: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n overflow: auto;\n &::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n }\n &::-webkit-scrollbar-thumb {\n background-color: ", ";\n border-radius: 6px;\n }\n &::-webkit-scrollbar-track {\n background-color: ", ";\n border-radius: 6px;\n }\n"])), function (props) {
|
|
52
87
|
return calculateWidth(props.margin);
|
|
53
88
|
}, function (props) {
|
|
@@ -65,9 +100,10 @@ var DxcTableContainer = _styledComponents["default"].div(_templateObject || (_te
|
|
|
65
100
|
}, function (props) {
|
|
66
101
|
return props.theme.scrollBarTrackColor;
|
|
67
102
|
});
|
|
68
|
-
|
|
69
|
-
var DxcTableContent = _styledComponents["default"].table(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n border-collapse: collapse;\n width: 100%;\n\n & tr {\n border-bottom: ", ";\n height: 60px;\n }\n & td {\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n text-transform: ", ";\n text-align: ", ";\n line-height: ", ";\n padding: ", ";\n }\n & th {\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n text-transform: ", ";\n text-align: ", ";\n line-height: ", ";\n padding: ", ";\n }\n & th:first-child {\n border-top-left-radius: ", ";\n }\n & th:last-child {\n border-top-right-radius: ", ";\n }\n & td:last-child {\n padding-right: 40px;\n }\n"])), function (props) {
|
|
103
|
+
var DxcTableContent = _styledComponents["default"].table(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n border-collapse: collapse;\n width: 100%;\n\n & tr {\n border-bottom: ", ";\n height: ", ";\n }\n & td {\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n text-transform: ", ";\n text-align: ", ";\n line-height: ", ";\n padding: ", ";\n }\n & th {\n background-color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n color: ", ";\n text-transform: ", ";\n text-align: ", ";\n line-height: ", ";\n padding: ", ";\n }\n & th:first-child {\n border-top-left-radius: ", ";\n padding-left: ", ";\n }\n & th:last-child {\n border-top-right-radius: ", ";\n padding-right: ", ";\n }\n & td:first-child {\n padding-left: ", ";\n }\n & td:last-child {\n padding-right: ", ";\n }\n"])), function (props) {
|
|
70
104
|
return "".concat(props.theme.rowSeparatorThickness, " ").concat(props.theme.rowSeparatorStyle, " ").concat(props.theme.rowSeparatorColor);
|
|
105
|
+
}, function (props) {
|
|
106
|
+
return props.mode === "default" ? "60px" : "36px";
|
|
71
107
|
}, function (props) {
|
|
72
108
|
return props.theme.dataBackgroundColor;
|
|
73
109
|
}, function (props) {
|
|
@@ -87,7 +123,7 @@ var DxcTableContent = _styledComponents["default"].table(_templateObject2 || (_t
|
|
|
87
123
|
}, function (props) {
|
|
88
124
|
return props.theme.dataTextLineHeight;
|
|
89
125
|
}, function (props) {
|
|
90
|
-
return "".concat(props.theme.dataPaddingTop, " ").concat(props.theme.dataPaddingRight, " ").concat(props.theme.dataPaddingBottom, " ").concat(props.theme.dataPaddingLeft);
|
|
126
|
+
return props.mode === "default" ? "".concat(props.theme.dataPaddingTop, " ").concat(props.theme.dataPaddingRight, " ").concat(props.theme.dataPaddingBottom, " ").concat(props.theme.dataPaddingLeft) : "".concat(props.theme.dataPaddingTopReduced, " ").concat(props.theme.dataPaddingRightReduced, " ").concat(props.theme.dataPaddingBottomReduced, " ").concat(props.theme.dataPaddingLeftReduced);
|
|
91
127
|
}, function (props) {
|
|
92
128
|
return props.theme.headerBackgroundColor;
|
|
93
129
|
}, function (props) {
|
|
@@ -107,12 +143,19 @@ var DxcTableContent = _styledComponents["default"].table(_templateObject2 || (_t
|
|
|
107
143
|
}, function (props) {
|
|
108
144
|
return props.theme.headerTextLineHeight;
|
|
109
145
|
}, function (props) {
|
|
110
|
-
return "".concat(props.theme.headerPaddingTop, " ").concat(props.theme.headerPaddingRight, " ").concat(props.theme.headerPaddingBottom, " ").concat(props.theme.headerPaddingLeft);
|
|
146
|
+
return props.mode === "default" ? "".concat(props.theme.headerPaddingTop, " ").concat(props.theme.headerPaddingRight, " ").concat(props.theme.headerPaddingBottom, " ").concat(props.theme.headerPaddingLeft) : "".concat(props.theme.headerPaddingTopReduced, " ").concat(props.theme.headerPaddingRightReduced, " ").concat(props.theme.headerPaddingBottomReduced, " ").concat(props.theme.headerPaddingLeftReduced);
|
|
111
147
|
}, function (props) {
|
|
112
148
|
return props.theme.headerBorderRadius;
|
|
149
|
+
}, function (props) {
|
|
150
|
+
return props.mode === "default" ? props.theme.firstChildPaddingLeft : props.theme.firstChildPaddingLeftReduced;
|
|
113
151
|
}, function (props) {
|
|
114
152
|
return props.theme.headerBorderRadius;
|
|
153
|
+
}, function (props) {
|
|
154
|
+
return props.mode === "default" ? props.theme.lastChildPaddingRight : props.theme.lastChildPaddingRightReduced;
|
|
155
|
+
}, function (props) {
|
|
156
|
+
return props.mode === "default" ? props.theme.firstChildPaddingLeft : props.theme.firstChildPaddingLeftReduced;
|
|
157
|
+
}, function (props) {
|
|
158
|
+
return props.mode === "default" ? props.theme.lastChildPaddingRight : props.theme.lastChildPaddingRightReduced;
|
|
115
159
|
});
|
|
116
|
-
|
|
117
|
-
var _default = DxcTable;
|
|
118
|
-
exports["default"] = _default;
|
|
160
|
+
DxcTable.ActionsCell = DxcActionsCell;
|
|
161
|
+
var _default = exports["default"] = DxcTable;
|