@descope/web-components-ui 1.0.418 → 1.0.420

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 (233) hide show
  1. package/dist/cjs/index.cjs.js +1439 -1355
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.d.ts +0 -2
  4. package/dist/index.esm.js +1983 -1091
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/umd/1172.js +240 -0
  7. package/dist/umd/{8162.js → 1396.js} +3 -3
  8. package/dist/umd/1402.js +1 -0
  9. package/dist/umd/1484.js +148 -0
  10. package/dist/umd/{5026.js → 189.js} +5 -117
  11. package/dist/umd/{6637.js → 201.js} +5 -5
  12. package/dist/umd/{1053.js → 2159.js} +13 -13
  13. package/dist/umd/2540.js +1 -0
  14. package/dist/umd/2570.js +338 -0
  15. package/dist/umd/2666.js +148 -0
  16. package/dist/umd/3110.js +275 -0
  17. package/dist/umd/{9167.js → 3191.js} +66 -12
  18. package/dist/umd/3437.js +2 -0
  19. package/dist/umd/{6418.js → 3638.js} +2 -2
  20. package/dist/umd/{7212.js → 404.js} +8 -8
  21. package/dist/umd/4114.js +124 -0
  22. package/dist/umd/{7607.js → 4127.js} +9 -9
  23. package/dist/umd/4187.js +2 -0
  24. package/dist/umd/4218.js +129 -0
  25. package/dist/umd/4455.js +422 -0
  26. package/dist/umd/4480.js +1 -1
  27. package/dist/umd/{5086.js → 4554.js} +5 -5
  28. package/dist/umd/{4834.js → 4574.js} +5 -5
  29. package/dist/umd/4619.js +1 -1
  30. package/dist/umd/4902.js +170 -0
  31. package/dist/umd/{5273.js → 507.js} +5 -5
  32. package/dist/umd/5096.js +109 -0
  33. package/dist/umd/5318.js +1 -0
  34. package/dist/umd/5414.js +2 -0
  35. package/dist/umd/5414.js.LICENSE.txt +1 -0
  36. package/dist/umd/{8164.js → 5563.js} +5 -5
  37. package/dist/umd/{7824.js → 7097.js} +5 -117
  38. package/dist/umd/7150.js +2 -0
  39. package/dist/umd/7150.js.LICENSE.txt +485 -0
  40. package/dist/umd/731.js +832 -0
  41. package/dist/umd/742.js +2 -0
  42. package/dist/umd/{351.js → 7979.js} +10 -10
  43. package/dist/umd/8823.js +1 -0
  44. package/dist/umd/{6474.js → 9030.js} +12 -12
  45. package/dist/umd/9243.js +202 -0
  46. package/dist/umd/9243.js.LICENSE.txt +51 -0
  47. package/dist/umd/{5443.js → 9478.js} +5 -117
  48. package/dist/umd/DescopeDev.js +1 -2
  49. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
  50. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  51. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
  52. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
  53. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
  54. package/dist/umd/descope-alert-index-js.js +1 -1
  55. package/dist/umd/descope-apps-list-index-js.js +1 -1
  56. package/dist/umd/descope-avatar.js +1 -0
  57. package/dist/umd/descope-button-index-js.js +4 -116
  58. package/dist/umd/descope-code-snippet-index-js.js +1 -1
  59. package/dist/umd/descope-combo-box-index-js.js +5 -5
  60. package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
  61. package/dist/umd/descope-date-field-index-js.js +1 -1
  62. package/dist/umd/descope-divider-index-js.js +1 -1
  63. package/dist/umd/descope-email-field-index-js.js +4 -4
  64. package/dist/umd/descope-enriched-text-index-js.js +1 -1
  65. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +4 -4
  66. package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js +19 -4
  67. package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js.LICENSE.txt +12 -0
  68. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
  69. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +4 -4
  70. package/dist/umd/descope-grid-index-js.js +1 -1
  71. package/dist/umd/descope-hybrid-field-index-js.js +3 -3
  72. package/dist/umd/descope-icon-index-js.js +1 -1
  73. package/dist/umd/descope-link-index-js.js +1 -1
  74. package/dist/umd/descope-modal-index-js.js +1 -1
  75. package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
  76. package/dist/umd/descope-new-password-index-js.js +1 -1
  77. package/dist/umd/descope-notification-descope-notification-card-index-js.js +1 -1
  78. package/dist/umd/descope-notification-index-js.js +1 -1
  79. package/dist/umd/descope-number-field-index-js.js +1 -1
  80. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +1 -1
  81. package/dist/umd/descope-passcode-index-js.js +1 -1
  82. package/dist/umd/descope-password-index-js.js +1 -1
  83. package/dist/umd/descope-radio-group-index-js.js +1 -1
  84. package/dist/umd/descope-scopes-list-index-js.js +1 -1
  85. package/dist/umd/descope-security-questions-setup-index-js.js +1 -1
  86. package/dist/umd/descope-security-questions-verify-index-js.js +2 -2
  87. package/dist/umd/descope-text-area-index-js.js +1 -1
  88. package/dist/umd/descope-text-field-index-js.js +2 -2
  89. package/dist/umd/descope-text.js +1 -0
  90. package/dist/umd/descope-third-party-app-logo-index-js.js +1 -1
  91. package/dist/umd/descope-upload-file-index-js.js +1 -1
  92. package/dist/umd/descope-user-attribute-index-js.js +1 -1
  93. package/dist/umd/descope-user-auth-method-index-js.js +1 -1
  94. package/dist/umd/index.js +1 -1
  95. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  96. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
  97. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
  98. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  99. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +2 -2
  100. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +7 -7
  101. package/node_modules/common/.eslintrc.json +18 -0
  102. package/node_modules/common/README.md +7 -0
  103. package/node_modules/common/package.json +34 -0
  104. package/node_modules/common/project.json +7 -0
  105. package/node_modules/common/src/baseClasses/baseClasses/createBaseClass.js +66 -0
  106. package/node_modules/common/src/baseClasses/baseClasses/createBaseInputClass.js +14 -0
  107. package/node_modules/common/src/baseClasses/baseClasses/createCssVarImageClass.js +55 -0
  108. package/node_modules/common/src/baseClasses/index.js +3 -0
  109. package/node_modules/common/src/componentsHelpers/index.js +95 -0
  110. package/node_modules/common/src/componentsMixins/helpers/mixinsHelpers.js +10 -0
  111. package/node_modules/common/src/componentsMixins/index.js +1 -0
  112. package/node_modules/common/src/componentsMixins/mixins/activableMixin.js +14 -0
  113. package/node_modules/common/src/componentsMixins/mixins/changeMixin.js +22 -0
  114. package/node_modules/common/src/componentsMixins/mixins/componentNameValidationMixin.js +23 -0
  115. package/node_modules/common/src/componentsMixins/mixins/componentsContextMixin.js +12 -0
  116. package/node_modules/common/src/componentsMixins/mixins/createDynamicDataMixin.js +100 -0
  117. package/node_modules/common/src/componentsMixins/mixins/createProxy.js +58 -0
  118. package/node_modules/common/src/componentsMixins/mixins/createStyleMixin/helpers.js +106 -0
  119. package/node_modules/common/src/componentsMixins/mixins/createStyleMixin/index.js +167 -0
  120. package/node_modules/common/src/componentsMixins/mixins/draggableMixin.js +62 -0
  121. package/node_modules/common/src/componentsMixins/mixins/externalInputHelpers.js +93 -0
  122. package/node_modules/common/src/componentsMixins/mixins/externalInputMixin.js +170 -0
  123. package/node_modules/common/src/componentsMixins/mixins/hoverableMixin.js +13 -0
  124. package/node_modules/common/src/componentsMixins/mixins/index.js +14 -0
  125. package/node_modules/common/src/componentsMixins/mixins/inputEventsDispatchingMixin.js +76 -0
  126. package/node_modules/common/src/componentsMixins/mixins/inputValidationMixin.js +210 -0
  127. package/node_modules/common/src/componentsMixins/mixins/lifecycleEventsMixin.js +23 -0
  128. package/node_modules/common/src/componentsMixins/mixins/normalizeBooleanAttributesMixin.js +57 -0
  129. package/node_modules/common/src/componentsMixins/mixins/portalMixin.js +112 -0
  130. package/node_modules/common/src/componentsMixins/mixins/proxyInputMixin.js +242 -0
  131. package/node_modules/common/src/constants.js +4 -0
  132. package/node_modules/common/src/icons/errorMessageIconBase64.js +1 -0
  133. package/node_modules/common/src/sbControls.js +302 -0
  134. package/node_modules/common/src/themeHelpers/colorsHelpers.js +94 -0
  135. package/node_modules/common/src/themeHelpers/index.js +176 -0
  136. package/node_modules/common/src/utils/index.js +68 -0
  137. package/node_modules/descope-avatar/e2e/descope-avatar.spec.ts +54 -0
  138. package/node_modules/descope-avatar/package.json +34 -0
  139. package/node_modules/descope-avatar/project.json +7 -0
  140. package/{src/components/descope-avatar → node_modules/descope-avatar/src/component}/AvatarClass.js +4 -4
  141. package/{src/theme/components/avatar.js → node_modules/descope-avatar/src/theme.js} +3 -3
  142. package/node_modules/descope-avatar/stories/avatar.jpeg +0 -0
  143. package/node_modules/descope-avatar/stories/descope-avatar.stories.js +32 -0
  144. package/node_modules/descope-text/e2e/descope-text.spec.ts +35 -0
  145. package/node_modules/descope-text/package.json +31 -0
  146. package/node_modules/descope-text/project.json +7 -0
  147. package/{src/components/descope-text → node_modules/descope-text/src/component}/TextClass.js +4 -4
  148. package/{src/theme/components/text.js → node_modules/descope-text/src/theme.js} +3 -3
  149. package/node_modules/descope-text/stories/descope-text.stories.js +55 -0
  150. package/package.json +52 -43
  151. package/src/components/descope-alert/AlertClass.js +1 -1
  152. package/src/components/descope-apps-list/AppsListClass.js +1 -1
  153. package/src/components/descope-apps-list/index.js +2 -2
  154. package/src/components/descope-divider/DividerClass.js +1 -1
  155. package/src/components/descope-divider/index.js +1 -1
  156. package/src/components/descope-link/LinkClass.js +1 -1
  157. package/src/components/descope-link/index.js +1 -1
  158. package/src/components/descope-security-questions-verify/SecurityQuestionsVerifyClass.js +1 -1
  159. package/src/components/descope-security-questions-verify/index.js +1 -1
  160. package/src/components/descope-user-attribute/UserAttributeClass.js +1 -1
  161. package/src/components/descope-user-attribute/index.js +1 -1
  162. package/src/components/descope-user-auth-method/UserAuthMethodClass.js +1 -1
  163. package/src/components/descope-user-auth-method/index.js +1 -1
  164. package/src/components/mapping-fields/descope-mappings-field/MappingsFieldClass.js +1 -1
  165. package/src/components/mapping-fields/descope-mappings-field/index.js +1 -1
  166. package/src/helpers/themeHelpers/index.js +1 -1
  167. package/src/index.cjs.js +2 -2
  168. package/src/index.d.ts +0 -2
  169. package/src/index.js +2 -2
  170. package/src/index.umd.js +3 -1
  171. package/src/mixins/createStyleMixin/index.js +1 -1
  172. package/src/theme/components/alert.js +1 -1
  173. package/src/theme/components/comboBox.js +2 -2
  174. package/src/theme/components/enrichedText.js +1 -1
  175. package/src/theme/components/index.js +2 -2
  176. package/dist/umd/1033.js +0 -2
  177. package/dist/umd/1414.js +0 -352
  178. package/dist/umd/1437.js +0 -422
  179. package/dist/umd/1672.js +0 -1
  180. package/dist/umd/2566.js +0 -2
  181. package/dist/umd/2838.js +0 -2
  182. package/dist/umd/2838.js.LICENSE.txt +0 -1
  183. package/dist/umd/286.js +0 -148
  184. package/dist/umd/2919.js +0 -832
  185. package/dist/umd/3222.js +0 -282
  186. package/dist/umd/3607.js +0 -2
  187. package/dist/umd/3711.js +0 -123
  188. package/dist/umd/5412.js +0 -109
  189. package/dist/umd/650.js +0 -1
  190. package/dist/umd/6726.js +0 -148
  191. package/dist/umd/7407.js +0 -450
  192. package/dist/umd/8980.js +0 -143
  193. package/dist/umd/8980.js.LICENSE.txt +0 -29
  194. package/dist/umd/9632.js +0 -275
  195. package/dist/umd/9878.js +0 -1
  196. package/dist/umd/9895.js +0 -17
  197. package/dist/umd/DescopeDev.js.LICENSE.txt +0 -1
  198. package/dist/umd/bcdfe87ae253c2cf789c9a737f8d8c22.woff +0 -0
  199. package/dist/umd/descope-avatar-index-js.js +0 -1
  200. package/dist/umd/descope-text-index-js.js +0 -1
  201. /package/dist/umd/{1414.js.LICENSE.txt → 1172.js.LICENSE.txt} +0 -0
  202. /package/dist/umd/{1437.js.LICENSE.txt → 1396.js.LICENSE.txt} +0 -0
  203. /package/dist/umd/{6726.js.LICENSE.txt → 1484.js.LICENSE.txt} +0 -0
  204. /package/dist/umd/{286.js.LICENSE.txt → 189.js.LICENSE.txt} +0 -0
  205. /package/dist/umd/{6637.js.LICENSE.txt → 201.js.LICENSE.txt} +0 -0
  206. /package/dist/umd/{1053.js.LICENSE.txt → 2159.js.LICENSE.txt} +0 -0
  207. /package/dist/umd/{351.js.LICENSE.txt → 2570.js.LICENSE.txt} +0 -0
  208. /package/dist/umd/{5026.js.LICENSE.txt → 2666.js.LICENSE.txt} +0 -0
  209. /package/dist/umd/{9632.js.LICENSE.txt → 3110.js.LICENSE.txt} +0 -0
  210. /package/dist/umd/{9167.js.LICENSE.txt → 3191.js.LICENSE.txt} +0 -0
  211. /package/dist/umd/{1033.js.LICENSE.txt → 3437.js.LICENSE.txt} +0 -0
  212. /package/dist/umd/{6418.js.LICENSE.txt → 3638.js.LICENSE.txt} +0 -0
  213. /package/dist/umd/{7212.js.LICENSE.txt → 404.js.LICENSE.txt} +0 -0
  214. /package/dist/umd/{3711.js.LICENSE.txt → 4114.js.LICENSE.txt} +0 -0
  215. /package/dist/umd/{7607.js.LICENSE.txt → 4127.js.LICENSE.txt} +0 -0
  216. /package/dist/umd/{3607.js.LICENSE.txt → 4187.js.LICENSE.txt} +0 -0
  217. /package/dist/umd/{3222.js.LICENSE.txt → 4218.js.LICENSE.txt} +0 -0
  218. /package/dist/umd/{5086.js.LICENSE.txt → 4455.js.LICENSE.txt} +0 -0
  219. /package/dist/umd/{5273.js.LICENSE.txt → 4554.js.LICENSE.txt} +0 -0
  220. /package/dist/umd/{4834.js.LICENSE.txt → 4574.js.LICENSE.txt} +0 -0
  221. /package/dist/umd/{9895.js.LICENSE.txt → 4902.js.LICENSE.txt} +0 -0
  222. /package/dist/umd/{5443.js.LICENSE.txt → 507.js.LICENSE.txt} +0 -0
  223. /package/dist/umd/{5412.js.LICENSE.txt → 5096.js.LICENSE.txt} +0 -0
  224. /package/dist/umd/{8164.js.LICENSE.txt → 5563.js.LICENSE.txt} +0 -0
  225. /package/dist/umd/{7407.js.LICENSE.txt → 7097.js.LICENSE.txt} +0 -0
  226. /package/dist/umd/{2919.js.LICENSE.txt → 731.js.LICENSE.txt} +0 -0
  227. /package/dist/umd/{2566.js.LICENSE.txt → 742.js.LICENSE.txt} +0 -0
  228. /package/dist/umd/{7824.js.LICENSE.txt → 7979.js.LICENSE.txt} +0 -0
  229. /package/dist/umd/{6474.js.LICENSE.txt → 9030.js.LICENSE.txt} +0 -0
  230. /package/dist/umd/{8162.js.LICENSE.txt → 9478.js.LICENSE.txt} +0 -0
  231. /package/{src/helpers → node_modules/common/src}/themeHelpers/componentsThemeManager.js +0 -0
  232. /package/{src/components/descope-avatar → node_modules/descope-avatar/src/component}/index.js +0 -0
  233. /package/{src/components/descope-text → node_modules/descope-text/src/component}/index.js +0 -0
@@ -2,39 +2,40 @@
2
2
 
3
3
  var merge = require('lodash.merge');
4
4
  var Color = require('color');
5
+ require('element-internals-polyfill');
5
6
  var DOMPurify = require('dompurify');
6
7
  var MarkdownIt = require('markdown-it');
7
8
  require('lodash.debounce');
8
9
  require('libphonenumber-js/min');
9
10
  var hljs = require('highlight.js');
10
11
 
11
- const DESCOPE_PREFIX = 'descope';
12
- const CSS_SELECTOR_SPECIFIER_MULTIPLY = 3;
13
- const BASE_THEME_SECTION = 'host';
12
+ const DESCOPE_PREFIX$1 = 'descope';
13
+ const CSS_SELECTOR_SPECIFIER_MULTIPLY$1 = 3;
14
+ const BASE_THEME_SECTION$1 = 'host';
14
15
  const PORTAL_THEME_PREFIX = '@';
15
16
 
16
- const kebabCase = (str) =>
17
+ const kebabCase$1 = (str) =>
17
18
  str
18
19
  .replace(/([a-z])([A-Z])/g, '$1-$2')
19
20
  .replace(/[\s_.]+/g, '-')
20
21
  .toLowerCase();
21
22
 
22
- const kebabCaseJoin = (...args) => kebabCase(args.filter((arg) => !!arg).join('-'));
23
+ const kebabCaseJoin$1 = (...args) => kebabCase$1(args.filter((arg) => !!arg).join('-'));
23
24
 
24
- const upperFirst = (str) => str.charAt(0).toUpperCase() + str.slice(1);
25
+ const upperFirst$1 = (str) => str.charAt(0).toUpperCase() + str.slice(1);
25
26
 
26
- const camelCaseJoin = (...args) =>
27
+ const camelCaseJoin$1 = (...args) =>
27
28
  args
28
29
  .filter(Boolean)
29
- .map((arg, index) => (index === 0 ? arg : upperFirst(arg)))
30
+ .map((arg, index) => (index === 0 ? arg : upperFirst$1(arg)))
30
31
  .join('');
31
32
 
32
- const compose =
33
+ const compose$1 =
33
34
  (...fns) =>
34
35
  (val) =>
35
36
  fns.reduceRight((res, fn) => fn(res), val);
36
37
 
37
- const isFunction = (maybeFunc) => typeof maybeFunc === 'function';
38
+ const isFunction$1 = (maybeFunc) => typeof maybeFunc === 'function';
38
39
 
