@digital-ai/dot-components 5.9.0 → 5.11.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
@@ -8591,6 +8591,7 @@ function DotCheckbox({
8591
8591
  className,
8592
8592
  'data-pendoid': dataPendoId = rootClassName$X,
8593
8593
  'data-testid': dataTestId,
8594
+ defaultChecked,
8594
8595
  disabled,
8595
8596
  disableRipple,
8596
8597
  id,
@@ -8616,6 +8617,7 @@ function DotCheckbox({
8616
8617
  color: "primary",
8617
8618
  "data-pendoid": dataPendoId,
8618
8619
  "data-testid": dataTestId,
8620
+ defaultChecked: defaultChecked,
8619
8621
  disableRipple: disableRipple,
8620
8622
  disabled: disabled,
8621
8623
  id: id,
@@ -14596,6 +14598,7 @@ function DotRadioButton({
14596
14598
  className,
14597
14599
  'data-pendoid': dataPendoId = rootClassName$X,
14598
14600
  'data-testid': dataTestId,
14601
+ defaultChecked,
14599
14602
  disabled,
14600
14603
  id,
14601
14604
  inputRef,
@@ -14620,6 +14623,7 @@ function DotRadioButton({
14620
14623
  color: "primary",
14621
14624
  "data-pendoid": dataPendoId,
14622
14625
  "data-testid": dataTestId,
14626
+ defaultChecked: defaultChecked,
14623
14627
  disabled: disabled,
14624
14628
  id: id,
14625
14629
  inputRef: inputRef,
@@ -17728,7 +17732,8 @@ const CollapsibleTableBody = ({
17728
17732
  maxWidth: parseCellMaxWidth(column.width),
17729
17733
  minWidth: parseCellMaxWidth(column.minWidth)
17730
17734
  },
17731
- value: row[colId]
17735
+ // Call custom renderer only when item appears in DOM to save resources for huge data sets
17736
+ value: column.render ? column.render(row[colId]) : row[colId]
17732
17737
  }, colId);
17733
17738
  })
17734
17739
  }, `${parentRowKey}-${uid}`);
@@ -18025,7 +18030,8 @@ const DotTableRow = ({
18025
18030
  maxWidth: parseCellMaxWidth(column.width),
18026
18031
  minWidth: parseCellMaxWidth(column.minWidth)
18027
18032
  },
18028
- value: rowData[column.id]
18033
+ // Call custom renderer only when item appears in DOM to save resources for huge data sets
18034
+ value: column.render ? column.render(rowData[column.id]) : rowData[column.id]
18029
18035
  }, column.id);
18030
18036
  })]
18031
18037
  }), isCollapsibleTableExpandValid && renderNestedTable()]
