@randstad-uca/design-system 1.0.48 → 1.0.50
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/dist/components/DatePicker.d.ts +2 -12
- package/dist/components/File.d.ts +4 -13
- package/dist/components/Form.d.ts +2 -15
- package/dist/components/FormGroup.d.ts +2 -8
- package/dist/components/Select.d.ts +6 -13
- package/dist/components/Upload.d.ts +2 -1
- package/dist/helpers/BaseControl.d.ts +22 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +566 -704
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/stories/DatePicker.stories.d.ts +12 -0
- package/dist/stories/Form.stories.d.ts +6 -2
- package/dist/stories/Select.stories.d.ts +26 -1
- package/dist/stories/Upload.stories.d.ts +25 -2
- package/dist/stories/UploadFile.stories.d.ts +12 -0
- package/dist/styles/error.d.ts +1 -0
- package/dist/styles/error.ts +23 -0
- package/dist/styles/mix.d.ts +1 -0
- package/dist/styles/mix.ts +51 -0
- package/dist/styles/tooltip.d.ts +1 -0
- package/dist/styles/tooltip.ts +56 -0
- package/package.json +1 -1
package/dist/package.json
CHANGED
|
@@ -52,6 +52,15 @@ declare const _default: {
|
|
|
52
52
|
};
|
|
53
53
|
options: string[];
|
|
54
54
|
};
|
|
55
|
+
help: {
|
|
56
|
+
control: string;
|
|
57
|
+
};
|
|
58
|
+
helpLink: {
|
|
59
|
+
control: string;
|
|
60
|
+
};
|
|
61
|
+
helpLinkTooltipMessage: {
|
|
62
|
+
control: string;
|
|
63
|
+
};
|
|
55
64
|
};
|
|
56
65
|
};
|
|
57
66
|
export default _default;
|
|
@@ -64,3 +73,6 @@ export declare const WithError: StoryFn;
|
|
|
64
73
|
export declare const WithHelperAndError: StoryFn;
|
|
65
74
|
export declare const WithCustomWidth: StoryFn;
|
|
66
75
|
export declare const WithDateRange: StoryFn;
|
|
76
|
+
export declare const WithHelp: StoryFn;
|
|
77
|
+
export declare const WithHelpLink: StoryFn;
|
|
78
|
+
export declare const WithHelpLinkAndTooltip: StoryFn;
|
|
@@ -9,7 +9,6 @@ export interface FormProps {
|
|
|
9
9
|
helper?: string;
|
|
10
10
|
error?: boolean;
|
|
11
11
|
errorMessage?: string;
|
|
12
|
-
tooltipMessage?: string;
|
|
13
12
|
success?: boolean;
|
|
14
13
|
disabled?: boolean;
|
|
15
14
|
typing?: boolean;
|
|
@@ -21,6 +20,9 @@ export interface FormProps {
|
|
|
21
20
|
maxLength?: number;
|
|
22
21
|
required?: boolean;
|
|
23
22
|
optional?: boolean;
|
|
23
|
+
help?: string;
|
|
24
|
+
helpLink?: string;
|
|
25
|
+
helpLinkTooltipMessage?: string;
|
|
24
26
|
heightTextArea?: string;
|
|
25
27
|
maxHeightTextArea?: string;
|
|
26
28
|
helperAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
@@ -43,10 +45,12 @@ export declare const TextareaWithHelperRight: Story;
|
|
|
43
45
|
export declare const TextareaWithHeightAndScroll: Story;
|
|
44
46
|
export declare const TextareaWithError: Story;
|
|
45
47
|
export declare const TextareaDisabled: Story;
|
|
48
|
+
export declare const WithCleanButton: Story;
|
|
46
49
|
export declare const Help: Story;
|
|
50
|
+
export declare const HelpLink: Story;
|
|
51
|
+
export declare const HelpLinkWithTooltip: Story;
|
|
47
52
|
export declare const Link: Story;
|
|
48
53
|
export declare const LabelColor: Story;
|
|
49
54
|
export declare const WithMaxLength: Story;
|
|
50
|
-
export declare const WithCleanButton: Story;
|
|
51
55
|
export declare const Required: Story;
|
|
52
56
|
export declare const Optional: Story;
|
|
@@ -43,6 +43,27 @@ declare const _default: {
|
|
|
43
43
|
optional: {
|
|
44
44
|
control: string;
|
|
45
45
|
};
|
|
46
|
+
errorMessage: {
|
|
47
|
+
control: string;
|
|
48
|
+
};
|
|
49
|
+
helper: {
|
|
50
|
+
control: string;
|
|
51
|
+
};
|
|
52
|
+
helperAlign: {
|
|
53
|
+
control: {
|
|
54
|
+
type: string;
|
|
55
|
+
};
|
|
56
|
+
options: string[];
|
|
57
|
+
};
|
|
58
|
+
help: {
|
|
59
|
+
control: string;
|
|
60
|
+
};
|
|
61
|
+
helpLink: {
|
|
62
|
+
control: string;
|
|
63
|
+
};
|
|
64
|
+
helpLinkTooltipMessage: {
|
|
65
|
+
control: string;
|
|
66
|
+
};
|
|
46
67
|
};
|
|
47
68
|
};
|
|
48
69
|
export default _default;
|
|
@@ -58,4 +79,8 @@ export declare const NonFilterableBasic: StoryFn;
|
|
|
58
79
|
export declare const WithMaxLength: StoryFn;
|
|
59
80
|
export declare const MobileModal: StoryFn;
|
|
60
81
|
export declare const WithError: StoryFn;
|
|
61
|
-
export declare const
|
|
82
|
+
export declare const WithHelper: StoryFn;
|
|
83
|
+
export declare const WithHelperAndError: StoryFn;
|
|
84
|
+
export declare const WithHelp: StoryFn;
|
|
85
|
+
export declare const WithHelpLink: StoryFn;
|
|
86
|
+
export declare const WithHelpLinkAndTooltip: StoryFn;
|
|
@@ -1,8 +1,31 @@
|
|
|
1
|
+
import type { StoryFn } from '@storybook/web-components';
|
|
1
2
|
import '../components/Upload.ts';
|
|
2
3
|
declare const _default: {
|
|
3
4
|
title: string;
|
|
4
5
|
component: string;
|
|
6
|
+
argTypes: {
|
|
7
|
+
files: {
|
|
8
|
+
control: string;
|
|
9
|
+
};
|
|
10
|
+
disabled: {
|
|
11
|
+
control: string;
|
|
12
|
+
};
|
|
13
|
+
simulatedDelay: {
|
|
14
|
+
control: {
|
|
15
|
+
type: string;
|
|
16
|
+
min: number;
|
|
17
|
+
step: number;
|
|
18
|
+
};
|
|
19
|
+
description: string;
|
|
20
|
+
defaultValue: number;
|
|
21
|
+
};
|
|
22
|
+
onFilesChanged: {
|
|
23
|
+
action: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
5
26
|
};
|
|
6
27
|
export default _default;
|
|
7
|
-
export declare const Default:
|
|
8
|
-
export declare const
|
|
28
|
+
export declare const Default: StoryFn;
|
|
29
|
+
export declare const InstantUpload: StoryFn;
|
|
30
|
+
export declare const SlowUpload: StoryFn;
|
|
31
|
+
export declare const Disabled: StoryFn;
|
|
@@ -64,6 +64,15 @@ declare const _default: {
|
|
|
64
64
|
disable: boolean;
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
|
+
help: {
|
|
68
|
+
control: string;
|
|
69
|
+
};
|
|
70
|
+
helpLink: {
|
|
71
|
+
control: string;
|
|
72
|
+
};
|
|
73
|
+
helpLinkTooltipMessage: {
|
|
74
|
+
control: string;
|
|
75
|
+
};
|
|
67
76
|
onFilesChanged: {
|
|
68
77
|
action: string;
|
|
69
78
|
};
|
|
@@ -81,3 +90,6 @@ export declare const MultipleFiles: StoryFn;
|
|
|
81
90
|
export declare const Disabled: StoryFn;
|
|
82
91
|
export declare const WithValue: StoryFn;
|
|
83
92
|
export declare const ErrorState: StoryFn;
|
|
93
|
+
export declare const WithHelp: StoryFn;
|
|
94
|
+
export declare const WithHelpLink: StoryFn;
|
|
95
|
+
export declare const WithHelpLinkAndTooltip: StoryFn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const errorStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
import { bodyM } from "./fontStyles";
|
|
3
|
+
|
|
4
|
+
export const errorStyles = css `
|
|
5
|
+
:host([error]) .input-wrapper, .form.error .form-input {
|
|
6
|
+
border: 1px solid var(--ui-negative, red) !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:host([error]) .input-wrapper:hover, .form.error:hover .form-input:hover {
|
|
10
|
+
box-shadow: 0px 0px 0px 4px #e00f0f1a !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:host([error]) .input-wrapper.active, .form.error.active .form-input.active {
|
|
14
|
+
border: 1px solid var(--ui-negative, red) !important;
|
|
15
|
+
box-shadow: none !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.error-message {
|
|
19
|
+
${ bodyM }
|
|
20
|
+
color: var(--ui-negative, #E00F0F);
|
|
21
|
+
margin-top: 4px;
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const mixStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
|
|
2
|
+
import { css } from "lit";
|
|
3
|
+
import { bodyL, bodyM, bodyXS } from "./fontStyles";
|
|
4
|
+
|
|
5
|
+
export const mixStyles = css `
|
|
6
|
+
:host {
|
|
7
|
+
display: block;
|
|
8
|
+
font-family: "Graphik", sans-serif;
|
|
9
|
+
color: var(--secondary-randstad-dark-blue, #0f1941);
|
|
10
|
+
width: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.form-label {
|
|
14
|
+
${ bodyM }
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: baseline;
|
|
17
|
+
flex-direction: row;
|
|
18
|
+
gap: 4px;
|
|
19
|
+
color: var(--label-color, var(--secondary-color-80));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.input-container {
|
|
23
|
+
position: relative;
|
|
24
|
+
width: 100%;
|
|
25
|
+
max-width: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
input::placeholder {
|
|
29
|
+
${ bodyL }
|
|
30
|
+
color: var(--secondary-color-40);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.helper-description {
|
|
34
|
+
${ bodyM }
|
|
35
|
+
color: var(--secondary-color-40);
|
|
36
|
+
margin: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.required {
|
|
40
|
+
color: var(--ui-negative);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.optional {
|
|
44
|
+
color: var(--secondary-color-60);
|
|
45
|
+
${ bodyXS }
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
randstad-icon {
|
|
49
|
+
color: var(--primary-color);
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const tooltipStyles: import("lit").CSSResult;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
|
|
3
|
+
export const tooltipStyles = css`
|
|
4
|
+
.label-container {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
gap: 8px;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.tooltip-wrapper {
|
|
12
|
+
position: relative;
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.tooltip {
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: 160%;
|
|
20
|
+
right: 0;
|
|
21
|
+
|
|
22
|
+
background-color: var(--tooltip-background, #0F1941);
|
|
23
|
+
color: var(--tooltip-color, #fff);
|
|
24
|
+
|
|
25
|
+
padding: 8px 12px;
|
|
26
|
+
border-radius: 4px;
|
|
27
|
+
font-size: 14px;
|
|
28
|
+
line-height: 20px;
|
|
29
|
+
|
|
30
|
+
width: 250px;
|
|
31
|
+
max-width: 250px;
|
|
32
|
+
|
|
33
|
+
z-index: 10;
|
|
34
|
+
opacity: 0;
|
|
35
|
+
visibility: hidden;
|
|
36
|
+
transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.tooltip::after {
|
|
40
|
+
content: '';
|
|
41
|
+
position: absolute;
|
|
42
|
+
top: -6px;
|
|
43
|
+
right: 4px;
|
|
44
|
+
|
|
45
|
+
width: 0;
|
|
46
|
+
height: 0;
|
|
47
|
+
border-style: solid;
|
|
48
|
+
border-width: 0 6px 6px 6px;
|
|
49
|
+
border-color: transparent transparent var(--tooltip-background, #0F1941) transparent;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.tooltip-wrapper:hover .tooltip {
|
|
53
|
+
visibility: visible;
|
|
54
|
+
opacity: 1;
|
|
55
|
+
}
|
|
56
|
+
`;
|