@juspay/blend-design-system 0.0.20-beta → 0.0.20

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 (79) hide show
  1. package/dist/components/Accordion/accordion.tokens.d.ts +39 -20
  2. package/dist/components/Alert/alert.tokens.d.ts +63 -4
  3. package/dist/components/Avatar/avatar.tokens.d.ts +64 -53
  4. package/dist/components/Avatar/types.d.ts +1 -0
  5. package/dist/components/AvatarGroup/avatarGroup.tokens.d.ts +41 -67
  6. package/dist/components/Breadcrumb/breadcrumb.tokens.d.ts +26 -16
  7. package/dist/components/Button/Button.d.ts +2 -1
  8. package/dist/components/Button/button.tokens.d.ts +38 -13
  9. package/dist/components/Button/types.d.ts +8 -1
  10. package/dist/components/ButtonGroup/ButtonGroup.d.ts +2 -2
  11. package/dist/components/ButtonGroup/types.d.ts +2 -2
  12. package/dist/components/Card/card.tokens.d.ts +80 -56
  13. package/dist/components/Card/types.d.ts +3 -3
  14. package/dist/components/Card/utils.d.ts +21 -24
  15. package/dist/components/Charts/chart.tokens.d.ts +24 -82
  16. package/dist/components/Charts/types.d.ts +7 -2
  17. package/dist/components/Checkbox/checkbox.token.d.ts +41 -68
  18. package/dist/components/DataTable/TableCell/types.d.ts +1 -0
  19. package/dist/components/DateRangePicker/QuickRangeSelector.d.ts +2 -0
  20. package/dist/components/DateRangePicker/TimeSelector.d.ts +2 -0
  21. package/dist/components/DateRangePicker/components/mobile.tokens.d.ts +77 -0
  22. package/dist/components/DateRangePicker/dateRangePicker.tokens.d.ts +132 -249
  23. package/dist/components/DateRangePicker/utils.d.ts +9 -1
  24. package/dist/components/Drawer/drawer.tokens.d.ts +43 -44
  25. package/dist/components/Drawer/types.d.ts +3 -3
  26. package/dist/components/Inputs/DropdownInput/DropdownInput.d.ts +1 -1
  27. package/dist/components/Inputs/DropdownInput/dropdownInput.tokens.d.ts +55 -16
  28. package/dist/components/Inputs/DropdownInput/types.d.ts +3 -1
  29. package/dist/components/Inputs/MultiValueInput/multiValueInput.tokens.d.ts +55 -12
  30. package/dist/components/Inputs/NumberInput/numberInput.tokens.d.ts +74 -21
  31. package/dist/components/Inputs/OTPInput/otpInput.tokens.d.ts +48 -12
  32. package/dist/components/Inputs/SearchInput/searchInput.tokens.d.ts +52 -27
  33. package/dist/components/Inputs/TextArea/textarea.token.d.ts +58 -17
  34. package/dist/components/Inputs/TextInput/textInput.tokens.d.ts +54 -14
  35. package/dist/components/Inputs/UnitInput/unitInput.tokens.d.ts +72 -16
  36. package/dist/components/Inputs/utils/InputFooter/InputFooter.d.ts +17 -1
  37. package/dist/components/Inputs/utils/InputLabels/InputLabels.d.ts +31 -2
  38. package/dist/components/Menu/Menu.d.ts +2 -2
  39. package/dist/components/Menu/MenuItem.d.ts +2 -2
  40. package/dist/components/Menu/SubMenu.d.ts +2 -2
  41. package/dist/components/Menu/menu.tokens.d.ts +46 -26
  42. package/dist/components/Menu/types.d.ts +11 -11
  43. package/dist/components/Menu/utils.d.ts +3 -3
  44. package/dist/components/Modal/modal.tokens.d.ts +59 -33
  45. package/dist/components/Modal/types.d.ts +2 -2
  46. package/dist/components/MultiSelect/MultiSelectMenu.d.ts +1 -1
  47. package/dist/components/MultiSelect/multiSelect.tokens.d.ts +72 -28
  48. package/dist/components/Popover/PopoverFooter.d.ts +1 -1
  49. package/dist/components/Popover/popover.tokens.d.ts +49 -13
  50. package/dist/components/Popover/types.d.ts +2 -2
  51. package/dist/components/ProgressBar/index.d.ts +0 -1
  52. package/dist/components/ProgressBar/progressbar.tokens.d.ts +54 -41
  53. package/dist/components/Radio/radio.token.d.ts +21 -24
  54. package/dist/components/Sidebar/sidebar.tokens.d.ts +77 -0
  55. package/dist/components/Sidebar/utils.d.ts +3 -2
  56. package/dist/components/SingleSelect/SingleSelect.d.ts +1 -1
  57. package/dist/components/SingleSelect/SingleSelectMenu.d.ts +4 -2
  58. package/dist/components/SingleSelect/singleSelect.tokens.d.ts +67 -23
  59. package/dist/components/SingleSelect/types.d.ts +0 -1
  60. package/dist/components/Snackbar/snackbar.tokens.d.ts +51 -25
  61. package/dist/components/StatCard/StatCard.d.ts +1 -1
  62. package/dist/components/StatCard/statcard.tokens.d.ts +51 -66
  63. package/dist/components/StatCard/types.d.ts +5 -0
  64. package/dist/components/Switch/switch.token.d.ts +57 -74
  65. package/dist/components/Tabs/tabs.token.d.ts +62 -40
  66. package/dist/components/Tags/tag.tokens.d.ts +35 -36
  67. package/dist/components/Tooltip/tooltip.tokens.d.ts +24 -10
  68. package/dist/components/VirtualList/VirtualList.d.ts +10 -1
  69. package/dist/components/VirtualList/index.d.ts +1 -2
  70. package/dist/components/VirtualList/types.d.ts +10 -62
  71. package/dist/components/VirtualList/utils.d.ts +31 -22
  72. package/dist/context/ThemeContext.d.ts +18 -12
  73. package/dist/context/useComponentToken.d.ts +11 -8
  74. package/dist/main.js +31120 -28305
  75. package/dist/tokens/unit.tokens.d.ts +3 -0
  76. package/package.json +1 -1
  77. package/dist/components/Menu/MenuPlayground.d.ts +0 -3
  78. package/dist/components/Menu/MenuPlaygroundComprehensive.d.ts +0 -3
  79. package/dist/components/ProgressBar/utils.d.ts +0 -7
