@indico-data/design-system 3.0.10 → 3.2.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.
Files changed (116) hide show
  1. package/.storybook/main.ts +3 -0
  2. package/lib/components/badge/types.d.ts +4 -0
  3. package/lib/components/button/types.d.ts +52 -2
  4. package/lib/components/card/Card.d.ts +5 -0
  5. package/lib/components/floatUI/types.d.ts +7 -0
  6. package/lib/components/forms/checkbox/Checkbox.d.ts +7 -0
  7. package/lib/components/forms/date/datePicker/types.d.ts +10 -0
  8. package/lib/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.d.ts +16 -0
  9. package/lib/components/forms/date/inputDatePicker/SingleInputDatePicker.d.ts +8 -0
  10. package/lib/components/forms/date/inputDateRangePicker/InputDateRangePicker.d.ts +9 -0
  11. package/lib/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.d.ts +9 -0
  12. package/lib/components/forms/numberInput/NumberInput.d.ts +4 -0
  13. package/lib/components/forms/passwordInput/PasswordInput.d.ts +1 -0
  14. package/lib/components/forms/radio/Radio.d.ts +6 -0
  15. package/lib/components/forms/select/Select.d.ts +10 -0
  16. package/lib/components/forms/textarea/Textarea.d.ts +7 -0
  17. package/lib/components/forms/timePicker/TimePicker.d.ts +5 -0
  18. package/lib/components/forms/toggle/Toggle.d.ts +7 -0
  19. package/lib/components/icons/types.d.ts +5 -0
  20. package/lib/components/loading-indicators/BarSpinner/BarSpinner.d.ts +4 -0
  21. package/lib/components/loading-indicators/CirclePulse/CirclePulse.d.ts +2 -0
  22. package/lib/components/menu/Menu.d.ts +1 -0
  23. package/lib/components/modal/types.d.ts +22 -0
  24. package/lib/components/pagination/types.d.ts +4 -0
  25. package/lib/components/pill/Pill.d.ts +1 -1
  26. package/lib/components/pill/Pill.stories.d.ts +2 -1
  27. package/lib/components/pill/types.d.ts +8 -2
  28. package/lib/components/skeleton/Skeleton.d.ts +5 -0
  29. package/lib/components/stepper/types.d.ts +9 -0
  30. package/lib/components/table/types.d.ts +9 -0
  31. package/lib/components/tanstackTable/TankstackTable.types.d.ts +25 -0
  32. package/lib/components/tanstackTable/components/ActionBar/ActionBar.d.ts +4 -0
  33. package/lib/components/tooltip/Tooltip.d.ts +6 -0
  34. package/lib/components/truncate/types.d.ts +4 -0
  35. package/lib/index.css +4977 -5020
  36. package/lib/index.d.ts +268 -5
  37. package/lib/index.esm.css +4977 -5020
  38. package/lib/index.esm.js +3 -2
  39. package/lib/index.esm.js.map +1 -1
  40. package/lib/index.js +3 -2
  41. package/lib/index.js.map +1 -1
  42. package/lib/types.d.ts +3 -1
  43. package/package.json +2 -1
  44. package/src/components/badge/Badge.stories.tsx +0 -4
  45. package/src/components/badge/types.ts +4 -0
  46. package/src/components/button/Button.stories.tsx +5 -18
  47. package/src/components/button/types.ts +52 -2
  48. package/src/components/card/Card.stories.tsx +0 -5
  49. package/src/components/card/Card.tsx +5 -0
  50. package/src/components/floatUI/FloatUI.stories.tsx +0 -11
  51. package/src/components/floatUI/types.ts +7 -0
  52. package/src/components/forms/checkbox/Checkbox.stories.tsx +0 -7
  53. package/src/components/forms/checkbox/Checkbox.tsx +7 -0
  54. package/src/components/forms/date/datePicker/DatePicker.stories.tsx +0 -33
  55. package/src/components/forms/date/datePicker/types.ts +10 -0
  56. package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.stories.tsx +5 -22
  57. package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.tsx +16 -0
  58. package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.stories.tsx +0 -25
  59. package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.tsx +8 -0
  60. package/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.stories.tsx +0 -32
  61. package/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.tsx +9 -0
  62. package/src/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.stories.tsx +0 -28
  63. package/src/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.tsx +9 -0
  64. package/src/components/forms/numberInput/NumberInput.stories.tsx +0 -4
  65. package/src/components/forms/numberInput/NumberInput.tsx +4 -0
  66. package/src/components/forms/passwordInput/PasswordInput.stories.tsx +0 -1
  67. package/src/components/forms/passwordInput/PasswordInput.tsx +1 -0
  68. package/src/components/forms/radio/Radio.stories.tsx +0 -6
  69. package/src/components/forms/radio/Radio.tsx +6 -0
  70. package/src/components/forms/select/Select.stories.tsx +1 -14
  71. package/src/components/forms/select/Select.tsx +10 -0
  72. package/src/components/forms/textarea/Textarea.stories.tsx +0 -7
  73. package/src/components/forms/textarea/Textarea.tsx +7 -0
  74. package/src/components/forms/timePicker/TimePicker.stories.tsx +0 -5
  75. package/src/components/forms/timePicker/TimePicker.tsx +5 -0
  76. package/src/components/forms/toggle/Toggle.stories.tsx +0 -7
  77. package/src/components/forms/toggle/Toggle.tsx +7 -0
  78. package/src/components/icons/Icon.stories.tsx +0 -7
  79. package/src/components/icons/types.ts +5 -0
  80. package/src/components/loading-indicators/BarSpinner/BarSpinner.stories.tsx +0 -5
  81. package/src/components/loading-indicators/BarSpinner/BarSpinner.tsx +4 -0
  82. package/src/components/loading-indicators/CirclePulse/CirclePulse.stories.tsx +0 -3
  83. package/src/components/loading-indicators/CirclePulse/CirclePulse.tsx +2 -0
  84. package/src/components/menu/Menu.stories.tsx +0 -3
  85. package/src/components/menu/Menu.tsx +1 -0
  86. package/src/components/modal/Modal.stories.tsx +1 -25
  87. package/src/components/modal/types.ts +22 -0
  88. package/src/components/pagination/Pagination.stories.tsx +0 -4
  89. package/src/components/pagination/types.ts +4 -0
  90. package/src/components/pill/Pill.mdx +6 -2
  91. package/src/components/pill/Pill.stories.tsx +50 -61
  92. package/src/components/pill/Pill.tsx +4 -2
  93. package/src/components/pill/__tests__/Pill.test.tsx +28 -10
  94. package/src/components/pill/styles/Pill.scss +12 -129
  95. package/src/components/pill/types.ts +8 -2
  96. package/src/components/skeleton/Skeleton.stories.tsx +0 -7
  97. package/src/components/skeleton/Skeleton.tsx +5 -0
  98. package/src/components/stepper/Stepper.stories.tsx +0 -19
  99. package/src/components/stepper/types.ts +9 -0
  100. package/src/components/table/Table.stories.tsx +0 -35
  101. package/src/components/table/types.ts +9 -0
  102. package/src/components/tanstackTable/TankstackTable.types.ts +25 -0
  103. package/src/components/tanstackTable/TanstackTable.stories.tsx +0 -29
  104. package/src/components/tanstackTable/components/ActionBar/ActionBar.stories.tsx +0 -4
  105. package/src/components/tanstackTable/components/ActionBar/ActionBar.tsx +4 -0
  106. package/src/components/tooltip/Tooltip.stories.tsx +0 -8
  107. package/src/components/tooltip/Tooltip.tsx +6 -0
  108. package/src/components/truncate/Truncate.stories.tsx +0 -8
  109. package/src/components/truncate/types.ts +4 -0
  110. package/src/styles/_colors.scss +9 -0
  111. package/src/styles/globals.scss +22 -0
  112. package/src/styles/index.scss +11 -10
  113. package/src/styles/variables/_colors.scss +269 -2
  114. package/src/types.ts +12 -8
  115. package/src/styles/variables/themes/dark.scss +0 -267
  116. package/src/styles/variables/themes/light.scss +0 -266
