@pedidopago/ui 1.1.4 → 1.1.5
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/dist/components/Badge/badge.test.js +22 -5
- package/dist/components/Badge/index.js +3 -5
- package/dist/components/Badge/styles.d.ts +0 -4
- package/dist/components/Badge/styles.d.ts.map +1 -1
- package/dist/components/Badge/styles.js +3 -11
- package/dist/components/Badge/types.d.ts +2 -1
- package/dist/components/Badge/types.d.ts.map +1 -1
- package/dist/components/Button/index.d.ts +2 -2
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/styles.d.ts.map +1 -1
- package/dist/components/Button/styles.js +10 -7
- package/dist/components/Icon/types.d.ts +1 -1
- package/dist/components/Icon/types.d.ts.map +1 -1
- package/dist/components/Input/styles.d.ts.map +1 -1
- package/dist/components/Input/styles.js +114 -31
- package/dist/components/List/styles.d.ts.map +1 -1
- package/dist/components/List/styles.js +8 -2
- package/dist/components/List/types.d.ts +1 -2
- package/dist/components/List/types.d.ts.map +1 -1
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.js +5 -1
- package/dist/components/Modal/modal.test.js +13 -0
- package/dist/components/Modal/styles.d.ts +2 -0
- package/dist/components/Modal/styles.d.ts.map +1 -1
- package/dist/components/Modal/styles.js +1 -1
- package/dist/components/Modal/types.d.ts +4 -0
- package/dist/components/Modal/types.d.ts.map +1 -1
- package/dist/components/Progress/style.d.ts.map +1 -1
- package/dist/components/Progress/style.js +1 -1
- package/dist/components/RadioInput/components/ChoiceList/index.d.ts.map +1 -1
- package/dist/components/RadioInput/components/ChoiceList/index.js +3 -0
- package/dist/components/RadioInput/styles.d.ts.map +1 -1
- package/dist/components/RadioInput/styles.js +4 -1
- package/dist/components/SelectInput/components/OptionsArea/OptionsArea.d.ts.map +1 -1
- package/dist/components/SelectInput/components/OptionsArea/OptionsArea.js +27 -9
- package/dist/components/SelectInput/components/OptionsArea/index.js +1 -1
- package/dist/components/SelectInput/components/SelectArea/ButtonsArea.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectArea/ButtonsArea.js +2 -2
- package/dist/components/SelectInput/components/SelectArea/Label.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectArea/Label.js +10 -10
- package/dist/components/SelectInput/components/SelectArea/SelectAreaWrapper.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectArea/SelectAreaWrapper.js +5 -2
- package/dist/components/SelectInput/components/SelectArea/SelectedOptionsArea.d.ts +4 -0
- package/dist/components/SelectInput/components/SelectArea/SelectedOptionsArea.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectArea/SelectedOptionsArea.js +35 -10
- package/dist/components/SelectInput/components/SelectArea/index.d.ts +2 -1
- package/dist/components/SelectInput/components/SelectArea/index.d.ts.map +1 -1
- package/dist/components/SelectInput/components/SelectArea/index.js +9 -2
- package/dist/components/SelectInput/index.d.ts.map +1 -1
- package/dist/components/SelectInput/index.js +9 -9
- package/dist/components/SelectInput/types.d.ts +1 -0
- package/dist/components/SelectInput/types.d.ts.map +1 -1
- package/dist/components/Slider/components/SliderPointer.js +2 -1
- package/dist/components/Switch/index.d.ts.map +1 -1
- package/dist/components/Switch/index.js +12 -8
- package/dist/components/Switch/styles.d.ts.map +1 -1
- package/dist/components/Switch/styles.js +14 -2
- package/dist/components/Switch/switch.test.d.ts +2 -0
- package/dist/components/Switch/switch.test.d.ts.map +1 -0
- package/dist/components/Switch/switch.test.js +276 -0
- package/dist/components/Switch/types.d.ts +4 -2
- package/dist/components/Switch/types.d.ts.map +1 -1
- package/dist/components/Table/index.d.ts +1 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +17 -16
- package/dist/components/Table/styles.js +4 -2
- package/dist/components/Table/table.test.js +48 -16
- package/dist/components/Table/types.d.ts +6 -4
- package/dist/components/Table/types.d.ts.map +1 -1
- package/dist/components/TextAreaInput/index.d.ts +2 -2
- package/dist/components/TextAreaInput/index.d.ts.map +1 -1
- package/dist/components/TextAreaInput/index.js +19 -11
- package/dist/components/TextAreaInput/styles.d.ts.map +1 -1
- package/dist/components/TextAreaInput/styles.js +4 -1
- package/package.json +1 -1
|
@@ -13,8 +13,6 @@ var _Icon = _interopRequireDefault(require("../Icon"));
|
|
|
13
13
|
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
|
|
16
|
-
var _excluded = ["disabled", "helpText", "alert", "SwitchType", "onChangeValue", "onError"];
|
|
17
|
-
|
|
18
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
17
|
|
|
20
18
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -29,10 +27,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
29
27
|
|
|
30
28
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
31
29
|
|
|
32
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
33
|
-
|
|
34
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
35
|
-
|
|
36
30
|
var SwitchInput = function SwitchInput(_ref) {
|
|
37
31
|
var _ref$disabled = _ref.disabled,
|
|
38
32
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
@@ -41,14 +35,23 @@ var SwitchInput = function SwitchInput(_ref) {
|
|
|
41
35
|
alert = _ref$alert === void 0 ? false : _ref$alert,
|
|
42
36
|
SwitchType = _ref.SwitchType,
|
|
43
37
|
onChangeValue = _ref.onChangeValue,
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
_ref$defaultValue = _ref.defaultValue,
|
|
39
|
+
defaultValue = _ref$defaultValue === void 0 ? false : _ref$defaultValue,
|
|
40
|
+
_ref$checked = _ref.checked,
|
|
41
|
+
checked = _ref$checked === void 0 ? false : _ref$checked,
|
|
42
|
+
onError = _ref.onError;
|
|
46
43
|
|
|
47
44
|
var _useState = (0, _react.useState)(false),
|
|
48
45
|
_useState2 = _slicedToArray(_useState, 2),
|
|
49
46
|
isActive = _useState2[0],
|
|
50
47
|
setIsActive = _useState2[1];
|
|
51
48
|
|
|
49
|
+
(0, _react.useEffect)(function () {
|
|
50
|
+
!!checked && setIsActive(checked);
|
|
51
|
+
}, [checked]);
|
|
52
|
+
(0, _react.useEffect)(function () {
|
|
53
|
+
!!defaultValue && setIsActive(defaultValue);
|
|
54
|
+
}, [defaultValue]);
|
|
52
55
|
(0, _react.useEffect)(function () {
|
|
53
56
|
!!onChangeValue && onChangeValue(isActive);
|
|
54
57
|
}, [isActive, onChangeValue]);
|
|
@@ -107,6 +110,7 @@ var SwitchInput = function SwitchInput(_ref) {
|
|
|
107
110
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.SwitchWrapper, {
|
|
108
111
|
"data-testid": "switch-wrapper",
|
|
109
112
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Switch, {
|
|
113
|
+
role: "checkbox",
|
|
110
114
|
"data-testid": "switch",
|
|
111
115
|
onClick: handleOnClick,
|
|
112
116
|
onKeyDown: handleOnKeyDown,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC,eAAO,MAAM,aAAa;;;uHAOzB,CAAC;AAEF,eAAO,MAAM,MAAM;;;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC,eAAO,MAAM,aAAa;;;uHAOzB,CAAC;AAEF,eAAO,MAAM,MAAM;;;uHAwBlB,CAAC;AAEF,eAAO,MAAM,WAAW;;;uHAgBvB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;yHAGpB,CAAC"}
|
|
@@ -27,7 +27,10 @@ exports.SwitchWrapper = SwitchWrapper;
|
|
|
27
27
|
var Switch = _styled.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n box-sizing: border-box;\n padding: 4px 2px;\n position: relative;\n outline: 0;\n\n width: 40px;\n height: 24px;\n border-radius: 80px;\n\n border: 2px solid\n ", ";\n\n transition: all ease-in-out 0.2s;\n\n ", "\n\n ", "\n"])), function (_ref2) {
|
|
28
28
|
var theme = _ref2.theme,
|
|
29
29
|
isActive = _ref2.isActive;
|
|
30
|
-
return
|
|
30
|
+
return {
|
|
31
|
+
dark: isActive ? theme.colors.body.light : theme.colors.neutral.neutral5,
|
|
32
|
+
light: isActive ? theme.colors.body.light : theme.colors.neutral.neutral2
|
|
33
|
+
}[theme.colorMode];
|
|
31
34
|
}, function (_ref3) {
|
|
32
35
|
var isActive = _ref3.isActive,
|
|
33
36
|
disabled = _ref3.disabled;
|
|
@@ -73,5 +76,14 @@ function ActiveEffects(_ref8) {
|
|
|
73
76
|
function disabledStyle(_ref9) {
|
|
74
77
|
var theme = _ref9.theme;
|
|
75
78
|
if (!theme) return '';
|
|
76
|
-
return (0, _react.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n border-color: ", ";\n background-color: ", ";\n\n div {\n background-color: ", ";\n }\n "])),
|
|
79
|
+
return (0, _react.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n border-color: ", ";\n background-color: ", ";\n\n div {\n background-color: ", ";\n }\n "])), {
|
|
80
|
+
dark: theme.colors.neutral.neutral4,
|
|
81
|
+
light: theme.colors.neutral.neutral2
|
|
82
|
+
}[theme.colorMode], {
|
|
83
|
+
dark: theme.colors.neutral.neutral5,
|
|
84
|
+
light: theme.colors.body.light
|
|
85
|
+
}[theme.colorMode], {
|
|
86
|
+
dark: theme.colors.neutral.neutral3,
|
|
87
|
+
light: theme.colors.neutral.neutral2
|
|
88
|
+
}[theme.colorMode]);
|
|
77
89
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.test.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/switch.test.tsx"],"names":[],"mappings":"AAGA,OAAO,yCAAyC,CAAC"}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _testUtils = require("../../shared/tests/test-utils");
|
|
4
|
+
|
|
5
|
+
var _react = require("@testing-library/react");
|
|
6
|
+
|
|
7
|
+
require("@testing-library/jest-dom/extend-expect");
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require("."));
|
|
10
|
+
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
|
|
15
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16
|
+
|
|
17
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
18
|
+
|
|
19
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
|
+
|
|
21
|
+
var setup = function setup(props) {
|
|
22
|
+
var utils = (0, _testUtils.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, _objectSpread({}, props)));
|
|
23
|
+
var SwitchElement = utils.getByTestId('switch');
|
|
24
|
+
var SwitchWrapper = utils.getByTestId('switch-wrapper');
|
|
25
|
+
return _objectSpread({
|
|
26
|
+
SwitchElement: SwitchElement,
|
|
27
|
+
SwitchWrapper: SwitchWrapper
|
|
28
|
+
}, utils);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
describe('Switch', function () {
|
|
32
|
+
it('Should be Rendered', function () {
|
|
33
|
+
var _setup = setup(),
|
|
34
|
+
SwitchElement = _setup.SwitchElement;
|
|
35
|
+
|
|
36
|
+
expect(SwitchElement).toBeInTheDocument();
|
|
37
|
+
});
|
|
38
|
+
it('Should return state in callback onChangeValue on click', function () {
|
|
39
|
+
var onChangeValue = jest.fn();
|
|
40
|
+
|
|
41
|
+
var _setup2 = setup({
|
|
42
|
+
onChangeValue: onChangeValue
|
|
43
|
+
}),
|
|
44
|
+
SwitchElement = _setup2.SwitchElement;
|
|
45
|
+
|
|
46
|
+
_react.fireEvent.click(SwitchElement);
|
|
47
|
+
|
|
48
|
+
expect(onChangeValue).toBeCalledWith(true);
|
|
49
|
+
});
|
|
50
|
+
it('Should not be controlled if has Alert prop and show error', function () {
|
|
51
|
+
var onChangeValue = jest.fn();
|
|
52
|
+
var onError = jest.fn();
|
|
53
|
+
|
|
54
|
+
var _setup3 = setup({
|
|
55
|
+
onChangeValue: onChangeValue,
|
|
56
|
+
onError: onError,
|
|
57
|
+
alert: true
|
|
58
|
+
}),
|
|
59
|
+
SwitchElement = _setup3.SwitchElement;
|
|
60
|
+
|
|
61
|
+
_react.fireEvent.click(SwitchElement);
|
|
62
|
+
|
|
63
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
64
|
+
expect(onError).toBeCalledWith('try click with alert');
|
|
65
|
+
});
|
|
66
|
+
it('Should be controlled with keyboard: ArrowUp, ArrowRight make it true', function () {
|
|
67
|
+
var onChangeValue = jest.fn();
|
|
68
|
+
var keysToTest = ['ArrowUp', 'ArrowRight'];
|
|
69
|
+
|
|
70
|
+
var _setup4 = setup({
|
|
71
|
+
onChangeValue: onChangeValue
|
|
72
|
+
}),
|
|
73
|
+
SwitchElement = _setup4.SwitchElement;
|
|
74
|
+
|
|
75
|
+
keysToTest.forEach(function (key) {
|
|
76
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
77
|
+
code: key
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
expect(onChangeValue).toBeCalledWith(true);
|
|
81
|
+
|
|
82
|
+
_react.fireEvent.click(SwitchElement);
|
|
83
|
+
|
|
84
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
85
|
+
});
|
|
86
|
+
keysToTest.forEach(function (key) {
|
|
87
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
88
|
+
code: key
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
expect(onChangeValue).toBeCalledWith(true);
|
|
92
|
+
|
|
93
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
94
|
+
code: key
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
expect(onChangeValue).toBeCalledWith(true);
|
|
98
|
+
|
|
99
|
+
_react.fireEvent.click(SwitchElement);
|
|
100
|
+
|
|
101
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
it('Should be controlled with keyboard: ArrowDown, ArrowLeft, Enter and Space make it true', function () {
|
|
105
|
+
var onChangeValue = jest.fn();
|
|
106
|
+
var keysToTest = ['ArrowDown', 'ArrowLeft'];
|
|
107
|
+
|
|
108
|
+
var _setup5 = setup({
|
|
109
|
+
onChangeValue: onChangeValue
|
|
110
|
+
}),
|
|
111
|
+
SwitchElement = _setup5.SwitchElement;
|
|
112
|
+
|
|
113
|
+
_react.fireEvent.click(SwitchElement);
|
|
114
|
+
|
|
115
|
+
expect(onChangeValue).toBeCalledWith(true);
|
|
116
|
+
keysToTest.forEach(function (key) {
|
|
117
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
118
|
+
code: key
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
122
|
+
|
|
123
|
+
_react.fireEvent.click(SwitchElement);
|
|
124
|
+
|
|
125
|
+
expect(onChangeValue).toBeCalledWith(true);
|
|
126
|
+
});
|
|
127
|
+
keysToTest.forEach(function (key) {
|
|
128
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
129
|
+
code: key
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
133
|
+
|
|
134
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
135
|
+
code: key
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
139
|
+
|
|
140
|
+
_react.fireEvent.click(SwitchElement);
|
|
141
|
+
|
|
142
|
+
expect(onChangeValue).toBeCalledWith(true);
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
it('Should be controlled with keyboard: Enter and Space toggle it', function () {
|
|
146
|
+
var onChangeValue = jest.fn();
|
|
147
|
+
var keysToTest = ['Enter', 'Space'];
|
|
148
|
+
|
|
149
|
+
var _setup6 = setup({
|
|
150
|
+
onChangeValue: onChangeValue
|
|
151
|
+
}),
|
|
152
|
+
SwitchElement = _setup6.SwitchElement;
|
|
153
|
+
|
|
154
|
+
keysToTest.forEach(function (key) {
|
|
155
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
156
|
+
code: key
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
expect(onChangeValue).toBeCalledWith(true);
|
|
160
|
+
|
|
161
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
162
|
+
code: key
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
it('Should not be controlled with keyboard: any other keys', function () {
|
|
169
|
+
var onChangeValue = jest.fn();
|
|
170
|
+
var keysToTest = ['KeyA', 'KeyB', 'ShiftRight'];
|
|
171
|
+
|
|
172
|
+
var _setup7 = setup({
|
|
173
|
+
onChangeValue: onChangeValue
|
|
174
|
+
}),
|
|
175
|
+
SwitchElement = _setup7.SwitchElement;
|
|
176
|
+
|
|
177
|
+
keysToTest.forEach(function (key) {
|
|
178
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
179
|
+
code: key
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
it('Should not be controlled with keyboard: if has SwitchType, and Show Error', function () {
|
|
186
|
+
var onChangeValue = jest.fn();
|
|
187
|
+
var onError = jest.fn();
|
|
188
|
+
var keysToTest = ['Enter', 'Space'];
|
|
189
|
+
|
|
190
|
+
var _setup8 = setup({
|
|
191
|
+
onChangeValue: onChangeValue,
|
|
192
|
+
alert: true,
|
|
193
|
+
onError: onError
|
|
194
|
+
}),
|
|
195
|
+
SwitchElement = _setup8.SwitchElement;
|
|
196
|
+
|
|
197
|
+
keysToTest.forEach(function (key) {
|
|
198
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
199
|
+
code: key
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
203
|
+
expect(onError).toBeCalledWith('try click with alert');
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
it('Should not be used if is disabled, and Should show error', function () {
|
|
207
|
+
var onChangeValue = jest.fn();
|
|
208
|
+
var onError = jest.fn();
|
|
209
|
+
|
|
210
|
+
var _setup9 = setup({
|
|
211
|
+
onChangeValue: onChangeValue,
|
|
212
|
+
disabled: true,
|
|
213
|
+
onError: onError
|
|
214
|
+
}),
|
|
215
|
+
SwitchElement = _setup9.SwitchElement;
|
|
216
|
+
|
|
217
|
+
_react.fireEvent.click(SwitchElement);
|
|
218
|
+
|
|
219
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
220
|
+
expect(onError).toBeCalledWith('try click with disabled');
|
|
221
|
+
|
|
222
|
+
_react.fireEvent.keyDown(SwitchElement, {
|
|
223
|
+
code: 'Enter'
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
expect(onChangeValue).toBeCalledWith(false);
|
|
227
|
+
expect(onError).toBeCalledWith('try click with disabled');
|
|
228
|
+
});
|
|
229
|
+
it('Should render the HelpText', function () {
|
|
230
|
+
var helpText = 'Quer batata no almoço?';
|
|
231
|
+
|
|
232
|
+
var _setup10 = setup({
|
|
233
|
+
helpText: helpText
|
|
234
|
+
}),
|
|
235
|
+
SwitchWrapper = _setup10.SwitchWrapper;
|
|
236
|
+
|
|
237
|
+
var helpTextElement = SwitchWrapper.querySelector('span');
|
|
238
|
+
expect(helpTextElement === null || helpTextElement === void 0 ? void 0 : helpTextElement.innerHTML).toEqual(helpText);
|
|
239
|
+
});
|
|
240
|
+
it('Should receive a defaultValue state', function () {
|
|
241
|
+
var _setup11 = setup({
|
|
242
|
+
defaultValue: true
|
|
243
|
+
}),
|
|
244
|
+
SwitchElement = _setup11.SwitchElement;
|
|
245
|
+
|
|
246
|
+
var checkedIcon = SwitchElement.querySelector('svg');
|
|
247
|
+
expect(checkedIcon).toBeInTheDocument();
|
|
248
|
+
});
|
|
249
|
+
it('Should receive a false defaultValue state', function () {
|
|
250
|
+
var _setup12 = setup({
|
|
251
|
+
defaultValue: false
|
|
252
|
+
}),
|
|
253
|
+
SwitchElement = _setup12.SwitchElement;
|
|
254
|
+
|
|
255
|
+
var checkedIcon = SwitchElement.querySelector('svg');
|
|
256
|
+
expect(checkedIcon).not.toBeInTheDocument();
|
|
257
|
+
});
|
|
258
|
+
it('Should receive a checked state', function () {
|
|
259
|
+
var _setup13 = setup({
|
|
260
|
+
checked: true
|
|
261
|
+
}),
|
|
262
|
+
SwitchElement = _setup13.SwitchElement;
|
|
263
|
+
|
|
264
|
+
var checkedIcon = SwitchElement.querySelector('svg');
|
|
265
|
+
expect(checkedIcon).toBeInTheDocument();
|
|
266
|
+
});
|
|
267
|
+
it('Should receive a false checked state', function () {
|
|
268
|
+
var _setup14 = setup({
|
|
269
|
+
checked: false
|
|
270
|
+
}),
|
|
271
|
+
SwitchElement = _setup14.SwitchElement;
|
|
272
|
+
|
|
273
|
+
var checkedIcon = SwitchElement.querySelector('svg');
|
|
274
|
+
expect(checkedIcon).not.toBeInTheDocument();
|
|
275
|
+
});
|
|
276
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Theme } from '@emotion/react';
|
|
2
2
|
export declare type IStyleProps = {
|
|
3
|
-
theme?:
|
|
3
|
+
theme?: Theme;
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
isActive?: boolean;
|
|
6
6
|
SwitchType?: 'success' | 'error' | 'warning' | 'informative' | 'critical' | 'success_secondary' | 'warning_secondary';
|
|
@@ -12,5 +12,7 @@ export declare type IInputProps = {
|
|
|
12
12
|
SwitchType?: 'success' | 'error' | 'warning' | 'informative' | 'critical' | 'success_secondary' | 'warning_secondary';
|
|
13
13
|
onError?: (error: string) => void;
|
|
14
14
|
onChangeValue?: (value: boolean) => void;
|
|
15
|
+
defaultValue?: boolean;
|
|
16
|
+
checked?: boolean;
|
|
15
17
|
};
|
|
16
18
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,oBAAY,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EACP,SAAS,GACT,OAAO,GACP,SAAS,GACT,aAAa,GACb,UAAU,GACV,mBAAmB,GACnB,mBAAmB,CAAC;CACzB,CAAC;AAEF,oBAAY,WAAW,GAAG;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EACP,SAAS,GACT,OAAO,GACP,SAAS,GACT,aAAa,GACb,UAAU,GACV,mBAAmB,GACnB,mBAAmB,CAAC;IACxB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import { ITableProps } from './types';
|
|
3
|
-
export declare function Table({ selectable, primaryActions, secondaryActions, header, rows,
|
|
3
|
+
export declare function Table({ selectable, primaryActions, secondaryActions, header, rows, ...rest }: ITableProps & ComponentPropsWithoutRef<'table'>): JSX.Element;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Table/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAkD,MAAM,OAAO,CAAC;AAsBjG,OAAO,EAAE,WAAW,EAAkB,MAAM,SAAS,CAAC;AAMtD,wBAAgB,KAAK,CAAC,EACpB,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,MAAM,EACN,IAAI,EACJ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Table/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAkD,MAAM,OAAO,CAAC;AAsBjG,OAAO,EAAE,WAAW,EAAkB,MAAM,SAAS,CAAC;AAMtD,wBAAgB,KAAK,CAAC,EACpB,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,MAAM,EACN,IAAI,EACJ,GAAG,IAAI,EACR,EAAE,WAAW,GAAG,wBAAwB,CAAC,OAAO,CAAC,eA8LjD"}
|
|
@@ -25,16 +25,10 @@ var _GenerateKey = require("../../utils/GenerateKey");
|
|
|
25
25
|
|
|
26
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
27
|
|
|
28
|
-
var _excluded = ["selectable", "primaryActions", "secondaryActions", "header", "rows"
|
|
28
|
+
var _excluded = ["selectable", "primaryActions", "secondaryActions", "header", "rows"];
|
|
29
29
|
|
|
30
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
31
|
|
|
32
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
33
|
-
|
|
34
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
35
|
-
|
|
36
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
37
|
-
|
|
38
32
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
39
33
|
|
|
40
34
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -43,6 +37,12 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
|
|
|
43
37
|
|
|
44
38
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
45
39
|
|
|
40
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
41
|
+
|
|
42
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
43
|
+
|
|
44
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
45
|
+
|
|
46
46
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
47
47
|
|
|
48
48
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -65,7 +65,6 @@ function Table(_ref) {
|
|
|
65
65
|
secondaryActions = _ref.secondaryActions,
|
|
66
66
|
header = _ref.header,
|
|
67
67
|
rows = _ref.rows,
|
|
68
|
-
rowMenuActions = _ref.rowMenuActions,
|
|
69
68
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
70
69
|
|
|
71
70
|
var _useState = (0, _react.useState)([]),
|
|
@@ -96,12 +95,14 @@ function Table(_ref) {
|
|
|
96
95
|
|
|
97
96
|
var rowsWithKey = (0, _react.useMemo)(function () {
|
|
98
97
|
return rows.map(function (row) {
|
|
99
|
-
return {
|
|
100
|
-
key: (0, _GenerateKey.generateKey)()
|
|
101
|
-
|
|
102
|
-
};
|
|
98
|
+
return _objectSpread({
|
|
99
|
+
key: (0, _GenerateKey.generateKey)()
|
|
100
|
+
}, row);
|
|
103
101
|
});
|
|
104
102
|
}, [rows]);
|
|
103
|
+
var haveActions = rows.map(function (row) {
|
|
104
|
+
return !!row.actions;
|
|
105
|
+
}).includes(true);
|
|
105
106
|
var rowCheckboxHandler = (0, _react.useCallback)(function (rowKey, checked) {
|
|
106
107
|
var selectedRowArrayIndex = selectedRows.findIndex(function (i) {
|
|
107
108
|
return i === rowKey;
|
|
@@ -211,7 +212,7 @@ function Table(_ref) {
|
|
|
211
212
|
})
|
|
212
213
|
}, (0, _GenerateKey.generateKey)());
|
|
213
214
|
})]
|
|
214
|
-
}),
|
|
215
|
+
}), haveActions && /*#__PURE__*/(0, _jsxRuntime.jsx)("th", {})]
|
|
215
216
|
})
|
|
216
217
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("tbody", {
|
|
217
218
|
children: rowsWithKey.map(function (row) {
|
|
@@ -225,7 +226,7 @@ function Table(_ref) {
|
|
|
225
226
|
return rowCheckboxHandler(row.key, checked);
|
|
226
227
|
}
|
|
227
228
|
})
|
|
228
|
-
}), row.
|
|
229
|
+
}), row.items.map(function (cell) {
|
|
229
230
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("td", {
|
|
230
231
|
children: typeof cell === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, {
|
|
231
232
|
fontSize: "xxs",
|
|
@@ -233,7 +234,7 @@ function Table(_ref) {
|
|
|
233
234
|
children: cell
|
|
234
235
|
}) : cell
|
|
235
236
|
}, (0, _GenerateKey.generateKey)());
|
|
236
|
-
}), !!
|
|
237
|
+
}), !!row.actions && /*#__PURE__*/(0, _jsxRuntime.jsx)("td", {
|
|
237
238
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_FocusLock.default, {
|
|
238
239
|
isLocked: isMenuOpen.rowId === row.key && isMenuOpen.state,
|
|
239
240
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.MenuItemWrapper, {
|
|
@@ -258,7 +259,7 @@ function Table(_ref) {
|
|
|
258
259
|
}
|
|
259
260
|
},
|
|
260
261
|
isOpen: isMenuOpen.rowId === row.key && isMenuOpen.state,
|
|
261
|
-
items:
|
|
262
|
+
items: row.actions,
|
|
262
263
|
top: 45
|
|
263
264
|
})]
|
|
264
265
|
})
|
|
@@ -37,7 +37,9 @@ var MenuItemWrapper = _styled.default.div(_templateObject4 || (_templateObject4
|
|
|
37
37
|
|
|
38
38
|
exports.MenuItemWrapper = MenuItemWrapper;
|
|
39
39
|
|
|
40
|
-
var VerticalPointsButton = _styled.default.button(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border: 0;\n background-color: transparent;\n font-family: inherit;\n position: relative;\n cursor: pointer;\n\n border-radius: 50%;\n z-index:
|
|
40
|
+
var VerticalPointsButton = _styled.default.button(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border: 0;\n background-color: transparent;\n font-family: inherit;\n position: relative;\n cursor: pointer;\n\n border-radius: 50%;\n z-index: ", ";\n\n padding: 0.5rem;\n\n transition: background-color linear ", ";\n\n &:hover {\n background: rgba(0, 0, 0, 0.08);\n }\n"])), function (props) {
|
|
41
|
+
return props.theme.zIndex.level1;
|
|
42
|
+
}, function (props) {
|
|
41
43
|
return props.theme.transition.speed;
|
|
42
44
|
});
|
|
43
45
|
|
|
@@ -52,7 +54,7 @@ var MenuItemContainer = _styled.default.div(_templateObject6 || (_templateObject
|
|
|
52
54
|
}, function (props) {
|
|
53
55
|
return props.posTop ? props.posTop : 0;
|
|
54
56
|
}, function (props) {
|
|
55
|
-
return props.theme.zIndex.
|
|
57
|
+
return props.theme.zIndex.level2;
|
|
56
58
|
});
|
|
57
59
|
|
|
58
60
|
exports.MenuItemContainer = MenuItemContainer;
|
|
@@ -25,7 +25,9 @@ describe('Table', function () {
|
|
|
25
25
|
it('should render the table component', function () {
|
|
26
26
|
var _setup = setup({
|
|
27
27
|
header: ['Header 1', 'Header 2'],
|
|
28
|
-
rows: [
|
|
28
|
+
rows: [{
|
|
29
|
+
items: ['Row 1', 'Row 2']
|
|
30
|
+
}]
|
|
29
31
|
}),
|
|
30
32
|
container = _setup.container;
|
|
31
33
|
|
|
@@ -34,7 +36,9 @@ describe('Table', function () {
|
|
|
34
36
|
it('should render the table component with selectable prop', function () {
|
|
35
37
|
var _setup2 = setup({
|
|
36
38
|
header: ['Header 1', 'Header 2'],
|
|
37
|
-
rows: [
|
|
39
|
+
rows: [{
|
|
40
|
+
items: ['Row 1', 'Row 2']
|
|
41
|
+
}],
|
|
38
42
|
selectable: true
|
|
39
43
|
}),
|
|
40
44
|
container = _setup2.container;
|
|
@@ -44,13 +48,15 @@ describe('Table', function () {
|
|
|
44
48
|
it('should render the table component with dropdown menu in rows', function () {
|
|
45
49
|
var _setup3 = setup({
|
|
46
50
|
header: ['Header 1', 'Header 2'],
|
|
47
|
-
rows: [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
rows: [{
|
|
52
|
+
items: ['Row 1', 'Row 2'],
|
|
53
|
+
actions: [{
|
|
54
|
+
label: 'Action 1',
|
|
55
|
+
handler: function handler() {}
|
|
56
|
+
}, {
|
|
57
|
+
label: 'Action 2',
|
|
58
|
+
handler: function handler() {}
|
|
59
|
+
}]
|
|
54
60
|
}]
|
|
55
61
|
}),
|
|
56
62
|
container = _setup3.container;
|
|
@@ -60,7 +66,13 @@ describe('Table', function () {
|
|
|
60
66
|
it('should select all elements', function () {
|
|
61
67
|
var _setup4 = setup({
|
|
62
68
|
header: ['Header 1', 'Header 2'],
|
|
63
|
-
rows: [
|
|
69
|
+
rows: [{
|
|
70
|
+
items: ['Row collumn 1', 'Row collumn 2']
|
|
71
|
+
}, {
|
|
72
|
+
items: ['Row collumn 1', 'Row collumn 2']
|
|
73
|
+
}, {
|
|
74
|
+
items: ['Row collumn 1', 'Row collumn 2']
|
|
75
|
+
}],
|
|
64
76
|
selectable: true
|
|
65
77
|
}),
|
|
66
78
|
container = _setup4.container;
|
|
@@ -77,13 +89,33 @@ describe('Table', function () {
|
|
|
77
89
|
|
|
78
90
|
var _setup5 = setup({
|
|
79
91
|
header: ['Header 1', 'Header 2'],
|
|
80
|
-
rows: [
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
92
|
+
rows: [{
|
|
93
|
+
items: ['Row collumn 1', 'Row collumn 2'],
|
|
94
|
+
actions: [{
|
|
95
|
+
label: 'Action 1',
|
|
96
|
+
handler: function handler() {}
|
|
97
|
+
}, {
|
|
98
|
+
label: 'Action 2',
|
|
99
|
+
handler: function handler() {}
|
|
100
|
+
}]
|
|
101
|
+
}, {
|
|
102
|
+
items: ['Row collumn 1', 'Row collumn 2'],
|
|
103
|
+
actions: [{
|
|
104
|
+
label: 'Action 1',
|
|
105
|
+
handler: function handler() {}
|
|
106
|
+
}, {
|
|
107
|
+
label: 'Action 2',
|
|
108
|
+
handler: function handler() {}
|
|
109
|
+
}]
|
|
84
110
|
}, {
|
|
85
|
-
|
|
86
|
-
|
|
111
|
+
items: ['Row collumn 1', 'Row collumn 2'],
|
|
112
|
+
actions: [{
|
|
113
|
+
label: 'Action 1',
|
|
114
|
+
handler: function handler() {}
|
|
115
|
+
}, {
|
|
116
|
+
label: 'Action 2',
|
|
117
|
+
handler: function handler() {}
|
|
118
|
+
}]
|
|
87
119
|
}]
|
|
88
120
|
}),
|
|
89
121
|
container = _setup5.container;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export interface TableAction {
|
|
3
|
-
label:
|
|
3
|
+
label: ReactNode;
|
|
4
4
|
handler: (selectedRows?: string[], allSelected?: boolean) => void;
|
|
5
5
|
}
|
|
6
|
+
export declare type TableRow = {
|
|
7
|
+
items: ReactNode[];
|
|
8
|
+
actions?: TableAction[];
|
|
9
|
+
};
|
|
6
10
|
/** Corresponds to the content displayed inside a table cell. */
|
|
7
11
|
export declare type TableCell = ReactNode;
|
|
8
12
|
export declare type MenuStateProps = {
|
|
@@ -16,12 +20,10 @@ export interface ITableProps {
|
|
|
16
20
|
primaryActions?: TableAction[];
|
|
17
21
|
/** Secondary actions displayed in a dropdown in the header for selected tables. */
|
|
18
22
|
secondaryActions?: TableAction[];
|
|
19
|
-
/** The dropdown actions of the rows */
|
|
20
|
-
rowMenuActions?: TableAction[];
|
|
21
23
|
/** An array containing the labels of the columns to be displayed in the header. */
|
|
22
24
|
header: string[];
|
|
23
25
|
/** An array of TableCell's arrays each matching a row of the table. Each TableCell corresponds to the content displayed inside a table cell. */
|
|
24
|
-
rows:
|
|
26
|
+
rows: TableRow[];
|
|
25
27
|
}
|
|
26
28
|
export interface IMenuItem {
|
|
27
29
|
/** Table row dropdown menu items. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Table/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Table/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE,WAAW,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACnE;AAED,oBAAY,QAAQ,GAAG;IACrB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;CACzB,CAAC;AAEF,gEAAgE;AAChE,oBAAY,SAAS,GAAG,SAAS,CAAC;AAElC,oBAAY,cAAc,GAAG;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,kFAAkF;IAClF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mEAAmE;IACnE,cAAc,CAAC,EAAE,WAAW,EAAE,CAAC;IAC/B,mFAAmF;IACnF,gBAAgB,CAAC,EAAE,WAAW,EAAE,CAAC;IACjC,mFAAmF;IACnF,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,gJAAgJ;IAChJ,IAAI,EAAE,QAAQ,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,SAAS;IACxB,qCAAqC;IACrC,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,qCAAqC;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,kDAAkD;IAClD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,4CAA4C;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|