@indico-data/design-system 3.0.7 → 3.0.8

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indico-data/design-system",
3
- "version": "3.0.7",
3
+ "version": "3.0.8",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "lib/index.js",
@@ -13,6 +13,13 @@ const meta: Meta<typeof SingleInputDatePicker> = {
13
13
  ),
14
14
  ],
15
15
  argTypes: {
16
+ hasHiddenLabel: {
17
+ control: 'boolean',
18
+ description: 'Whether the label is hidden.',
19
+ table: {
20
+ category: 'Props',
21
+ },
22
+ },
16
23
  ariaLabel: {
17
24
  control: 'text',
18
25
  description: 'A label for assistive technologies.',
@@ -24,6 +24,7 @@ export interface SingleInputDatePickerProps {
24
24
  isClearable?: boolean;
25
25
  inputPlaceholder?: string;
26
26
  errorMessage?: string | undefined;
27
+ hasHiddenLabel?: boolean;
27
28
  'data-testid'?: string;
28
29
  }
29
30
 
@@ -46,6 +47,7 @@ export function SingleInputDatePicker(props: SingleInputDatePickerProps) {
46
47
  isClearable,
47
48
  errorMessage,
48
49
  onSelect,
50
+ hasHiddenLabel,
49
51
  ...rest
50
52
  } = props;
51
53
 
@@ -97,6 +99,7 @@ export function SingleInputDatePicker(props: SingleInputDatePickerProps) {
97
99
  value={localTextValue}
98
100
  placeholder={inputPlaceholder}
99
101
  isDisabled={isDisabled}
102
+ hasHiddenLabel={hasHiddenLabel}
100
103
  iconName={inputIconName}
101
104
  isClearable={isClearable}
102
105
  onChange={handleInputChange}
@@ -15,6 +15,27 @@ const meta: Meta<typeof InputDateRangePicker> = {
15
15
  ),
16
16
  ],
17
17
  argTypes: {
18
+ hasHiddenLabel: {
19
+ control: 'boolean',
20
+ description: 'Whether the label is hidden.',
21
+ table: {
22
+ category: 'Props',
23
+ },
24
+ },
25
+ gutterWidth: {
26
+ control: 'number',
27
+ description: 'The gutter width for the date picker.',
28
+ table: {
29
+ category: 'Props',
30
+ },
31
+ },
32
+ setIsOpen: {
33
+ control: 'boolean',
34
+ description: 'Whether the date picker is open.',
35
+ table: {
36
+ category: 'Props',
37
+ },
38
+ },
18
39
  ariaLabel: {
19
40
  control: 'text',
20
41
  description: 'A label for assistive technologies.',
@@ -32,6 +32,7 @@ interface InputDateRangePickerProps {
32
32
  toLabel?: string;
33
33
  closeOnSelect?: boolean;
34
34
  clearOnClose?: boolean;
35
+ hasHiddenLabel?: boolean;
35
36
  }
36
37
 
37
38
  export function InputDateRangePicker(props: InputDateRangePickerProps) {
@@ -57,6 +58,7 @@ export function InputDateRangePicker(props: InputDateRangePickerProps) {
57
58
  toLabel,
58
59
  closeOnSelect,
59
60
  clearOnClose,
61
+ hasHiddenLabel,
60
62
  ...rest
61
63
  } = props;
62
64
 
@@ -151,6 +153,7 @@ export function InputDateRangePicker(props: InputDateRangePickerProps) {
151
153
  label={fromLabel}
152
154
  name={'From Date'}
153
155
  data-testid="date-picker-from"
156
+ hasHiddenLabel={hasHiddenLabel}
154
157
  />
155
158
  </Col>
156
159
  <Col>
@@ -165,6 +168,7 @@ export function InputDateRangePicker(props: InputDateRangePickerProps) {
165
168
  label={toLabel}
166
169
  name={'To Date'}
167
170
  data-testid="date-picker-to"
171
+ hasHiddenLabel={hasHiddenLabel}
168
172
  />
169
173
  </Col>
170
174
  </Row>
@@ -20,6 +20,14 @@ const meta: Meta<typeof SingleInputDateTimePicker> = {
20
20
  ),
21
21
  ],
22
22
  argTypes: {
23
+ hasHiddenLabel: {
24
+ control: 'boolean',
25
+ description: 'Whether the label is hidden.',
26
+ table: {
27
+ category: 'Props',
28
+ },
29
+ },
30
+
23
31
  timeValue: {
24
32
  control: 'text',
25
33
  description: 'The time value to display.',
@@ -27,6 +27,7 @@ export interface SingleInputDateTimePickerProps {
27
27
  inputPlaceholder?: string;
28
28
  errorMessage?: string | undefined;
29
29
  'data-testid'?: string;
30
+ hasHiddenLabel?: boolean;
30
31
  timeValue?: string;
31
32
  onTimeChange?: (time: string) => void;
32
33
  }
@@ -52,6 +53,7 @@ export function SingleInputDateTimePicker(props: SingleInputDateTimePickerProps)
52
53
  onSelect,
53
54
  timeValue,
54
55
  onTimeChange,
56
+ hasHiddenLabel,
55
57
  ...rest
56
58
  } = props;
57
59
 
@@ -113,7 +115,7 @@ export function SingleInputDateTimePicker(props: SingleInputDateTimePickerProps)
113
115
  isClearable={isClearable}
114
116
  onChange={handleInputChange}
115
117
  errorMessage={errorMessage}
116
- hasHiddenLabel
118
+ hasHiddenLabel={hasHiddenLabel}
117
119
  label={'Single Date Picker'}
118
120
  name={`${id}-date-picker`}
119
121
  />
package/src/index.ts CHANGED
@@ -20,6 +20,7 @@ export { TimePicker } from './components/forms/timePicker';
20
20
  export { IconTriggerDatePicker } from './components/forms/date/iconTriggerDatePicker';
21
21
  export { SingleInputDatePicker } from './components/forms/date/inputDatePicker';
22
22
  export { InputDateRangePicker } from './components/forms/date/inputDateRangePicker';
23
+ export { SingleInputDateTimePicker } from './components/forms/date/inputDateTimePicker';
23
24
  export { Form } from './components/forms/form';
24
25
  export { Skeleton } from './components/skeleton';
25
26
  export { Card } from './components/card';