@@ -1,83 +1,107 @@
1
1
  import { CSSObject } from 'styled-components';
2
- import { CardAlignment } from './types';
2
+ import { CardVariant } from './types';
3
3
  import { FoundationTokenType } from '../../tokens/theme.token';
4
4
  import { BreakpointType } from '../../breakpoints/breakPoints';
5
5
  export type CardState = 'default' | 'hover';
6
+ /**
7
+ * Card Tokens following proper hierarchy pattern
8
+ *
9
+ * Structure:
10
+ * container (outermost) -> header/body (sections) -> text/content/actions (elements) -> properties
11
+ *
12
+ * Pattern:
13
+ * - container.property.[variant].[state] (for variant-dependent properties)
14
+ * - container.header.text.title.property (for shared text styling)
15
+ * - container.body.actions.inline.gap.[variant] (for variant-dependent spacing)
16
+ *
17
+ * Hierarchy:
18
+ * - Container: Outermost wrapper with base styling and variant-dependent properties
19
+ * - Header: Header section with text styling and variant-specific box styling
20
+ * - Body: Body section with text, content, actions, and variant-specific spacing
21
+ */
6
22
  export type CardTokenType = {
7
23
  maxWidth: CSSObject['maxWidth'];
8
24
  borderRadius: CSSObject['borderRadius'];
9
- boxShadow: CSSObject['boxShadow'];
10
- padding: CSSObject['padding'];
11
25
  border: CSSObject['border'];
26
+ boxShadow: CSSObject['boxShadow'];
12
27
  backgroundColor: CSSObject['backgroundColor'];
28
+ padding: {
29
+ [key in CardVariant]: {
30
+ x: CSSObject['padding'];
31
+ y: CSSObject['padding'];
32
+ };
33
+ };
13
34
  header: {
14
- backgroundColor: CSSObject['backgroundColor'];
15
- padding: CSSObject['padding'];
16
- borderBottom: CSSObject['borderBottom'];
17
- borderRadius: CSSObject['borderRadius'];
18
- title: {
19
- fontSize: CSSObject['fontSize'];
20
- fontWeight: CSSObject['fontWeight'];
21
- color: CSSObject['color'];
35
+ [CardVariant.DEFAULT]: {
36
+ backgroundColor: CSSObject['backgroundColor'];
37
+ padding: {
38
+ x: CSSObject['padding'];
39
+ y: CSSObject['padding'];
40
+ };
41
+ borderBottom: CSSObject['borderBottom'];
22
42
  };
23
- tag: {
43
+ [CardVariant.ALIGNED]: undefined;
44
+ [CardVariant.CUSTOM]: undefined;
45
+ text: {
46
+ title: {
47
+ fontSize: CSSObject['fontSize'];
48
+ fontWeight: CSSObject['fontWeight'];
49
+ color: CSSObject['color'];
50
+ gap: CSSObject['gap'];
51
+ };
52
+ subTitle: {
53
+ fontSize: CSSObject['fontSize'];
54
+ fontWeight: CSSObject['fontWeight'];
55
+ color: CSSObject['color'];
56
+ };
24
57
  gap: CSSObject['gap'];
25
58
  };
26
- subHeader: {
27
- fontSize: CSSObject['fontSize'];
28
- fontWeight: CSSObject['fontWeight'];
29
- color: CSSObject['color'];
30
- };
31
59
  };
32
60
  body: {
33
- padding: CSSObject['padding'];
34
- title: {
35
- fontSize: CSSObject['fontSize'];
36
- fontWeight: CSSObject['fontWeight'];
37
- color: CSSObject['color'];
38
- };
39
- content: {
40
- fontSize: CSSObject['fontSize'];
41
- color: CSSObject['color'];
42
- };
43
- };
44
- spacing: {
45
- header: {
46
- subHeader: {
47
- marginTop: CSSObject['marginTop'];
61
+ padding: {
62
+ [CardVariant.DEFAULT]: {
63
+ x: CSSObject['padding'];
64
+ y: CSSObject['padding'];
48
65
  };
66
+ [CardVariant.ALIGNED]: undefined;
67
+ [CardVariant.CUSTOM]: undefined;
49
68
  };
50
- body: {
51
- slot1: {
52
- marginTop: CSSObject['marginTop'];
53
- };
69
+ gap: {
70
+ [key in CardVariant]: CSSObject['gap'];
71
+ };
72
+ text: {
54
73
  title: {
55
- marginTop: CSSObject['marginTop'];
74
+ fontSize: CSSObject['fontSize'];
75
+ fontWeight: CSSObject['fontWeight'];
76
+ color: CSSObject['color'];
56
77
  };
57
78
  content: {
58
- marginTop: CSSObject['marginTop'];
59
- };
60
- slot2: {
61
- marginTop: CSSObject['marginTop'];
62
- };
63
- };
64
- action: {
65
- inline: {
66
- marginTop: CSSObject['marginTop'];
79
+ fontSize: CSSObject['fontSize'];
80
+ color: CSSObject['color'];
81
+ fontWeight: CSSObject['fontWeight'];
67
82
  };
68
- regular: {
69
- marginTop: CSSObject['marginTop'];
70
- };
71
- };
72
- headerSlot: {
73
83
  gap: CSSObject['gap'];
74
84
  };
75
- };
76
- alignment: {
77
- [key in CardAlignment]: {
78
- padding: CSSObject['padding'];
85
+ actions: {
79
86
  gap: CSSObject['gap'];
80
- minHeight?: CSSObject['minHeight'];
87
+ centerAlignGap: CSSObject['gap'];
88
+ };
89
+ alignment: {
90
+ [CardVariant.ALIGNED]: {
91
+ cardSlot: {
92
+ vertical: {
93
+ marginBottom: CSSObject['marginBottom'];
94
+ minHeight: CSSObject['minHeight'];
95
+ };
96
+ horizontal: {
97
+ marginRight: CSSObject['marginRight'];
98
+ width: CSSObject['width'];
99
+ height: CSSObject['height'];
100
+ };
101
+ };
102
+ };
103
+ [CardVariant.DEFAULT]: undefined;
104
+ [CardVariant.CUSTOM]: undefined;
81
105
  };
82
106
  };
83
107
  };
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { ButtonV2Props } from '../Button/types';
2
+ import { ButtonProps } from '../Button/types';
3
3
  export declare enum CardVariant {
4
4
  DEFAULT = "default",
5
5
  ALIGNED = "aligned",
@@ -20,7 +20,7 @@ export type DefaultCardProps = {
20
20
  bodyTitle?: string;
21
21
  content?: ReactNode;
22
22
  bodySlot2?: ReactNode;
23
- actionButton?: ButtonV2Props;
23
+ actionButton?: ButtonProps;
24
24
  };
25
25
  export type AlignedCardProps = {
26
26
  variant: CardVariant.ALIGNED;
@@ -34,7 +34,7 @@ export type AlignedCardProps = {
34
34
  bodySlot1?: ReactNode;
35
35
  bodyTitle?: string;
36
36
  content?: ReactNode;
37
- actionButton?: ButtonV2Props;
37
+ actionButton?: ButtonProps;
38
38
  };
39
39
  export type CustomCardProps = {
40
40
  variant: CardVariant.CUSTOM;
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { CardVariant, CardAlignment } from './types';
2
+ import { CardVariant } from './types';
3
3
  import { CardTokenType } from './card.tokens';
4
4
  import { ButtonSubType } from '../Button/types';
5
5
  /**
@@ -23,64 +23,61 @@ export declare const isCustomCard: (variant?: CardVariant) => boolean;
23
23
  */
24
24
  export declare const getHeaderBoxStyles: (cardToken: CardTokenType) => React.CSSProperties;
25
25
  /**
26
- * Gets header title styles
26
+ * Gets header title styles (shared across all variants)
27
27
  */
28
28
  export declare const getHeaderTitleStyles: (cardToken: CardTokenType) => React.CSSProperties;
29
29
  /**
30
- * Gets sub header styles
30
+ * Gets sub header styles (shared across all variants)
31
31
  */
32
32
  export declare const getSubHeaderStyles: (cardToken: CardTokenType) => React.CSSProperties;
33
33
  /**
34
- * Gets body title styles
34
+ * Gets body title styles (shared across all variants)
35
35
  */
36
36
  export declare const getBodyTitleStyles: (cardToken: CardTokenType) => React.CSSProperties;
37
37
  /**
38
- * Gets body content styles
38
+ * Gets body content styles (shared across all variants)
39
39
  */
40
40
  export declare const getBodyContentStyles: (cardToken: CardTokenType) => React.CSSProperties;
41
41
  /**
42
- * Gets body container styles
42
+ * Gets body container styles for default card
43
43
  */
44
44
  export declare const getBodyStyles: (cardToken: CardTokenType) => React.CSSProperties;
45
45
  /**
46
- * Gets spacing between header slots
46
+ * Gets spacing between header elements for a specific variant
47
47
  */
48
- export declare const getHeaderSlotSpacing: (cardToken: CardTokenType) => string;
48
+ export declare const getHeaderSpacing: (cardToken: CardTokenType) => string;
49
49
  /**
50
- * Gets margin bottom for header based on what follows
50
+ * Gets gap for sub header (replaced marginTop with gap)
51
51
  */
52
52
  export declare const getHeaderMarginBottom: (hasSubHeader: boolean, cardToken: CardTokenType) => string;
53
53
  /**
54
- * Gets margin bottom for sub header
54
+ * Gets gap for elements after sub header (using body elements spacing)
55
55
  */
56
- export declare const getSubHeaderMarginBottom: (cardToken: CardTokenType) => string;
56
+ export declare const getSubHeaderMarginBottom: (cardToken: CardTokenType, variant: CardVariant) => string;
57
57
  /**
58
- * Gets margin bottom for body slot 1
58
+ * Gets gap for body elements (using body elements spacing)
59
59
  */
60
- export declare const getBodySlot1MarginBottom: (hasBodyTitle: boolean, cardToken: CardTokenType) => string;
60
+ export declare const getBodySlot1MarginBottom: (hasBodyTitle: boolean, cardToken: CardTokenType, variant: CardVariant) => string;
61
61
  /**
62
- * Gets margin bottom for body title
62
+ * Gets gap between body title and content (using title to content spacing)
63
63
  */
64
64
  export declare const getBodyTitleMarginBottom: (hasContent: boolean, cardToken: CardTokenType) => string;
65
65
  /**
66
- * Gets margin bottom for content
66
+ * Gets gap after content (using body elements spacing)
67
67
  */
68
- export declare const getContentMarginBottom: (hasBodySlot2: boolean, cardToken: CardTokenType) => string;
68
+ export declare const getContentMarginBottom: (hasBodySlot2: boolean, cardToken: CardTokenType, variant: CardVariant) => string;
69
69
  /**
70
- * Gets margin bottom for body slot 2
70
+ * Gets gap before action button - Simple logic: 14px default, 24px for center-aligned
71
71
  */
72
- export declare const getBodySlot2MarginBottom: (hasActionButton: boolean, isInlineButton: boolean, cardToken: CardTokenType) => string;
73
- /**
74
- * Gets alignment styles for aligned cards
75
- */
76
- export declare const getAlignmentStyles: (alignment: CardAlignment, centerAlign: boolean, cardToken: CardTokenType) => React.CSSProperties;
72
+ export declare const getBodySlot2MarginBottom: (hasActionButton: boolean, _isInlineButton: boolean, cardToken: CardTokenType, centerAlign?: boolean) => string;
77
73
  /**
78
74
  * Gets custom card styles (simple wrapper with padding)
79
75
  */
80
76
  export declare const getCustomCardStyles: (cardToken: CardTokenType) => React.CSSProperties;
81
77
  /**
82
78
  * Determines if action button is inline type
79
+ * Center-aligned cards use regular buttons, non-center-aligned use inline buttons
83
80
  */
84
- export declare const isInlineActionButton: (actionButton?: {
81
+ export declare const isInlineActionButton: (_actionButton?: {
85
82
  subType?: ButtonSubType;
86
- }) => boolean;
83
+ }, centerAlign?: boolean) => boolean;
@@ -1,101 +1,43 @@
1
1
  import { CSSObject } from 'styled-components';
2
- import { ChartLegendPosition } from './types';
3
2
  import { FoundationTokenType } from '../../tokens/theme.token';
4
3
  import { BreakpointType } from '../../breakpoints/breakPoints';
5
- export type ChartState = 'default' | 'hover' | 'active' | 'fullscreen' | 'collapsed';
6
- export type ChartSize = 'sm' | 'md' | 'lg';
7
- export type ChartVariant = 'container' | 'no-container';
4
+ export type ChartState = 'default' | 'hover' | 'active';
8
5
  export type ChartHeight = 'default' | 'fullscreen' | 'small';
9
6
  export type ChartTokensType = {
10
- container: {
11
- backgroundColor: {
12
- [key in ChartState]: CSSObject['backgroundColor'];
13
- };
14
- border: {
15
- [key in ChartVariant]: {
16
- [key in ChartState]: CSSObject['border'];
17
- };
18
- };
19
- borderRadius: {
20
- [key in ChartState]: CSSObject['borderRadius'];
21
- };
22
- padding: {
23
- [key in ChartSize]: CSSObject['padding'];
24
- };
25
- gap: {
26
- [key in ChartSize]: CSSObject['gap'];
27
- };
28
- shadow: {
29
- [key in ChartVariant]: CSSObject['boxShadow'];
30
- };
31
- };
7
+ border: CSSObject['border'];
8
+ borderRadius: CSSObject['borderRadius'];
32
9
  header: {
33
10
  padding: {
34
- [key in ChartSize]: CSSObject['padding'];
11
+ x: CSSObject['padding'];
12
+ y: CSSObject['padding'];
35
13
  };
36
- gap: CSSObject['gap'];
37
14
  backgroundColor: CSSObject['backgroundColor'];
38
15
  borderBottom: CSSObject['borderBottom'];
39
- minHeight: CSSObject['minHeight'];
40
- };
41
- content: {
42
- padding: CSSObject['padding'];
43
- gap: {
44
- [key in ChartSize]: CSSObject['gap'];
45
- };
46
- height: {
47
- [key in ChartHeight]: CSSObject['height'];
16
+ borderRadius: CSSObject['borderRadius'];
17
+ slots: {
18
+ gap: CSSObject['gap'];
48
19
  };
49
20
  };
50
- legend: {
51
- gap: {
52
- [key in ChartSize]: CSSObject['gap'];
53
- };
54
- padding: {
55
- [key in ChartSize]: CSSObject['padding'];
56
- };
57
- width: {
58
- [key in ChartLegendPosition]: CSSObject['width'];
59
- };
60
- item: {
61
- padding: CSSObject['padding'];
21
+ content: {
22
+ legend: {
62
23
  gap: CSSObject['gap'];
63
- borderRadius: CSSObject['borderRadius'];
64
- backgroundColor: {
65
- [key in ChartState]: CSSObject['backgroundColor'];
66
- };
67
- color: {
68
- [key in ChartState]: CSSObject['color'];
24
+ item: {
25
+ gap: CSSObject['gap'];
26
+ color: {
27
+ [key in ChartState]: CSSObject['color'];
28
+ };
29
+ fontSize: CSSObject['fontSize'];
30
+ fontWeight: CSSObject['fontWeight'];
69
31
  };
70
- fontSize: CSSObject['fontSize'];
71
- fontWeight: CSSObject['fontWeight'];
72
32
  };
73
- button: {
74
- fontSize: CSSObject['fontSize'];
75
- fontWeight: CSSObject['fontWeight'];
76
- color: CSSObject['color'];
77
- backgroundColor: CSSObject['backgroundColor'];
78
- border: CSSObject['border'];
79
- borderRadius: CSSObject['borderRadius'];
80
- padding: CSSObject['padding'];
81
- };
82
- };
83
- fullscreen: {
84
- container: {
85
- position: CSSObject['position'];
86
- top: CSSObject['top'];
87
- left: CSSObject['left'];
88
- width: CSSObject['width'];
89
- height: CSSObject['height'];
90
- zIndex: CSSObject['zIndex'];
91
- backgroundColor: CSSObject['backgroundColor'];
92
- transform: CSSObject['transform'];
93
- transformOrigin: CSSObject['transformOrigin'];
94
- };
95
- content: {
96
- height: CSSObject['height'];
97
- padding: CSSObject['padding'];
33
+ padding: {
34
+ top: CSSObject['padding'];
35
+ right: CSSObject['padding'];
36
+ bottom: CSSObject['padding'];
37
+ left: CSSObject['padding'];
98
38
  };
39
+ gap: CSSObject['gap'];
40
+ backgroundColor: CSSObject['backgroundColor'];
99
41
  };
100
42
  };
101
43
  export type ResponsiveChartTokens = {
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { TooltipProps } from 'recharts';
3
3
  import { NameType, ValueType } from 'recharts/types/component/DefaultTooltipContent';
4
- import { ButtonV2Props } from '../Button';
4
+ import { ButtonProps } from '../Button';
5
5
  export type DataPoint = {
6
6
  primary: {
7
7
  label: string;
@@ -56,7 +56,7 @@ export type NoDataProps = {
56
56
  title?: string;
57
57
  subtitle?: string;
58
58
  slot?: ReactNode;
59
- button?: ButtonV2Props;
59
+ button?: ButtonProps;
60
60
  };
61
61
  export type AxisConfig = {
62
62
  label?: string;
@@ -135,6 +135,10 @@ export type ChartsProps = {
135
135
  yAxis?: YAxisConfig;
136
136
  noData?: NoDataProps;
137
137
  height?: number;
138
+ showHeader?: boolean;
139
+ showCollapseIcon?: boolean;
140
+ isExpanded?: boolean;
141
+ onExpandedChange?: (isExpanded: boolean) => void;
138
142
  };
139
143
  export type FlattenedDataPoint = {
140
144
  name: string;
@@ -151,6 +155,7 @@ export type ChartHeaderProps = {
151
155
  isSmallScreen?: boolean;
152
156
  isExpanded: boolean;
153
157
  setIsExpanded: (isExpanded: boolean) => void;
158
+ showCollapseIcon?: boolean;
154
159
  };
155
160
  export type ChartLegendsProps = {
156
161
  chartContainerRef: React.RefObject<HTMLDivElement>;
@@ -1,65 +1,49 @@
1
1
  import { CSSObject } from 'styled-components';
2
2
  import { ThemeType } from '../../tokens';
3
- import { CheckboxSize, CheckboxInteractionState } from './types';
3
+ import { CheckboxSize, CheckboxInteractionState, CheckboxCheckedState } from './types';
4
4
  import { BreakpointType } from '../../breakpoints/breakPoints';
5
5
  export type CheckboxTokensType = {
6
6
  gap: CSSObject['gap'];
7
- slotGap: CSSObject['gap'];
8
- checkboxMarginRight: CSSObject['marginRight'];
7
+ slot: {
8
+ marginLeft: CSSObject['marginLeft'];
9
+ };
9
10
  indicator: {
10
- size: {
11
- [key in CheckboxSize]: {
12
- width: CSSObject['width'];
13
- height: CSSObject['height'];
14
- };
11
+ width: {
12
+ [key in CheckboxSize]: CSSObject['width'];
15
13
  };
16
- background: {
17
- checked?: {
18
- [key in CheckboxInteractionState]?: CSSObject['backgroundColor'];
19
- };
20
- unchecked?: {
21
- [key in CheckboxInteractionState]?: CSSObject['backgroundColor'];
22
- };
23
- indeterminate?: {
14
+ height: {
15
+ [key in CheckboxSize]: CSSObject['height'];
16
+ };
17
+ backgroundColor: {
18
+ [key in CheckboxCheckedState]?: {
24
19
  [key in CheckboxInteractionState]?: CSSObject['backgroundColor'];
25
20
  };
26
21
  };
22
+ borderRadius: {
23
+ [key in CheckboxSize]: CSSObject['borderRadius'];
24
+ };
27
25
  border: {
28
- radius: CSSObject['borderRadius'];
29
- width: CSSObject['borderWidth'];
26
+ [key in CheckboxCheckedState]?: {
27
+ [key in CheckboxInteractionState]?: CSSObject['border'];
28
+ };
29
+ };
30
+ outline: CSSObject['outline'];
31
+ outlineOffset: CSSObject['outlineOffset'];
32
+ boxShadow: CSSObject['boxShadow'];
33
+ icon: {
30
34
  color: {
31
- checked?: {
32
- [key in CheckboxInteractionState]?: CSSObject['borderColor'];
33
- };
34
- unchecked?: {
35
- [key in CheckboxInteractionState]?: CSSObject['borderColor'];
36
- };
37
- indeterminate?: {
38
- [key in CheckboxInteractionState]?: CSSObject['borderColor'];
35
+ [key in CheckboxCheckedState]?: {
36
+ [key in Extract<CheckboxInteractionState, 'default' | 'disabled'>]?: CSSObject['color'];
39
37
  };
40
38
  };
41
- };
42
- focus: {
43
- outlineColor: CSSObject['borderColor'];
44
- outlineWidth: CSSObject['borderWidth'];
45
- outlineOffset: CSSObject['outlineOffset'];
46
- boxShadow: CSSObject['boxShadow'];
47
- };
48
- };
49
- icon: {
50
- color: {
51
- checked?: {
52
- [key in Extract<CheckboxInteractionState, 'default' | 'disabled'>]?: CSSObject['color'];
39
+ width: {
40
+ [key in CheckboxSize]: CSSObject['width'];
53
41
  };
54
- indeterminate?: {
55
- [key in Extract<CheckboxInteractionState, 'default' | 'disabled'>]?: CSSObject['color'];
42
+ height: {
43
+ [key in CheckboxSize]: CSSObject['height'];
56
44
  };
57
- };
58
- size: {
59
- [key in CheckboxSize]: {
60
- width: CSSObject['width'];
61
- height: CSSObject['height'];
62
- strokeWidth: CSSObject['strokeWidth'];
45
+ strokeWidth: {
46
+ [key in CheckboxSize]: CSSObject['strokeWidth'];
63
47
  };
64
48
  };
65
49
  };
@@ -67,40 +51,29 @@ export type CheckboxTokensType = {
67
51
  gap: CSSObject['gap'];
68
52
  label: {
69
53
  color: {
70
- [key in Exclude<CheckboxInteractionState, 'hover'>]: CSSObject['color'];
54
+ [key in CheckboxInteractionState]: CSSObject['color'];
71
55
  };
72
- font: {
73
- [key in CheckboxSize]: {
74
- fontSize: CSSObject['fontSize'];
75
- fontWeight: CSSObject['fontWeight'];
76
- };
56
+ fontSize: {
57
+ [key in CheckboxSize]: CSSObject['fontSize'];
58
+ };
59
+ fontWeight: {
60
+ [key in CheckboxSize]: CSSObject['fontWeight'];
77
61
  };
78
62
  };
79
63
  subtext: {
80
64
  color: {
81
- [key in Exclude<CheckboxInteractionState, 'hover'>]: CSSObject['color'];
65
+ [key in CheckboxInteractionState]: CSSObject['color'];
82
66
  };
83
- font: {
84
- [key in CheckboxSize]: {
85
- fontSize: CSSObject['fontSize'];
86
- fontWeight: CSSObject['fontWeight'];
87
- };
67
+ fontSize: {
68
+ [key in CheckboxSize]: CSSObject['fontSize'];
88
69
  };
89
- spacing: {
90
- left: {
91
- [key in CheckboxSize]: CSSObject['marginLeft'];
92
- };
93
- top: CSSObject['marginTop'];
70
+ fontWeight: {
71
+ [key in CheckboxSize]: CSSObject['fontWeight'];
94
72
  };
95
73
  };
96
74
  };
97
75
  required: {
98
76
  color: CSSObject['color'];
99
- spacing: CSSObject['marginLeft'];
100
- };
101
- transition: {
102
- duration: CSSObject['transitionDuration'];
103
- easing: CSSObject['transitionTimingFunction'];
104
77
  };
105
78
  };
106
79
  export type ResponsiveCheckboxTokens = {
@@ -7,6 +7,7 @@ export type TableCellProps<T extends Record<string, unknown>> = {
7
7
  currentValue: unknown;
8
8
  width: React.CSSProperties;
9
9
  frozenStyles?: React.CSSProperties;
10
+ isFirstRow?: boolean;
10
11
  onFieldChange: (value: unknown) => void;
11
12
  getDisplayValue?: (value: unknown, column: ColumnDefinition<T>) => unknown;
12
13
  };
@@ -1,4 +1,5 @@
1
1
  import { DateRangePreset, DateRangePickerSize, CustomPresetConfig } from './types';
2
+ import { CalendarTokenType } from './dateRangePicker.tokens';
2
3
  type QuickRangeSelectorProps = {
3
4
  isOpen: boolean;
4
5
  onToggle: () => void;
@@ -13,6 +14,7 @@ type QuickRangeSelectorProps = {
13
14
  size?: DateRangePickerSize;
14
15
  maxMenuHeight?: number;
15
16
  isStandalone?: boolean;
17
+ calendarToken?: CalendarTokenType;
16
18
  };
17
19
  declare const QuickRangeSelector: import('react').ForwardRefExoticComponent<QuickRangeSelectorProps & import('react').RefAttributes<HTMLDivElement>>;
18
20
  export default QuickRangeSelector;
@@ -1,10 +1,12 @@
1
1
  import { default as React } from 'react';
2
+ import { CalendarTokenType } from './dateRangePicker.tokens';
2
3
  type TimeSelectorProps = {
3
4
  value: string;
4
5
  onChange: (time: string) => void;
5
6
  className?: string;
6
7
  autoFocus?: boolean;
7
8
  tabIndex?: number;
9
+ calendarToken?: CalendarTokenType;
8
10
  };
9
11
  declare const TimeSelector: React.ForwardRefExoticComponent<TimeSelectorProps & React.RefAttributes<HTMLDivElement>>;
10
12
  export default TimeSelector;