@digital-ai/dot-components 2.1.1 → 2.2.0

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/CHANGE_LOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.2.0](https://github.com/digital-ai/dot-components/tree/2.2.0) (12/28/2022)
4
+
5
+ [Full Changelog](https://github.com/digital-ai/dot-components/compare/2.1.1...2.2.0)
6
+
7
+ **Features:**
8
+
9
+ - DotDialog should have the option to remove the Cancel button [\#1340](https://github.com/digital-ai/dot-components/issues/1340)
10
+ - S-89332 Add prop for disabling Cancel button from Dialog component [\#1341](https://github.com/digital-ai/dot-components/pull/1341) ([nikolinadapic](https://github.com/nikolinadapic))
11
+ - S-89250: Add setToken method and export the context [\#1339](https://github.com/digital-ai/dot-components/pull/1339) ([jmcnally](https://github.com/jmcnally))
12
+
13
+ **Fixed bugs:**
14
+
15
+ - Button component with type "outlined" is not greyed out when disabled [\#1342](https://github.com/digital-ai/dot-components/issues/1342)
16
+ - D-23687 Button component with type "outlined" is not greyed out when disabled [\#1343](https://github.com/digital-ai/dot-components/pull/1343) ([angel-git](https://github.com/angel-git))
17
+
18
+ **Merged pull requests:**
19
+
20
+ - S-80702: adjust letter spacing of overline, add additional e2e tests [\#1345](https://github.com/digital-ai/dot-components/pull/1345) ([CWSites](https://github.com/CWSites))
21
+ - S-88495: update warning 900 color [\#1344](https://github.com/digital-ai/dot-components/pull/1344) ([CWSites](https://github.com/CWSites))
22
+
3
23
  ## [2.1.1](https://github.com/digital-ai/dot-components/tree/2.1.1) (12/15/2022)
4
24
 
5
25
  [Full Changelog](https://github.com/digital-ai/dot-components/compare/2.1.0...2.1.1)
@@ -164,7 +184,6 @@
164
184
  - Toggle button should have the same height as the input field [\#1260](https://github.com/digital-ai/dot-components/issues/1260)
165
185
  - Align helper text with the content of the input [\#1259](https://github.com/digital-ai/dot-components/issues/1259)
166
186
  - S-87726 Align input content with helper text [\#1265](https://github.com/digital-ai/dot-components/pull/1265) ([nikolinadapic](https://github.com/nikolinadapic))
167
- - S-87620 Adjust height for inputs and for medium sized buttons [\#1263](https://github.com/digital-ai/dot-components/pull/1263) ([nikolinadapic](https://github.com/nikolinadapic))
168
187
  - S-87616 Adjust left margin for helper text [\#1262](https://github.com/digital-ai/dot-components/pull/1262) ([nikolinadapic](https://github.com/nikolinadapic))
169
188
  - S-87599: `DotAutocomplete` Add optional `persistentLabel` prop [\#1258](https://github.com/digital-ai/dot-components/pull/1258) ([dmiletic85](https://github.com/dmiletic85))
170
189
 
@@ -199,7 +218,6 @@
199
218
 
200
219
  - S-86692: component cleanup [\#1238](https://github.com/digital-ai/dot-components/pull/1238) ([CWSites](https://github.com/CWSites))
201
220
  - S-84151: fix e2e tests for Release 2.0 [\#1146](https://github.com/digital-ai/dot-components/pull/1146) ([CWSites](https://github.com/CWSites))
202
- - S-84154: unskip previously failing e2e test `Card` [\#1143](https://github.com/digital-ai/dot-components/pull/1143) ([CWSites](https://github.com/CWSites))
203
221
 
204
222
  **Merged pull requests:**
205
223
 
@@ -214,6 +232,7 @@
214
232
  **Features:**
215
233
 
216
234
  - Add focus state on Avatar With Tooltip component [\#1246](https://github.com/digital-ai/dot-components/issues/1246)
235
+ - S-87620 Adjust height for inputs and for medium sized buttons [\#1263](https://github.com/digital-ai/dot-components/pull/1263) ([nikolinadapic](https://github.com/nikolinadapic))
217
236
  - D-22238 Add focus state for Avatar With Tooltip [\#1248](https://github.com/digital-ai/dot-components/pull/1248) ([nikolinadapic](https://github.com/nikolinadapic))
218
237
  - S-87031: Extended DotPill props to support account list changes [\#1247](https://github.com/digital-ai/dot-components/pull/1247) ([ryangamble](https://github.com/ryangamble))
219
238
 
@@ -692,7 +711,6 @@
692
711
  - D-19691: `Accordion`: Overflowing text when `noWrap` is set to `true` [\#961](https://github.com/digital-ai/dot-components/pull/961) ([dmiletic85](https://github.com/dmiletic85))
693
712
  - D-19558: `AppToolbar`: Hamburger menu back button color is wrong [\#955](https://github.com/digital-ai/dot-components/pull/955) ([dmiletic85](https://github.com/dmiletic85))
694
713
  - D-19633: `Table` action menu items should be left aligned [\#954](https://github.com/digital-ai/dot-components/pull/954) ([dmiletic85](https://github.com/dmiletic85))
695
- - D-19390: `Autocomplete` doesn't have `dot-input` class [\#924](https://github.com/digital-ai/dot-components/pull/924) ([dmiletic85](https://github.com/dmiletic85))
696
714
 
697
715
  **Closed issues:**
698
716
 
@@ -739,6 +757,7 @@
739
757
  - `1.6.0` - Sidebar links broken, import was moved [\#925](https://github.com/digital-ai/dot-components/issues/925)
740
758
  - `Autocomplete` doesn't have `dot-input` class [\#923](https://github.com/digital-ai/dot-components/issues/923)
741
759
  - D-19415: `1.6.0` - Sidebar links broken, import was moved [\#926](https://github.com/digital-ai/dot-components/pull/926) ([dmiletic85](https://github.com/dmiletic85))
760
+ - D-19390: `Autocomplete` doesn't have `dot-input` class [\#924](https://github.com/digital-ai/dot-components/pull/924) ([dmiletic85](https://github.com/dmiletic85))
742
761
 
743
762
  ## [1.6.0](https://github.com/digital-ai/dot-components/tree/1.6.0) (01/03/2022)
744
763
 
@@ -879,7 +898,6 @@
879
898
 
880
899
  - S-76843: setup PR release template [\#853](https://github.com/digital-ai/dot-components/pull/853) ([CWSites](https://github.com/CWSites))
881
900
  - S-76843 automation improvements III [\#852](https://github.com/digital-ai/dot-components/pull/852) ([CWSites](https://github.com/CWSites))
882
- - S-76843: testing out yarn install commands for CI [\#847](https://github.com/digital-ai/dot-components/pull/847) ([CWSites](https://github.com/CWSites))
883
901
 
884
902
  ## [1.3.6](https://github.com/digital-ai/dot-components/tree/1.3.6) (12/10/2021)
885
903
 
@@ -903,6 +921,7 @@
903
921
  **Merged pull requests:**
904
922
 
905
923
  - S-76843: only merge master back to develop AFTER the release is done [\#848](https://github.com/digital-ai/dot-components/pull/848) ([CWSites](https://github.com/CWSites))
924
+ - S-76843: testing out yarn install commands for CI [\#847](https://github.com/digital-ai/dot-components/pull/847) ([CWSites](https://github.com/CWSites))
906
925
 
907
926
  ## [1.3.5](https://github.com/digital-ai/dot-components/tree/1.3.5) (12/03/2021)
908
927
 
@@ -914,7 +933,6 @@
914
933
  - Pass 'disabled' prop to DotDynamicForm controls [\#806](https://github.com/digital-ai/dot-components/issues/806)
915
934
  - S-80473: Expose onFocus and onBlur callbacks for DotInputText and DotInputSelect components [\#832](https://github.com/digital-ai/dot-components/pull/832) ([selsemore](https://github.com/selsemore))
916
935
  - S-80268: `DotDynamicForm` improvements [\#821](https://github.com/digital-ai/dot-components/pull/821) ([dmiletic85](https://github.com/dmiletic85))
917
- - S-80264: Agility wrapper sandbox documentation [\#810](https://github.com/digital-ai/dot-components/pull/810) ([CWSites](https://github.com/CWSites))
918
936
 
919
937
  **Fixed bugs:**
920
938
 
@@ -934,6 +952,7 @@
934
952
  - `DotTable` Provide a way to apply custom classes to table rows and cells [\#643](https://github.com/digital-ai/dot-components/issues/643)
935
953
  - S-80369: Create `ProgressButton` component [\#822](https://github.com/digital-ai/dot-components/pull/822) ([dmiletic85](https://github.com/dmiletic85))
936
954
  - S-79696: change size of collapse icon button, add tooltip [\#819](https://github.com/digital-ai/dot-components/pull/819) ([CWSites](https://github.com/CWSites))
955
+ - S-80264: Agility wrapper sandbox documentation [\#810](https://github.com/digital-ai/dot-components/pull/810) ([CWSites](https://github.com/CWSites))
937
956
  - S-79569: `DotTable` - ability to add classes to rows & cells [\#799](https://github.com/digital-ai/dot-components/pull/799) ([monapatel91](https://github.com/monapatel91))
938
957
 
939
958
  **Fixed bugs:**
package/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import { useState, useEffect, useRef, useMemo, createContext, useContext, forwardRef, Fragment, createElement, useCallback } from 'react';
3
+ import { useState, useEffect, useRef, useMemo, useContext, createContext, forwardRef, Fragment, createElement, useCallback } from 'react';
4
4
  import { Tooltip, Icon, Typography, Accordion, AccordionSummary, AccordionDetails, AccordionActions, InputAdornment, InputLabel, TextField, Toolbar, Alert, Fade, Avatar, Link, CircularProgress, Popper, MenuList, MenuItem, Paper, ClickAwayListener, IconButton, Button, darken, List, ListItem, Drawer, ListItemIcon, Collapse, ListSubheader, Divider, ListItemText, Badge, useMediaQuery, Autocomplete, Chip, AvatarGroup, Breadcrumbs, ToggleButtonGroup, ToggleButton, Card, CardContent, CardHeader, FormControlLabel, Checkbox, FormControl, FormGroup, FormLabel, FormHelperText, Dialog, DialogContent, DialogActions, useTheme as useTheme$1, RadioGroup, Radio, Switch, Skeleton, Snackbar, ButtonGroup, TablePagination, TableContainer, TableCell, TableRow, TableBody, TableSortLabel, TableHead, Table, Tabs, Tab, LinearProgress } from '@mui/material';
5
5
  import styled, { css, createGlobalStyle, ThemeProvider as ThemeProvider$1, keyframes } from 'styled-components';
6
6
  import { createTheme, ThemeProvider, alpha, useTheme } from '@mui/material/styles';
@@ -343,7 +343,7 @@ const o500 = '#ff9e49';
343
343
  const o600 = '#ff9642';
344
344
  const o700 = '#ff8c39';
345
345
  const o800 = '#ff8231';
346
- const o900 = '#ff7021';
346
+ const o900 = '#f05e1d';
347
347
  const oA100 = '#ffffff';
348
348
  const oA200 = '#ffffff';
349
349
  const oA400 = '#ffe0d0';
@@ -600,7 +600,7 @@ const typographyOptions = {
600
600
  overline: {
601
601
  fontSize: 11,
602
602
  lineHeight: '14px',
603
- letterSpacing: '0.03em',
603
+ letterSpacing: '0.05em',
604
604
  textTransform: 'uppercase',
605
605
  marginBottom: 3
606
606
  },
@@ -1507,11 +1507,15 @@ const DotCoreApiProvider = ({
1507
1507
  setApplicationsError(error);
1508
1508
  }
1509
1509
  };
1510
+ const setToken = newToken => {
1511
+ OpenAPI.TOKEN = newToken;
1512
+ };
1510
1513
  const DotCoreApiValues = {
1511
1514
  applications,
1512
1515
  applicationsLoading,
1513
1516
  applicationsError,
1514
- loadApplications
1517
+ loadApplications,
1518
+ setToken
1515
1519
  };
1516
1520
  const memoizedValues = useMemo(() => DotCoreApiValues, [applications, applicationsError, applicationsLoading]);
1517
1521
  if (apiUrl && OpenAPI.BASE !== apiUrl) {
@@ -2280,7 +2284,7 @@ const StyledButton = styled(Button).withConfig({
2280
2284
  componentId: "sx99hh-0"
2281
2285
  })(["", ""], ({
2282
2286
  theme
2283
- }) => css(["&.", "{margin:", ";min-width:auto;white-space:nowrap;&.MuiButton-outlined{border-color:rgba(0,0,0,0.23);color:", ";}&:not(.MuiButton-sizeLarge):not(.MuiButton-sizeSmall){height:", ";}&.MuiButton-containedSecondary{background-color:", ";&:hover,&:active{background-color:", ";}}&.MuiButton-text{padding:6px 16px;}.dot-icon{padding:0;i{height:auto;}}}"], rootClassName$P, theme.spacing(0.5), theme.palette.grey[700], theme.spacing(5), theme.palette.error.main, darken(theme.palette.error.main, 0.2)));
2287
+ }) => css(["&.", "{margin:", ";min-width:auto;white-space:nowrap;&.MuiButton-outlined:not([disabled]){border-color:rgba(0,0,0,0.23);color:", ";}&:not(.MuiButton-sizeLarge):not(.MuiButton-sizeSmall){height:", ";}&.MuiButton-containedSecondary{background-color:", ";&:hover,&:active{background-color:", ";}}&.MuiButton-text{padding:6px 16px;}.dot-icon{padding:0;i{height:auto;}}}"], rootClassName$P, theme.spacing(0.5), theme.palette.grey[700], theme.spacing(5), theme.palette.error.main, darken(theme.palette.error.main, 0.2)));
2284
2288
 
2285
2289
  /** This component wraps the Button component from @material-ui. */
2286
2290
  const DotButton = /*#__PURE__*/forwardRef(({
@@ -4665,6 +4669,7 @@ const StyledDialog = styled(Dialog).withConfig({
4665
4669
  const DotDialog = ({
4666
4670
  ariaLabel,
4667
4671
  cancelButtonProps,
4672
+ cancelButtonVisible: _cancelButtonVisible = true,
4668
4673
  className,
4669
4674
  'data-testid': dataTestId,
4670
4675
  children,
@@ -4727,12 +4732,12 @@ const DotDialog = ({
4727
4732
  }
4728
4733
  }, {
4729
4734
  children: renderNodeOrTypography(children)
4730
- }), void 0), jsxs(DialogActions, Object.assign({
4735
+ }), void 0), (_hasPrimaryAction || _cancelButtonVisible) && jsxs(DialogActions, Object.assign({
4731
4736
  classes: {
4732
4737
  root: `dot-dialog-actions`
4733
4738
  }
4734
4739
  }, {
4735
- children: [jsx(DotButton, Object.assign({
4740
+ children: [_cancelButtonVisible && jsx(DotButton, Object.assign({
4736
4741
  autoFocus: cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.autoFocus,
4737
4742
  className: cancelClasses,
4738
4743
  "data-testid": cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps['data-testid'],
@@ -8611,4 +8616,4 @@ const DotLinearProgress = ({
8611
8616
  }, void 0);
8612
8617
  };
8613
8618
 
8614
- export { Cell, CreateUUID, CssCell, CssGrid, CssGridDebug, DotAccordion, DotActionToolbar, DotAlertBanner, DotAppLogo, DotAppSwitcher, DotAppToolbar, DotAutoComplete, DotAvatar, DotAvatarGroup, DotBadge, DotBreadcrumbs, DotButton, DotButtonToggle, DotCard, DotCardContent, DotCardFooter, DotCardHeader, DotCheckbox, DotCheckboxGroup, DotChip, DotConfirmationDialog, DotCoreApiProvider, DotDialog, DotDivider, DotDraggableList, DotDrawer, DotDynamicForm, DotEmptyState, DotFileListItem, DotFileUpload, DotForm, DotFormGroup, DotHeaderRow, DotIcon, DotIconButton, DotInlineEdit, DotInputSelect, DotInputText, DotLinearProgress, DotLink, DotList, DotMenu, DotNavigationRail, DotPill, DotPopper, DotProgress, DotProgressButton, DotRadioButton, DotRadioGroup, DotSidebar, DotSkeleton, DotSnackbar, DotSnackbarContainer, DotSnackbarProvider, DotSplitButton, DotSwitch, DotTable, DotTableAction, DotTableActions, DotTablePagination, DotTabs, DotThemeProvider, DotTooltip, DotTruncateWithTooltip, DotTypography, avatarColors, lightThemeColors as lightColors, parseAutoCompleteValue, variables as themeVariables, typographyOptions, useDotSnackbarContext };
8619
+ export { Cell, CreateUUID, CssCell, CssGrid, CssGridDebug, DotAccordion, DotActionToolbar, DotAlertBanner, DotAppLogo, DotAppSwitcher, DotAppToolbar, DotAutoComplete, DotAvatar, DotAvatarGroup, DotBadge, DotBreadcrumbs, DotButton, DotButtonToggle, DotCard, DotCardContent, DotCardFooter, DotCardHeader, DotCheckbox, DotCheckboxGroup, DotChip, DotConfirmationDialog, DotCoreApiProvider, DotDialog, DotDivider, DotDraggableList, DotDrawer, DotDynamicForm, DotEmptyState, DotFileListItem, DotFileUpload, DotForm, DotFormGroup, DotHeaderRow, DotIcon, DotIconButton, DotInlineEdit, DotInputSelect, DotInputText, DotLinearProgress, DotLink, DotList, DotMenu, DotNavigationRail, DotPill, DotPopper, DotProgress, DotProgressButton, DotRadioButton, DotRadioGroup, DotSidebar, DotSkeleton, DotSnackbar, DotSnackbarContainer, DotSnackbarProvider, DotSplitButton, DotSwitch, DotTable, DotTableAction, DotTableActions, DotTablePagination, DotTabs, DotThemeProvider, DotTooltip, DotTruncateWithTooltip, DotTypography, avatarColors, lightThemeColors as lightColors, parseAutoCompleteValue, variables as themeVariables, typographyOptions, useDotCoreApiContext, useDotSnackbarContext };
package/index.umd.js CHANGED
@@ -466,7 +466,7 @@
466
466
  var o600 = '#ff9642';
467
467
  var o700 = '#ff8c39';
468
468
  var o800 = '#ff8231';
469
- var o900 = '#ff7021';
469
+ var o900 = '#f05e1d';
470
470
  var oA100 = '#ffffff';
471
471
  var oA200 = '#ffffff';
472
472
  var oA400 = '#ffe0d0';
@@ -723,7 +723,7 @@
723
723
  overline: {
724
724
  fontSize: 11,
725
725
  lineHeight: '14px',
726
- letterSpacing: '0.03em',
726
+ letterSpacing: '0.05em',
727
727
  textTransform: 'uppercase',
728
728
  marginBottom: 3
729
729
  },
@@ -1687,11 +1687,15 @@
1687
1687
  setApplicationsError(error);
1688
1688
  }
1689
1689
  };
1690
+ var setToken = function setToken(newToken) {
1691
+ OpenAPI.TOKEN = newToken;
1692
+ };
1690
1693
  var DotCoreApiValues = {
1691
1694
  applications: applications,
1692
1695
  applicationsLoading: applicationsLoading,
1693
1696
  applicationsError: applicationsError,
1694
- loadApplications: loadApplications
1697
+ loadApplications: loadApplications,
1698
+ setToken: setToken
1695
1699
  };
1696
1700
  var memoizedValues = React.useMemo(function () {
1697
1701
  return DotCoreApiValues;
@@ -2519,7 +2523,7 @@
2519
2523
  componentId: "sx99hh-0"
2520
2524
  })(templateObject_2$R || (templateObject_2$R = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
2521
2525
  var theme = _a.theme;
2522
- return styled.css(templateObject_1$U || (templateObject_1$U = __makeTemplateObject(["\n &.", " {\n margin: ", ";\n min-width: auto;\n white-space: nowrap;\n\n &.MuiButton-outlined {\n border-color: rgba(0, 0, 0, 0.23);\n color: ", ";\n }\n\n &:not(.MuiButton-sizeLarge):not(.MuiButton-sizeSmall) {\n /* Override height for medium size */\n height: ", ";\n }\n\n &.MuiButton-containedSecondary {\n background-color: ", ";\n\n &:hover,\n &:active {\n background-color: ", ";\n }\n }\n\n &.MuiButton-text {\n padding: 6px 16px;\n }\n\n .dot-icon {\n padding: 0;\n\n i {\n height: auto;\n }\n }\n }\n "], ["\n &.", " {\n margin: ", ";\n min-width: auto;\n white-space: nowrap;\n\n &.MuiButton-outlined {\n border-color: rgba(0, 0, 0, 0.23);\n color: ", ";\n }\n\n &:not(.MuiButton-sizeLarge):not(.MuiButton-sizeSmall) {\n /* Override height for medium size */\n height: ", ";\n }\n\n &.MuiButton-containedSecondary {\n background-color: ", ";\n\n &:hover,\n &:active {\n background-color: ", ";\n }\n }\n\n &.MuiButton-text {\n padding: 6px 16px;\n }\n\n .dot-icon {\n padding: 0;\n\n i {\n height: auto;\n }\n }\n }\n "])), rootClassName$P, theme.spacing(0.5), theme.palette.grey[700], theme.spacing(5), theme.palette.error.main, material.darken(theme.palette.error.main, 0.2));
2526
+ return styled.css(templateObject_1$U || (templateObject_1$U = __makeTemplateObject(["\n &.", " {\n margin: ", ";\n min-width: auto;\n white-space: nowrap;\n\n &.MuiButton-outlined:not([disabled]) {\n border-color: rgba(0, 0, 0, 0.23);\n color: ", ";\n }\n\n &:not(.MuiButton-sizeLarge):not(.MuiButton-sizeSmall) {\n /* Override height for medium size */\n height: ", ";\n }\n\n &.MuiButton-containedSecondary {\n background-color: ", ";\n\n &:hover,\n &:active {\n background-color: ", ";\n }\n }\n\n &.MuiButton-text {\n padding: 6px 16px;\n }\n\n .dot-icon {\n padding: 0;\n\n i {\n height: auto;\n }\n }\n }\n "], ["\n &.", " {\n margin: ", ";\n min-width: auto;\n white-space: nowrap;\n\n &.MuiButton-outlined:not([disabled]) {\n border-color: rgba(0, 0, 0, 0.23);\n color: ", ";\n }\n\n &:not(.MuiButton-sizeLarge):not(.MuiButton-sizeSmall) {\n /* Override height for medium size */\n height: ", ";\n }\n\n &.MuiButton-containedSecondary {\n background-color: ", ";\n\n &:hover,\n &:active {\n background-color: ", ";\n }\n }\n\n &.MuiButton-text {\n padding: 6px 16px;\n }\n\n .dot-icon {\n padding: 0;\n\n i {\n height: auto;\n }\n }\n }\n "])), rootClassName$P, theme.spacing(0.5), theme.palette.grey[700], theme.spacing(5), theme.palette.error.main, material.darken(theme.palette.error.main, 0.2));
2523
2527
  });
2524
2528
  var templateObject_1$U, templateObject_2$R;
2525
2529
 
@@ -5076,14 +5080,16 @@
5076
5080
  var DotDialog = function DotDialog(_a) {
5077
5081
  var ariaLabel = _a.ariaLabel,
5078
5082
  cancelButtonProps = _a.cancelButtonProps,
5083
+ _b = _a.cancelButtonVisible,
5084
+ cancelButtonVisible = _b === void 0 ? true : _b,
5079
5085
  className = _a.className,
5080
5086
  dataTestId = _a["data-testid"],
5081
5087
  children = _a.children,
5082
5088
  closeIconVisible = _a.closeIconVisible,
5083
- _b = _a.closeOnClickAway,
5084
- closeOnClickAway = _b === void 0 ? true : _b,
5085
- _c = _a.hasPrimaryAction,
5086
- hasPrimaryAction = _c === void 0 ? true : _c,
5089
+ _c = _a.closeOnClickAway,
5090
+ closeOnClickAway = _c === void 0 ? true : _c,
5091
+ _d = _a.hasPrimaryAction,
5092
+ hasPrimaryAction = _d === void 0 ? true : _d,
5087
5093
  onCancel = _a.onCancel,
5088
5094
  onSubmit = _a.onSubmit,
5089
5095
  open = _a.open,
@@ -5091,9 +5097,9 @@
5091
5097
  title = _a.title;
5092
5098
  var rootClasses = useStylesWithRootClass(rootClassName$u, className);
5093
5099
  var cancelClasses = useStylesWithRootClass(cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.className, 'cancel-button');
5094
- var _d = React.useState(open),
5095
- isOpen = _d[0],
5096
- setIsOpen = _d[1];
5100
+ var _e = React.useState(open),
5101
+ isOpen = _e[0],
5102
+ setIsOpen = _e[1];
5097
5103
  React.useEffect(function () {
5098
5104
  setIsOpen(open);
5099
5105
  }, [open]);
@@ -5141,12 +5147,12 @@
5141
5147
  }
5142
5148
  }, {
5143
5149
  children: renderNodeOrTypography(children)
5144
- }), void 0), jsxRuntime.jsxs(material.DialogActions, __assign({
5150
+ }), void 0), (hasPrimaryAction || cancelButtonVisible) && jsxRuntime.jsxs(material.DialogActions, __assign({
5145
5151
  classes: {
5146
5152
  root: "dot-dialog-actions"
5147
5153
  }
5148
5154
  }, {
5149
- children: [jsxRuntime.jsx(DotButton, __assign({
5155
+ children: [cancelButtonVisible && jsxRuntime.jsx(DotButton, __assign({
5150
5156
  autoFocus: cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps.autoFocus,
5151
5157
  className: cancelClasses,
5152
5158
  "data-testid": cancelButtonProps === null || cancelButtonProps === void 0 ? void 0 : cancelButtonProps['data-testid'],
@@ -9411,6 +9417,7 @@
9411
9417
  exports.parseAutoCompleteValue = parseAutoCompleteValue;
9412
9418
  exports.themeVariables = variables;
9413
9419
  exports.typographyOptions = typographyOptions;
9420
+ exports.useDotCoreApiContext = useDotCoreApiContext;
9414
9421
  exports.useDotSnackbarContext = useDotSnackbarContext;
9415
9422
 
9416
9423
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -10,6 +10,7 @@ interface DotCoreApiContextProps {
10
10
  applicationsError: ApiError;
11
11
  applicationsLoading: boolean;
12
12
  loadApplications: (accountId: string, force?: boolean) => void;
13
+ setToken: (token: string) => void;
13
14
  }
14
15
  export declare const DotCoreApiProvider: ({ apiUrl, token, children, }: CoreApiProviderProps) => JSX.Element;
15
16
  export declare const useDotCoreApiContext: () => DotCoreApiContextProps;
@@ -16,6 +16,8 @@ export interface SubmitButtonProps extends DialogButtonProps {
16
16
  export interface DialogProps extends CommonProps {
17
17
  /** props passed down to the cancel button */
18
18
  cancelButtonProps?: DialogButtonProps;
19
+ /** boolean that toggles existence of the Cancel button */
20
+ cancelButtonVisible?: boolean;
19
21
  /** components or string that is displayed in the dialog body */
20
22
  children?: ReactNode;
21
23
  /** boolean that toggles visibility of close icon on top right of dialog header*/
@@ -35,4 +37,4 @@ export interface DialogProps extends CommonProps {
35
37
  /** dialog heading */
36
38
  title: ReactNode;
37
39
  }
38
- export declare const DotDialog: ({ ariaLabel, cancelButtonProps, className, "data-testid": dataTestId, children, closeIconVisible, closeOnClickAway, hasPrimaryAction, onCancel, onSubmit, open, submitButtonProps, title, }: DialogProps) => JSX.Element;
40
+ export declare const DotDialog: ({ ariaLabel, cancelButtonProps, cancelButtonVisible, className, "data-testid": dataTestId, children, closeIconVisible, closeOnClickAway, hasPrimaryAction, onCancel, onSubmit, open, submitButtonProps, title, }: DialogProps) => JSX.Element;
@@ -54,7 +54,7 @@ export { DotCheckbox } from './checkbox/Checkbox';
54
54
  export { DotCheckboxGroup } from './checkbox/CheckboxGroup';
55
55
  export { DotChip } from './chip/Chip';
56
56
  export { DotConfirmationDialog } from './confirmation-dialog/ConfirmationDialog';
57
- export { DotCoreApiProvider } from './core-api/CoreApiProvider';
57
+ export { DotCoreApiProvider, useDotCoreApiContext, } from './core-api/CoreApiProvider';
58
58
  export { Cell, CssCell } from './css-grid/CssCell';
59
59
  export { CssGrid } from './css-grid/CssGrid';
60
60
  export { CssGridDebug } from './css-grid/CssGridDebug';
@@ -52,7 +52,7 @@ export declare const o500 = "#ff9e49";
52
52
  export declare const o600 = "#ff9642";
53
53
  export declare const o700 = "#ff8c39";
54
54
  export declare const o800 = "#ff8231";
55
- export declare const o900 = "#ff7021";
55
+ export declare const o900 = "#f05e1d";
56
56
  export declare const oA100 = "#ffffff";
57
57
  export declare const oA200 = "#ffffff";
58
58
  export declare const oA400 = "#ffe0d0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [