@veritone-ce/design-system 1.12.14 → 1.12.16
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/assets/theme.js +314 -261
- package/dist/components/Box/__tests__/Box.test.js +15 -9
- package/dist/components/Box/index.js +16 -17
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.js +34 -29
- package/dist/components/Breadcrumbs/__tests__/Breadcrumbs.test.js +25 -14
- package/dist/components/Breadcrumbs/breadcrumbs.theme.js +16 -9
- package/dist/components/Breadcrumbs/index.js +50 -27
- package/dist/components/Button/Button.stories.js +89 -37
- package/dist/components/Button/Indicator.js +32 -17
- package/dist/components/Button/__tests__/Button.test.js +58 -33
- package/dist/components/Button/button.theme.js +121 -102
- package/dist/components/Button/index.js +44 -34
- package/dist/components/Button/useButtonProps.js +17 -15
- package/dist/components/Checkbox/Checkbox.stories.js +46 -16
- package/dist/components/Checkbox/__tests__/Checkbox.test.js +14 -9
- package/dist/components/Checkbox/checkbox.theme.js +23 -16
- package/dist/components/Checkbox/index.js +22 -17
- package/dist/components/CustomSlider/CustomSlider.stories.js +43 -24
- package/dist/components/CustomSlider/index.js +73 -55
- package/dist/components/Drawer/__tests__/Drawer.test.js +15 -9
- package/dist/components/Drawer/index.js +16 -17
- package/dist/components/FileUploader/FileUploader.stories.js +23 -24
- package/dist/components/FileUploader/__tests__/FileUploader.test.js +210 -220
- package/dist/components/FileUploader/index.js +211 -151
- package/dist/components/FileUploader/useUploadFile.js +69 -81
- package/dist/components/FormControlLabel/__tests__/FormControlLabel.test.js +18 -9
- package/dist/components/FormControlLabel/index.js +16 -17
- package/dist/components/HomeOutlinedIcon/HomeOutlinedIcon.stories.js +19 -20
- package/dist/components/HomeOutlinedIcon/__tests__/HomeOutlinedIcon.test.js +14 -9
- package/dist/components/HomeOutlinedIcon/index.js +16 -17
- package/dist/components/IconGroups/IconGroups.stories.js +19 -20
- package/dist/components/IconGroups/__tests__/IconGroups.test.js +14 -9
- package/dist/components/IconGroups/index.js +17 -17
- package/dist/components/IconListItem/__tests__/IconListItem.test.js +14 -9
- package/dist/components/IconListItem/index.js +19 -17
- package/dist/components/Input/Input.stories.js +111 -51
- package/dist/components/Input/__tests__/Input.test.js +13 -9
- package/dist/components/Input/index.js +22 -19
- package/dist/components/Input/input.theme.js +104 -97
- package/dist/components/LinearProgress/LinearProgress.stories.js +42 -28
- package/dist/components/LinearProgress/__tests__/LinearProgress.test.js +39 -17
- package/dist/components/LinearProgress/index.js +71 -21
- package/dist/components/LinearProgress/linearProgress.theme.js +19 -12
- package/dist/components/Link/__tests__/Link.test.js +14 -9
- package/dist/components/Link/index.js +16 -17
- package/dist/components/List/__tests__/List.test.js +14 -9
- package/dist/components/List/index.js +16 -17
- package/dist/components/ListItem/__tests__/ListItem.test.js +14 -9
- package/dist/components/ListItem/index.js +16 -17
- package/dist/components/ListItemButton/__tests__/ListItemButton.test.js +14 -9
- package/dist/components/ListItemButton/index.js +16 -17
- package/dist/components/ListItemText/__tests__/ListItemText.test.js +14 -9
- package/dist/components/ListItemText/index.js +16 -17
- package/dist/components/MenuFlyout/MenuFlyout.stories.js +54 -32
- package/dist/components/MenuFlyout/__tests__/MenuFlyout.test.js +41 -23
- package/dist/components/MenuFlyout/constants.js +12 -3
- package/dist/components/MenuFlyout/index.js +47 -26
- package/dist/components/MenuFlyout/menuFlyout.theme.js +46 -38
- package/dist/components/Modal/Modal.stories.js +190 -95
- package/dist/components/Modal/__tests__/Modal.test.js +16 -9
- package/dist/components/Modal/index.js +30 -17
- package/dist/components/Modal/modal.theme.js +30 -23
- package/dist/components/ModelGridView/ModelGridView.stories.js +40 -43
- package/dist/components/ModelGridView/__tests__/ModelGridView.test.js +47 -42
- package/dist/components/ModelGridView/index.js +258 -150
- package/dist/components/Panel/Panel.stories.js +61 -44
- package/dist/components/Panel/__tests__/Panel.test.js +73 -43
- package/dist/components/Panel/index.js +116 -78
- package/dist/components/ProgressIndicator/DefaultProgress.js +28 -20
- package/dist/components/ProgressIndicator/MLProgress.js +30 -24
- package/dist/components/ProgressIndicator/ProgressIndicator.stories.js +41 -38
- package/dist/components/ProgressIndicator/__tests__/ProgressIndicator.test.js +31 -17
- package/dist/components/ProgressIndicator/index.js +26 -18
- package/dist/components/RadioButton/RadioButton.stories.js +37 -28
- package/dist/components/RadioButton/RadioButton.theme.js +59 -52
- package/dist/components/RadioButton/__tests__/RadioButton.test.js +13 -9
- package/dist/components/RadioButton/index.js +37 -28
- package/dist/components/RadioGroup/__tests__/RadioGroup.test.js +14 -9
- package/dist/components/RadioGroup/index.js +16 -17
- package/dist/components/Select/Select.stories.js +82 -33
- package/dist/components/Select/__tests__/Select.test.js +39 -18
- package/dist/components/Select/index.js +99 -49
- package/dist/components/Select/select.theme.js +58 -51
- package/dist/components/StatusChip/StatusChip.stories.js +57 -43
- package/dist/components/StatusChip/__tests__/StatusChip.test.js +44 -27
- package/dist/components/StatusChip/constants.js +12 -3
- package/dist/components/StatusChip/index.js +28 -22
- package/dist/components/StatusChip/statusChip.theme.js +41 -22
- package/dist/components/Step/__tests__/Step.test.js +14 -9
- package/dist/components/Step/index.js +16 -17
- package/dist/components/StepLabel/__tests__/StepLabel.test.js +14 -9
- package/dist/components/StepLabel/index.js +16 -17
- package/dist/components/Stepper/Stepper.stories.js +37 -21
- package/dist/components/Stepper/__tests__/Stepper.test.js +14 -9
- package/dist/components/Stepper/index.js +15 -5
- package/dist/components/Stepper/stepper.theme.js +52 -45
- package/dist/components/Tabs/Badge.js +29 -10
- package/dist/components/Tabs/Tabs.stories.js +52 -33
- package/dist/components/Tabs/__tests__/Tabs.test.js +41 -14
- package/dist/components/Tabs/index.js +27 -18
- package/dist/components/Tabs/tabs.theme.js +34 -27
- package/dist/components/ThemeProvider/__tests__/Button.test.js +14 -9
- package/dist/components/ThemeProvider/index.js +19 -6
- package/dist/components/Toast/Toast.stories.js +103 -37
- package/dist/components/Toast/__tests__/Toast.test.js +47 -29
- package/dist/components/Toast/index.js +58 -38
- package/dist/components/Typography/Typography.stories.js +20 -20
- package/dist/components/Typography/__tests__/Typography.test.js +15 -9
- package/dist/components/Typography/index.js +16 -17
- package/dist/components/UtilityRail/UtilityRail.stories.js +22 -21
- package/dist/components/UtilityRail/__tests__/UtilityRail.test.js +17 -10
- package/dist/components/UtilityRail/index.js +75 -53
- package/dist/components/UtilityRail/mock.js +32 -32
- package/dist/index.js +223 -31
- package/dist/react-app-env.d.js +2 -0
- package/dist/reportWebVitals.js +26 -11
- package/dist/setupTests.js +3 -5
- package/dist/utils/tests/helpers.js +31 -20
- package/package.json +9 -4
- package/dist/assets/theme.d.ts +0 -59
- package/dist/components/Box/__tests__/Box.test.d.ts +0 -1
- package/dist/components/Box/index.d.ts +0 -6
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -11
- package/dist/components/Breadcrumbs/__tests__/Breadcrumbs.test.d.ts +0 -1
- package/dist/components/Breadcrumbs/breadcrumbs.theme.d.ts +0 -11
- package/dist/components/Breadcrumbs/index.d.ts +0 -15
- package/dist/components/Button/Button.stories.d.ts +0 -7
- package/dist/components/Button/Indicator.d.ts +0 -2
- package/dist/components/Button/__tests__/Button.test.d.ts +0 -1
- package/dist/components/Button/button.theme.d.ts +0 -4
- package/dist/components/Button/index.d.ts +0 -10
- package/dist/components/Button/useButtonProps.d.ts +0 -3
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -5
- package/dist/components/Checkbox/__tests__/Checkbox.test.d.ts +0 -1
- package/dist/components/Checkbox/checkbox.theme.d.ts +0 -18
- package/dist/components/Checkbox/index.d.ts +0 -7
- package/dist/components/CustomSlider/CustomSlider.stories.d.ts +0 -5
- package/dist/components/CustomSlider/index.d.ts +0 -12
- package/dist/components/Drawer/__tests__/Drawer.test.d.ts +0 -1
- package/dist/components/Drawer/index.d.ts +0 -6
- package/dist/components/FileUploader/FileUploader.stories.d.ts +0 -15
- package/dist/components/FileUploader/__tests__/FileUploader.test.d.ts +0 -1
- package/dist/components/FileUploader/index.d.ts +0 -21
- package/dist/components/FileUploader/useUploadFile.d.ts +0 -5
- package/dist/components/FormControlLabel/__tests__/FormControlLabel.test.d.ts +0 -1
- package/dist/components/FormControlLabel/index.d.ts +0 -6
- package/dist/components/HomeOutlinedIcon/HomeOutlinedIcon.stories.d.ts +0 -7
- package/dist/components/HomeOutlinedIcon/__tests__/HomeOutlinedIcon.test.d.ts +0 -1
- package/dist/components/HomeOutlinedIcon/index.d.ts +0 -5
- package/dist/components/IconGroups/IconGroups.stories.d.ts +0 -7
- package/dist/components/IconGroups/__tests__/IconGroups.test.d.ts +0 -1
- package/dist/components/IconGroups/index.d.ts +0 -5
- package/dist/components/IconListItem/__tests__/IconListItem.test.d.ts +0 -1
- package/dist/components/IconListItem/index.d.ts +0 -7
- package/dist/components/Input/Input.stories.d.ts +0 -11
- package/dist/components/Input/__tests__/Input.test.d.ts +0 -1
- package/dist/components/Input/index.d.ts +0 -6
- package/dist/components/Input/input.theme.d.ts +0 -3
- package/dist/components/LinearProgress/LinearProgress.stories.d.ts +0 -14
- package/dist/components/LinearProgress/__tests__/LinearProgress.test.d.ts +0 -1
- package/dist/components/LinearProgress/index.d.ts +0 -27
- package/dist/components/LinearProgress/linearProgress.theme.d.ts +0 -14
- package/dist/components/Link/__tests__/Link.test.d.ts +0 -1
- package/dist/components/Link/index.d.ts +0 -6
- package/dist/components/List/__tests__/List.test.d.ts +0 -1
- package/dist/components/List/index.d.ts +0 -6
- package/dist/components/ListItem/__tests__/ListItem.test.d.ts +0 -1
- package/dist/components/ListItem/index.d.ts +0 -6
- package/dist/components/ListItemButton/__tests__/ListItemButton.test.d.ts +0 -1
- package/dist/components/ListItemButton/index.d.ts +0 -6
- package/dist/components/ListItemText/__tests__/ListItemText.test.d.ts +0 -1
- package/dist/components/ListItemText/index.d.ts +0 -6
- package/dist/components/MenuFlyout/MenuFlyout.stories.d.ts +0 -31
- package/dist/components/MenuFlyout/__tests__/MenuFlyout.test.d.ts +0 -1
- package/dist/components/MenuFlyout/constants.d.ts +0 -3
- package/dist/components/MenuFlyout/index.d.ts +0 -15
- package/dist/components/MenuFlyout/menuFlyout.theme.d.ts +0 -41
- package/dist/components/Modal/Modal.stories.d.ts +0 -15
- package/dist/components/Modal/__tests__/Modal.test.d.ts +0 -1
- package/dist/components/Modal/index.d.ts +0 -11
- package/dist/components/Modal/modal.theme.d.ts +0 -3
- package/dist/components/ModelGridView/ModelGridView.stories.d.ts +0 -5
- package/dist/components/ModelGridView/__tests__/ModelGridView.test.d.ts +0 -1
- package/dist/components/ModelGridView/index.d.ts +0 -13
- package/dist/components/Panel/Panel.stories.d.ts +0 -14
- package/dist/components/Panel/__tests__/Panel.test.d.ts +0 -1
- package/dist/components/Panel/index.d.ts +0 -11
- package/dist/components/ProgressIndicator/DefaultProgress.d.ts +0 -3
- package/dist/components/ProgressIndicator/MLProgress.d.ts +0 -3
- package/dist/components/ProgressIndicator/ProgressIndicator.stories.d.ts +0 -7
- package/dist/components/ProgressIndicator/__tests__/ProgressIndicator.test.d.ts +0 -1
- package/dist/components/ProgressIndicator/index.d.ts +0 -11
- package/dist/components/RadioButton/RadioButton.stories.d.ts +0 -10
- package/dist/components/RadioButton/RadioButton.theme.d.ts +0 -4
- package/dist/components/RadioButton/__tests__/RadioButton.test.d.ts +0 -1
- package/dist/components/RadioButton/index.d.ts +0 -7
- package/dist/components/RadioGroup/__tests__/RadioGroup.test.d.ts +0 -1
- package/dist/components/RadioGroup/index.d.ts +0 -6
- package/dist/components/Select/Select.stories.d.ts +0 -5
- package/dist/components/Select/__tests__/Select.test.d.ts +0 -1
- package/dist/components/Select/index.d.ts +0 -15
- package/dist/components/Select/select.theme.d.ts +0 -53
- package/dist/components/StatusChip/StatusChip.stories.d.ts +0 -51
- package/dist/components/StatusChip/__tests__/StatusChip.test.d.ts +0 -1
- package/dist/components/StatusChip/constants.d.ts +0 -3
- package/dist/components/StatusChip/index.d.ts +0 -28
- package/dist/components/StatusChip/statusChip.theme.d.ts +0 -4
- package/dist/components/Step/__tests__/Step.test.d.ts +0 -1
- package/dist/components/Step/index.d.ts +0 -6
- package/dist/components/StepLabel/__tests__/StepLabel.test.d.ts +0 -1
- package/dist/components/StepLabel/index.d.ts +0 -6
- package/dist/components/Stepper/Stepper.stories.d.ts +0 -21
- package/dist/components/Stepper/__tests__/Stepper.test.d.ts +0 -1
- package/dist/components/Stepper/index.d.ts +0 -13
- package/dist/components/Stepper/stepper.theme.d.ts +0 -50
- package/dist/components/Tabs/Badge.d.ts +0 -7
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -6
- package/dist/components/Tabs/__tests__/Tabs.test.d.ts +0 -1
- package/dist/components/Tabs/index.d.ts +0 -14
- package/dist/components/Tabs/tabs.theme.d.ts +0 -4
- package/dist/components/ThemeProvider/__tests__/Button.test.d.ts +0 -1
- package/dist/components/ThemeProvider/index.d.ts +0 -3
- package/dist/components/Toast/Toast.stories.d.ts +0 -14
- package/dist/components/Toast/__tests__/Toast.test.d.ts +0 -1
- package/dist/components/Toast/index.d.ts +0 -23
- package/dist/components/Typography/Typography.stories.d.ts +0 -20
- package/dist/components/Typography/__tests__/Typography.test.d.ts +0 -1
- package/dist/components/Typography/index.d.ts +0 -6
- package/dist/components/UtilityRail/UtilityRail.stories.d.ts +0 -8
- package/dist/components/UtilityRail/__tests__/UtilityRail.test.d.ts +0 -1
- package/dist/components/UtilityRail/index.d.ts +0 -11
- package/dist/components/UtilityRail/mock.d.ts +0 -2
- package/dist/index.d.ts +0 -31
- package/dist/reportWebVitals.d.ts +0 -3
- package/dist/setupTests.d.ts +0 -1
- package/dist/utils/tests/helpers.d.ts +0 -6
|
@@ -1,31 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Default = void 0;
|
|
7
|
+
var _ = _interopRequireDefault(require("."));
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
const links = [{
|
|
11
|
+
label: 'Home',
|
|
12
|
+
href: '/'
|
|
13
|
+
}, {
|
|
14
|
+
label: 'About',
|
|
15
|
+
href: '/about'
|
|
16
|
+
}, {
|
|
17
|
+
label: 'Contact',
|
|
18
|
+
href: '/contact'
|
|
19
|
+
}];
|
|
20
|
+
var _default = {
|
|
21
|
+
title: 'Components/BreadcrumbsComponent',
|
|
22
|
+
component: _.default,
|
|
23
|
+
argTypes: {
|
|
24
|
+
links: {
|
|
25
|
+
defaultValue: ['.pdf', '.format']
|
|
26
26
|
}
|
|
27
|
+
}
|
|
27
28
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
29
|
+
exports.default = _default;
|
|
30
|
+
const Default = ({
|
|
31
|
+
...args
|
|
32
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
33
|
+
...args,
|
|
34
|
+
links: links
|
|
35
|
+
});
|
|
36
|
+
exports.Default = Default;
|
|
@@ -1,15 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _helpers = require("../../../utils/tests/helpers");
|
|
4
|
+
var _react = require("@testing-library/react");
|
|
5
|
+
var _ = _interopRequireDefault(require(".."));
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
8
|
+
const links = [{
|
|
9
|
+
label: 'Home',
|
|
10
|
+
href: '/'
|
|
11
|
+
}, {
|
|
12
|
+
label: 'About',
|
|
13
|
+
href: '/about'
|
|
14
|
+
}, {
|
|
15
|
+
label: 'Contact',
|
|
16
|
+
href: '/contact'
|
|
17
|
+
}];
|
|
10
18
|
describe('<Breadcrumbs />', () => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
19
|
+
it('should render the Breadcrumbs component', () => {
|
|
20
|
+
(0, _helpers.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
21
|
+
links: links,
|
|
22
|
+
"data-testid": "breadcrumbs"
|
|
23
|
+
}));
|
|
24
|
+
expect(_react.screen.getByTestId('breadcrumbs')).toBeInTheDocument();
|
|
25
|
+
});
|
|
26
|
+
});
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
color: theme.palette.text.disabled
|
|
6
|
-
}
|
|
7
|
-
})
|
|
8
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
9
5
|
});
|
|
10
|
-
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
const breadcrumbs = theme => ({
|
|
8
|
+
styleOverrides: {
|
|
9
|
+
root: () => ({
|
|
10
|
+
'& .MuiBreadcrumbs-separator': {
|
|
11
|
+
color: theme.palette.text.disabled
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
var _default = breadcrumbs;
|
|
17
|
+
exports.default = _default;
|
|
@@ -1,34 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _material = require("@mui/material");
|
|
8
|
+
var _theme = _interopRequireDefault(require("../../assets/theme"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
4
11
|
/**
|
|
5
12
|
* - This is the breadcrumbs component that is used in the header
|
|
6
13
|
* - It takes in an array of links and renders them as breadcrumbs
|
|
7
14
|
* - The last link is not clickable
|
|
8
15
|
* - The last link is styled differently
|
|
9
16
|
**/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
|
|
18
|
+
const BreadcrumbsComponent = ({
|
|
19
|
+
links = []
|
|
20
|
+
}) => {
|
|
21
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Breadcrumbs, {
|
|
22
|
+
"aria-label": "breadcrumbs",
|
|
23
|
+
"data-testid": "breadcrumbs",
|
|
24
|
+
children: links?.map((link, index) => {
|
|
25
|
+
if (index === links.length - 1) {
|
|
26
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
27
|
+
sx: {
|
|
28
|
+
color: _theme.default.palette.text.disabled,
|
|
29
|
+
fontFamily: 'Dosis',
|
|
30
|
+
fontStyle: 'normal',
|
|
31
|
+
fontWeight: 600,
|
|
32
|
+
fontSize: '18px',
|
|
33
|
+
textTransform: 'uppercase'
|
|
34
|
+
},
|
|
35
|
+
children: link.label
|
|
36
|
+
}, index);
|
|
37
|
+
} else {
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Link, {
|
|
39
|
+
href: link.href,
|
|
40
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
41
|
+
sx: {
|
|
42
|
+
color: _theme.default.palette.button.main,
|
|
43
|
+
fontFamily: 'Dosis',
|
|
44
|
+
fontStyle: 'normal',
|
|
45
|
+
fontWeight: 600,
|
|
46
|
+
fontSize: '18px',
|
|
47
|
+
textTransform: 'uppercase'
|
|
48
|
+
},
|
|
49
|
+
children: link.label
|
|
50
|
+
}, index)
|
|
51
|
+
}, link.href);
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
});
|
|
33
55
|
};
|
|
34
|
-
|
|
56
|
+
var _default = BreadcrumbsComponent;
|
|
57
|
+
exports.default = _default;
|
|
@@ -1,47 +1,99 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Text = exports.Outlined = exports.Contained = void 0;
|
|
7
|
+
var _material = require("@mui/material");
|
|
8
|
+
var _ = _interopRequireDefault(require("./"));
|
|
9
|
+
var _CalendarTodayOutlined = _interopRequireDefault(require("@mui/icons-material/CalendarTodayOutlined"));
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
6
13
|
// import { userEvent, within } from '@storybook/testing-library'
|
|
7
14
|
// import { expect } from '@storybook/jest'
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
15
|
+
var _default = {
|
|
16
|
+
title: 'Components/Button',
|
|
17
|
+
component: _.default,
|
|
18
|
+
// argType: {
|
|
19
|
+
// variant: `contained`,
|
|
20
|
+
// },
|
|
21
|
+
parameters: {
|
|
22
|
+
componentSubtitle: 'Clickable Button with many variations',
|
|
23
|
+
controls: {
|
|
24
|
+
exclude: ['variant', 'classes']
|
|
19
25
|
}
|
|
26
|
+
}
|
|
20
27
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
exports.default = _default;
|
|
29
|
+
const previewProps = [{}, {
|
|
30
|
+
startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CalendarTodayOutlined.default, {})
|
|
31
|
+
}, {
|
|
32
|
+
endIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CalendarTodayOutlined.default, {})
|
|
33
|
+
}];
|
|
34
|
+
const Template = args => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
35
|
+
sx: {
|
|
36
|
+
display: `grid`,
|
|
37
|
+
gridTemplateColumns: `repeat(4, min-content)`,
|
|
38
|
+
justifyItems: `flex-start`,
|
|
39
|
+
gap: 2
|
|
40
|
+
},
|
|
41
|
+
children: previewProps.map((props, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_react.Fragment, {
|
|
42
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
43
|
+
...props,
|
|
44
|
+
...args,
|
|
45
|
+
children: "Button"
|
|
46
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
47
|
+
...props,
|
|
48
|
+
color: `error`,
|
|
49
|
+
...args,
|
|
50
|
+
children: "Button"
|
|
51
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
52
|
+
...props,
|
|
53
|
+
disabled: true,
|
|
54
|
+
...args,
|
|
55
|
+
children: "Button"
|
|
56
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
57
|
+
...props,
|
|
58
|
+
isLoading: true,
|
|
59
|
+
...args,
|
|
60
|
+
children: "Button"
|
|
61
|
+
})]
|
|
62
|
+
}, index))
|
|
63
|
+
});
|
|
64
|
+
const Contained = Template.bind({});
|
|
65
|
+
exports.Contained = Contained;
|
|
37
66
|
Contained.args = {
|
|
38
|
-
|
|
67
|
+
variant: 'contained'
|
|
39
68
|
};
|
|
40
|
-
|
|
69
|
+
const Outlined = Template.bind({});
|
|
70
|
+
exports.Outlined = Outlined;
|
|
41
71
|
Outlined.args = {
|
|
42
|
-
|
|
72
|
+
variant: 'outlined'
|
|
43
73
|
};
|
|
44
|
-
|
|
74
|
+
const Text = Template.bind({});
|
|
75
|
+
exports.Text = Text;
|
|
45
76
|
Text.args = {
|
|
46
|
-
|
|
77
|
+
variant: `text`
|
|
47
78
|
};
|
|
79
|
+
|
|
80
|
+
/*
|
|
81
|
+
* New story using the play function.
|
|
82
|
+
* See https://storybook.js.org/docs/react/writing-stories/play-function
|
|
83
|
+
* to learn more about the play function.
|
|
84
|
+
*/
|
|
85
|
+
// export const WithInteractions = (args) => <Button {...args} />;
|
|
86
|
+
// export const WithInteractions = Template.bind({})
|
|
87
|
+
// WithInteractions.args = {
|
|
88
|
+
// href: 'http://storybook.js.org',
|
|
89
|
+
// }
|
|
90
|
+
|
|
91
|
+
// WithInteractions.play = async ({ canvasElement }) => {
|
|
92
|
+
// // Assigns canvas to the component root element
|
|
93
|
+
// const canvas = within(canvasElement)
|
|
94
|
+
// await userEvent.click(canvas.getByRole('link'))
|
|
95
|
+
// expect(canvas.getByRole('link')).toHaveAttribute(
|
|
96
|
+
// 'href',
|
|
97
|
+
// 'http://storybook.js.org',
|
|
98
|
+
// )
|
|
99
|
+
// }
|
|
@@ -1,19 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _material = require("@mui/material");
|
|
8
|
+
var _theme = _interopRequireDefault(require("../../assets/theme"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
4
11
|
const Indicator = () => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
13
|
+
className: "button-loader",
|
|
14
|
+
"data-testid": "loading-indicator",
|
|
15
|
+
sx: {
|
|
16
|
+
position: `absolute`,
|
|
17
|
+
top: 0,
|
|
18
|
+
left: 0,
|
|
19
|
+
right: 0,
|
|
20
|
+
bottom: 0,
|
|
21
|
+
display: `grid`,
|
|
22
|
+
justifyItems: `center`,
|
|
23
|
+
alignItems: `center`,
|
|
24
|
+
background: _theme.default.palette.misc.rowHoverGreyOne,
|
|
25
|
+
border: `1px solid ${_theme.default.palette.misc.rowOnHoverGreyTwo}`,
|
|
26
|
+
borderRadius: '0.2rem'
|
|
27
|
+
},
|
|
28
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.CircularProgress, {
|
|
29
|
+
size: 20
|
|
30
|
+
})
|
|
31
|
+
});
|
|
18
32
|
};
|
|
19
|
-
|
|
33
|
+
var _default = Indicator;
|
|
34
|
+
exports.default = _default;
|
|
@@ -1,34 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _helpers = require("../../../utils/tests/helpers");
|
|
4
|
+
var _react = require("@testing-library/react");
|
|
5
|
+
var _ = _interopRequireDefault(require(".."));
|
|
6
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
7
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
5
8
|
describe('<Button />', () => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
9
|
+
it('should render the Button component', () => {
|
|
10
|
+
(0, _helpers.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
11
|
+
children: "Button"
|
|
12
|
+
}));
|
|
13
|
+
expect(_react.screen.getByText('Button')).toBeInTheDocument();
|
|
14
|
+
});
|
|
15
|
+
it('should render error Button component', () => {
|
|
16
|
+
(0, _helpers.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
17
|
+
color: "error",
|
|
18
|
+
children: "Button"
|
|
19
|
+
}));
|
|
20
|
+
expect(_react.screen.getByText('Button')).toBeInTheDocument();
|
|
21
|
+
});
|
|
22
|
+
it('should render loading Button component', () => {
|
|
23
|
+
(0, _helpers.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
24
|
+
isLoading: true,
|
|
25
|
+
children: "Button"
|
|
26
|
+
}));
|
|
27
|
+
expect(_react.screen.getByTestId('loading-indicator')).toBeInTheDocument();
|
|
28
|
+
});
|
|
29
|
+
it('should render outlined Button component', () => {
|
|
30
|
+
(0, _helpers.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
31
|
+
variant: "outlined",
|
|
32
|
+
children: "Button"
|
|
33
|
+
}));
|
|
34
|
+
expect(_react.screen.getByText('Button')).toBeInTheDocument();
|
|
35
|
+
});
|
|
36
|
+
it('should render error outlined Button component', () => {
|
|
37
|
+
(0, _helpers.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
38
|
+
variant: "outlined",
|
|
39
|
+
color: "error",
|
|
40
|
+
children: "Button"
|
|
41
|
+
}));
|
|
42
|
+
expect(_react.screen.getByText('Button')).toBeInTheDocument();
|
|
43
|
+
});
|
|
44
|
+
it('should render text Button component', () => {
|
|
45
|
+
(0, _helpers.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
46
|
+
variant: "text",
|
|
47
|
+
children: "Button"
|
|
48
|
+
}));
|
|
49
|
+
expect(_react.screen.getByText('Button')).toBeInTheDocument();
|
|
50
|
+
});
|
|
51
|
+
it('should render error text Button component', () => {
|
|
52
|
+
(0, _helpers.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_.default, {
|
|
53
|
+
variant: "text",
|
|
54
|
+
color: "error",
|
|
55
|
+
children: "Button"
|
|
56
|
+
}));
|
|
57
|
+
expect(_react.screen.getByText('Button')).toBeInTheDocument();
|
|
58
|
+
});
|
|
59
|
+
});
|