@faststore/ui 3.15.0 → 3.15.3
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/README.md
CHANGED
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
|
|
30
30
|
## Installation
|
|
31
31
|
|
|
32
|
-
From the command line in your project directory, run
|
|
32
|
+
From the command line in your project directory, run pnpm add `@faststore/ui`.
|
|
33
33
|
|
|
34
34
|
```cmd
|
|
35
|
-
|
|
35
|
+
pnpm add @faststore/ui
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
## Usage
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/ui",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.3",
|
|
4
4
|
"description": "A lightweight, framework agnostic component library for React",
|
|
5
5
|
"author": "emersonlaurentino",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
}
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@faststore/components": "^3.15.
|
|
50
|
+
"@faststore/components": "^3.15.3",
|
|
51
51
|
"include-media": "^1.4.10",
|
|
52
52
|
"modern-normalize": "^1.1.0",
|
|
53
53
|
"react-swipeable": "^7.0.0",
|
|
@@ -59,12 +59,15 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@size-limit/preset-small-lib": "^7.0.8",
|
|
62
|
+
"@types/node": "^18.11.16",
|
|
63
|
+
"@types/react": "^18.2.42",
|
|
62
64
|
"@types/tabbable": "^3.1.1",
|
|
63
65
|
"babel-loader": "^8.2.5",
|
|
64
|
-
"size-limit": "^7.0.8"
|
|
66
|
+
"size-limit": "^7.0.8",
|
|
67
|
+
"tslib": "^2.3.1"
|
|
65
68
|
},
|
|
66
69
|
"volta": {
|
|
67
70
|
"extends": "../../package.json"
|
|
68
71
|
},
|
|
69
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "d1e33c64330a0fc7b25930d7e86382efb9bd56ef"
|
|
70
73
|
}
|
|
@@ -4,9 +4,64 @@
|
|
|
4
4
|
// --------------------------------------------------------
|
|
5
5
|
|
|
6
6
|
// Default properties
|
|
7
|
-
--fs-checkbox-field-gap
|
|
7
|
+
--fs-checkbox-field-gap : var(--fs-spacing-1);
|
|
8
|
+
|
|
9
|
+
// Label
|
|
10
|
+
--fs-checkbox-field-label-color : var(--fs-color-text-light);
|
|
11
|
+
--fs-checkbox-field-label-size : var(--fs-text-size-1);
|
|
12
|
+
--fs-checkbox-field-label-weight : var(--fs-text-weight-regular);
|
|
13
|
+
--fs-checkbox-field-label-line-height : 1.42;
|
|
14
|
+
|
|
15
|
+
/* Error tokens */
|
|
16
|
+
--fs-checkbox-field-error-message-size : var(--fs-text-size-legend);
|
|
17
|
+
--fs-checkbox-field-error-message-line-height : 1.1;
|
|
18
|
+
--fs-checkbox-field-error-message-margin-top : var(--fs-spacing-0);
|
|
19
|
+
--fs-checkbox-field-error-message-color : var(--fs-color-danger-text);
|
|
20
|
+
--fs-checkbox-field-error-border-color : var(--fs-color-danger-border);
|
|
8
21
|
|
|
9
22
|
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
23
|
column-gap: var(--fs-checkbox-field-gap);
|
|
12
|
-
|
|
24
|
+
|
|
25
|
+
[data-fs-checkbox] {
|
|
26
|
+
flex-shrink: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[data-fs-checkbox-field-content] {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
[data-fs-checkbox-field-label] {
|
|
35
|
+
color: var(--fs-checkbox-field-label-color);
|
|
36
|
+
font-size: var(--fs-checkbox-field-label-size);
|
|
37
|
+
font-weight: var(--fs-checkbox-field-label-weight);
|
|
38
|
+
line-height: var(--fs-checkbox-field-label-line-height);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// --------------------------------------------------------
|
|
42
|
+
// Variants Styles
|
|
43
|
+
// --------------------------------------------------------
|
|
44
|
+
|
|
45
|
+
&[data-fs-checkbox-field-alignment='center'] {
|
|
46
|
+
align-items: center;
|
|
47
|
+
}
|
|
48
|
+
&[data-fs-checkbox-field-alignment='top'] {
|
|
49
|
+
align-items: flex-start;
|
|
50
|
+
}
|
|
51
|
+
&[data-fs-checkbox-field-alignment='bottom'] {
|
|
52
|
+
align-items: flex-end;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&[data-fs-checkbox-field-error='true'] {
|
|
56
|
+
[data-fs-checkbox-field-error-message] {
|
|
57
|
+
margin-top: var(--fs-checkbox-field-error-message-margin-top);
|
|
58
|
+
font-size: var(--fs-checkbox-field-error-message-size);
|
|
59
|
+
line-height: var(--fs-checkbox-field-error-message-line-height);
|
|
60
|
+
color: var(--fs-checkbox-field-error-message-color);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[data-fs-checkbox]:not(:disabled) {
|
|
64
|
+
border-color: var(--fs-checkbox-field-error-border-color);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -4,35 +4,48 @@
|
|
|
4
4
|
// --------------------------------------------------------
|
|
5
5
|
|
|
6
6
|
// Default properties
|
|
7
|
-
--fs-rating-gap
|
|
8
|
-
--fs-rating-color
|
|
7
|
+
--fs-rating-gap : var(--fs-spacing-0);
|
|
8
|
+
--fs-rating-color : var(--fs-color-main-2);
|
|
9
|
+
--fs-rating-color-empty : var(--fs-color-neutral-4);
|
|
9
10
|
|
|
10
11
|
// Icon
|
|
11
|
-
--fs-rating-icon-width
|
|
12
|
-
--fs-rating-icon-height
|
|
12
|
+
--fs-rating-icon-width : var(--fs-spacing-3);
|
|
13
|
+
--fs-rating-icon-height : var(--fs-rating-icon-width);
|
|
13
14
|
|
|
14
15
|
// Actionable
|
|
15
|
-
--fs-rating-actionable-gap
|
|
16
|
-
--fs-rating-actionable-icon-width
|
|
17
|
-
--fs-rating-actionable-icon-height
|
|
16
|
+
--fs-rating-actionable-gap : 0;
|
|
17
|
+
--fs-rating-actionable-icon-width : var(--fs-rating-icon-width);
|
|
18
|
+
--fs-rating-actionable-icon-height : var(--fs-rating-actionable-icon-width);
|
|
19
|
+
--fs-rating-actionable-icon-color : var(--fs-rating-color-empty);
|
|
20
|
+
--fs-rating-actionable-icon-color-selected : var(--fs-rating-color);
|
|
18
21
|
|
|
19
22
|
// --------------------------------------------------------
|
|
20
23
|
// Structural Styles
|
|
21
24
|
// --------------------------------------------------------
|
|
22
|
-
|
|
23
25
|
display: flex;
|
|
24
26
|
|
|
25
27
|
[data-fs-icon] {
|
|
26
|
-
color: var(--fs-rating-color);
|
|
27
28
|
width: var(--fs-rating-icon-width);
|
|
28
29
|
height: var(--fs-rating-icon-height);
|
|
30
|
+
color: var(--fs-rating-color);
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
[data-fs-rating-button] {
|
|
32
34
|
color: unset;
|
|
33
|
-
|
|
34
|
-
&[data-fs-button-
|
|
35
|
-
|
|
35
|
+
|
|
36
|
+
&[disabled] [data-fs-button-wrapper] {
|
|
37
|
+
background-color: transparent;
|
|
38
|
+
|
|
39
|
+
&:hover {
|
|
40
|
+
background-color: transparent;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&[data-fs-button-variant="tertiary"]:hover,
|
|
45
|
+
&[data-fs-button-variant="tertiary"]:focus,
|
|
46
|
+
&[data-fs-button-variant="tertiary"]:active {
|
|
47
|
+
color: unset;
|
|
48
|
+
}
|
|
36
49
|
}
|
|
37
50
|
|
|
38
51
|
[data-fs-rating-icon-wrapper] {
|
|
@@ -42,17 +55,21 @@
|
|
|
42
55
|
overflow: hidden;
|
|
43
56
|
}
|
|
44
57
|
|
|
45
|
-
svg[data-fs-rating-icon-outline] {
|
|
46
|
-
fill: none;
|
|
58
|
+
svg[data-fs-rating-icon-outline] {
|
|
59
|
+
fill: none;
|
|
47
60
|
}
|
|
48
61
|
|
|
49
|
-
[data-fs-rating-item] {
|
|
62
|
+
[data-fs-rating-item] {
|
|
63
|
+
position: relative;
|
|
64
|
+
fill: var(--fs-rating-color);
|
|
65
|
+
}
|
|
50
66
|
|
|
51
67
|
// --------------------------------------------------------
|
|
52
68
|
// Variants Styles
|
|
53
69
|
// --------------------------------------------------------
|
|
54
70
|
|
|
55
71
|
[data-fs-rating-item="empty"] svg[data-fs-icon] {
|
|
72
|
+
color: var(--fs-rating-color-empty);
|
|
56
73
|
fill: none;
|
|
57
74
|
}
|
|
58
75
|
|
|
@@ -66,10 +83,16 @@
|
|
|
66
83
|
|
|
67
84
|
&[data-fs-rating-actionable="true"] {
|
|
68
85
|
column-gap: var(--fs-rating-actionable-gap);
|
|
86
|
+
|
|
87
|
+
[data-fs-rating-item="full"] svg[data-fs-icon] {
|
|
88
|
+
color: var(--fs-rating-actionable-icon-color-selected);
|
|
89
|
+
fill: var(--fs-rating-actionable-icon-color-selected);
|
|
90
|
+
}
|
|
91
|
+
|
|
69
92
|
[data-fs-icon] {
|
|
70
93
|
width: var(--fs-rating-actionable-icon-width);
|
|
71
94
|
height: var(--fs-rating-actionable-icon-height);
|
|
95
|
+
color: var(--fs-rating-actionable-icon-color);
|
|
72
96
|
}
|
|
73
97
|
}
|
|
74
|
-
|
|
75
98
|
}
|