@selfdecode/sd-component-library 2.45.0 → 2.45.1

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.
Files changed (41) hide show
  1. package/lib/components/custom-scrollbar-box/interfaces.d.ts +4 -0
  2. package/lib/components/dividers/divider/interfaces.d.ts +5 -0
  3. package/lib/components/dividers/horizontal-divider/interfaces.d.ts +1 -1
  4. package/lib/components/dividers/vertical-divider/interfaces.d.ts +1 -1
  5. package/lib/components/inputs/multi-row-secondary-text-input/interfaces.d.ts +3 -0
  6. package/lib/components/inputs/search-autocomplete-input/index.d.ts +1 -0
  7. package/lib/components/inputs/search-autocomplete-input/interfaces.d.ts +26 -0
  8. package/lib/components/inputs/search-autocomplete-input/partials/search-autocomplete-results-box/index.d.ts +1 -0
  9. package/lib/components/inputs/search-autocomplete-input/partials/search-autocomplete-results-box/interfaces.d.ts +11 -0
  10. package/lib/components/inputs/search-autocomplete-input/partials/search-autocomplete-results-box/search-autocomplete-results-box.d.ts +7 -0
  11. package/lib/components/inputs/search-autocomplete-input/partials/search-autocomplete-row/index.d.ts +1 -0
  12. package/lib/components/inputs/search-autocomplete-input/partials/search-autocomplete-row/interfaces.d.ts +9 -0
  13. package/lib/components/inputs/search-autocomplete-input/partials/search-autocomplete-row/search-autocomplete-row.d.ts +7 -0
  14. package/lib/components/inputs/search-autocomplete-input/search-autocomplete-input.d.ts +7 -0
  15. package/lib/components/inputs/secondary-text-input/interfaces.d.ts +6 -1
  16. package/lib/components/meters/outline-meter/interfaces.d.ts +5 -0
  17. package/lib/components/meters/smiley-meter-v2/interfaces.d.ts +1 -1
  18. package/lib/components/modals/modal/interfaces.d.ts +8 -4
  19. package/lib/components/modals/primary-modal/interfaces.d.ts +0 -4
  20. package/lib/components/selectors/secondary-custom-selector/index.d.ts +1 -0
  21. package/lib/components/selectors/secondary-custom-selector/interfaces.d.ts +6 -0
  22. package/lib/components/selectors/secondary-custom-selector/partials/secondary-custom-selector-option-row/index.d.ts +1 -0
  23. package/lib/components/selectors/secondary-custom-selector/partials/secondary-custom-selector-option-row/interfaces.d.ts +5 -0
  24. package/lib/components/selectors/secondary-custom-selector/partials/secondary-custom-selector-option-row/secondary-custom-selector-option-row.d.ts +3 -0
  25. package/lib/components/selectors/secondary-custom-selector/partials/secondary-custom-selector-options-box/index.d.ts +1 -0
  26. package/lib/components/selectors/secondary-custom-selector/partials/secondary-custom-selector-options-box/interfaces.d.ts +5 -0
  27. package/lib/components/selectors/secondary-custom-selector/partials/secondary-custom-selector-options-box/secondary-custom-selector-options-box.d.ts +3 -0
  28. package/lib/components/selectors/secondary-custom-selector/secondary-custom-selector.d.ts +3 -0
  29. package/lib/components/selectors/tertiary-custom-selector/index.d.ts +1 -0
  30. package/lib/components/selectors/tertiary-custom-selector/interfaces.d.ts +3 -0
  31. package/lib/components/selectors/tertiary-custom-selector/tertiary-custom-selector.d.ts +3 -0
  32. package/lib/components/tabs/tab-bar-v2/interfaces.d.ts +5 -0
  33. package/lib/components/tabs/tab-bar-v2/partials/tab-v2/interfaces.d.ts +3 -1
  34. package/lib/components/texts/base-text-v2/interfaces.d.ts +4 -0
  35. package/lib/components/tooltips/base-tooltip/interfaces.d.ts +1 -1
  36. package/lib/components/tooltips/primary-info-tooltip/interfaces.d.ts +2 -1
  37. package/lib/components/tooltips/star-tooltip/partials/toltip-text-modal/interfaces.d.ts +2 -1
  38. package/lib/core/theme.d.ts +20 -7
  39. package/lib/index.d.ts +4 -0
  40. package/lib/index.js +1 -1
  41. package/package.json +1 -1