39
40
  const isUrl = (maybeUrl) => {
40
41
  try {
@@ -82,7 +83,7 @@ const toTitle = (str) =>
82
83
  .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
83
84
  .join(' ');
84
85
 
85
- const observeAttributes = (ele, callback, { excludeAttrs = [], includeAttrs = [] }) => {
86
+ const observeAttributes$1 = (ele, callback, { excludeAttrs = [], includeAttrs = [] }) => {
86
87
  // sync all attrs on init
87
88
  const filteredAttrs = Array.from(ele.attributes)
88
89
  .filter(
@@ -110,7 +111,7 @@ const observeAttributes = (ele, callback, { excludeAttrs = [], includeAttrs = []
110
111
  };
111
112
 
112
113
  // calling the callback with this object: { addedNodes, removedNodes }
113
- const observeChildren = (ele, callback) => {
114
+ const observeChildren$1 = (ele, callback) => {
114
115
  callback({ addedNodes: Array.from(ele.children), removedNodes: [] });
115
116
 
116
117
  const observer = new MutationObserver((mutationsList) => {
@@ -124,7 +125,7 @@ const observeChildren = (ele, callback) => {
124
125
  observer.observe(ele, { childList: true, characterData: true, subtree: true });
125
126
  };
126
127
 
127
- const createSyncAttrsCb =
128
+ const createSyncAttrsCb$1 =
128
129
  (srcEle, targetEle, mapAttrs = {}) =>
129
130
  (attrNames) => {
130
131
  attrNames.forEach((attrName) => {
@@ -141,16 +142,16 @@ const createSyncAttrsCb =
141
142
  };
142
143
 
143
144
  const syncAttrs = (ele1, ele2, options) => {
144
- observeAttributes(ele1, createSyncAttrsCb(ele1, ele2), options);
145
- observeAttributes(ele2, createSyncAttrsCb(ele2, ele1), options);
145
+ observeAttributes$1(ele1, createSyncAttrsCb$1(ele1, ele2), options);
146
+ observeAttributes$1(ele2, createSyncAttrsCb$1(ele2, ele1), options);
146
147
  };
147
148
 
148
- const getComponentName = (name) => kebabCaseJoin(DESCOPE_PREFIX, name);
149
+ const getComponentName$1 = (name) => kebabCaseJoin$1(DESCOPE_PREFIX$1, name);
149
150
 
150
- const getCssVarName = (...args) => `--${kebabCaseJoin(...args)}`;
151
+ const getCssVarName$1 = (...args) => `--${kebabCaseJoin$1(...args)}`;
151
152
 
152
- const forwardAttrs = (source, dest, options = {}) => {
153
- observeAttributes(source, createSyncAttrsCb(source, dest, options.mapAttrs), options);
153
+ const forwardAttrs$1 = (source, dest, options = {}) => {
154
+ observeAttributes$1(source, createSyncAttrsCb$1(source, dest, options.mapAttrs), options);
154
155
  };
155
156
 
156
157
  const forwardProps$1 = (src, target, props = []) => {
@@ -175,6 +176,99 @@ const forwardProps$1 = (src, target, props = []) => {
175
176
  Object.defineProperties(target, config);
176
177
  };
177
178
 
179
+ const DESCOPE_PREFIX = 'descope';
180
+ const CSS_SELECTOR_SPECIFIER_MULTIPLY = 3;
181
+ const BASE_THEME_SECTION = 'host';
182
+
183
+ const kebabCase = (str) =>
184
+ str
185
+ .replace(/([a-z])([A-Z])/g, '$1-$2')
186
+ .replace(/[\s_.]+/g, '-')
187
+ .toLowerCase();
188
+
189
+ const kebabCaseJoin = (...args) => kebabCase(args.filter((arg) => !!arg).join('-'));
190
+
191
+ const upperFirst = (str) => str.charAt(0).toUpperCase() + str.slice(1);
192
+
193
+ const camelCaseJoin = (...args) =>
194
+ args
195
+ .filter(Boolean)
196
+ .map((arg, index) => (index === 0 ? arg : upperFirst(arg)))
197
+ .join('');
198
+
199
+ const compose =
200
+ (...fns) =>
201
+ (val) =>
202
+ fns.reduceRight((res, fn) => fn(res), val);
203
+
204
+ const isFunction = (maybeFunc) => typeof maybeFunc === 'function';
205
+
206
+ const observeAttributes = (ele, callback, { excludeAttrs = [], includeAttrs = [] }) => {
207
+ // sync all attrs on init
208
+ const filteredAttrs = Array.from(ele.attributes)
209
+ .filter(
210
+ (attr) =>
211
+ !excludeAttrs.includes(attr.name) &&
212
+ (!includeAttrs.length || includeAttrs.includes(attr.name))
213
+ )
214
+ .map((attr) => attr.name);
215
+
216
+ callback(filteredAttrs);
217
+
218
+ const observer = new MutationObserver((mutationsList) => {
219
+ mutationsList.forEach((mutation) => {
220
+ if (
221
+ mutation.type === 'attributes' &&
222
+ !excludeAttrs.includes(mutation.attributeName) &&
223
+ (!includeAttrs.length || includeAttrs.includes(mutation.attributeName))
224
+ ) {
225
+ callback([mutation.attributeName]);
226
+ }
227
+ });
228
+ });
229
+
230
+ observer.observe(ele, { attributes: true });
231
+ };
232
+
233
+ // calling the callback with this object: { addedNodes, removedNodes }
234
+ const observeChildren = (ele, callback) => {
235
+ callback({ addedNodes: Array.from(ele.children), removedNodes: [] });
236
+
237
+ const observer = new MutationObserver((mutationsList) => {
238
+ mutationsList.forEach((mutation) => {
239
+ if (mutation.type === 'childList' || mutation.type === 'characterData') {
240
+ callback(mutation);
241
+ }
242
+ });
243
+ });
244
+
245
+ observer.observe(ele, { childList: true, characterData: true, subtree: true });
246
+ };
247
+
248
+ const createSyncAttrsCb =
249
+ (srcEle, targetEle, mapAttrs = {}) =>
250
+ (attrNames) => {
251
+ attrNames.forEach((attrName) => {
252
+ const targetAttrName = mapAttrs[attrName] || attrName;
253
+ const srcAttrVal = srcEle.getAttribute(attrName);
254
+ if (srcAttrVal !== null) {
255
+ if (targetEle.getAttribute(targetAttrName) !== srcAttrVal) {
256
+ targetEle.setAttribute(targetAttrName, srcAttrVal);
257
+ }
258
+ } else {
259
+ targetEle.removeAttribute(targetAttrName);
260
+ }
261
+ });
262
+ };
263
+
264
+ const getComponentName = (name) => kebabCaseJoin(DESCOPE_PREFIX, name);
265
+
266
+ const getCssVarName = (...args) => `--${kebabCaseJoin(...args)}`;
267
+
268
+ const forwardAttrs = (source, dest, options = {}) => {
269
+ observeAttributes(source, createSyncAttrsCb(source, dest, options.mapAttrs), options);
270
+ };
271
+
178
272
  class ComponentsThemeManager {
179
273
  static mountOnPropName = 'DescopeThemeManager';
180
274
 
@@ -221,7 +315,132 @@ class ComponentsThemeManager {
221
315
 
222
316
  const componentsThemeManager = new ComponentsThemeManager();
223
317
 
224
- const getVarName = (path) => getCssVarName(DESCOPE_PREFIX, ...path);
318
+ const colorGaps$1 = {
319
+ darkLight: 0.4,
320
+ highlight: 0.8,
321
+ contrast: 1,
322
+ edgeColor: {
323
+ darkLight: 0.25,
324
+ highlight: 0.1,
325
+ },
326
+ };
327
+
328
+ const darken$1 = (c, percentage) => c.darken(percentage).hex();
329
+
330
+ const contrast$1 = (c) => {
331
+ const isDark = c.isDark();
332
+ return c
333
+ .mix(Color(isDark ? 'white' : 'black'), colorGaps$1.contrast)
334
+ .saturate(1)
335
+ .hex();
336
+ };
337
+
338
+ const lighten$1 = (c, percentage) => {
339
+ const isDark = c.lightness() < 0.5;
340
+
341
+ if (isDark) {
342
+ return c.lightness(percentage * 100).hex();
343
+ }
344
+
345
+ return c.lighten(percentage).hex();
346
+ };
347
+
348
+ const isNearBlack$1 = (color) => color.luminosity() < 0.01;
349
+ const isNearWhite$1 = (color) => color.luminosity() > 0.99;
350
+
351
+ const generateDarkColor$1 = (color, theme) => {
352
+ if (theme === 'dark') {
353
+ return isNearWhite$1(color)
354
+ ? darken$1(color, colorGaps$1.edgeColor.darkLight)
355
+ : lighten$1(color, colorGaps$1.darkLight);
356
+ }
357
+
358
+ return isNearBlack$1(color)
359
+ ? lighten$1(color, colorGaps$1.edgeColor.darkLight)
360
+ : darken$1(color, colorGaps$1.darkLight);
361
+ };
362
+
363
+ const generateLightColor$1 = (color, theme) => {
364
+ if (theme === 'dark') {
365
+ return isNearBlack$1(color)
366
+ ? lighten$1(color, colorGaps$1.edgeColor.darkLight)
367
+ : darken$1(color, colorGaps$1.darkLight);
368
+ }
369
+
370
+ return isNearWhite$1(color)
371
+ ? darken$1(color, colorGaps$1.edgeColor.darkLight)
372
+ : lighten$1(color, colorGaps$1.darkLight);
373
+ };
374
+
375
+ const generateHighlightColor$1 = (color, theme) => {
376
+ if (theme === 'dark') {
377
+ return isNearBlack$1(color)
378
+ ? lighten$1(color, colorGaps$1.edgeColor.highlight)
379
+ : darken$1(color, colorGaps$1.highlight);
380
+ }
381
+
382
+ return isNearWhite$1(color)
383
+ ? darken$1(color, colorGaps$1.edgeColor.highlight)
384
+ : lighten$1(color, colorGaps$1.highlight);
385
+ };
386
+
387
+ const genColor$1 = (color, theme) => {
388
+ const mainColor = new Color(color.main || color);
389
+
390
+ const res = {
391
+ main: mainColor.hex(),
392
+ dark: color.dark || generateDarkColor$1(mainColor, theme),
393
+ light: color.light || generateLightColor$1(mainColor, theme),
394
+ highlight: color.highlight || generateHighlightColor$1(mainColor, theme),
395
+ contrast: color.contrast || contrast$1(mainColor),
396
+ };
397
+
398
+ return res;
399
+ };
400
+
401
+ const genColors$1 = (colors) => {
402
+ return Object.keys(colors).reduce((acc, colorName) => {
403
+ const currentColor = colors[colorName];
404
+
405
+ return Object.assign(acc, {
406
+ [colorName]: genColor$1(currentColor),
407
+ });
408
+ }, {});
409
+ };
410
+
411
+ const getVarName$1 = (path) => getCssVarName(DESCOPE_PREFIX, ...path);
412
+
413
+ // lodash.set alternative
414
+ const set$1 = (obj, path, value) => {
415
+ const pathArray = Array.isArray(path) ? path : path.match(/([^[.\]])+/g);
416
+
417
+ pathArray.reduce((acc, key, i) => {
418
+ if (acc[key] === undefined) acc[key] = {};
419
+ if (i === pathArray.length - 1) acc[key] = value;
420
+ return acc[key];
421
+ }, obj);
422
+
423
+ return obj;
424
+ };
425
+
426
+ const transformTheme$1 = (theme, path, getTransformation) => {
427
+ return Object.entries(theme).reduce((acc, [key, val]) => {
428
+ if (val?.constructor !== Object) {
429
+ return merge(acc, getTransformation(path.concat(key), val));
430
+ }
431
+ return merge(acc, transformTheme$1(val, [...path, key], getTransformation));
432
+ }, {});
433
+ };
434
+
435
+ const getThemeRefs$1 = (theme, prefix) =>
436
+ transformTheme$1(theme, [], (path) =>
437
+ set$1({}, path, `var(${getVarName$1(prefix ? [prefix, ...path] : path)})`)
438
+ );
439
+
440
+ const getThemeVars$1 = (theme, prefix) =>
441
+ transformTheme$1(theme, [], (path) => set$1({}, path, getVarName$1(prefix ? [prefix, ...path] : path)));
442
+
443
+ const getVarName = (path) => getCssVarName$1(DESCOPE_PREFIX$1, ...path);
225
444
 
226
445
  // lodash.set alternative
227
446
  const set = (obj, path, value) => {
@@ -287,7 +506,7 @@ const componentsThemeToStyleObj = (componentsTheme) =>
287
506
  transformTheme(componentsTheme, [], (path, val) => {
288
507
  const [component, ...restPath] = path;
289
508
  const property = restPath.pop();
290
- const componentName = getComponentName(component);
509
+ const componentName = getComponentName$1(component);
291
510
 
292
511
  if (property === 'undefined') {
293
512
  // eslint-disable-next-line no-console
@@ -298,7 +517,7 @@ const componentsThemeToStyleObj = (componentsTheme) =>
298
517
  // this allows us to generate those themes under different sections
299
518
  // if the theme has root level attribute that starts with #
300
519
  // we are generating a new theme
301
- let themeName = BASE_THEME_SECTION;
520
+ let themeName = BASE_THEME_SECTION$1;
302
521
 
303
522
  if (restPath[0] && restPath[0].startsWith(PORTAL_THEME_PREFIX)) {
304
523
  themeName = restPath.shift();
@@ -307,7 +526,7 @@ const componentsThemeToStyleObj = (componentsTheme) =>
307
526
  // do not start with underscore -> key:value, must have 2 no underscore attrs in a row
308
527
  // starts with underscore -> attribute selector
309
528
  const attrsSelector = restPath.reduce((acc, section, idx) => {
310
- if (section.startsWith('_')) return `${acc}[${kebabCase(section.replace(/^_/, ''))}="true"]`;
529
+ if (section.startsWith('_')) return `${acc}[${kebabCase$1(section.replace(/^_/, ''))}="true"]`;
311
530
 
312
531
  const nextSection = restPath[idx + 1];
313
532
 
@@ -320,7 +539,7 @@ const componentsThemeToStyleObj = (componentsTheme) =>
320
539
  return acc;
321
540
  }
322
541
 
323
- return `${acc}[${kebabCase(section)}="${restPath.splice(idx + 1, 1).join('')}"]`;
542
+ return `${acc}[${kebabCase$1(section)}="${restPath.splice(idx + 1, 1).join('')}"]`;
324
543
  }, '');
325
544
 
326
545
  const selector = `:host${attrsSelector ? `(${attrsSelector})` : ''}`;
@@ -379,7 +598,7 @@ const createHelperVars = (theme, prefix) => {
379
598
  const res = transformTheme(theme, [], (path, value) => {
380
599
  const modifiedPath = [...path];
381
600
  const property = modifiedPath.splice(-1);
382
- const varName = getCssVarName(prefix, property);
601
+ const varName = getCssVarName$1(prefix, property);
383
602
 
384
603
  const vars = { [property]: varName };
385
604
  const useVars = { [property]: useVar(varName) };
@@ -483,9 +702,9 @@ const genColors = (colors) => {
483
702
  }, {});
484
703
  };
485
704
 
486
- const direction = 'ltr';
705
+ const direction$1 = 'ltr';
487
706
 
488
- const colors$1 = genColors({
707
+ const colors$2 = genColors({
489
708
  surface: {
490
709
  main: '#ffffff',
491
710
  dark: '#636c74',
@@ -523,7 +742,7 @@ const colors$1 = genColors({
523
742
  },
524
743
  });
525
744
 
526
- const fonts = {
745
+ const fonts$1 = {
527
746
  font1: {
528
747
  family: [
529
748
  'Roboto',
@@ -565,47 +784,47 @@ const fonts = {
565
784
  },
566
785
  };
567
786
 
568
- const fontsRef = getThemeRefs({ fonts }).fonts;
787
+ const fontsRef$1 = getThemeRefs({ fonts: fonts$1 }).fonts;
569
788
 
570
- const typography = {
789
+ const typography$1 = {
571
790
  h1: {
572
- font: fontsRef.font1.family,
791
+ font: fontsRef$1.font1.family,
573
792
  weight: '900',
574
793
  size: '48px',
575
794
  },
576
795
  h2: {
577
- font: fontsRef.font1.family,
796
+ font: fontsRef$1.font1.family,
578
797
  weight: '800',
579
798
  size: '38px',
580
799
  },
581
800
  h3: {
582
- font: fontsRef.font1.family,
801
+ font: fontsRef$1.font1.family,
583
802
  weight: '600',
584
803
  size: '28px',
585
804
  },
586
805
  subtitle1: {
587
- font: fontsRef.font2.family,
806
+ font: fontsRef$1.font2.family,
588
807
  weight: '500',
589
808
  size: '22px',
590
809
  },
591
810
  subtitle2: {
592
- font: fontsRef.font2.family,
811
+ font: fontsRef$1.font2.family,
593
812
  weight: '400',
594
813
  size: '20px',
595
814
  },
596
815
  body1: {
597
- font: fontsRef.font1.family,
816
+ font: fontsRef$1.font1.family,
598
817
  weight: '400',
599
818
  size: '16px',
600
819
  },
601
820
  body2: {
602
- font: fontsRef.font1.family,
821
+ font: fontsRef$1.font1.family,
603
822
  weight: '400',
604
823
  size: '14px',
605
824
  },
606
825
  };
607
826
 
608
- const spacing = {
827
+ const spacing$1 = {
609
828
  xs: '2px',
610
829
  sm: '4px',
611
830
  md: '8px',
@@ -613,7 +832,7 @@ const spacing = {
613
832
  xl: '32px',
614
833
  };
615
834
 
616
- const border = {
835
+ const border$1 = {
617
836
  xs: '1px',
618
837
  sm: '2px',
619
838
  md: '3px',
@@ -621,7 +840,7 @@ const border = {
621
840
  xl: '5px',
622
841
  };
623
842
 
624
- const radius = {
843
+ const radius$1 = {
625
844
  xs: '5px',
626
845
  sm: '10px',
627
846
  md: '15px',
@@ -631,7 +850,7 @@ const radius = {
631
850
  '3xl': '35px',
632
851
  };
633
852
 
634
- const shadow$1 = {
853
+ const shadow$2 = {
635
854
  wide: {
636
855
  sm: '0 2px 3px -0.5px',
637
856
  md: '0 4px 6px -1px',
@@ -648,22 +867,22 @@ const shadow$1 = {
648
867
  },
649
868
  };
650
869
 
651
- const globals = {
652
- colors: colors$1,
653
- typography,
654
- spacing,
655
- border,
656
- radius,
657
- shadow: shadow$1,
658
- fonts,
659
- direction,
870
+ const globals$1 = {
871
+ colors: colors$2,
872
+ typography: typography$1,
873
+ spacing: spacing$1,
874
+ border: border$1,
875
+ radius: radius$1,
876
+ shadow: shadow$2,
877
+ fonts: fonts$1,
878
+ direction: direction$1,
660
879
  };
661
- const vars$U = getThemeVars(globals);
880
+ const vars$U = getThemeVars(globals$1);
662
881
 
663
- const createCssVar = (varName, fallback) => `var(${varName}${fallback ? `, ${fallback}` : ''})`;
882
+ const createCssVar$1 = (varName, fallback) => `var(${varName}${fallback ? `, ${fallback}` : ''})`;
664
883
 
665
- const createCssSelector = (baseSelector = '', relativeSelectorOrSelectorFn = '') =>
666
- isFunction(relativeSelectorOrSelectorFn)
884
+ const createCssSelector$1 = (baseSelector = '', relativeSelectorOrSelectorFn = '') =>
885
+ isFunction$1(relativeSelectorOrSelectorFn)
667
886
  ? relativeSelectorOrSelectorFn(baseSelector)
668
887
  : `${baseSelector}${
669
888
  /^[A-Za-z]/.test(relativeSelectorOrSelectorFn)
@@ -671,7 +890,7 @@ const createCssSelector = (baseSelector = '', relativeSelectorOrSelectorFn = '')
671
890
  : relativeSelectorOrSelectorFn
672
891
  }`;
673
892
 
674
- class StyleBuilder {
893
+ let StyleBuilder$1 = class StyleBuilder {
675
894
  constructor() {
676
895
  this.styleMap = new Map();
677
896
  }
@@ -693,10 +912,10 @@ class StyleBuilder {
693
912
  return `${acc}${selector} { \n${properties} \n}\n\n`;
694
913
  }, '');
695
914
  }
696
- }
915
+ };
697
916
 
698
- const normalizeConfig = (attr, config) => {
699
- const defaultMapping = { selector: '', property: kebabCase(attr) };
917
+ const normalizeConfig$1 = (attr, config) => {
918
+ const defaultMapping = { selector: '', property: kebabCase$1(attr) };
700
919
 
701
920
  if (!config || !Object.keys(config).length) return [defaultMapping];
702
921
 
@@ -705,30 +924,30 @@ const normalizeConfig = (attr, config) => {
705
924
  return [{ ...defaultMapping, ...config }];
706
925
  };
707
926
 
708
- const getFallbackVarName = (origVarName, suffix = 'fallback') => kebabCaseJoin(origVarName, suffix);
927
+ const getFallbackVarName$1 = (origVarName, suffix = 'fallback') => kebabCaseJoin$1(origVarName, suffix);
709
928
 
710
- const createStyle = (componentName, baseSelector, mappings) => {
711
- const style = new StyleBuilder();
929
+ const createStyle$1 = (componentName, baseSelector, mappings) => {
930
+ const style = new StyleBuilder$1();
712
931
  const createFallbackVar = (fallback, origVarName) => {
713
932
  if (!fallback) return '';
714
933
  if (typeof fallback === 'string') return fallback;
715
934
 
716
- const fallbackVarName = getFallbackVarName(origVarName, fallback?.suffix);
717
- return createCssVar(fallbackVarName, createFallbackVar(fallback.fallback, fallbackVarName));
935
+ const fallbackVarName = getFallbackVarName$1(origVarName, fallback?.suffix);
936
+ return createCssVar$1(fallbackVarName, createFallbackVar(fallback.fallback, fallbackVarName));
718
937
  };
719
938
 
720
939
  Object.keys(mappings).forEach((attr) => {
721
- const attrConfig = normalizeConfig(attr, mappings[attr]);
940
+ const attrConfig = normalizeConfig$1(attr, mappings[attr]);
722
941
 
723
- const cssVarName = getCssVarName(componentName, attr);
942
+ const cssVarName = getCssVarName$1(componentName, attr);
724
943
 
725
944
  attrConfig.forEach(
726
945
  ({ selector: relativeSelectorOrSelectorFn, property, important, fallback }) => {
727
946
  const fallbackValue = createFallbackVar(fallback, cssVarName);
728
947
  style.add(
729
- createCssSelector(baseSelector, relativeSelectorOrSelectorFn),
730
- isFunction(property) ? property() : property,
731
- createCssVar(cssVarName, fallbackValue) + (important ? '!important' : '')
948
+ createCssSelector$1(baseSelector, relativeSelectorOrSelectorFn),
949
+ isFunction$1(property) ? property() : property,
950
+ createCssVar$1(cssVarName, fallbackValue) + (important ? '!important' : '')
732
951
  );
733
952
  }
734
953
  );
@@ -737,36 +956,36 @@ const createStyle = (componentName, baseSelector, mappings) => {
737
956
  return style.toString();
738
957
  };
739
958
 
740
- const getFallbackVarsNames = (attr, origVarName, { fallback }) => {
959
+ const getFallbackVarsNames$1 = (attr, origVarName, { fallback }) => {
741
960
  if (!fallback) return {};
742
961
 
743
- const fallbackVarName = getFallbackVarName(origVarName, fallback.suffix);
744
- const fallbackAttrName = camelCaseJoin(attr, fallback.suffix || 'fallback');
962
+ const fallbackVarName = getFallbackVarName$1(origVarName, fallback.suffix);
963
+ const fallbackAttrName = camelCaseJoin$1(attr, fallback.suffix || 'fallback');
745
964
  return {
746
965
  [fallbackAttrName]: fallbackVarName,
747
- ...getFallbackVarsNames(fallbackAttrName, fallbackVarName, fallback),
966
+ ...getFallbackVarsNames$1(fallbackAttrName, fallbackVarName, fallback),
748
967
  };
749
968
  };
750
969
 
751
- const createCssVarsList = (componentName, mappings) =>
970
+ const createCssVarsList$1 = (componentName, mappings) =>
752
971
  Object.keys(mappings).reduce((acc, attr) => {
753
- const varName = getCssVarName(componentName, attr);
972
+ const varName = getCssVarName$1(componentName, attr);
754
973
 
755
974
  return Object.assign(
756
975
  acc,
757
976
  { [attr]: varName },
758
- getFallbackVarsNames(attr, varName, mappings[attr])
977
+ getFallbackVarsNames$1(attr, varName, mappings[attr])
759
978
  );
760
979
  }, {});
761
980
 
762
981
  // on some cases we need a selector to be more specific than another
763
982
  // for this we have this fn that generate a class selector multiple times
764
- const createClassSelectorSpecifier = (className, numOfRepeats) =>
983
+ const createClassSelectorSpecifier$1 = (className, numOfRepeats) =>
765
984
  Array(numOfRepeats).fill(`.${className}`).join('');
766
985
 
767
- const STYLE_OVERRIDE_ATTR_PREFIX = 'st';
986
+ const STYLE_OVERRIDE_ATTR_PREFIX$1 = 'st';
768
987
 
769
- const createStyleMixin =
988
+ const createStyleMixin$1 =
770
989
  ({ mappings = {}, componentNameOverride = '' }) =>
771
990
  (superclass) => {
772
991
  const componentName = componentNameOverride || superclass.componentName;
@@ -775,7 +994,7 @@ const createStyleMixin =
775
994
  static get cssVarList() {
776
995
  return {
777
996
  ...superclass.cssVarList,
778
- ...createCssVarsList(componentName, {
997
+ ...createCssVarsList$1(componentName, {
779
998
  ...mappings,
780
999
  }),
781
1000
  };
@@ -805,7 +1024,7 @@ const createStyleMixin =
805
1024
  constructor({
806
1025
  getRootElement,
807
1026
  componentNameSuffix = '',
808
- themeSection = BASE_THEME_SECTION,
1027
+ themeSection = BASE_THEME_SECTION$1,
809
1028
  baseSelector,
810
1029
  } = {}) {
811
1030
  super();
@@ -815,7 +1034,7 @@ const createStyleMixin =
815
1034
  this.#getRootElement = getRootElement;
816
1035
 
817
1036
  this.#styleAttributes = Object.keys(CustomStyleMixinClass.cssVarList).map((key) =>
818
- kebabCaseJoin(STYLE_OVERRIDE_ATTR_PREFIX, componentNameSuffix, key)
1037
+ kebabCaseJoin$1(STYLE_OVERRIDE_ATTR_PREFIX$1, componentNameSuffix, key)
819
1038
  );
820
1039
  }
821
1040
 
@@ -843,9 +1062,9 @@ const createStyleMixin =
843
1062
  this.#overrideStyleEle = document.createElement('style');
844
1063
  this.#overrideStyleEle.id = `style-mixin-overrides__${componentName}`;
845
1064
 
846
- const classSpecifier = createClassSelectorSpecifier(
1065
+ const classSpecifier = createClassSelectorSpecifier$1(
847
1066
  componentName,
848
- CSS_SELECTOR_SPECIFIER_MULTIPLY
1067
+ CSS_SELECTOR_SPECIFIER_MULTIPLY$1
849
1068
  );
850
1069
 
851
1070
  this.#overrideStyleEle.innerText = `:host(${classSpecifier}) {}`;
@@ -857,9 +1076,9 @@ const createStyleMixin =
857
1076
  const style = this.#overrideStyleEle?.sheet?.cssRules[0].style;
858
1077
  if (!style) return;
859
1078
 
860
- const varName = getCssVarName(
1079
+ const varName = getCssVarName$1(
861
1080
  componentName,
862
- attrName.replace(new RegExp(`^${STYLE_OVERRIDE_ATTR_PREFIX}-`), '')
1081
+ attrName.replace(new RegExp(`^${STYLE_OVERRIDE_ATTR_PREFIX$1}-`), '')
863
1082
  );
864
1083
 
865
1084
  if (value) style?.setProperty(varName, value);
@@ -889,8 +1108,8 @@ const createStyleMixin =
889
1108
  if (Object.keys(mappings).length) {
890
1109
  const themeStyle = document.createElement('style');
891
1110
  themeStyle.id = `style-mixin-mappings__${componentName}`;
892
- themeStyle.innerHTML = createStyle(
893
- kebabCaseJoin(componentName, this.#componentNameSuffix),
1111
+ themeStyle.innerHTML = createStyle$1(
1112
+ kebabCaseJoin$1(componentName, this.#componentNameSuffix),
894
1113
  this.#baseSelector,
895
1114
  mappings
896
1115
  );
@@ -914,7 +1133,7 @@ const createStyleMixin =
914
1133
  this.#createOverridesStyle();
915
1134
 
916
1135
  // this is instead attributeChangedCallback because we cannot use static methods in this case
917
- observeAttributes(this, this.#updateOverridesStyle.bind(this), {});
1136
+ observeAttributes$1(this, this.#updateOverridesStyle.bind(this), {});
918
1137
  }
919
1138
  }
920
1139
 
@@ -926,7 +1145,7 @@ const createStyleMixin =
926
1145
  };
927
1146
  };
928
1147
 
929
- const draggableMixin = (superclass) =>
1148
+ const draggableMixin$1 = (superclass) =>
930
1149
  class DraggableMixinClass extends superclass {
931
1150
  #styleEle = null;
932
1151
 
@@ -989,7 +1208,7 @@ const draggableMixin = (superclass) =>
989
1208
  }
990
1209
  };
991
1210
 
992
- const componentNameValidationMixin = (superclass) =>
1211
+ const componentNameValidationMixin$1 = (superclass) =>
993
1212
  class ComponentNameValidationMixinClass extends superclass {
994
1213
  #checkComponentName() {
995
1214
  const currentComponentName = this.localName;
@@ -1013,7 +1232,7 @@ const componentNameValidationMixin = (superclass) =>
1013
1232
  }
1014
1233
  };
1015
1234
 
1016
- const componentsContextMixin = (superclass) =>
1235
+ const componentsContextMixin$1 = (superclass) =>
1017
1236
  class ComponentsContextMixinClass extends superclass {
1018
1237
  updateComponentsContext(componentsContext) {
1019
1238
  this.dispatchEvent(
@@ -1026,7 +1245,7 @@ const componentsContextMixin = (superclass) =>
1026
1245
  }
1027
1246
  };
1028
1247
 
1029
- const hoverableMixin = (superclass) =>
1248
+ const hoverableMixin$1 = (superclass) =>
1030
1249
  class HoverableMixinClass extends superclass {
1031
1250
  init() {
1032
1251
  super.init?.();
@@ -1040,7 +1259,7 @@ const hoverableMixin = (superclass) =>
1040
1259
  }
1041
1260
  };
1042
1261
 
1043
- const booleanAttributesList = [
1262
+ const booleanAttributesList$1 = [
1044
1263
  'readonly',
1045
1264
  'focused',
1046
1265
  'invalid',
@@ -1064,23 +1283,23 @@ const booleanAttributesList = [
1064
1283
  'allow-custom-value',
1065
1284
  ];
1066
1285
 
1067
- const isBooleanAttribute = (attr) => {
1068
- return booleanAttributesList.includes(attr);
1286
+ const isBooleanAttribute$1 = (attr) => {
1287
+ return booleanAttributesList$1.includes(attr);
1069
1288
  };
1070
1289
  // we want all the valueless attributes to have "true" value
1071
1290
  // and all the falsy attribute to be removed
1072
- const normalizeBooleanAttributesMixin = (superclass) =>
1291
+ const normalizeBooleanAttributesMixin$1 = (superclass) =>
1073
1292
  class NormalizeBooleanAttributesMixinClass extends superclass {
1074
1293
  init() {
1075
1294
  super.init?.();
1076
1295
 
1077
- observeAttributes(
1296
+ observeAttributes$1(
1078
1297
  this,
1079
1298
  (attrs) =>
1080
1299
  attrs.forEach((attr) => {
1081
1300
  const attrVal = this.getAttribute(attr);
1082
1301
 
1083
- if (isBooleanAttribute(attr)) {
1302
+ if (isBooleanAttribute$1(attr)) {
1084
1303
  if (attrVal === '') {
1085
1304
  this.setAttribute(attr, 'true');
1086
1305
  } else if (attrVal === 'false') {
@@ -1098,7 +1317,7 @@ const normalizeBooleanAttributesMixin = (superclass) =>
1098
1317
  }
1099
1318
  };
1100
1319
 
1101
- const createBaseClass = ({ componentName, baseSelector = '' }) => {
1320
+ const createBaseClass$1 = ({ componentName, baseSelector = '' }) => {
1102
1321
  class DescopeBaseClass extends HTMLElement {
1103
1322
  static get componentName() {
1104
1323
  return componentName;
@@ -1151,11 +1370,11 @@ const createBaseClass = ({ componentName, baseSelector = '' }) => {
1151
1370
  }
1152
1371
  }
1153
1372
 
1154
- return compose(
1155
- componentNameValidationMixin,
1156
- hoverableMixin,
1157
- normalizeBooleanAttributesMixin,
1158
- componentsContextMixin
1373
+ return compose$1(
1374
+ componentNameValidationMixin$1,
1375
+ hoverableMixin$1,
1376
+ normalizeBooleanAttributesMixin$1,
1377
+ componentsContextMixin$1
1159
1378
  )(DescopeBaseClass);
1160
1379
  };
1161
1380
 
@@ -1180,14 +1399,14 @@ const createProxy = ({
1180
1399
  includeForwardProps = [],
1181
1400
  delegatesFocus = true,
1182
1401
  }) => {
1183
- class ProxyClass extends createBaseClass({ componentName, baseSelector: wrappedEleName }) {
1402
+ class ProxyClass extends createBaseClass$1({ componentName, baseSelector: wrappedEleName }) {
1184
1403
  #dispatchBlur = createDispatchEvent.bind(this, 'blur');
1185
1404
 
1186
1405
  #dispatchFocus = createDispatchEvent.bind(this, 'focus');
1187
1406
 
1188
1407
  constructor() {
1189
1408
  super().attachShadow({ mode: 'open', delegatesFocus }).innerHTML = `
1190
- <style id="create-proxy">${(isFunction(style) ? style() : style) || ''}</style>
1409
+ <style id="create-proxy">${(isFunction$1(style) ? style() : style) || ''}</style>
1191
1410
  <${wrappedEleName}>
1192
1411
  ${slots
1193
1412
  .map(
@@ -1224,813 +1443,6 @@ const createProxy = ({
1224
1443
  return ProxyClass;
1225
1444
  };
1226
1445
 
1227
- (function () {
1228
-
1229
- const refMap = new WeakMap();
1230
- const validityMap = new WeakMap();
1231
- const hiddenInputMap = new WeakMap();
1232
- const internalsMap = new WeakMap();
1233
- const validationMessageMap = new WeakMap();
1234
- const formsMap = new WeakMap();
1235
- const shadowHostsMap = new WeakMap();
1236
- const formElementsMap = new WeakMap();
1237
- const refValueMap = new WeakMap();
1238
- const upgradeMap = new WeakMap();
1239
- const shadowRootMap = new WeakMap();
1240
- const validationAnchorMap = new WeakMap();
1241
- const documentFragmentMap = new WeakMap();
1242
- const connectedCallbackMap = new WeakMap();
1243
- const validityUpgradeMap = new WeakMap();
1244
-
1245
- const aom = {
1246
- ariaAtomic: 'aria-atomic',
1247
- ariaAutoComplete: 'aria-autocomplete',
1248
- ariaBusy: 'aria-busy',
1249
- ariaChecked: 'aria-checked',
1250
- ariaColCount: 'aria-colcount',
1251
- ariaColIndex: 'aria-colindex',
1252
- ariaColIndexText: 'aria-colindextext',
1253
- ariaColSpan: 'aria-colspan',
1254
- ariaCurrent: 'aria-current',
1255
- ariaDisabled: 'aria-disabled',
1256
- ariaExpanded: 'aria-expanded',
1257
- ariaHasPopup: 'aria-haspopup',
1258
- ariaHidden: 'aria-hidden',
1259
- ariaInvalid: 'aria-invalid',
1260
- ariaKeyShortcuts: 'aria-keyshortcuts',
1261
- ariaLabel: 'aria-label',
1262
- ariaLevel: 'aria-level',
1263
- ariaLive: 'aria-live',
1264
- ariaModal: 'aria-modal',
1265
- ariaMultiLine: 'aria-multiline',
1266
- ariaMultiSelectable: 'aria-multiselectable',
1267
- ariaOrientation: 'aria-orientation',
1268
- ariaPlaceholder: 'aria-placeholder',
1269
- ariaPosInSet: 'aria-posinset',
1270
- ariaPressed: 'aria-pressed',
1271
- ariaReadOnly: 'aria-readonly',
1272
- ariaRelevant: 'aria-relevant',
1273
- ariaRequired: 'aria-required',
1274
- ariaRoleDescription: 'aria-roledescription',
1275
- ariaRowCount: 'aria-rowcount',
1276
- ariaRowIndex: 'aria-rowindex',
1277
- ariaRowIndexText: 'aria-rowindextext',
1278
- ariaRowSpan: 'aria-rowspan',
1279
- ariaSelected: 'aria-selected',
1280
- ariaSetSize: 'aria-setsize',
1281
- ariaSort: 'aria-sort',
1282
- ariaValueMax: 'aria-valuemax',
1283
- ariaValueMin: 'aria-valuemin',
1284
- ariaValueNow: 'aria-valuenow',
1285
- ariaValueText: 'aria-valuetext',
1286
- role: 'role'
1287
- };
1288
- const initAom = (ref, internals) => {
1289
- for (let key in aom) {
1290
- internals[key] = null;
1291
- let closureValue = null;
1292
- const attributeName = aom[key];
1293
- Object.defineProperty(internals, key, {
1294
- get() {
1295
- return closureValue;
1296
- },
1297
- set(value) {
1298
- closureValue = value;
1299
- if (ref.isConnected) {
1300
- ref.setAttribute(attributeName, value);
1301
- }
1302
- else {
1303
- upgradeMap.set(ref, internals);
1304
- }
1305
- }
1306
- });
1307
- }
1308
- };
1309
-
1310
- function initNode(node) {
1311
- const internals = internalsMap.get(node);
1312
- const { form } = internals;
1313
- initForm(node, form, internals);
1314
- initLabels(node, internals.labels);
1315
- }
1316
- const walkFieldset = (node, firstRender = false) => {
1317
- const walker = document.createTreeWalker(node, NodeFilter.SHOW_ELEMENT, {
1318
- acceptNode(node) {
1319
- return internalsMap.has(node) ?
1320
- NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1321
- }
1322
- });
1323
- let current = walker.nextNode();
1324
- const isCallNecessary = (!firstRender || node.disabled);
1325
- while (current) {
1326
- if (current.formDisabledCallback && isCallNecessary) {
1327
- setDisabled(current, node.disabled);
1328
- }
1329
- current = walker.nextNode();
1330
- }
1331
- };
1332
- const disabledOrNameObserverConfig = { attributes: true, attributeFilter: ['disabled', 'name'] };
1333
- const disabledOrNameObserver = mutationObserverExists() ? new MutationObserver((mutationsList) => {
1334
- for (const mutation of mutationsList) {
1335
- const target = mutation.target;
1336
- if (mutation.attributeName === 'disabled') {
1337
- if (target.constructor['formAssociated']) {
1338
- setDisabled(target, target.hasAttribute('disabled'));
1339
- }
1340
- else if (target.localName === 'fieldset') {
1341
- walkFieldset(target);
1342
- }
1343
- }
1344
- if (mutation.attributeName === 'name') {
1345
- if (target.constructor['formAssociated']) {
1346
- const internals = internalsMap.get(target);
1347
- const value = refValueMap.get(target);
1348
- internals.setFormValue(value);
1349
- }
1350
- }
1351
- }
1352
- }) : {};
1353
- function observerCallback(mutationList) {
1354
- mutationList.forEach(mutationRecord => {
1355
- const { addedNodes, removedNodes } = mutationRecord;
1356
- const added = Array.from(addedNodes);
1357
- const removed = Array.from(removedNodes);
1358
- added.forEach(node => {
1359
- if (internalsMap.has(node) && node.constructor['formAssociated']) {
1360
- initNode(node);
1361
- }
1362
- if (upgradeMap.has(node)) {
1363
- const internals = upgradeMap.get(node);
1364
- const aomKeys = Object.keys(aom);
1365
- aomKeys
1366
- .filter(key => internals[key] !== null)
1367
- .forEach(key => {
1368
- node.setAttribute(aom[key], internals[key]);
1369
- });
1370
- upgradeMap.delete(node);
1371
- }
1372
- if (validityUpgradeMap.has(node)) {
1373
- const internals = validityUpgradeMap.get(node);
1374
- node.setAttribute('internals-valid', internals.validity.valid.toString());
1375
- node.setAttribute('internals-invalid', (!internals.validity.valid).toString());
1376
- node.setAttribute('aria-invalid', (!internals.validity.valid).toString());
1377
- validityUpgradeMap.delete(node);
1378
- }
1379
- if (node.localName === 'form') {
1380
- const formElements = formElementsMap.get(node);
1381
- const walker = document.createTreeWalker(node, NodeFilter.SHOW_ELEMENT, {
1382
- acceptNode(node) {
1383
- return (internalsMap.has(node) && node.constructor['formAssociated'] && !(formElements && formElements.has(node))) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1384
- }
1385
- });
1386
- let current = walker.nextNode();
1387
- while (current) {
1388
- initNode(current);
1389
- current = walker.nextNode();
1390
- }
1391
- }
1392
- if (node.localName === 'fieldset') {
1393
- disabledOrNameObserver.observe?.(node, disabledOrNameObserverConfig);
1394
- walkFieldset(node, true);
1395
- }
1396
- });
1397
- removed.forEach(node => {
1398
- const internals = internalsMap.get(node);
1399
- if (internals && hiddenInputMap.get(internals)) {
1400
- removeHiddenInputs(internals);
1401
- }
1402
- if (shadowHostsMap.has(node)) {
1403
- const observer = shadowHostsMap.get(node);
1404
- observer.disconnect();
1405
- }
1406
- });
1407
- });
1408
- }
1409
- function fragmentObserverCallback(mutationList) {
1410
- mutationList.forEach(mutation => {
1411
- const { removedNodes } = mutation;
1412
- removedNodes.forEach(node => {
1413
- const observer = documentFragmentMap.get(mutation.target);
1414
- if (internalsMap.has(node)) {
1415
- upgradeInternals(node);
1416
- }
1417
- observer.disconnect();
1418
- });
1419
- });
1420
- }
1421
- const deferUpgrade = (fragment) => {
1422
- const observer = new MutationObserver(fragmentObserverCallback);
1423
- observer.observe?.(fragment, { childList: true });
1424
- documentFragmentMap.set(fragment, observer);
1425
- };
1426
- mutationObserverExists() ? new MutationObserver(observerCallback) : {};
1427
- const observerConfig = {
1428
- childList: true,
1429
- subtree: true
1430
- };
1431
-
1432
- const setDisabled = (ref, disabled) => {
1433
- ref.toggleAttribute('internals-disabled', disabled);
1434
- if (disabled) {
1435
- ref.setAttribute('aria-disabled', 'true');
1436
- }
1437
- else {
1438
- ref.removeAttribute('aria-disabled');
1439
- }
1440
- if (ref.formDisabledCallback) {
1441
- ref.formDisabledCallback.apply(ref, [disabled]);
1442
- }
1443
- };
1444
- const removeHiddenInputs = (internals) => {
1445
- const hiddenInputs = hiddenInputMap.get(internals);
1446
- hiddenInputs.forEach(hiddenInput => {
1447
- hiddenInput.remove();
1448
- });
1449
- hiddenInputMap.set(internals, []);
1450
- };
1451
- const createHiddenInput = (ref, internals) => {
1452
- const input = document.createElement('input');
1453
- input.type = 'hidden';
1454
- input.name = ref.getAttribute('name');
1455
- ref.after(input);
1456
- hiddenInputMap.get(internals).push(input);
1457
- return input;
1458
- };
1459
- const initRef = (ref, internals) => {
1460
- hiddenInputMap.set(internals, []);
1461
- disabledOrNameObserver.observe?.(ref, disabledOrNameObserverConfig);
1462
- };
1463
- const initLabels = (ref, labels) => {
1464
- if (labels.length) {
1465
- Array.from(labels).forEach(label => label.addEventListener('click', ref.click.bind(ref)));
1466
- let firstLabelId = labels[0].id;
1467
- if (!labels[0].id) {
1468
- firstLabelId = `${labels[0].htmlFor}_Label`;
1469
- labels[0].id = firstLabelId;
1470
- }
1471
- ref.setAttribute('aria-labelledby', firstLabelId);
1472
- }
1473
- };
1474
- const setFormValidity = (form) => {
1475
- const nativeControlValidity = Array.from(form.elements)
1476
- .filter((element) => !element.tagName.includes('-') && element.validity)
1477
- .map((element) => element.validity.valid);
1478
- const polyfilledElements = formElementsMap.get(form) || [];
1479
- const polyfilledValidity = Array.from(polyfilledElements)
1480
- .filter(control => control.isConnected)
1481
- .map((control) => internalsMap.get(control).validity.valid);
1482
- const hasInvalid = [...nativeControlValidity, ...polyfilledValidity].includes(false);
1483
- form.toggleAttribute('internals-invalid', hasInvalid);
1484
- form.toggleAttribute('internals-valid', !hasInvalid);
1485
- };
1486
- const formInputCallback = (event) => {
1487
- setFormValidity(findParentForm(event.target));
1488
- };
1489
- const formChangeCallback = (event) => {
1490
- setFormValidity(findParentForm(event.target));
1491
- };
1492
- const wireSubmitLogic = (form) => {
1493
- const submitButtonSelector = ['button[type=submit]', 'input[type=submit]', 'button:not([type])']
1494
- .map(sel => `${sel}:not([disabled])`)
1495
- .map(sel => `${sel}:not([form])${form.id ? `,${sel}[form='${form.id}']` : ''}`)
1496
- .join(',');
1497
- form.addEventListener('click', event => {
1498
- const target = event.target;
1499
- if (target.closest(submitButtonSelector)) {
1500
- const elements = formElementsMap.get(form);
1501
- if (form.noValidate) {
1502
- return;
1503
- }
1504
- if (elements.size) {
1505
- const nodes = Array.from(elements);
1506
- const validityList = nodes
1507
- .reverse()
1508
- .map(node => {
1509
- const internals = internalsMap.get(node);
1510
- return internals.reportValidity();
1511
- });
1512
- if (validityList.includes(false)) {
1513
- event.preventDefault();
1514
- }
1515
- }
1516
- }
1517
- });
1518
- };
1519
- const formResetCallback = (event) => {
1520
- const elements = formElementsMap.get(event.target);
1521
- if (elements && elements.size) {
1522
- elements.forEach(element => {
1523
- if (element.constructor.formAssociated && element.formResetCallback) {
1524
- element.formResetCallback.apply(element);
1525
- }
1526
- });
1527
- }
1528
- };
1529
- const initForm = (ref, form, internals) => {
1530
- if (form) {
1531
- const formElements = formElementsMap.get(form);
1532
- if (formElements) {
1533
- formElements.add(ref);
1534
- }
1535
- else {
1536
- const initSet = new Set();
1537
- initSet.add(ref);
1538
- formElementsMap.set(form, initSet);
1539
- wireSubmitLogic(form);
1540
- form.addEventListener('reset', formResetCallback);
1541
- form.addEventListener('input', formInputCallback);
1542
- form.addEventListener('change', formChangeCallback);
1543
- }
1544
- formsMap.set(form, { ref, internals });
1545
- if (ref.constructor['formAssociated'] && ref.formAssociatedCallback) {
1546
- setTimeout(() => {
1547
- ref.formAssociatedCallback.apply(ref, [form]);
1548
- }, 0);
1549
- }
1550
- setFormValidity(form);
1551
- }
1552
- };
1553
- const findParentForm = (elem) => {
1554
- let parent = elem.parentNode;
1555
- if (parent && parent.tagName !== 'FORM') {
1556
- parent = findParentForm(parent);
1557
- }
1558
- return parent;
1559
- };
1560
- const throwIfNotFormAssociated = (ref, message, ErrorType = DOMException) => {
1561
- if (!ref.constructor['formAssociated']) {
1562
- throw new ErrorType(message);
1563
- }
1564
- };
1565
- const overrideFormMethod = (form, returnValue, method) => {
1566
- const elements = formElementsMap.get(form);
1567
- if (elements && elements.size) {
1568
- elements.forEach(element => {
1569
- const internals = internalsMap.get(element);
1570
- const valid = internals[method]();
1571
- if (!valid) {
1572
- returnValue = false;
1573
- }
1574
- });
1575
- }
1576
- return returnValue;
1577
- };
1578
- const upgradeInternals = (ref) => {
1579
- if (ref.constructor['formAssociated']) {
1580
- const internals = internalsMap.get(ref);
1581
- const { labels, form } = internals;
1582
- initLabels(ref, labels);
1583
- initForm(ref, form, internals);
1584
- }
1585
- };
1586
- function mutationObserverExists() {
1587
- return typeof MutationObserver !== 'undefined';
1588
- }
1589
-
1590
- class ValidityState {
1591
- constructor() {
1592
- this.badInput = false;
1593
- this.customError = false;
1594
- this.patternMismatch = false;
1595
- this.rangeOverflow = false;
1596
- this.rangeUnderflow = false;
1597
- this.stepMismatch = false;
1598
- this.tooLong = false;
1599
- this.tooShort = false;
1600
- this.typeMismatch = false;
1601
- this.valid = true;
1602
- this.valueMissing = false;
1603
- Object.seal(this);
1604
- }
1605
- }
1606
- const setValid = (validityObject) => {
1607
- validityObject.badInput = false;
1608
- validityObject.customError = false;
1609
- validityObject.patternMismatch = false;
1610
- validityObject.rangeOverflow = false;
1611
- validityObject.rangeUnderflow = false;
1612
- validityObject.stepMismatch = false;
1613
- validityObject.tooLong = false;
1614
- validityObject.tooShort = false;
1615
- validityObject.typeMismatch = false;
1616
- validityObject.valid = true;
1617
- validityObject.valueMissing = false;
1618
- return validityObject;
1619
- };
1620
- const reconcileValidity = (validityObject, newState, form) => {
1621
- validityObject.valid = isValid(newState);
1622
- Object.keys(newState).forEach(key => validityObject[key] = newState[key]);
1623
- if (form) {
1624
- setFormValidity(form);
1625
- }
1626
- return validityObject;
1627
- };
1628
- const isValid = (validityState) => {
1629
- let valid = true;
1630
- for (let key in validityState) {
1631
- if (key !== 'valid' && validityState[key] !== false) {
1632
- valid = false;
1633
- }
1634
- }
1635
- return valid;
1636
- };
1637
-
1638
- const customStateMap = new WeakMap();
1639
- function addState(ref, stateName) {
1640
- ref.toggleAttribute(stateName, true);
1641
- if (ref.part) {
1642
- ref.part.add(stateName);
1643
- }
1644
- }
1645
- class CustomStateSet extends Set {
1646
- static get isPolyfilled() {
1647
- return true;
1648
- }
1649
- constructor(ref) {
1650
- super();
1651
- if (!ref || !ref.tagName || ref.tagName.indexOf('-') === -1) {
1652
- throw new TypeError('Illegal constructor');
1653
- }
1654
- customStateMap.set(this, ref);
1655
- }
1656
- add(state) {
1657
- if (!/^--/.test(state) || typeof state !== 'string') {
1658
- throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${state} must start with '--'.`);
1659
- }
1660
- const result = super.add(state);
1661
- const ref = customStateMap.get(this);
1662
- const stateName = `state${state}`;
1663
- if (ref.isConnected) {
1664
- addState(ref, stateName);
1665
- }
1666
- else {
1667
- setTimeout(() => {
1668
- addState(ref, stateName);
1669
- });
1670
- }
1671
- return result;
1672
- }
1673
- clear() {
1674
- for (let [entry] of this.entries()) {
1675
- this.delete(entry);
1676
- }
1677
- super.clear();
1678
- }
1679
- delete(state) {
1680
- const result = super.delete(state);
1681
- const ref = customStateMap.get(this);
1682
- if (ref.isConnected) {
1683
- ref.toggleAttribute(`state${state}`, false);
1684
- if (ref.part) {
1685
- ref.part.remove(`state${state}`);
1686
- }
1687
- }
1688
- else {
1689
- setTimeout(() => {
1690
- ref.toggleAttribute(`state${state}`, false);
1691
- if (ref.part) {
1692
- ref.part.remove(`state${state}`);
1693
- }
1694
- });
1695
- }
1696
- return result;
1697
- }
1698
- }
1699
-
1700
- function __classPrivateFieldGet(receiver, state, kind, f) {
1701
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
1702
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
1703
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
1704
- }
1705
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
1706
- if (kind === "m") throw new TypeError("Private method is not writable");
1707
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
1708
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
1709
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
1710
- }
1711
-
1712
- var _HTMLFormControlsCollection_elements;
1713
- class HTMLFormControlsCollection {
1714
- constructor(elements) {
1715
- _HTMLFormControlsCollection_elements.set(this, void 0);
1716
- __classPrivateFieldSet(this, _HTMLFormControlsCollection_elements, elements, "f");
1717
- for (let i = 0; i < elements.length; i++) {
1718
- let element = elements[i];
1719
- this[i] = element;
1720
- if (element.hasAttribute('name')) {
1721
- this[element.getAttribute('name')] = element;
1722
- }
1723
- }
1724
- Object.freeze(this);
1725
- }
1726
- get length() {
1727
- return __classPrivateFieldGet(this, _HTMLFormControlsCollection_elements, "f").length;
1728
- }
1729
- [(_HTMLFormControlsCollection_elements = new WeakMap(), Symbol.iterator)]() {
1730
- return __classPrivateFieldGet(this, _HTMLFormControlsCollection_elements, "f")[Symbol.iterator]();
1731
- }
1732
- item(i) {
1733
- return this[i] == null ? null : this[i];
1734
- }
1735
- namedItem(name) {
1736
- return this[name] == null ? null : this[name];
1737
- }
1738
- }
1739
-
1740
- function patchFormPrototype() {
1741
- const checkValidity = HTMLFormElement.prototype.checkValidity;
1742
- HTMLFormElement.prototype.checkValidity = checkValidityOverride;
1743
- const reportValidity = HTMLFormElement.prototype.reportValidity;
1744
- HTMLFormElement.prototype.reportValidity = reportValidityOverride;
1745
- function checkValidityOverride(...args) {
1746
- let returnValue = checkValidity.apply(this, args);
1747
- return overrideFormMethod(this, returnValue, 'checkValidity');
1748
- }
1749
- function reportValidityOverride(...args) {
1750
- let returnValue = reportValidity.apply(this, args);
1751
- return overrideFormMethod(this, returnValue, 'reportValidity');
1752
- }
1753
- const { get } = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, 'elements');
1754
- Object.defineProperty(HTMLFormElement.prototype, 'elements', {
1755
- get(...args) {
1756
- const elements = get.call(this, ...args);
1757
- const polyfilledElements = Array.from(formElementsMap.get(this) || []);
1758
- if (polyfilledElements.length === 0) {
1759
- return elements;
1760
- }
1761
- const orderedElements = Array.from(elements).concat(polyfilledElements).sort((a, b) => {
1762
- if (a.compareDocumentPosition) {
1763
- return a.compareDocumentPosition(b) & 2 ? 1 : -1;
1764
- }
1765
- return 0;
1766
- });
1767
- return new HTMLFormControlsCollection(orderedElements);
1768
- },
1769
- });
1770
- }
1771
-
1772
- class ElementInternals {
1773
- static get isPolyfilled() {
1774
- return true;
1775
- }
1776
- constructor(ref) {
1777
- if (!ref || !ref.tagName || ref.tagName.indexOf('-') === -1) {
1778
- throw new TypeError('Illegal constructor');
1779
- }
1780
- const rootNode = ref.getRootNode();
1781
- const validity = new ValidityState();
1782
- this.states = new CustomStateSet(ref);
1783
- refMap.set(this, ref);
1784
- validityMap.set(this, validity);
1785
- internalsMap.set(ref, this);
1786
- initAom(ref, this);
1787
- initRef(ref, this);
1788
- Object.seal(this);
1789
- if (rootNode instanceof DocumentFragment) {
1790
- deferUpgrade(rootNode);
1791
- }
1792
- }
1793
- checkValidity() {
1794
- const ref = refMap.get(this);
1795
- throwIfNotFormAssociated(ref, `Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element.`);
1796
- if (!this.willValidate) {
1797
- return true;
1798
- }
1799
- const validity = validityMap.get(this);
1800
- if (!validity.valid) {
1801
- const validityEvent = new Event('invalid', {
1802
- bubbles: false,
1803
- cancelable: true,
1804
- composed: false
1805
- });
1806
- ref.dispatchEvent(validityEvent);
1807
- }
1808
- return validity.valid;
1809
- }
1810
- get form() {
1811
- const ref = refMap.get(this);
1812
- throwIfNotFormAssociated(ref, `Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.`);
1813
- let form;
1814
- if (ref.constructor['formAssociated'] === true) {
1815
- form = findParentForm(ref);
1816
- }
1817
- return form;
1818
- }
1819
- get labels() {
1820
- const ref = refMap.get(this);
1821
- throwIfNotFormAssociated(ref, `Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.`);
1822
- const id = ref.getAttribute('id');
1823
- const hostRoot = ref.getRootNode();
1824
- if (hostRoot && id) {
1825
- return hostRoot.querySelectorAll(`[for="${id}"]`);
1826
- }
1827
- return [];
1828
- }
1829
- reportValidity() {
1830
- const ref = refMap.get(this);
1831
- throwIfNotFormAssociated(ref, `Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.`);
1832
- if (!this.willValidate) {
1833
- return true;
1834
- }
1835
- const valid = this.checkValidity();
1836
- const anchor = validationAnchorMap.get(this);
1837
- if (anchor && !ref.constructor['formAssociated']) {
1838
- throw new DOMException(`Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.`);
1839
- }
1840
- if (!valid && anchor) {
1841
- ref.focus();
1842
- anchor.focus();
1843
- }
1844
- return valid;
1845
- }
1846
- setFormValue(value) {
1847
- const ref = refMap.get(this);
1848
- throwIfNotFormAssociated(ref, `Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element.`);
1849
- removeHiddenInputs(this);
1850
- if (value != null && !(value instanceof FormData)) {
1851
- if (ref.getAttribute('name')) {
1852
- const hiddenInput = createHiddenInput(ref, this);
1853
- hiddenInput.value = value;
1854
- }
1855
- }
1856
- else if (value != null && value instanceof FormData) {
1857
- Array.from(value).reverse().forEach(([formDataKey, formDataValue]) => {
1858
- if (typeof formDataValue === 'string') {
1859
- const hiddenInput = createHiddenInput(ref, this);
1860
- hiddenInput.name = formDataKey;
1861
- hiddenInput.value = formDataValue;
1862
- }
1863
- });
1864
- }
1865
- refValueMap.set(ref, value);
1866
- }
1867
- setValidity(validityChanges, validationMessage, anchor) {
1868
- const ref = refMap.get(this);
1869
- throwIfNotFormAssociated(ref, `Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element.`);
1870
- if (!validityChanges) {
1871
- throw new TypeError('Failed to execute \'setValidity\' on \'ElementInternals\': 1 argument required, but only 0 present.');
1872
- }
1873
- validationAnchorMap.set(this, anchor);
1874
- const validity = validityMap.get(this);
1875
- const validityChangesObj = {};
1876
- for (const key in validityChanges) {
1877
- validityChangesObj[key] = validityChanges[key];
1878
- }
1879
- if (Object.keys(validityChangesObj).length === 0) {
1880
- setValid(validity);
1881
- }
1882
- const check = { ...validity, ...validityChangesObj };
1883
- delete check.valid;
1884
- const { valid } = reconcileValidity(validity, check, this.form);
1885
- if (!valid && !validationMessage) {
1886
- throw new DOMException(`Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.`);
1887
- }
1888
- validationMessageMap.set(this, valid ? '' : validationMessage);
1889
- if (ref.isConnected) {
1890
- ref.toggleAttribute('internals-invalid', !valid);
1891
- ref.toggleAttribute('internals-valid', valid);
1892
- ref.setAttribute('aria-invalid', `${!valid}`);
1893
- }
1894
- else {
1895
- validityUpgradeMap.set(ref, this);
1896
- }
1897
- }
1898
- get shadowRoot() {
1899
- const ref = refMap.get(this);
1900
- const shadowRoot = shadowRootMap.get(ref);
1901
- if (shadowRoot) {
1902
- return shadowRoot;
1903
- }
1904
- return null;
1905
- }
1906
- get validationMessage() {
1907
- const ref = refMap.get(this);
1908
- throwIfNotFormAssociated(ref, `Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element.`);
1909
- return validationMessageMap.get(this);
1910
- }
1911
- get validity() {
1912
- const ref = refMap.get(this);
1913
- throwIfNotFormAssociated(ref, `Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element.`);
1914
- const validity = validityMap.get(this);
1915
- return validity;
1916
- }
1917
- get willValidate() {
1918
- const ref = refMap.get(this);
1919
- throwIfNotFormAssociated(ref, `Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element.`);
1920
- if ((ref.disabled || ref.hasAttribute('disabled')) ||
1921
- ref.hasAttribute('readonly')) {
1922
- return false;
1923
- }
1924
- return true;
1925
- }
1926
- }
1927
- function isElementInternalsSupported() {
1928
- if (typeof window === 'undefined' || !window.ElementInternals || !HTMLElement.prototype.attachInternals) {
1929
- return false;
1930
- }
1931
- class ElementInternalsFeatureDetection extends HTMLElement {
1932
- constructor() {
1933
- super();
1934
- this.internals = this.attachInternals();
1935
- }
1936
- }
1937
- const randomName = `element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g, '')}`;
1938
- customElements.define(randomName, ElementInternalsFeatureDetection);
1939
- const featureDetectionElement = new ElementInternalsFeatureDetection();
1940
- return [
1941
- 'shadowRoot',
1942
- 'form',
1943
- 'willValidate',
1944
- 'validity',
1945
- 'validationMessage',
1946
- 'labels',
1947
- 'setFormValue',
1948
- 'setValidity',
1949
- 'checkValidity',
1950
- 'reportValidity'
1951
- ].every(prop => prop in featureDetectionElement.internals);
1952
- }
1953
- if (!isElementInternalsSupported()) {
1954
- if (typeof window !== 'undefined') {
1955
- window.ElementInternals = ElementInternals;
1956
- }
1957
- if (typeof CustomElementRegistry !== 'undefined') {
1958
- const define = CustomElementRegistry.prototype.define;
1959
- CustomElementRegistry.prototype.define = function (name, constructor, options) {
1960
- if (constructor.formAssociated) {
1961
- const connectedCallback = constructor.prototype.connectedCallback;
1962
- constructor.prototype.connectedCallback = function () {
1963
- if (!connectedCallbackMap.has(this)) {
1964
- connectedCallbackMap.set(this, true);
1965
- if (this.hasAttribute('disabled')) {
1966
- setDisabled(this, true);
1967
- }
1968
- }
1969
- if (connectedCallback != null) {
1970
- connectedCallback.apply(this);
1971
- }
1972
- upgradeInternals(this);
1973
- };
1974
- }
1975
- define.call(this, name, constructor, options);
1976
- };
1977
- }
1978
- if (typeof HTMLElement !== 'undefined') {
1979
- HTMLElement.prototype.attachInternals = function () {
1980
- if (!this.tagName) {
1981
- return {};
1982
- }
1983
- else if (this.tagName.indexOf('-') === -1) {
1984
- throw new Error(`Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.`);
1985
- }
1986
- if (internalsMap.has(this)) {
1987
- throw new DOMException(`DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.`);
1988
- }
1989
- return new ElementInternals(this);
1990
- };
1991
- }
1992
- if (typeof Element !== 'undefined') {
1993
- function attachShadowObserver(...args) {
1994
- const shadowRoot = attachShadow.apply(this, args);
1995
- shadowRootMap.set(this, shadowRoot);
1996
- if (mutationObserverExists()) {
1997
- const observer = new MutationObserver(observerCallback);
1998
- if (window.ShadyDOM) {
1999
- observer.observe(this, observerConfig);
2000
- }
2001
- else {
2002
- observer.observe(shadowRoot, observerConfig);
2003
- }
2004
- shadowHostsMap.set(this, observer);
2005
- }
2006
- return shadowRoot;
2007
- }
2008
- const attachShadow = Element.prototype.attachShadow;
2009
- Element.prototype.attachShadow = attachShadowObserver;
2010
- }
2011
- if (mutationObserverExists() && typeof document !== 'undefined') {
2012
- const documentObserver = new MutationObserver(observerCallback);
2013
- documentObserver.observe(document.documentElement, observerConfig);
2014
- }
2015
- if (typeof HTMLFormElement !== 'undefined') {
2016
- patchFormPrototype();
2017
- }
2018
- if (typeof window !== 'undefined' && !window.CustomStateSet) {
2019
- window.CustomStateSet = CustomStateSet;
2020
- }
2021
- }
2022
- else if (typeof window !== 'undefined' && !window.CustomStateSet) {
2023
- window.CustomStateSet = CustomStateSet;
2024
- const attachInternals = HTMLElement.prototype.attachInternals;
2025
- HTMLElement.prototype.attachInternals = function (...args) {
2026
- const internals = attachInternals.call(this, args);
2027
- internals.states = new CustomStateSet(this);
2028
- return internals;
2029
- };
2030
- }
2031
-
2032
- })();
2033
-
2034
1446
  const observedAttributes$4 = ['required', 'pattern'];
2035
1447
 
2036
1448
  const errorAttributes = {
@@ -2427,7 +1839,7 @@ const proxyInputMixin =
2427
1839
 
2428
1840
  this.setSelectionRange = this.inputElement?.setSelectionRange?.bind(this.inputElement);
2429
1841
 
2430
- forwardAttrs(this, this.inputElement, { includeAttrs: ['inputmode'] });
1842
+ forwardAttrs$1(this, this.inputElement, { includeAttrs: ['inputmode'] });
2431
1843
  });
2432
1844
 
2433
1845
  if (proxyParentValidation) {
@@ -2468,12 +1880,12 @@ const proxyInputMixin =
2468
1880
  };
2469
1881
 
2470
1882
  const composedProxyInputMixin = (proxyInputMixinConfig) =>
2471
- compose(
1883
+ compose$1(
2472
1884
  proxyInputMixin(proxyInputMixinConfig),
2473
1885
  // in order to use input-wrapper across all our input components, we need to inject its theme
2474
1886
  // to every proxy input mixin, to allow its css vars to be scoped properly and accessible
2475
1887
  // in the proxy input component
2476
- createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') })
1888
+ createStyleMixin$1({ componentNameOverride: getComponentName$1('input-wrapper') })
2477
1889
  );
2478
1890
 
2479
1891
  // this is needed because we might generate the same css vars names
@@ -2517,7 +1929,7 @@ const portalMixin =
2517
1929
  (superclass) => {
2518
1930
  const eleDisplayName = name || sanitizeSelector(selector);
2519
1931
 
2520
- const BaseClass = createStyleMixin({
1932
+ const BaseClass = createStyleMixin$1({
2521
1933
  mappings,
2522
1934
  })(superclass);
2523
1935
 
@@ -2525,8 +1937,8 @@ const portalMixin =
2525
1937
  static get cssVarList() {
2526
1938
  return {
2527
1939
  ...BaseClass.cssVarList,
2528
- [eleDisplayName]: createCssVarsList(
2529
- kebabCaseJoin(superclass.componentName, DISPLAY_NAME_SEPARATOR + eleDisplayName),
1940
+ [eleDisplayName]: createCssVarsList$1(
1941
+ kebabCaseJoin$1(superclass.componentName, DISPLAY_NAME_SEPARATOR + eleDisplayName),
2530
1942
  mappings
2531
1943
  ),
2532
1944
  };
@@ -2573,7 +1985,7 @@ const portalMixin =
2573
1985
  async init() {
2574
1986
  super.init?.();
2575
1987
  const portalEle = await this.#portalEle;
2576
- forwardAttrs(this, portalEle, {
1988
+ forwardAttrs$1(this, portalEle, {
2577
1989
  [include ? 'includeAttrs' : 'excludeAttrs']: attributes,
2578
1990
  });
2579
1991
 
@@ -2988,9 +2400,9 @@ const createIcon = async (src) => {
2988
2400
 
2989
2401
  /* eslint-disable no-use-before-define */
2990
2402
 
2991
- const componentName$11 = getComponentName('icon');
2403
+ const componentName$11 = getComponentName$1('icon');
2992
2404
 
2993
- class RawIcon extends createBaseClass({ componentName: componentName$11, baseSelector: 'slot' }) {
2405
+ class RawIcon extends createBaseClass$1({ componentName: componentName$11, baseSelector: 'slot' }) {
2994
2406
  static get observedAttributes() {
2995
2407
  return ['src'];
2996
2408
  }
@@ -3054,14 +2466,14 @@ class RawIcon extends createBaseClass({ componentName: componentName$11, baseSel
3054
2466
  }
3055
2467
  }
3056
2468
 
3057
- const IconClass = compose(
3058
- createStyleMixin({
2469
+ const IconClass = compose$1(
2470
+ createStyleMixin$1({
3059
2471
  mappings: {
3060
2472
  fill: {},
3061
2473
  },
3062
2474
  }),
3063
- draggableMixin,
3064
- componentNameValidationMixin
2475
+ draggableMixin$1,
2476
+ componentNameValidationMixin$1
3065
2477
  )(RawIcon);
3066
2478
 
3067
2479
  const clickableMixin = (superclass) =>
@@ -3075,7 +2487,7 @@ const clickableMixin = (superclass) =>
3075
2487
  }
3076
2488
  };
3077
2489
 
3078
- const componentName$10 = getComponentName('button');
2490
+ const componentName$10 = getComponentName$1('button');
3079
2491
 
3080
2492
  const resetStyles = `
3081
2493
  :host {
@@ -3121,8 +2533,8 @@ const { host: host$o, label: label$a, slottedIcon } = {
3121
2533
 
3122
2534
  let loadingIndicatorStyles;
3123
2535
 
3124
- const ButtonClass = compose(
3125
- createStyleMixin({
2536
+ const ButtonClass = compose$1(
2537
+ createStyleMixin$1({
3126
2538
  mappings: {
3127
2539
  hostWidth: { property: 'width' },
3128
2540
  hostHeight: { property: 'height' },
@@ -3165,8 +2577,8 @@ const ButtonClass = compose(
3165
2577
  },
3166
2578
  }),
3167
2579
  clickableMixin,
3168
- draggableMixin,
3169
- componentNameValidationMixin
2580
+ draggableMixin$1,
2581
+ componentNameValidationMixin$1
3170
2582
  )(
3171
2583
  createProxy({
3172
2584
  slots: ['', 'prefix', 'label', 'suffix'],
@@ -3228,7 +2640,7 @@ loadingIndicatorStyles = `
3228
2640
  }
3229
2641
  `;
3230
2642
 
3231
- const globalRefs$z = getThemeRefs(globals);
2643
+ const globalRefs$z = getThemeRefs(globals$1);
3232
2644
  const compVars$6 = ButtonClass.cssVarList;
3233
2645
 
3234
2646
  const mode = {
@@ -3268,7 +2680,7 @@ const button = {
3268
2680
  [compVars$6.verticalPadding]: '1em',
3269
2681
  [compVars$6.horizontalPadding]: '0.875em',
3270
2682
 
3271
- [compVars$6.outlineWidth]: globals.border.sm,
2683
+ [compVars$6.outlineWidth]: globals$1.border.sm,
3272
2684
  [compVars$6.outlineOffset]: '0px', // keep `px` unit for external calc
3273
2685
  [compVars$6.outlineStyle]: 'solid',
3274
2686
  [compVars$6.outlineColor]: 'transparent',
@@ -3659,7 +3071,7 @@ const inputFloatingLabelStyle = () => {
3659
3071
  `;
3660
3072
  };
3661
3073
 
3662
- const componentName$$ = getComponentName('text-field');
3074
+ const componentName$$ = getComponentName$1('text-field');
3663
3075
 
3664
3076
  const observedAttrs$2 = ['type', 'label-type', 'copy-to-clipboard'];
3665
3077
 
@@ -3740,13 +3152,13 @@ const customMixin$c = (superclass) =>
3740
3152
  }
3741
3153
  };
3742
3154
 
3743
- const TextFieldClass = compose(
3744
- createStyleMixin({
3155
+ const TextFieldClass = compose$1(
3156
+ createStyleMixin$1({
3745
3157
  mappings: textFieldMappings,
3746
3158
  }),
3747
- draggableMixin,
3159
+ draggableMixin$1,
3748
3160
  composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),
3749
- componentNameValidationMixin,
3161
+ componentNameValidationMixin$1,
3750
3162
  customMixin$c
3751
3163
  )(
3752
3164
  createProxy({
@@ -3785,8 +3197,8 @@ const TextFieldClass = compose(
3785
3197
  })
3786
3198
  );
3787
3199
 
3788
- const componentName$_ = getComponentName('input-wrapper');
3789
- const globalRefs$y = getThemeRefs(globals);
3200
+ const componentName$_ = getComponentName$1('input-wrapper');
3201
+ const globalRefs$y = getThemeRefs(globals$1);
3790
3202
 
3791
3203
  const [theme$1, refs, vars$S] = createHelperVars(
3792
3204
  {
@@ -3916,7 +3328,7 @@ var inputWrapper = /*#__PURE__*/Object.freeze({
3916
3328
  vars: vars$S
3917
3329
  });
3918
3330
 
3919
- const globalRefs$x = getThemeRefs(globals);
3331
+ const globalRefs$x = getThemeRefs(globals$1);
3920
3332
  const vars$R = TextFieldClass.cssVarList;
3921
3333
 
3922
3334
  const textField$1 = {
@@ -4018,7 +3430,7 @@ const passwordDraggableMixin = (superclass) =>
4018
3430
  }
4019
3431
  };
4020
3432
 
4021
- const componentName$Z = getComponentName('password');
3433
+ const componentName$Z = getComponentName$1('password');
4022
3434
 
4023
3435
  const customMixin$b = (superclass) =>
4024
3436
  class PasswordFieldMixinClass extends superclass {
@@ -4150,8 +3562,8 @@ const {
4150
3562
  errorMessage: { selector: '::part(error-message)' },
4151
3563
  };
4152
3564
 
4153
- const PasswordClass = compose(
4154
- createStyleMixin({
3565
+ const PasswordClass = compose$1(
3566
+ createStyleMixin$1({
4155
3567
  mappings: {
4156
3568
  hostWidth: { ...host$m, property: 'width' },
4157
3569
  hostMinWidth: { ...host$m, property: 'min-width' },
@@ -4222,7 +3634,7 @@ const PasswordClass = compose(
4222
3634
  valueInputHeight: { ...inputElement$3, property: 'height' },
4223
3635
  },
4224
3636
  }),
4225
- draggableMixin,
3637
+ draggableMixin$1,
4226
3638
  externalInputMixin({
4227
3639
  inputType: 'password',
4228
3640
  inputName: 'password',
@@ -4230,7 +3642,7 @@ const PasswordClass = compose(
4230
3642
  noBlurDispatch: true,
4231
3643
  }),
4232
3644
  composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),
4233
- componentNameValidationMixin,
3645
+ componentNameValidationMixin$1,
4234
3646
  passwordDraggableMixin,
4235
3647
  customMixin$b
4236
3648
  )(
@@ -4303,7 +3715,7 @@ const PasswordClass = compose(
4303
3715
  })
4304
3716
  );
4305
3717
 
4306
- const globalRefs$w = getThemeRefs(globals);
3718
+ const globalRefs$w = getThemeRefs(globals$1);
4307
3719
  const vars$Q = PasswordClass.cssVarList;
4308
3720
 
4309
3721
  const password = {
@@ -4357,15 +3769,15 @@ var password$1 = /*#__PURE__*/Object.freeze({
4357
3769
  vars: vars$Q
4358
3770
  });
4359
3771
 
4360
- const componentName$Y = getComponentName('number-field');
3772
+ const componentName$Y = getComponentName$1('number-field');
4361
3773
 
4362
- const NumberFieldClass = compose(
4363
- createStyleMixin({
3774
+ const NumberFieldClass = compose$1(
3775
+ createStyleMixin$1({
4364
3776
  mappings: textFieldMappings,
4365
3777
  }),
4366
- draggableMixin,
3778
+ draggableMixin$1,
4367
3779
  composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
4368
- componentNameValidationMixin
3780
+ componentNameValidationMixin$1
4369
3781
  )(
4370
3782
  createProxy({
4371
3783
  slots: ['', 'prefix', 'suffix'],
@@ -4446,7 +3858,7 @@ var numberField$1 = /*#__PURE__*/Object.freeze({
4446
3858
  vars: vars$P
4447
3859
  });
4448
3860
 
4449
- const componentName$X = getComponentName('email-field');
3861
+ const componentName$X = getComponentName$1('email-field');
4450
3862
 
4451
3863
  const defaultPattern = "^[\\w\\.\\%\\+\\-']+@[\\w\\.\\-]+\\.[A-Za-z]{2,}$";
4452
3864
  const defaultAutocomplete = 'username';
@@ -4467,11 +3879,11 @@ const customMixin$a = (superclass) =>
4467
3879
  }
4468
3880
  };
4469
3881
 
4470
- const EmailFieldClass = compose(
4471
- createStyleMixin({
3882
+ const EmailFieldClass = compose$1(
3883
+ createStyleMixin$1({
4472
3884
  mappings: textFieldMappings,
4473
3885
  }),
4474
- draggableMixin,
3886
+ draggableMixin$1,
4475
3887
  externalInputMixin({
4476
3888
  inputType: 'email',
4477
3889
  inputName: 'email',
@@ -4479,7 +3891,7 @@ const EmailFieldClass = compose(
4479
3891
  includeAttrs: ['disabled', 'readonly', 'pattern'],
4480
3892
  }),
4481
3893
  composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),
4482
- componentNameValidationMixin,
3894
+ componentNameValidationMixin$1,
4483
3895
  customMixin$a
4484
3896
  )(
4485
3897
  createProxy({
@@ -4570,7 +3982,7 @@ var emailField$1 = /*#__PURE__*/Object.freeze({
4570
3982
  vars: vars$O
4571
3983
  });
4572
3984
 
4573
- const componentName$W = getComponentName('text-area');
3985
+ const componentName$W = getComponentName$1('text-area');
4574
3986
 
4575
3987
  const {
4576
3988
  host: host$l,
@@ -4592,8 +4004,8 @@ const {
4592
4004
  errorMessage: { selector: '::part(error-message)' },
4593
4005
  };
4594
4006
 
4595
- const TextAreaClass = compose(
4596
- createStyleMixin({
4007
+ const TextAreaClass = compose$1(
4008
+ createStyleMixin$1({
4597
4009
  mappings: {
4598
4010
  hostWidth: { ...host$l, property: 'width' },
4599
4011
  hostMinWidth: { ...host$l, property: 'min-width' },
@@ -4627,9 +4039,9 @@ const TextAreaClass = compose(
4627
4039
  inputTextAlign: { ...textArea$2, property: 'text-align' },
4628
4040
  },
4629
4041
  }),
4630
- draggableMixin,
4042
+ draggableMixin$1,
4631
4043
  composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
4632
- componentNameValidationMixin
4044
+ componentNameValidationMixin$1
4633
4045
  )(
4634
4046
  createProxy({
4635
4047
  slots: [],
@@ -4705,14 +4117,14 @@ var textArea$1 = /*#__PURE__*/Object.freeze({
4705
4117
  });
4706
4118
 
4707
4119
  const createBaseInputClass = (...args) =>
4708
- compose(
4120
+ compose$1(
4709
4121
  inputValidationMixin,
4710
4122
  changeMixin,
4711
- normalizeBooleanAttributesMixin,
4123
+ normalizeBooleanAttributesMixin$1,
4712
4124
  inputEventsDispatchingMixin
4713
- )(createBaseClass(...args));
4125
+ )(createBaseClass$1(...args));
4714
4126
 
4715
- const componentName$V = getComponentName('boolean-field-internal');
4127
+ const componentName$V = getComponentName$1('boolean-field-internal');
4716
4128
 
4717
4129
  createBaseInputClass({ componentName: componentName$V, baseSelector: 'div' });
4718
4130
 
@@ -4733,7 +4145,7 @@ const booleanFieldMixin = (superclass) =>
4733
4145
  this.inputElement = this.shadowRoot.querySelector(componentName$V);
4734
4146
  this.checkbox = this.inputElement.querySelector('vaadin-checkbox');
4735
4147
 
4736
- forwardAttrs(this, this.inputElement, {
4148
+ forwardAttrs$1(this, this.inputElement, {
4737
4149
  includeAttrs: [
4738
4150
  'required',
4739
4151
  'full-width',
@@ -4799,7 +4211,7 @@ descope-boolean-field-internal {
4799
4211
  }
4800
4212
  `;
4801
4213
 
4802
- const componentName$U = getComponentName('checkbox');
4214
+ const componentName$U = getComponentName$1('checkbox');
4803
4215
 
4804
4216
  const {
4805
4217
  host: host$k,
@@ -4821,8 +4233,8 @@ const {
4821
4233
  errorMessage: { selector: '::part(error-message)' },
4822
4234
  };
4823
4235
 
4824
- const CheckboxClass = compose(
4825
- createStyleMixin({
4236
+ const CheckboxClass = compose$1(
4237
+ createStyleMixin$1({
4826
4238
  mappings: {
4827
4239
  hostWidth: { ...host$k, property: 'width' },
4828
4240
  hostDirection: { ...host$k, property: 'direction' },
@@ -4865,9 +4277,9 @@ const CheckboxClass = compose(
4865
4277
  ],
4866
4278
  },
4867
4279
  }),
4868
- draggableMixin,
4280
+ draggableMixin$1,
4869
4281
  composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
4870
- componentNameValidationMixin,
4282
+ componentNameValidationMixin$1,
4871
4283
  booleanFieldMixin
4872
4284
  )(
4873
4285
  createProxy({
@@ -4960,7 +4372,7 @@ var checkbox$1 = /*#__PURE__*/Object.freeze({
4960
4372
  vars: vars$M
4961
4373
  });
4962
4374
 
4963
- const componentName$T = getComponentName('switch-toggle');
4375
+ const componentName$T = getComponentName$1('switch-toggle');
4964
4376
 
4965
4377
  const {
4966
4378
  host: host$j,
@@ -4982,8 +4394,8 @@ const {
4982
4394
  errorMessage: { selector: '::part(error-message)' },
4983
4395
  };
4984
4396
 
4985
- const SwitchToggleClass = compose(
4986
- createStyleMixin({
4397
+ const SwitchToggleClass = compose$1(
4398
+ createStyleMixin$1({
4987
4399
  mappings: {
4988
4400
  hostWidth: { ...host$j, property: 'width' },
4989
4401
  hostDirection: { ...host$j, property: 'direction' },
@@ -5033,9 +4445,9 @@ const SwitchToggleClass = compose(
5033
4445
  inputOutlineStyle: { ...track, property: 'outline-style' },
5034
4446
  },
5035
4447
  }),
5036
- draggableMixin,
4448
+ draggableMixin$1,
5037
4449
  composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
5038
- componentNameValidationMixin,
4450
+ componentNameValidationMixin$1,
5039
4451
  booleanFieldMixin
5040
4452
  )(
5041
4453
  createProxy({
@@ -5105,7 +4517,7 @@ const SwitchToggleClass = compose(
5105
4517
  const knobMargin = '2px';
5106
4518
  const checkboxHeight = '1.25em';
5107
4519
 
5108
- const globalRefs$v = getThemeRefs(globals);
4520
+ const globalRefs$v = getThemeRefs(globals$1);
5109
4521
  const vars$L = SwitchToggleClass.cssVarList;
5110
4522
 
5111
4523
  const switchToggle = {
@@ -5178,9 +4590,9 @@ var switchToggle$1 = /*#__PURE__*/Object.freeze({
5178
4590
  vars: vars$L
5179
4591
  });
5180
4592
 
5181
- const componentName$S = getComponentName('container');
4593
+ const componentName$S = getComponentName$1('container');
5182
4594
 
5183
- class RawContainer extends createBaseClass({ componentName: componentName$S, baseSelector: 'slot' }) {
4595
+ class RawContainer extends createBaseClass$1({ componentName: componentName$S, baseSelector: 'slot' }) {
5184
4596
  constructor() {
5185
4597
  super();
5186
4598
 
@@ -5202,8 +4614,8 @@ class RawContainer extends createBaseClass({ componentName: componentName$S, bas
5202
4614
  }
5203
4615
  }
5204
4616
 
5205
- const ContainerClass = compose(
5206
- createStyleMixin({
4617
+ const ContainerClass = compose$1(
4618
+ createStyleMixin$1({
5207
4619
  mappings: {
5208
4620
  hostHeight: { selector: () => ':host', property: 'height' },
5209
4621
  hostWidth: { selector: () => ':host', property: 'width' },
@@ -5235,11 +4647,11 @@ const ContainerClass = compose(
5235
4647
  boxShadow: {},
5236
4648
  },
5237
4649
  }),
5238
- draggableMixin,
5239
- componentNameValidationMixin
4650
+ draggableMixin$1,
4651
+ componentNameValidationMixin$1
5240
4652
  )(RawContainer);
5241
4653
 
5242
- const globalRefs$u = getThemeRefs(globals);
4654
+ const globalRefs$u = getThemeRefs(globals$1);
5243
4655
 
5244
4656
  const compVars$5 = ContainerClass.cssVarList;
5245
4657
 
@@ -5371,7 +4783,7 @@ const createCssVarImageClass = ({ componentName, varName, fallbackVarName }) =>
5371
4783
  let style;
5372
4784
  const getContent = () => style;
5373
4785
 
5374
- class RawCssVarImageClass extends createBaseClass({
4786
+ class RawCssVarImageClass extends createBaseClass$1({
5375
4787
  componentName,
5376
4788
  baseSelector: ':host > div',
5377
4789
  }) {
@@ -5399,8 +4811,8 @@ const createCssVarImageClass = ({ componentName, varName, fallbackVarName }) =>
5399
4811
  }
5400
4812
  }
5401
4813
 
5402
- const CssVarImageClass = compose(
5403
- createStyleMixin({
4814
+ const CssVarImageClass = compose$1(
4815
+ createStyleMixin$1({
5404
4816
  mappings: {
5405
4817
  height: { selector: () => ':host > div' },
5406
4818
  width: { selector: () => ':host > div' },
@@ -5408,75 +4820,749 @@ const createCssVarImageClass = ({ componentName, varName, fallbackVarName }) =>
5408
4820
  [fallbackVarName]: { property: 'content' },
5409
4821
  },
5410
4822
  }),
5411
- draggableMixin,
5412
- componentNameValidationMixin
4823
+ draggableMixin$1,
4824
+ componentNameValidationMixin$1
5413
4825
  )(RawCssVarImageClass);
5414
4826
 
5415
- style = `content: var(${CssVarImageClass.cssVarList[varName]}, var(${CssVarImageClass.cssVarList[fallbackVarName]}));`;
4827
+ style = `content: var(${CssVarImageClass.cssVarList[varName]}, var(${CssVarImageClass.cssVarList[fallbackVarName]}));`;
4828
+
4829
+ return CssVarImageClass;
4830
+ };
4831
+
4832
+ const componentName$R = getComponentName$1('logo');
4833
+
4834
+ const LogoClass = createCssVarImageClass({
4835
+ componentName: componentName$R,
4836
+ varName: 'url',
4837
+ fallbackVarName: 'fallbackUrl',
4838
+ });
4839
+
4840
+ const vars$J = LogoClass.cssVarList;
4841
+
4842
+ const logo$2 = {
4843
+ [vars$J.fallbackUrl]: 'url(https://imgs.descope.com/components/no-logo-placeholder.svg)',
4844
+ };
4845
+
4846
+ var logo$3 = /*#__PURE__*/Object.freeze({
4847
+ __proto__: null,
4848
+ default: logo$2,
4849
+ vars: vars$J
4850
+ });
4851
+
4852
+ const componentName$Q = getComponentName$1('totp-image');
4853
+
4854
+ const TotpImageClass = createCssVarImageClass({
4855
+ componentName: componentName$Q,
4856
+ varName: 'url',
4857
+ fallbackVarName: 'fallbackUrl',
4858
+ });
4859
+
4860
+ const vars$I = TotpImageClass.cssVarList;
4861
+
4862
+ const logo$1 = {
4863
+ [vars$I.fallbackUrl]: 'url(https://imgs.descope.com/components/totp-placeholder.svg)',
4864
+ };
4865
+
4866
+ var totpImage = /*#__PURE__*/Object.freeze({
4867
+ __proto__: null,
4868
+ default: logo$1,
4869
+ vars: vars$I
4870
+ });
4871
+
4872
+ const componentName$P = getComponentName$1('notp-image');
4873
+
4874
+ const NotpImageClass = createCssVarImageClass({
4875
+ componentName: componentName$P,
4876
+ varName: 'url',
4877
+ fallbackVarName: 'fallbackUrl',
4878
+ });
4879
+
4880
+ const vars$H = NotpImageClass.cssVarList;
4881
+
4882
+ const logo = {
4883
+ [vars$H.fallbackUrl]: 'url(https://imgs.descope.com/components/notp-placeholder.svg)',
4884
+ };
4885
+
4886
+ var notpImage = /*#__PURE__*/Object.freeze({
4887
+ __proto__: null,
4888
+ default: logo,
4889
+ vars: vars$H
4890
+ });
4891
+
4892
+ const direction = 'ltr';
4893
+
4894
+ const colors$1 = genColors$1({
4895
+ surface: {
4896
+ main: '#ffffff',
4897
+ dark: '#636c74',
4898
+ light: '#cfd3d7',
4899
+ highlight: '#f4f5f6',
4900
+ contrast: '#181a1c',
4901
+ },
4902
+ primary: {
4903
+ main: '#006af5',
4904
+ dark: '#004094',
4905
+ light: '#71aeff',
4906
+ highlight: '#f0f6ff',
4907
+ contrast: '#ffffff',
4908
+ },
4909
+ secondary: {
4910
+ main: '#802ed6',
4911
+ dark: '#6410bc',
4912
+ light: '#be89f5',
4913
+ highlight: '#ede7f6',
4914
+ contrast: '#ffffff',
4915
+ },
4916
+ success: {
4917
+ main: '#008000',
4918
+ dark: '#005700',
4919
+ light: '#8bc38b',
4920
+ highlight: '#f5faf5',
4921
+ contrast: '#ffffff',
4922
+ },
4923
+ error: {
4924
+ main: '#e21d12',
4925
+ dark: '#b3170f',
4926
+ light: '#f4807a',
4927
+ highlight: '#fef1f1',
4928
+ contrast: '#ffffff',
4929
+ },
4930
+ });
4931
+
4932
+ const fonts = {
4933
+ font1: {
4934
+ family: [
4935
+ 'Roboto',
4936
+ 'ui-sans-serif',
4937
+ 'system-ui',
4938
+ '-apple-system',
4939
+ 'BlinkMacSystemFont',
4940
+ 'Segoe UI',
4941
+ 'Helvetica Neue',
4942
+ 'Arial',
4943
+ 'Noto Sans',
4944
+ 'sans-serif',
4945
+ 'Apple Color Emoji',
4946
+ 'Segoe UI Emoji',
4947
+ 'Segoe UI Symbol',
4948
+ 'Noto Color Emoji',
4949
+ ],
4950
+ label: 'Roboto',
4951
+ url: 'https://fonts.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900',
4952
+ },
4953
+ font2: {
4954
+ family: [
4955
+ 'ui-sans-serif',
4956
+ 'system-ui',
4957
+ '-apple-system',
4958
+ 'BlinkMacSystemFont',
4959
+ 'Segoe UI',
4960
+ 'Roboto',
4961
+ 'Helvetica Neue',
4962
+ 'Arial',
4963
+ 'Noto Sans',
4964
+ 'sans-serif',
4965
+ 'Apple Color Emoji',
4966
+ 'Segoe UI Emoji',
4967
+ 'Segoe UI Symbol',
4968
+ 'Noto Color Emoji',
4969
+ ],
4970
+ label: 'Sans Serif',
4971
+ },
4972
+ };
4973
+
4974
+ const fontsRef = getThemeRefs$1({ fonts }).fonts;
4975
+
4976
+ const typography = {
4977
+ h1: {
4978
+ font: fontsRef.font1.family,
4979
+ weight: '900',
4980
+ size: '48px',
4981
+ },
4982
+ h2: {
4983
+ font: fontsRef.font1.family,
4984
+ weight: '800',
4985
+ size: '38px',
4986
+ },
4987
+ h3: {
4988
+ font: fontsRef.font1.family,
4989
+ weight: '600',
4990
+ size: '28px',
4991
+ },
4992
+ subtitle1: {
4993
+ font: fontsRef.font2.family,
4994
+ weight: '500',
4995
+ size: '22px',
4996
+ },
4997
+ subtitle2: {
4998
+ font: fontsRef.font2.family,
4999
+ weight: '400',
5000
+ size: '20px',
5001
+ },
5002
+ body1: {
5003
+ font: fontsRef.font1.family,
5004
+ weight: '400',
5005
+ size: '16px',
5006
+ },
5007
+ body2: {
5008
+ font: fontsRef.font1.family,
5009
+ weight: '400',
5010
+ size: '14px',
5011
+ },
5012
+ };
5013
+
5014
+ const spacing = {
5015
+ xs: '2px',
5016
+ sm: '4px',
5017
+ md: '8px',
5018
+ lg: '16px',
5019
+ xl: '32px',
5020
+ };
5021
+
5022
+ const border = {
5023
+ xs: '1px',
5024
+ sm: '2px',
5025
+ md: '3px',
5026
+ lg: '4px',
5027
+ xl: '5px',
5028
+ };
5029
+
5030
+ const radius = {
5031
+ xs: '5px',
5032
+ sm: '10px',
5033
+ md: '15px',
5034
+ lg: '20px',
5035
+ xl: '25px',
5036
+ '2xl': '30px',
5037
+ '3xl': '35px',
5038
+ };
5039
+
5040
+ const shadow$1 = {
5041
+ wide: {
5042
+ sm: '0 2px 3px -0.5px',
5043
+ md: '0 4px 6px -1px',
5044
+ lg: '0 10px 15px -3px',
5045
+ xl: '0 20px 25px -5px',
5046
+ '2xl': '0 25px 50px -12px',
5047
+ },
5048
+ narrow: {
5049
+ sm: '0 1px 2px -1px',
5050
+ md: '0 2px 4px -2px',
5051
+ lg: '0 4px 6px -4px',
5052
+ xl: '0 8px 10px -6px',
5053
+ '2xl': '0 16px 16px -8px',
5054
+ },
5055
+ };
5056
+
5057
+ const globals = {
5058
+ colors: colors$1,
5059
+ typography,
5060
+ spacing,
5061
+ border,
5062
+ radius,
5063
+ shadow: shadow$1,
5064
+ fonts,
5065
+ direction,
5066
+ };
5067
+ getThemeVars$1(globals);
5068
+
5069
+ const createCssVar = (varName, fallback) => `var(${varName}${fallback ? `, ${fallback}` : ''})`;
5070
+
5071
+ const createCssSelector = (baseSelector = '', relativeSelectorOrSelectorFn = '') =>
5072
+ isFunction(relativeSelectorOrSelectorFn)
5073
+ ? relativeSelectorOrSelectorFn(baseSelector)
5074
+ : `${baseSelector}${
5075
+ /^[A-Za-z]/.test(relativeSelectorOrSelectorFn)
5076
+ ? ` ${relativeSelectorOrSelectorFn}`
5077
+ : relativeSelectorOrSelectorFn
5078
+ }`;
5079
+
5080
+ class StyleBuilder {
5081
+ constructor() {
5082
+ this.styleMap = new Map();
5083
+ }
5084
+
5085
+ add(selector, property, value) {
5086
+ if (!this.styleMap.has(selector)) {
5087
+ this.styleMap.set(selector, []);
5088
+ }
5089
+
5090
+ this.styleMap.set(selector, [...this.styleMap.get(selector), { property, value }]);
5091
+ }
5092
+
5093
+ toString() {
5094
+ return Array.from(this.styleMap.entries()).reduce((acc, [selector, propValArr]) => {
5095
+ const properties = propValArr
5096
+ .map(({ property, value }) => `${property}: ${value}`)
5097
+ .join(';\n');
5098
+
5099
+ return `${acc}${selector} { \n${properties} \n}\n\n`;
5100
+ }, '');
5101
+ }
5102
+ }
5103
+
5104
+ const normalizeConfig = (attr, config) => {
5105
+ const defaultMapping = { selector: '', property: kebabCase(attr) };
5106
+
5107
+ if (!config || !Object.keys(config).length) return [defaultMapping];
5108
+
5109
+ if (Array.isArray(config)) return config.map((entry) => ({ ...defaultMapping, ...entry }));
5110
+
5111
+ return [{ ...defaultMapping, ...config }];
5112
+ };
5113
+
5114
+ const getFallbackVarName = (origVarName, suffix = 'fallback') => kebabCaseJoin(origVarName, suffix);
5115
+
5116
+ const createStyle = (componentName, baseSelector, mappings) => {
5117
+ const style = new StyleBuilder();
5118
+ const createFallbackVar = (fallback, origVarName) => {
5119
+ if (!fallback) return '';
5120
+ if (typeof fallback === 'string') return fallback;
5121
+
5122
+ const fallbackVarName = getFallbackVarName(origVarName, fallback?.suffix);
5123
+ return createCssVar(fallbackVarName, createFallbackVar(fallback.fallback, fallbackVarName));
5124
+ };
5125
+
5126
+ Object.keys(mappings).forEach((attr) => {
5127
+ const attrConfig = normalizeConfig(attr, mappings[attr]);
5128
+
5129
+ const cssVarName = getCssVarName(componentName, attr);
5130
+
5131
+ attrConfig.forEach(
5132
+ ({ selector: relativeSelectorOrSelectorFn, property, important, fallback }) => {
5133
+ const fallbackValue = createFallbackVar(fallback, cssVarName);
5134
+ style.add(
5135
+ createCssSelector(baseSelector, relativeSelectorOrSelectorFn),
5136
+ isFunction(property) ? property() : property,
5137
+ createCssVar(cssVarName, fallbackValue) + (important ? '!important' : '')
5138
+ );
5139
+ }
5140
+ );
5141
+ });
5142
+
5143
+ return style.toString();
5144
+ };
5145
+
5146
+ const getFallbackVarsNames = (attr, origVarName, { fallback }) => {
5147
+ if (!fallback) return {};
5148
+
5149
+ const fallbackVarName = getFallbackVarName(origVarName, fallback.suffix);
5150
+ const fallbackAttrName = camelCaseJoin(attr, fallback.suffix || 'fallback');
5151
+ return {
5152
+ [fallbackAttrName]: fallbackVarName,
5153
+ ...getFallbackVarsNames(fallbackAttrName, fallbackVarName, fallback),
5154
+ };
5155
+ };
5156
+
5157
+ const createCssVarsList = (componentName, mappings) =>
5158
+ Object.keys(mappings).reduce((acc, attr) => {
5159
+ const varName = getCssVarName(componentName, attr);
5160
+
5161
+ return Object.assign(
5162
+ acc,
5163
+ { [attr]: varName },
5164
+ getFallbackVarsNames(attr, varName, mappings[attr])
5165
+ );
5166
+ }, {});
5167
+
5168
+ // on some cases we need a selector to be more specific than another
5169
+ // for this we have this fn that generate a class selector multiple times
5170
+ const createClassSelectorSpecifier = (className, numOfRepeats) =>
5171
+ Array(numOfRepeats).fill(`.${className}`).join('');
5172
+
5173
+ const STYLE_OVERRIDE_ATTR_PREFIX = 'st';
5174
+
5175
+ const createStyleMixin =
5176
+ ({ mappings = {}, componentNameOverride = '' }) =>
5177
+ (superclass) => {
5178
+ const componentName = componentNameOverride || superclass.componentName;
5179
+
5180
+ return class CustomStyleMixinClass extends superclass {
5181
+ static get cssVarList() {
5182
+ return {
5183
+ ...superclass.cssVarList,
5184
+ ...createCssVarsList(componentName, {
5185
+ ...mappings,
5186
+ }),
5187
+ };
5188
+ }
5189
+
5190
+ #overrideStyleEle;
5191
+
5192
+ #themeStyleEle;
5193
+
5194
+ #disconnectThemeManager;
5195
+
5196
+ #componentNameSuffix;
5197
+
5198
+ #themeSection;
5199
+
5200
+ #rootElement;
5201
+
5202
+ #baseSelector;
5203
+
5204
+ #styleAttributes;
5205
+
5206
+ #getRootElement;
5207
+
5208
+ // we are using this mixin also for portalMixin
5209
+ // so we should be able to inject styles to other DOM elements
5210
+ // this is why we need to support these overrides
5211
+ constructor({
5212
+ getRootElement,
5213
+ componentNameSuffix = '',
5214
+ themeSection = BASE_THEME_SECTION,
5215
+ baseSelector,
5216
+ } = {}) {
5217
+ super();
5218
+ this.#componentNameSuffix = componentNameSuffix;
5219
+ this.#themeSection = themeSection;
5220
+ this.#baseSelector = baseSelector ?? this.baseSelector;
5221
+ this.#getRootElement = getRootElement;
5222
+
5223
+ this.#styleAttributes = Object.keys(CustomStyleMixinClass.cssVarList).map((key) =>
5224
+ kebabCaseJoin(STYLE_OVERRIDE_ATTR_PREFIX, componentNameSuffix, key)
5225
+ );
5226
+ }
5227
+
5228
+ // eslint-disable-next-line class-methods-use-this
5229
+ get #componentTheme() {
5230
+ return componentsThemeManager.currentTheme?.[componentName] || '';
5231
+ }
5232
+
5233
+ #onComponentThemeChange() {
5234
+ this.#themeStyleEle.innerHTML = this.#componentTheme[this.#themeSection];
5235
+ }
5236
+
5237
+ #createComponentTheme() {
5238
+ this.#themeStyleEle = document.createElement('style');
5239
+ this.#themeStyleEle.id = `style-mixin-theme__${componentName}`;
5240
+ this.#rootElement.prepend(this.#themeStyleEle);
5241
+ this.#disconnectThemeManager = componentsThemeManager.onCurrentThemeChange(
5242
+ this.#onComponentThemeChange.bind(this)
5243
+ );
5244
+ this.#onComponentThemeChange();
5245
+ }
5246
+
5247
+ #createOverridesStyle() {
5248
+ if (this.#styleAttributes.length) {
5249
+ this.#overrideStyleEle = document.createElement('style');
5250
+ this.#overrideStyleEle.id = `style-mixin-overrides__${componentName}`;
5251
+
5252
+ const classSpecifier = createClassSelectorSpecifier(
5253
+ componentName,
5254
+ CSS_SELECTOR_SPECIFIER_MULTIPLY
5255
+ );
5256
+
5257
+ this.#overrideStyleEle.innerText = `:host(${classSpecifier}) {}`;
5258
+ this.#rootElement.append(this.#overrideStyleEle);
5259
+ }
5260
+ }
5261
+
5262
+ #setAttrOverride(attrName, value) {
5263
+ const style = this.#overrideStyleEle?.sheet?.cssRules[0].style;
5264
+ if (!style) return;
5265
+
5266
+ const varName = getCssVarName(
5267
+ componentName,
5268
+ attrName.replace(new RegExp(`^${STYLE_OVERRIDE_ATTR_PREFIX}-`), '')
5269
+ );
5270
+
5271
+ if (value) style?.setProperty(varName, value);
5272
+ else {
5273
+ style?.removeProperty(varName);
5274
+ this.removeAttribute(attrName);
5275
+ }
5276
+ }
5277
+
5278
+ #updateOverridesStyle(attrs = []) {
5279
+ let shouldUpdate = false;
5280
+
5281
+ attrs.forEach((attr) => {
5282
+ if (this.#styleAttributes.includes(attr)) {
5283
+ this.#setAttrOverride(attr, this.getAttribute(attr));
5284
+ shouldUpdate = true;
5285
+ }
5286
+ });
5287
+
5288
+ if (shouldUpdate) {
5289
+ // we are rewriting the style back to the style tag
5290
+ this.#overrideStyleEle.innerHTML = this.#overrideStyleEle?.sheet?.cssRules[0].cssText;
5291
+ }
5292
+ }
5293
+
5294
+ #createMappingStyle() {
5295
+ if (Object.keys(mappings).length) {
5296
+ const themeStyle = document.createElement('style');
5297
+ themeStyle.id = `style-mixin-mappings__${componentName}`;
5298
+ themeStyle.innerHTML = createStyle(
5299
+ kebabCaseJoin(componentName, this.#componentNameSuffix),
5300
+ this.#baseSelector,
5301
+ mappings
5302
+ );
5303
+ this.#rootElement.prepend(themeStyle);
5304
+ }
5305
+ }
5306
+
5307
+ #addClassName(className) {
5308
+ (this.#rootElement.classList || this.#rootElement.host.classList).add(className);
5309
+ }
5310
+
5311
+ async init() {
5312
+ super.init?.();
5313
+ if (this.shadowRoot.isConnected) {
5314
+ this.#rootElement = (await this.#getRootElement?.(this)) || this.shadowRoot;
5315
+
5316
+ this.#addClassName(componentName);
5317
+
5318
+ this.#createMappingStyle();
5319
+ this.#createComponentTheme();
5320
+ this.#createOverridesStyle();
5321
+
5322
+ // this is instead attributeChangedCallback because we cannot use static methods in this case
5323
+ observeAttributes(this, this.#updateOverridesStyle.bind(this), {});
5324
+ }
5325
+ }
5326
+
5327
+ disconnectedCallback() {
5328
+ super.disconnectedCallback?.();
5329
+
5330
+ this.#disconnectThemeManager?.();
5331
+ }
5332
+ };
5333
+ };
5334
+
5335
+ const draggableMixin = (superclass) =>
5336
+ class DraggableMixinClass extends superclass {
5337
+ #styleEle = null;
5338
+
5339
+ static get observedAttributes() {
5340
+ const superAttrs = superclass.observedAttributes || [];
5341
+ return [...superAttrs, 'draggable'];
5342
+ }
5343
+
5344
+ constructor() {
5345
+ super();
5346
+
5347
+ this.#styleEle = document.createElement('style');
5348
+ this.#styleEle.innerText = `* { cursor: inherit!important }`;
5349
+ }
5350
+
5351
+ #handleDraggableStyle(isDraggable) {
5352
+ if (isDraggable) {
5353
+ this.shadowRoot.appendChild(this.#styleEle);
5354
+ } else {
5355
+ this.#styleEle.remove();
5356
+ }
5357
+ }
5358
+
5359
+ get isDraggable() {
5360
+ return this.hasAttribute('draggable') && this.getAttribute('draggable') !== 'false';
5361
+ }
5362
+
5363
+ init() {
5364
+ // because we are delegating the focus from the outer component,
5365
+ // the D&D is not working well in the page editor
5366
+ // in order to solve it we are making the inner component focusable on mouse down
5367
+ // and removing it on complete
5368
+ this.addEventListener('mousedown', (e) => {
5369
+ if (this.isDraggable) {
5370
+ const prevTabIndex = this.baseElement.getAttribute('tabindex');
5371
+ this.baseElement.setAttribute('tabindex', '-1');
5372
+
5373
+ const onComplete = () => {
5374
+ prevTabIndex
5375
+ ? this.baseElement.setAttribute('tabindex', prevTabIndex)
5376
+ : this.baseElement.removeAttribute('tabindex');
5377
+
5378
+ e.target.removeEventListener('mouseup', onComplete);
5379
+ e.target.removeEventListener('dragend', onComplete);
5380
+ };
5381
+
5382
+ e.target.addEventListener('mouseup', onComplete, { once: true });
5383
+ e.target.addEventListener('dragend', onComplete, { once: true });
5384
+ }
5385
+ });
5386
+
5387
+ super.init?.();
5388
+ }
5389
+
5390
+ attributeChangedCallback(attrName, oldValue, newValue) {
5391
+ super.attributeChangedCallback?.(attrName, oldValue, newValue);
5392
+ if (attrName === 'draggable') {
5393
+ this.#handleDraggableStyle(newValue === 'true');
5394
+ }
5395
+ }
5396
+ };
5397
+
5398
+ const componentNameValidationMixin = (superclass) =>
5399
+ class ComponentNameValidationMixinClass extends superclass {
5400
+ #checkComponentName() {
5401
+ const currentComponentName = this.localName;
5402
+
5403
+ if (!superclass.componentName) {
5404
+ throw Error(
5405
+ `component name is not defined on super class, make sure you have a static get for "componentName"`
5406
+ );
5407
+ }
5408
+
5409
+ if (currentComponentName !== superclass.componentName) {
5410
+ throw Error(
5411
+ `component name mismatch, expected "${superclass.componentName}", current "${currentComponentName}"`
5412
+ );
5413
+ }
5414
+ }
5415
+
5416
+ init() {
5417
+ super.init?.();
5418
+ this.#checkComponentName();
5419
+ }
5420
+ };
5421
+
5422
+ const componentsContextMixin = (superclass) =>
5423
+ class ComponentsContextMixinClass extends superclass {
5424
+ updateComponentsContext(componentsContext) {
5425
+ this.dispatchEvent(
5426
+ new CustomEvent('components-context', {
5427
+ bubbles: true,
5428
+ composed: true,
5429
+ detail: componentsContext,
5430
+ })
5431
+ );
5432
+ }
5433
+ };
5434
+
5435
+ const hoverableMixin = (superclass) =>
5436
+ class HoverableMixinClass extends superclass {
5437
+ init() {
5438
+ super.init?.();
5439
+
5440
+ this.baseElement.addEventListener('mouseover', (e) => {
5441
+ this.setAttribute('hover', 'true');
5442
+ e.target.addEventListener('mouseleave', () => this.removeAttribute('hover'), {
5443
+ once: true,
5444
+ });
5445
+ });
5446
+ }
5447
+ };
5416
5448
 
5417
- return CssVarImageClass;
5418
- };
5449
+ const booleanAttributesList = [
5450
+ 'readonly',
5451
+ 'focused',
5452
+ 'invalid',
5453
+ 'has-label',
5454
+ 'required',
5455
+ 'disabled',
5456
+ 'checked',
5457
+ 'has-helper',
5458
+ 'has-value',
5459
+ 'step-buttons-visible',
5460
+ 'hover',
5461
+ 'has-error-message',
5462
+ 'focus-ring',
5463
+ 'opened',
5464
+ 'active',
5465
+ 'password-visible',
5466
+ 'opening',
5467
+ 'closing',
5468
+ 'has-no-options',
5469
+ ];
5419
5470
 
5420
- const componentName$R = getComponentName('logo');
5471
+ const isBooleanAttribute = (attr) => {
5472
+ return booleanAttributesList.includes(attr);
5473
+ };
5474
+ // we want all the valueless attributes to have "true" value
5475
+ // and all the falsy attribute to be removed
5476
+ const normalizeBooleanAttributesMixin = (superclass) =>
5477
+ class NormalizeBooleanAttributesMixinClass extends superclass {
5478
+ init() {
5479
+ super.init?.();
5421
5480
 
5422
- const LogoClass = createCssVarImageClass({
5423
- componentName: componentName$R,
5424
- varName: 'url',
5425
- fallbackVarName: 'fallbackUrl',
5426
- });
5481
+ observeAttributes(
5482
+ this,
5483
+ (attrs) =>
5484
+ attrs.forEach((attr) => {
5485
+ const attrVal = this.getAttribute(attr);
5427
5486
 
5428
- const vars$J = LogoClass.cssVarList;
5487
+ if (isBooleanAttribute(attr)) {
5488
+ if (attrVal === '') {
5489
+ this.setAttribute(attr, 'true');
5490
+ } else if (attrVal === 'false') {
5491
+ this.removeAttribute(attr);
5492
+ }
5493
+ } else if (!attrVal) {
5494
+ // eslint-disable-next-line no-console
5495
+ console.debug(
5496
+ `attribute "${attr}" has no value, should it be added to the boolean attributes list?`
5497
+ );
5498
+ }
5499
+ }),
5500
+ {}
5501
+ );
5502
+ }
5503
+ };
5429
5504
 
5430
- const logo$2 = {
5431
- [vars$J.fallbackUrl]: 'url(https://imgs.descope.com/components/no-logo-placeholder.svg)',
5432
- };
5505
+ const createBaseClass = ({ componentName, baseSelector = '' }) => {
5506
+ class DescopeBaseClass extends HTMLElement {
5507
+ static get componentName() {
5508
+ return componentName;
5509
+ }
5433
5510
 
5434
- var logo$3 = /*#__PURE__*/Object.freeze({
5435
- __proto__: null,
5436
- default: logo$2,
5437
- vars: vars$J
5438
- });
5511
+ #baseElement;
5439
5512
 
5440
- const componentName$Q = getComponentName('totp-image');
5513
+ #isInit = true;
5441
5514
 
5442
- const TotpImageClass = createCssVarImageClass({
5443
- componentName: componentName$Q,
5444
- varName: 'url',
5445
- fallbackVarName: 'fallbackUrl',
5446
- });
5515
+ // base selector is the selector for the component wrapper,
5516
+ // it's the highest element that is relevant for the layout
5517
+ // eslint-disable-next-line class-methods-use-this
5518
+ get baseSelector() {
5519
+ return baseSelector;
5520
+ }
5447
5521
 
5448
- const vars$I = TotpImageClass.cssVarList;
5522
+ // this is the base element, which returned by querying the base selector
5523
+ get baseElement() {
5524
+ this.#baseElement ??= this.baseSelector
5525
+ ? this.rootElement.querySelector(this.baseSelector)
5526
+ : this;
5449
5527
 
5450
- const logo$1 = {
5451
- [vars$I.fallbackUrl]: 'url(https://imgs.descope.com/components/totp-placeholder.svg)',
5452
- };
5528
+ if (!this.#baseElement) {
5529
+ // eslint-disable-next-line no-console
5530
+ console.warn('missing base element for component', this.localName);
5531
+ }
5532
+ return this.#baseElement;
5533
+ }
5453
5534
 
5454
- var totpImage = /*#__PURE__*/Object.freeze({
5455
- __proto__: null,
5456
- default: logo$1,
5457
- vars: vars$I
5458
- });
5535
+ // this is the component root level element,
5536
+ // it can be either a shadow root or the component's node from the light DOM
5537
+ get rootElement() {
5538
+ return this.shadowRoot || this;
5539
+ }
5459
5540
 
5460
- const componentName$P = getComponentName('notp-image');
5541
+ get name() {
5542
+ return this.getAttribute('name');
5543
+ }
5461
5544
 
5462
- const NotpImageClass = createCssVarImageClass({
5463
- componentName: componentName$P,
5464
- varName: 'url',
5465
- fallbackVarName: 'fallbackUrl',
5466
- });
5545
+ connectedCallback() {
5546
+ super.connectedCallback?.();
5467
5547
 
5468
- const vars$H = NotpImageClass.cssVarList;
5548
+ if (this.rootElement.isConnected) {
5549
+ // the init function is running once, on the first time the component is connected
5550
+ if (this.#isInit) {
5551
+ this.#isInit = false;
5552
+ this.init?.();
5553
+ }
5554
+ }
5555
+ }
5556
+ }
5469
5557
 
5470
- const logo = {
5471
- [vars$H.fallbackUrl]: 'url(https://imgs.descope.com/components/notp-placeholder.svg)',
5558
+ return compose(
5559
+ componentNameValidationMixin,
5560
+ hoverableMixin,
5561
+ normalizeBooleanAttributesMixin,
5562
+ componentsContextMixin
5563
+ )(DescopeBaseClass);
5472
5564
  };
5473
5565
 
5474
- var notpImage = /*#__PURE__*/Object.freeze({
5475
- __proto__: null,
5476
- default: logo,
5477
- vars: vars$H
5478
- });
5479
-
5480
5566
  const componentName$O = getComponentName('text');
5481
5567
 
5482
5568
  class RawText extends createBaseClass({ componentName: componentName$O, baseSelector: ':host > slot' }) {
@@ -5536,7 +5622,7 @@ const TextClass = compose(
5536
5622
  componentNameValidationMixin
5537
5623
  )(RawText);
5538
5624
 
5539
- const globalRefs$t = getThemeRefs(globals);
5625
+ const globalRefs$t = getThemeRefs$1(globals);
5540
5626
  const vars$G = TextClass.cssVarList;
5541
5627
 
5542
5628
  const text$2 = {
@@ -5651,9 +5737,9 @@ const decodeHTML = (html) => {
5651
5737
  /* eslint-disable no-param-reassign */
5652
5738
 
5653
5739
 
5654
- const componentName$N = getComponentName('enriched-text');
5740
+ const componentName$N = getComponentName$1('enriched-text');
5655
5741
 
5656
- class EnrichedText extends createBaseClass({ componentName: componentName$N, baseSelector: ':host > div' }) {
5742
+ class EnrichedText extends createBaseClass$1({ componentName: componentName$N, baseSelector: ':host > div' }) {
5657
5743
  #origLinkRenderer;
5658
5744
 
5659
5745
  #origEmRenderer;
@@ -5701,7 +5787,7 @@ class EnrichedText extends createBaseClass({ componentName: componentName$N, bas
5701
5787
 
5702
5788
  this.#initProcessor();
5703
5789
 
5704
- observeChildren(this, this.#parseChildren.bind(this));
5790
+ observeChildren$1(this, this.#parseChildren.bind(this));
5705
5791
  }
5706
5792
 
5707
5793
  static get observedAttributes() {
@@ -5817,8 +5903,8 @@ class EnrichedText extends createBaseClass({ componentName: componentName$N, bas
5817
5903
  }
5818
5904
  }
5819
5905
 
5820
- const EnrichedTextClass = compose(
5821
- createStyleMixin({
5906
+ const EnrichedTextClass = compose$1(
5907
+ createStyleMixin$1({
5822
5908
  mappings: {
5823
5909
  hostWidth: { selector: () => ':host', property: 'width' },
5824
5910
  hostDisplay: { selector: () => ':host', property: 'display', fallback: 'inline-block' },
@@ -5840,15 +5926,15 @@ const EnrichedTextClass = compose(
5840
5926
  minWidth: {},
5841
5927
  },
5842
5928
  }),
5843
- createStyleMixin({ componentNameOverride: getComponentName('link') }),
5844
- createStyleMixin({ componentNameOverride: getComponentName('text') }),
5845
- draggableMixin,
5846
- componentNameValidationMixin
5929
+ createStyleMixin$1({ componentNameOverride: getComponentName$1('link') }),
5930
+ createStyleMixin$1({ componentNameOverride: getComponentName$1('text') }),
5931
+ draggableMixin$1,
5932
+ componentNameValidationMixin$1
5847
5933
  )(EnrichedText);
5848
5934
 
5849
- const componentName$M = getComponentName('link');
5935
+ const componentName$M = getComponentName$1('link');
5850
5936
 
5851
- class RawLink extends createBaseClass({ componentName: componentName$M, baseSelector: ':host a' }) {
5937
+ class RawLink extends createBaseClass$1({ componentName: componentName$M, baseSelector: ':host a' }) {
5852
5938
  constructor() {
5853
5939
  super();
5854
5940
 
@@ -5871,14 +5957,14 @@ class RawLink extends createBaseClass({ componentName: componentName$M, baseSele
5871
5957
  </div>
5872
5958
  `;
5873
5959
 
5874
- forwardAttrs(this, this.shadowRoot.querySelector('a'), {
5960
+ forwardAttrs$1(this, this.shadowRoot.querySelector('a'), {
5875
5961
  includeAttrs: ['href', 'target', 'tooltip'],
5876
5962
  mapAttrs: {
5877
5963
  tooltip: 'title',
5878
5964
  },
5879
5965
  });
5880
5966
 
5881
- forwardAttrs(this, this.shadowRoot.querySelector('descope-text'), {
5967
+ forwardAttrs$1(this, this.shadowRoot.querySelector('descope-text'), {
5882
5968
  includeAttrs: ['mode', 'variant'],
5883
5969
  });
5884
5970
  }
@@ -5894,8 +5980,8 @@ const selectors$2 = {
5894
5980
 
5895
5981
  const { anchor, text: text$1, host: host$i, wrapper: wrapper$1, link: link$3 } = selectors$2;
5896
5982
 
5897
- const LinkClass = compose(
5898
- createStyleMixin({
5983
+ const LinkClass = compose$1(
5984
+ createStyleMixin$1({
5899
5985
  mappings: {
5900
5986
  hostWidth: { ...host$i, property: 'width' },
5901
5987
  hostDirection: { ...text$1, property: 'direction' },
@@ -5908,11 +5994,11 @@ const LinkClass = compose(
5908
5994
  cursor: anchor,
5909
5995
  },
5910
5996
  }),
5911
- draggableMixin,
5912
- componentNameValidationMixin
5997
+ draggableMixin$1,
5998
+ componentNameValidationMixin$1
5913
5999
  )(RawLink);
5914
6000
 
5915
- const globalRefs$s = getThemeRefs(globals);
6001
+ const globalRefs$s = getThemeRefs(globals$1);
5916
6002
  const vars$F = LinkClass.cssVarList;
5917
6003
 
5918
6004
  const link$1 = {
@@ -5948,7 +6034,7 @@ var link$2 = /*#__PURE__*/Object.freeze({
5948
6034
  vars: vars$F
5949
6035
  });
5950
6036
 
5951
- const globalRefs$r = getThemeRefs(globals);
6037
+ const globalRefs$r = getThemeRefs(globals$1);
5952
6038
  const vars$E = EnrichedTextClass.cssVarList;
5953
6039
 
5954
6040
  const enrichedText = {
@@ -5986,8 +6072,8 @@ var enrichedText$1 = /*#__PURE__*/Object.freeze({
5986
6072
  vars: vars$E
5987
6073
  });
5988
6074
 
5989
- const componentName$L = getComponentName('divider');
5990
- class RawDivider extends createBaseClass({ componentName: componentName$L, baseSelector: ':host > div' }) {
6075
+ const componentName$L = getComponentName$1('divider');
6076
+ class RawDivider extends createBaseClass$1({ componentName: componentName$L, baseSelector: ':host > div' }) {
5991
6077
  constructor() {
5992
6078
  super();
5993
6079
 
@@ -6026,7 +6112,7 @@ class RawDivider extends createBaseClass({ componentName: componentName$L, baseS
6026
6112
 
6027
6113
  this.textComponent = this.shadowRoot.querySelector('descope-text');
6028
6114
 
6029
- forwardAttrs(this, this.textComponent, {
6115
+ forwardAttrs$1(this, this.textComponent, {
6030
6116
  includeAttrs: ['mode', 'variant', 'italic'],
6031
6117
  });
6032
6118
  }
@@ -6040,8 +6126,8 @@ const { host: host$h, before, after: after$1, text } = {
6040
6126
  text: { selector: 'descope-text' },
6041
6127
  };
6042
6128
 
6043
- const DividerClass = compose(
6044
- createStyleMixin({
6129
+ const DividerClass = compose$1(
6130
+ createStyleMixin$1({
6045
6131
  mappings: {
6046
6132
  hostWidth: { ...host$h, property: 'width' },
6047
6133
  hostPadding: { ...host$h, property: 'padding' },
@@ -6082,11 +6168,11 @@ const DividerClass = compose(
6082
6168
  ],
6083
6169
  },
6084
6170
  }),
6085
- draggableMixin,
6086
- componentNameValidationMixin
6171
+ draggableMixin$1,
6172
+ componentNameValidationMixin$1
6087
6173
  )(RawDivider);
6088
6174
 
6089
- const globalRefs$q = getThemeRefs(globals);
6175
+ const globalRefs$q = getThemeRefs(globals$1);
6090
6176
  const compVars$4 = DividerClass.cssVarList;
6091
6177
 
6092
6178
  const [helperTheme$2, helperRefs$2, helperVars$2] = createHelperVars(
@@ -6138,13 +6224,13 @@ var divider$1 = /*#__PURE__*/Object.freeze({
6138
6224
 
6139
6225
  /* eslint-disable no-param-reassign */
6140
6226
 
6141
- const componentName$K = getComponentName('passcode-internal');
6227
+ const componentName$K = getComponentName$1('passcode-internal');
6142
6228
 
6143
6229
  createBaseInputClass({ componentName: componentName$K, baseSelector: 'div' });
6144
6230
 
6145
- const componentName$J = getComponentName('loader-radial');
6231
+ const componentName$J = getComponentName$1('loader-radial');
6146
6232
 
6147
- class RawLoaderRadial extends createBaseClass({ componentName: componentName$J, baseSelector: ':host > div' }) {
6233
+ class RawLoaderRadial extends createBaseClass$1({ componentName: componentName$J, baseSelector: ':host > div' }) {
6148
6234
  constructor() {
6149
6235
  super();
6150
6236
 
@@ -6167,8 +6253,8 @@ class RawLoaderRadial extends createBaseClass({ componentName: componentName$J,
6167
6253
  }
6168
6254
  }
6169
6255
 
6170
- const LoaderRadialClass = compose(
6171
- createStyleMixin({
6256
+ const LoaderRadialClass = compose$1(
6257
+ createStyleMixin$1({
6172
6258
  mappings: {
6173
6259
  hostDisplay: { property: 'display' },
6174
6260
  spinnerSize: [{ property: 'width' }, { property: 'height' }],
@@ -6184,11 +6270,11 @@ const LoaderRadialClass = compose(
6184
6270
  animationIterationCount: {},
6185
6271
  },
6186
6272
  }),
6187
- draggableMixin,
6188
- componentNameValidationMixin
6273
+ draggableMixin$1,
6274
+ componentNameValidationMixin$1
6189
6275
  )(RawLoaderRadial);
6190
6276
 
6191
- const componentName$I = getComponentName('passcode');
6277
+ const componentName$I = getComponentName$1('passcode');
6192
6278
 
6193
6279
  const observedAttributes$3 = ['digits'];
6194
6280
 
@@ -6219,7 +6305,7 @@ const customMixin$9 = (superclass) =>
6219
6305
 
6220
6306
  this.inputElement = this.shadowRoot.querySelector(componentName$K);
6221
6307
 
6222
- forwardAttrs(this, this.inputElement, { includeAttrs: ['digits', 'size', 'loading'] });
6308
+ forwardAttrs$1(this, this.inputElement, { includeAttrs: ['digits', 'size', 'loading'] });
6223
6309
  }
6224
6310
 
6225
6311
  attributeChangedCallback(attrName, oldValue, newValue) {
@@ -6252,8 +6338,8 @@ const {
6252
6338
  const textVars$3 = TextFieldClass.cssVarList;
6253
6339
  const loaderVars = LoaderRadialClass.cssVarList;
6254
6340
 
6255
- const PasscodeClass = compose(
6256
- createStyleMixin({
6341
+ const PasscodeClass = compose$1(
6342
+ createStyleMixin$1({
6257
6343
  mappings: {
6258
6344
  fontSize: [{ ...digitField, property: textVars$3.fontSize }, host$g],
6259
6345
  hostWidth: { property: 'width' },
@@ -6290,9 +6376,9 @@ const PasscodeClass = compose(
6290
6376
  spinnerSize: { selector: LoaderRadialClass.componentName, property: loaderVars.spinnerSize },
6291
6377
  },
6292
6378
  }),
6293
- draggableMixin,
6379
+ draggableMixin$1,
6294
6380
  composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
6295
- componentNameValidationMixin,
6381
+ componentNameValidationMixin$1,
6296
6382
  customMixin$9
6297
6383
  )(
6298
6384
  createProxy({
@@ -6426,9 +6512,9 @@ var passcode$1 = /*#__PURE__*/Object.freeze({
6426
6512
  vars: vars$C
6427
6513
  });
6428
6514
 
6429
- const componentName$H = getComponentName('loader-linear');
6515
+ const componentName$H = getComponentName$1('loader-linear');
6430
6516
 
6431
- class RawLoaderLinear extends createBaseClass({ componentName: componentName$H, baseSelector: ':host > div' }) {
6517
+ class RawLoaderLinear extends createBaseClass$1({ componentName: componentName$H, baseSelector: ':host > div' }) {
6432
6518
  static get componentName() {
6433
6519
  return componentName$H;
6434
6520
  }
@@ -6468,8 +6554,8 @@ const selectors$1 = {
6468
6554
 
6469
6555
  const { after, host: host$f } = selectors$1;
6470
6556
 
6471
- const LoaderLinearClass = compose(
6472
- createStyleMixin({
6557
+ const LoaderLinearClass = compose$1(
6558
+ createStyleMixin$1({
6473
6559
  mappings: {
6474
6560
  hostDisplay: {},
6475
6561
  hostWidth: { ...host$f, property: 'width' },
@@ -6487,11 +6573,11 @@ const LoaderLinearClass = compose(
6487
6573
  animationIterationCount: [{}, after],
6488
6574
  },
6489
6575
  }),
6490
- draggableMixin,
6491
- componentNameValidationMixin
6576
+ draggableMixin$1,
6577
+ componentNameValidationMixin$1
6492
6578
  )(RawLoaderLinear);
6493
6579
 
6494
- const globalRefs$p = getThemeRefs(globals);
6580
+ const globalRefs$p = getThemeRefs(globals$1);
6495
6581
  const vars$B = LoaderLinearClass.cssVarList;
6496
6582
 
6497
6583
  const loaderLinear = {
@@ -6536,7 +6622,7 @@ var loaderLinear$1 = /*#__PURE__*/Object.freeze({
6536
6622
  vars: vars$B
6537
6623
  });
6538
6624
 
6539
- const globalRefs$o = getThemeRefs(globals);
6625
+ const globalRefs$o = getThemeRefs(globals$1);
6540
6626
  const compVars$3 = LoaderRadialClass.cssVarList;
6541
6627
 
6542
6628
  const [helperTheme$1, helperRefs$1, helperVars$1] = createHelperVars(
@@ -6591,7 +6677,7 @@ var loaderRadial$1 = /*#__PURE__*/Object.freeze({
6591
6677
  vars: vars$A
6592
6678
  });
6593
6679
 
6594
- const componentName$G = getComponentName('combo-box');
6680
+ const componentName$G = getComponentName$1('combo-box');
6595
6681
 
6596
6682
  const ComboBoxMixin = (superclass) =>
6597
6683
  class ComboBoxMixinClass extends superclass {
@@ -6808,8 +6894,8 @@ const ComboBoxMixin = (superclass) =>
6808
6894
  this.#overrideRenderer();
6809
6895
 
6810
6896
  // Set up observers - order matters here since renderItems can clear innerHTML
6811
- observeAttributes(this, this.renderItems.bind(this), { includeAttrs: ['data'] });
6812
- observeChildren(this, this.#onChildrenChange.bind(this));
6897
+ observeAttributes$1(this, this.renderItems.bind(this), { includeAttrs: ['data'] });
6898
+ observeChildren$1(this, this.#onChildrenChange.bind(this));
6813
6899
 
6814
6900
  this.setDefaultValue();
6815
6901
 
@@ -6913,8 +6999,8 @@ const {
6913
6999
  errorMessage: { selector: '::part(error-message)' },
6914
7000
  };
6915
7001
 
6916
- const ComboBoxClass = compose(
6917
- createStyleMixin({
7002
+ const ComboBoxClass = compose$1(
7003
+ createStyleMixin$1({
6918
7004
  mappings: {
6919
7005
  hostWidth: { ...host$e, property: 'width' },
6920
7006
  hostDirection: { ...host$e, property: 'direction' },
@@ -7002,7 +7088,7 @@ const ComboBoxClass = compose(
7002
7088
  },
7003
7089
  },
7004
7090
  }),
7005
- draggableMixin,
7091
+ draggableMixin$1,
7006
7092
  portalMixin({
7007
7093
  name: 'overlay',
7008
7094
  selector: '',
@@ -7048,7 +7134,7 @@ const ComboBoxClass = compose(
7048
7134
  },
7049
7135
  }),
7050
7136
  composedProxyInputMixin({ proxyProps: ['selectionStart'], inputEvent: 'selected-item-changed' }),
7051
- componentNameValidationMixin,
7137
+ componentNameValidationMixin$1,
7052
7138
  ComboBoxMixin
7053
7139
  )(
7054
7140
  createProxy({
@@ -7112,7 +7198,7 @@ const ComboBoxClass = compose(
7112
7198
  })
7113
7199
  );
7114
7200
 
7115
- const globalRefs$n = getThemeRefs(globals);
7201
+ const globalRefs$n = getThemeRefs(globals$1);
7116
7202
  const vars$z = ComboBoxClass.cssVarList;
7117
7203
 
7118
7204
  const comboBox = {
@@ -7190,8 +7276,8 @@ const comboBox = {
7190
7276
  [vars$z.overlay.loaderWidth]: '30px',
7191
7277
  [vars$z.overlay.loaderHeight]: '30px',
7192
7278
  [vars$z.overlay.loaderBorder]: '2px solid transparent',
7193
- [vars$z.overlay
7194
- .loaderBorderColor]: `${globalRefs$n.colors.primary.highlight} ${globalRefs$n.colors.primary.highlight} ${globalRefs$n.colors.primary.main} ${globalRefs$n.colors.primary.main}`,
7279
+ [vars$z.overlay.loaderBorderColor]:
7280
+ `${globalRefs$n.colors.primary.highlight} ${globalRefs$n.colors.primary.highlight} ${globalRefs$n.colors.primary.main} ${globalRefs$n.colors.primary.main}`,
7195
7281
  [vars$z.overlay.loaderBorderRadius]: '50%',
7196
7282
  [vars$z.overlay.contentHeight]: '100px',
7197
7283
  [vars$z.overlay.contentOpacity]: '0',
@@ -7207,9 +7293,9 @@ var comboBox$1 = /*#__PURE__*/Object.freeze({
7207
7293
 
7208
7294
  const observedAttributes$2 = ['src', 'alt'];
7209
7295
 
7210
- const componentName$F = getComponentName('image');
7296
+ const componentName$F = getComponentName$1('image');
7211
7297
 
7212
- const BaseClass$2 = createBaseClass({ componentName: componentName$F, baseSelector: ':host > img' });
7298
+ const BaseClass$2 = createBaseClass$1({ componentName: componentName$F, baseSelector: ':host > img' });
7213
7299
  class RawImage extends BaseClass$2 {
7214
7300
  static get observedAttributes() {
7215
7301
  return observedAttributes$2.concat(BaseClass$2.observedAttributes || []);
@@ -7235,18 +7321,18 @@ class RawImage extends BaseClass$2 {
7235
7321
  connectedCallback() {
7236
7322
  super.connectedCallback?.();
7237
7323
 
7238
- forwardAttrs(this, this.baseElement, { includeAttrs: observedAttributes$2 });
7324
+ forwardAttrs$1(this, this.baseElement, { includeAttrs: observedAttributes$2 });
7239
7325
  }
7240
7326
  }
7241
7327
 
7242
- const ImageClass = compose(
7243
- createStyleMixin({
7328
+ const ImageClass = compose$1(
7329
+ createStyleMixin$1({
7244
7330
  mappings: {
7245
7331
  height: { selector: () => ':host' },
7246
7332
  width: { selector: () => ':host' },
7247
7333
  },
7248
7334
  }),
7249
- draggableMixin
7335
+ draggableMixin$1
7250
7336
  )(RawImage);
7251
7337
 
7252
7338
  const vars$y = ImageClass.cssVarList;
@@ -8475,14 +8561,14 @@ var CountryCodes = [
8475
8561
  ].sort((a, b) => (a.name < b.name ? -1 : 1)),
8476
8562
  ];
8477
8563
 
8478
- const componentName$E = getComponentName('phone-field-internal');
8564
+ const componentName$E = getComponentName$1('phone-field-internal');
8479
8565
 
8480
8566
  createBaseInputClass({ componentName: componentName$E, baseSelector: 'div' });
8481
8567
 
8482
8568
  const textVars$2 = TextFieldClass.cssVarList;
8483
8569
  const comboVars = ComboBoxClass.cssVarList;
8484
8570
 
8485
- const componentName$D = getComponentName('phone-field');
8571
+ const componentName$D = getComponentName$1('phone-field');
8486
8572
 
8487
8573
  const customMixin$8 = (superclass) =>
8488
8574
  class PhoneFieldMixinClass extends superclass {
@@ -8506,7 +8592,7 @@ const customMixin$8 = (superclass) =>
8506
8592
 
8507
8593
  this.inputElement = this.shadowRoot.querySelector(componentName$E);
8508
8594
 
8509
- forwardAttrs(this.shadowRoot.host, this.inputElement, {
8595
+ forwardAttrs$1(this.shadowRoot.host, this.inputElement, {
8510
8596
  includeAttrs: [
8511
8597
  'size',
8512
8598
  'bordered',
@@ -8570,8 +8656,8 @@ const {
8570
8656
  errorMessage: { selector: '::part(error-message)' },
8571
8657
  };
8572
8658
 
8573
- const PhoneFieldClass = compose(
8574
- createStyleMixin({
8659
+ const PhoneFieldClass = compose$1(
8660
+ createStyleMixin$1({
8575
8661
  mappings: {
8576
8662
  fontSize: [
8577
8663
  host$d,
@@ -8670,7 +8756,7 @@ const PhoneFieldClass = compose(
8670
8756
  ],
8671
8757
  },
8672
8758
  }),
8673
- draggableMixin,
8759
+ draggableMixin$1,
8674
8760
  composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
8675
8761
  customMixin$8
8676
8762
  )(
@@ -8821,13 +8907,13 @@ var phoneField$1 = /*#__PURE__*/Object.freeze({
8821
8907
  vars: vars$x
8822
8908
  });
8823
8909
 
8824
- const componentName$C = getComponentName('phone-field-internal-input-box');
8910
+ const componentName$C = getComponentName$1('phone-field-internal-input-box');
8825
8911
 
8826
8912
  createBaseInputClass({ componentName: componentName$C, baseSelector: 'div' });
8827
8913
 
8828
8914
  const textVars$1 = TextFieldClass.cssVarList;
8829
8915
 
8830
- const componentName$B = getComponentName('phone-input-box-field');
8916
+ const componentName$B = getComponentName$1('phone-input-box-field');
8831
8917
 
8832
8918
  const customMixin$7 = (superclass) =>
8833
8919
  class PhoneInputBoxFieldMixinClass extends superclass {
@@ -8851,7 +8937,7 @@ const customMixin$7 = (superclass) =>
8851
8937
 
8852
8938
  this.inputElement = this.shadowRoot.querySelector(componentName$C);
8853
8939
 
8854
- forwardAttrs(this.shadowRoot.host, this.inputElement, {
8940
+ forwardAttrs$1(this.shadowRoot.host, this.inputElement, {
8855
8941
  includeAttrs: [
8856
8942
  'size',
8857
8943
  'bordered',
@@ -8898,8 +8984,8 @@ const {
8898
8984
  errorMessage: { selector: '::part(error-message)' },
8899
8985
  };
8900
8986
 
8901
- const PhoneFieldInputBoxClass = compose(
8902
- createStyleMixin({
8987
+ const PhoneFieldInputBoxClass = compose$1(
8988
+ createStyleMixin$1({
8903
8989
  mappings: {
8904
8990
  fontSize: [
8905
8991
  host$c,
@@ -8967,7 +9053,7 @@ const PhoneFieldInputBoxClass = compose(
8967
9053
  },
8968
9054
  },
8969
9055
  }),
8970
- draggableMixin,
9056
+ draggableMixin$1,
8971
9057
  composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
8972
9058
  customMixin$7
8973
9059
  )(
@@ -9096,20 +9182,20 @@ var phoneInputBoxField$1 = /*#__PURE__*/Object.freeze({
9096
9182
  vars: vars$w
9097
9183
  });
9098
9184
 
9099
- const componentName$A = getComponentName('new-password-internal');
9185
+ const componentName$A = getComponentName$1('new-password-internal');
9100
9186
 
9101
9187
  const interpolateString = (template, values) =>
9102
9188
  template.replace(/{{(\w+)+}}/g, (match, key) => values?.[key] || match);
9103
9189
 
9104
9190
  // eslint-disable-next-line max-classes-per-file
9105
9191
 
9106
- const componentName$z = getComponentName('policy-validation');
9192
+ const componentName$z = getComponentName$1('policy-validation');
9107
9193
 
9108
9194
  const overrideAttrs = ['data-password-policy-value-minlength'];
9109
9195
  const dataAttrs = ['data', 'active-policies', 'overrides', ...overrideAttrs];
9110
9196
  const policyAttrs = ['label', 'value', ...dataAttrs];
9111
9197
 
9112
- class RawPolicyValidation extends createBaseClass({ componentName: componentName$z, baseSelector: ':host > div' }) {
9198
+ class RawPolicyValidation extends createBaseClass$1({ componentName: componentName$z, baseSelector: ':host > div' }) {
9113
9199
  #availablePolicies;
9114
9200
 
9115
9201
  #activePolicies = [];
@@ -9290,9 +9376,9 @@ const { host: host$b, item, symbolDefault, symbolSuccess, symbolError } = {
9290
9376
  symbolError: { selector: () => '.item[data-valid="false"]::before' },
9291
9377
  };
9292
9378
 
9293
- const PolicyValidationClass = compose(
9294
- createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }),
9295
- createStyleMixin({
9379
+ const PolicyValidationClass = compose$1(
9380
+ createStyleMixin$1({ componentNameOverride: getComponentName$1('input-wrapper') }),
9381
+ createStyleMixin$1({
9296
9382
  mappings: {
9297
9383
  hostDirection: { selector: () => ':host', property: 'direction' },
9298
9384
  fontSize: {},
@@ -9313,11 +9399,11 @@ const PolicyValidationClass = compose(
9313
9399
  itemSymbolError: { ...symbolError, property: 'content' },
9314
9400
  },
9315
9401
  }),
9316
- draggableMixin,
9317
- componentNameValidationMixin
9402
+ draggableMixin$1,
9403
+ componentNameValidationMixin$1
9318
9404
  )(RawPolicyValidation);
9319
9405
 
9320
- const componentName$y = getComponentName('new-password');
9406
+ const componentName$y = getComponentName$1('new-password');
9321
9407
 
9322
9408
  const policyPreviewVars = PolicyValidationClass.cssVarList;
9323
9409
 
@@ -9348,7 +9434,7 @@ const customMixin$6 = (superclass) =>
9348
9434
  this.initExternalInput();
9349
9435
  }
9350
9436
 
9351
- forwardAttrs(this, this.inputElement, {
9437
+ forwardAttrs$1(this, this.inputElement, {
9352
9438
  includeAttrs: [
9353
9439
  'password-label',
9354
9440
  'password-placeholder',
@@ -9421,8 +9507,8 @@ const {
9421
9507
  policyPreview: { selector: 'descope-policy-validation' },
9422
9508
  };
9423
9509
 
9424
- const NewPasswordClass = compose(
9425
- createStyleMixin({
9510
+ const NewPasswordClass = compose$1(
9511
+ createStyleMixin$1({
9426
9512
  mappings: {
9427
9513
  fontSize: [
9428
9514
  host$a,
@@ -9463,7 +9549,7 @@ const NewPasswordClass = compose(
9463
9549
  },
9464
9550
  },
9465
9551
  }),
9466
- draggableMixin,
9552
+ draggableMixin$1,
9467
9553
  composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
9468
9554
  customMixin$6
9469
9555
  )(
@@ -9528,7 +9614,7 @@ const NewPasswordClass = compose(
9528
9614
  })
9529
9615
  );
9530
9616
 
9531
- const globalRefs$m = getThemeRefs(globals);
9617
+ const globalRefs$m = getThemeRefs(globals$1);
9532
9618
  const vars$v = NewPasswordClass.cssVarList;
9533
9619
 
9534
9620
  const newPassword = {
@@ -9579,7 +9665,7 @@ const getFilename = (fileObj) => {
9579
9665
  return fileObj.name.replace(/^.*\\/, '');
9580
9666
  };
9581
9667
 
9582
- const componentName$x = getComponentName('upload-file');
9668
+ const componentName$x = getComponentName$1('upload-file');
9583
9669
 
9584
9670
  const observedAttributes$1 = [
9585
9671
  'title',
@@ -9775,9 +9861,9 @@ const { host: host$9, wrapper, icon: icon$3, title: title$1, description, requir
9775
9861
  requiredIndicator: { selector: () => '.title::after' },
9776
9862
  };
9777
9863
 
9778
- const UploadFileClass = compose(
9779
- createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }),
9780
- createStyleMixin({
9864
+ const UploadFileClass = compose$1(
9865
+ createStyleMixin$1({ componentNameOverride: getComponentName$1('input-wrapper') }),
9866
+ createStyleMixin$1({
9781
9867
  mappings: {
9782
9868
  fontSize: {},
9783
9869
  fontFamily: {},
@@ -9805,8 +9891,8 @@ const UploadFileClass = compose(
9805
9891
  requiredIndicator: { ...requiredIndicator$2, property: 'content' },
9806
9892
  },
9807
9893
  }),
9808
- draggableMixin,
9809
- componentNameValidationMixin
9894
+ draggableMixin$1,
9895
+ componentNameValidationMixin$1
9810
9896
  )(RawUploadFile);
9811
9897
 
9812
9898
  const vars$u = UploadFileClass.cssVarList;
@@ -9876,9 +9962,9 @@ var uploadFile$1 = /*#__PURE__*/Object.freeze({
9876
9962
  vars: vars$u
9877
9963
  });
9878
9964
 
9879
- const componentName$w = getComponentName('button-selection-group-item');
9965
+ const componentName$w = getComponentName$1('button-selection-group-item');
9880
9966
 
9881
- class RawSelectItem extends createBaseClass({
9967
+ class RawSelectItem extends createBaseClass$1({
9882
9968
  componentName: componentName$w,
9883
9969
  baseSelector: ':host > descope-button',
9884
9970
  }) {
@@ -9922,8 +10008,8 @@ class RawSelectItem extends createBaseClass({
9922
10008
  </descope-button>
9923
10009
  `;
9924
10010
 
9925
- forwardAttrs(this, this.baseElement, { includeAttrs: ['size', 'variant'] });
9926
- forwardAttrs(this.baseElement, this, { includeAttrs: ['focused', 'active'] });
10011
+ forwardAttrs$1(this, this.baseElement, { includeAttrs: ['size', 'variant'] });
10012
+ forwardAttrs$1(this.baseElement, this, { includeAttrs: ['focused', 'active'] });
9927
10013
  }
9928
10014
 
9929
10015
  handleFocus() {
@@ -9945,8 +10031,8 @@ class RawSelectItem extends createBaseClass({
9945
10031
  }
9946
10032
  }
9947
10033
 
9948
- const ButtonSelectionGroupItemClass = compose(
9949
- createStyleMixin({
10034
+ const ButtonSelectionGroupItemClass = compose$1(
10035
+ createStyleMixin$1({
9950
10036
  mappings: {
9951
10037
  hostDirection: {
9952
10038
  selector: () => ButtonClass.componentName,
@@ -9982,11 +10068,11 @@ const ButtonSelectionGroupItemClass = compose(
9982
10068
  },
9983
10069
  },
9984
10070
  }),
9985
- draggableMixin,
9986
- componentNameValidationMixin
10071
+ draggableMixin$1,
10072
+ componentNameValidationMixin$1
9987
10073
  )(RawSelectItem);
9988
10074
 
9989
- const globalRefs$l = getThemeRefs(globals);
10075
+ const globalRefs$l = getThemeRefs(globals$1);
9990
10076
 
9991
10077
  const vars$t = ButtonSelectionGroupItemClass.cssVarList;
9992
10078
 
@@ -10108,7 +10194,7 @@ const createBaseButtonSelectionGroupInternalClass = (componentName) => {
10108
10194
 
10109
10195
  super.init?.();
10110
10196
 
10111
- observeAttributes(this, this.onObservedAttributeChange.bind(this), {
10197
+ observeAttributes$1(this, this.onObservedAttributeChange.bind(this), {
10112
10198
  includeAttrs: ['size', 'readonly'],
10113
10199
  });
10114
10200
  }
@@ -10117,7 +10203,7 @@ const createBaseButtonSelectionGroupInternalClass = (componentName) => {
10117
10203
  return BaseButtonSelectionGroupInternalClass;
10118
10204
  };
10119
10205
 
10120
- const componentName$v = getComponentName('button-selection-group-internal');
10206
+ const componentName$v = getComponentName$1('button-selection-group-internal');
10121
10207
 
10122
10208
  class ButtonSelectionGroupInternalClass extends createBaseButtonSelectionGroupInternalClass(
10123
10209
  componentName$v
@@ -10265,10 +10351,10 @@ const buttonSelectionGroupBaseMixin = (superclass) =>
10265
10351
 
10266
10352
  this.renderItems();
10267
10353
 
10268
- observeAttributes(this, this.renderItems.bind(this), { includeAttrs: ['data'] });
10354
+ observeAttributes$1(this, this.renderItems.bind(this), { includeAttrs: ['data'] });
10269
10355
 
10270
10356
  // we want new items to get the size
10271
- observeChildren(this, ({ addedNodes }) => {
10357
+ observeChildren$1(this, ({ addedNodes }) => {
10272
10358
  addedNodes.forEach((node) => {
10273
10359
  node.setAttribute('size', this.size);
10274
10360
  });
@@ -10357,7 +10443,7 @@ const buttonSelectionGroupStyles = `
10357
10443
  ${resetInputCursor('vaadin-text-field')}
10358
10444
  `;
10359
10445
 
10360
- const componentName$u = getComponentName('button-selection-group');
10446
+ const componentName$u = getComponentName$1('button-selection-group');
10361
10447
 
10362
10448
  const buttonSelectionGroupMixin = (superclass) =>
10363
10449
  class ButtonMultiSelectionGroupMixinClass extends superclass {
@@ -10380,21 +10466,21 @@ const buttonSelectionGroupMixin = (superclass) =>
10380
10466
 
10381
10467
  this.inputElement = this.shadowRoot.querySelector(componentName$v);
10382
10468
 
10383
- forwardAttrs(this, this.inputElement, {
10469
+ forwardAttrs$1(this, this.inputElement, {
10384
10470
  includeAttrs: ['size', 'default-value', 'allow-deselect'],
10385
10471
  });
10386
10472
  }
10387
10473
  };
10388
10474
 
10389
- const ButtonSelectionGroupClass = compose(
10390
- createStyleMixin({
10475
+ const ButtonSelectionGroupClass = compose$1(
10476
+ createStyleMixin$1({
10391
10477
  mappings: {
10392
10478
  ...buttonSelectionGroupMappings,
10393
10479
  },
10394
10480
  }),
10395
- draggableMixin,
10481
+ draggableMixin$1,
10396
10482
  composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
10397
- componentNameValidationMixin,
10483
+ componentNameValidationMixin$1,
10398
10484
  buttonSelectionGroupBaseMixin,
10399
10485
  buttonSelectionGroupMixin
10400
10486
  )(
@@ -10407,7 +10493,7 @@ const ButtonSelectionGroupClass = compose(
10407
10493
  })
10408
10494
  );
10409
10495
 
10410
- const globalRefs$k = getThemeRefs(globals);
10496
+ const globalRefs$k = getThemeRefs(globals$1);
10411
10497
 
10412
10498
  const createBaseButtonSelectionGroupMappings = (vars) => ({
10413
10499
  [vars.hostDirection]: refs.direction,
@@ -10439,7 +10525,7 @@ var buttonSelectionGroup$1 = /*#__PURE__*/Object.freeze({
10439
10525
  vars: vars$s
10440
10526
  });
10441
10527
 
10442
- const componentName$t = getComponentName('button-multi-selection-group-internal');
10528
+ const componentName$t = getComponentName$1('button-multi-selection-group-internal');
10443
10529
 
10444
10530
  class ButtonMultiSelectionGroupInternalClass extends createBaseButtonSelectionGroupInternalClass(
10445
10531
  componentName$t
@@ -10545,7 +10631,7 @@ class ButtonMultiSelectionGroupInternalClass extends createBaseButtonSelectionGr
10545
10631
  }
10546
10632
  }
10547
10633
 
10548
- const componentName$s = getComponentName('button-multi-selection-group');
10634
+ const componentName$s = getComponentName$1('button-multi-selection-group');
10549
10635
 
10550
10636
  const buttonMultiSelectionGroupMixin = (superclass) =>
10551
10637
  class ButtonMultiSelectionGroupMixinClass extends superclass {
@@ -10568,21 +10654,21 @@ const buttonMultiSelectionGroupMixin = (superclass) =>
10568
10654
 
10569
10655
  this.inputElement = this.shadowRoot.querySelector(componentName$t);
10570
10656
 
10571
- forwardAttrs(this, this.inputElement, {
10657
+ forwardAttrs$1(this, this.inputElement, {
10572
10658
  includeAttrs: ['size', 'default-values', 'min-items-selection', 'max-items-selection'],
10573
10659
  });
10574
10660
  }
10575
10661
  };
10576
10662
 
10577
- const ButtonMultiSelectionGroupClass = compose(
10578
- createStyleMixin({
10663
+ const ButtonMultiSelectionGroupClass = compose$1(
10664
+ createStyleMixin$1({
10579
10665
  mappings: {
10580
10666
  ...buttonSelectionGroupMappings,
10581
10667
  },
10582
10668
  }),
10583
- draggableMixin,
10669
+ draggableMixin$1,
10584
10670
  composedProxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),
10585
- componentNameValidationMixin,
10671
+ componentNameValidationMixin$1,
10586
10672
  buttonSelectionGroupBaseMixin,
10587
10673
  buttonMultiSelectionGroupMixin
10588
10674
  )(
@@ -10607,7 +10693,7 @@ var buttonMultiSelectionGroup$1 = /*#__PURE__*/Object.freeze({
10607
10693
  vars: vars$r
10608
10694
  });
10609
10695
 
10610
- const componentName$r = getComponentName('modal');
10696
+ const componentName$r = getComponentName$1('modal');
10611
10697
 
10612
10698
  const customMixin$5 = (superclass) =>
10613
10699
  class ModalMixinClass extends superclass {
@@ -10616,7 +10702,7 @@ const customMixin$5 = (superclass) =>
10616
10702
  }
10617
10703
 
10618
10704
  handleOpened() {
10619
- forwardAttrs(this, this.baseElement, { includeAttrs: ['opened'] });
10705
+ forwardAttrs$1(this, this.baseElement, { includeAttrs: ['opened'] });
10620
10706
  if (this.opened) {
10621
10707
  this.style.display = '';
10622
10708
  } else {
@@ -10668,8 +10754,8 @@ const customMixin$5 = (superclass) =>
10668
10754
  }
10669
10755
  };
10670
10756
 
10671
- const ModalClass = compose(
10672
- createStyleMixin({
10757
+ const ModalClass = compose$1(
10758
+ createStyleMixin$1({
10673
10759
  mappings: {
10674
10760
  overlayBackgroundColor: { property: () => ModalClass.cssVarList.overlay.backgroundColor },
10675
10761
  overlayShadow: { property: () => ModalClass.cssVarList.overlay.shadow },
@@ -10697,8 +10783,8 @@ const ModalClass = compose(
10697
10783
  attributes: ['opened'],
10698
10784
  },
10699
10785
  }),
10700
- draggableMixin,
10701
- componentNameValidationMixin,
10786
+ draggableMixin$1,
10787
+ componentNameValidationMixin$1,
10702
10788
  customMixin$5
10703
10789
  )(
10704
10790
  createProxy({
@@ -10710,7 +10796,7 @@ const ModalClass = compose(
10710
10796
  })
10711
10797
  );
10712
10798
 
10713
- const globalRefs$j = getThemeRefs(globals);
10799
+ const globalRefs$j = getThemeRefs(globals$1);
10714
10800
 
10715
10801
  const compVars$2 = ModalClass.cssVarList;
10716
10802
 
@@ -10803,7 +10889,7 @@ const defaultRowDetailsRenderer = (item, itemLabelsMapping) => {
10803
10889
  `;
10804
10890
  };
10805
10891
 
10806
- const componentName$q = getComponentName('grid');
10892
+ const componentName$q = getComponentName$1('grid');
10807
10893
 
10808
10894
  const GridMixin = (superclass) =>
10809
10895
  class GridMixinClass extends superclass {
@@ -11057,9 +11143,9 @@ const {
11057
11143
  detailsPanelContent: { selector: () => 'vaadin-grid .row-details' },
11058
11144
  };
11059
11145
 
11060
- const GridClass = compose(
11061
- createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }),
11062
- createStyleMixin({
11146
+ const GridClass = compose$1(
11147
+ createStyleMixin$1({ componentNameOverride: getComponentName$1('input-wrapper') }),
11148
+ createStyleMixin$1({
11063
11149
  mappings: {
11064
11150
  hostWidth: { selector: () => ':host', property: 'width' },
11065
11151
  hostHeight: { selector: () => ':host', property: 'height' },
@@ -11104,8 +11190,8 @@ const GridClass = compose(
11104
11190
  detailsPanelPadding: { ...detailsPanelContent, property: 'padding' },
11105
11191
  },
11106
11192
  }),
11107
- draggableMixin,
11108
- componentNameValidationMixin,
11193
+ draggableMixin$1,
11194
+ componentNameValidationMixin$1,
11109
11195
  GridMixin
11110
11196
  )(
11111
11197
  createProxy({
@@ -11161,7 +11247,7 @@ const GridClass = compose(
11161
11247
  })
11162
11248
  );
11163
11249
 
11164
- const globalRefs$i = getThemeRefs(globals);
11250
+ const globalRefs$i = getThemeRefs(globals$1);
11165
11251
  const vars$p = GridClass.cssVarList;
11166
11252
 
11167
11253
  const grid = {
@@ -11213,7 +11299,7 @@ var grid$1 = /*#__PURE__*/Object.freeze({
11213
11299
  vars: vars$p
11214
11300
  });
11215
11301
 
11216
- const componentName$p = getComponentName('notification-card');
11302
+ const componentName$p = getComponentName$1('notification-card');
11217
11303
 
11218
11304
  const notificationCardMixin = (superclass) =>
11219
11305
  class NotificationCardMixinClass extends superclass {
@@ -11262,8 +11348,8 @@ const selectors = {
11262
11348
  overlay: () => 'vaadin-notification-card::part(overlay)',
11263
11349
  };
11264
11350
 
11265
- const NotificationCardClass = compose(
11266
- createStyleMixin({
11351
+ const NotificationCardClass = compose$1(
11352
+ createStyleMixin$1({
11267
11353
  mappings: {
11268
11354
  hostMinWidth: { selector: selectors.content, property: 'min-width' },
11269
11355
  fontFamily: {},
@@ -11325,7 +11411,7 @@ const NotificationCardClass = compose(
11325
11411
  })
11326
11412
  );
11327
11413
 
11328
- const globalRefs$h = getThemeRefs(globals);
11414
+ const globalRefs$h = getThemeRefs(globals$1);
11329
11415
  const vars$o = NotificationCardClass.cssVarList;
11330
11416
 
11331
11417
  const shadowColor$2 = '#00000020';
@@ -11379,7 +11465,7 @@ var notificationCard = /*#__PURE__*/Object.freeze({
11379
11465
  vars: vars$o
11380
11466
  });
11381
11467
 
11382
- const componentName$o = getComponentName('multi-select-combo-box');
11468
+ const componentName$o = getComponentName$1('multi-select-combo-box');
11383
11469
 
11384
11470
  const multiSelectComboBoxMixin = (superclass) =>
11385
11471
  class MultiSelectComboBoxMixinClass extends superclass {
@@ -11673,13 +11759,13 @@ const multiSelectComboBoxMixin = (superclass) =>
11673
11759
 
11674
11760
  this.renderItems();
11675
11761
 
11676
- observeAttributes(this, this.renderItems.bind(this), { includeAttrs: ['data'] });
11762
+ observeAttributes$1(this, this.renderItems.bind(this), { includeAttrs: ['data'] });
11677
11763
 
11678
- observeChildren(this, this.#onChildrenChange.bind(this));
11764
+ observeChildren$1(this, this.#onChildrenChange.bind(this));
11679
11765
 
11680
11766
  // Note: we need to forward the `placeholder` because the vaadin component observes it and
11681
11767
  // tries to override it, causing us to lose the user set placeholder.
11682
- forwardAttrs(this, this.baseElement, { includeAttrs: ['placeholder'] });
11768
+ forwardAttrs$1(this, this.baseElement, { includeAttrs: ['placeholder'] });
11683
11769
 
11684
11770
  this.setDefaultValues();
11685
11771
 
@@ -11810,8 +11896,8 @@ const {
11810
11896
  },
11811
11897
  };
11812
11898
 
11813
- const MultiSelectComboBoxClass = compose(
11814
- createStyleMixin({
11899
+ const MultiSelectComboBoxClass = compose$1(
11900
+ createStyleMixin$1({
11815
11901
  mappings: {
11816
11902
  hostWidth: { ...host$6, property: 'width' },
11817
11903
  hostDirection: { ...host$6, property: 'direction' },
@@ -11914,7 +12000,7 @@ const MultiSelectComboBoxClass = compose(
11914
12000
  },
11915
12001
  },
11916
12002
  }),
11917
- draggableMixin,
12003
+ draggableMixin$1,
11918
12004
  portalMixin({
11919
12005
  name: 'overlay',
11920
12006
  selector: 'vaadin-multi-select-combo-box-internal',
@@ -11943,7 +12029,7 @@ const MultiSelectComboBoxClass = compose(
11943
12029
  }),
11944
12030
  composedProxyInputMixin({ proxyProps: ['selectionStart'], inputEvent: 'selected-items-changed' }),
11945
12031
  changeMixin,
11946
- componentNameValidationMixin,
12032
+ componentNameValidationMixin$1,
11947
12033
  multiSelectComboBoxMixin
11948
12034
  )(
11949
12035
  createProxy({
@@ -12031,7 +12117,7 @@ const MultiSelectComboBoxClass = compose(
12031
12117
  })
12032
12118
  );
12033
12119
 
12034
- const globalRefs$g = getThemeRefs(globals);
12120
+ const globalRefs$g = getThemeRefs(globals$1);
12035
12121
  const vars$n = MultiSelectComboBoxClass.cssVarList;
12036
12122
 
12037
12123
  const multiSelectComboBox = {
@@ -12117,9 +12203,9 @@ var multiSelectComboBox$1 = /*#__PURE__*/Object.freeze({
12117
12203
  vars: vars$n
12118
12204
  });
12119
12205
 
12120
- const componentName$n = getComponentName('badge');
12206
+ const componentName$n = getComponentName$1('badge');
12121
12207
 
12122
- class RawBadge extends createBaseClass({ componentName: componentName$n, baseSelector: ':host > div' }) {
12208
+ class RawBadge extends createBaseClass$1({ componentName: componentName$n, baseSelector: ':host > div' }) {
12123
12209
  constructor() {
12124
12210
  super();
12125
12211
 
@@ -12142,8 +12228,8 @@ class RawBadge extends createBaseClass({ componentName: componentName$n, baseSel
12142
12228
  }
12143
12229
  }
12144
12230
 
12145
- const BadgeClass = compose(
12146
- createStyleMixin({
12231
+ const BadgeClass = compose$1(
12232
+ createStyleMixin$1({
12147
12233
  mappings: {
12148
12234
  hostWidth: [{ selector: () => ':host', property: 'width' }],
12149
12235
  hostDirection: { property: 'direction' },
@@ -12166,11 +12252,11 @@ const BadgeClass = compose(
12166
12252
  textAlign: {},
12167
12253
  },
12168
12254
  }),
12169
- draggableMixin,
12170
- componentNameValidationMixin
12255
+ draggableMixin$1,
12256
+ componentNameValidationMixin$1
12171
12257
  )(RawBadge);
12172
12258
 
12173
- const globalRefs$f = getThemeRefs(globals);
12259
+ const globalRefs$f = getThemeRefs(globals$1);
12174
12260
  const vars$m = BadgeClass.cssVarList;
12175
12261
 
12176
12262
  const badge$2 = {
@@ -12346,7 +12432,7 @@ const AvatarClass = compose(
12346
12432
  componentNameValidationMixin
12347
12433
  )(RawAvatar);
12348
12434
 
12349
- const globalRefs$e = getThemeRefs(globals);
12435
+ const globalRefs$e = getThemeRefs$1(globals);
12350
12436
  const compVars$1 = AvatarClass.cssVarList;
12351
12437
 
12352
12438
  const avatar = {
@@ -12391,11 +12477,11 @@ var avatar$1 = /*#__PURE__*/Object.freeze({
12391
12477
  vars: vars$l
12392
12478
  });
12393
12479
 
12394
- const componentName$l = getComponentName('mappings-field-internal');
12480
+ const componentName$l = getComponentName$1('mappings-field-internal');
12395
12481
 
12396
12482
  createBaseInputClass({ componentName: componentName$l, baseSelector: 'div' });
12397
12483
 
12398
- const componentName$k = getComponentName('mappings-field');
12484
+ const componentName$k = getComponentName$1('mappings-field');
12399
12485
 
12400
12486
  const customMixin$4 = (superclass) =>
12401
12487
  class MappingsFieldMixinClass extends superclass {
@@ -12433,7 +12519,7 @@ const customMixin$4 = (superclass) =>
12433
12519
 
12434
12520
  this.inputElement = this.shadowRoot.querySelector(componentName$l);
12435
12521
 
12436
- forwardAttrs(this, this.inputElement, {
12522
+ forwardAttrs$1(this, this.inputElement, {
12437
12523
  includeAttrs: [
12438
12524
  'size',
12439
12525
  'full-width',
@@ -12486,8 +12572,8 @@ const {
12486
12572
  labelsContainer: { selector: 'descope-mappings-field-internal [part="labels"]' },
12487
12573
  };
12488
12574
 
12489
- const MappingsFieldClass = compose(
12490
- createStyleMixin({
12575
+ const MappingsFieldClass = compose$1(
12576
+ createStyleMixin$1({
12491
12577
  mappings: {
12492
12578
  hostWidth: { ...host$4, property: 'width' },
12493
12579
  hostDirection: { ...host$4, property: 'direction' },
@@ -12512,13 +12598,13 @@ const MappingsFieldClass = compose(
12512
12598
  removeButtonWidth: {},
12513
12599
  },
12514
12600
  }),
12515
- draggableMixin,
12601
+ draggableMixin$1,
12516
12602
  composedProxyInputMixin({
12517
12603
  proxyProps: ['value', 'selectionStart'],
12518
12604
  inputEvent: 'input',
12519
12605
  proxyParentValidation: true,
12520
12606
  }),
12521
- componentNameValidationMixin,
12607
+ componentNameValidationMixin$1,
12522
12608
  customMixin$4
12523
12609
  )(
12524
12610
  createProxy({
@@ -12570,7 +12656,7 @@ const MappingsFieldClass = compose(
12570
12656
  })
12571
12657
  );
12572
12658
 
12573
- const globalRefs$d = getThemeRefs(globals);
12659
+ const globalRefs$d = getThemeRefs(globals$1);
12574
12660
 
12575
12661
  const vars$k = MappingsFieldClass.cssVarList;
12576
12662
 
@@ -12604,8 +12690,8 @@ var deleteIcon = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTgi
12604
12690
 
12605
12691
  var editIcon = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTUiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNSAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwLjAwMDIgMC45OTIxNDlDMTAuMDAwMiAxLjAxNjE1IDEwLjAwMDIgMS4wMTYxNSAxMC4wMDAyIDEuMDE2MTVMOC4yMjQxOSAzLjAwODE1SDIuOTkyMTlDMi40NjQxOSAzLjAwODE1IDIuMDA4MTkgMy40NDAxNSAyLjAwODE5IDMuOTkyMTVWMTIuMDA4MkMyLjAwODE5IDEyLjUzNjIgMi40NDAxOSAxMi45OTIyIDIuOTkyMTkgMTIuOTkyMkg1LjUzNjE5QzUuODQ4MTkgMTMuMDQwMiA2LjE2MDE5IDEzLjA0MDIgNi40NzIxOSAxMi45OTIySDExLjAwODJDMTEuNTM2MiAxMi45OTIyIDExLjk5MjIgMTIuNTYwMiAxMS45OTIyIDEyLjAwODJWNy43ODQxNkwxMy45MzYyIDUuNjI0MTVMMTQuMDA4MiA1LjY3MjE1VjExLjk4NDJDMTQuMDA4MiAxMy42NjQyIDEyLjY2NDIgMTUuMDA4MiAxMS4wMDgyIDE1LjAwODJIMy4wMTYxOUMxLjMzNjE5IDE1LjAwODIgLTAuMDA3ODEyNSAxMy42NjQyIC0wLjAwNzgxMjUgMTEuOTg0MlYzLjk5MjE1Qy0wLjAwNzgxMjUgMi4zMzYxNSAxLjMzNjE5IDAuOTkyMTQ5IDMuMDE2MTkgMC45OTIxNDlIMTAuMDAwMlpNMTEuMjcyMiAyLjYyNDE1TDEyLjYxNjIgNC4xMTIxNUw3LjcyMDE5IDkuNjgwMTZDNy41MDQxOSA5LjkyMDE2IDYuODMyMTkgMTAuMjMyMiA1LjY4MDE5IDEwLjYxNjJDNS42NTYxOSAxMC42NDAyIDUuNjA4MTkgMTAuNjQwMiA1LjU2MDE5IDEwLjYxNjJDNS40NjQxOSAxMC41OTIyIDUuMzkyMTkgMTAuNDcyMiA1LjQ0MDE5IDEwLjM3NjJDNS43NTIxOSA5LjI0ODE2IDYuMDQwMTkgOC41NTIxNiA2LjI1NjE5IDguMzEyMTZMMTEuMjcyMiAyLjYyNDE1Wk0xMS45MjAyIDEuODU2MTVMMTMuMjg4MiAwLjMyMDE0OUMxMy42NDgyIC0wLjA4Nzg1MTYgMTQuMjcyMiAtMC4xMTE4NTIgMTQuNjgwMiAwLjI3MjE0OUMxNS4wODgyIDAuNjMyMTQ5IDE1LjExMjIgMS4yODAxNSAxNC43NTIyIDEuNjg4MTVMMTMuMjY0MiAzLjM2ODE1TDExLjkyMDIgMS44NTYxNVoiIGZpbGw9ImN1cnJlbnRjb2xvciIvPgo8L3N2Zz4K";
12606
12692
 
12607
- const componentName$j = getComponentName('user-attribute');
12608
- class RawUserAttribute extends createBaseClass({
12693
+ const componentName$j = getComponentName$1('user-attribute');
12694
+ class RawUserAttribute extends createBaseClass$1({
12609
12695
  componentName: componentName$j,
12610
12696
  baseSelector: ':host > .root',
12611
12697
  }) {
@@ -12819,8 +12905,8 @@ const { host: host$3, textFields, buttons: buttons$1, badge: badge$1, labelText,
12819
12905
  textWrapper: { selector: ' .text-wrapper' },
12820
12906
  };
12821
12907
 
12822
- const UserAttributeClass = compose(
12823
- createStyleMixin({
12908
+ const UserAttributeClass = compose$1(
12909
+ createStyleMixin$1({
12824
12910
  mappings: {
12825
12911
  hostWidth: { ...host$3, property: 'width' },
12826
12912
  hostMinWidth: { ...host$3, property: 'min-width' },
@@ -12836,11 +12922,11 @@ const UserAttributeClass = compose(
12836
12922
  itemsGap: [{ property: 'gap' }, { ...textWrapper$1, property: 'gap' }],
12837
12923
  },
12838
12924
  }),
12839
- draggableMixin,
12840
- componentNameValidationMixin
12925
+ draggableMixin$1,
12926
+ componentNameValidationMixin$1
12841
12927
  )(RawUserAttribute);
12842
12928
 
12843
- const globalRefs$c = getThemeRefs(globals);
12929
+ const globalRefs$c = getThemeRefs(globals$1);
12844
12930
  const vars$j = UserAttributeClass.cssVarList;
12845
12931
 
12846
12932
  const userAttribute = {
@@ -12863,8 +12949,8 @@ var userAttribute$1 = /*#__PURE__*/Object.freeze({
12863
12949
 
12864
12950
  var greenVIcon = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTggMEMzLjYgMCAwIDMuNiAwIDhDMCAxMi40IDMuNiAxNiA4IDE2QzEyLjQgMTYgMTYgMTIuNCAxNiA4QzE2IDMuNiAxMi40IDAgOCAwWk03LjEgMTEuN0wyLjkgNy42TDQuMyA2LjJMNyA4LjlMMTIgNEwxMy40IDUuNEw3LjEgMTEuN1oiIGZpbGw9IiM0Q0FGNTAiLz4KPC9zdmc+Cg==";
12865
12951
 
12866
- const componentName$i = getComponentName('user-auth-method');
12867
- class RawUserAuthMethod extends createBaseClass({
12952
+ const componentName$i = getComponentName$1('user-auth-method');
12953
+ class RawUserAuthMethod extends createBaseClass$1({
12868
12954
  componentName: componentName$i,
12869
12955
  baseSelector: ':host > .root',
12870
12956
  }) {
@@ -13034,8 +13120,8 @@ const { host: host$2, textField, buttons, badge, textWrapper, methodIconSlot } =
13034
13120
  methodIconSlot: { selector: 'slot[name="method-icon"]' },
13035
13121
  };
13036
13122
 
13037
- const UserAuthMethodClass = compose(
13038
- createStyleMixin({
13123
+ const UserAuthMethodClass = compose$1(
13124
+ createStyleMixin$1({
13039
13125
  mappings: {
13040
13126
  hostWidth: { ...host$2, property: 'width' },
13041
13127
  hostMinWidth: { ...host$2, property: 'min-width' },
@@ -13054,11 +13140,11 @@ const UserAuthMethodClass = compose(
13054
13140
  iconColor: [{ selector: () => '::slotted(*)', property: IconClass.cssVarList.fill }],
13055
13141
  },
13056
13142
  }),
13057
- draggableMixin,
13058
- componentNameValidationMixin
13143
+ draggableMixin$1,
13144
+ componentNameValidationMixin$1
13059
13145
  )(RawUserAuthMethod);
13060
13146
 
13061
- const globalRefs$b = getThemeRefs(globals);
13147
+ const globalRefs$b = getThemeRefs(globals$1);
13062
13148
  const vars$i = UserAuthMethodClass.cssVarList;
13063
13149
 
13064
13150
  const userAuthMethod = {
@@ -13079,11 +13165,11 @@ var userAuthMethod$1 = /*#__PURE__*/Object.freeze({
13079
13165
  vars: vars$i
13080
13166
  });
13081
13167
 
13082
- const componentName$h = getComponentName('saml-group-mappings-internal');
13168
+ const componentName$h = getComponentName$1('saml-group-mappings-internal');
13083
13169
 
13084
13170
  createBaseInputClass({ componentName: componentName$h, baseSelector: '' });
13085
13171
 
13086
- const componentName$g = getComponentName('saml-group-mappings');
13172
+ const componentName$g = getComponentName$1('saml-group-mappings');
13087
13173
 
13088
13174
  const customMixin$3 = (superclass) =>
13089
13175
  class SamlGroupMappingsMixinClass extends superclass {
@@ -13102,7 +13188,7 @@ const customMixin$3 = (superclass) =>
13102
13188
 
13103
13189
  this.inputElement = this.shadowRoot.querySelector(componentName$h);
13104
13190
 
13105
- forwardAttrs(this, this.inputElement, {
13191
+ forwardAttrs$1(this, this.inputElement, {
13106
13192
  includeAttrs: [
13107
13193
  'size',
13108
13194
  'full-width',
@@ -13127,8 +13213,8 @@ const { host: host$1, groupInput, errorMessage } = {
13127
13213
  errorMessage: { selector: '::part(error-message)' },
13128
13214
  };
13129
13215
 
13130
- const SamlGroupMappingsClass = compose(
13131
- createStyleMixin({
13216
+ const SamlGroupMappingsClass = compose$1(
13217
+ createStyleMixin$1({
13132
13218
  mappings: {
13133
13219
  hostWidth: { ...host$1, property: 'width' },
13134
13220
  hostDirection: { ...host$1, property: 'direction' },
@@ -13140,14 +13226,14 @@ const SamlGroupMappingsClass = compose(
13140
13226
  errorMessageIconPosition: { ...errorMessage, property: 'background-position' },
13141
13227
  },
13142
13228
  }),
13143
- draggableMixin,
13229
+ draggableMixin$1,
13144
13230
  composedProxyInputMixin({
13145
13231
  proxyProps: ['value', 'selectionStart'],
13146
13232
  inputEvent: 'input',
13147
13233
  triggerValidationEvents: ['mapping-item-added', 'mapping-item-removed'],
13148
13234
  proxyParentValidation: true,
13149
13235
  }),
13150
- componentNameValidationMixin,
13236
+ componentNameValidationMixin$1,
13151
13237
  customMixin$3
13152
13238
  )(
13153
13239
  createProxy({
@@ -13209,7 +13295,7 @@ var samlGroupMappings$1 = /*#__PURE__*/Object.freeze({
13209
13295
  vars: vars$h
13210
13296
  });
13211
13297
 
13212
- const globalRefs$a = getThemeRefs(globals);
13298
+ const globalRefs$a = getThemeRefs(globals$1);
13213
13299
  const vars$g = PolicyValidationClass.cssVarList;
13214
13300
 
13215
13301
  const policyValidation = {
@@ -13257,9 +13343,9 @@ const tpl = (input, inline) => {
13257
13343
  return inline ? input : `<pre>${input}</pre>`;
13258
13344
  };
13259
13345
 
13260
- const componentName$f = getComponentName('code-snippet');
13346
+ const componentName$f = getComponentName$1('code-snippet');
13261
13347
 
13262
- let CodeSnippet$1 = class CodeSnippet extends createBaseClass({ componentName: componentName$f, baseSelector: ':host > code' }) {
13348
+ let CodeSnippet$1 = class CodeSnippet extends createBaseClass$1({ componentName: componentName$f, baseSelector: ':host > code' }) {
13263
13349
  static get observedAttributes() {
13264
13350
  return ['lang', 'inline'];
13265
13351
  }
@@ -13294,7 +13380,7 @@ let CodeSnippet$1 = class CodeSnippet extends createBaseClass({ componentName: c
13294
13380
  this.lang = this.getAttribute('lang');
13295
13381
  this.isInline = this.getAttribute('inline') === 'true';
13296
13382
 
13297
- observeChildren(this, this.#renderSnippet.bind(this));
13383
+ observeChildren$1(this, this.#renderSnippet.bind(this));
13298
13384
  }
13299
13385
 
13300
13386
  get contentNode() {
@@ -13430,8 +13516,8 @@ const {
13430
13516
  tag: { selector: () => '.hljs-tag' },
13431
13517
  };
13432
13518
 
13433
- const CodeSnippetClass = compose(
13434
- createStyleMixin({
13519
+ const CodeSnippetClass = compose$1(
13520
+ createStyleMixin$1({
13435
13521
  mappings: {
13436
13522
  rootBgColor: { ...root, property: 'background-color' },
13437
13523
  rootTextColor: { ...root, property: 'color' },
@@ -13485,11 +13571,11 @@ const CodeSnippetClass = compose(
13485
13571
  tagTextColor: { ...tag, property: 'color' },
13486
13572
  },
13487
13573
  }),
13488
- draggableMixin,
13489
- componentNameValidationMixin
13574
+ draggableMixin$1,
13575
+ componentNameValidationMixin$1
13490
13576
  )(CodeSnippet$1);
13491
13577
 
13492
- const globalRefs$9 = getThemeRefs(globals);
13578
+ const globalRefs$9 = getThemeRefs(globals$1);
13493
13579
 
13494
13580
  const vars$e = CodeSnippetClass.cssVarList;
13495
13581
 
@@ -13635,7 +13721,7 @@ var codeSnippet = /*#__PURE__*/Object.freeze({
13635
13721
  vars: vars$e
13636
13722
  });
13637
13723
 
13638
- const componentName$e = getComponentName('radio-button');
13724
+ const componentName$e = getComponentName$1('radio-button');
13639
13725
 
13640
13726
  const customMixin$2 = (superclass) =>
13641
13727
  class CustomMixin extends superclass {
@@ -13659,7 +13745,7 @@ const customMixin$2 = (superclass) =>
13659
13745
 
13660
13746
  super.init?.();
13661
13747
 
13662
- observeChildren(this, this.renderLabel.bind(this));
13748
+ observeChildren$1(this, this.renderLabel.bind(this));
13663
13749
  }
13664
13750
 
13665
13751
  renderLabel() {
@@ -13671,8 +13757,8 @@ const customMixin$2 = (superclass) =>
13671
13757
  }
13672
13758
  };
13673
13759
 
13674
- const RadioButtonClass = compose(
13675
- createStyleMixin({
13760
+ const RadioButtonClass = compose$1(
13761
+ createStyleMixin$1({
13676
13762
  mappings: {
13677
13763
  cursor: [{}, { selector: 'label' }],
13678
13764
  fontSize: [{ selector: 'label' }, {}],
@@ -13692,7 +13778,7 @@ const RadioButtonClass = compose(
13692
13778
  },
13693
13779
  }),
13694
13780
  composedProxyInputMixin({ proxyProps: ['setSelectionRange'] }),
13695
- componentNameValidationMixin,
13781
+ componentNameValidationMixin$1,
13696
13782
  customMixin$2
13697
13783
  )(
13698
13784
  createProxy({
@@ -13704,7 +13790,7 @@ const RadioButtonClass = compose(
13704
13790
  })
13705
13791
  );
13706
13792
 
13707
- const componentName$d = getComponentName('radio-group');
13793
+ const componentName$d = getComponentName$1('radio-group');
13708
13794
 
13709
13795
  const RadioGroupMixin = (superclass) =>
13710
13796
  class RadioGroupMixinClass extends superclass {
@@ -13797,7 +13883,7 @@ const RadioGroupMixin = (superclass) =>
13797
13883
 
13798
13884
  this.renderItems();
13799
13885
 
13800
- observeAttributes(this, this.renderItems.bind(this), { includeAttrs: ['data'] });
13886
+ observeAttributes$1(this, this.renderItems.bind(this), { includeAttrs: ['data'] });
13801
13887
 
13802
13888
  Object.defineProperty(this.baseElement, 'validity', {
13803
13889
  get: () => {
@@ -13805,7 +13891,7 @@ const RadioGroupMixin = (superclass) =>
13805
13891
  },
13806
13892
  });
13807
13893
 
13808
- forwardAttrs(this, this.baseElement, {
13894
+ forwardAttrs$1(this, this.baseElement, {
13809
13895
  includeAttrs: ['layout'],
13810
13896
  mapAttrs: { layout: 'theme' },
13811
13897
  });
@@ -13817,13 +13903,13 @@ const RadioGroupMixin = (superclass) =>
13817
13903
  });
13818
13904
 
13819
13905
  // we want new items to get the size
13820
- observeChildren(this, ({ addedNodes }) => {
13906
+ observeChildren$1(this, ({ addedNodes }) => {
13821
13907
  addedNodes.forEach((node) => {
13822
13908
  node.setAttribute('size', this.size);
13823
13909
  });
13824
13910
  });
13825
13911
 
13826
- observeAttributes(
13912
+ observeAttributes$1(
13827
13913
  this,
13828
13914
  () => {
13829
13915
  this.items.forEach((item) => {
@@ -13837,8 +13923,8 @@ const RadioGroupMixin = (superclass) =>
13837
13923
  }
13838
13924
  };
13839
13925
 
13840
- const RadioGroupClass = compose(
13841
- createStyleMixin({
13926
+ const RadioGroupClass = compose$1(
13927
+ createStyleMixin$1({
13842
13928
  mappings: {
13843
13929
  ...textFieldMappings,
13844
13930
  buttonsSpacing: { selector: '::part(group-field)', property: 'justify-content' },
@@ -13850,9 +13936,9 @@ const RadioGroupClass = compose(
13850
13936
  },
13851
13937
  },
13852
13938
  }),
13853
- draggableMixin,
13939
+ draggableMixin$1,
13854
13940
  composedProxyInputMixin({ proxyProps: ['setSelectionRange'] }),
13855
- componentNameValidationMixin,
13941
+ componentNameValidationMixin$1,
13856
13942
  RadioGroupMixin
13857
13943
  )(
13858
13944
  createProxy({
@@ -13880,7 +13966,7 @@ const RadioGroupClass = compose(
13880
13966
  );
13881
13967
 
13882
13968
  const vars$d = RadioGroupClass.cssVarList;
13883
- const globalRefs$8 = getThemeRefs(globals);
13969
+ const globalRefs$8 = getThemeRefs(globals$1);
13884
13970
 
13885
13971
  const radioGroup = {
13886
13972
  [vars$d.buttonsRowGap]: '9px',
@@ -13922,7 +14008,7 @@ var radioGroup$1 = /*#__PURE__*/Object.freeze({
13922
14008
  });
13923
14009
 
13924
14010
  const vars$c = RadioButtonClass.cssVarList;
13925
- const globalRefs$7 = getThemeRefs(globals);
14011
+ const globalRefs$7 = getThemeRefs(globals$1);
13926
14012
 
13927
14013
  const radioButton = {
13928
14014
  [vars$c.fontFamily]: refs.fontFamily,
@@ -14280,7 +14366,7 @@ const nextMonth = (timestamp) => {
14280
14366
  return date;
14281
14367
  };
14282
14368
 
14283
- const componentName$c = getComponentName('calendar');
14369
+ const componentName$c = getComponentName$1('calendar');
14284
14370
 
14285
14371
  const observedAttrs$1 = [
14286
14372
  'initial-value',
@@ -14482,7 +14568,7 @@ class RawCalendar extends BaseInputClass$1 {
14482
14568
  );
14483
14569
 
14484
14570
  [this.monthInput, this.yearInput].forEach((selector) =>
14485
- forwardAttrs(this, selector, {
14571
+ forwardAttrs$1(this, selector, {
14486
14572
  includeAttrs: ['disabled', 'size', 'st-host-direction'],
14487
14573
  })
14488
14574
  );
@@ -14495,7 +14581,7 @@ class RawCalendar extends BaseInputClass$1 {
14495
14581
  this.submitButton.addEventListener('click', this.onSubmit.bind(this));
14496
14582
 
14497
14583
  [this.navPrevEle, this.navNextEle].forEach((btn) =>
14498
- forwardAttrs(this, btn, {
14584
+ forwardAttrs$1(this, btn, {
14499
14585
  includeAttrs: ['size'],
14500
14586
  })
14501
14587
  );
@@ -14788,9 +14874,9 @@ const {
14788
14874
  monthInput: { selector: () => '.month-input' },
14789
14875
  };
14790
14876
 
14791
- const CalendarClass = compose(
14792
- createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }),
14793
- createStyleMixin({
14877
+ const CalendarClass = compose$1(
14878
+ createStyleMixin$1({ componentNameOverride: getComponentName$1('input-wrapper') }),
14879
+ createStyleMixin$1({
14794
14880
  mappings: {
14795
14881
  fontSize: {},
14796
14882
  fontFamily: {},
@@ -14907,11 +14993,11 @@ const CalendarClass = compose(
14907
14993
  ],
14908
14994
  },
14909
14995
  }),
14910
- draggableMixin,
14911
- componentNameValidationMixin
14996
+ draggableMixin$1,
14997
+ componentNameValidationMixin$1
14912
14998
  )(RawCalendar);
14913
14999
 
14914
- const globalRefs$6 = getThemeRefs(globals);
15000
+ const globalRefs$6 = getThemeRefs(globals$1);
14915
15001
 
14916
15002
  const vars$b = CalendarClass.cssVarList;
14917
15003
 
@@ -15132,7 +15218,7 @@ class DateCounter {
15132
15218
  }
15133
15219
  }
15134
15220
 
15135
- const componentName$b = getComponentName('date-field');
15221
+ const componentName$b = getComponentName$1('date-field');
15136
15222
 
15137
15223
  // we set baseSelector to `vaadin-popover` as a temporary hack, so our portalMixin will
15138
15224
  // be able to process this component's overlay. The whole process needs refactoring as soon as possible.
@@ -15321,7 +15407,7 @@ class RawDateFieldClass extends BaseInputClass {
15321
15407
  this.inputElement.addEventListener('keydown', this.handleKeydownCaretPositionChange.bind(this));
15322
15408
  this.inputElement.addEventListener('keydown', this.handleValueChange.bind(this));
15323
15409
 
15324
- forwardAttrs(this, this.inputElement, {
15410
+ forwardAttrs$1(this, this.inputElement, {
15325
15411
  includeAttrs: [
15326
15412
  'label',
15327
15413
  'label-type',
@@ -15483,7 +15569,7 @@ class RawDateFieldClass extends BaseInputClass {
15483
15569
  this.calendar.setAttribute('preview', formatTimestamp(getCurrentTime(), NATIVE_FORMAT));
15484
15570
  }
15485
15571
 
15486
- forwardAttrs(this, this.calendar, {
15572
+ forwardAttrs$1(this, this.calendar, {
15487
15573
  includeAttrs: [
15488
15574
  'st-host-direction',
15489
15575
  'readonly',
@@ -15758,9 +15844,9 @@ const { host, input, inputEleRTL, toggleButton, overlay, backdrop } = {
15758
15844
  backdrop: { selector: 'vaadin-popover-overlay::part(backdrop)' },
15759
15845
  };
15760
15846
 
15761
- const DateFieldClass = compose(
15762
- createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }),
15763
- createStyleMixin({
15847
+ const DateFieldClass = compose$1(
15848
+ createStyleMixin$1({ componentNameOverride: getComponentName$1('input-wrapper') }),
15849
+ createStyleMixin$1({
15764
15850
  mappings: {
15765
15851
  iconMargin: { ...toggleButton, property: 'margin-inline-end' },
15766
15852
  hostWidth: { ...host, property: 'width' },
@@ -15804,11 +15890,11 @@ const DateFieldClass = compose(
15804
15890
  outlineStyle: { ...overlay },
15805
15891
  },
15806
15892
  }),
15807
- draggableMixin,
15808
- componentNameValidationMixin
15893
+ draggableMixin$1,
15894
+ componentNameValidationMixin$1
15809
15895
  )(RawDateFieldClass);
15810
15896
 
15811
- const globalRefs$5 = getThemeRefs(globals);
15897
+ const globalRefs$5 = getThemeRefs(globals$1);
15812
15898
  const shadowColor$1 = '#00000020';
15813
15899
  const { shadow } = globalRefs$5;
15814
15900
 
@@ -15854,7 +15940,7 @@ const activeableMixin = (superclass) =>
15854
15940
  }
15855
15941
  };
15856
15942
 
15857
- const componentName$a = getComponentName('list-item');
15943
+ const componentName$a = getComponentName$1('list-item');
15858
15944
 
15859
15945
  const customMixin$1 = (superclass) =>
15860
15946
  class ListItemMixinClass extends superclass {
@@ -15881,8 +15967,8 @@ const customMixin$1 = (superclass) =>
15881
15967
  }
15882
15968
  };
15883
15969
 
15884
- const ListItemClass = compose(
15885
- createStyleMixin({
15970
+ const ListItemClass = compose$1(
15971
+ createStyleMixin$1({
15886
15972
  mappings: {
15887
15973
  padding: {},
15888
15974
  backgroundColor: {},
@@ -15899,15 +15985,15 @@ const ListItemClass = compose(
15899
15985
  transition: {},
15900
15986
  },
15901
15987
  }),
15902
- draggableMixin,
15903
- componentNameValidationMixin,
15988
+ draggableMixin$1,
15989
+ componentNameValidationMixin$1,
15904
15990
  customMixin$1,
15905
15991
  activeableMixin
15906
- )(createBaseClass({ componentName: componentName$a, baseSelector: 'slot' }));
15992
+ )(createBaseClass$1({ componentName: componentName$a, baseSelector: 'slot' }));
15907
15993
 
15908
- const componentName$9 = getComponentName('list');
15994
+ const componentName$9 = getComponentName$1('list');
15909
15995
 
15910
- class RawList extends createBaseClass({ componentName: componentName$9, baseSelector: '.wrapper' }) {
15996
+ class RawList extends createBaseClass$1({ componentName: componentName$9, baseSelector: '.wrapper' }) {
15911
15997
  static get observedAttributes() {
15912
15998
  return ['variant', 'readonly'];
15913
15999
  }
@@ -15989,7 +16075,7 @@ class RawList extends createBaseClass({ componentName: componentName$9, baseSele
15989
16075
  super.init?.();
15990
16076
 
15991
16077
  // we want new items to get the size
15992
- observeChildren(this, () => {
16078
+ observeChildren$1(this, () => {
15993
16079
  this.#handleEmptyState();
15994
16080
  this.#handleItemsVariant();
15995
16081
  this.#handleReadOnly();
@@ -16020,8 +16106,8 @@ class RawList extends createBaseClass({ componentName: componentName$9, baseSele
16020
16106
  }
16021
16107
  }
16022
16108
 
16023
- const ListClass = compose(
16024
- createStyleMixin({
16109
+ const ListClass = compose$1(
16110
+ createStyleMixin$1({
16025
16111
  mappings: {
16026
16112
  hostWidth: { selector: () => ':host', property: 'width' },
16027
16113
  maxHeight: { selector: () => ':host' },
@@ -16050,11 +16136,11 @@ const ListClass = compose(
16050
16136
  },
16051
16137
  },
16052
16138
  }),
16053
- draggableMixin,
16054
- componentNameValidationMixin
16139
+ draggableMixin$1,
16140
+ componentNameValidationMixin$1
16055
16141
  )(RawList);
16056
16142
 
16057
- const globalRefs$4 = getThemeRefs(globals);
16143
+ const globalRefs$4 = getThemeRefs(globals$1);
16058
16144
 
16059
16145
  const compVars = ListClass.cssVarList;
16060
16146
 
@@ -16111,7 +16197,7 @@ var list$2 = /*#__PURE__*/Object.freeze({
16111
16197
  vars: vars$9
16112
16198
  });
16113
16199
 
16114
- const globalRefs$3 = getThemeRefs(globals);
16200
+ const globalRefs$3 = getThemeRefs(globals$1);
16115
16201
 
16116
16202
  const vars$8 = ListItemClass.cssVarList;
16117
16203
 
@@ -16228,7 +16314,7 @@ const createDynamicDataMixin =
16228
16314
  init() {
16229
16315
  super.init?.();
16230
16316
 
16231
- observeAttributes(
16317
+ observeAttributes$1(
16232
16318
  this,
16233
16319
  (attrs) => {
16234
16320
  if (attrs.includes('data')) this.#handleDataAttr();
@@ -16252,7 +16338,7 @@ const createDynamicDataMixin =
16252
16338
  }
16253
16339
  };
16254
16340
 
16255
- const componentName$8 = getComponentName('apps-list');
16341
+ const componentName$8 = getComponentName$1('apps-list');
16256
16342
 
16257
16343
  const limitAbbreviation = (str, limit = 2) =>
16258
16344
  str
@@ -16285,8 +16371,8 @@ const customMixin = (superclass) =>
16285
16371
  }
16286
16372
  };
16287
16373
 
16288
- const AppsListClass = compose(
16289
- createStyleMixin({
16374
+ const AppsListClass = compose$1(
16375
+ createStyleMixin$1({
16290
16376
  mappings: {
16291
16377
  maxHeight: { selector: () => ':host' },
16292
16378
  minHeight: { selector: () => ':host' },
@@ -16306,8 +16392,8 @@ const AppsListClass = compose(
16306
16392
  },
16307
16393
  }),
16308
16394
  createDynamicDataMixin({ itemRenderer: itemRenderer$1, rerenderAttrsList: ['size'] }),
16309
- draggableMixin,
16310
- componentNameValidationMixin,
16395
+ draggableMixin$1,
16396
+ componentNameValidationMixin$1,
16311
16397
  customMixin
16312
16398
  )(
16313
16399
  createProxy({
@@ -16340,7 +16426,7 @@ const AppsListClass = compose(
16340
16426
  );
16341
16427
 
16342
16428
  const vars$7 = AppsListClass.cssVarList;
16343
- const globalRefs$2 = getThemeRefs(globals);
16429
+ const globalRefs$2 = getThemeRefs(globals$1);
16344
16430
 
16345
16431
  const defaultHeight = '400px';
16346
16432
 
@@ -16376,7 +16462,7 @@ var appsList$1 = /*#__PURE__*/Object.freeze({
16376
16462
  vars: vars$7
16377
16463
  });
16378
16464
 
16379
- const componentName$7 = getComponentName('scopes-list');
16465
+ const componentName$7 = getComponentName$1('scopes-list');
16380
16466
  const variants = ['checkbox', 'switch'];
16381
16467
 
16382
16468
  const itemRenderer = ({ id, desc, required = false }, _, ref) => {
@@ -16395,7 +16481,7 @@ const itemRenderer = ({ id, desc, required = false }, _, ref) => {
16395
16481
  `;
16396
16482
  };
16397
16483
 
16398
- class RawScopesList extends createBaseClass({ componentName: componentName$7, baseSelector: 'div' }) {
16484
+ class RawScopesList extends createBaseClass$1({ componentName: componentName$7, baseSelector: 'div' }) {
16399
16485
  constructor() {
16400
16486
  super();
16401
16487
 
@@ -16457,8 +16543,8 @@ class RawScopesList extends createBaseClass({ componentName: componentName$7, ba
16457
16543
  }
16458
16544
  }
16459
16545
 
16460
- const ScopesListClass = compose(
16461
- createStyleMixin({
16546
+ const ScopesListClass = compose$1(
16547
+ createStyleMixin$1({
16462
16548
  mappings: {
16463
16549
  hostWidth: { selector: () => ':host', property: 'width' },
16464
16550
  hostDirection: [
@@ -16496,8 +16582,8 @@ const ScopesListClass = compose(
16496
16582
  },
16497
16583
  }),
16498
16584
  createDynamicDataMixin({ itemRenderer, rerenderAttrsList: ['size', 'variant'] }),
16499
- draggableMixin,
16500
- componentNameValidationMixin
16585
+ draggableMixin$1,
16586
+ componentNameValidationMixin$1
16501
16587
  )(RawScopesList);
16502
16588
 
16503
16589
  const vars$6 = ScopesListClass.cssVarList;
@@ -16519,8 +16605,8 @@ var scopesList$1 = /*#__PURE__*/Object.freeze({
16519
16605
 
16520
16606
  var arrowsImg = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjkiIGhlaWdodD0iMjgiIHZpZXdCb3g9IjAgMCAyOSAyOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTkuMTQ0OTIgMTUuNjQ1TDcuNDk5OTIgMTRMMi44MzMyNSAxOC42NjY3TDcuNDk5OTIgMjMuMzMzM0w5LjE0NDkyIDIxLjY4ODNMNy4zMDE1OSAxOS44MzMzSDI0Ljk5OTlWMTcuNUg3LjMwMTU5TDkuMTQ0OTIgMTUuNjQ1WiIgZmlsbD0iIzYzNkM3NCIvPgo8cGF0aCBkPSJNMTkuODU1IDEyLjM1NTNMMjEuNSAxNC4wMDAzTDI2LjE2NjcgOS4zMzM2NkwyMS41IDQuNjY2OTlMMTkuODU1IDYuMzExOTlMMjEuNjk4MyA4LjE2Njk5SDRWMTAuNTAwM0gyMS42OTgzTDE5Ljg1NSAxMi4zNTUzWiIgZmlsbD0iIzYzNkM3NCIvPgo8L3N2Zz4K";
16521
16607
 
16522
- const componentName$6 = getComponentName('third-party-app-logo');
16523
- class RawThirdPartyAppLogoClass extends createBaseClass({
16608
+ const componentName$6 = getComponentName$1('third-party-app-logo');
16609
+ class RawThirdPartyAppLogoClass extends createBaseClass$1({
16524
16610
  componentName: componentName$6,
16525
16611
  baseSelector: '.wrapper',
16526
16612
  }) {
@@ -16587,8 +16673,8 @@ class RawThirdPartyAppLogoClass extends createBaseClass({
16587
16673
  const companyLogoWrapper = '>.company-logo-wrapper';
16588
16674
  const thirdPartyAppLogoWrapper = '>.third-party-app-logo-wrapper';
16589
16675
 
16590
- const ThirdPartyAppLogoClass = compose(
16591
- createStyleMixin({
16676
+ const ThirdPartyAppLogoClass = compose$1(
16677
+ createStyleMixin$1({
16592
16678
  mappings: {
16593
16679
  logoMaxHeight: [
16594
16680
  { selector: companyLogoWrapper, property: 'height' },
@@ -16611,11 +16697,11 @@ const ThirdPartyAppLogoClass = compose(
16611
16697
  arrowsColor: { selector: IconClass.componentName, property: IconClass.cssVarList.fill },
16612
16698
  },
16613
16699
  }),
16614
- draggableMixin,
16615
- componentNameValidationMixin
16700
+ draggableMixin$1,
16701
+ componentNameValidationMixin$1
16616
16702
  )(RawThirdPartyAppLogoClass);
16617
16703
 
16618
- const globalRefs$1 = getThemeRefs(globals);
16704
+ const globalRefs$1 = getThemeRefs(globals$1);
16619
16705
  const vars$5 = ThirdPartyAppLogoClass.cssVarList;
16620
16706
 
16621
16707
  const thirdPartyAppLogo = {
@@ -16651,7 +16737,7 @@ var thirdPartyAppLogo$1 = /*#__PURE__*/Object.freeze({
16651
16737
  vars: vars$5
16652
16738
  });
16653
16739
 
16654
- const componentName$5 = getComponentName('security-questions-setup');
16740
+ const componentName$5 = getComponentName$1('security-questions-setup');
16655
16741
 
16656
16742
  const attrsToSync$1 = [
16657
16743
  'full-width',
@@ -16670,7 +16756,7 @@ const attrsToSync$1 = [
16670
16756
  ];
16671
16757
 
16672
16758
  const attrsToReRender$1 = ['count', 'questions'];
16673
- class RawSecurityQuestionsSetup extends createBaseClass({ componentName: componentName$5, baseSelector: 'div' }) {
16759
+ class RawSecurityQuestionsSetup extends createBaseClass$1({ componentName: componentName$5, baseSelector: 'div' }) {
16674
16760
  constructor() {
16675
16761
  super();
16676
16762
 
@@ -16848,7 +16934,7 @@ class RawSecurityQuestionsSetup extends createBaseClass({ componentName: compone
16848
16934
  init() {
16849
16935
  super.init?.();
16850
16936
  // render new components
16851
- observeAttributes(
16937
+ observeAttributes$1(
16852
16938
  this,
16853
16939
  () => {
16854
16940
  this.#renderQuestions();
@@ -16857,14 +16943,14 @@ class RawSecurityQuestionsSetup extends createBaseClass({ componentName: compone
16857
16943
  );
16858
16944
 
16859
16945
  // update existing components
16860
- observeAttributes(this, this.#syncAttrs.bind(this), {
16946
+ observeAttributes$1(this, this.#syncAttrs.bind(this), {
16861
16947
  includeAttrs: attrsToSync$1,
16862
16948
  });
16863
16949
  }
16864
16950
  }
16865
16951
 
16866
- const SecurityQuestionsSetupClass = compose(
16867
- createStyleMixin({
16952
+ const SecurityQuestionsSetupClass = compose$1(
16953
+ createStyleMixin$1({
16868
16954
  mappings: {
16869
16955
  hostWidth: [{ selector: () => ':host', property: 'width' }, { property: 'width' }],
16870
16956
  hostDirection: [
@@ -16881,8 +16967,8 @@ const SecurityQuestionsSetupClass = compose(
16881
16967
  gap: { selector: () => 'div', property: 'gap' },
16882
16968
  },
16883
16969
  }),
16884
- draggableMixin,
16885
- componentNameValidationMixin
16970
+ draggableMixin$1,
16971
+ componentNameValidationMixin$1
16886
16972
  )(RawSecurityQuestionsSetup);
16887
16973
 
16888
16974
  const vars$4 = SecurityQuestionsSetupClass.cssVarList;
@@ -16900,7 +16986,7 @@ var securityQuestionsSetup$1 = /*#__PURE__*/Object.freeze({
16900
16986
  vars: vars$4
16901
16987
  });
16902
16988
 
16903
- const componentName$4 = getComponentName('security-questions-verify');
16989
+ const componentName$4 = getComponentName$1('security-questions-verify');
16904
16990
 
16905
16991
  const textFieldsAttrs = [
16906
16992
  'full-width',
@@ -16924,7 +17010,7 @@ const attrMappings = {
16924
17010
  const attrsToSync = [...textFieldsAttrs, ...textsAttrs];
16925
17011
 
16926
17012
  const attrsToReRender = ['questions'];
16927
- class RawSecurityQuestionsVerify extends createBaseClass({ componentName: componentName$4, baseSelector: 'div' }) {
17013
+ class RawSecurityQuestionsVerify extends createBaseClass$1({ componentName: componentName$4, baseSelector: 'div' }) {
16928
17014
  constructor() {
16929
17015
  super();
16930
17016
 
@@ -17051,7 +17137,7 @@ class RawSecurityQuestionsVerify extends createBaseClass({ componentName: compon
17051
17137
  init() {
17052
17138
  super.init?.();
17053
17139
  // render new components
17054
- observeAttributes(
17140
+ observeAttributes$1(
17055
17141
  this,
17056
17142
  () => {
17057
17143
  this.#renderQuestions();
@@ -17060,15 +17146,15 @@ class RawSecurityQuestionsVerify extends createBaseClass({ componentName: compon
17060
17146
  );
17061
17147
 
17062
17148
  // update existing components
17063
- observeAttributes(this, this.#syncAttrs.bind(this), {
17149
+ observeAttributes$1(this, this.#syncAttrs.bind(this), {
17064
17150
  includeAttrs: attrsToSync,
17065
17151
  });
17066
17152
  }
17067
17153
  }
17068
17154
 
17069
- const SecurityQuestionsVerifyClass = compose(
17070
- createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }),
17071
- createStyleMixin({
17155
+ const SecurityQuestionsVerifyClass = compose$1(
17156
+ createStyleMixin$1({ componentNameOverride: getComponentName$1('input-wrapper') }),
17157
+ createStyleMixin$1({
17072
17158
  mappings: {
17073
17159
  hostWidth: [{ selector: () => ':host', property: 'width' }, { property: 'width' }],
17074
17160
  hostDirection: [
@@ -17122,8 +17208,8 @@ const SecurityQuestionsVerifyClass = compose(
17122
17208
  },
17123
17209
  },
17124
17210
  }),
17125
- draggableMixin,
17126
- componentNameValidationMixin
17211
+ draggableMixin$1,
17212
+ componentNameValidationMixin$1
17127
17213
  )(RawSecurityQuestionsVerify);
17128
17214
 
17129
17215
  const vars$3 = SecurityQuestionsVerifyClass.cssVarList;
@@ -17150,7 +17236,7 @@ const isNumericValue = (val) => NUMERIC_RE.test(val.replaceAll('+', '').replaceA
17150
17236
 
17151
17237
  const sanitizeCountryCodePrefix = (val) => val.replace(/\+\d+-/, '');
17152
17238
 
17153
- const componentName$3 = getComponentName('hybrid-field');
17239
+ const componentName$3 = getComponentName$1('hybrid-field');
17154
17240
 
17155
17241
  const attrs = {
17156
17242
  shared: [
@@ -17209,7 +17295,7 @@ const EMAIL_FIELD = 'descope-email-field';
17209
17295
  const PHONE_FIELD = 'descope-phone-field';
17210
17296
  const PHONE_INPUT_BOX_FIELD = 'descope-phone-input-box-field';
17211
17297
 
17212
- const BaseClass$1 = createBaseClass({
17298
+ const BaseClass$1 = createBaseClass$1({
17213
17299
  componentName: componentName$3,
17214
17300
  baseSelector: 'div',
17215
17301
  });
@@ -17359,19 +17445,19 @@ class RawHybridField extends BaseClass$1 {
17359
17445
  }
17360
17446
 
17361
17447
  updateAttrs() {
17362
- forwardAttrs(this, this.emailInput, { includeAttrs: attrs.email, mapAttrs: attrMap.email });
17448
+ forwardAttrs$1(this, this.emailInput, { includeAttrs: attrs.email, mapAttrs: attrMap.email });
17363
17449
 
17364
- forwardAttrs(this, this.phoneCountryCodeInput, {
17450
+ forwardAttrs$1(this, this.phoneCountryCodeInput, {
17365
17451
  includeAttrs: attrs.phone.countryCode,
17366
17452
  mapAttrs: attrMap.phone,
17367
17453
  });
17368
17454
 
17369
- forwardAttrs(this, this.phoneInputBoxInput, {
17455
+ forwardAttrs$1(this, this.phoneInputBoxInput, {
17370
17456
  includeAttrs: attrs.phone.inputBox,
17371
17457
  mapAttrs: attrMap.phone,
17372
17458
  });
17373
17459
 
17374
- this.inputs.forEach((input) => forwardAttrs(this, input, { includeAttrs: attrs.shared }));
17460
+ this.inputs.forEach((input) => forwardAttrs$1(this, input, { includeAttrs: attrs.shared }));
17375
17461
 
17376
17462
  setTimeout(() => this.phoneCountryCodeInput.setAttribute('default-code', this.defaultCode));
17377
17463
  }
@@ -17440,9 +17526,9 @@ class RawHybridField extends BaseClass$1 {
17440
17526
  }
17441
17527
  }
17442
17528
 
17443
- const HybridFieldClass = compose(
17444
- createStyleMixin({ componentNameOverride: getComponentName('input-wrapper') }),
17445
- createStyleMixin({
17529
+ const HybridFieldClass = compose$1(
17530
+ createStyleMixin$1({ componentNameOverride: getComponentName$1('input-wrapper') }),
17531
+ createStyleMixin$1({
17446
17532
  mappings: {
17447
17533
  hostWidth: { selector: () => ':host', property: 'width' },
17448
17534
  hostDirection: [
@@ -17502,8 +17588,8 @@ const HybridFieldClass = compose(
17502
17588
  ],
17503
17589
  },
17504
17590
  }),
17505
- draggableMixin,
17506
- componentNameValidationMixin
17591
+ draggableMixin$1,
17592
+ componentNameValidationMixin$1
17507
17593
  )(RawHybridField);
17508
17594
 
17509
17595
  const vars$2 = HybridFieldClass.cssVarList;
@@ -17529,11 +17615,9 @@ var hybridField$1 = /*#__PURE__*/Object.freeze({
17529
17615
  vars: vars$2
17530
17616
  });
17531
17617
 
17532
- customElements.define(componentName$N, EnrichedTextClass);
17533
-
17534
- const componentName$2 = getComponentName('alert');
17618
+ const componentName$2 = getComponentName$1('alert');
17535
17619
 
17536
- class RawAlert extends createBaseClass({ componentName: componentName$2, baseSelector: ':host > div' }) {
17620
+ class RawAlert extends createBaseClass$1({ componentName: componentName$2, baseSelector: ':host > div' }) {
17537
17621
  constructor() {
17538
17622
  super();
17539
17623
 
@@ -17575,7 +17659,7 @@ class RawAlert extends createBaseClass({ componentName: componentName$2, baseSel
17575
17659
 
17576
17660
  this.slotEle.addEventListener('slotchange', this.handleSlotChange.bind(this));
17577
17661
 
17578
- forwardAttrs(this, this.textComp, ['variant', 'full-width', 'link-target-blank']);
17662
+ forwardAttrs$1(this, this.textComp, ['variant', 'full-width', 'link-target-blank']);
17579
17663
  }
17580
17664
 
17581
17665
  handleSlotChange() {
@@ -17589,8 +17673,8 @@ const { icon } = {
17589
17673
  icon: { selector: () => '.icon' },
17590
17674
  };
17591
17675
 
17592
- const AlertClass = compose(
17593
- createStyleMixin({
17676
+ const AlertClass = compose$1(
17677
+ createStyleMixin$1({
17594
17678
  mappings: {
17595
17679
  hostWidth: { selector: () => ':host', property: 'width' },
17596
17680
  hostDirection: { selector: () => ':host', property: 'direction' },
@@ -17625,13 +17709,13 @@ const AlertClass = compose(
17625
17709
  ],
17626
17710
  },
17627
17711
  }),
17628
- createStyleMixin({ componentNameOverride: getComponentName('enriched-text') }),
17629
- createStyleMixin({ componentNameOverride: getComponentName('text') }),
17630
- draggableMixin,
17631
- componentNameValidationMixin
17712
+ createStyleMixin$1({ componentNameOverride: getComponentName$1('enriched-text') }),
17713
+ createStyleMixin$1({ componentNameOverride: getComponentName$1('text') }),
17714
+ draggableMixin$1,
17715
+ componentNameValidationMixin$1
17632
17716
  )(RawAlert);
17633
17717
 
17634
- const globalRefs = getThemeRefs(globals);
17718
+ const globalRefs = getThemeRefs(globals$1);
17635
17719
  const vars$1 = AlertClass.cssVarList;
17636
17720
 
17637
17721
  const alert = {
@@ -17785,7 +17869,7 @@ const vars = Object.keys(components).reduce(
17785
17869
  {}
17786
17870
  );
17787
17871
 
17788
- const defaultTheme = { globals, components: theme };
17872
+ const defaultTheme = { globals: globals$1, components: theme };
17789
17873
  const themeVars = { globals: vars$U, components: vars };
17790
17874
 
17791
17875
  const colors = {
@@ -17835,11 +17919,11 @@ const darkTheme = merge({}, defaultTheme, {
17835
17919
  },
17836
17920
  });
17837
17921
 
17838
- const componentName$1 = getComponentName('recaptcha');
17922
+ const componentName$1 = getComponentName$1('recaptcha');
17839
17923
 
17840
17924
  const observedAttributes = ['enabled', 'site-key', 'action', 'enterprise'];
17841
17925
 
17842
- const BaseClass = createBaseClass({
17926
+ const BaseClass = createBaseClass$1({
17843
17927
  componentName: componentName$1,
17844
17928
  baseSelector: ':host > div',
17845
17929
  });
@@ -17922,7 +18006,7 @@ class RawRecaptcha extends BaseClass {
17922
18006
  init() {
17923
18007
  super.init?.();
17924
18008
 
17925
- observeChildren(this, this.updatePreview.bind(this));
18009
+ observeChildren$1(this, this.updatePreview.bind(this));
17926
18010
  }
17927
18011
 
17928
18012
  updatePreview() {
@@ -18059,9 +18143,9 @@ class RawRecaptcha extends BaseClass {
18059
18143
  }
18060
18144
  }
18061
18145
 
18062
- const RecaptchaClass = compose(draggableMixin)(RawRecaptcha);
18146
+ const RecaptchaClass = compose$1(draggableMixin$1)(RawRecaptcha);
18063
18147
 
18064
- const componentName = getComponentName('notification');
18148
+ const componentName = getComponentName$1('notification');
18065
18149
 
18066
18150
  const NotificationMixin = (superclass) =>
18067
18151
  class NotificationMixinClass extends superclass {
@@ -18116,7 +18200,7 @@ const NotificationMixin = (superclass) =>
18116
18200
 
18117
18201
  this.createCard();
18118
18202
 
18119
- forwardAttrs(this, this.#card);
18203
+ forwardAttrs$1(this, this.#card);
18120
18204
  syncAttrs(this.#card, this, { includeAttrs: ['opened'] });
18121
18205
 
18122
18206
  this.baseElement.renderer = (cardRoot) => {
@@ -18147,10 +18231,10 @@ const NotificationMixin = (superclass) =>
18147
18231
  }
18148
18232
  };
18149
18233
 
18150
- const NotificationClass = compose(
18151
- draggableMixin,
18152
- componentNameValidationMixin,
18153
- hoverableMixin,
18234
+ const NotificationClass = compose$1(
18235
+ draggableMixin$1,
18236
+ componentNameValidationMixin$1,
18237
+ hoverableMixin$1,
18154
18238
  NotificationMixin
18155
18239
  )(
18156
18240
  createProxy({