@lumx/react 3.9.6-alpha.2 → 3.9.6-alpha.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/package.json
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"url": "https://github.com/lumapps/design-system/issues"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@lumx/core": "^3.9.6-alpha.
|
|
10
|
-
"@lumx/icons": "^3.9.6-alpha.
|
|
9
|
+
"@lumx/core": "^3.9.6-alpha.3",
|
|
10
|
+
"@lumx/icons": "^3.9.6-alpha.3",
|
|
11
11
|
"@popperjs/core": "^2.5.4",
|
|
12
12
|
"body-scroll-lock": "^3.1.5",
|
|
13
13
|
"classnames": "^2.3.2",
|
|
@@ -111,5 +111,5 @@
|
|
|
111
111
|
"build:storybook": "storybook build"
|
|
112
112
|
},
|
|
113
113
|
"sideEffects": false,
|
|
114
|
-
"version": "3.9.6-alpha.
|
|
114
|
+
"version": "3.9.6-alpha.3"
|
|
115
115
|
}
|
|
@@ -22,9 +22,9 @@ const buttonEmphasis = [Emphasis.high, Emphasis.medium, Emphasis.low];
|
|
|
22
22
|
// Combination of props that should be avoided
|
|
23
23
|
const excludeCombination = ({ isSelected, emphasis, hasBackground }: any) => {
|
|
24
24
|
// isSelected is only supported in medium emphasis
|
|
25
|
-
if (isSelected && emphasis && emphasis !==
|
|
25
|
+
if (isSelected && emphasis && emphasis !== Emphasis.medium && emphasis !== Emphasis.low) return true;
|
|
26
26
|
// hasBackground is only supported in low emphasis
|
|
27
|
-
if (hasBackground && emphasis && emphasis !==
|
|
27
|
+
if (hasBackground && emphasis && emphasis !== Emphasis.low) return true;
|
|
28
28
|
return false;
|
|
29
29
|
};
|
|
30
30
|
|
|
@@ -31,7 +31,7 @@ export interface BaseButtonProps
|
|
|
31
31
|
href?: string;
|
|
32
32
|
/** Whether the component is disabled or not. */
|
|
33
33
|
isDisabled?: boolean;
|
|
34
|
-
/** Whether the component is selected or not. */
|
|
34
|
+
/** Whether the component is selected or not (unsupported in `high` emphasis). */
|
|
35
35
|
isSelected?: boolean;
|
|
36
36
|
/** Native button name property. */
|
|
37
37
|
name?: string;
|
|
@@ -133,7 +133,9 @@ export function withTheming<P extends PropertyTree>({
|
|
|
133
133
|
return (varName: string) =>
|
|
134
134
|
// Has the given arg with value
|
|
135
135
|
varName.match(new RegExp(`${argName}-${argValue}`)) ||
|
|
136
|
-
(argName === 'emphasis' &&
|
|
136
|
+
(argName === 'emphasis' &&
|
|
137
|
+
(argValue === 'medium' || argValue === 'low') &&
|
|
138
|
+
varName.match(/emphasis-selected/)) ||
|
|
137
139
|
// Or does not have the arg at all
|
|
138
140
|
!varName.match(new RegExp(`${argName}-\\w+`));
|
|
139
141
|
}
|