@descope/web-components-ui 1.0.294 → 1.0.296

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. package/dist/cjs/index.cjs.js +1147 -920
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +1141 -913
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/1224.js +1 -1
  6. package/dist/umd/1438.js +16 -9
  7. package/dist/umd/1438.js.LICENSE.txt +12 -0
  8. package/dist/umd/1612.js +338 -0
  9. package/dist/umd/1621.js +1 -1
  10. package/dist/umd/2362.js +129 -0
  11. package/dist/umd/3830.js +2 -0
  12. package/dist/umd/{3003.js.LICENSE.txt → 3830.js.LICENSE.txt} +12 -0
  13. package/dist/umd/3951.js +116 -4
  14. package/dist/umd/3951.js.LICENSE.txt +18 -0
  15. package/dist/umd/{9211.js → 4024.js} +5 -5
  16. package/dist/umd/{2775.js → 4028.js} +10 -10
  17. package/dist/umd/4028.js.LICENSE.txt +23 -0
  18. package/dist/umd/4052.js +338 -0
  19. package/dist/umd/4392.js +1 -0
  20. package/dist/umd/4746.js +124 -0
  21. package/dist/umd/{6091.js.LICENSE.txt → 4746.js.LICENSE.txt} +6 -0
  22. package/dist/umd/4978.js +1 -0
  23. package/dist/umd/{4595.js → 5135.js} +93 -5
  24. package/dist/umd/{2775.js.LICENSE.txt → 5135.js.LICENSE.txt} +2 -2
  25. package/dist/umd/5517.js +1 -1
  26. package/dist/umd/5806.js +4 -4
  27. package/dist/umd/5910.js +1 -1
  28. package/dist/umd/63.js +147 -1
  29. package/dist/umd/63.js.LICENSE.txt +13 -1
  30. package/dist/umd/6594.js +2 -0
  31. package/dist/umd/{1940.js.LICENSE.txt → 6594.js.LICENSE.txt} +1 -1
  32. package/dist/umd/6770.js +4 -4
  33. package/dist/umd/7056.js +376 -5
  34. package/dist/umd/7056.js.LICENSE.txt +6 -0
  35. package/dist/umd/7164.js +148 -0
  36. package/dist/umd/{2106.js.LICENSE.txt → 7164.js.LICENSE.txt} +1 -7
  37. package/dist/umd/7531.js +1 -1
  38. package/dist/umd/7911.js +4 -4
  39. package/dist/umd/7911.js.LICENSE.txt +6 -0
  40. package/dist/umd/{3092.js → 8191.js} +40 -5
  41. package/dist/umd/8866.js +97 -5
  42. package/dist/umd/8866.js.LICENSE.txt +12 -0
  43. package/dist/umd/9092.js +440 -12
  44. package/dist/umd/9092.js.LICENSE.txt +6 -0
  45. package/dist/umd/{1940.js → 9314.js} +126 -7
  46. package/dist/umd/9314.js.LICENSE.txt +11 -0
  47. package/dist/umd/9423.js +608 -0
  48. package/dist/umd/9423.js.LICENSE.txt +23 -0
  49. package/dist/umd/9562.js +338 -0
  50. package/dist/umd/9562.js.LICENSE.txt +11 -0
  51. package/dist/umd/DescopeDev.js +1 -0
  52. package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +1 -1
  53. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +2 -1
  54. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +2 -1
  55. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
  56. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-internal-index-js.js +1 -1
  57. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
  58. package/dist/umd/button-selection-group-fields-descope-button-selection-group-internal-index-js.js +1 -1
  59. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
  60. package/dist/umd/descope-avatar-index-js.js +1 -1
  61. package/dist/umd/descope-badge-index-js.js +1 -1
  62. package/dist/umd/descope-button-index-js.js +338 -1
  63. package/dist/umd/descope-button-index-js.js.LICENSE.txt +11 -0
  64. package/dist/umd/descope-combo-box-index-js.js +113 -1
  65. package/dist/umd/descope-container-index-js.js +1 -1
  66. package/dist/umd/descope-date-picker-index-js.js +1 -1
  67. package/dist/umd/descope-divider-index-js.js +1 -1
  68. package/dist/umd/descope-email-field-index-js.js +54 -1
  69. package/dist/umd/descope-email-field-index-js.js.LICENSE.txt +11 -0
  70. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +90 -1
  71. package/dist/umd/{4595.js.LICENSE.txt → descope-grid-descope-grid-custom-column-index-js.js.LICENSE.txt} +6 -0
  72. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +2 -1
  73. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.LICENSE.txt +17 -0
  74. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +90 -1
  75. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.LICENSE.txt +17 -0
  76. package/dist/umd/descope-grid-index-js.js +1 -1
  77. package/dist/umd/descope-image-index-js.js +1 -1
  78. package/dist/umd/descope-link-index-js.js +1 -1
  79. package/dist/umd/descope-loader-linear-index-js.js +1 -1
  80. package/dist/umd/descope-loader-radial-index-js.js +1 -1
  81. package/dist/umd/descope-logo-index-js.js +1 -1
  82. package/dist/umd/descope-modal-index-js.js +1 -1
  83. package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
  84. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  85. package/dist/umd/descope-new-password-index-js.js +1 -1
  86. package/dist/umd/descope-notification-descope-notification-card-index-js.js +1 -1
  87. package/dist/umd/descope-notification-index-js.js +1 -1
  88. package/dist/umd/descope-notp-image-index-js.js +1 -1
  89. package/dist/umd/descope-number-field-index-js.js +1 -1
  90. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +1 -1
  91. package/dist/umd/descope-passcode-index-js.js +37 -1
  92. package/dist/umd/descope-passcode-index-js.js.LICENSE.txt +11 -0
  93. package/dist/umd/descope-password-index-js.js +1 -1
  94. package/dist/umd/descope-policy-validation-index-js.js +1 -1
  95. package/dist/umd/descope-recaptcha-index-js.js +1 -1
  96. package/dist/umd/descope-text-area-index-js.js +1 -1
  97. package/dist/umd/descope-text-field-index-js.js +37 -1
  98. package/dist/umd/descope-text-field-index-js.js.LICENSE.txt +11 -0
  99. package/dist/umd/descope-text-index-js.js +1 -1
  100. package/dist/umd/descope-totp-image-index-js.js +1 -1
  101. package/dist/umd/descope-upload-file-index-js.js +1 -1
  102. package/dist/umd/descope-user-attribute-index-js.js +1 -1
  103. package/dist/umd/descope-user-auth-method-index-js.js +1 -0
  104. package/dist/umd/index.js +1 -1
  105. package/dist/umd/mapping-fields-descope-mappings-field-descope-mapping-item-index-js.js +1 -1
  106. package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js +1 -1
  107. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -126
  108. package/dist/umd/mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js.js +1 -1
  109. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
  110. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
  111. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  112. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +37 -1
  113. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.LICENSE.txt +11 -0
  114. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
  115. package/package.json +21 -2
  116. package/src/components/descope-user-attribute/UserAttributeClass.js +13 -0
  117. package/src/components/descope-user-auth-method/UserAuthMethodClass.js +202 -0
  118. package/src/components/descope-user-auth-method/green-v.svg +3 -0
  119. package/src/components/descope-user-auth-method/index.js +9 -0
  120. package/src/dev/index.js +1 -0
  121. package/src/index.cjs.js +1 -0
  122. package/src/index.js +1 -0
  123. package/src/mixins/normalizeBooleanAttributesMixin.js +1 -1
  124. package/src/theme/components/index.js +2 -0
  125. package/src/theme/components/userAuthMethod.js +19 -0
  126. package/dist/umd/1000.js +0 -1
  127. package/dist/umd/1037.js +0 -2
  128. package/dist/umd/1721.js +0 -1
  129. package/dist/umd/2066.js +0 -2
  130. package/dist/umd/2106.js +0 -73
  131. package/dist/umd/2269.js +0 -2
  132. package/dist/umd/2269.js.LICENSE.txt +0 -5
  133. package/dist/umd/2481.js +0 -1
  134. package/dist/umd/262.js +0 -2
  135. package/dist/umd/262.js.LICENSE.txt +0 -5
  136. package/dist/umd/3003.js +0 -2
  137. package/dist/umd/3208.js +0 -2
  138. package/dist/umd/3208.js.LICENSE.txt +0 -5
  139. package/dist/umd/322.js +0 -90
  140. package/dist/umd/322.js.LICENSE.txt +0 -5
  141. package/dist/umd/3249.js +0 -2
  142. package/dist/umd/3249.js.LICENSE.txt +0 -5
  143. package/dist/umd/3373.js +0 -2
  144. package/dist/umd/3373.js.LICENSE.txt +0 -5
  145. package/dist/umd/3585.js +0 -1
  146. package/dist/umd/3878.js +0 -1
  147. package/dist/umd/4201.js +0 -1
  148. package/dist/umd/422.js +0 -2
  149. package/dist/umd/422.js.LICENSE.txt +0 -5
  150. package/dist/umd/4226.js +0 -114
  151. package/dist/umd/4447.js +0 -1
  152. package/dist/umd/4567.js +0 -1
  153. package/dist/umd/4577.js +0 -1
  154. package/dist/umd/4803.js +0 -1
  155. package/dist/umd/4905.js +0 -2
  156. package/dist/umd/4905.js.LICENSE.txt +0 -5
  157. package/dist/umd/4946.js +0 -2
  158. package/dist/umd/4946.js.LICENSE.txt +0 -5
  159. package/dist/umd/6091.js +0 -124
  160. package/dist/umd/6606.js +0 -17
  161. package/dist/umd/6687.js +0 -9
  162. package/dist/umd/6687.js.LICENSE.txt +0 -5
  163. package/dist/umd/6977.js +0 -2
  164. package/dist/umd/6977.js.LICENSE.txt +0 -5
  165. package/dist/umd/7044.js +0 -1
  166. package/dist/umd/7583.js +0 -113
  167. package/dist/umd/8623.js +0 -2
  168. package/dist/umd/8623.js.LICENSE.txt +0 -5
  169. package/dist/umd/8725.js +0 -37
  170. package/dist/umd/9189.js +0 -2
  171. package/dist/umd/9189.js.LICENSE.txt +0 -5
  172. package/dist/umd/9211.js.LICENSE.txt +0 -5
  173. package/dist/umd/9214.js +0 -1
  174. package/dist/umd/9320.js +0 -2
  175. package/dist/umd/9320.js.LICENSE.txt +0 -5
  176. package/dist/umd/9383.js +0 -94
  177. package/dist/umd/9434.js +0 -1
  178. package/dist/umd/9437.js +0 -19
  179. package/dist/umd/9437.js.LICENSE.txt +0 -5
  180. package/dist/umd/9680.js +0 -2
  181. package/dist/umd/9680.js.LICENSE.txt +0 -5
  182. package/dist/umd/9789.js +0 -1
  183. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.LICENSE.txt +0 -5
  184. /package/dist/umd/{3092.js.LICENSE.txt → 1612.js.LICENSE.txt} +0 -0
  185. /package/dist/umd/{6606.js.LICENSE.txt → 2362.js.LICENSE.txt} +0 -0
  186. /package/dist/umd/{4226.js.LICENSE.txt → 4024.js.LICENSE.txt} +0 -0
  187. /package/dist/umd/{8725.js.LICENSE.txt → 4052.js.LICENSE.txt} +0 -0
  188. /package/dist/umd/{9383.js.LICENSE.txt → 8191.js.LICENSE.txt} +0 -0
  189. /package/dist/umd/{1037.js.LICENSE.txt → boolean-fields-descope-checkbox-index-js.js.LICENSE.txt} +0 -0
  190. /package/dist/umd/{2066.js.LICENSE.txt → boolean-fields-descope-switch-toggle-index-js.js.LICENSE.txt} +0 -0
  191. /package/dist/umd/{7583.js.LICENSE.txt → descope-combo-box-index-js.js.LICENSE.txt} +0 -0