@@ -8,7 +8,6 @@ const meta: Meta = {
8
8
  argTypes: {
9
9
  isChecked: {
10
10
  control: false,
11
- description: 'This is the state of the toggle',
12
11
  table: {
13
12
  category: 'Props',
14
13
  type: {
@@ -24,7 +23,6 @@ const meta: Meta = {
24
23
  },
25
24
  onChange: {
26
25
  control: false,
27
- description: 'onChange event handler',
28
26
  table: {
29
27
  category: 'Callbacks',
30
28
  type: {
@@ -35,7 +33,6 @@ const meta: Meta = {
35
33
  },
36
34
  label: {
37
35
  control: 'text',
38
- description: 'The label for the toggle field',
39
36
  table: {
40
37
  category: 'Props',
41
38
  type: {
@@ -46,7 +43,6 @@ const meta: Meta = {
46
43
  },
47
44
  name: {
48
45
  control: 'text',
49
- description: 'The name for the toggle field',
50
46
  table: {
51
47
  category: 'Props',
52
48
  type: {
@@ -57,7 +53,6 @@ const meta: Meta = {
57
53
  },
58
54
  value: {
59
55
  control: 'text',
60
- description: 'This holds the value that will be emitted when the toggle is selected',
61
56
  table: {
62
57
  category: 'Props',
63
58
  type: {
@@ -68,7 +63,6 @@ const meta: Meta = {
68
63
  },
69
64
  id: {
70
65
  control: 'text',
71
- description: 'This explains what button group this toggle belongs to.',
72
66
  table: {
73
67
  category: 'Props',
74
68
  type: {
@@ -79,7 +73,6 @@ const meta: Meta = {
79
73
  },
80
74
  isDisabled: {
81
75
  control: 'boolean',
82
- description: 'This disables the toggle',
83
76
  table: {
84
77
  category: 'Props',
85
78
  type: {
@@ -2,12 +2,19 @@ import React from 'react';
2
2
 
3
3
  export interface ToggleProps {
4
4
  ref?: React.LegacyRef<HTMLInputElement>;
5
+ /** This explains what button group this toggle belongs to. */
5
6
  id: string;
7
+ /** The label for the toggle field */
6
8
  label?: string;
9
+ /** The name for the toggle field */
7
10
  name: string;
11
+ /** This holds the value that will be emitted when the toggle is selected */
8
12
  value?: string;
13
+ /** onChange event handler */
9
14
  onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
15
+ /** This disables the toggle */
10
16
  isDisabled?: boolean;
17
+ /** This is the state of the toggle */
11
18
  isChecked?: boolean;
12
19
  defaultChecked?: boolean;
13
20
  }
@@ -15,7 +15,6 @@ const meta: Meta = {
15
15
  argTypes: {
16
16
  id: {
17
17
  control: 'text',
18
- description: 'Unique identifier for the icon',
19
18
  table: {
20
19
  type: { summary: 'string' },
21
20
  },
@@ -23,14 +22,12 @@ const meta: Meta = {
23
22
  name: {
24
23
  control: 'select',
25
24
  options: iconNames,
26
- description: 'The name of the icon',
27
25
  table: {
28
26
  type: { summary: 'string' },
29
27
  },
30
28
  },
31
29
  ariaLabel: {
32
30
  control: 'text',
33
- description: 'Accessible label for the icon',
34
31
  table: {
35
32
  type: { summary: 'string' },
36
33
  category: 'accessibility',
@@ -38,7 +35,6 @@ const meta: Meta = {
38
35
  },
39
36
  className: {
40
37
  control: 'text',
41
- description: 'Additional custom class names',
42
38
  table: {
43
39
  type: { summary: 'string' },
44
40
  category: 'styling',
@@ -47,7 +43,6 @@ const meta: Meta = {
47
43
  size: {
48
44
  control: 'select',
49
45
  options: ['xs', 'sm', 'md', 'lg', 'xl'],
50
- description: 'Size of the icon',
51
46
  table: {
52
47
  type: { summary: 'xs | sm | md | lg | xl' },
53
48
  category: 'styling',
@@ -55,7 +50,6 @@ const meta: Meta = {
55
50
  },
56
51
  style: {
57
52
  control: 'object',
58
- description: 'Inline styles for the icon',
59
53
  table: {
60
54
  type: { summary: 'React.CSSProperties' },
61
55
  category: 'styling',
@@ -63,7 +57,6 @@ const meta: Meta = {
63
57
  },
64
58
  onClick: {
65
59
  action: 'clicked',
66
- description: 'Click event handler',
67
60
  table: {
68
61
  type: { summary: 'MouseEventHandler<SVGElement>' },
69
62
  category: 'callbacks',
@@ -10,9 +10,14 @@ export type IndiconName = keyof typeof indicons;
10
10
  export type IconName = IndiconName | `fa-${FAIconName}`;
11
11
 
12
12
  export type IconProps = PermafrostComponent & {
13
+ /** The name of the icon */
13
14
  name: IconName;
15
+ /** Accessible label for the icon */
14
16
  ariaLabel?: string;
17
+ /** Size of the icon */
15
18
  size?: IconSizes;
19
+ /** Inline styles for the icon */
16
20
  style?: CSSProperties;
21
+ /** Click event handler */
17
22
  onClick?: MouseEventHandler<SVGElement>;
18
23
  };
@@ -8,7 +8,6 @@ const meta: Meta = {
8
8
  argTypes: {
9
9
  className: {
10
10
  control: false,
11
- description: 'The class name of the bar spinner',
12
11
  table: {
13
12
  category: 'Props',
14
13
  },
@@ -20,22 +19,18 @@ const meta: Meta = {
20
19
  },
21
20
  width: {
22
21
  control: false,
23
- description: 'The width of the bar spinner',
24
22
  table: {
25
23
  category: 'Props',
26
24
  },
27
25
  },
28
26
  height: {
29
27
  control: false,
30
- description: 'The height of the bar spinner',
31
28
  table: {
32
29
  category: 'Props',
33
30
  },
34
31
  },
35
32
  id: {
36
33
  control: false,
37
- description:
38
- "The id of the tooltip. This needs to match the element that holds it's data attribute",
39
34
  table: {
40
35
  category: 'Props',
41
36
  type: {
@@ -6,9 +6,13 @@ export function BarSpinner({
6
6
  ...rest
7
7
  }: {
8
8
  'data-testid'?: string;
9
+ /** The width of the bar spinner */
9
10
  width?: number;
11
+ /** The id of the tooltip. This needs to match the element that holds it's data attribute */
10
12
  id?: string;
13
+ /** The height of the bar spinner */
11
14
  height?: number;
15
+ /** The class name of the bar spinner */
12
16
  className?: string;
13
17
  [key: string]: any;
14
18
  }) {
@@ -23,7 +23,6 @@ const meta: Meta = {
23
23
  argTypes: {
24
24
  size: {
25
25
  control: 'select',
26
- description: 'The size of the circle',
27
26
  options: ['xxs', 'xs', 'sm', 'md', 'lg', 'xl', 'xxl'],
28
27
  table: {
29
28
  category: 'Props',
@@ -34,7 +33,6 @@ const meta: Meta = {
34
33
  },
35
34
  id: {
36
35
  control: false,
37
- description: 'The id of the circle pulse',
38
36
  table: {
39
37
  category: 'Props',
40
38
  type: {
@@ -44,7 +42,6 @@ const meta: Meta = {
44
42
  },
45
43
  className: {
46
44
  control: false,
47
- description: 'The class name of the circle pulse',
48
45
  table: {
49
46
  category: 'Props',
50
47
  type: {
@@ -1,5 +1,7 @@
1
1
  interface CirclePulseProps {
2
+ /** The size of the circle */
2
3
  size?: 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
4
+ /** The class name of the circle pulse */
3
5
  className?: string;
4
6
  [key: string]: any;
5
7
  }
@@ -8,7 +8,6 @@ const meta: Meta<typeof Menu> = {
8
8
  argTypes: {
9
9
  className: {
10
10
  control: 'text',
11
- description: 'The class name to apply to the Menu component.',
12
11
  table: {
13
12
  category: 'Props',
14
13
  type: {
@@ -18,8 +17,6 @@ const meta: Meta<typeof Menu> = {
18
17
  },
19
18
  children: {
20
19
  control: false,
21
- description:
22
- 'The children of the Menu component, which will be automatically styled as menu-items.',
23
20
  table: {
24
21
  category: 'Props',
25
22
  type: {
@@ -3,6 +3,7 @@ import classNames from 'classnames';
3
3
 
4
4
  export type MenuProps = {
5
5
  children: React.ReactNode;
6
+ /** The class name to apply to the Menu component. */
6
7
  className?: string;
7
8
  };
8
9
 
@@ -16,7 +16,6 @@ const meta: Meta = {
16
16
  argTypes: {
17
17
  className: {
18
18
  control: 'text',
19
- description: 'Additional classes for the badge component',
20
19
  table: {
21
20
  category: 'Props',
22
21
  type: {
@@ -26,7 +25,6 @@ const meta: Meta = {
26
25
  },
27
26
  children: {
28
27
  control: false,
29
- description: 'The content of the badge (superseded by the string prop)',
30
28
  table: {
31
29
  category: 'Props',
32
30
  type: {
@@ -36,7 +34,6 @@ const meta: Meta = {
36
34
  },
37
35
  isOpen: {
38
36
  control: false,
39
- description: 'Whether the modal is open',
40
37
  table: {
41
38
  category: 'Props',
42
39
  type: {
@@ -46,7 +43,6 @@ const meta: Meta = {
46
43
  },
47
44
  onRequestClose: {
48
45
  control: false,
49
- description: 'Callback function to be called when the modal is closed',
50
46
  table: {
51
47
  category: 'Props',
52
48
  type: {
@@ -56,7 +52,6 @@ const meta: Meta = {
56
52
  },
57
53
  portalClassName: {
58
54
  control: false,
59
- description: 'Additional classes for the portal element',
60
55
  table: {
61
56
  category: 'Props',
62
57
  type: {
@@ -66,7 +61,6 @@ const meta: Meta = {
66
61
  },
67
62
  overlayClassName: {
68
63
  control: false,
69
- description: 'Additional classes for the overlay element',
70
64
  table: {
71
65
  category: 'Props',
72
66
  type: {
@@ -76,7 +70,6 @@ const meta: Meta = {
76
70
  },
77
71
  appElement: {
78
72
  control: false,
79
- description: 'The element to use as the app element',
80
73
  table: {
81
74
  category: 'Props',
82
75
  type: {
@@ -86,7 +79,6 @@ const meta: Meta = {
86
79
  },
87
80
  shouldCloseOnOverlayClick: {
88
81
  control: 'boolean',
89
- description: 'Whether the modal should close when the overlay is clicked',
90
82
  table: {
91
83
  category: 'Props',
92
84
  type: {
@@ -96,18 +88,15 @@ const meta: Meta = {
96
88
  },
97
89
  parentSelector: {
98
90
  control: false,
99
- description:
100
- 'The element to use as the parent element for the modal. If you have issues with styling, make sure you pass the correct root element here.',
101
91
  table: {
102
92
  category: 'Props',
103
93
  type: {
104
- summary: 'HTMLElement',
94
+ summary: 'function',
105
95
  },
106
96
  },
107
97
  },
108
98
  shouldCloseOnEsc: {
109
99
  control: 'boolean',
110
- description: 'Whether the modal should close when the escape key is pressed',
111
100
  table: {
112
101
  category: 'Props',
113
102
  type: {
@@ -117,7 +106,6 @@ const meta: Meta = {
117
106
  },
118
107
  contentElement: {
119
108
  control: false,
120
- description: 'Custom content element for the modal',
121
109
  table: {
122
110
  category: 'Props',
123
111
  type: {
@@ -127,7 +115,6 @@ const meta: Meta = {
127
115
  },
128
116
  overlayElement: {
129
117
  control: false,
130
- description: 'Custom overlay element for the modal',
131
118
  table: {
132
119
  category: 'Props',
133
120
  type: {
@@ -138,7 +125,6 @@ const meta: Meta = {
138
125
  position: {
139
126
  control: 'select',
140
127
  options: ['top', 'center'],
141
- description: 'The position of the modal opens on the page',
142
128
  table: {
143
129
  category: 'Props',
144
130
  type: {
@@ -153,7 +139,6 @@ const meta: Meta = {
153
139
  },
154
140
  title: {
155
141
  control: 'text',
156
- description: 'The title of the modal',
157
142
  table: {
158
143
  category: 'Props',
159
144
  type: {
@@ -163,7 +148,6 @@ const meta: Meta = {
163
148
  },
164
149
  footer: {
165
150
  control: false,
166
- description: 'The footer of the modal. It accepts a React Component',
167
151
  table: {
168
152
  category: 'Props',
169
153
  type: {
@@ -173,7 +157,6 @@ const meta: Meta = {
173
157
  },
174
158
  subtitle: {
175
159
  control: 'text',
176
- description: 'The subtitle of the modal',
177
160
  table: {
178
161
  category: 'Props',
179
162
  type: {
@@ -183,7 +166,6 @@ const meta: Meta = {
183
166
  },
184
167
  maxWidthInPixels: {
185
168
  control: 'number',
186
- description: 'The maximum width of the modal in pixels',
187
169
  table: {
188
170
  category: 'Props',
189
171
  type: {
@@ -193,7 +175,6 @@ const meta: Meta = {
193
175
  },
194
176
  confirmationButtonText: {
195
177
  control: 'text',
196
- description: 'The text of the confirmation button',
197
178
  table: {
198
179
  category: 'Confirmation Modal',
199
180
  type: {
@@ -204,7 +185,6 @@ const meta: Meta = {
204
185
  confirmationButtonVariant: {
205
186
  control: 'select',
206
187
  options: ['solid', 'outline', 'link', 'action', 'destructive', 'soft'],
207
- description: 'The variant of the confirmation button. ',
208
188
  table: {
209
189
  category: 'Confirmation Modal',
210
190
  type: {
@@ -214,7 +194,6 @@ const meta: Meta = {
214
194
  },
215
195
  cancelButtonText: {
216
196
  control: 'text',
217
- description: 'The text of the cancel button',
218
197
  table: {
219
198
  category: 'Confirmation Modal',
220
199
  type: {
@@ -225,7 +204,6 @@ const meta: Meta = {
225
204
  status: {
226
205
  control: 'select',
227
206
  options: ['info', 'success', 'error'],
228
- description: 'The status of the modal. This will determine the color of the icon.',
229
207
  table: {
230
208
  category: 'Confirmation Modal',
231
209
  type: {
@@ -236,7 +214,6 @@ const meta: Meta = {
236
214
  icon: {
237
215
  control: 'select',
238
216
  options: Object.keys(indiconDefinitions),
239
- description: 'The icon of the modal',
240
217
  table: {
241
218
  category: 'Confirmation Modal',
242
219
  type: {
@@ -246,7 +223,6 @@ const meta: Meta = {
246
223
  },
247
224
  hasDontShowAgainCheckbox: {
248
225
  control: 'boolean',
249
- description: 'Whether the modal should have a checkbox to not show again',
250
226
  table: {
251
227
  category: 'Confirmation Modal',
252
228
  type: {
@@ -2,23 +2,39 @@ import { ButtonVariants } from '../button/types';
2
2
  import { IconName } from '../icons/types';
3
3
 
4
4
  export interface ModalProps {
5
+ /** Additional classes for the badge component */
5
6
  className?: string;
7
+ /** The content of the badge (superseded by the string prop) */
6
8
  children?: React.ReactNode;
9
+ /** Whether the modal is open */
7
10
  isOpen: boolean;
11
+ /** Callback function to be called when the modal is closed */
8
12
  onRequestClose?: () => void;
13
+ /** Additional classes for the portal element */
9
14
  portalClassName?: string;
15
+ /** Additional classes for the overlay element */
10
16
  overlayClassName?: string;
17
+ /** The element to use as the app element */
11
18
  appElement?: HTMLElement;
19
+ /** Whether the modal should close when the overlay is clicked */
12
20
  shouldCloseOnOverlayClick?: boolean;
21
+ /** Whether the modal should close when the escape key is pressed */
13
22
  shouldCloseOnEsc?: boolean;
14
23
  testId?: string;
24
+ /** Custom content element for the modal */
15
25
  contentElement?: (props: any, children: React.ReactNode) => React.ReactElement;
26
+ /** Custom overlay element for the modal */
16
27
  overlayElement?: (props: any, contentElement: React.ReactElement) => React.ReactElement;
28
+ /** The position of the modal opens on the page */
17
29
  position?: 'top' | 'center';
18
30
  parentSelector?: () => HTMLElement;
31
+ /** The title of the modal */
19
32
  title?: string;
33
+ /** The subtitle of the modal */
20
34
  subtitle?: string;
35
+ /** The footer of the modal. It accepts a React Component */
21
36
  footer?: React.ReactNode;
37
+ /** The maximum width of the modal in pixels */
22
38
  maxWidthInPixels?: number;
23
39
  }
24
40
 
@@ -29,10 +45,16 @@ export interface ConfirmationModalProps extends ModalProps {
29
45
  dontShowAgain?: boolean;
30
46
  }) => void | Promise<void> | Promise<boolean>;
31
47
  onCancelRequest?: () => void | Promise<void> | Promise<boolean>;
48
+ /** Whether the modal should have a checkbox to not show again */
32
49
  hasDontShowAgainCheckbox?: boolean;
50
+ /** The variant of the confirmation button. */
33
51
  confirmationButtonVariant?: ButtonVariants;
52
+ /** The text of the confirmation button */
34
53
  confirmationButtonText?: string;
54
+ /** The text of the cancel button */
35
55
  cancelButtonText?: string;
56
+ /** The icon of the modal */
36
57
  icon?: IconName;
58
+ /** The status of the modal. This will determine the color of the icon. */
37
59
  status?: 'info' | 'success' | 'error';
38
60
  }
@@ -9,7 +9,6 @@ const meta: Meta = {
9
9
  argTypes: {
10
10
  className: {
11
11
  control: false,
12
- description: 'The css class name for the pagination component',
13
12
  table: {
14
13
  category: 'Props',
15
14
  type: {
@@ -19,7 +18,6 @@ const meta: Meta = {
19
18
  },
20
19
  totalPages: {
21
20
  control: 'number',
22
- description: 'The total number of pages to be displayed',
23
21
  table: {
24
22
  category: 'Props',
25
23
  type: {
@@ -29,7 +27,6 @@ const meta: Meta = {
29
27
  },
30
28
  currentPage: {
31
29
  control: 'number',
32
- description: 'The current page displayed in the input field.',
33
30
  table: {
34
31
  category: 'Props',
35
32
  type: {
@@ -39,7 +36,6 @@ const meta: Meta = {
39
36
  },
40
37
  onChange: {
41
38
  action: 'change',
42
- description: 'The callback function that is called when the page changes.',
43
39
  table: {
44
40
  category: 'Callbacks',
45
41
  type: {
@@ -1,6 +1,10 @@
1
1
  export interface PaginationProps {
2
+ /** The total number of pages to be displayed */
2
3
  totalPages: number;
4
+ /** The current page displayed in the input field. */
3
5
  currentPage?: number;
6
+ /** The css class name for the pagination component */
4
7
  className?: string;
8
+ /** The callback function that is called when the page changes. */
5
9
  onChange?: (value: number) => void;
6
10
  }
@@ -15,6 +15,10 @@ Pills are used to display information in a compact way. They are often used to d
15
15
 
16
16
  <Story of={Pill.AllSizes} />
17
17
 
18
- ## Statuses
18
+ ## Default Colors
19
19
 
20
- <Story of={Pill.AllStatuses} />
20
+ <Story of={Pill.AllDefaultColors} />
21
+
22
+ # Shades
23
+
24
+ <Story of={Pill.AllShades} />