@dxc-technology/halstack-react 0.0.0-b4fde6b → 0.0.0-b5ec444
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 +51 -138
- package/HalstackContext.js +10 -35
- package/README.md +47 -0
- package/accordion/Accordion.d.ts +1 -1
- package/accordion/Accordion.js +24 -76
- package/accordion/Accordion.stories.tsx +1 -113
- package/accordion/Accordion.test.js +18 -33
- package/accordion/types.d.ts +5 -17
- package/accordion-group/AccordionGroup.js +15 -42
- package/accordion-group/AccordionGroup.stories.tsx +78 -77
- package/accordion-group/AccordionGroup.test.js +43 -71
- package/accordion-group/AccordionGroupAccordion.js +9 -21
- package/accordion-group/types.d.ts +6 -18
- package/action-icon/ActionIcon.d.ts +4 -0
- package/action-icon/ActionIcon.js +47 -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 +15 -50
- 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 +18 -54
- package/bulleted-list/BulletedList.stories.tsx +1 -92
- package/bulleted-list/types.d.ts +5 -5
- package/button/Button.d.ts +1 -1
- package/button/Button.js +66 -99
- package/button/Button.stories.tsx +6 -87
- package/button/Button.test.js +19 -16
- package/button/types.d.ts +8 -4
- package/card/Card.d.ts +1 -1
- package/card/Card.js +39 -79
- package/card/Card.stories.tsx +0 -29
- package/card/Card.test.js +10 -21
- package/card/types.d.ts +6 -12
- 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 +51 -138
- package/common/variables.js +61 -155
- 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/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 +27 -21
- 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/dropdown/Dropdown.js +48 -100
- package/dropdown/Dropdown.test.js +391 -378
- package/dropdown/DropdownMenu.js +8 -19
- package/dropdown/DropdownMenuItem.js +5 -17
- package/dropdown/types.d.ts +17 -19
- 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 +2 -2
- package/header/Header.js +31 -114
- package/header/Header.stories.tsx +7 -71
- 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 +5 -20
- package/heading/Heading.js +9 -31
- package/heading/Heading.test.js +70 -87
- package/heading/types.d.ts +7 -7
- package/image/Image.d.ts +4 -0
- package/image/Image.js +70 -0
- package/image/Image.stories.tsx +127 -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 +3 -3
- package/layout/ApplicationLayout.js +28 -65
- package/layout/ApplicationLayout.stories.tsx +1 -1
- package/layout/Icons.d.ts +8 -5
- package/layout/Icons.js +51 -59
- package/layout/SidenavContext.d.ts +1 -1
- package/layout/SidenavContext.js +3 -9
- 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 +6 -4
- package/main.js +25 -59
- package/nav-tabs/NavTabs.js +17 -46
- package/nav-tabs/NavTabs.stories.tsx +7 -5
- package/nav-tabs/NavTabs.test.js +38 -44
- package/nav-tabs/Tab.js +22 -50
- package/nav-tabs/types.d.ts +9 -9
- package/number-input/NumberInput.d.ts +7 -0
- package/number-input/NumberInput.js +47 -37
- package/number-input/NumberInput.stories.tsx +42 -26
- package/number-input/NumberInput.test.js +859 -412
- package/number-input/types.d.ts +11 -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 +36 -64
- package/{resultsetTable → resultset-table}/ResultsetTable.stories.tsx +102 -5
- package/{resultsetTable → resultset-table}/ResultsetTable.test.js +138 -92
- package/{resultsetTable → resultset-table}/types.d.ts +13 -7
- 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 +26 -68
- package/sidenav/Sidenav.test.js +3 -10
- 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/ActionsCell.d.ts +4 -0
- package/table/ActionsCell.js +68 -0
- package/table/DropdownTheme.js +62 -0
- package/table/Table.d.ts +4 -1
- package/table/Table.js +24 -30
- package/table/{Table.stories.jsx → Table.stories.tsx} +304 -2
- package/table/Table.test.js +93 -6
- package/table/types.d.ts +45 -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/Icons.d.ts +5 -5
- package/text-input/Icons.js +1 -5
- package/text-input/Suggestion.js +9 -26
- package/text-input/Suggestions.d.ts +1 -1
- package/text-input/Suggestions.js +15 -65
- package/text-input/TextInput.js +218 -326
- package/text-input/TextInput.stories.tsx +48 -152
- 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 +48 -135
- 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 +6 -6
- package/card/ice-cream.jpg +0 -0
- package/number-input/NumberInputContext.d.ts +0 -4
- package/number-input/NumberInputContext.js +0 -19
- package/number-input/numberInputContextTypes.d.ts +0 -19
- package/resultsetTable/Icons.d.ts +0 -7
- package/resultsetTable/ResultsetTable.d.ts +0 -4
- package/slider/Slider.stories.tsx +0 -240
- /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,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _ActionIcon = _interopRequireDefault(require("../action-icon/ActionIcon"));
|
|
10
|
+
var _main = require("../main");
|
|
11
|
+
var _DropdownTheme = _interopRequireDefault(require("./DropdownTheme"));
|
|
12
|
+
var _useTheme = _interopRequireDefault(require("../useTheme"));
|
|
13
|
+
var moreVertIcon = /*#__PURE__*/_react["default"].createElement("svg", {
|
|
14
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
+
height: "24",
|
|
16
|
+
viewBox: "0 -960 960 960",
|
|
17
|
+
width: "24",
|
|
18
|
+
fill: "currentColor"
|
|
19
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
|
20
|
+
d: "M480-160q-33 0-56.5-23.5T400-240q0-33 23.5-56.5T480-320q33 0 56.5 23.5T560-240q0 33-23.5 56.5T480-160Zm0-240q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm0-240q-33 0-56.5-23.5T400-720q0-33 23.5-56.5T480-800q33 0 56.5 23.5T560-720q0 33-23.5 56.5T480-640Z"
|
|
21
|
+
}));
|
|
22
|
+
var overwriteTheme = function overwriteTheme(theme) {
|
|
23
|
+
var newTheme = _DropdownTheme["default"];
|
|
24
|
+
newTheme.dropdown.buttonBackgroundColor = theme.table.actionBackgroundColor;
|
|
25
|
+
newTheme.dropdown.hoverButtonBackgroundColor = theme.table.hoverActionBackgroundColor;
|
|
26
|
+
newTheme.dropdown.activeButtonBackgroundColor = theme.table.activeActionBackgroundColor;
|
|
27
|
+
newTheme.dropdown.buttonIconColor = theme.table.actionIconColor;
|
|
28
|
+
newTheme.dropdown.disabledColor = theme.table.disabledActionIconColor;
|
|
29
|
+
newTheme.dropdown.disabledButtonBackgroundColor = theme.table.disabledActionBackgroundColor;
|
|
30
|
+
console.log(newTheme);
|
|
31
|
+
return newTheme;
|
|
32
|
+
};
|
|
33
|
+
var DxcActionsCell = function DxcActionsCell(_ref) {
|
|
34
|
+
var actions = _ref.actions;
|
|
35
|
+
var actionIcons = actions.filter(function (action) {
|
|
36
|
+
return !action.options;
|
|
37
|
+
});
|
|
38
|
+
var actionDropdown = actions.find(function (action) {
|
|
39
|
+
return action.options;
|
|
40
|
+
});
|
|
41
|
+
var maxNumberOfActions = actionDropdown ? 2 : 3;
|
|
42
|
+
var colorsTheme = (0, _useTheme["default"])();
|
|
43
|
+
return /*#__PURE__*/_react["default"].createElement(_main.DxcFlex, {
|
|
44
|
+
gap: "0.5rem",
|
|
45
|
+
alignItems: "center"
|
|
46
|
+
}, actionIcons.map(function (action, index) {
|
|
47
|
+
var _action$disabled, _action$tabIndex;
|
|
48
|
+
return index < maxNumberOfActions && /*#__PURE__*/_react["default"].createElement(_ActionIcon["default"], {
|
|
49
|
+
icon: action.icon,
|
|
50
|
+
title: action.title,
|
|
51
|
+
onClick: action.onClick,
|
|
52
|
+
disabled: (_action$disabled = action.disabled) !== null && _action$disabled !== void 0 ? _action$disabled : false,
|
|
53
|
+
tabIndex: (_action$tabIndex = action.tabIndex) !== null && _action$tabIndex !== void 0 ? _action$tabIndex : 0,
|
|
54
|
+
key: "action-".concat(index)
|
|
55
|
+
});
|
|
56
|
+
}), actionDropdown && /*#__PURE__*/_react["default"].createElement(_main.HalstackProvider, {
|
|
57
|
+
advancedTheme: overwriteTheme(colorsTheme),
|
|
58
|
+
key: "provider-dropdown"
|
|
59
|
+
}, /*#__PURE__*/_react["default"].createElement(_main.DxcDropdown, {
|
|
60
|
+
options: actionDropdown.options,
|
|
61
|
+
onSelectOption: actionDropdown.onClick,
|
|
62
|
+
disabled: actionDropdown.disabled,
|
|
63
|
+
icon: moreVertIcon,
|
|
64
|
+
tabIndex: actionDropdown.tabIndex,
|
|
65
|
+
caretHidden: true
|
|
66
|
+
})));
|
|
67
|
+
};
|
|
68
|
+
var _default = exports["default"] = DxcActionsCell;
|
|
@@ -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,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import TablePropsType from "./types";
|
|
3
|
-
declare const DxcTable:
|
|
3
|
+
declare const DxcTable: {
|
|
4
|
+
({ children, margin, mode }: TablePropsType): JSX.Element;
|
|
5
|
+
ActionsCell: ({ actions }: import("./types").ActionCellsPropsType) => JSX.Element;
|
|
6
|
+
};
|
|
4
7
|
export default DxcTable;
|
package/table/Table.js
CHANGED
|
@@ -1,53 +1,39 @@
|
|
|
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
8
|
exports["default"] = void 0;
|
|
11
|
-
|
|
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 _BackgroundColorContext = require("../BackgroundColorContext");
|
|
27
|
-
|
|
16
|
+
var _ActionsCell = _interopRequireDefault(require("./ActionsCell"));
|
|
28
17
|
var _templateObject, _templateObject2;
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
-
|
|
18
|
+
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); }
|
|
19
|
+
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; }
|
|
34
20
|
var DxcTable = function DxcTable(_ref) {
|
|
35
21
|
var children = _ref.children,
|
|
36
|
-
|
|
22
|
+
margin = _ref.margin,
|
|
23
|
+
_ref$mode = _ref.mode,
|
|
24
|
+
mode = _ref$mode === void 0 ? "default" : _ref$mode;
|
|
37
25
|
var colorsTheme = (0, _useTheme["default"])();
|
|
38
26
|
return /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
39
27
|
theme: colorsTheme.table
|
|
40
28
|
}, /*#__PURE__*/_react["default"].createElement(DxcTableContainer, {
|
|
41
29
|
margin: margin
|
|
42
|
-
}, /*#__PURE__*/_react["default"].createElement(DxcTableContent,
|
|
43
|
-
|
|
44
|
-
}, children)))
|
|
30
|
+
}, /*#__PURE__*/_react["default"].createElement(DxcTableContent, {
|
|
31
|
+
mode: mode
|
|
32
|
+
}, children)));
|
|
45
33
|
};
|
|
46
|
-
|
|
47
34
|
var calculateWidth = function calculateWidth(margin) {
|
|
48
35
|
return "calc(100% - ".concat((0, _utils.getMargin)(margin, "left"), " - ").concat((0, _utils.getMargin)(margin, "right"), ")");
|
|
49
36
|
};
|
|
50
|
-
|
|
51
37
|
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
38
|
return calculateWidth(props.margin);
|
|
53
39
|
}, function (props) {
|
|
@@ -65,9 +51,10 @@ var DxcTableContainer = _styledComponents["default"].div(_templateObject || (_te
|
|
|
65
51
|
}, function (props) {
|
|
66
52
|
return props.theme.scrollBarTrackColor;
|
|
67
53
|
});
|
|
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) {
|
|
54
|
+
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
55
|
return "".concat(props.theme.rowSeparatorThickness, " ").concat(props.theme.rowSeparatorStyle, " ").concat(props.theme.rowSeparatorColor);
|
|
56
|
+
}, function (props) {
|
|
57
|
+
return props.mode === "default" ? "60px" : "36px";
|
|
71
58
|
}, function (props) {
|
|
72
59
|
return props.theme.dataBackgroundColor;
|
|
73
60
|
}, function (props) {
|
|
@@ -87,7 +74,7 @@ var DxcTableContent = _styledComponents["default"].table(_templateObject2 || (_t
|
|
|
87
74
|
}, function (props) {
|
|
88
75
|
return props.theme.dataTextLineHeight;
|
|
89
76
|
}, function (props) {
|
|
90
|
-
return "".concat(props.theme.dataPaddingTop, " ").concat(props.theme.dataPaddingRight, " ").concat(props.theme.dataPaddingBottom, " ").concat(props.theme.dataPaddingLeft);
|
|
77
|
+
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
78
|
}, function (props) {
|
|
92
79
|
return props.theme.headerBackgroundColor;
|
|
93
80
|
}, function (props) {
|
|
@@ -107,12 +94,19 @@ var DxcTableContent = _styledComponents["default"].table(_templateObject2 || (_t
|
|
|
107
94
|
}, function (props) {
|
|
108
95
|
return props.theme.headerTextLineHeight;
|
|
109
96
|
}, function (props) {
|
|
110
|
-
return "".concat(props.theme.headerPaddingTop, " ").concat(props.theme.headerPaddingRight, " ").concat(props.theme.headerPaddingBottom, " ").concat(props.theme.headerPaddingLeft);
|
|
97
|
+
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
98
|
}, function (props) {
|
|
112
99
|
return props.theme.headerBorderRadius;
|
|
100
|
+
}, function (props) {
|
|
101
|
+
return props.mode === "default" ? props.theme.firstChildPaddingLeft : props.theme.firstChildPaddingLeftReduced;
|
|
113
102
|
}, function (props) {
|
|
114
103
|
return props.theme.headerBorderRadius;
|
|
104
|
+
}, function (props) {
|
|
105
|
+
return props.mode === "default" ? props.theme.lastChildPaddingRight : props.theme.lastChildPaddingRightReduced;
|
|
106
|
+
}, function (props) {
|
|
107
|
+
return props.mode === "default" ? props.theme.firstChildPaddingLeft : props.theme.firstChildPaddingLeftReduced;
|
|
108
|
+
}, function (props) {
|
|
109
|
+
return props.mode === "default" ? props.theme.lastChildPaddingRight : props.theme.lastChildPaddingRightReduced;
|
|
115
110
|
});
|
|
116
|
-
|
|
117
|
-
var _default = DxcTable;
|
|
118
|
-
exports["default"] = _default;
|
|
111
|
+
DxcTable.ActionsCell = _ActionsCell["default"];
|
|
112
|
+
var _default = exports["default"] = DxcTable;
|