@@ -49,4 +49,8 @@ export interface CustomScrollbarBoxProps {
49
49
  * Whether scrollbar should appear only on hover.
50
50
  */
51
51
  makeVisibleOnHoverOnly?: boolean;
52
+ /**
53
+ * Hover with of the scroll bar.
54
+ */
55
+ hoverScrollbarWidth?: string | string[];
52
56
  }
@@ -1,4 +1,5 @@
1
1
  import { BaseComponentProps } from "../../interfaces";
2
+ import { SxProps } from "rebass";
2
3
  export interface DividerProps extends BaseComponentProps {
3
4
  /**
4
5
  * The divider's width
@@ -16,4 +17,8 @@ export interface DividerProps extends BaseComponentProps {
16
17
  * The opacity of the divider
17
18
  */
18
19
  opacity?: string;
20
+ /**
21
+ * Prop to customize divider.
22
+ */
23
+ sx?: SxProps["sx"];
19
24
  }
@@ -1,2 +1,2 @@
1
1
  import { DividerProps } from "../divider";
2
- export declare type HorizontalDividerProps = Pick<DividerProps, "height" | "width" | "color" | "m" | "mt" | "mr" | "mb" | "ml" | "opacity">;
2
+ export declare type HorizontalDividerProps = Omit<DividerProps, "variant">;
@@ -1,2 +1,2 @@
1
1
  import { DividerProps } from "../divider";
2
- export declare type VerticalDividerProps = Pick<DividerProps, "height" | "width" | "color" | "m" | "mt" | "mr" | "mb" | "ml">;
2
+ export declare type VerticalDividerProps = Omit<DividerProps, "variant">;
@@ -2,6 +2,9 @@ import { SecondaryTextInputProps } from "../secondary-text-input";
2
2
  export interface MultiRowSecondaryTextInputProps extends Omit<SecondaryTextInputProps, "value" | "onChange"> {
3
3
  value: string;
4
4
  onChange: (value: string) => void;
5
+ fontSize?: number;
6
+ fontWeight?: number;
5
7
  rows?: number;
6
8
  lineHeight?: number;
9
+ underlineColor?: string;
7
10
  }
