@indico-data/design-system 2.53.0 → 2.55.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.
- package/lib/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.d.ts +24 -0
- package/lib/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.stories.d.ts +6 -0
- package/lib/components/forms/date/inputDateTimePicker/helpers.d.ts +1 -0
- package/lib/components/forms/date/inputDateTimePicker/index.d.ts +1 -0
- package/lib/components/forms/subcomponents/DisplayFormError.d.ts +2 -1
- package/lib/components/forms/timePicker/TimePicker.d.ts +3 -1
- package/lib/components/forms/timePicker/helpers.d.ts +2 -5
- package/lib/components/index.d.ts +3 -0
- package/lib/components/loading-indicators/BarSpinner/BarSpinner.d.ts +8 -0
- package/lib/components/loading-indicators/BarSpinner/BarSpinner.stories.d.ts +7 -0
- package/lib/components/loading-indicators/BarSpinner/__tests__/BarSpinner.test.d.ts +1 -0
- package/lib/components/loading-indicators/CirclePulse/CirclePulse.d.ts +7 -0
- package/lib/components/loading-indicators/CirclePulse/CirclePulse.stories.d.ts +6 -0
- package/lib/components/tooltip/Tooltip.d.ts +13 -0
- package/lib/components/tooltip/Tooltip.stories.d.ts +6 -0
- package/lib/index.css +149 -90
- package/lib/index.d.ts +53 -47
- package/lib/index.esm.css +149 -90
- package/lib/index.esm.js +5964 -6155
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +5962 -6153
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/forms/date/datePicker/DatePicker.stories.tsx +4 -4
- package/src/components/forms/date/datePicker/DatePicker.tsx +0 -2
- package/src/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.mdx +20 -0
- package/src/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.stories.tsx +262 -0
- package/src/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.tsx +141 -0
- package/src/components/forms/date/inputDateTimePicker/helpers.ts +3 -0
- package/src/components/forms/date/inputDateTimePicker/index.ts +1 -0
- package/src/components/forms/input/Input.tsx +1 -1
- package/src/components/forms/passwordInput/PasswordInput.stories.tsx +1 -1
- package/src/components/forms/subcomponents/DisplayFormError.tsx +7 -2
- package/src/components/forms/timePicker/TimePicker.mdx +3 -27
- package/src/components/forms/timePicker/TimePicker.stories.tsx +19 -1
- package/src/components/forms/timePicker/TimePicker.tsx +37 -80
- package/src/components/forms/timePicker/__tests__/TimePicker.test.tsx +33 -11
- package/src/components/forms/timePicker/helpers.ts +61 -13
- package/src/components/index.ts +3 -0
- package/src/components/loading-indicators/BarSpinner/BarSpinner.mdx +21 -0
- package/src/components/loading-indicators/BarSpinner/BarSpinner.stories.tsx +89 -0
- package/src/components/loading-indicators/BarSpinner/BarSpinner.tsx +25 -0
- package/src/components/loading-indicators/BarSpinner/__tests__/BarSpinner.test.tsx +16 -0
- package/src/{legacy/components/loading-indicators/BarSpinner/BarSpinner.styles.ts → components/loading-indicators/BarSpinner/styles/BarSpinner.scss} +11 -11
- package/src/components/loading-indicators/CirclePulse/CirclePulse.mdx +20 -0
- package/src/components/loading-indicators/CirclePulse/CirclePulse.scss +83 -0
- package/src/components/loading-indicators/CirclePulse/CirclePulse.stories.tsx +78 -0
- package/src/components/loading-indicators/CirclePulse/CirclePulse.tsx +15 -0
- package/src/components/tanstackTable/components/TableBody/TableBody.tsx +1 -1
- package/src/components/tooltip/Tooltip.mdx +25 -0
- package/src/components/tooltip/Tooltip.stories.tsx +113 -0
- package/src/components/tooltip/Tooltip.tsx +38 -0
- package/src/components/tooltip/styles/Tooltip.scss +8 -0
- package/src/index.ts +4 -2
- package/src/styles/globals.scss +9 -0
- package/src/styles/index.scss +3 -2
- package/lib/components/forms/timePicker/constants.d.ts +0 -13
- package/lib/legacy/components/Tooltip/Tooltip.d.ts +0 -15
- package/lib/legacy/components/Tooltip/Tooltip.stories.d.ts +0 -9
- package/lib/legacy/components/Tooltip/Tooltip.styles.d.ts +0 -1
- package/lib/legacy/components/index.d.ts +0 -2
- package/lib/legacy/components/loading-indicators/BarSpinner/BarSpinner.d.ts +0 -7
- package/lib/legacy/components/loading-indicators/BarSpinner/BarSpinner.stories.d.ts +0 -10
- package/lib/legacy/components/loading-indicators/BarSpinner/BarSpinner.styles.d.ts +0 -1
- package/lib/legacy/components/loading-indicators/CirclePulse/CirclePulse.d.ts +0 -10
- package/lib/legacy/components/loading-indicators/CirclePulse/CirclePulse.stories.d.ts +0 -12
- package/lib/legacy/components/loading-indicators/CirclePulse/CirclePulse.styles.d.ts +0 -7
- package/lib/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.d.ts +0 -10
- package/lib/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.stories.d.ts +0 -10
- package/lib/legacy/components/loading-indicators/CircleSpinner/index.d.ts +0 -1
- package/lib/legacy/components/loading-indicators/index.d.ts +0 -3
- package/src/components/forms/timePicker/constants.ts +0 -21
- package/src/components/forms/timePicker/styles/TimePicker.scss +0 -51
- package/src/legacy/components/Tooltip/Tooltip.stories.tsx +0 -107
- package/src/legacy/components/Tooltip/Tooltip.styles.ts +0 -64
- package/src/legacy/components/Tooltip/Tooltip.tsx +0 -70
- package/src/legacy/components/index.ts +0 -2
- package/src/legacy/components/loading-indicators/BarSpinner/BarSpinner.stories.tsx +0 -14
- package/src/legacy/components/loading-indicators/BarSpinner/BarSpinner.tsx +0 -21
- package/src/legacy/components/loading-indicators/CirclePulse/CirclePulse.stories.tsx +0 -22
- package/src/legacy/components/loading-indicators/CirclePulse/CirclePulse.styles.ts +0 -77
- package/src/legacy/components/loading-indicators/CirclePulse/CirclePulse.tsx +0 -57
- package/src/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.stories.tsx +0 -16
- package/src/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.tsx +0 -36
- package/src/legacy/components/loading-indicators/CircleSpinner/index.ts +0 -1
- package/src/legacy/components/loading-indicators/index.ts +0 -3
- /package/lib/{legacy/components → components}/loading-indicators/BarSpinner/index.d.ts +0 -0
- /package/lib/{legacy/components → components}/loading-indicators/CirclePulse/index.d.ts +0 -0
- /package/lib/{legacy/components/Tooltip → components/tooltip}/index.d.ts +0 -0
- /package/src/{legacy/components → components}/loading-indicators/BarSpinner/index.ts +0 -0
- /package/src/{legacy/components → components}/loading-indicators/CirclePulse/index.ts +0 -0
- /package/src/{legacy/components/Tooltip → components/tooltip}/index.ts +0 -0
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
// TODO: This component's migration was fast-tracked for Insights. Assess for potential refactor and documentation.
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import { Icon } from '../../../components/icons/Icon';
|
|
6
|
-
import { PermafrostComponent } from '../../../types';
|
|
7
|
-
import { Tooltip as ReactTooltip } from 'react-tooltip';
|
|
8
|
-
|
|
9
|
-
import { StyledTooltip } from './Tooltip.styles';
|
|
10
|
-
|
|
11
|
-
enum PlacesType {
|
|
12
|
-
top = 'top',
|
|
13
|
-
'top-start' = 'top-start',
|
|
14
|
-
'top-end' = 'top-end',
|
|
15
|
-
right = 'right',
|
|
16
|
-
'right-start' = 'right-start',
|
|
17
|
-
'right-end' = 'right-end',
|
|
18
|
-
bottom = 'bottom',
|
|
19
|
-
'bottom-start' = 'bottom-start',
|
|
20
|
-
'bottom-end' = 'bottom-end',
|
|
21
|
-
left = 'left',
|
|
22
|
-
'left-start' = 'left-start',
|
|
23
|
-
'left-end' = 'left-end',
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
type Props = PermafrostComponent & {
|
|
27
|
-
questionMark?: boolean;
|
|
28
|
-
for?: string | null;
|
|
29
|
-
place?: string;
|
|
30
|
-
clickToShow?: boolean;
|
|
31
|
-
delayShow?: number;
|
|
32
|
-
delayHide?: number;
|
|
33
|
-
questionMarkClassName?: string;
|
|
34
|
-
children: React.ReactNode;
|
|
35
|
-
block?: boolean;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const Tooltip = (props: Props) => {
|
|
39
|
-
return (
|
|
40
|
-
<StyledTooltip
|
|
41
|
-
className={props.className}
|
|
42
|
-
data-cy={props['data-cy']}
|
|
43
|
-
id={props.id}
|
|
44
|
-
// this was done in a hurry, consider refactor on next pass.
|
|
45
|
-
style={{ display: props.block ? 'block' : 'inline-block' }}
|
|
46
|
-
>
|
|
47
|
-
{props.questionMark && (
|
|
48
|
-
<i
|
|
49
|
-
className={props.questionMarkClassName}
|
|
50
|
-
// data-tip={props.clickToShow ? 'custom show' : ''}
|
|
51
|
-
data-tooltip-id={props.for as string | undefined}
|
|
52
|
-
data-tooltip-place={(props.place as PlacesType) || 'top'}
|
|
53
|
-
>
|
|
54
|
-
<Icon name="fa-question-circle" />
|
|
55
|
-
</i>
|
|
56
|
-
)}
|
|
57
|
-
<ReactTooltip
|
|
58
|
-
className="tool"
|
|
59
|
-
// globalEventOff={props.clickToShow ? 'click' : ''}
|
|
60
|
-
// place={(props.place as PlacesType) || 'top'}
|
|
61
|
-
openOnClick={props.clickToShow}
|
|
62
|
-
id={props.for as string | undefined}
|
|
63
|
-
delayShow={props.delayShow}
|
|
64
|
-
delayHide={props.delayHide}
|
|
65
|
-
>
|
|
66
|
-
{props.children}
|
|
67
|
-
</ReactTooltip>
|
|
68
|
-
</StyledTooltip>
|
|
69
|
-
);
|
|
70
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { BarSpinner } from './BarSpinner';
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
component: BarSpinner,
|
|
7
|
-
title: 'legacy/Loading/BarSpinner',
|
|
8
|
-
argTypes: {},
|
|
9
|
-
} satisfies Meta<typeof BarSpinner>;
|
|
10
|
-
|
|
11
|
-
export default meta;
|
|
12
|
-
type Story = StoryObj<typeof BarSpinner>;
|
|
13
|
-
|
|
14
|
-
export const Normal: Story = {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// TODO: This component's migration was fast-tracked for Insights. Assess for potential refactor and documentation.
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import type { PermafrostComponent } from '../../../../types';
|
|
6
|
-
|
|
7
|
-
import { StyledBarSpinner } from './BarSpinner.styles';
|
|
8
|
-
|
|
9
|
-
type Props = PermafrostComponent & {
|
|
10
|
-
width?: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
export function BarSpinner(props: Props): React.ReactElement {
|
|
14
|
-
const { className, id, width = '100%' } = props;
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<StyledBarSpinner className={className} data-cy={props['data-cy']} id={id} style={{ width }}>
|
|
18
|
-
<span />
|
|
19
|
-
</StyledBarSpinner>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { CirclePulse } from './CirclePulse';
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
component: CirclePulse,
|
|
7
|
-
title: 'legacy/Loading/CirclePulse',
|
|
8
|
-
argTypes: {},
|
|
9
|
-
} satisfies Meta<typeof CirclePulse>;
|
|
10
|
-
|
|
11
|
-
export default meta;
|
|
12
|
-
type Story = StoryObj<typeof CirclePulse>;
|
|
13
|
-
|
|
14
|
-
export const Normal: Story = {};
|
|
15
|
-
|
|
16
|
-
export const CustomColor: Story = {
|
|
17
|
-
args: { color: '#f0f' },
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const WithRandomMessage: Story = {
|
|
21
|
-
args: { showRandomMessage: true },
|
|
22
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import styled, { keyframes } from 'styled-components';
|
|
2
|
-
|
|
3
|
-
const ripple = (size: string) => keyframes`
|
|
4
|
-
0% {
|
|
5
|
-
width: 0;
|
|
6
|
-
height: 0;
|
|
7
|
-
opacity: 0;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
20% {
|
|
11
|
-
opacity: 1;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
100% {
|
|
15
|
-
width: ${size};
|
|
16
|
-
height: ${size};
|
|
17
|
-
opacity: 0;
|
|
18
|
-
}
|
|
19
|
-
`;
|
|
20
|
-
|
|
21
|
-
const animationSpeed = 1.4;
|
|
22
|
-
|
|
23
|
-
export const StyledLoadingIndicator = styled.div<{
|
|
24
|
-
overallsize: string;
|
|
25
|
-
ripplesize: string;
|
|
26
|
-
}>`
|
|
27
|
-
display: grid;
|
|
28
|
-
place-items: center;
|
|
29
|
-
|
|
30
|
-
width: ${(props) => props.overallsize};
|
|
31
|
-
height: ${(props) => props.overallsize};
|
|
32
|
-
|
|
33
|
-
margin-left: auto;
|
|
34
|
-
margin-right: auto;
|
|
35
|
-
|
|
36
|
-
&:before,
|
|
37
|
-
&:after {
|
|
38
|
-
content: '';
|
|
39
|
-
border: 4px solid currentColor;
|
|
40
|
-
border-radius: 50%;
|
|
41
|
-
|
|
42
|
-
grid-area: 1 / 1;
|
|
43
|
-
|
|
44
|
-
animation: ${(props) => ripple(props.ripplesize)} ${animationSpeed}s
|
|
45
|
-
cubic-bezier(0, 0.2, 0.8, 1) infinite;
|
|
46
|
-
|
|
47
|
-
@media (prefers-reduced-motion) {
|
|
48
|
-
animation-duration: ${animationSpeed * 2}s;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&:after {
|
|
53
|
-
animation-delay: -${animationSpeed / 2}s;
|
|
54
|
-
|
|
55
|
-
@media (prefers-reduced-motion) {
|
|
56
|
-
animation-delay: -${animationSpeed}s;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
`;
|
|
60
|
-
|
|
61
|
-
export const StyledMessageLoadingIndicator = styled.div<{ overallsize: string }>`
|
|
62
|
-
display: block;
|
|
63
|
-
|
|
64
|
-
> * {
|
|
65
|
-
margin-left: auto;
|
|
66
|
-
margin-right: auto;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.message {
|
|
70
|
-
text-align: center;
|
|
71
|
-
display: block;
|
|
72
|
-
width: ${(props) => props.overallsize};
|
|
73
|
-
margin-top: -50px;
|
|
74
|
-
|
|
75
|
-
font-style: italic;
|
|
76
|
-
}
|
|
77
|
-
`;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
// TODO: This component's migration was fast-tracked for Insights. Assess for potential refactor and documentation.
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import type { PermafrostComponent } from '../../../../types';
|
|
6
|
-
|
|
7
|
-
import { StyledLoadingIndicator, StyledMessageLoadingIndicator } from './CirclePulse.styles';
|
|
8
|
-
|
|
9
|
-
type Props = PermafrostComponent & {
|
|
10
|
-
color?: string;
|
|
11
|
-
overallSize?: string | number;
|
|
12
|
-
rippleSize?: string | number;
|
|
13
|
-
showRandomMessage?: boolean;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export function CirclePulse(props: Props): React.ReactElement {
|
|
17
|
-
const {
|
|
18
|
-
className,
|
|
19
|
-
color,
|
|
20
|
-
id,
|
|
21
|
-
overallSize = '200px',
|
|
22
|
-
rippleSize = '76px',
|
|
23
|
-
showRandomMessage,
|
|
24
|
-
} = props;
|
|
25
|
-
|
|
26
|
-
const loadingIndicator = () => {
|
|
27
|
-
return (
|
|
28
|
-
<StyledLoadingIndicator
|
|
29
|
-
aria-hidden={true}
|
|
30
|
-
className={className}
|
|
31
|
-
data-cy={props['data-cy']}
|
|
32
|
-
data-testid={props['data-testid']}
|
|
33
|
-
id={id}
|
|
34
|
-
overallsize={returnSizeString(overallSize)}
|
|
35
|
-
ripplesize={returnSizeString(rippleSize)}
|
|
36
|
-
/>
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
if (showRandomMessage) {
|
|
41
|
-
return (
|
|
42
|
-
<StyledMessageLoadingIndicator overallsize={returnSizeString(overallSize)}>
|
|
43
|
-
{loadingIndicator()}
|
|
44
|
-
</StyledMessageLoadingIndicator>
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return loadingIndicator();
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function returnSizeString(size: string | number): string {
|
|
52
|
-
if (typeof size === 'number') {
|
|
53
|
-
return `${size}px`;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return size;
|
|
57
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { CircleSpinner } from './CircleSpinner';
|
|
4
|
-
|
|
5
|
-
const meta = {
|
|
6
|
-
component: CircleSpinner,
|
|
7
|
-
title: 'legacy/Loading/CircleSpinner',
|
|
8
|
-
argTypes: {},
|
|
9
|
-
} satisfies Meta<typeof CircleSpinner>;
|
|
10
|
-
|
|
11
|
-
export default meta;
|
|
12
|
-
type Story = StoryObj<typeof CircleSpinner>;
|
|
13
|
-
|
|
14
|
-
export const Normal: Story = {
|
|
15
|
-
args: {},
|
|
16
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// TODO: This component's migration was fast-tracked for Insights. Assess for potential refactor and documentation.
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
5
|
-
import { Icon } from '../../../../components/icons/Icon';
|
|
6
|
-
import type { PermafrostComponent, IconSizes } from '../../../../types';
|
|
7
|
-
|
|
8
|
-
type Props = PermafrostComponent & {
|
|
9
|
-
ariaLabel?: string;
|
|
10
|
-
size?: IconSizes;
|
|
11
|
-
style?: React.CSSProperties;
|
|
12
|
-
fill?: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export function CircleSpinner(props: Props): React.ReactElement {
|
|
16
|
-
const { className, fill, id, size = 'sm', style, ariaLabel = 'Loading...' } = props;
|
|
17
|
-
|
|
18
|
-
const loaderStyle: React.CSSProperties = {
|
|
19
|
-
position: 'relative',
|
|
20
|
-
top: '1px',
|
|
21
|
-
color: fill || 'currentColor',
|
|
22
|
-
...style,
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<Icon
|
|
27
|
-
name="fa-circle-notch"
|
|
28
|
-
className={`spin ${className || ''}`}
|
|
29
|
-
data-cy={props['data-cy']}
|
|
30
|
-
id={id}
|
|
31
|
-
size={size}
|
|
32
|
-
style={loaderStyle}
|
|
33
|
-
ariaLabel={ariaLabel}
|
|
34
|
-
/>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CircleSpinner } from './CircleSpinner';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|