@@ -0,0 +1,202 @@
1
+ import { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';
2
+ import { createBaseClass } from '../../baseClasses/createBaseClass';
3
+ import { compose } from '../../helpers';
4
+ import { getComponentName } from '../../helpers/componentHelpers';
5
+ import greenVIcon from './green-v.svg';
6
+ import { TextClass } from '../descope-text/TextClass';
7
+ import { ButtonClass } from '../descope-button/ButtonClass';
8
+ import { BadgeClass } from '../descope-badge/BadgeClass';
9
+
10
+ export const componentName = getComponentName('user-auth-method');
11
+ class RawUserAuthMethod extends createBaseClass({
12
+ componentName,
13
+ baseSelector: ':host > .root',
14
+ }) {
15
+ constructor() {
16
+ super();
17
+
18
+ this.attachShadow({ mode: 'open' }).innerHTML = `
19
+ <style>
20
+ :host {
21
+ display: inline-flex;
22
+ }
23
+
24
+ vaadin-icon {
25
+ color: currentcolor;
26
+ }
27
+
28
+ .root {
29
+ display: flex;
30
+ width: 100%;
31
+ height: 100%;
32
+ align-items: center;
33
+ }
34
+
35
+ .btn-wrapper {
36
+ display: flex;
37
+ justify-content: space-between;
38
+ align-items: center;
39
+ flex-grow: 0;
40
+ }
41
+
42
+ .text-wrapper {
43
+ display: flex;
44
+ align-items: center;
45
+ flex-grow: 1;
46
+ }
47
+
48
+ descope-text::part(text-wrapper) {
49
+ text-overflow: ellipsis;
50
+ overflow: hidden;
51
+ white-space: nowrap;
52
+ width: initial;
53
+ }
54
+
55
+ descope-text {
56
+ display: inline-flex;
57
+ }
58
+
59
+ .fulfilled-indicator {
60
+ width: 1em;
61
+ height: 1em;
62
+ display: flex;
63
+ align-items: center;
64
+ padding-inline-end: 1em;
65
+ }
66
+
67
+ .hidden {
68
+ display: none;
69
+ }
70
+
71
+ .hidden-btn {
72
+ width: 0;
73
+ overflow: hidden;
74
+ }
75
+
76
+ slot[name="method-icon"]{
77
+ display: inline-flex;
78
+ align-items: center;
79
+ }
80
+ </style>
81
+
82
+
83
+ <div class="root">
84
+ <div class="text-wrapper">
85
+ <slot name="method-icon"></slot>
86
+ <descope-text st-text-align="auto" data-id="label-text" variant="body1" mode="primary"></descope-text>
87
+ </div>
88
+
89
+ <div class="btn-wrapper">
90
+ <descope-button size="sm" variant="link" mode="primary">
91
+ <slot name="button-icon"></slot>
92
+ </descope-button>
93
+ <div class="fulfilled-indicator">
94
+ <vaadin-icon src=${greenVIcon}></vaadin-icon>
95
+ </div>
96
+ <descope-button class="hidden-btn" size="sm" variant="link" mode="primary"></descope-button>
97
+ </div>
98
+ </div>
99
+ `;
100
+
101
+ this.button = this.shadowRoot.querySelector('descope-button');
102
+ this.fulfilledIndicator = this.shadowRoot.querySelector('.fulfilled-indicator');
103
+ this.labelText = this.shadowRoot.querySelector('descope-text[data-id="label-text"]');
104
+ }
105
+
106
+ onLabelChange() {
107
+ this.labelText.innerText = this.label;
108
+ this.labelText.setAttribute('title', this.label);
109
+ }
110
+
111
+ onButtonLabelChange() {
112
+ let textSpanEle = this.button.querySelector('span');
113
+
114
+ if (this.buttonLabel) {
115
+ if (!textSpanEle) {
116
+ textSpanEle = document.createElement('span');
117
+ this.button.appendChild(textSpanEle);
118
+ }
119
+ textSpanEle.innerText = this.buttonLabel;
120
+ } else if (textSpanEle) {
121
+ this.button.removeChild(textSpanEle);
122
+ }
123
+ }
124
+
125
+ onFulfilledChange() {
126
+ this.button.classList.toggle('hidden', this.isFulfilled);
127
+ this.fulfilledIndicator.classList.toggle('hidden', !this.isFulfilled);
128
+ }
129
+
130
+ get label() {
131
+ return this.getAttribute('label') || '';
132
+ }
133
+
134
+ get buttonLabel() {
135
+ return this.getAttribute('button-label') || '';
136
+ }
137
+
138
+ get isFulfilled() {
139
+ return this.getAttribute('fulfilled') === 'true';
140
+ }
141
+
142
+ init() {
143
+ this.onLabelChange();
144
+ this.onButtonLabelChange();
145
+ this.onFulfilledChange();
146
+
147
+ this.button.addEventListener('click', () =>
148
+ this.dispatchEvent(new CustomEvent('button-clicked', { bubbles: true, composed: true }))
149
+ );
150
+ }
151
+
152
+ static get observedAttributes() {
153
+ return ['label', 'fulfilled'].concat(super.observedAttributes);
154
+ }
155
+
156
+ attributeChangedCallback(name, oldValue, newValue) {
157
+ super.attributeChangedCallback?.(name, oldValue, newValue);
158
+ if (oldValue === newValue) {
159
+ return;
160
+ }
161
+
162
+ if (name === 'label') {
163
+ this.onLabelChange();
164
+ } else if (name === 'fulfilled') {
165
+ this.onFulfilledChange();
166
+ } else if (name === 'button-label') {
167
+ this.onButtonLabelChange();
168
+ }
169
+ }
170
+ }
171
+
172
+ const { host, textField, buttons, badge, textWrapper, methodIconSlot } = {
173
+ host: { selector: () => ':host' },
174
+ textField: { selector: 'descope-text' },
175
+ buttons: { selector: 'descope-button' },
176
+ badge: { selector: 'descope-badge' },
177
+ textWrapper: { selector: ' .text-wrapper' },
178
+ methodIconSlot: { selector: 'slot[name="method-icon"]' },
179
+ };
180
+
181
+ export const UserAuthMethodClass = compose(
182
+ createStyleMixin({
183
+ mappings: {
184
+ hostWidth: { ...host, property: 'width' },
185
+ hostMinWidth: { ...host, property: 'min-width' },
186
+ hostDirection: [
187
+ { ...host, property: 'direction' },
188
+ { ...textField, property: TextClass.cssVarList.hostDirection },
189
+ { ...buttons, property: ButtonClass.cssVarList.hostDirection },
190
+ { ...badge, property: BadgeClass.cssVarList.hostDirection },
191
+ ],
192
+ labelTextWidth: { ...textField, property: 'width' },
193
+ itemsGap: [{ property: 'gap' }, { ...textWrapper, property: 'gap' }],
194
+ iconSize: [
195
+ { ...methodIconSlot, property: 'width' },
196
+ { ...methodIconSlot, property: 'height' },
197
+ ],
198
+ },
199
+ }),
200
+ draggableMixin,
201
+ componentNameValidationMixin
202
+ )(RawUserAuthMethod);
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M8 0C3.6 0 0 3.6 0 8C0 12.4 3.6 16 8 16C12.4 16 16 12.4 16 8C16 3.6 12.4 0 8 0ZM7.1 11.7L2.9 7.6L4.3 6.2L7 8.9L12 4L13.4 5.4L7.1 11.7Z" fill="#4CAF50"/>
3
+ </svg>
@@ -0,0 +1,9 @@
1
+ import { componentName, UserAuthMethodClass } from './UserAuthMethodClass';
2
+ import '../descope-text';
3
+ import '../descope-button';
4
+ import '../descope-badge';
5
+ import '@vaadin/icon';
6
+
7
+ customElements.define(componentName, UserAuthMethodClass);
8
+
9
+ export { UserAuthMethodClass };
package/src/dev/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export { defaultTheme } from '../theme';
2
+ export { default as darkTheme } from '../darkTheme';
2
3
  export { themeToStyle } from '../helpers/themeHelpers';
package/src/index.cjs.js CHANGED
@@ -39,6 +39,7 @@ export { BadgeClass } from './components/descope-badge/BadgeClass';
39
39
  export { MultiSelectComboBoxClass } from './components/descope-multi-select-combo-box/MultiSelectComboBoxClass';
40
40
  export { AvatarClass } from './components/descope-avatar/AvatarClass';
41
41
  export { UserAttributeClass } from './components/descope-user-attribute/UserAttributeClass';
42
+ export { UserAuthMethodClass } from './components/descope-user-auth-method/UserAuthMethodClass';
42
43
  export { MappingsFieldClass } from './components/mapping-fields/descope-mappings-field/MappingsFieldClass';
43
44
  export { SamlGroupMappingsClass } from './components/mapping-fields/descope-saml-group-mappings/SamlGroupMappingsClass';
44
45
  export { PolicyValidationClass } from './components/descope-policy-validation/PolicyValidationClass';
package/src/index.js CHANGED
@@ -34,6 +34,7 @@ export * from './components/descope-notification';
34
34
  export * from './components/descope-avatar';
35
35
  export * from './components/mapping-fields/descope-mappings-field';
36
36
  export * from './components/descope-user-attribute';
37
+ export * from './components/descope-user-auth-method';
37
38
  export * from './components/mapping-fields/descope-saml-group-mappings';
38
39
  export * from './components/descope-policy-validation';
39
40
 
@@ -46,7 +46,7 @@ export const normalizeBooleanAttributesMixin = (superclass) =>
46
46
  }
