@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
package/lib/types.d.ts CHANGED
@@ -6,7 +6,9 @@ export type PermafrostComponent = {
6
6
  };
7
7
  import { IconSizes, IconName } from './components/icons/types';
8
8
  export type { IconSizes, IconName };
9
- export type SemanticColor = 'neutral' | 'info' | 'warning' | 'error' | 'success' | 'teal' | 'purple' | 'orange' | 'pending';
9
+ export type ChromaticColor = 'blue' | 'purple' | 'red' | 'yellow' | 'gray' | 'green' | 'pink' | 'orange' | 'teal';
10
+ export type Color = ChromaticColor | 'black' | 'white';
11
+ export type SemanticColor = 'neutral' | 'info' | 'warning' | 'error' | 'success' | 'pending';
10
12
  import { SelectOption } from './components/forms/select/types';
11
13
  export type { SelectOption };
12
14
  import { TableProps, TableColumn, Direction, Alignment } from './components/table/types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indico-data/design-system",
3
- "version": "3.0.10",
3
+ "version": "3.2.0",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "lib/index.js",
@@ -49,6 +49,7 @@
49
49
  "react-aria-components": "^1.2.1",
50
50
  "react-data-table-component": "^7.6.2",
51
51
  "react-day-picker": "9.1.3",
52
+ "react-docgen-typescript": "^2.4.0",
52
53
  "react-grid-system": "^8.2.0",
53
54
  "react-hook-form": "^7.52.1",
54
55
  "react-modal": "^3.16.1",
