@descope/web-components-ui 1.0.83 → 1.0.85

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.
Files changed (37) hide show
  1. package/dist/index.esm.js +417 -313
  2. package/dist/index.esm.js.map +1 -1
  3. package/dist/umd/18.js +577 -0
  4. package/dist/umd/{233.js.LICENSE.txt → 18.js.LICENSE.txt} +6 -0
  5. package/dist/umd/803.js +1 -0
  6. package/dist/umd/988.js +1 -1
  7. package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +1 -0
  8. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -0
  9. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -0
  10. package/dist/umd/descope-combo-box-index-js.js +1 -1
  11. package/dist/umd/descope-container-index-js.js +1 -1
  12. package/dist/umd/index.js +1 -1
  13. package/package.json +1 -1
  14. package/src/components/boolean-fields/booleanFieldMixin.js +38 -0
  15. package/src/components/boolean-fields/commonStyles.js +59 -0
  16. package/src/components/{descope-checkbox/descope-checkbox-internal/CheckboxInternal.js → boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js} +3 -3
  17. package/src/components/boolean-fields/descope-boolean-field-internal/index.js +3 -0
  18. package/src/components/{descope-checkbox → boolean-fields/descope-checkbox}/Checkbox.js +7 -95
  19. package/src/components/{descope-checkbox → boolean-fields/descope-checkbox}/index.js +3 -1
  20. package/src/components/boolean-fields/descope-switch-toggle/SwitchToggle.js +124 -0
  21. package/src/components/boolean-fields/descope-switch-toggle/index.js +8 -0
  22. package/src/components/descope-container/Container.js +2 -1
  23. package/src/index.js +2 -2
  24. package/src/index.umd.js +5 -0
  25. package/src/mixins/proxyInputMixin.js +2 -2
  26. package/src/theme/components/checkbox.js +3 -6
  27. package/src/theme/components/container.js +1 -0
  28. package/src/theme/components/switchToggle.js +71 -4
  29. package/dist/umd/233.js +0 -577
  30. package/dist/umd/786.js +0 -2
  31. package/dist/umd/786.js.LICENSE.txt +0 -17
  32. package/dist/umd/descope-checkbox-descope-checkbox-internal-index-js.js +0 -1
  33. package/dist/umd/descope-checkbox-index-js.js +0 -1
  34. package/dist/umd/descope-switch-toggle-index-js.js +0 -1
  35. package/src/components/descope-checkbox/descope-checkbox-internal/index.js +0 -3
  36. package/src/components/descope-switch-toggle/SwitchToggle.js +0 -89
  37. 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;
@@ -1,6 +0,0 @@
1
- import '@vaadin/checkbox';
2
- import SwitchToggle, { componentName } from './SwitchToggle';
3
-
4
- customElements.define(componentName, SwitchToggle);
5
-
6
- export { SwitchToggle };