@indico-data/design-system 3.0.10 → 3.1.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 (98) 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/types.d.ts +3 -0
  26. package/lib/components/skeleton/Skeleton.d.ts +5 -0
  27. package/lib/components/stepper/types.d.ts +9 -0
  28. package/lib/components/table/types.d.ts +9 -0
  29. package/lib/components/tanstackTable/TankstackTable.types.d.ts +25 -0
  30. package/lib/components/tanstackTable/components/ActionBar/ActionBar.d.ts +4 -0
  31. package/lib/components/tooltip/Tooltip.d.ts +6 -0
  32. package/lib/components/truncate/types.d.ts +4 -0
  33. package/lib/index.d.ts +262 -2
  34. package/lib/index.esm.js.map +1 -1
  35. package/lib/index.js.map +1 -1
  36. package/package.json +2 -1
  37. package/src/components/badge/Badge.stories.tsx +0 -4
  38. package/src/components/badge/types.ts +4 -0
  39. package/src/components/button/Button.stories.tsx +5 -18
  40. package/src/components/button/types.ts +52 -2
  41. package/src/components/card/Card.stories.tsx +0 -5
  42. package/src/components/card/Card.tsx +5 -0
  43. package/src/components/floatUI/FloatUI.stories.tsx +0 -11
  44. package/src/components/floatUI/types.ts +7 -0
  45. package/src/components/forms/checkbox/Checkbox.stories.tsx +0 -7
  46. package/src/components/forms/checkbox/Checkbox.tsx +7 -0
  47. package/src/components/forms/date/datePicker/DatePicker.stories.tsx +0 -33
  48. package/src/components/forms/date/datePicker/types.ts +10 -0
  49. package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.stories.tsx +5 -22
  50. package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.tsx +16 -0
  51. package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.stories.tsx +0 -25
  52. package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.tsx +8 -0
  53. package/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.stories.tsx +0 -32
  54. package/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.tsx +9 -0
  55. package/src/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.stories.tsx +0 -28
  56. package/src/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.tsx +9 -0
  57. package/src/components/forms/numberInput/NumberInput.stories.tsx +0 -4
  58. package/src/components/forms/numberInput/NumberInput.tsx +4 -0
  59. package/src/components/forms/passwordInput/PasswordInput.stories.tsx +0 -1
  60. package/src/components/forms/passwordInput/PasswordInput.tsx +1 -0
  61. package/src/components/forms/radio/Radio.stories.tsx +0 -6
  62. package/src/components/forms/radio/Radio.tsx +6 -0
  63. package/src/components/forms/select/Select.stories.tsx +1 -14
  64. package/src/components/forms/select/Select.tsx +10 -0
  65. package/src/components/forms/textarea/Textarea.stories.tsx +0 -7
  66. package/src/components/forms/textarea/Textarea.tsx +7 -0
  67. package/src/components/forms/timePicker/TimePicker.stories.tsx +0 -5
  68. package/src/components/forms/timePicker/TimePicker.tsx +5 -0
  69. package/src/components/forms/toggle/Toggle.stories.tsx +0 -7
  70. package/src/components/forms/toggle/Toggle.tsx +7 -0
  71. package/src/components/icons/Icon.stories.tsx +0 -7
  72. package/src/components/icons/types.ts +5 -0
  73. package/src/components/loading-indicators/BarSpinner/BarSpinner.stories.tsx +0 -5
  74. package/src/components/loading-indicators/BarSpinner/BarSpinner.tsx +4 -0
  75. package/src/components/loading-indicators/CirclePulse/CirclePulse.stories.tsx +0 -3
  76. package/src/components/loading-indicators/CirclePulse/CirclePulse.tsx +2 -0
  77. package/src/components/menu/Menu.stories.tsx +0 -3
  78. package/src/components/menu/Menu.tsx +1 -0
  79. package/src/components/modal/Modal.stories.tsx +1 -25
  80. package/src/components/modal/types.ts +22 -0
  81. package/src/components/pagination/Pagination.stories.tsx +0 -4
  82. package/src/components/pagination/types.ts +4 -0
  83. package/src/components/pill/Pill.stories.tsx +0 -3
  84. package/src/components/pill/types.ts +3 -0
  85. package/src/components/skeleton/Skeleton.stories.tsx +0 -7
  86. package/src/components/skeleton/Skeleton.tsx +5 -0
  87. package/src/components/stepper/Stepper.stories.tsx +0 -19
  88. package/src/components/stepper/types.ts +9 -0
  89. package/src/components/table/Table.stories.tsx +0 -35
  90. package/src/components/table/types.ts +9 -0
  91. package/src/components/tanstackTable/TankstackTable.types.ts +25 -0
  92. package/src/components/tanstackTable/TanstackTable.stories.tsx +0 -29
  93. package/src/components/tanstackTable/components/ActionBar/ActionBar.stories.tsx +0 -4
  94. package/src/components/tanstackTable/components/ActionBar/ActionBar.tsx +4 -0
  95. package/src/components/tooltip/Tooltip.stories.tsx +0 -8
  96. package/src/components/tooltip/Tooltip.tsx +6 -0
  97. package/src/components/truncate/Truncate.stories.tsx +0 -8
  98. package/src/components/truncate/types.ts +4 -0