@@ -12,7 +12,6 @@ const meta: Meta = {
12
12
  size: {
13
13
  control: 'select',
14
14
  options: ['xs', 'sm', 'md', 'lg', 'xl'],
15
- description: 'The size of the badge',
16
15
  table: {
17
16
  category: 'Props',
18
17
  type: {
@@ -22,7 +21,6 @@ const meta: Meta = {
22
21
  },
23
22
  className: {
24
23
  control: 'text',
25
- description: 'Additional classes for the badge component',
26
24
  table: {
27
25
  category: 'Props',
28
26
  type: {
@@ -32,7 +30,6 @@ const meta: Meta = {
32
30
  },
33
31
  children: {
34
32
  control: false,
35
- description: 'The content of the badge (superseded by the string prop)',
36
33
  table: {
37
34
  category: 'Props',
38
35
  type: {
@@ -42,7 +39,6 @@ const meta: Meta = {
42
39
  },
43
40
  string: {
44
41
  control: 'text',
45
- description: 'The string to display in the badge. (supersedes children prop)',
46
42
  table: {
47
43
  category: 'Props',
48
44
  type: {
@@ -1,8 +1,12 @@
1
1
  export type BadgeSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
2
2
 
3
3
  export interface BadgeProps {
4
+ /** Additional classes for the badge component */
4
5
  className?: string;
6
+ /** The content of the badge (superseded by the string prop) */
5
7
  children?: React.ReactNode;
8
+ /** The string to display in the badge. (supersedes children prop) */
6
9
  string?: string;
10
+ /** The size of the badge */
7
11
  size?: BadgeSizes;
8
12
  }
@@ -19,7 +19,7 @@ const meta: Meta = {
19
19
  summary: 'button | submit | reset',
20
20
  },
21
21
  },
22
- description: 'Sets the HTML button type attribute',
22
+
23
23
  defaultValue: { summary: 'button' },
24
24
  control: 'select',
25
25
  options: ['button', 'submit', 'reset'],
@@ -30,7 +30,6 @@ const meta: Meta = {
30
30
  category: 'Core Props',
31
31
  },
32
32
  defaultValue: { summary: '' },
33
- description: 'URL destination for the button when it needs to function as a link',
34
33
  },
35
34
  children: {
36
35
  control: 'text',
@@ -40,12 +39,10 @@ const meta: Meta = {
40
39
  summary: 'ReactNode',
41
40
  },
42
41
  },
43
- description: 'The content of the button. Can be text, elements, or other React components',
44
42
  },
45
43
 
46
44
  // Accessibility
47
45
  ariaLabel: {
48
- description: 'Sets the aria-label attribute for the button.',
49
46
  table: {
50
47
  category: 'Accessibility',
51
48
  type: {
@@ -61,7 +58,7 @@ const meta: Meta = {
61
58
  category: 'Icon Props',
62
59
  type: { summary: 'string' },
63
60
  },
64
- description: 'Sets an icon on the left side of the button content',
61
+
65
62
  control: 'select',
66
63
  options: iconNames,
67
64
  },
@@ -70,7 +67,7 @@ const meta: Meta = {
70
67
  category: 'Icon Props',
71
68
  type: { summary: 'string' },
72
69
  },
73
- description: 'Sets an icon on the right side of the button content',
70
+
74
71
  control: 'select',
75
72
  options: iconNames,
76
73
  },
@@ -79,7 +76,7 @@ const meta: Meta = {
79
76
  variant: {
80
77
  control: 'select',
81
78
  options: ['action', 'destructive', 'soft', 'link', 'outline', 'solid'],
82
- description: 'Determines the visual style and emphasis level of the button',
79
+
83
80
  table: {
84
81
  category: 'Style Props',
85
82
  type: {
@@ -91,7 +88,7 @@ const meta: Meta = {
91
88
  size: {
92
89
  control: 'select',
93
90
  options: ['xs', 'sm', 'md', 'lg'],
94
- description: "Controls the button's padding and text size",
91
+
95
92
  defaultValue: { summary: 'md' },
96
93
  table: {
97
94
  category: 'Style Props',
@@ -107,7 +104,6 @@ const meta: Meta = {
107
104
  category: 'Style Props',
108
105
  },
109
106
  defaultValue: { summary: false },
110
- description: 'Makes the button round, pill-shaped when true',
111
107
  },
112
108
  className: {
113
109
  control: 'text',
@@ -115,7 +111,6 @@ const meta: Meta = {
115
111
  category: 'Style Props',
116
112
  defaultValue: { summary: '' },
117
113
  },
118
- description: 'Allows the passing of classes',
119
114
  },
120
115
 
121
116
  // State Props
@@ -126,9 +121,6 @@ const meta: Meta = {
126
121
  category: 'State Props',
127
122
  },
128
123
  defaultValue: { summary: false },
129
- description: `Disables the button and shows a load spinner on the left hand side of the button children by default.
130
- If iconLeft is passed, the loading icon will be displayed on the left hand side of the iconLeft.
131
- If iconRight is passed, the loading icon will be displayed on the right hand side of the iconRight.`,
132
124
  },
133
125
  isDisabled: {
134
126
  control: 'boolean',
@@ -137,27 +129,22 @@ const meta: Meta = {
137
129
  category: 'State Props',
138
130
  },
139
131
  defaultValue: { summary: false },
140
- description: 'Disables the button',
141
132
  },
142
133
 
143
134
  // Event Handlers
144
135
  onClick: {
145
- description: 'Triggers a callback on button click',
146
136
  table: { category: 'Event Handlers' },
147
137
  action: 'clicked',
148
138
  },
149
139
  onMouseEnter: {
150
- description: 'Triggers a callback on mouse enter.',
151
140
  table: { category: 'Event Handlers' },
152
141
  action: 'mouse entered',
153
142
  },
154
143
  onMouseExit: {
155
- description: 'Triggers a callback on mouse exit.',
156
144
  table: { category: 'Event Handlers' },
157
145
  action: 'mouse exited',
158
146
  },
159
147
  onKeyDown: {
160
- description: 'Triggers a callback on key press.',
161
148
  table: { category: 'Event Handlers' },
162
149
  action: 'key pressed',
163
150
  },
@@ -7,20 +7,70 @@ export type ButtonSizes = 'xs' | 'sm' | 'md' | 'lg';
7
7
  export type ButtonTypes = 'button' | 'submit' | 'reset';
8
8
 
9
9
  export interface ButtonProps {
10
+ /**
11
+ * The class name to apply to the button
12
+ */
10
13
  className?: string;
14
+ /**
15
+ * The aria-label to apply to the button
16
+ */
11
17
  ariaLabel: string;
18
+ /**
19
+ * The children to apply to the button
20
+ */
12
21
  children?: React.ReactNode | React.ReactNode[];
22
+ /**
23
+ * The function to call when the mouse enters the button
24
+ */
13
25
  onMouseEnter?: (event: React.MouseEvent<HTMLButtonElement>) => void;
26
+ /**
27
+ * The function to call when the mouse exits the button
28
+ */
14
29
  onMouseExit?: (event: React.MouseEvent<HTMLButtonElement>) => void;
15
- onKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>) => void;
16
- isLoading?: boolean;
30
+ /**
31
+ * The function to call when the button is clicked
32
+ */
17
33
  onClick?: (...args: any[]) => void;
34
+ /**
35
+ * The function to call when the button is pressed
36
+ */
37
+ onKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>) => void;
38
+ /**
39
+ * Determines the visual style and emphasis level of the button
40
+ */
18
41
  variant?: ButtonVariants;
42
+ /**
43
+ * Disables the button and shows a load spinner on the left hand side of the button children by default.
44
+ * If iconLeft is passed, the loading icon will be displayed on the left hand side of the iconLeft.
45
+ * If iconRight is passed, the loading icon will be displayed on the right hand side of the iconRight.
46
+ */
47
+ isLoading?: boolean;
48
+ /**
49
+ * Makes the button round, pill-shaped when true
50
+ */
19
51
  isPill?: boolean;
52
+ /**
53
+ * The icon to display on the left hand side of the button
54
+ */
20
55
  iconLeft?: IconName;
56
+ /**
57
+ * The icon to display on the right hand side of the button
58
+ */
21
59
  iconRight?: IconName;
60
+ /**
61
+ * Controls the button's padding and text size
62
+ */
22
63
  size?: ButtonSizes;
64
+ /**
65
+ * The type of the button
66
+ */
23
67
  type?: ButtonTypes;
68
+ /**
69
+ * URL destination for the button when it needs to function as a link
70
+ */
24
71
  href?: string;
72
+ /**
73
+ * Disables the button
74
+ */
25
75
  isDisabled?: boolean;
26
76
  }
@@ -9,7 +9,6 @@ const meta: Meta = {
9
9
  argTypes: {
10
10
  title: {
11
11
  control: 'text',
12
- description: 'The title of the card',
13
12
  table: {
14
13
  category: 'Props',
15
14
  type: {
@@ -20,7 +19,6 @@ const meta: Meta = {
20
19
  },
21
20
  subtitle: {
22
21
  control: 'text',
23
- description: 'The subtitle of the card',
24
22
  table: {
25
23
  category: 'Props',
26
24
  type: {
@@ -31,7 +29,6 @@ const meta: Meta = {
31
29
  },
32
30
  hasBoxShadow: {
33
31
  control: 'boolean',
34
- description: 'Adds a box shadow to the card',
35
32
  table: {
36
33
  category: 'Props',
37
34
  type: {
@@ -42,7 +39,6 @@ const meta: Meta = {
42
39
  },
43
40
  className: {
44
41
  control: 'text',
45
- description: 'Additional classes for the card component',
46
42
  table: {
47
43
  category: 'Props',
48
44
  type: {
@@ -52,7 +48,6 @@ const meta: Meta = {
52
48
  },
53
49
  children: {
54
50
  control: false,
55
- description: 'The content of the card',
56
51
  table: {
57
52
  category: 'Props',
58
53
  type: {
@@ -2,10 +2,15 @@ import React from 'react';
2
2
  import classNames from 'classnames';
3
3
 
4
4
  type Props = {
5
+ /** Additional classes for the card component */
5
6
  className?: string;
7
+ /** The content of the card */
6
8
  children: React.ReactNode;
9
+ /** The title of the card */
7
10
  title?: string;
11
+ /** The subtitle of the card */
8
12
  subtitle?: string;
13
+ /** Adds a box shadow to the card */
9
14
  hasBoxShadow?: boolean;
10
15
  };
11
16
 
@@ -11,8 +11,6 @@ const meta: Meta<typeof FloatUI> = {
11
11
  argTypes: {
12
12
  children: {
13
13
  control: false,
14
- description:
15
- 'An array of exactly two elements: the first element is the trigger that opens the FloatUI, and the second element is the content displayed within the FloatUI.',
16
14
  table: {
17
15
  category: 'Props',
18
16
  type: {
@@ -22,7 +20,6 @@ const meta: Meta<typeof FloatUI> = {
22
20
  },
23
21
  ariaLabel: {
24
22
  control: 'text',
25
- description: 'Sets the aria-label attribute for the FloatUI.',
26
23
  table: {
27
24
  category: 'Props',
28
25
  type: {
@@ -32,8 +29,6 @@ const meta: Meta<typeof FloatUI> = {
32
29
  },
33
30
  floatingOptions: {
34
31
  control: false,
35
- description:
36
- 'Options for configuring the floating UI behavior. For more, see the [floating-ui docs](https://floating-ui.com/docs/useFloating#options).',
37
32
  table: {
38
33
  category: 'Props',
39
34
  type: {
@@ -43,7 +38,6 @@ const meta: Meta<typeof FloatUI> = {
43
38
  },
44
39
  isOpen: {
45
40
  control: false,
46
- description: 'Controls the visibility of the FloatUI (for controlled mode).',
47
41
  table: {
48
42
  category: 'Props',
49
43
  type: {
@@ -54,8 +48,6 @@ const meta: Meta<typeof FloatUI> = {
54
48
  isPortal: {
55
49
  control: false,
56
50
  defaultValue: false,
57
- description:
58
- 'Controls whether the FloatUI content is rendered as a portal (i.e. rendered outside the app root and into the body)',
59
51
  table: {
60
52
  category: 'Props',
61
53
  type: {
@@ -65,8 +57,6 @@ const meta: Meta<typeof FloatUI> = {
65
57
  },
66
58
  portalOptions: {
67
59
  control: false,
68
- description:
69
- 'Options for configuring the portal behavior. Includes the rootId, which is the id of the root element to render the portal into.',
70
60
  table: {
71
61
  category: 'Props',
72
62
  type: {
@@ -76,7 +66,6 @@ const meta: Meta<typeof FloatUI> = {
76
66
  },
77
67
  setIsOpen: {
78
68
  control: false,
79
- description: 'Function to toggle the visibility of the FloatUI (for controlled mode).',
80
69
  table: {
81
70
  category: 'Props',
82
71
  type: {
@@ -2,14 +2,21 @@ import { ReactElement } from 'react';
2
2
  import { UseFloatingOptions } from '@floating-ui/react-dom';
3
3
 
4
4
  export type FloatUIProps = {
5
+ /** An array of exactly two elements: the first element is the trigger that opens the FloatUI, and the second element is the content displayed within the FloatUI. */
5
6
  children: [ReactElement, ReactElement];
7
+ /** Sets the aria-label attribute for the FloatUI. */
6
8
  ariaLabel: string;
9
+ /** Options for configuring the floating UI behavior. For more, see the [floating-ui docs](https://floating-ui.com/docs/useFloating#options). */
7
10
  floatingOptions?: UseFloatingOptions;
11
+ /** Controls the visibility of the FloatUI (for controlled mode). */
8
12
  isOpen?: boolean;
9
13
  className?: string;
14
+ /** Controls whether the FloatUI content is rendered as a portal (i.e. rendered outside the app root and into the body) */
10
15
  isPortal?: boolean;
16
+ /** Options for configuring the portal behavior. Includes the rootId, which is the id of the root element to render the portal into. */
11
17
  portalOptions?: {
12
18
  rootId?: string;
13
19
  };
20
+ /** Function to toggle the visibility of the FloatUI (for controlled mode). */
14
21
  setIsOpen?: React.Dispatch<React.SetStateAction<boolean>>;
15
22
  };
@@ -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 checkbox 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 checkbox 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 checkbox 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 checkbox 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 checkbox field',
72
66
  table: {
73
67
  category: 'Props',
74
68
  type: {
@@ -79,7 +73,6 @@ const meta: Meta = {
79
73
  },
80
74
  isChecked: {
81
75
  control: false,
82
- description: 'Toggles the checked state of the checkbox field when true',
83
76
  table: {
84
77
  category: 'Props',
85
78
  type: {
@@ -3,12 +3,19 @@ import classNames from 'classnames';
3
3
 
4
4
  export interface CheckboxProps {
5
5
  ref?: React.LegacyRef<HTMLInputElement>;
6
+ /** This explains what button group this checkbox belongs to. */
6
7
  id: string;
8
+ /** The label for the checkbox field */
7
9
  label: string;
10
+ /** The name for the checkbox field */
8
11
  name: string;
12
+ /** This holds the value that will be emitted when the checkbox is selected */
9
13
  value?: string;
14
+ /** Toggles the checked state of the checkbox field when true */
10
15
  isChecked?: boolean | undefined;
16
+ /** onChange event handler */
11
17
  onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
18
+ /** Toggles the disabled state of the checkbox field */
12
19
  isDisabled?: boolean;
13
20
  defaultChecked?: boolean;
14
21
  className?: string;
@@ -8,35 +8,30 @@ const meta: Meta = {
8
8
  argTypes: {
9
9
  timeValue: {
10
10
  control: 'text',
11
- description: 'The time value to display in the date picker.',
12
11
  table: {
13
12
  category: 'Props',
14
13
  },
15
14
  },
16
15
  onTimeChange: {
17
16
  control: false,
18
- description: 'Callback when the time changes.',
19
17
  table: {
20
18
  category: 'Callbacks',
21
19
  },
22
20
  },
23
21
  hasTimePicker: {
24
22
  control: 'boolean',
25
- description: 'Whether to show the time picker.',
26
23
  table: {
27
24
  category: 'Props',
28
25
  },
29
26
  },
30
27
  min: {
31
28
  control: 'date',
32
- description: 'The minimum date that can be selected.',
33
29
  table: {
34
30
  category: 'Props',
35
31
  },
36
32
  },
37
33
  max: {
38
34
  control: 'date',
39
- description: 'The maximum date that can be selected.',
40
35
  table: {
41
36
  category: 'Props',
42
37
  },
@@ -44,8 +39,6 @@ const meta: Meta = {
44
39
  captionLayout: {
45
40
  control: 'select',
46
41
  options: ['dropdown', 'dropdown-months', 'dropdown-years', 'label'],
47
- description:
48
- 'The layout of the caption. Enables you to add or remove the dropdown navigation for months/years',
49
42
  table: {
50
43
  category: 'Props',
51
44
  type: {
@@ -55,7 +48,6 @@ const meta: Meta = {
55
48
  },
56
49
  onSelect: {
57
50
  control: false,
58
- description: 'Event handler when a day is selected.',
59
51
  table: {
60
52
  category: 'Callbacks',
61
53
  type: {
@@ -66,7 +58,6 @@ const meta: Meta = {
66
58
  },
67
59
  selected: {
68
60
  control: 'date',
69
- description: 'The selected day(s).',
70
61
  table: {
71
62
  category: 'Props',
72
63
  type: {
@@ -76,7 +67,6 @@ const meta: Meta = {
76
67
  },
77
68
  className: {
78
69
  control: false,
79
- description: 'Accepts a CSS class name',
80
70
  table: {
81
71
  category: 'Props',
82
72
  type: {
@@ -87,7 +77,6 @@ const meta: Meta = {
87
77
  mode: {
88
78
  control: 'select',
89
79
  options: ['single', 'range', 'multiple'],
90
- description: 'Allows you to select a single day, a range of days, or multiple days.',
91
80
  table: {
92
81
  category: 'Props',
93
82
  type: {
@@ -98,7 +87,6 @@ const meta: Meta = {
98
87
  },
99
88
  id: {
100
89
  control: false,
101
- description: 'id',
102
90
  table: {
103
91
  category: 'Props',
104
92
  type: {
@@ -108,7 +96,6 @@ const meta: Meta = {
108
96
  },
109
97
  month: {
110
98
  control: 'date',
111
- description: 'The month displayed in the calendar.',
112
99
  table: {
113
100
  category: 'Props',
114
101
  type: {
@@ -118,7 +105,6 @@ const meta: Meta = {
118
105
  },
119
106
  defaultMonth: {
120
107
  control: 'date',
121
- description: 'The initial month to show in the calendar. Default is the current month.',
122
108
  table: {
123
109
  category: 'Props',
124
110
  type: {
@@ -128,7 +114,6 @@ const meta: Meta = {
128
114
  },
129
115
  startMonth: {
130
116
  control: 'date',
131
- description: 'The earliest month to start the navigation.',
132
117
  table: {
133
118
  category: 'Props',
134
119
  type: {
@@ -138,7 +123,6 @@ const meta: Meta = {
138
123
  },
139
124
  endMonth: {
140
125
  control: 'date',
141
- description: 'The latest month to end the navigation.',
142
126
  table: {
143
127
  category: 'Props',
144
128
  type: {
@@ -148,8 +132,6 @@ const meta: Meta = {
148
132
  },
149
133
  components: {
150
134
  control: false,
151
- description:
152
- 'Components you can pass to the DayPicker to override defaults [Full Components Documentation](https://daypicker.dev/guides/custom-components)',
153
135
  table: {
154
136
  category: 'Props',
155
137
  type: {
@@ -159,7 +141,6 @@ const meta: Meta = {
159
141
  },
160
142
  numberOfMonths: {
161
143
  control: 'number',
162
- description: 'The number of displayed months. Default is 1.',
163
144
  table: {
164
145
  category: 'Props',
165
146
  type: {
@@ -169,7 +150,6 @@ const meta: Meta = {
169
150
  },
170
151
  isDisabled: {
171
152
  control: 'boolean',
172
- description: 'Disables selecton, more info [here](https://daypicker.dev/guides/disabled)',
173
153
  table: {
174
154
  category: 'Props',
175
155
  type: {
@@ -179,8 +159,6 @@ const meta: Meta = {
179
159
  },
180
160
  formatters: {
181
161
  control: false,
182
- description:
183
- 'Use the formatters prop to customize the formatting of dates, week numbers, day names, and more. [Full Formatters Documentation](https://daypicker.dev/guides/formatters)',
184
162
  table: {
185
163
  category: 'Props',
186
164
  type: {
@@ -191,8 +169,6 @@ const meta: Meta = {
191
169
  weekStartsOn: {
192
170
  control: 'select',
193
171
  options: [0, 1, 2, 3, 4, 5, 6],
194
- description:
195
- "The index of the first day of the week (0 - Sunday). Overrides the locale's one.",
196
172
  table: {
197
173
  category: 'Props',
198
174
  type: {
@@ -202,8 +178,6 @@ const meta: Meta = {
202
178
  },
203
179
  firstWeekContainsDate: {
204
180
  control: 'date',
205
- description:
206
- "The firstWeekContainsDate prop sets the first day of the year's initial week, which is used to calculate week numbers. Acceptable values are 1 for Monday and 4 for Thursday.",
207
181
  table: {
208
182
  category: 'Props',
209
183
  type: {
@@ -213,8 +187,6 @@ const meta: Meta = {
213
187
  },
214
188
  today: {
215
189
  control: 'date',
216
- description:
217
- 'The today’s date. Default is the current date. This date will get the today modifier to style the day.',
218
190
  table: {
219
191
  category: 'Props',
220
192
  type: {
@@ -224,7 +196,6 @@ const meta: Meta = {
224
196
  },
225
197
  isRequired: {
226
198
  control: 'boolean',
227
- description: 'When true, the selection is required.',
228
199
  table: {
229
200
  category: 'Props',
230
201
  type: {
@@ -234,7 +205,6 @@ const meta: Meta = {
234
205
  },
235
206
  onMonthChange: {
236
207
  control: false,
237
- description: 'Callback when the month changes.',
238
208
  table: {
239
209
  category: 'Callbacks',
240
210
  type: {
@@ -245,7 +215,6 @@ const meta: Meta = {
245
215
  onNextClick: {
246
216
  control: false,
247
217
 
248
- description: 'Callback when the next month is clicked.',
249
218
  table: {
250
219
  category: 'Callbacks',
251
220
  type: {
@@ -255,7 +224,6 @@ const meta: Meta = {
255
224
  },
256
225
  onPrevClick: {
257
226
  control: false,
258
- description: 'Callback when the previous month is clicked.',
259
227
  table: {
260
228
  category: 'Callbacks',
261
229
  type: {
@@ -265,7 +233,6 @@ const meta: Meta = {
265
233
  },
266
234
  onDayClick: {
267
235
  control: false,
268
- description: 'Callback when a day is clicked.',
269
236
  table: {
270
237
  category: 'Callbacks',
271
238
  type: {