@descope/web-components-ui 1.0.83 → 1.0.85
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.esm.js +417 -313
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/18.js +577 -0
- package/dist/umd/{233.js.LICENSE.txt → 18.js.LICENSE.txt} +6 -0
- package/dist/umd/803.js +1 -0
- package/dist/umd/988.js +1 -1
- package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +1 -0
- package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -0
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -0
- package/dist/umd/descope-combo-box-index-js.js +1 -1
- package/dist/umd/descope-container-index-js.js +1 -1
- package/dist/umd/index.js +1 -1
- package/package.json +1 -1
- package/src/components/boolean-fields/booleanFieldMixin.js +38 -0
- package/src/components/boolean-fields/commonStyles.js +59 -0
- package/src/components/{descope-checkbox/descope-checkbox-internal/CheckboxInternal.js → boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js} +3 -3
- package/src/components/boolean-fields/descope-boolean-field-internal/index.js +3 -0
- package/src/components/{descope-checkbox → boolean-fields/descope-checkbox}/Checkbox.js +7 -95
- package/src/components/{descope-checkbox → boolean-fields/descope-checkbox}/index.js +3 -1
- package/src/components/boolean-fields/descope-switch-toggle/SwitchToggle.js +124 -0
- package/src/components/boolean-fields/descope-switch-toggle/index.js +8 -0
- package/src/components/descope-container/Container.js +2 -1
- package/src/index.js +2 -2
- package/src/index.umd.js +5 -0
- package/src/mixins/proxyInputMixin.js +2 -2
- package/src/theme/components/checkbox.js +3 -6
- package/src/theme/components/container.js +1 -0
- package/src/theme/components/switchToggle.js +71 -4
- package/dist/umd/233.js +0 -577
- package/dist/umd/786.js +0 -2
- package/dist/umd/786.js.LICENSE.txt +0 -17
- package/dist/umd/descope-checkbox-descope-checkbox-internal-index-js.js +0 -1
- package/dist/umd/descope-checkbox-index-js.js +0 -1
- package/dist/umd/descope-switch-toggle-index-js.js +0 -1
- package/src/components/descope-checkbox/descope-checkbox-internal/index.js +0 -3
- package/src/components/descope-switch-toggle/SwitchToggle.js +0 -89
- package/src/components/descope-switch-toggle/index.js +0 -6
@@ -1,89 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
createStyleMixin,
|
3
|
-
draggableMixin,
|
4
|
-
createProxy,
|
5
|
-
proxyInputMixin,
|
6
|
-
componentNameValidationMixin,
|
7
|
-
} from '../../mixins';
|
8
|
-
import { compose } from '../../helpers';
|
9
|
-
import { getComponentName } from '../../helpers/componentHelpers';
|
10
|
-
|
11
|
-
export const componentName = getComponentName('switch-toggle');
|
12
|
-
|
13
|
-
let overrides = ``;
|
14
|
-
|
15
|
-
const SwitchToggle = compose(
|
16
|
-
createStyleMixin({
|
17
|
-
mappings: {
|
18
|
-
width: { selector: () => ':host' },
|
19
|
-
cursor: [{}, { selector: '> label' }]
|
20
|
-
}
|
21
|
-
}),
|
22
|
-
draggableMixin,
|
23
|
-
proxyInputMixin,
|
24
|
-
componentNameValidationMixin
|
25
|
-
)(
|
26
|
-
createProxy({
|
27
|
-
slots: [],
|
28
|
-
wrappedEleName: 'vaadin-checkbox',
|
29
|
-
style: () => overrides,
|
30
|
-
excludeAttrsSync: ['tabindex'],
|
31
|
-
componentName
|
32
|
-
})
|
33
|
-
);
|
34
|
-
|
35
|
-
overrides = `
|
36
|
-
:host {
|
37
|
-
display: inline-block;
|
38
|
-
}
|
39
|
-
|
40
|
-
:host {
|
41
|
-
--margin: 7px;
|
42
|
-
--width: var(${SwitchToggle.cssVarList.width});
|
43
|
-
--height: calc(var(--width) / 2);
|
44
|
-
--radius: var(--height);
|
45
|
-
--knobSize: calc(var(--height) - 5px);
|
46
|
-
--bgColor: #fff;
|
47
|
-
--knobBgColor: #000;
|
48
|
-
}
|
49
|
-
vaadin-checkbox : {
|
50
|
-
width: 100%;
|
51
|
-
}
|
52
|
-
vaadin-checkbox>label {
|
53
|
-
cursor: pointer;
|
54
|
-
border: 1px solid;
|
55
|
-
text-indent: -99999px;
|
56
|
-
display: block;
|
57
|
-
position: relative;
|
58
|
-
width: var(--width);
|
59
|
-
height: var(--height);
|
60
|
-
background: var(--bgColor);
|
61
|
-
border-radius: var(--radius);
|
62
|
-
}
|
63
|
-
vaadin-checkbox>label::after {
|
64
|
-
content: '';
|
65
|
-
position: absolute;
|
66
|
-
transition: 0.3s;
|
67
|
-
top: var(--margin);
|
68
|
-
left: var(--margin);
|
69
|
-
width: var(--knobSize);
|
70
|
-
height: var(--knobSize);
|
71
|
-
background: var(--knobBgColor);
|
72
|
-
border-radius: var(--knobSize);
|
73
|
-
}
|
74
|
-
vaadin-checkbox::part(checkbox) {
|
75
|
-
height: 0;
|
76
|
-
width: 0;
|
77
|
-
visibility: hidden;
|
78
|
-
margin: 0;
|
79
|
-
}
|
80
|
-
vaadin-checkbox[checked]>label::after {
|
81
|
-
transform: translateX(-100%);
|
82
|
-
left: calc(100% - var(--margin));
|
83
|
-
}
|
84
|
-
vaadin-checkbox[active]>label::after {
|
85
|
-
width: calc(var(--knobSize) + 15px);
|
86
|
-
}
|
87
|
-
`;
|
88
|
-
|
89
|
-
export default SwitchToggle;
|