@descope/web-components-ui 1.0.44 → 1.0.46
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.esm.js +180 -125
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/descope-button-index-js.js +1 -1
- package/dist/umd/descope-logo-index-js.js +1 -0
- package/dist/umd/index.js +1 -1
- package/package.json +6 -6
- package/src/components/descope-button/Button.js +3 -3
- package/src/components/descope-logo/Logo.js +57 -0
- package/src/components/descope-logo/index.js +5 -0
- package/src/dev/index.js +2 -7
- package/src/theme/components/index.js +3 -1
- package/src/theme/components/logo.js +9 -0
- package/src/theme/components/textField.js +1 -1
@@ -0,0 +1,57 @@
|
|
1
|
+
import {
|
2
|
+
getComponentName,
|
3
|
+
createStyleMixin,
|
4
|
+
draggableMixin,
|
5
|
+
compose,
|
6
|
+
componentNameValidationMixin
|
7
|
+
} from '../../componentsHelpers';
|
8
|
+
|
9
|
+
export const componentName = getComponentName('logo');
|
10
|
+
|
11
|
+
let style
|
12
|
+
const getStyle = () => style;
|
13
|
+
|
14
|
+
class RawLogo extends HTMLElement {
|
15
|
+
static get componentName() {
|
16
|
+
return componentName;
|
17
|
+
}
|
18
|
+
constructor() {
|
19
|
+
super();
|
20
|
+
const template = document.createElement('template');
|
21
|
+
template.innerHTML = `
|
22
|
+
<style>
|
23
|
+
${getStyle()}
|
24
|
+
</style>
|
25
|
+
<div></div>`;
|
26
|
+
|
27
|
+
this.attachShadow({ mode: 'open' });
|
28
|
+
this.shadowRoot.appendChild(template.content.cloneNode(true));
|
29
|
+
|
30
|
+
this.baseSelector = ':host > div';
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
const Logo = compose(
|
35
|
+
createStyleMixin({
|
36
|
+
mappings: {
|
37
|
+
height: {},
|
38
|
+
width: {},
|
39
|
+
url: {},
|
40
|
+
fallbackUrl: {},
|
41
|
+
}
|
42
|
+
}),
|
43
|
+
draggableMixin,
|
44
|
+
componentNameValidationMixin
|
45
|
+
)(RawLogo);
|
46
|
+
|
47
|
+
style = `
|
48
|
+
:host {
|
49
|
+
display: inline-block;
|
50
|
+
}
|
51
|
+
:host > div {
|
52
|
+
display: inline-block;
|
53
|
+
content: var(${Logo.cssVarList.url}, var(${Logo.cssVarList.fallbackUrl}));
|
54
|
+
}
|
55
|
+
`
|
56
|
+
|
57
|
+
export default Logo;
|
package/src/dev/index.js
CHANGED
@@ -1,7 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
// this file is used for exposing stuff to the dev env only
|
5
|
-
|
6
|
-
export const getDefaultThemeStyles = (themeName) =>
|
7
|
-
themeToStyle(theme, themeName);
|
1
|
+
export {default as defaultTheme} from '../theme';
|
2
|
+
export { themeToStyle } from '../themeHelpers';
|
@@ -7,6 +7,7 @@ import textArea from './textArea';
|
|
7
7
|
import checkbox from './checkbox';
|
8
8
|
import switchToggle from './switchToggle';
|
9
9
|
import container from './container';
|
10
|
+
import logo from './logo';
|
10
11
|
|
11
12
|
export default {
|
12
13
|
button,
|
@@ -17,5 +18,6 @@ export default {
|
|
17
18
|
textArea,
|
18
19
|
checkbox,
|
19
20
|
switchToggle,
|
20
|
-
container
|
21
|
+
container,
|
22
|
+
logo
|
21
23
|
};
|