@@ -25857,13 +25863,13 @@ const DotChatBubble = ({
25857
25863
  };
25858
25864
 
25859
25865
  const rootClassName = 'dot-loading-dots';
25860
- const dotAnimation = keyframes`
25866
+ const dotAnimation = y => keyframes`
25861
25867
  0%,
25862
25868
  100% {
25863
25869
  transform: translateY(0);
25864
25870
  }
25865
25871
  50% {
25866
- transform: translateY(-8px);
25872
+ transform: translateY(${y}px);
25867
25873
  }
25868
25874
  `;
25869
25875
  const StyledLoadingDots = styled.div`
@@ -25871,7 +25877,8 @@ const StyledLoadingDots = styled.div`
25871
25877
  theme,
25872
25878
  $size,
25873
25879
  $duration,
25874
- $count
25880
+ $count,
25881
+ $verticalOffset
25875
25882
  }) => {
25876
25883
  const dotSize = typeof $size === 'number' ? `${$size}px` : $size;
25877
25884
  const spacing = typeof $size === 'number' ? `${$size * 0.75}px` : '6px';
@@ -25886,7 +25893,8 @@ const StyledLoadingDots = styled.div`
25886
25893
  height: ${dotSize};
25887
25894
  border-radius: 50%;
25888
25895
  background-color: ${theme.palette.figma.typography.black};
25889
- animation: ${dotAnimation} ${$duration}s infinite ease-in-out;
25896
+ animation: ${dotAnimation($verticalOffset)} ${$duration}s infinite
25897
+ ease-in-out;
25890
25898
 
25891
25899
  ${Array.from({
25892
25900
  length: $count
@@ -25910,7 +25918,8 @@ const DotLoadingDots = ({
25910
25918
  'data-pendoid': dataPendoId = rootClassName,
25911
25919
  'data-testid': dataTestId,
25912
25920
  size = 8,
25913
- speed = 0.8
25921
+ speed = 0.8,
25922
+ verticalOffset = -8
25914
25923
  }) => {
25915
25924
  const rootClasses = useStylesWithRootClass(rootClassName, className);
25916
25925
  useEffect(() => {
@@ -25929,6 +25938,7 @@ const DotLoadingDots = ({
25929
25938
  "$size": size,
25930
25939
  "$duration": animationDuration,
25931
25940
  "$count": dotCount,
25941
+ "$verticalOffset": verticalOffset,
25932
25942
  children: Array.from({
25933
25943
  length: dotCount
25934
25944
  }, (_, i) => jsx("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "5.9.0",
3
+ "version": "5.11.0",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [
@@ -9,4 +9,4 @@ export interface CheckboxProps extends RadioButtonProps {
9
9
  /** if true the checkbox will display with intermediate */
10
10
  indeterminate?: boolean;
11
11
  }
12
- export declare function DotCheckbox({ ariaLabel, ariaLabelledby, checked, className, 'data-pendoid': dataPendoId, 'data-testid': dataTestId, disabled, disableRipple, id, indeterminate, inputRef, label, labelPlacement, name, onChange, required, size, value, }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function DotCheckbox({ ariaLabel, ariaLabelledby, checked, className, 'data-pendoid': dataPendoId, 'data-testid': dataTestId, defaultChecked, disabled, disableRipple, id, indeterminate, inputRef, label, labelPlacement, name, onChange, required, size, value, }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
@@ -6,5 +6,7 @@ export interface LoadingDotsProps extends CommonProps {
6
6
  size?: number | string;
7
7
  /** Animation speed multiplier (higher = faster) */
8
8
  speed?: number;
9
+ /** Vertical movement of the dots in pixels */
10
+ verticalOffset?: number;
9
11
  }
10
- export declare const DotLoadingDots: ({ ariaLabel, className, count, "data-pendoid": dataPendoId, "data-testid": dataTestId, size, speed, }: LoadingDotsProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const DotLoadingDots: ({ ariaLabel, className, count, "data-pendoid": dataPendoId, "data-testid": dataTestId, size, speed, verticalOffset, }: LoadingDotsProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,6 +3,7 @@ interface StyledLoadingDotsProps {
3
3
  $count: number;
4
4
  $duration: number;
5
5
  $size: number | string;
6
+ $verticalOffset: number;
6
7
  }
7
8
  export declare const StyledLoadingDots: import("styled-components").StyledComponent<"div", any, StyledLoadingDotsProps, never>;
8
9
  export {};
@@ -21,6 +21,8 @@ export interface RadioButtonBaseProps extends CommonProps {
21
21
  export interface RadioButtonProps extends RadioButtonBaseProps {
22
22
  /** if the radio button is selected */
23
23
  checked?: boolean;
24
+ /** the default checked state. Use when the component is not controlled. */
25
+ defaultChecked?: boolean;
24
26
  /** if true makes the radio button disabled */
25
27
  disabled?: boolean;
26
28
  /** text displayed next to the radio button */
@@ -28,4 +30,4 @@ export interface RadioButtonProps extends RadioButtonBaseProps {
28
30
  /** A function that should be executed when the value of the radio buttom changes */
29
31
  onChange?: (event: ChangeEvent<HTMLInputElement>, value: string) => void;
30
32
  }
31
- export declare function DotRadioButton({ ariaLabel, checked, className, 'data-pendoid': dataPendoId, 'data-testid': dataTestId, disabled, id, inputRef, label, labelPlacement, name, onChange, required, size, value, }: RadioButtonProps): import("react/jsx-runtime").JSX.Element;
33
+ export declare function DotRadioButton({ ariaLabel, checked, className, 'data-pendoid': dataPendoId, 'data-testid': dataTestId, defaultChecked, disabled, id, inputRef, label, labelPlacement, name, onChange, required, size, value, }: RadioButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -74,6 +74,7 @@ export interface DotColumnHeader {
74
74
  id: string;
75
75
  label?: string;
76
76
  minWidth?: string;
77
+ render?: (...args: any[]) => ReactNode;
77
78
  sortable?: boolean;
78
79
  truncate?: boolean;
79
80
  width?: string;