@funidata/fudis-core 1.0.1 → 2.0.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/_index.scss +1 -33
- package/_styles.scss +31 -0
- package/package.json +3 -2
- package/src/components/checkbox/checkbox.scss +50 -10
package/_index.scss
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Assets and Foundations
|
|
2
|
+
* Foundations
|
|
7
3
|
*/
|
|
8
4
|
@forward './src/foundations/borders/tokens';
|
|
9
5
|
@forward './src/foundations/breakpoints/tokens';
|
|
@@ -20,33 +16,5 @@
|
|
|
20
16
|
@forward './src/foundations/grid/mixins';
|
|
21
17
|
@forward './src/foundations/spacing/mixins';
|
|
22
18
|
@forward './src/foundations/typography/mixins';
|
|
23
|
-
@forward './src/foundations/typography/classes';
|
|
24
19
|
@forward './src/foundations/utilities/mixins';
|
|
25
20
|
@forward './src/foundations/z-index/mixins';
|
|
26
|
-
@forward './src/foundations/spacing/classes';
|
|
27
|
-
@forward './src/foundations/utilities/classes';
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Component styles
|
|
31
|
-
*/
|
|
32
|
-
@forward './src/components/alert/alert';
|
|
33
|
-
@forward './src/components/button/button';
|
|
34
|
-
@forward './src/components/badge/badge';
|
|
35
|
-
@forward './src/components/checkbox/checkbox';
|
|
36
|
-
@forward './src/components/checkbox-group/checkbox-group';
|
|
37
|
-
@forward './src/components/error-summary/error-summary';
|
|
38
|
-
@forward './src/components/fieldset/fieldset';
|
|
39
|
-
@forward './src/components/guidance/guidance';
|
|
40
|
-
@forward './src/components/horizontal-rule/horizontal-rule';
|
|
41
|
-
@forward './src/components/icon/icon';
|
|
42
|
-
@forward './src/components/label/label';
|
|
43
|
-
@forward './src/components/link/link';
|
|
44
|
-
@forward './src/components/loading-spinner/loading-spinner';
|
|
45
|
-
@forward './src/components/notification/notification';
|
|
46
|
-
@forward './src/components/popover/popover';
|
|
47
|
-
@forward './src/components/radio-button/radio-button';
|
|
48
|
-
@forward './src/components/radio-button-group/radio-button-group';
|
|
49
|
-
@forward './src/components/tab-navigation/tab-navigation';
|
|
50
|
-
@forward './src/components/text-area/text-area';
|
|
51
|
-
@forward './src/components/text-input/text-input';
|
|
52
|
-
@forward './src/components/validator-error-message/validator-error-message';
|
package/_styles.scss
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Foundation styles
|
|
3
|
+
*/
|
|
4
|
+
@forward './src/foundations/spacing/classes';
|
|
5
|
+
@forward './src/foundations/utilities/classes';
|
|
6
|
+
@forward './src/foundations/typography/classes';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Component styles
|
|
10
|
+
*/
|
|
11
|
+
@forward './src/components/alert/alert';
|
|
12
|
+
@forward './src/components/button/button';
|
|
13
|
+
@forward './src/components/badge/badge';
|
|
14
|
+
@forward './src/components/checkbox/checkbox';
|
|
15
|
+
@forward './src/components/checkbox-group/checkbox-group';
|
|
16
|
+
@forward './src/components/error-summary/error-summary';
|
|
17
|
+
@forward './src/components/fieldset/fieldset';
|
|
18
|
+
@forward './src/components/guidance/guidance';
|
|
19
|
+
@forward './src/components/horizontal-rule/horizontal-rule';
|
|
20
|
+
@forward './src/components/icon/icon';
|
|
21
|
+
@forward './src/components/label/label';
|
|
22
|
+
@forward './src/components/link/link';
|
|
23
|
+
@forward './src/components/loading-spinner/loading-spinner';
|
|
24
|
+
@forward './src/components/notification/notification';
|
|
25
|
+
@forward './src/components/popover/popover';
|
|
26
|
+
@forward './src/components/radio-button/radio-button';
|
|
27
|
+
@forward './src/components/radio-button-group/radio-button-group';
|
|
28
|
+
@forward './src/components/tab-navigation/tab-navigation';
|
|
29
|
+
@forward './src/components/text-area/text-area';
|
|
30
|
+
@forward './src/components/text-input/text-input';
|
|
31
|
+
@forward './src/components/validator-error-message/validator-error-message';
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funidata/fudis-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Core styles and foundations for Fudis Design System",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
7
|
-
"./_index.scss"
|
|
7
|
+
"./_index.scss",
|
|
8
|
+
"./_styles.scss"
|
|
8
9
|
],
|
|
9
10
|
"scripts": {
|
|
10
11
|
"start": "storybook dev -p 6007",
|
|
@@ -1,25 +1,46 @@
|
|
|
1
|
-
@use '../../foundations/borders/mixins.scss' as
|
|
1
|
+
@use '../../foundations/borders/mixins.scss' as borders;
|
|
2
2
|
@use '../../foundations/spacing/tokens.scss' as spacing;
|
|
3
3
|
@use '../../foundations/colors/tokens.scss' as colors;
|
|
4
|
-
@use '../../foundations/colors/mixins.scss' as
|
|
4
|
+
@use '../../foundations/colors/mixins.scss' as colorMixins;
|
|
5
5
|
@use '../../foundations/utilities/mixins.scss' as utilities;
|
|
6
6
|
@use '../../foundations/focus/mixins.scss' as focus;
|
|
7
7
|
@use '../../foundations/typography/mixins.scss' as typography;
|
|
8
|
+
@use '../../foundations/typography/tokens.scss' as typographyTokens;
|
|
8
9
|
|
|
9
10
|
.fudis-checkbox {
|
|
10
11
|
@include typography.body-text-md-regular;
|
|
11
|
-
@include
|
|
12
|
+
@include colorMixins.text-color('gray-dark');
|
|
12
13
|
|
|
13
14
|
display: inline-flex;
|
|
14
15
|
position: relative;
|
|
15
16
|
align-items: center;
|
|
16
|
-
cursor: pointer;
|
|
17
17
|
width: auto;
|
|
18
18
|
min-height: spacing.$spacing-lg;
|
|
19
19
|
|
|
20
|
+
&__label {
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
position: relative;
|
|
23
|
+
align-items: center;
|
|
24
|
+
|
|
25
|
+
&__text {
|
|
26
|
+
position: relative;
|
|
27
|
+
padding-right: spacing.$spacing-xs;
|
|
28
|
+
padding-left: spacing.$spacing-xs;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&--disabled {
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
20
36
|
&__content {
|
|
21
37
|
display: inline-flex;
|
|
22
38
|
align-items: center;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
|
|
41
|
+
&--disabled {
|
|
42
|
+
cursor: default;
|
|
43
|
+
}
|
|
23
44
|
|
|
24
45
|
&-wrapper {
|
|
25
46
|
display: flex;
|
|
@@ -30,7 +51,7 @@
|
|
|
30
51
|
}
|
|
31
52
|
|
|
32
53
|
&__box {
|
|
33
|
-
@include
|
|
54
|
+
@include borders.border('1px', 'solid', 'gray-middle');
|
|
34
55
|
|
|
35
56
|
display: flex;
|
|
36
57
|
position: absolute;
|
|
@@ -40,19 +61,21 @@
|
|
|
40
61
|
width: spacing.$checkbox-size;
|
|
41
62
|
height: spacing.$checkbox-size;
|
|
42
63
|
|
|
64
|
+
&__icon .fudis-icon {
|
|
65
|
+
fill: colors.$color-gray-middle;
|
|
66
|
+
}
|
|
67
|
+
|
|
43
68
|
&--focused {
|
|
44
69
|
@include focus.focus-checkbox;
|
|
45
70
|
}
|
|
46
71
|
|
|
47
72
|
&--disabled {
|
|
48
|
-
@include
|
|
49
|
-
@include
|
|
50
|
-
|
|
51
|
-
cursor: default;
|
|
73
|
+
@include borders.border('1px', 'dashed', 'gray-middle');
|
|
74
|
+
@include colorMixins.bg-color('gray-extra-light');
|
|
52
75
|
}
|
|
53
76
|
|
|
54
77
|
&--invalid {
|
|
55
|
-
@include
|
|
78
|
+
@include borders.border('1px', 'solid', 'red');
|
|
56
79
|
|
|
57
80
|
box-shadow: 0 0 0 spacing.$pixel-3 colors.$color-red-light;
|
|
58
81
|
}
|
|
@@ -65,6 +88,19 @@
|
|
|
65
88
|
}
|
|
66
89
|
}
|
|
67
90
|
|
|
91
|
+
&__required {
|
|
92
|
+
@include typography.text-field-label;
|
|
93
|
+
@include colorMixins.text-color('gray-middle');
|
|
94
|
+
|
|
95
|
+
display: inline-block;
|
|
96
|
+
vertical-align: baseline;
|
|
97
|
+
text-transform: initial;
|
|
98
|
+
/* stylelint-disable-next-line property-disallowed-list */
|
|
99
|
+
line-height: typographyTokens.$text-input-line-height;
|
|
100
|
+
/* stylelint-disable-next-line property-disallowed-list */
|
|
101
|
+
font-size: typographyTokens.$body-text-sm-font-size;
|
|
102
|
+
}
|
|
103
|
+
|
|
68
104
|
&__input {
|
|
69
105
|
@include utilities.box-reset;
|
|
70
106
|
|
|
@@ -83,3 +119,7 @@
|
|
|
83
119
|
pointer-events: none;
|
|
84
120
|
}
|
|
85
121
|
}
|
|
122
|
+
/* stylelint-disable selector-class-pattern */
|
|
123
|
+
.fudis-checkbox.fudis-checkbox__label {
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
}
|