@digital-ai/dot-components 5.9.0 → 5.10.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,
@@ -25857,13 +25861,13 @@ const DotChatBubble = ({
25857
25861
  };
25858
25862
 
25859
25863
  const rootClassName = 'dot-loading-dots';
25860
- const dotAnimation = keyframes`
25864
+ const dotAnimation = y => keyframes`
25861
25865
  0%,
25862
25866
  100% {
25863
25867
  transform: translateY(0);
25864
25868
  }
25865
25869
  50% {
25866
- transform: translateY(-8px);
25870
+ transform: translateY(${y}px);
25867
25871
  }
25868
25872
  `;
25869
25873
  const StyledLoadingDots = styled.div`
@@ -25871,7 +25875,8 @@ const StyledLoadingDots = styled.div`
25871
25875
  theme,
25872
25876
  $size,
25873
25877
  $duration,
25874
- $count
25878
+ $count,
25879
+ $verticalOffset
25875
25880
  }) => {
25876
25881
  const dotSize = typeof $size === 'number' ? `${$size}px` : $size;
25877
25882
  const spacing = typeof $size === 'number' ? `${$size * 0.75}px` : '6px';
@@ -25886,7 +25891,8 @@ const StyledLoadingDots = styled.div`
25886
25891
  height: ${dotSize};
25887
25892
  border-radius: 50%;
25888
25893
  background-color: ${theme.palette.figma.typography.black};
25889
- animation: ${dotAnimation} ${$duration}s infinite ease-in-out;
25894
+ animation: ${dotAnimation($verticalOffset)} ${$duration}s infinite
25895
+ ease-in-out;
25890
25896
 
25891
25897
  ${Array.from({
25892
25898
  length: $count
@@ -25910,7 +25916,8 @@ const DotLoadingDots = ({
25910
25916
  'data-pendoid': dataPendoId = rootClassName,
25911
25917
  'data-testid': dataTestId,
25912
25918
  size = 8,
25913
- speed = 0.8
25919
+ speed = 0.8,
25920
+ verticalOffset = -8
25914
25921
  }) => {
25915
25922
  const rootClasses = useStylesWithRootClass(rootClassName, className);
25916
25923
  useEffect(() => {
@@ -25929,6 +25936,7 @@ const DotLoadingDots = ({
25929
25936
  "$size": size,
25930
25937
  "$duration": animationDuration,
25931
25938
  "$count": dotCount,
25939
+ "$verticalOffset": verticalOffset,
25932
25940
  children: Array.from({
25933
25941
  length: dotCount
25934
25942
  }, (_, 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.10.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;