@@ -11,6 +11,7 @@ import { Button } from '../../../button';
11
11
  import { UseFloatingOptions } from '@floating-ui/react-dom';
12
12
  import { PortalOptions } from '../datePicker/types';
13
13
  interface InputDateRangePickerProps {
14
+ /** A label for assistive technologies. */
14
15
  ariaLabel: string;
15
16
  disableBeforeDate?: Date;
16
17
  disableAfterDate?: Date;
@@ -21,6 +22,7 @@ interface InputDateRangePickerProps {
21
22
  month?: Date;
22
23
  selected?: DateRange | undefined;
23
24
  isOpen?: boolean;
25
+ /** Whether the date picker is open. */
24
26
  setIsOpen?: React.Dispatch<React.SetStateAction<boolean>>;
25
27
  className?: string;
26
28
  inputIconName?: IconName;
@@ -28,19 +30,26 @@ interface InputDateRangePickerProps {
28
30
  toErrorMessage?: string | undefined;
29
31
  fromErrorMessage?: string | undefined;
30
32
  'data-testid'?: string;
33
+ /** The gutter width for the date picker. */
31
34
  gutterWidth?: number;
32
35
  fromLabel?: string;
33
36
  toLabel?: string;
34
37
  closeOnSelect?: boolean;
35
38
  clearOnClose?: boolean;
39
+ /** Whether the label is hidden. */
36
40
  hasHiddenLabel?: boolean;
41
+ /** The ref of the input field. */
37
42
  ref?: React.LegacyRef<HTMLInputElement>;
43
+ /** Whether the from input is read only. */
38
44
  isFromReadOnly?: boolean;
45
+ /** Whether the to input is read only. */
39
46
  isToReadOnly?: boolean;
40
47
  toTabIndex?: number;
48
+ /** The tab index of the from input field. */
41
49
  fromTabIndex?: number;
42
50
  portalOptions?: PortalOptions;
43
51
  floatingOptions?: UseFloatingOptions;
52
+ /** Whether the date picker is a portal. */
44
53
  isPortal?: boolean;
45
54
  }
46
55
 
@@ -22,7 +22,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
22
22
  argTypes: {
23
23
  isPortal: {
24
24
  control: 'boolean',
25
- description: 'Whether the date picker is a portal.',
26
25
  table: {
27
26
  category: 'Props',
28
27
  type: {
@@ -32,7 +31,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
32
31
  },
33
32
  portalOptions: {
34
33
  control: false,
35
- description: 'The portal options for the date picker. Follows floating-ui options.',
36
34
  table: {
37
35
  category: 'Props',
38
36
  type: {
@@ -42,7 +40,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
42
40
  },
43
41
  floatingOptions: {
44
42
  control: false,
45
- description: 'The floating options for the date picker. Follows floating-ui options.',
46
43
  table: {
47
44
  category: 'Props',
48
45
  type: {
@@ -52,28 +49,24 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
52
49
  },
53
50
  timeTabIndex: {
54
51
  control: 'number',
55
- description: 'The tab index of the time input field.',
56
52
  table: {
57
53
  category: 'Props',
58
54
  },
59
55
  },
60
56
  ref: {
61
57
  control: false,
62
- description: 'The ref of the input field.',
63
58
  table: {
64
59
  category: 'Props',
65
60
  },
66
61
  },
67
62
  timePickerRef: {
68
63
  control: false,
69
- description: 'The ref of the time picker input field.',
70
64
  table: {
71
65
  category: 'Props',
72
66
  },
73
67
  },
74
68
  isReadOnly: {
75
69
  control: 'boolean',
76
- description: 'Whether the date picker is read only.',
77
70
  table: {
78
71
  category: 'Props',
79
72
  },
@@ -81,7 +74,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
81
74
 
82
75
  hasHiddenLabel: {
83
76
  control: 'boolean',
84
- description: 'Whether the label is hidden.',
85
77
  table: {
86
78
  category: 'Props',
87
79
  },
@@ -89,21 +81,18 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
89
81
 
90
82
  timeValue: {
91
83
  control: 'text',
92
- description: 'The time value to display.',
93
84
  table: {
94
85
  category: 'Props',
95
86
  },
96
87
  },
97
88
  onTimeChange: {
98
89
  action: 'timeChanged',
99
- description: 'Callback function that is called when the time is changed.',
100
90
  table: {
101
91
  category: 'Events',
102
92
  },
103
93
  },
104
94
  ariaLabel: {
105
95
  control: 'text',
106
- description: 'A label for assistive technologies.',
107
96
  table: {
108
97
  category: 'Props',
109
98
  type: {
@@ -114,8 +103,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
114
103
  captionLayout: {
115
104
  control: 'select',
116
105
  options: ['dropdown', 'dropdown-months', 'dropdown-years', 'label'],
117
- description:
118
- 'The layout of the caption. Enables you to add or remove the dropdown navigation for months/years',
119
106
  table: {
120
107
  category: 'Props',
121
108
  type: {
@@ -125,7 +112,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
125
112
  },
126
113
  className: {
127
114
  control: false,
128
- description: 'Accepts a CSS class name',
129
115
  table: {
130
116
  category: 'Props',
131
117
  type: {
@@ -135,7 +121,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
135
121
  },
136
122
  id: {
137
123
  control: 'text',
138
- description: 'The id of the input field.',
139
124
  table: {
140
125
  category: 'Props',
141
126
  type: {
@@ -145,7 +130,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
145
130
  },
146
131
  label: {
147
132
  control: 'text',
148
- description: 'The label for the input field.',
149
133
  table: {
150
134
  category: 'Props',
151
135
  type: {
@@ -155,7 +139,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
155
139
  },
156
140
  onSelect: {
157
141
  action: 'selected',
158
- description: 'Callback function that is called when a date is selected.',
159
142
  table: {
160
143
  category: 'Events',
161
144
  type: {
@@ -165,7 +148,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
165
148
  },
166
149
  selected: {
167
150
  control: 'date',
168
- description: 'The selected date.',
169
151
  table: {
170
152
  category: 'Props',
171
153
  type: {
@@ -175,7 +157,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
175
157
  },
176
158
  inputPlaceholder: {
177
159
  control: 'text',
178
- description: 'The placeholder text for the input field.',
179
160
  table: {
180
161
  category: 'Props',
181
162
  type: {
@@ -185,7 +166,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
185
166
  },
186
167
  inputIconName: {
187
168
  control: 'text',
188
- description: 'The icon to display in the input field.',
189
169
  table: {
190
170
  category: 'Props',
191
171
  type: {
@@ -195,7 +175,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
195
175
  },
196
176
  isClearable: {
197
177
  control: 'boolean',
198
- description: 'Whether the input field should be clearable.',
199
178
  table: {
200
179
  category: 'Props',
201
180
  type: {
@@ -205,7 +184,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
205
184
  },
206
185
  isOpen: {
207
186
  control: false,
208
- description: 'Whether the date picker is open.',
209
187
  table: {
210
188
  category: 'Props',
211
189
  type: {
@@ -215,7 +193,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
215
193
  },
216
194
  clearOnClose: {
217
195
  control: 'boolean',
218
- description: 'Whether the input field should be cleared when the date picker is closed.',
219
196
  table: {
220
197
  category: 'Props',
221
198
  type: {
@@ -225,7 +202,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
225
202
  },
226
203
  errorMessage: {
227
204
  control: 'text',
228
- description: 'An error message to display.',
229
205
  table: {
230
206
  category: 'Props',
231
207
  type: {
@@ -235,7 +211,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
235
211
  },
236
212
  disableAfterDate: {
237
213
  control: 'date',
238
- description: 'Disable dates after this date.',
239
214
  table: {
240
215
  category: 'Props',
241
216
  type: {
@@ -245,7 +220,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
245
220
  },
246
221
  disableBeforeDate: {
247
222
  control: 'date',
248
- description: 'Disable dates before this date.',
249
223
  table: {
250
224
  category: 'Props',
251
225
  type: {
@@ -255,7 +229,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
255
229
  },
256
230
  isDisabled: {
257
231
  control: 'boolean',
258
- description: 'Disable the date picker.',
259
232
  table: {
260
233
  category: 'Props',
261
234
  type: {
@@ -265,7 +238,6 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
265
238
  },
266
239
  initialMonth: {
267
240
  control: 'date',
268
- description: 'The month to display.',
269
241
  table: {
270
242
  category: 'Props',
271
243
  type: {
@@ -11,6 +11,7 @@ import { UseFloatingOptions } from '@floating-ui/react-dom';
11
11
  import { PortalOptions } from '../datePicker/types';
12
12
 
13
13
  export interface SingleInputDateTimePickerProps {
14
+ /** A label for assistive technologies. */
14
15
  ariaLabel: string;
15
16
  disableBeforeDate?: Date;
16
17
  disableAfterDate?: Date;
@@ -29,16 +30,24 @@ export interface SingleInputDateTimePickerProps {
29
30
  inputPlaceholder?: string;
30
31
  errorMessage?: string | undefined;
31
32
  'data-testid'?: string;
33
+ /** Whether the label is hidden. */
32
34
  hasHiddenLabel?: boolean;
35
+ /** The time value to display. */
33
36
  timeValue?: string;
37
+ /** Callback function that is called when the time is changed. */
34
38
  onTimeChange?: (time: string) => void;
39
+ /** Whether the date picker is read only. */
35
40
  isReadOnly?: boolean;
41
+ /** The ref of the input field. */
36
42
  ref?: React.LegacyRef<HTMLInputElement>;
43
+ /** The ref of the time picker input field. */
37
44
  timePickerRef?: React.LegacyRef<HTMLInputElement>;
38
45
  dateTabIndex?: number;
46
+ /** The tab index of the time input field. */
39
47
  timeTabIndex?: number;
40
48
  portalOptions?: PortalOptions;
41
49
  floatingOptions?: UseFloatingOptions;
50
+ /** Whether the date picker is a portal. */
42
51
  isPortal?: boolean;
43
52
  }
44
53
 
@@ -11,7 +11,6 @@ const meta: Meta = {
11
11
  ...inputArgTypes,
12
12
  value: {
13
13
  control: 'number',
14
- description: 'The value for the input field',
15
14
  table: {
16
15
  category: 'Props',
17
16
  type: {
@@ -22,7 +21,6 @@ const meta: Meta = {
22
21
  },
23
22
  min: {
24
23
  control: 'number',
25
- description: 'The minimum value for the input field',
26
24
  table: {
27
25
  category: 'Props',
28
26
  type: {
@@ -33,7 +31,6 @@ const meta: Meta = {
33
31
  },
34
32
  max: {
35
33
  control: 'number',
36
- description: 'The maximum value for the input field',
37
34
  table: {
38
35
  category: 'Props',
39
36
  type: {
@@ -44,7 +41,6 @@ const meta: Meta = {
44
41
  },
45
42
  step: {
46
43
  control: 'number',
47
- description: 'The step value for the input field',
48
44
  table: {
49
45
  category: 'Props',
50
46
  type: {
@@ -7,9 +7,13 @@ import { DisplayFormError } from '../subcomponents/DisplayFormError';
7
7
  import { BaseInputProps } from '../input/Input';
8
8
 
9
9
  export interface NumberInputProps extends Omit<BaseInputProps, 'value'>, LabelProps {
10
+ /** The value for the input field */
10
11
  value?: number | '';
12
+ /** The minimum value for the input field */
11
13
  min?: number;
14
+ /** The maximum value for the input field */
12
15
  max?: number;
16
+ /** The step value for the input field */
13
17
  step?: number;
14
18
  }
15
19
 
@@ -11,7 +11,6 @@ const meta: Meta = {
11
11
  ...baseInputArgTypes,
12
12
  hasShowPassword: {
13
13
  control: 'boolean',
14
- description: 'Toggles the visibility of the password',
15
14
  table: {
16
15
  category: 'Props',
17
16
  type: {
@@ -14,6 +14,7 @@ export interface PasswordInputProps extends LabelProps {
14
14
  isDisabled?: boolean;
15
15
  errorMessage?: string | undefined;
16
16
  helpText?: string;
17
+ /** Toggles the visibility of the password */
17
18
  hasShowPassword?: boolean;
18
19
  defaultValue?: string;
19
20
  }
@@ -13,7 +13,6 @@ const meta: Meta = {
13
13
  },
14
14
  onChange: {
15
15
  control: false,
16
- description: 'onChange event handler',
17
16
  table: {
18
17
  category: 'Callbacks',
19
18
  type: {
@@ -24,7 +23,6 @@ const meta: Meta = {
24
23
  },
25
24
  label: {
26
25
  control: 'text',
27
- description: 'The label for the Radio field',
28
26
  table: {
29
27
  category: 'Props',
30
28
  type: {
@@ -35,7 +33,6 @@ const meta: Meta = {
35
33
  },
36
34
  name: {
37
35
  control: 'text',
38
- description: 'The name for the Radio field',
39
36
  table: {
40
37
  category: 'Props',
41
38
  type: {
@@ -46,7 +43,6 @@ const meta: Meta = {
46
43
  },
47
44
  value: {
48
45
  control: 'text',
49
- description: 'This holds the value that will be emitted when the radio is selected',
50
46
  table: {
51
47
  category: 'Props',
52
48
  type: {
@@ -57,7 +53,6 @@ const meta: Meta = {
57
53
  },
58
54
  id: {
59
55
  control: 'text',
60
- description: 'This explains what button group this radio belongs to.',
61
56
  table: {
62
57
  category: 'Props',
63
58
  type: {
@@ -68,7 +63,6 @@ const meta: Meta = {
68
63
  },
69
64
  isDisabled: {
70
65
  control: 'boolean',
71
- description: 'Toggles the disabled state of the Radio field',
72
66
  table: {
73
67
  category: 'Props',
74
68
  type: {
@@ -2,11 +2,17 @@ import React from 'react';
2
2
 
3
3
  export interface RadioProps {
4
4
  ref?: React.LegacyRef<HTMLInputElement>;
5
+ /** This explains what button group this radio belongs to. */
5
6
  id: string;
7
+ /** The label for the Radio field */
6
8
  label: string;
9
+ /** The name for the Radio field */
7
10
  name: string;
11
+ /** This holds the value that will be emitted when the radio is selected */
8
12
  value?: string;
13
+ /** onChange event handler */
9
14
  onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
15
+ /** Toggles the disabled state of the Radio field */
10
16
  isDisabled?: boolean;
11
17
  defaultChecked?: boolean;
12
18
  }
@@ -9,7 +9,6 @@ const meta: Meta<SelectProps<SelectOption> & LabelProps> = {
9
9
  argTypes: {
10
10
  name: {
11
11
  control: 'text',
12
- description: 'The name of the select component',
13
12
  table: {
14
13
  category: 'Props',
15
14
  type: {
@@ -20,7 +19,6 @@ const meta: Meta<SelectProps<SelectOption> & LabelProps> = {
20
19
  },
21
20
  hasHiddenLabel: {
22
21
  control: 'boolean',
23
- description: 'Toggles the visibility of the label',
24
22
  table: {
25
23
  category: 'Props',
26
24
  type: {
@@ -31,7 +29,6 @@ const meta: Meta<SelectProps<SelectOption> & LabelProps> = {
31
29
  },
32
30
  label: {
33
31
  control: 'text',
34
- description: 'The label for the select component',
35
32
  table: {
36
33
  category: 'Props',
37
34
  type: {
@@ -42,7 +39,6 @@ const meta: Meta<SelectProps<SelectOption> & LabelProps> = {
42
39
  },
43
40
  options: {
44
41
  control: 'object',
45
- description: 'Options for the select component',
46
42
  table: {
47
43
  category: 'Props',
48
44
  type: {
@@ -53,7 +49,6 @@ const meta: Meta<SelectProps<SelectOption> & LabelProps> = {
53
49
  },
54
50
  isDisabled: {
55
51
  control: 'boolean',
56
- description: 'Toggles the disabled state of the select component',
57
52
  table: {
58
53
  category: 'Props',
59
54
  type: {
@@ -64,7 +59,6 @@ const meta: Meta<SelectProps<SelectOption> & LabelProps> = {
64
59
  },
65
60
  isLoading: {
66
61
  control: 'boolean',
67
- description: 'Toggles the loading state of the select component',
68
62
  table: {
69
63
  category: 'Props',
70
64
  type: {
@@ -75,7 +69,6 @@ const meta: Meta<SelectProps<SelectOption> & LabelProps> = {
75
69
  },
76
70
  isClearable: {
77
71
  control: 'boolean',
78
- description: 'Enables the clearable feature of the select component',
79
72
  table: {
80
73
  category: 'Props',
81
74
  type: {
@@ -86,7 +79,6 @@ const meta: Meta<SelectProps<SelectOption> & LabelProps> = {
86
79
  },
87
80
  isSearchable: {
88
81
  control: 'boolean',
89
- description: 'Enables the searchable feature of the select component',
90
82
  table: {
91
83
  category: 'Props',
92
84
  type: {
@@ -97,18 +89,16 @@ const meta: Meta<SelectProps<SelectOption> & LabelProps> = {
97
89
  },
98
90
  placeholder: {
99
91
  control: 'text',
100
- description: 'The placeholder text for the select component',
101
92
  table: {
102
93
  category: 'Props',
103
94
  type: {
104
95
  summary: 'string',
105
96
  },
106
97
  },
107
- defaultValue: { summary: 'Select...' },
98
+ defaultValue: { summary: 'Select an option...' },
108
99
  },
109
100
  className: {
110
101
  control: 'text',
111
- description: 'Additional CSS class for the select component',
112
102
  table: {
113
103
  category: 'Props',
114
104
  type: {
@@ -119,8 +109,6 @@ const meta: Meta<SelectProps<SelectOption> & LabelProps> = {
119
109
  },
120
110
  classNamePrefix: {
121
111
  control: 'text',
122
- description:
123
- 'The prefix to use for the CSS class names. Changing this will result in losing all default styles',
124
112
  table: {
125
113
  category: 'Props',
126
114
  type: {
@@ -131,7 +119,6 @@ const meta: Meta<SelectProps<SelectOption> & LabelProps> = {
131
119
  },
132
120
  onChange: {
133
121
  control: false,
134
- description: 'Event handler for when the selected value changes',
135
122
  table: {
136
123
  category: 'Callbacks',
137
124
  type: {
@@ -5,10 +5,20 @@ import { SelectOption } from './types';
5
5
  import { withLabel } from '../subcomponents/Label';
6
6
 
7
7
  export interface SelectProps<OptionType extends SelectOption> extends ReactSelectProps<OptionType> {
8
+ /** Options for the select component */
8
9
  options: OptionType[];
10
+ /** The label for the select component */
9
11
  label?: string;
12
+ /** The name of the select component */
10
13
  name?: string;
14
+ /** Toggles the visibility of the label */
11
15
  hasHiddenLabel?: boolean;
16
+ /** Additional CSS class for the select component */
17
+ className?: string;
18
+ /** The prefix to use for the CSS class names. Changing this will result in losing all default styles */
19
+ classNamePrefix?: string;
20
+ /** Event handler for when the selected value changes */
21
+ onChange?: (newValue: any, actionMeta: any) => void;
12
22
  }
13
23
 
14
24
  const OptionComponent = <OptionType extends SelectOption>({
@@ -11,7 +11,6 @@ const meta: Meta = {
11
11
  ...baseInputArgTypes,
12
12
  autofocus: {
13
13
  control: 'boolean',
14
- description: ' Specifies that a text area should automatically get focus when the page loads',
15
14
  table: {
16
15
  category: 'Props',
17
16
  type: {
@@ -22,7 +21,6 @@ const meta: Meta = {
22
21
  },
23
22
  rows: {
24
23
  control: 'number',
25
- description: 'The number of rows for the textarea field',
26
24
  table: {
27
25
  category: 'Props',
28
26
  type: {
@@ -33,7 +31,6 @@ const meta: Meta = {
33
31
  },
34
32
  cols: {
35
33
  control: 'number',
36
- description: 'Specifies the visible width of a text area',
37
34
  table: {
38
35
  category: 'Props',
39
36
  type: {
@@ -44,7 +41,6 @@ const meta: Meta = {
44
41
  },
45
42
  readonly: {
46
43
  control: 'boolean',
47
- description: 'Sets the textarea field to readonly',
48
44
  table: {
49
45
  category: 'Props',
50
46
  type: {
@@ -55,7 +51,6 @@ const meta: Meta = {
55
51
  },
56
52
  wrap: {
57
53
  control: 'text',
58
- description: 'Sets the wrap attribute for the textarea field',
59
54
  table: {
60
55
  category: 'Props',
61
56
  type: {
@@ -66,7 +61,6 @@ const meta: Meta = {
66
61
  },
67
62
  form: {
68
63
  control: 'text',
69
- description: 'Specifies which form the text area belongs to',
70
64
  table: {
71
65
  category: 'Props',
72
66
  type: {
@@ -77,7 +71,6 @@ const meta: Meta = {
77
71
  },
78
72
  maxLength: {
79
73
  control: 'number',
80
- description: 'Specifies the maximum number of characters allowed in the text area',
81
74
  table: {
82
75
  category: 'Props',
83
76
  type: {
@@ -13,12 +13,19 @@ export interface TextareaProps extends LabelProps {
13
13
  isDisabled?: boolean;
14
14
  errorMessage?: string | undefined;
15
15
  helpText?: string;
16
+ /** The number of rows for the textarea field */
16
17
  rows?: number;
18
+ /** Specifies the visible width of a text area */
17
19
  cols?: number;
20
+ /** Sets the textarea field to readonly */
18
21
  readonly?: boolean;
22
+ /** Sets the wrap attribute for the textarea field */
19
23
  wrap?: 'hard' | 'soft';
24
+ /** Specifies which form the text area belongs to */
20
25
  form?: string;
26
+ /** Specifies the maximum number of characters allowed in the text area */
21
27
  maxLength?: number;
28
+ /** Specifies that a text area should automatically get focus when the page loads */
22
29
  autofocus?: boolean;
23
30
  defaultValue?: string;
24
31
  tabIndex?: number;
@@ -9,7 +9,6 @@ const meta: Meta<typeof TimePicker> = {
9
9
  argTypes: {
10
10
  hasHiddenLabel: {
11
11
  control: 'boolean',
12
- description: 'Hides the input label in an accessible way (visually hides the label)',
13
12
  defaultValue: false,
14
13
  table: {
15
14
  category: 'Props',
@@ -17,7 +16,6 @@ const meta: Meta<typeof TimePicker> = {
17
16
  },
18
17
  name: {
19
18
  control: 'text',
20
- description: 'The name of the input field',
21
19
  defaultValue: 'time-picker',
22
20
  table: {
23
21
  category: 'Props',
@@ -25,7 +23,6 @@ const meta: Meta<typeof TimePicker> = {
25
23
  },
26
24
  onTimeChange: {
27
25
  control: false,
28
- description: 'returns an object with the time and errors if they exist',
29
26
  table: {
30
27
  category: 'Callbacks',
31
28
  type: {
@@ -35,7 +32,6 @@ const meta: Meta<typeof TimePicker> = {
35
32
  },
36
33
  timeValue: {
37
34
  control: 'text',
38
- description: 'The time value to be displayed in the input field',
39
35
  defaultValue: '12:00 AM',
40
36
  table: {
41
37
  category: 'Props',
@@ -46,7 +42,6 @@ const meta: Meta<typeof TimePicker> = {
46
42
  category: 'Props',
47
43
  },
48
44
  control: 'text',
49
- description: 'The label for the time picker',
50
45
  defaultValue: 'Time Picker',
51
46
  },
52
47
  },
@@ -6,10 +6,15 @@ import { offset, flip, shift } from '@floating-ui/react';
6
6
 
7
7
  interface TimePickerProps {
8
8
  ref?: React.LegacyRef<HTMLInputElement>;
9
+ /** The time value to be displayed in the input field */
9
10
  timeValue?: string;
11
+ /** The label for the time picker */
10
12
  label?: string;
13
+ /** The name of the input field */
11
14
  name?: string;
15
+ /** Hides the input label in an accessible way (visually hides the label) */
12
16
  hasHiddenLabel?: boolean;
17
+ /** returns an object with the time and errors if they exist */
13
18
  onTimeChange?: (time: string) => void;
14
19
  className?: string;
15
20
  isReadOnly?: boolean;