@digital-ai/dot-components 4.7.0 → 4.8.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
@@ -12791,6 +12791,12 @@ function DotDashboardHeader({
12791
12791
  }
12792
12792
 
12793
12793
  const rootClassName$C = 'dot-empty-state';
12794
+ const emptyStateImageSizing = {
12795
+ xsmall: 9,
12796
+ dense: 15,
12797
+ normal: 31,
12798
+ large: 49
12799
+ };
12794
12800
  const StyledEmptyState = styled.div`
12795
12801
  ${({
12796
12802
  theme
@@ -12806,8 +12812,10 @@ const StyledEmptyState = styled.div`
12806
12812
  }
12807
12813
 
12808
12814
  .empty-state-image {
12815
+ display: inline-flex;
12816
+ justify-content: center;
12809
12817
  min-height: ${theme.spacing(10)};
12810
- margin-bottom: ${theme.spacing(5)};
12818
+ margin-bottom: ${theme.spacing(3)};
12811
12819
  }
12812
12820
 
12813
12821
  h2 {
@@ -12821,6 +12829,34 @@ const StyledEmptyState = styled.div`
12821
12829
  .dot-button {
12822
12830
  margin-top: ${theme.spacing(4)};
12823
12831
  }
12832
+
12833
+ &.xsmall {
12834
+ .empty-state-image {
12835
+ height: ${theme.spacing(emptyStateImageSizing.xsmall)};
12836
+ width: ${theme.spacing(emptyStateImageSizing.xsmall)};
12837
+ }
12838
+ }
12839
+
12840
+ &.dense {
12841
+ .empty-state-image {
12842
+ height: ${theme.spacing(emptyStateImageSizing.dense)};
12843
+ width: ${theme.spacing(emptyStateImageSizing.dense)};
12844
+ }
12845
+ }
12846
+
12847
+ &.normal {
12848
+ .empty-state-image {
12849
+ height: ${theme.spacing(emptyStateImageSizing.normal)};
12850
+ width: ${theme.spacing(emptyStateImageSizing.normal)};
12851
+ }
12852
+ }
12853
+
12854
+ &.large {
12855
+ .empty-state-image {
12856
+ height: ${theme.spacing(emptyStateImageSizing.large)};
12857
+ width: ${theme.spacing(emptyStateImageSizing.large)};
12858
+ }
12859
+ }
12824
12860
  }
12825
12861
  `}
12826
12862
  `;
@@ -12875,13 +12911,14 @@ const DotEmptyState = ({
12875
12911
  illustrationId,
12876
12912
  imageAltText,
12877
12913
  imageSrc,
12914
+ size = 'normal',
12878
12915
  subtitle,
12879
12916
  title
12880
12917
  }) => {
12881
12918
  const rootClasses = useStylesWithRootClass(rootClassName$C, className);
12882
12919
  return jsxs(StyledEmptyState, {
12883
12920
  "aria-label": ariaLabel,
12884
- className: rootClasses,
12921
+ className: `${rootClasses} ${size}`,
12885
12922
  "data-testid": dataTestId,
12886
12923
  children: [jsxs("div", {
12887
12924
  className: "empty-state-image-container",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "4.7.0",
3
+ "version": "4.8.0",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [
@@ -1,5 +1,6 @@
1
1
  import { ButtonProps } from '../button';
2
2
  import { CommonProps } from '../CommonProps';
3
+ export type EmptyStateSize = 'xsmall' | 'dense' | 'normal' | 'large';
3
4
  export interface EmptyStateProps extends CommonProps {
4
5
  /** primary button properties */
5
6
  buttonProps?: ButtonProps;
@@ -9,9 +10,11 @@ export interface EmptyStateProps extends CommonProps {
9
10
  imageAltText?: string;
10
11
  /** location of image */
11
12
  imageSrc?: string;
13
+ /** sizing of the empty state (illustration, img) */
14
+ size?: EmptyStateSize;
12
15
  /** subtitle text displayed */
13
16
  subtitle?: string;
14
17
  /** title text displayed */
15
18
  title: string;
16
19
  }
17
- export declare const DotEmptyState: ({ ariaLabel, buttonProps, className, "data-testid": dataTestId, illustrationId, imageAltText, imageSrc, subtitle, title, }: EmptyStateProps) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const DotEmptyState: ({ ariaLabel, buttonProps, className, "data-testid": dataTestId, illustrationId, imageAltText, imageSrc, size, subtitle, title, }: EmptyStateProps) => import("react/jsx-runtime").JSX.Element;