47
47
  } else if (!attrVal) {
48
48
  // eslint-disable-next-line no-console
49
- console.warn(
49
+ console.debug(
50
50
  `attribute "${attr}" has no value, should it be added to the boolean attributes list?`
51
51
  );
52
52
  }
@@ -33,6 +33,7 @@ import * as badge from './badge';
33
33
  import * as avatar from './avatar';
34
34
  import * as mappingsField from './mappingsField';
35
35
  import * as userAttribute from './userAttribute';
36
+ import * as userAuthMethod from './userAuthMethod';
36
37
  import * as samlGroupMappings from './samlGroupMappings';
37
38
  import * as policyValidation from './policyValidation';
38
39
 
@@ -73,6 +74,7 @@ const components = {
73
74
  avatar,
74
75
  mappingsField,
75
76
  userAttribute,
77
+ userAuthMethod,
76
78
  samlGroupMappings,
77
79
  policyValidation,
78
80
  };
@@ -0,0 +1,19 @@
1
+ import globals from '../globals';
2
+ import { UserAuthMethodClass } from '../../components/descope-user-auth-method/UserAuthMethodClass';
3
+ import { getThemeRefs } from '../../helpers/themeHelpers';
4
+
5
+ const globalRefs = getThemeRefs(globals);
6
+ export const vars = UserAuthMethodClass.cssVarList;
7
+
8
+ const userAuthMethod = {
9
+ [vars.hostDirection]: globalRefs.direction,
10
+ [vars.labelTextWidth]: '200px',
11
+ [vars.itemsGap]: '16px',
12
+ [vars.hostMinWidth]: '530px',
13
+ [vars.iconSize]: '24px',
14
+ _fullWidth: {
15
+ [vars.hostWidth]: '100%',
16
+ },
17
+ };
18
+
19
+ export default userAuthMethod;
package/dist/umd/1000.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1e3],{2561:(t,e,s)=>{s.d(e,{s:()=>h});var i=s(2061),n=s(357),r=s(7878);const a=t=>class extends t{#t=r.C.bind(this,"components-context");updateComponentsContext(t){this.dispatchEvent(new CustomEvent("components-context",{bubbles:!0,composed:!0,detail:t}))}};var o=s(2666),l=s(8084);const h=({componentName:t,baseSelector:e=""})=>{class s extends HTMLElement{static get componentName(){return t}#e;#s=!0;get baseSelector(){return e}get baseElement(){return this.#e??=this.baseSelector?this.rootElement.querySelector(this.baseSelector):this,this.#e||console.warn("missing base element for component",this.localName),this.#e}get rootElement(){return this.shadowRoot||this}get name(){return this.getAttribute("name")}connectedCallback(){super.connectedCallback?.(),this.rootElement.isConnected&&this.#s&&(this.#s=!1,this.init?.())}}return(0,i.qC)(n.A,o._,l.Q,a)(s)}},7878:(t,e,s)=>{function i(t,e={}){const s=new Event(t,e);this[`on${t}`]?.(s),this.dispatchEvent(s)}s.d(e,{C:()=>i})},357:(t,e,s)=>{s.d(e,{A:()=>i});const i=t=>class extends t{#i(){const e=this.localName;if(!t.componentName)throw Error('component name is not defined on super class, make sure you have a static get for "componentName"');if(e!==t.componentName)throw Error(`component name mismatch, expected "${t.componentName}", current "${e}"`)}init(){super.init?.(),this.#i()}}},2666:(t,e,s)=>{s.d(e,{_:()=>i});const i=t=>class extends t{init(){super.init?.(),this.baseElement.addEventListener("mouseover",(t=>{this.setAttribute("hover","true"),t.target.addEventListener("mouseleave",(()=>this.removeAttribute("hover")),{once:!0})}))}}},1e3:(t,e,s)=>{s.d(e,{li:()=>M,Ae:()=>f.A,DM:()=>m,yk:()=>h,e4:()=>u,_A:()=>A._,mE:()=>x,wX:()=>g,QT:()=>w.Q,Iw:()=>C,dj:()=>y});var i=s(5279),n=s(2061),r=s(4567),a=s(5561);class o{constructor(){this.styleMap=new Map}add(t,e,s){this.styleMap.has(t)||this.styleMap.set(t,[]),this.styleMap.set(t,[...this.styleMap.get(t),{property:e,value:s}])}toString(){return Array.from(this.styleMap.entries()).reduce(((t,[e,s])=>`${t}${e} { \n${s.map((({property:t,value:e})=>`${t}: ${e}`)).join(";\n")} \n}\n\n`),"")}}const l=(t,e)=>Object.keys(e).reduce(((e,s)=>Object.assign(e,{[s]:(0,r.Tk)(t,s)})),{}),h=({mappings:t={},componentNameOverride:e=""})=>s=>{const h=e||s.componentName;return class extends s{static get cssVarList(){return{...s.cssVarList,...l(h,{...t})}}#n;#r;#a;#o;#l;#h;#u;#c;#d;constructor({getRootElement:e,componentNameSuffix:s="",themeSection:r=i.qg,baseSelector:a}={}){super(),this.#o=s,this.#l=r,this.#u=a??this.baseSelector,this.#d=e,this.#c=Object.keys(t).map((t=>(0,n.E3)("st",s,t)))}get#m(){return a.componentsThemeManager.currentTheme?.[h]||""}#p(){this.#r.innerHTML=this.#m[this.#l]}#g(){this.#r=document.createElement("style"),this.#r.id=`style-mixin-theme__${h}`,this.#h.prepend(this.#r),this.#a=a.componentsThemeManager.onCurrentThemeChange(this.#p.bind(this)),this.#p()}#b(){if(this.#c.length){this.#n=document.createElement("style"),this.#n.id=`style-mixin-overrides__${h}`;const s=(t=h,e=i.k4,Array(e).fill(`.${t}`).join(""));this.#n.innerText=`:host(${s}) {}`,this.#h.append(this.#n)}var t,e}#E(t,e){const s=this.#n?.sheet?.cssRules[0].style;if(!s)return;const i=(0,r.Tk)(h,t.replace(new RegExp("^st-"),""));e?s?.setProperty(i,e):(s?.removeProperty(i),this.removeAttribute(t))}#v(t=[]){let e=!1;t.forEach((t=>{this.#c.includes(t)&&(this.#E(t,this.getAttribute(t)),e=!0)})),e&&(this.#n.innerHTML=this.#n?.sheet?.cssRules[0].cssText)}#y(){if(Object.keys(t).length){const e=document.createElement("style");e.id=`style-mixin-mappings__${h}`,e.innerHTML=((t,e,s)=>{const i=new o;return Object.keys(s).forEach((a=>{const o=((t,e)=>{const s={selector:"",property:(0,n.GL)(t)};return e&&Object.keys(e).length?Array.isArray(e)?e.map((t=>({...s,...t}))):[{...s,...e}]:[s]})(a,s[a]),l=(0,r.Tk)(t,a);o.forEach((({selector:t,property:s,important:r,fallback:a})=>{i.add(((t="",e="")=>(0,n.mf)(e)?e(t):`${t}${/^[A-Za-z]/.test(e)?` ${e}`:e}`)(e,t),(0,n.mf)(s)?s():s,((t,e)=>`var(${t}${e?`, ${e}`:""})`)(l,a)+(r?"!important":""))}))})),i.toString()})((0,n.E3)(h,this.#o),this.#u,t),this.#h.prepend(e)}}#f(t){(this.#h.classList||this.#h.host.classList).add(t)}async init(){super.init?.(),this.shadowRoot.isConnected&&(this.#h=await(this.#d?.(this))||this.shadowRoot,this.#f(h),this.#y(),this.#g(),this.#b(),(0,r.FX)(this,this.#v.bind(this),{}))}disconnectedCallback(){super.disconnectedCallback?.(),this.#a?.()}}},u=t=>class extends t{#A=null;static get observedAttributes(){return[...t.observedAttributes||[],"draggable"]}constructor(){super(),this.#A=document.createElement("style"),this.#A.innerText="* { cursor: inherit!important }"}#S(t){t?this.shadowRoot.appendChild(this.#A):this.#A.remove()}get isDraggable(){return this.hasAttribute("draggable")&&"false"!==this.getAttribute("draggable")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable){const e=this.baseElement.getAttribute("tabindex");this.baseElement.setAttribute("tabindex","-1");const s=()=>{e?this.baseElement.setAttribute("tabindex",e):this.baseElement.removeAttribute("tabindex"),t.target.removeEventListener("mouseup",s),t.target.removeEventListener("dragend",s)};t.target.addEventListener("mouseup",s,{once:!0}),t.target.addEventListener("dragend",s,{once:!0})}})),super.init?.()}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),"draggable"===t&&this.#S("true"===s)}};var c=s(2561),d=s(7878);const m=({componentName:t,wrappedEleName:e,slots:s=[],style:i,excludeAttrsSync:a=[],includeAttrsSync:o=[],includeForwardProps:l=[],delegatesFocus:h=!0})=>{class u extends((0,c.s)({componentName:t,baseSelector:e})){#C=d.C.bind(this,"blur");#M=d.C.bind(this,"focus");constructor(){super().attachShadow({mode:"open",delegatesFocus:h}).innerHTML=`\n\t\t\t<style id="create-proxy">${(0,n.mf)(i)?i():i}</style>\n\t\t\t<${e}>\n\t\t\t${s.map((t=>`<slot ${t?`name="${t}" slot="${t}"`:""} ></slot>`)).join("")}\n\t\t\t</${e}>\n\t\t`}init(){super.init?.(),this.baseElement.addEventListener("blur",(t=>{this.#C()})),this.baseElement.addEventListener("focus",(t=>{this.#M()})),(0,r.Db)(this.baseElement,this,l),(0,r.tg)(this.baseElement,this,{excludeAttrs:a,includeAttrs:o})}}return u};s(5910);const p=["required","pattern"],g=t=>class extends t{static get observedAttributes(){return[...t.observedAttributes||[],...p]}static get formAssociated(){return!0}#w;get internals(){return this.#w}set internals(t){this.#w=t}constructor(){super(),this.#w=this.attachInternals()}get defaultErrorMsgValueMissing(){return"Please fill out this field."}get defaultErrorMsgPatternMismatch(){return"Please match the requested format."}get defaultErrorMsgTooShort(){return`Minimum length is ${this.getAttribute("minlength")}.`}get defaultErrorMsgTooLong(){return`Maximum length is ${this.getAttribute("maxlength")}. `}get defaultErrorMsgRangeUnderflow(){return`At least ${this.getAttribute("min-items-selection")} items are required.`}get defaultErrorMsgRangeOverflow(){return`At most ${this.getAttribute("max-items-selection")} items are allowed.`}getErrorMessage(t){const{valueMissing:e,patternMismatch:s,typeMismatch:i,stepMismatch:n,tooShort:r,tooLong:a,rangeOverflow:o,rangeUnderflow:l,badInput:h,customError:u}=t;switch(!0){case e:return this.getAttribute("data-errormessage-value-missing")||this.defaultErrorMsgValueMissing;case s||i||n||h:return this.getAttribute("data-errormessage-pattern-mismatch")||this.defaultErrorMsgPatternMismatch;case r:return this.getAttribute("data-errormessage-pattern-mismatch-too-short")||this.defaultErrorMsgTooShort;case a:return this.getAttribute("data-errormessage-pattern-mismatch-too-long")||this.defaultErrorMsgTooLong;case l:return this.defaultErrorMsgRangeUnderflow;case o:return this.defaultErrorMsgRangeOverflow;case u:return this.validationMessage;default:return""}}#x(){const t=this.isReadOnly?{}:this.getValidity();this.#w.setValidity(t,this.getErrorMessage(t),this.validationTarget)}get validationMessage(){return this.#w.validationMessage}getValidity(){console.warn("getValidity","is not implemented")}checkValidity(){return this.#w.validity.valid}reportValidity(){return this.#w.reportValidity()}get validity(){return this.#w.validity}get validationTarget(){return this.inputElement}setCustomValidity(t){t?this.#w.setValidity({customError:!0},t,this.validationTarget):(this.#w.setValidity({}),this.#x())}get isRequired(){return this.hasAttribute("required")&&"false"!==this.getAttribute("required")}get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}get isDisabled(){return this.hasAttribute("disabled")&&"false"!==this.getAttribute("disabled")}get pattern(){return this.getAttribute("pattern")}get form(){return this.#w.form}attributeChangedCallback(t,e,s){super.attributeChangedCallback?.(t,e,s),p.includes(t)&&this.#x()}init(){super.init?.(),this.addEventListener("change",this.#x),this.addEventListener("invalid",(t=>t.stopPropagation())),this.addEventListener("input",this.#x),setTimeout((()=>this.#x()))}},b=["invalid","required"],E=t=>{if(!t)return;let e=t;for(let t=0;t<10;t++)if([e]=e.assignedElements(),"slot"!==e.localName)return e},v=({proxyProps:t=[],inputEvent:e="input",triggerValidationEvents:s=[],proxyParentValidation:i=!1})=>n=>class extends(g(n)){static get observedAttributes(){return[...n.observedAttributes||[],...b]}#T;#L=d.C.bind(this,"change");constructor(){super(),this.#T=super.inputElement}warnIfInputElementIsMissing(){clearTimeout(this.inputElementTimerId),this.inputElementTimerId=setTimeout((()=>{!this.#T&&console.warn(this.localName,"no input was found")}),0)}get inputElement(){if(this.#T)return this.#T;this.warnIfInputElementIsMissing();const t=this.baseElement.shadowRoot?.querySelector('slot[name="input"]'),e=this.baseElement.shadowRoot?.querySelector('slot[name="textarea"]');return this.#T=E(t)||E(e),this.#T}set inputElement(t){this.#T=t}getValidity(){return this.inputElement?.validity||{}}#V(){this.setAttribute("error-message",this.validationMessage)}reportValidity=()=>{this.inputElement.setCustomValidity(""),this.setCustomValidity(""),this.checkValidity()||(this.setAttribute("invalid","true"),this.#V(),this.focus())};defaultReportValidity(){return super.reportValidity()}init(){if(super.init?.(),this.baseElement._setInvalid=function(t){!t&&this._shouldSetInvalid(t)&&(this.invalid=t)},s.forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.inputElement?.setCustomValidity("")}))})),setTimeout((()=>{(Array.isArray(e)?e:[e]).forEach((t=>{this.baseElement?.addEventListener(t,(()=>{this.baseElement.checkValidity()?this.removeAttribute("invalid"):this.#V()}))})),this.baseElement.addEventListener("change",(()=>{this.#L()})),this.addEventListener("invalid",(()=>{this.checkValidity()||this.setAttribute("invalid","true"),this.#V()})),t.forEach((t=>{var e,s;e=this.inputElement,s=t,Object.defineProperty(this,s,{set(t){e[s]=t},get:()=>e[s],configurable:!0})})),this.setSelectionRange=this.inputElement.setSelectionRange?.bind(this.inputElement),(0,r.oP)(this,this.inputElement,{includeAttrs:["inputmode"]})})),i){const t=this.inputElement.internals,e=this;this.inputElement.internals=new Proxy(t,{get:(t,s)=>"function"==typeof t[s]&&"setValidity"===s?(...i)=>{if(3===i.length){const t=i.slice(0,i.length-1);t.push(e.inputElement),e.internals[s](...t)}else e.internals[s](...i);return t[s](...i)}:"function"==typeof t[s]?(...i)=>(e.internals[s](...i),t[s](...i)):t[s]})}}},y=t=>(0,n.qC)(v(t),h({componentNameOverride:(0,r.iY)("input-wrapper")}));var f=s(357),A=s(2666);const S=t=>async e=>{const s=await t(e);return new Promise((t=>{let e=0;const i=()=>{if(e>20)return console.error("could not get shadow root for element",s),void t(s);e++,s?.shadowRoot?t(s.shadowRoot):setTimeout(i)};i()}))},C=({name:t,selector:e,mappings:s={},forward:{attributes:a=[],include:o=!0}={}})=>u=>{const c=t||(t=>t.replace(/[^\w\s]/gi,""))(e),d=h({mappings:s})(u);return class extends d{static get cssVarList(){return{...d.cssVarList,[c]:l((0,n.E3)(u.componentName,"_"+c),s)}}#k;constructor(){const t=S((async t=>{const s=t.shadowRoot.querySelector(t.baseSelector);return e?(await S((()=>s))(t)).querySelector(e):s}));super({getRootElement:t,componentNameSuffix:"_"+c,themeSection:i.qM+c,baseSelector:":host"}),this.#k=t(this).then((t=>t.host))}async#$(){const t=await this.#k;t.onmouseenter=t=>{t.target.setAttribute("hover","true")},t.onmouseleave=t=>{t.target.removeAttribute("hover")}}async init(){super.init?.();const t=await this.#k;(0,r.oP)(this,t,{[o?"includeAttrs":"excludeAttrs"]:a}),this.#$()}}},M=t=>class extends t{#L=d.C.bind(this,"change");init(){super.init?.(),this.prevValue=this.value,this.addEventListener("change",(t=>{t.stopPropagation()})),this.addEventListener("blur",(()=>{this.value!==this.prevValue&&(this.#L(),this.prevValue=this.value)}))}};var w=s(8084);const x=t=>class extends t{init(){this.#N(),super.init?.()}#N(){["blur","focus","focusin","focusout"].forEach((t=>{this.addEventListener(t,(t=>{t.isTrusted&&t.target===this&&t.stopImmediatePropagation()}))}))}handleFocusEventsDispatching(t){let e;t?.forEach((t=>{t?.addEventListener("focusout",(t=>{t.stopImmediatePropagation(),e=setTimeout((()=>{e=null,d.C.call(this,"blur"),d.C.call(this,"focusout",{bubbles:!0})}))}));const s=t=>{t.stopImmediatePropagation(),clearTimeout(e),e||(d.C.call(this,"focus"),d.C.call(this,"focusin",{bubbles:!0}))};t?.addEventListener("focusin",s),t?.addEventListener("focus",s)}))}handleInputEventDispatching(){let t=this.value;this.addEventListener("input",(e=>{t===this.value?e.stopImmediatePropagation():t=this.value}))}}},8084:(t,e,s)=>{s.d(e,{Q:()=>r});var i=s(4567);const n=["readonly","focused","invalid","has-label","required","disabled","checked","has-helper","has-value","step-buttons-visible","hover","has-error-message","focus-ring","opened","active","password-visible","opening","closing","has-no-options"],r=t=>class extends t{init(){super.init?.(),(0,i.FX)(this,(t=>t.forEach((t=>{const e=this.getAttribute(t);(t=>n.includes(t))(t)?""===e?this.setAttribute(t,"true"):"false"===e&&this.removeAttribute(t):e||console.warn(`attribute "${t}" has no value, should it be added to the boolean attributes list?`)}))),{})}}}}]);
package/dist/umd/1037.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 1037.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1037],{1037:(e,t,o)=>{o.d(t,{Dt:()=>a,G6:()=>h,T:()=>d,gn:()=>s,i7:()=>u,vU:()=>c});const n=e=>e.test(navigator.userAgent),r=e=>e.test(navigator.platform),a=n(/Android/u),u=n(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),c=n(/Firefox/u),i=r(/^iPad/u)||r(/^Mac/u)&&navigator.maxTouchPoints>1,s=r(/^iPhone/u)||i,h=n(/^((?!chrome|android).)*safari/iu),d=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}})()}}]);
package/dist/umd/1721.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1721],{1721:(e,s,c)=>{c(4750),c(7078)}}]);
package/dist/umd/2066.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 2066.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[2066],{3726:(e,t,n)=>{function o(e){const t=[];for(;e;){if(e.nodeType===Node.DOCUMENT_NODE){t.push(e);break}e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?e=e.assignedSlot?e.assignedSlot:e.parentNode:(t.push(e),e=e.host)}return t}function s(e){const t=[];let n;return"slot"===e.localName?n=e.assignedElements():(t.push(e),n=[...e.children]),n.forEach((e=>t.push(...s(e)))),t}function u(e,t){return t?t.closest(e)||u(e,t.getRootNode().host):null}function r(e){return e?new Set(e.split(" ")):new Set}function i(e){return e?[...e].join(" "):""}function c(e,t,n){const o=r(e.getAttribute(t));o.add(n),e.setAttribute(t,i(o))}function d(e,t,n){const o=r(e.getAttribute(t));o.delete(n),0!==o.size?e.setAttribute(t,i(o)):e.removeAttribute(t)}function l(e){return e.nodeType===Node.TEXT_NODE&&""===e.textContent.trim()}n.d(t,{$2:()=>c,AD:()=>o,Q4:()=>u,dV:()=>i,eC:()=>l,hK:()=>r,xX:()=>s,x_:()=>d})}}]);