@digital-ai/dot-components 4.4.2 → 4.6.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/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import React__default, { useState, useRef, useEffect, createContext, useMemo, useContext, forwardRef, useCallback, createElement, Fragment as Fragment$1, useLayoutEffect } from 'react';
4
- import { Tooltip, InputAdornment, InputLabel, TextField, Icon, Typography, Accordion, AccordionSummary, AccordionDetails, AccordionActions, Toolbar, Fade, StyledEngineProvider, Alert, Avatar, Button, Link, List, ListSubheader, Divider, CircularProgress, Popper, MenuList, MenuItem, Paper, ClickAwayListener, Drawer, IconButton, ListItem, ListItemButton, Collapse, ListItemIcon, 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, Snackbar, RadioGroup, Radio, Switch, Skeleton, ButtonGroup, Stepper, Step, StepLabel, StepContent, TablePagination, TableContainer, TableBody, TableCell, TableRow, TableSortLabel, TableHead, Table, Tabs, Tab, LinearProgress, Slide } from '@mui/material';
4
+ import { Tooltip, InputAdornment, InputLabel, TextField, Icon, Typography, Accordion, AccordionSummary, AccordionDetails, AccordionActions, Toolbar, Fade, StyledEngineProvider, Alert, Avatar, Button, Link, List, ListSubheader, Divider, CircularProgress, Popper, MenuList, MenuItem, Paper, ClickAwayListener, Drawer, IconButton, ListItem, ListItemButton, Collapse, ListItemIcon, ListItemText, Badge, useMediaQuery, Chip, Autocomplete, AvatarGroup, Breadcrumbs, ToggleButtonGroup, ToggleButton, Card, CardContent, CardHeader, FormControlLabel, Checkbox, FormControl, FormGroup, FormLabel, FormHelperText, Dialog, DialogContent, DialogActions, useTheme as useTheme$1, Snackbar, RadioGroup, Radio, Switch, Skeleton, ButtonGroup, Stepper, Step, StepLabel, TablePagination, TableContainer, TableBody, TableCell, TableRow, TableSortLabel, TableHead, Table, Tabs, Tab, LinearProgress, Slide } from '@mui/material';
5
5
  import '@digital-ai/dot-icons';
6
6
  import styled, { css, createGlobalStyle, ThemeProvider as ThemeProvider$1, keyframes } from 'styled-components';
7
7
  import { createTheme, ThemeProvider, useTheme } from '@mui/material/styles';
@@ -231,12 +231,26 @@ const StyledTextField = styled(TextField)`
231
231
  &.${rootClassName$1l} {
232
232
  .MuiInputBase-root {
233
233
  margin-bottom: 0;
234
+
235
+ &:not(.MuiAutocomplete-inputRoot) {
236
+ &.MuiInputBase-adornedStart {
237
+ padding-left: ${theme.spacing(1.5)};
238
+ }
239
+ &.MuiInputBase-adornedEnd {
240
+ padding-right: ${theme.spacing(1)};
241
+ }
242
+ }
234
243
  }
235
244
  .MuiInputBase-input {
236
245
  box-sizing: content-box;
237
246
  }
238
247
  .MuiOutlinedInput-input {
239
- padding: ${InputProps.startAdornment ? `18px 12px 18px 0px` : `18px 12px`};
248
+ padding: 18px ${InputProps.endAdornment ? '0px' : '12px'} 18px
249
+ ${InputProps.startAdornment ? '0px' : '12px'};
250
+ &::placeholder {
251
+ opacity: 1;
252
+ color: ${theme.palette.figma.typography.gray};
253
+ }
240
254
  }
241
255
  .MuiInputBase-inputSizeSmall {
242
256
  padding-top: 10.5px;
@@ -276,6 +290,14 @@ const StyledTextField = styled(TextField)`
276
290
  .MuiInputBase-adornedEnd .clear-icon-button.hidden {
277
291
  visibility: hidden;
278
292
  }
293
+
294
+ .${adornmentIconClassName}.MuiInputAdornment-positionStart {
295
+ margin-right: ${theme.spacing(0.5)};
296
+ }
297
+
298
+ .${adornmentIconClassName}.MuiInputAdornment-positionEnd {
299
+ margin: ${theme.spacing(0)};
300
+ }
279
301
  }
280
302
 
281
303
  .dot-select,
@@ -303,8 +325,13 @@ const StyledTextField = styled(TextField)`
303
325
  }
304
326
  }
305
327
 
328
+ .MuiInputLabel-root,
306
329
  .MuiInputLabel-root.Mui-error {
307
- color: ${theme.palette.figma.typography.black};
330
+ color: ${theme.palette.figma.typography.gray};
331
+
332
+ &.MuiInputLabel-shrink {
333
+ color: ${theme.palette.figma.typography.black};
334
+ }
308
335
  }
309
336
 
310
337
  .MuiInputBase-root {
@@ -368,12 +395,6 @@ const StyledTextField = styled(TextField)`
368
395
  }
369
396
  }
370
397
 
371
- .MuiInputBase-inputAdornedStart {
372
- padding-left: 12px;
373
- }
374
- .MuiInputBase-inputAdornedEnd {
375
- padding-right: 12px;
376
- }
377
398
  .MuiFormHelperText-root {
378
399
  ${formHelperTextRootStyles(theme)};
379
400
  }
@@ -4231,12 +4252,17 @@ const DotClickAwayListener = ({
4231
4252
  });
4232
4253
  };
4233
4254
 
4255
+ const TYPEABLE_INPUTS_TYPES = ['date', 'datetime-local', 'email', 'month', 'number', 'password', 'search', 'tel', 'text', 'time', 'url', 'week'];
4256
+ const isTypableElement = element => {
4257
+ const type = element.getAttribute('type');
4258
+ return element.nodeName === 'TEXTAREA' || element.nodeName === 'INPUT' && (!type || TYPEABLE_INPUTS_TYPES.includes(type));
4259
+ };
4234
4260
  const useKeyPress = (key, callback, dependencies) => {
4235
4261
  useEffect(() => {
4236
4262
  if (!key) return;
4237
4263
  const handleKeyPress = event => {
4238
4264
  const element = event.target;
4239
- if (event.key === key && !['INPUT', 'TEXTAREA'].includes(element.nodeName) && !element.isContentEditable) {
4265
+ if (event.key === key && !isTypableElement(element) && !element.isContentEditable) {
4240
4266
  callback();
4241
4267
  }
4242
4268
  };
@@ -6283,6 +6309,15 @@ const DotAppToolbar = ({
6283
6309
  }, index)
6284
6310
  }, index);
6285
6311
  });