@@ -0,0 +1 @@
1
+ export { SearchAutocompleteInput } from "./search-autocomplete-input";
@@ -0,0 +1,26 @@
1
+ import { SxProps } from "rebass";
2
+ import { SecondaryTextInputProps } from "../secondary-text-input";
3
+ export interface SearchAutocompleteInputProps<T extends {
4
+ id: string;
5
+ } = {
6
+ id: string;
7
+ }> extends Omit<SecondaryTextInputProps, "sx"> {
8
+ searchValue: string;
9
+ onSearch: (newSearchValue: string) => void;
10
+ onSelect: (newValue: SearchAutocompleteOption<T>) => void;
11
+ hasSelection: boolean;
12
+ results: SearchAutocompleteOption<T>[];
13
+ rowsDisplayed?: number;
14
+ rowHeight?: number;
15
+ containerSx?: SxProps["sx"];
16
+ inputSx?: SxProps["sx"];
17
+ }
18
+ export interface SearchAutocompleteOption<T extends {
19
+ id: string;
20
+ } = {
21
+ id: string;
22
+ }> {
23
+ id: string;
24
+ title: string;
25
+ value: T;
26
+ }
@@ -0,0 +1 @@
1
+ export { SearchAutocompleteResultsBox } from "./search-autocomplete-results-box";
@@ -0,0 +1,11 @@
1
+ import { SearchAutocompleteOption } from "../../interfaces";
2
+ export interface SearchAutocompleteResultsBoxProps<T extends {
3
+ id: string;
4
+ } = {
5
+ id: string;
6
+ }> {
7
+ results: SearchAutocompleteOption<T>[];
8
+ onSelect: (newValue: SearchAutocompleteOption<T>) => void;
9
+ rowsDisplayed: number;
10
+ rowHeight: number;
11
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { SearchAutocompleteResultsBoxProps as Props } from "./interfaces";
3
+ export declare const SearchAutocompleteResultsBox: <T extends {
4
+ id: string;
5
+ } = {
6
+ id: string;
7
+ }>(props: Props<T>) => JSX.Element;
@@ -0,0 +1 @@
1
+ export { SearchAutocompleteRow } from "./search-autocomplete-row";
@@ -0,0 +1,9 @@
1
+ export interface SearchAutocompleteRowProps<T extends {
2
+ id: string;
3
+ } = {
4
+ id: string;
5
+ }> {
6
+ onClick: () => void;
7
+ title: string;
8
+ height: number;
9
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { SearchAutocompleteRowProps as Props } from "./interfaces";
3
+ export declare const SearchAutocompleteRow: <T extends {
4
+ id: string;
5
+ } = {
6
+ id: string;
7
+ }>(props: Props<T>) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { SearchAutocompleteInputProps as Props } from "./interfaces";
3
+ export declare const SearchAutocompleteInput: <T extends {
4
+ id: string;
5
+ } = {
6
+ id: string;
7
+ }>(props: Props<T>) => JSX.Element;
@@ -1,9 +1,10 @@
1
1
  import { ResponsiveTextV2Props } from "../../texts/responsive-text-v2";
2
2
  import { PrimaryTextInputProps } from "../primary-text-input";
3
+ import { SxProps } from "rebass";
3
4
  /**
4
5
  * Defines the SecondaryTextInput component's properties.
5
6
  */
6
- export declare type SecondaryTextInputProps = Pick<PrimaryTextInputProps, "onChange" | "value" | "type" | "padding" | "placeholder" | "errorMessage" | "hideErrorText" | "focusInput" | "textAlign" | "width" | "m" | "mt" | "mr" | "mb" | "ml" | "onFocus" | "autoFocus" | "errorBackground" | "disabled"> & {
7
+ export declare type SecondaryTextInputProps = Pick<PrimaryTextInputProps, "onChange" | "value" | "type" | "padding" | "placeholder" | "errorMessage" | "hideErrorText" | "focusInput" | "textAlign" | "width" | "m" | "mt" | "mr" | "mb" | "ml" | "onFocus" | "autoFocus" | "errorBackground" | "disabled" | "sx"> & {
7
8
  /**
8
9
  * The label for the text input
9
10
  */
@@ -36,4 +37,8 @@ export declare type SecondaryTextInputProps = Pick<PrimaryTextInputProps, "onCha
36
37
  * Default value: ["0px"].
37
38
  */
38
39
  labelMargin?: string | string[];
40
+ /**
41
+ * Padding of the input element.
42
+ */
43
+ inputSx?: SxProps["sx"];
39
44
  };
@@ -1,3 +1,4 @@
1
+ import { CSSProperties } from "react";
1
2
  export declare type OutlineMeterPosition = number;
2
3
  export interface OutlineMeterProps {
3
4
  /**
@@ -106,6 +107,10 @@ export interface OutlineMeterProps {
106
107
  * Border radius of the mask.
107
108
  */
108
109
  maskBorderRadius?: number;
110
+ /**
111
+ * Cursor for the gauge.
112
+ */
113
+ cursor?: CSSProperties["cursor"];
109
114
  }
110
115
  export declare type SmallOutlineMeterProps = OutlineMeterProps;
111
116
  export interface OutlineMeterRangeConfig {
@@ -1,5 +1,5 @@
1
1
  import { OutlineMeterProps } from "../outline-meter";
2
- export interface SmileyMeterV2Props extends Pick<OutlineMeterProps, "width" | "height" | "value" | "gaugeWidth" | "arc" | "marginTop" | "marginX" | "pointStrokeWidth" | "innerPointRadius" | "distanceBetweenRanges" | "distanceFromLabelToRanges" | "counterClockWise" | "maskBorderRadius"> {
2
+ export interface SmileyMeterV2Props extends Pick<OutlineMeterProps, "width" | "height" | "value" | "gaugeWidth" | "arc" | "marginTop" | "marginX" | "pointStrokeWidth" | "innerPointRadius" | "distanceBetweenRanges" | "distanceFromLabelToRanges" | "counterClockWise" | "maskBorderRadius" | "cursor"> {
3
3
  /**
4
4
  * Colors for smiley corresponding to state.
5
5
  */
@@ -32,7 +32,7 @@ export interface ModalProps {
32
32
  /**
33
33
  * Width property of the modal.
34
34
  */
35
- width?: Array<string>;
35
+ width?: string | string[];
36
36
  /**
37
37
  * Boolean to open up the pop up.
38
38
  */
@@ -40,19 +40,19 @@ export interface ModalProps {
40
40
  /**
41
41
  * Optional change to the container's borderRadius. Default value: ["5px"]
42
42
  */
43
- borderRadius?: Array<string>;
43
+ borderRadius?: string | string[];
44
44
  /**
45
45
  * Optional change for the default padding. This padding is
46
46
  * for the outer container, and not inside the popup itself.
47
47
  * Default value: ["30px", "150px"],
48
48
  */
49
- outerPadding?: Array<string>;
49
+ outerPadding?: string | string[];
50
50
  /**
51
51
  * Optional change for the default inner padding. This adds padding
52
52
  * for the components inside the outer popup container.
53
53
  * Default value: ["40px 20px", "50px"]
54
54
  */
55
- innerPadding?: Array<string>;
55
+ innerPadding?: string | string[];
56
56
  /**
57
57
  * Optional ability to close the modal when clicking outside the content
58
58
  * False by default
@@ -69,4 +69,8 @@ export interface ModalProps {
69
69
  * Additional props for the modal outer container.
70
70
  */
71
71
  containerSx?: SxProps["sx"];
72
+ /**
73
+ * Additional props for the modal inner container.
74
+ */
75
+ innerSx?: SxProps["sx"];
72
76
  }
@@ -8,8 +8,4 @@ export interface PrimaryModalProps extends ModalProps {
8
8
  * text content of the modal
9
9
  */
10
10
  text: string;
11
- /**
12
- * Display close button
13
- */
14
- showXIcon?: boolean;
15
11
  }
@@ -0,0 +1 @@
1
+ export { SecondaryCustomSelector } from "./secondary-custom-selector";
@@ -0,0 +1,6 @@
1
+ import { SelectorV2Props } from "../selector-v2";
2
+ import { SxProps } from "rebass";
3
+ export interface SecondaryCustomSelectorProps<T extends string = string> extends Pick<SelectorV2Props<T>, "options" | "value" | "onChange" | "width" | "variant"> {
4
+ label: string;
5
+ containerSx?: SxProps["sx"];
6
+ }
@@ -0,0 +1 @@
1
+ export { SecondaryCustomSelectorOptionRow } from "./secondary-custom-selector-option-row";
@@ -0,0 +1,5 @@
1
+ export interface SecondaryCustomSelectorOptionRowProps {
2
+ title: string;
3
+ onClick: () => void;
4
+ isLast?: boolean;
5
+ }
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { SecondaryCustomSelectorOptionRowProps as Props } from "./interfaces";
3
+ export declare const SecondaryCustomSelectorOptionRow: React.FC<Props>;
@@ -0,0 +1 @@
1
+ export { SecondaryCustomSelectorOptionsBox } from "./secondary-custom-selector-options-box";
@@ -0,0 +1,5 @@
1
+ import { SelectorOptionV2 } from "../../../selector-v2";
2
+ export interface SecondaryCustomSelectorOptionsBoxProps<T extends string = string> {
3
+ options: SelectorOptionV2<T>[];
4
+ onSelect: (option: SelectorOptionV2<T>) => void;
5
+ }
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { SecondaryCustomSelectorOptionsBoxProps as Props } from "./interfaces";
3
+ export declare const SecondaryCustomSelectorOptionsBox: <T extends string = string>(props: Props<T>) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { SecondaryCustomSelectorProps as Props } from "./interfaces";
3
+ export declare const SecondaryCustomSelector: <T extends string = string>(props: Props<T>) => JSX.Element | null;
@@ -0,0 +1 @@
1
+ export { TertiaryCustomSelector } from "./tertiary-custom-selector";
@@ -0,0 +1,3 @@
1
+ import { SecondaryCustomSelectorProps } from "../secondary-custom-selector/interfaces";
2
+ export interface TertiaryCustomSelectorProps<T extends string = string> extends Omit<SecondaryCustomSelectorProps, "variant"> {
3
+ }
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import { TertiaryCustomSelectorProps as Props } from "./interfaces";
3
+ export declare const TertiaryCustomSelector: React.FC<Props>;
@@ -39,6 +39,11 @@ export interface TabBarV2Props {
39
39
  * Font size of the tab text.
40
40
  */
41
41
  fontSize?: number;
42
+ /**
43
+ * Tab offsets. Padding = borderRadius + offset.
44
+ */
45
+ tabTopAdditionalOffset?: number;
46
+ tabBottomAdditionalOffset?: number;
42
47
  }
43
48
  export interface TabV2Config {
44
49
  id: string;
@@ -1,5 +1,5 @@
1
1
  import { TabBarV2Props, TabV2Config } from "../../interfaces";
2
- export interface TabV2Props extends TabV2Config, Required<Omit<TabBarV2Props, "tabs" | "maxWidth" | "paddingX" | "selectedTabId" | "tabPx">> {
2
+ export interface TabV2Props extends TabV2Config, Required<Omit<TabBarV2Props, "tabs" | "maxWidth" | "paddingX" | "selectedTabId" | "tabPx" | "tabTopAdditionalOffset" | "tabBottomAdditionalOffset">> {
3
3
  /**
4
4
  * Index of the selected tab.
5
5
  */
@@ -25,4 +25,6 @@ export interface TabV2Props extends TabV2Config, Required<Omit<TabBarV2Props, "t
25
25
  */
26
26
  px?: string | string[];
27
27
  observer?: IntersectionObserver;
28
+ topAdditionalOffset: number;
29
+ bottomAdditionalOffset: number;
28
30
  }
@@ -3,4 +3,8 @@ import { TextProps } from "rebass";
3
3
  export interface BaseTextV2Props extends Omit<TextProps, "color"> {
4
4
  color?: string | string[];
5
5
  textTransform?: React.CSSProperties["textTransform"];
6
+ /**
7
+ * Whether to apply "no-translate" class to text block.
8
+ */
9
+ dontTranslate?: boolean;
6
10
  }
@@ -7,7 +7,7 @@ export interface BaseTooltipProps extends BaseComponentProps {
7
7
  /**
8
8
  * Text to be displayed in the tooltip.
9
9
  */
10
- tooltipText: string;
10
+ tooltipText: string | React.ReactNode;
11
11
  /**
12
12
  * Color of text to be displayed in the tooltip.
13
13
  */
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { BaseInfoTooltipProps } from "../base-info-tooltip";
2
3
  /**
3
4
  * Additional props we want to add
@@ -7,6 +8,6 @@ export interface PrimaryInfoTooltipProps extends SameProps {
7
8
  /**
8
9
  * Only this prop is required
9
10
  */
10
- tooltipText: string;
11
+ tooltipText: string | React.ReactNode;
11
12
  }
12
13
  export {};
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  export interface TooltipTextModalProps {
2
3
  isOpen: boolean;
3
4
  onClose: () => void;
4
- text: string;
5
+ text: string | React.ReactNode;
5
6
  }
@@ -61,6 +61,13 @@ declare const _default: {
61
61
  combined: {
62
62
  display: string;
63
63
  };
64
+ customSecondary: {
65
+ gap: string;
66
+ gridTemplateColumns: string;
67
+ };
68
+ customTertiary: {
69
+ gap: string;
70
+ };
64
71
  };
65
72
  };
66
73
  _dropdowns: {
@@ -264,7 +271,6 @@ declare const _default: {
264
271
  };
265
272
  selectors: {
266
273
  secondary: {
267
- fontFamily: string;
268
274
  fontSize: string[];
269
275
  fontWeight: number;
270
276
  letterSpacing: number;
@@ -272,7 +278,6 @@ declare const _default: {
272
278
  color: string;
273
279
  };
274
280
  secondaryError: {
275
- fontFamily: string;
276
281
  width: string;
277
282
  fontSize: string[];
278
283
  fontWeight: number;
@@ -282,7 +287,6 @@ declare const _default: {
282
287
  color: string;
283
288
  };
284
289
  tertiary: {
285
- fontFamily: string;
286
290
  width: string;
287
291
  color: string;
288
292
  fontSize: string[];
@@ -292,7 +296,6 @@ declare const _default: {
292
296
  marginBottom: string[];
293
297
  };
294
298
  tertiaryError: {
295
- fontFamily: string;
296
299
  width: string;
297
300
  fontSize: string[];
298
301
  fontWeight: number;
@@ -302,13 +305,11 @@ declare const _default: {
302
305
  color: string;
303
306
  };
304
307
  compact: {
305
- fontFamily: string;
306
308
  width: string;
307
309
  color: string;
308
310
  fontSize: string[];
309
311
  };
310
312
  secondaryV2: {
311
- fontFamily: string;
312
313
  color: string;
313
314
  fontSize: string;
314
315
  };
@@ -317,7 +318,6 @@ declare const _default: {
317
318
  left: string;
318
319
  top: string;
319
320
  height: string;
320
- fontFamily: string;
321
321
  fontWeight: number;
322
322
  color: string;
323
323
  fontSize: string;
@@ -326,6 +326,19 @@ declare const _default: {
326
326
  width: string;
327
327
  bg: string;
328
328
  px: string;
329
+ zIndex: number;
330
+ };
331
+ customSecondary: {
332
+ fontSize: string;
333
+ fontWeight: number;
334
+ color: string;
335
+ };
336
+ customTertiary: {
337
+ fontSize: string;
338
+ fontWeight: number;
339
+ letterSpacing: string;
340
+ textTransform: string;
341
+ color: string;
329
342
  };
330
343
  };
331
344
  iconButton: {
package/lib/index.d.ts CHANGED
@@ -86,6 +86,8 @@ export declare type BoxyNumberInputProps = BaseBoxyNumberInputProps;
86
86
  export { SearchInput } from "./components/inputs/search-input";
87
87
  export { AutocompleteInput } from "./components/inputs/autocomplete-input";
88
88
  export type { AutocompleteInputProps, AutocompleteOption, } from "./components/inputs/autocomplete-input/interfaces";
89
+ export { SearchAutocompleteInput } from "./components/inputs/search-autocomplete-input";
90
+ export type { SearchAutocompleteOption } from "./components/inputs/search-autocomplete-input/interfaces";
89
91
  export { PrimaryDateInput } from "./components/inputs/date-inputs/primary-date-input";
90
92
  export { OutlinedDateInput } from "./components/inputs/date-inputs/outlined-date-input";
91
93
  export { BaseDateRangeInput } from "./components/inputs/date-inputs/base-date-range-input";
@@ -137,6 +139,8 @@ export { SecondarySelector } from "./components/selectors/secondary-selector";
137
139
  export { CompactPrimarySelector } from "./components/selectors/compact-primary-selector";
138
140
  export declare type CompactPrimarySelectorProps<T extends string = string> = BaseCompactSelectorProps<T>;
139
141
  export { CustomSelector } from "./components/selectors/custom-selector";
142
+ export { SecondaryCustomSelector } from "./components/selectors/secondary-custom-selector";
143
+ export { TertiaryCustomSelector } from "./components/selectors/tertiary-custom-selector";
140
144
  export { SelectorV2 } from "./components/selectors/selector-v2";
141
145
  export type { SelectorV2Props, SelectorOptionV2, } from "./components/selectors/selector-v2";
142
146
  export { TertiarySelectorV2 } from "./components/selectors/tertiary-selector-v2";