@pareto-engineering/design-system 4.0.0-alpha.18 → 4.0.0-alpha.21
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/cjs/a/ContentTree/ContentTree.js +8 -2
- package/dist/cjs/a/ContentTree/common/Tree/Tree.js +12 -5
- package/dist/cjs/a/ContentTree/styles.scss +24 -14
- package/dist/cjs/a/Conversation/Conversation.js +1 -1
- package/dist/cjs/a/Conversation/common/Message/Message.js +2 -3
- package/dist/cjs/a/Conversation/styles.scss +44 -28
- package/dist/cjs/a/SnapScroller/styles.scss +9 -4
- package/dist/cjs/b/Button/Button.js +4 -1
- package/dist/cjs/b/Button/styles.scss +22 -4
- package/dist/cjs/b/ThemeSelector/ThemeSelector.js +15 -22
- package/dist/cjs/b/ThemeSelector/styles.scss +2 -8
- package/dist/es/a/ContentTree/ContentTree.js +8 -2
- package/dist/es/a/ContentTree/common/Tree/Tree.js +12 -5
- package/dist/es/a/ContentTree/styles.scss +24 -14
- package/dist/es/a/Conversation/Conversation.js +1 -1
- package/dist/es/a/Conversation/common/Message/Message.js +2 -3
- package/dist/es/a/Conversation/styles.scss +44 -28
- package/dist/es/a/SnapScroller/styles.scss +9 -4
- package/dist/es/b/Button/Button.js +4 -1
- package/dist/es/b/Button/styles.scss +22 -4
- package/dist/es/b/ThemeSelector/ThemeSelector.js +15 -23
- package/dist/es/b/ThemeSelector/styles.scss +2 -8
- package/package.json +4 -4
- package/src/stories/a/Conversation.stories.jsx +5 -1
- package/src/ui/a/ContentTree/ContentTree.jsx +7 -3
- package/src/ui/a/ContentTree/common/Tree/Tree.jsx +19 -7
- package/src/ui/a/ContentTree/styles.scss +24 -14
- package/src/ui/a/Conversation/Conversation.jsx +3 -1
- package/src/ui/a/Conversation/common/Message/Message.jsx +3 -5
- package/src/ui/a/Conversation/styles.scss +44 -28
- package/src/ui/a/SnapScroller/styles.scss +9 -4
- package/src/ui/b/Button/Button.jsx +4 -1
- package/src/ui/b/Button/styles.scss +22 -4
- package/src/ui/b/ThemeSelector/ThemeSelector.jsx +8 -21
- package/src/ui/b/ThemeSelector/styles.scss +2 -8
- package/tests/__snapshots__/Storyshots.test.js.snap +1615 -949
|
@@ -20,7 +20,8 @@ $default-animation-time: .31s;
|
|
|
20
20
|
font-weight: 400;
|
|
21
21
|
justify-content: space-between;
|
|
22
22
|
padding: $default-padding;
|
|
23
|
-
transition: all .25s
|
|
23
|
+
transition: all .25s;
|
|
24
|
+
white-space: nowrap;//var(--theme-default-paragraph);
|
|
24
25
|
|
|
25
26
|
&.arrow-right {
|
|
26
27
|
&::after {
|
|
@@ -57,7 +58,10 @@ $default-animation-time: .31s;
|
|
|
57
58
|
&:not(:disabled) {
|
|
58
59
|
cursor: pointer;
|
|
59
60
|
|
|
60
|
-
&:hover
|
|
61
|
+
&:hover
|
|
62
|
+
:not(.#{bem.$modifier-gradient})
|
|
63
|
+
:not(.#{bem.$modifier-ghost})
|
|
64
|
+
:not(.#{bem.$modifier-simple}) {
|
|
61
65
|
background: var(--soft-x, var(--soft-#{$default-color}));
|
|
62
66
|
}
|
|
63
67
|
|
|
@@ -67,8 +71,18 @@ $default-animation-time: .31s;
|
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
&.#{bem.$modifier-gradient} {
|
|
70
|
-
background: linear-gradient(
|
|
71
|
-
|
|
74
|
+
background-image: linear-gradient(
|
|
75
|
+
to right,
|
|
76
|
+
var(--hard-x) 30%,
|
|
77
|
+
var(--x) 50%,
|
|
78
|
+
var(--hard-x) 100%
|
|
79
|
+
);
|
|
80
|
+
background-position: left;
|
|
81
|
+
background-size: 200% auto;
|
|
82
|
+
|
|
83
|
+
&:not(:disabled):hover {
|
|
84
|
+
background-position: right center;
|
|
85
|
+
}
|
|
72
86
|
}
|
|
73
87
|
|
|
74
88
|
&.#{bem.$modifier-compact} {
|
|
@@ -115,6 +129,10 @@ $default-animation-time: .31s;
|
|
|
115
129
|
color: var(--x, var(--#{$default-color}));
|
|
116
130
|
padding: 0;
|
|
117
131
|
|
|
132
|
+
> .#{bem.$modifier-underlined} {
|
|
133
|
+
text-decoration: underline;
|
|
134
|
+
}
|
|
135
|
+
|
|
118
136
|
&:disabled,
|
|
119
137
|
&:hover,
|
|
120
138
|
&:focus {
|
|
@@ -20,7 +20,6 @@ const ThemeSelector = ({
|
|
|
20
20
|
className:userClassName,
|
|
21
21
|
style,
|
|
22
22
|
themes,
|
|
23
|
-
iconMap,
|
|
24
23
|
}) => {
|
|
25
24
|
const {
|
|
26
25
|
userTheme,
|
|
@@ -37,9 +36,11 @@ const ThemeSelector = ({
|
|
|
37
36
|
},
|
|
38
37
|
[userTheme])
|
|
39
38
|
|
|
39
|
+
const themeText = userTheme && userTheme.charAt(0).toUpperCase() + userTheme.slice(1)
|
|
40
|
+
|
|
40
41
|
return (
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
// eslint-disable-next-line jsx-a11y/anchor-is-valid, jsx-a11y/no-static-element-interactions
|
|
43
|
+
<a
|
|
43
44
|
className={[
|
|
44
45
|
baseClassName,
|
|
45
46
|
componentClassName,
|
|
@@ -50,14 +51,10 @@ const ThemeSelector = ({
|
|
|
50
51
|
id={id}
|
|
51
52
|
style={style}
|
|
52
53
|
onClick={loopThemes}
|
|
54
|
+
onKeyDown={loopThemes}
|
|
53
55
|
>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
</span>
|
|
57
|
-
<span>
|
|
58
|
-
{ userTheme }
|
|
59
|
-
</span>
|
|
60
|
-
</button>
|
|
56
|
+
{themeText}
|
|
57
|
+
</a>
|
|
61
58
|
)
|
|
62
59
|
}
|
|
63
60
|
|
|
@@ -81,20 +78,10 @@ ThemeSelector.propTypes = {
|
|
|
81
78
|
* The themes and the order in which they appear
|
|
82
79
|
*/
|
|
83
80
|
themes:PropTypes.arrayOf(PropTypes.string),
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* A map of the theme names with the icons that represent them. Uses the default font icon.
|
|
87
|
-
*/
|
|
88
|
-
iconMap:PropTypes.objectOf(PropTypes.string),
|
|
89
|
-
|
|
90
81
|
}
|
|
91
82
|
|
|
92
83
|
ThemeSelector.defaultProps = {
|
|
93
|
-
themes
|
|
94
|
-
iconMap:{
|
|
95
|
-
dark :'d', // sun,
|
|
96
|
-
light:'T', // moon,
|
|
97
|
-
},
|
|
84
|
+
themes:['light', 'dark'],
|
|
98
85
|
}
|
|
99
86
|
|
|
100
87
|
export default ThemeSelector
|
|
@@ -2,14 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
@use "@pareto-engineering/bem";
|
|
4
4
|
|
|
5
|
-
$default-color:var(--x, var(--contrast));
|
|
6
|
-
|
|
7
5
|
.#{bem.$base}.theme-selector {
|
|
8
|
-
align-items: center;
|
|
9
|
-
background: transparent;
|
|
10
|
-
border: none;
|
|
11
|
-
color: $default-color;
|
|
12
6
|
cursor: pointer;
|
|
13
|
-
display:
|
|
14
|
-
|
|
7
|
+
display: block;
|
|
8
|
+
text-decoration: none;
|
|
15
9
|
}
|