6312
+ const getLogoLinkComponent = (accessibilityLabel, customClass, dataTestid, linkHref, component) => {
6313
+ return linkHref ? jsx(DotLink, {
6314
+ ariaLabel: accessibilityLabel,
6315
+ className: customClass,
6316
+ "data-testid": dataTestid,
6317
+ href: linkHref,
6318
+ children: component
6319
+ }) : component;
6320
+ };
6286
6321
  const appToolbar = jsxs(StyledAppToolbar, {
6287
6322
  "aria-label": ariaLabel,
6288
6323
  className: rootClasses,
@@ -6325,27 +6360,34 @@ const DotAppToolbar = ({
6325
6360
  })]
6326
6361
  }), jsxs("div", {
6327
6362
  className: "dot-branding",
6328
- children: [jsx(DotLink, {
6329
- ariaLabel: "Digital.ai Logo",
6330
- className: "primary-logo",
6331
- "data-testid": "primary-logo",
6332
- href: primaryLogoHref,
6333
- children: customLogo ? customLogo : jsx(DotTooltip, {
6334
- "data-testid": "logo-tooltip",
6335
- title: "digital.ai",
6336
- children: jsx(ForwardRef, {})
6337
- })
6338
- }), displayAppLogo && jsx(DotLink, {
6339
- ariaLabel: "Application Logo",
6340
- href: appLogoHref,
6341
- "data-testid": "app-logo",
6342
- children: jsx(DotAppLogo, {
6343
- appLogo: appLogo,
6344
- appLogoSmall: appLogoSmall,
6345
- className: "dot-app-logo",
6346
- smallOnly: !targetBreakpoint
6363
+ children: [getLogoLinkComponent('Digital.ai Logo',
6364
+ // aria-label
6365
+ 'primary-logo',
6366
+ // class name
6367
+ 'primary-logo',
6368
+ // data-testid
6369
+ primaryLogoHref,
6370
+ // href
6371
+ customLogo ? customLogo : jsx(DotTooltip, {
6372
+ "data-testid": "logo-tooltip",
6373
+ title: primaryLogoHref ? 'digital.ai' : '',
6374
+ children: jsx(ForwardRef, {
6375
+ className: !primaryLogoHref ? 'primary-logo' : ''
6347
6376
  })
6348
- })]
6377
+ })), displayAppLogo && getLogoLinkComponent('Application Logo',
6378
+ // aria-label
6379
+ '',
6380
+ // class name
6381
+ 'app-logo',
6382
+ // data-testid
6383
+ appLogoHref,
6384
+ // href
6385
+ jsx(DotAppLogo, {
6386
+ appLogo: appLogo,
6387
+ appLogoSmall: appLogoSmall,
6388
+ className: "dot-app-logo",
6389
+ smallOnly: !targetBreakpoint
6390
+ }))]
6349
6391
  }), children, jsxs("div", {
6350
6392
  className: "dot-right-side",
6351
6393
  children: [navItems.length > 0 && jsx("nav", {
@@ -6372,56 +6414,12 @@ const DotAppToolbar = ({
6372
6414
  }) : appToolbar;
6373
6415
  };
6374
6416
 
6375
- const rootClassName$Y = 'dot-autocomplete';
6376
- const inputRootClassName = 'dot-input-root';
6377
- const inputMediumClassName = 'dot-input-medium';
6378
- const StyledAutocomplete = styled(Autocomplete)`
6379
- ${({
6380
- theme
6381
- }) => css`
6382
- &.${rootClassName$Y} {
6383
- &.${inputMediumClassName} .dot-text-field .${inputRootClassName} {
6384
- height: 56px;
6385
- padding-left: ${theme.spacing(2)};
6386
- }
6387
-
6388
- .MuiInputBase-root.Mui-disabled,
6389
- .${readOnlyClassName$1} .MuiInputBase-root {
6390
- ${readOnlyStyles(theme)};
6391
- }
6392
-
6393
- .${inputRootClassName} {
6394
- /* Override only top/bottom, but preserve left/right padding */
6395
- padding-top: ${theme.spacing(1)};
6396
- padding-bottom: ${theme.spacing(1)};
6397
- }
6398
-
6399
- .dot-chip:first-child {
6400
- margin-left: ${theme.spacing(0)};
6401
- }
6402
-
6403
- .dot-text-field {
6404
- .${inputRootClassName} {
6405
- min-height: ${theme.spacing(5)};
6406
- }
6407
-
6408
- .warning-icon {
6409
- color: ${theme.palette.warning.main};
6410
- }
6411
- .error-icon {
6412
- color: ${theme.palette.error.main};
6413
- }
6414
- }
6415
- }
6416
- `}
6417
- `;
6418
-
6419
- const rootClassName$X = 'dot-chip';
6417
+ const rootClassName$Y = 'dot-chip';
6420
6418
  const StyledChip = styled(Chip)`
6421
6419
  ${({
6422
6420
  theme
6423
6421
  }) => css`
6424
- &.${rootClassName$X} {
6422
+ &.${rootClassName$Y} {
6425
6423
  background: ${theme.palette.figma.neutral.normal};
6426
6424
  border-color: ${theme.palette.figma.border.darker};
6427
6425
  color: ${theme.palette.figma.typography.black};
@@ -6527,7 +6525,7 @@ const DotChip = ({
6527
6525
  charactersLimit = DEFAULT_CHARACTERS_LIMIT,
6528
6526
  children,
6529
6527
  className,
6530
- 'data-pendoid': dataPendoId = rootClassName$X,
6528
+ 'data-pendoid': dataPendoId = rootClassName$Y,
6531
6529
  'data-testid': dataTestId,
6532
6530
  disabled = false,
6533
6531
  error = false,
@@ -6540,7 +6538,7 @@ const DotChip = ({
6540
6538
  tabIndex
6541
6539
  }) => {
6542
6540
  const errorClass = error ? 'Mui-error' : '';
6543
- const rootClasses = useStylesWithRootClass(rootClassName$X, className, errorClass);
6541
+ const rootClasses = useStylesWithRootClass(rootClassName$Y, className, errorClass);
6544
6542
  const getChipLabel = () => {
6545
6543
  if (charactersLimit <= 0 || children.length < charactersLimit) return children;
6546
6544
  const label = `${children.substring(0, charactersLimit)}...`;
@@ -6572,6 +6570,50 @@ const DotChip = ({
6572
6570
  });
6573
6571
  };
6574
6572
 
6573
+ const rootClassName$X = 'dot-autocomplete';
6574
+ const inputRootClassName = 'dot-input-root';
6575
+ const inputMediumClassName = 'dot-input-medium';
6576
+ const StyledAutocomplete = styled(Autocomplete)`
6577
+ ${({
6578
+ theme
6579
+ }) => css`
6580
+ &.${rootClassName$X} {
6581
+ &.${inputMediumClassName} .dot-text-field .${inputRootClassName} {
6582
+ height: 56px;
6583
+ padding-left: ${theme.spacing(2)};
6584
+ }
6585
+
6586
+ .MuiInputBase-root.Mui-disabled,
6587
+ .${readOnlyClassName$1} .MuiInputBase-root {
6588
+ ${readOnlyStyles(theme)};
6589
+ }
6590
+
6591
+ .${inputRootClassName} {
6592
+ /* Override only top/bottom, but preserve left/right padding */
6593
+ padding-top: ${theme.spacing(1)};
6594
+ padding-bottom: ${theme.spacing(1)};
6595
+ }
6596
+
6597
+ .dot-chip:first-child {
6598
+ margin-left: ${theme.spacing(0)};
6599
+ }
6600
+
6601
+ .dot-text-field {
6602
+ .${inputRootClassName} {
6603
+ min-height: ${theme.spacing(5)};
6604
+ }
6605
+
6606
+ .warning-icon {
6607
+ color: ${theme.palette.warning.main};
6608
+ }
6609
+ .error-icon {
6610
+ color: ${theme.palette.error.main};
6611
+ }
6612
+ }
6613
+ }
6614
+ `}
6615
+ `;
6616
+
6575
6617
  // takes multiple types of data from autocomplete selection
6576
6618
  // parses value and returns a string which is saved to state
6577
6619
  const parseAutoCompleteValue = value => {
@@ -6628,6 +6670,11 @@ const isEmptyValue = value => {
6628
6670
  return !value;
6629
6671
  }
6630
6672
  };
6673
+ const getRootClassNames = (className, size) => useStylesWithRootClass(rootClassName$X, size === 'medium' && inputMediumClassName, className);
6674
+ const getTextFieldRootClassNames = (textFieldWarningClassName, isReadOnly) => useStylesWithRootClass(rootClassName$1l, isReadOnly && readOnlyClassName$1, textFieldWarningClassName);
6675
+ const getInputRootClassNames = isDense => useStylesWithRootClass(inputRootClassName, !isDense && inputMediumClassName);
6676
+ const getDefaultAutoCompleteValue = (hasMultiple, defaultValue) => hasMultiple && isString$2(defaultValue) ? [defaultValue] : defaultValue;
6677
+ const getAutoCompleteGroupBy = group => group ? option => option.group : undefined;
6631
6678
 
6632
6679
  function ariaLabelOrAlternates(ariaLabel, label, placeholder) {
6633
6680
  return ariaLabel || label || placeholder;
@@ -6640,7 +6687,7 @@ const DotAutoComplete = ({
6640
6687
  autoFocus,
6641
6688
  autoHighlight,
6642
6689
  className,
6643
- 'data-pendoid': dataPendoId = rootClassName$Y,
6690
+ 'data-pendoid': dataPendoId = rootClassName$X,
6644
6691
  'data-testid': dataTestId,
6645
6692
  defaultValue,
6646
6693
  dense = true,
@@ -6682,12 +6729,18 @@ const DotAutoComplete = ({
6682
6729
  renderTags,
6683
6730
  required = false,
6684
6731
  size = 'small',
6732
+ trimLongOptions = false,
6685
6733
  value,
6686
6734
  warning = false
6687
6735
  }) => {
6688
6736
  const [showPlaceholder, setShowPlaceholder] = useState(isEmptyValue(value) && isEmptyValue(defaultValue));
6689
6737
  const [isOpened, setIsOpened] = useState(false);
6690
6738
  const [inputText, setInputText] = useState('');
6739
+ useEffect(() => {
6740
+ if (trimLongOptions && renderOption) {
6741
+ console.warn('Please use `trimLongOptions` or `renderOption`. If both are used, `trimLongOptions` is ignored.');
6742
+ }
6743
+ }, []);
6691
6744
  // Used for focus management while popper is opened
6692
6745
  const actionItemRef = useRef();
6693
6746
  const onActionItemClick = actionItem === null || actionItem === void 0 ? void 0 : actionItem.onClick;
@@ -6696,9 +6749,9 @@ const DotAutoComplete = ({
6696
6749
  const popperOpen = !readOnly && (open || isOpened);
6697
6750
  const preventDuplicateInsertion = actionItem === null || actionItem === void 0 ? void 0 : actionItem.preventDuplicateInsertion;
6698
6751
  const textFieldWarningClassName = !error && warning && warningClassName;
6699
- const rootClasses = useStylesWithRootClass(rootClassName$Y, size === 'medium' && inputMediumClassName, className);
6700
- const textFieldRootClasses = useStylesWithRootClass(rootClassName$1l, readOnly && readOnlyClassName$1, textFieldWarningClassName);
6701
- const inputRootClasses = useStylesWithRootClass(inputRootClassName, !dense && inputMediumClassName);
6752
+ const rootClasses = getRootClassNames(className, size);
6753
+ const textFieldRootClasses = getTextFieldRootClassNames(textFieldWarningClassName, readOnly);
6754
+ const inputRootClasses = getInputRootClassNames(dense);
6702
6755
  const popperClasses = useStylesWithRootClass(rootClassName$1b, popperClassName);
6703
6756
  let highlightedOption = null;
6704
6757
  let textFieldInput;
@@ -6867,6 +6920,24 @@ const DotAutoComplete = ({
6867
6920
  }), getInputAdornment(), nativeEndAdornment]
6868
6921
  });
6869
6922
  };
6923
+ const renderTrimmedLongOptions = (props, option) => {
6924
+ const key = 'id' in option ? option.id : option.title;
6925
+ return jsx(DotTooltip, {
6926
+ "data-testid": dataTestId && `${dataTestId}-option-tooltip-${key}`,
6927
+ hoverVisibility: "overflow",
6928
+ title: option.title,
6929
+ children: jsx("li", Object.assign({}, props, {
6930
+ children: jsx(DotTypography, {
6931
+ noWrap: true,
6932
+ variant: "body1",
6933
+ children: option.title
6934
+ })
6935
+ }))
6936
+ }, key);
6937
+ };
6938
+ const handleRenderOption = (props, option, state) => {
6939
+ return renderOption ? renderOption(props, option, state) : renderTrimmedLongOptions(props, option);
6940
+ };
6870
6941
  return jsx(StyledAutocomplete, {
6871
6942
  PopperComponent: DotPopper,
6872
6943
  "aria-label": ariaLabel,
@@ -6877,14 +6948,14 @@ const DotAutoComplete = ({
6877
6948
  },
6878
6949
  "data-pendoid": dataPendoId,
6879
6950
  "data-testid": dataTestId,
6880
- defaultValue: multiple && isString$2(defaultValue) ? [defaultValue] : defaultValue,
6951
+ defaultValue: getDefaultAutoCompleteValue(multiple, defaultValue),
6881
6952
  disabled: disabled,
6882
6953
  filterOptions: filterOptions,
6883
6954
  filterSelectedOptions: filterSelectedOptions,
6884
6955
  freeSolo: freesolo,
6885
6956
  getOptionLabel: option => parseAutoCompleteValue(option),
6886
6957
  getOptionDisabled: checkIfOptionDisabled,
6887
- groupBy: group ? option => option.group : undefined,
6958
+ groupBy: getAutoCompleteGroupBy(group),
6888
6959
  id: inputId,
6889
6960
  inputValue: inputValue,
6890
6961
  isOptionEqualToValue: isOptionEqualToValue,
@@ -6975,7 +7046,7 @@ const DotAutoComplete = ({
6975
7046
  );
6976
7047
  },
6977
7048
  renderGroup: group ? renderGroup : undefined,
6978
- renderOption: renderOption,
7049
+ renderOption: renderOption || trimLongOptions ? handleRenderOption : undefined,
6979
7050
  renderTags: handleTagsRender(),
6980
7051
  size: size,
6981
7052
  value: value
@@ -12513,7 +12584,7 @@ function DotDashboardBanner({
12513
12584
  });
12514
12585
  }
12515
12586
  function getDashboardBanner(dashboard, isEdit, onExitEditMode, onPublishChanges, currentUser, modifiedAuthorUser) {
12516
- if (dashboard.is_being_modified && currentUser) {
12587
+ if (dashboard.is_being_modified && currentUser && isEdit) {
12517
12588
  if (dashboard.modified_author_id === currentUser.id) {
12518
12589
  // We're in Edit mode for a published dashboard, and the dashboard is being modified by the current user.
12519
12590
  return jsx(DotDashboardBanner, {
@@ -12762,7 +12833,7 @@ const DotEmptyFilterState = ({
12762
12833
  ariaLabel,
12763
12834
  className,
12764
12835
  'data-testid': dataTestId,
12765
- illustrationId = 'empty',
12836
+ illustrationId = 'no-filters',
12766
12837
  imageAltText = 'no results found'
12767
12838
  }) => {
12768
12839
  return jsx(DotEmptyState, {
@@ -14790,7 +14861,8 @@ const stepListClassName = 'dot-stepper-list';
14790
14861
  const contentClassName = 'dot-stepper-content';
14791
14862
  const StyledStepper = styled.div`
14792
14863
  ${({
14793
- theme
14864
+ theme,
14865
+ offset
14794
14866
  }) => css`
14795
14867
  &.${rootClassName$p} {
14796
14868
  display: flex;
@@ -14806,22 +14878,25 @@ const StyledStepper = styled.div`
14806
14878
  flex-direction: row-reverse;
14807
14879
  }
14808
14880
 
14809
- .MuiStepConnector-root .MuiStepConnector-line {
14810
- border-left: 1px solid ${theme.palette.figma.border.default};
14881
+ &.bottom {
14882
+ flex-direction: column;
14811
14883
  }
14812
14884
 
14813
- .${stepListClassName} {
14814
- padding: ${theme.spacing(3)};
14885
+ &.top {
14886
+ flex-direction: column-reverse;
14887
+ }
14815
14888
 
14816
- &.MuiStepper-horizontal {
14817
- padding: 0;
14818
- display: flex;
14819
- flex-direction: column;
14889
+ .MuiStepConnector-root {
14890
+ .MuiStepConnector-line {
14891
+ border-left: 1px solid ${theme.palette.figma.border.default};
14820
14892
  }
14893
+ &.MuiStepConnector-vertical {
14894
+ display: none;
14895
+ }
14896
+ }
14821
14897
 
14898
+ .${stepListClassName} {
14822
14899
  .MuiStep-root {
14823
- width: 315px;
14824
-
14825
14900
  .dot-icon {
14826
14901
  display: flex;
14827
14902
  background: ${theme.palette.figma.primary.rippleLight};
@@ -14831,101 +14906,113 @@ const StyledStepper = styled.div`
14831
14906
  width: 28px;
14832
14907
  }
14833
14908
 
14834
- .MuiStepContent-root {
14835
- border-left: 1px solid ${theme.palette.figma.border.default};
14909
+ .MuiStepLabel-root {
14910
+ padding: 0px;
14911
+ gap: 8px;
14836
14912
  }
14837
14913
 
14838
- &.MuiStep-horizontal {
14839
- padding: ${theme.spacing(1)};
14914
+ &:hover {
14915
+ cursor: pointer;
14916
+ }
14917
+
14918
+ .MuiStepLabel-labelContainer {
14919
+ overflow: hidden;
14920
+ min-width: 0;
14840
14921
 
14841
- .dot-avatar i:before {
14842
- color: ${theme.palette.figma.icon.disabled};
14843
- }
14844
- .dot-avatar,
14845
- .dot-icon {
14846
- background: ${theme.palette.figma.neutral.active};
14847
- }
14848
14922
  .dot-typography {
14849
- color: ${theme.palette.figma.typography.disabled};
14850
- }
14851
- .horizontal-step-description {
14852
- color: ${theme.palette.figma.typography.gray};
14923
+ white-space: nowrap;
14853
14924
  }
14925
+ }
14854
14926
 
14855
- &:hover {
14856
- cursor: pointer;
14857
- }
14927
+ .MuiStepContent-root {
14928
+ border-left-color: transparent;
14929
+ }
14858
14930
 
14859
- &.completed {
14931
+ &.MuiStep-horizontal {
14932
+ padding: ${theme.spacing(3)};
14933
+
14934
+ &.active:not(&.completed):not(&.in-progress) {
14860
14935
  .dot-avatar i:before {
14861
- color: ${theme.palette.figma.overlay.alerts.success.icon};
14936
+ color: ${theme.palette.figma.icon.black};
14862
14937
  }
14863
- .dot-avatar,
14864
- .dot-icon {
14865
- background: ${theme.palette.figma.overlay.alerts.success.background};
14938
+ }
14939
+
14940
+ &.active {
14941
+ .dot-typography {
14942
+ color: ${theme.palette.figma.primary.normal};
14866
14943
  }
14867
14944
  }
14945
+ }
14946
+
14947
+ &.MuiStep-vertical {
14948
+ width: 315px;
14949
+ padding: 8px 4px 8px 16px;
14868
14950
 
14869
14951
  &.active {
14870
14952
  background: ${theme.palette.figma.border.darker};
14871
14953
  }
14872
14954
 
14873
- &.error {
14874
- .dot-avatar i:before {
14875
- color: ${theme.palette.figma.overlay.alerts.error.icon};
14876
- }
14877
- .dot-avatar,
14878
- .dot-icon {
14879
- background: ${theme.palette.figma.overlay.alerts.error.background};
14880
- }
14955
+ .MuiStepConnector-root {
14956
+ display: none;
14881
14957
  }
14882
14958
 
14883
- &.in-progress {
14884
- .dot-avatar i:before {
14885
- color: ${theme.palette.figma.primary.active};
14886
- }
14959
+ .MuiStepLabel-root {
14960
+ width: 90%;
14961
+ }
14962
+
14963
+ .dot-typography {
14964
+ white-space: nowrap;
14965
+ overflow: hidden;
14966
+ text-overflow: ellipsis;
14887
14967
  }
14888
14968
  }
14889
14969
 
14890
- &.MuiStep-vertical {
14891
- &.completed {
14892
- .dot-typography,
14893
- .dot-icon {
14894
- color: ${theme.palette.figma.typography.black};
14895
- }
14970
+ &.inactive {
14971
+ .step-label.dot-typography {
14972
+ color: ${theme.palette.figma.typography.gray};
14896
14973
  }
14974
+ }
14897
14975
 
14898
- &.active {
14899
- .dot-icon {
14900
- background: ${theme.palette.figma.primary.active};
14901
- color: ${theme.palette.figma.typography.white};
14902
- }
14903
- .step-label.dot-typography {
14904
- color: ${theme.palette.figma.primary.normal};
14905
- }
14906
- .dot-typography {
14907
- color: ${theme.palette.figma.typography.black};
14908
- }
14976
+ &.active {
14977
+ .dot-typography {
14978
+ color: ${theme.palette.figma.typography.black};
14909
14979
  }
14980
+ }
14910
14981
 
14911
- &.inactive .step-label.dot-typography {
14912
- color: ${theme.palette.figma.typography.gray};
14982
+ .dot-avatar i:before {
14983
+ color: ${theme.palette.figma.icon.disabled};
14984
+ }
14985
+
14986
+ .dot-avatar,
14987
+ .dot-icon {
14988
+ background: ${theme.palette.figma.neutral.active};
14989
+ }
14990
+
14991
+ &.completed {
14992
+ .dot-avatar i:before {
14993
+ color: ${theme.palette.figma.overlay.alerts.success.icon};
14913
14994
  }
14995
+ }
14914
14996
 
14915
- &.error {
14916
- .dot-typography {
14917
- color: ${theme.palette.figma.destructive.normal};
14918
- }
14997
+ &.error {
14998
+ .dot-avatar i:before {
14999
+ color: ${theme.palette.figma.overlay.alerts.error.icon};
15000
+ }
15001
+ .dot-typography {
15002
+ color: ${theme.palette.figma.destructive.normal} !important;
15003
+ }
15004
+ }
14919
15005
 
14920
- .dot-icon {
14921
- background: ${theme.palette.figma.background.level0.bckgWhite};
14922
- border: 1px solid ${theme.palette.figma.destructive.normal};
14923
- color: ${theme.palette.figma.destructive.normal};
14924
- }
15006
+ &.in-progress {
15007
+ .dot-avatar i:before {
15008
+ color: ${theme.palette.figma.primary.active};
14925
15009
  }
14926
15010
  }
14927
15011
 
14928
15012
  &.disabled {
15013
+ &:hover {
15014
+ cursor: default;
15015
+ }
14929
15016
  .dot-icon {
14930
15017
  color: ${theme.palette.figma.primary.light};
14931
15018
  }
@@ -14933,16 +15020,28 @@ const StyledStepper = styled.div`
14933
15020
  color: ${theme.palette.figma.typography.disabled};
14934
15021
  }
14935
15022
  }
14936
-
14937
- &:last-of-type .MuiStepContent-root {
14938
- border-left-color: transparent;
14939
- }
14940
15023
  }
14941
15024
  }
14942
15025
 
14943
15026
  .${contentClassName} {
14944
15027
  width: 100%;
14945
15028
 
15029
+ .left {
15030
+ border: 0;
15031
+ }
15032
+ .right {
15033
+ border: 0;
15034
+ }
15035
+
15036
+ .bottom {
15037
+ height: ${`calc(100vh - ${offset}px)`};
15038
+ border: 0;
15039
+ }
15040
+ .top {
15041
+ height: ${`calc(100vh - ${offset}px)`};
15042
+ border: 0;
15043
+ }
15044
+
14946
15045
  .step-content-container {
14947
15046
  padding: ${theme.spacing(3, 3, 2, 3)};
14948
15047
  }
@@ -14955,15 +15054,24 @@ const ScrollbarContainer = styled.div`
14955
15054
  theme,
14956
15055
  offset
14957
15056
  }) => css`
14958
- height: ${`calc(100vh - ${offset}px)`};
14959
15057
  overflow-y: auto;
14960
15058
 
14961
15059
  &.left {
15060
+ height: ${`calc(100vh - ${offset}px)`};
14962
15061
  border-right: 1px solid ${theme.palette.figma.border.default};
14963
15062
  }
14964
15063
  &.right {
15064
+ height: ${`calc(100vh - ${offset}px)`};
14965
15065
  border-left: 1px solid ${theme.palette.figma.border.default};
14966
15066
  }
15067
+ &.bottom {
15068
+ width: 100%;
15069
+ border-bottom: 1px solid ${theme.palette.figma.border.default};
15070
+ }
15071
+ &.top {
15072
+ width: 100%;
15073
+ border-top: 1px solid ${theme.palette.figma.border.default};
15074
+ }
14967
15075
  &.center-content {
14968
15076
  display: flex;
14969
15077
  flex-direction: column;
@@ -14977,13 +15085,8 @@ const StepContentWrapper = styled.div`
14977
15085
  flex: 1;
14978
15086
  display: flex;
14979
15087
  justify-content: center;
14980
- `;
14981
- const StepDescription = styled(DotTypography)`
14982
- ${({
14983
- theme
14984
- }) => css`
14985
- margin-bottom: ${theme.spacing(6)};
14986
- `}
15088
+ width: 100%;
15089
+ height: 100%;
14987
15090
  `;
14988
15091
  const StepActionsContainer = styled.div`
14989
15092
  ${({
@@ -15057,32 +15160,47 @@ const DotStepper = ({
15057
15160
  submitButtonText = 'Complete'
15058
15161
  }) => {
15059
15162
  const [currentStep, setActiveStep] = useState(activeStep);
15163
+ const [stepperOffset, setStepperOffset] = useState(activeStep);
15060
15164
  const [isStickyBottom, setIsStickyBottom] = useState(false);
15061
15165
  const actionsRef = useRef(null);
15062
15166
  const stepperContentRef = useRef(null);
15063
- const isHorizontal = orientation === 'horizontal';
15167
+ const stepperRef = useRef(null);
15064
15168
  const displayInitialContent = initialContent && currentStep === 0;
15065
15169
  const displayFinalContent = finalContent && currentStep > steps.length;
15066
15170
  const displayCancelButton = !!(!displayInitialContent && !displayFinalContent && onCancel);
15067
15171
  const isLastStep = currentStep === steps.length && !finalContent || currentStep > steps.length && finalContent;
15068
- const rootClasses = useStylesWithRootClass(rootClassName$p, stepsPosition, className);
15172
+ const getStepsPosition = () => {
15173
+ if (orientation === 'horizontal') {
15174
+ return ['top', 'bottom'].includes(stepsPosition) ? stepsPosition : 'bottom';
15175
+ } else {
15176
+ return ['left', 'right'].includes(stepsPosition) ? stepsPosition : 'left';
15177
+ }
15178
+ };
15179
+ const rootClasses = useStylesWithRootClass(rootClassName$p, getStepsPosition(), className);
15069
15180
  const stepContentClasses = displayInitialContent || displayFinalContent ? 'center-content' : '';
15070
15181
  const stickyBottomClasses = useStylesWithRootClass('actions-container', isStickyBottom ? 'with-top-border' : '');
15071
15182
  const actionsClasses = useStylesWithRootClass('actions', displayInitialContent || displayFinalContent ? 'center-actions' : '');
15072
15183
  useEffect(() => {
15073
15184
  const actionsElement = actionsRef.current;
15074
15185
  const stepperContentElement = stepperContentRef.current;
15075
- let observer;
15186
+ let intersectionObserver;
15076
15187
  if (actionsElement && stepperContentElement) {
15077
- observer = new IntersectionObserver(([e]) => setIsStickyBottom(e.intersectionRatio < 1), {
15188
+ intersectionObserver = new IntersectionObserver(([e]) => setIsStickyBottom(e.intersectionRatio < 1), {
15078
15189
  root: stepperContentElement,
15079
15190
  rootMargin: '0px 0px -1px 0px',
15080
15191
  threshold: [1]
15081
15192
  });
15082
- observer.observe(actionsElement);
15193
+ intersectionObserver.observe(actionsElement);
15194
+ }
15195
+ const stepperContent = stepperRef.current;
15196
+ let resizeObserver;
15197
+ if (stepperContent) {
15198
+ resizeObserver = new ResizeObserver(([e]) => setStepperOffset(e.contentRect.height));
15199
+ resizeObserver.observe(stepperContent);
15083
15200
  }
15084
15201
  return () => {
15085
- actionsElement && observer.unobserve(actionsElement);
15202
+ actionsElement && intersectionObserver.unobserve(actionsElement);
15203
+ stepperContent && resizeObserver.unobserve(stepperContent);
15086
15204
  };
15087
15205
  }, []);
15088
15206
  useEffect(() => {
@@ -15107,23 +15225,21 @@ const DotStepper = ({
15107
15225
  if (displayFinalContent) return finalContent;
15108
15226
  return (_a = steps.find(step => step.id === id)) === null || _a === void 0 ? void 0 : _a.content;
15109
15227
  };
15110
- const getStepIcon = (iconId, completed, error) => {
15228
+ const getStepIcon = (iconId, completed, error, isActive) => {
15111
15229
  let stepIcon;
15112
15230
  if (completed) {
15113
- stepIcon = isHorizontal ? 'check-solid' : 'check-line';
15231
+ stepIcon = 'check-solid';
15114
15232
  } else if (error) {
15115
15233
  stepIcon = 'error-solid';
15116
- } else if (iconId) {
15234
+ } else if (isActive) {
15117
15235
  stepIcon = iconId;
15118
15236
  } else {
15119
- stepIcon = isHorizontal ? 'circle' : 'edit';
15237
+ stepIcon = 'circle';
15120
15238
  }
15121
- return isHorizontal ? jsx(DotAvatar, {
15239
+ return jsx(DotAvatar, {
15122
15240
  alt: iconId || stepIcon,
15123
15241
  iconId: stepIcon,
15124
15242
  type: "icon"
15125
- }) : jsx(DotIcon, {
15126
- iconId: stepIcon
15127
15243
  });
15128
15244
  };
15129
15245
  const navigateToStep = id => {
@@ -15159,7 +15275,7 @@ const DotStepper = ({
15159
15275
  ref: stepperContentRef,
15160
15276
  children: jsxs(ScrollbarContainer, {
15161
15277
  offset: offset,
15162
- className: stepContentClasses,
15278
+ className: `${stepContentClasses} ${getStepsPosition()}`,
15163
15279
  children: [jsx(CssGrid, {
15164
15280
  className: "step-content-container",
15165
15281
  children: jsx(CssCell, Object.assign({}, defaultCellProps, {
@@ -15205,58 +15321,69 @@ const DotStepper = ({
15205
15321
  })
15206
15322
  });
15207
15323
  };
15324
+ const memoizedSteps = useMemo(() => {
15325
+ return steps.map((step, index) => {
15326
+ const isActive = currentStep === step.id;
15327
+ // Memoize step classes
15328
+ const stepClasses = [step.className, isActive ? 'active' : 'inactive', step.completed ? 'completed' : '', step.disabled ? 'disabled' : '', step.error ? 'error' : '', step.inProgress ? 'in-progress' : ''].join(' ').trim();
15329
+ // Memoize step description
15330
+ const getContent = isString$2(step.description) ? step.description : null;
15331
+ // Memoize step icon
15332
+ const icon = getStepIcon(step.iconId, step.completed, step.error, isActive);
15333
+ return {
15334
+ step,
15335
+ index,
15336
+ isActive,
15337
+ stepClasses,
15338
+ getContent,
15339
+ icon
15340
+ };
15341
+ });
15342
+ }, [steps, currentStep]);
15208
15343
  return jsxs(StyledStepper, {
15209
15344
  className: rootClasses,
15345
+ offset: stepperOffset + offset,
15210
15346
  children: [jsx(ScrollbarContainer, {
15211
- className: stepsPosition,
15347
+ className: getStepsPosition(),
15212
15348
  offset: offset,
15213
15349
  tabIndex: 0,
15350
+ ref: stepperRef,
15214
15351
  children: jsx(Stepper, {
15215
15352
  activeStep: currentStep,
15216
15353
  "aria-label": ariaLabel,
15217
15354
  className: stepListClassName,
15218
15355
  "data-testid": dataTestId,
15219
15356
  orientation: orientation,
15220
- children: steps.map((step, index) => {
15221
- const isActive = currentStep === step.id;
15222
- // TODO: use useStylesWithRootClass here
15223
- const stepClasses = () => {
15224
- return [step.className, isActive ? 'active' : 'inactive', step.completed ? 'completed' : '', step.disabled ? 'disabled' : '', step.error ? 'error' : '', step.inProgress ? 'in-progress' : ''].concat().join(' ').trim();
15225
- };
15226
- const getContent = () => {
15227
- return isString$2(step.description) ? jsx(StepDescription, {
15228
- variant: "body2",
15229
- children: step.description
15230
- }) : step.description;
15231
- };
15232
- const getHorizontalDescription = () => {
15233
- return isString$2(step.description) ? jsx(DotTypography, {
15234
- variant: "body2",
15235
- className: "horizontal-step-description",
15236
- children: step.description
15237
- }) : null;
15238
- };
15239
- return jsxs(Step, {
15240
- active: isActive,
15241
- classes: {
15242
- root: stepClasses()
15243
- },
15244
- completed: step.completed,
15245
- disabled: step.disabled,
15246
- expanded: true,
15247
- children: [jsxs(StepLabel, {
15248
- icon: getStepIcon(step.iconId, step.completed, step.error),
15357
+ children: memoizedSteps.map(({
15358
+ step,
15359
+ index,
15360
+ isActive,
15361
+ stepClasses,
15362
+ getContent,
15363
+ icon
15364
+ }) => jsx(Step, {
15365
+ active: isActive,
15366
+ classes: {
15367
+ root: stepClasses
15368
+ },
15369
+ completed: step.completed,
15370
+ disabled: step.disabled,
15371
+ children: jsx(DotTooltip, {
15372
+ title: getContent,
15373
+ children: jsxs(StepLabel, {
15374
+ icon: icon,
15249
15375
  onClick: () => navigateToStep(step.id),
15250
15376
  children: [jsx(DotTypography, {
15251
15377
  className: "step-label",
15252
- variant: isHorizontal ? 'body1' : 'subtitle1',
15378
+ variant: orientation === 'horizontal' ? 'subtitle1' : 'body1',
15253
15379
  children: step.label
15254
- }), orientation === 'horizontal' && getHorizontalDescription()]
15255
- }), orientation === 'vertical' && jsx(StepContent, {
15256
- children: getContent()
15257
- })]
15258
- }, index);
15259
- })
15380
+ }), orientation === 'vertical' && jsx(DotTypography, {
15381
+ variant: "body2",
15382
+ children: getContent
15383
+ })]
15384
+ })
15385
+ })
15386
+ }, index))
15260
15387
  })
15261
15388
  }), jsx(StepContentWrapper, {
15262
15389
  children: renderContent()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "4.4.2",
3
+ "version": "4.6.0",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [
@@ -2,5 +2,5 @@ export declare const dashboardCategoriesContainerClassName = "dashboard-categori
2
2
  export declare const InlineMessage: import("styled-components").StyledComponent<({ ariaLabel, ariaLevel, ariaRole, className, "data-testid": dataTestId, children, component, noMarginBottom, noWrap, variant, }: import("../../typography/Typography").TypographyProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
3
3
  export declare const StyledPublishConfirmDiv: import("styled-components").StyledComponent<"div", any, {}, never>;
4
4
  export declare const StyledAppSelectDiv: import("styled-components").StyledComponent<"div", any, {}, never>;
5
- export declare const StyledAppSelectDotAutoComplete: import("styled-components").StyledComponent<(<T extends import("../..").AutoCompleteOption>({ ListboxComponent, actionItem, ariaLabel, autoFocus, autoHighlight, className, "data-pendoid": dataPendoId, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, endAdornmentTooltip, error, filterOptions, filterSelectedOptions, freesolo, checkIfOptionDisabled, group, helperText, informationToolTip, inputId, inputRef, inputValue, isOptionEqualToValue, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, persistentLabel, placeholder, popperClassName, popperPlacement, popperZIndex, preserveGroupOrder, readOnly, renderGroup, renderOption, renderTags, required, size, value, warning, }: import("../../auto-complete/AutoComplete").AutoCompleteProps<T>) => import("react/jsx-runtime").JSX.Element), any, {}, never>;
5
+ export declare const StyledAppSelectDotAutoComplete: import("styled-components").StyledComponent<(<T extends import("../..").AutoCompleteOption>({ ListboxComponent, actionItem, ariaLabel, autoFocus, autoHighlight, className, "data-pendoid": dataPendoId, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, endAdornmentTooltip, error, filterOptions, filterSelectedOptions, freesolo, checkIfOptionDisabled, group, helperText, informationToolTip, inputId, inputRef, inputValue, isOptionEqualToValue, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, persistentLabel, placeholder, popperClassName, popperPlacement, popperZIndex, preserveGroupOrder, readOnly, renderGroup, renderOption, renderTags, required, size, trimLongOptions, value, warning, }: import("../../auto-complete/AutoComplete").AutoCompleteProps<T>) => import("react/jsx-runtime").JSX.Element), any, {}, never>;
6
6
  export declare const StyledAppSelectAutoCompleteOption: import("styled-components").StyledComponent<"li", any, {}, never>;
@@ -95,9 +95,11 @@ export interface AutoCompleteProps<T extends AutoCompleteOption = AutoCompleteOp
95
95
  required?: boolean;
96
96
  /** Determines the padding within the input field 'medium' or 'small' */
97
97
  size?: inputSizeOptions;
98
+ /** If true, longs options won't be wrapped into multiple lines but trimmed with ellipsis and a tooltip */
99
+ trimLongOptions?: boolean;
98
100
  /** value if this is a controlled component */
99
101
  value?: AutoCompleteValue;
100
102
  /** If true, the label will be displayed in a warning state. */
101
103
  warning?: boolean;
102
104
  }
103
- export declare const DotAutoComplete: <T extends AutoCompleteOption>({ ListboxComponent, actionItem, ariaLabel, autoFocus, autoHighlight, className, "data-pendoid": dataPendoId, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, endAdornmentTooltip, error, filterOptions, filterSelectedOptions, freesolo, checkIfOptionDisabled, group, helperText, informationToolTip, inputId, inputRef, inputValue, isOptionEqualToValue, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, persistentLabel, placeholder, popperClassName, popperPlacement, popperZIndex, preserveGroupOrder, readOnly, renderGroup, renderOption, renderTags, required, size, value, warning, }: AutoCompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
105
+ export declare const DotAutoComplete: <T extends AutoCompleteOption>({ ListboxComponent, actionItem, ariaLabel, autoFocus, autoHighlight, className, "data-pendoid": dataPendoId, "data-testid": dataTestId, defaultValue, dense, disabled, disablePortal, endAdornmentTooltip, error, filterOptions, filterSelectedOptions, freesolo, checkIfOptionDisabled, group, helperText, informationToolTip, inputId, inputRef, inputValue, isOptionEqualToValue, label, loading, maxHeight, multiple, onBlur, onChange, onClose, onInputChange, onOpen, open, options, persistentLabel, placeholder, popperClassName, popperPlacement, popperZIndex, preserveGroupOrder, readOnly, renderGroup, renderOption, renderTags, required, size, trimLongOptions, value, warning, }: AutoCompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { AutocompleteGetTagProps } from '@mui/material';
2
2
  import { ChipSize } from '../../chip/Chip';
3
3
  import { AutoCompleteOption, AutoCompleteValue } from './interface';
4
+ import { inputSizeOptions } from '../../input-form-fields/InputFormFields.propTypes';
4
5
  export declare const parseAutoCompleteValue: (value: AutoCompleteValue) => string;
5
6
  export interface GetChipsFromAutocompleteProps {
6
7
  chipSize?: ChipSize;
@@ -11,3 +12,8 @@ export interface GetChipsFromAutocompleteProps {
11
12
  export declare const getChipsFromAutocomplete: ({ chipSize, getTagProps, isReadOnly, values, }: GetChipsFromAutocompleteProps) => import("react/jsx-runtime").JSX.Element[];
12
13
  export declare const checkIfDuplicateItem: (itemText: string, autocompleteOptions: AutoCompleteOption[]) => boolean;
13
14
  export declare const isEmptyValue: (value: AutoCompleteValue) => boolean;
15
+ export declare const getRootClassNames: (className: string, size: inputSizeOptions) => string;
16
+ export declare const getTextFieldRootClassNames: (textFieldWarningClassName: string, isReadOnly: boolean) => string;
17
+ export declare const getInputRootClassNames: (isDense: boolean) => string;
18
+ export declare const getDefaultAutoCompleteValue: (hasMultiple: boolean, defaultValue: AutoCompleteValue) => string | AutoCompleteOption | AutoCompleteValue[];
19
+ export declare const getAutoCompleteGroupBy: (group: boolean) => (option: AutoCompleteOption) => string;
@@ -3,7 +3,7 @@ import { CommonProps } from '../CommonProps';
3
3
  import { CssCellProps } from '../css-grid/CssCell';
4
4
  export declare const defaultCellProps: CssCellProps;
5
5
  export type StepperOrientation = 'horizontal' | 'vertical';
6
- export type StepsPosition = 'left' | 'right';
6
+ export type StepsPosition = 'top' | 'bottom' | 'left' | 'right';
7
7
  export interface StepProps extends CommonProps {
8
8
  /** if set to `true` the step will display a checkmark icon */
9
9
  completed?: boolean;
@@ -57,6 +57,7 @@ export interface StepperProps extends CommonProps {
57
57
  /** array of steps to be displayed */
58
58
  steps: StepProps[];
59
59
  /** determines where to display the array of steps */
60
+ /** top/bottom are for horizontal orientation (bottom by default) & left/right for vertical orientation (left by default) */
60
61
  stepsPosition?: StepsPosition;
61
62
  /** if passed, will overwrite the default "submit" button text */
62
63
  submitButtonText?: string;
@@ -4,12 +4,11 @@ export declare const contentClassName = "dot-stepper-content";
4
4
  interface StyledStepActionsContainerProps {
5
5
  displayCancelButton?: boolean;
6
6
  }
7
- export declare const StyledStepper: import("styled-components").StyledComponent<"div", any, {}, never>;
8
7
  interface StyledScrollbarContainerProps {
9
8
  offset?: number;
10
9
  }
10
+ export declare const StyledStepper: import("styled-components").StyledComponent<"div", any, StyledScrollbarContainerProps, never>;
11
11
  export declare const ScrollbarContainer: import("styled-components").StyledComponent<"div", any, StyledScrollbarContainerProps, never>;
12
12
  export declare const StepContentWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
13
- export declare const StepDescription: import("styled-components").StyledComponent<({ ariaLabel, ariaLevel, ariaRole, className, "data-testid": dataTestId, children, component, noMarginBottom, noWrap, variant, }: import("../typography/Typography").TypographyProps) => import("react/jsx-runtime").JSX.Element, any, {}, never>;
14
13
  export declare const StepActionsContainer: import("styled-components").StyledComponent<"div", any, StyledStepActionsContainerProps, never>;
15
14
  export {};
@@ -1 +1,2 @@
1
+ export declare const TYPEABLE_INPUTS_TYPES: string[];
1
2
  export declare const useKeyPress: (key: string, callback: () => void, dependencies: unknown[]) => void;