@descope/web-components-ui 1.0.419 → 1.0.421

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 (236) hide show
  1. package/README.md +1 -0
  2. package/dist/cjs/index.cjs.js +1439 -1353
  3. package/dist/cjs/index.cjs.js.map +1 -1
  4. package/dist/index.d.ts +0 -2
  5. package/dist/index.esm.js +1983 -1091
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/umd/1172.js +240 -0
  8. package/dist/umd/{8162.js → 1396.js} +3 -3
  9. package/dist/umd/1402.js +1 -0
  10. package/dist/umd/1484.js +148 -0
  11. package/dist/umd/{5026.js → 189.js} +5 -117
  12. package/dist/umd/{6637.js → 201.js} +5 -5
  13. package/dist/umd/{1053.js → 2159.js} +13 -13
  14. package/dist/umd/2540.js +1 -0
  15. package/dist/umd/2570.js +338 -0
  16. package/dist/umd/2666.js +148 -0
  17. package/dist/umd/3110.js +275 -0
  18. package/dist/umd/{9167.js → 3191.js} +66 -12
  19. package/dist/umd/3437.js +2 -0
  20. package/dist/umd/{6418.js → 3638.js} +2 -2
  21. package/dist/umd/{7212.js → 404.js} +8 -8
  22. package/dist/umd/4114.js +124 -0
  23. package/dist/umd/{7607.js → 4127.js} +9 -9
  24. package/dist/umd/4187.js +2 -0
  25. package/dist/umd/4218.js +129 -0
  26. package/dist/umd/4455.js +422 -0
  27. package/dist/umd/4480.js +1 -1
  28. package/dist/umd/{5086.js → 4554.js} +5 -5
  29. package/dist/umd/{4834.js → 4574.js} +5 -5
  30. package/dist/umd/4619.js +1 -1
  31. package/dist/umd/4902.js +170 -0
  32. package/dist/umd/{5273.js → 507.js} +5 -5
  33. package/dist/umd/5096.js +109 -0
  34. package/dist/umd/5318.js +1 -0
  35. package/dist/umd/5414.js +2 -0
  36. package/dist/umd/5414.js.LICENSE.txt +1 -0
  37. package/dist/umd/{8164.js → 5563.js} +5 -5
  38. package/dist/umd/{7824.js → 7097.js} +5 -117
  39. package/dist/umd/7150.js +2 -0
  40. package/dist/umd/7150.js.LICENSE.txt +485 -0
  41. package/dist/umd/731.js +832 -0
  42. package/dist/umd/742.js +2 -0
  43. package/dist/umd/{351.js → 7979.js} +10 -10
  44. package/dist/umd/8823.js +1 -0
  45. package/dist/umd/{6474.js → 9030.js} +12 -12
  46. package/dist/umd/9243.js +202 -0
  47. package/dist/umd/9243.js.LICENSE.txt +51 -0
  48. package/dist/umd/{5443.js → 9478.js} +5 -117
  49. package/dist/umd/DescopeDev.js +1 -2
  50. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
  51. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  52. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
  53. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
  54. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
  55. package/dist/umd/descope-alert-index-js.js +1 -1
  56. package/dist/umd/descope-apps-list-index-js.js +1 -1
  57. package/dist/umd/descope-avatar.js +1 -0
  58. package/dist/umd/descope-button-index-js.js +4 -116
  59. package/dist/umd/descope-code-snippet-index-js.js +1 -1
  60. package/dist/umd/descope-combo-box-index-js.js +5 -5
  61. package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -1
  62. package/dist/umd/descope-date-field-index-js.js +1 -1
  63. package/dist/umd/descope-divider-index-js.js +1 -1
  64. package/dist/umd/descope-email-field-index-js.js +4 -4
  65. package/dist/umd/descope-enriched-text-index-js.js +1 -1
  66. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +4 -4
  67. package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js +19 -4
  68. package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js.LICENSE.txt +12 -0
  69. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
  70. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +4 -4
  71. package/dist/umd/descope-grid-index-js.js +1 -1
  72. package/dist/umd/descope-hybrid-field-index-js.js +3 -3
  73. package/dist/umd/descope-icon-index-js.js +1 -1
  74. package/dist/umd/descope-link-index-js.js +1 -1
  75. package/dist/umd/descope-modal-index-js.js +1 -1
  76. package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
  77. package/dist/umd/descope-new-password-index-js.js +1 -1
  78. package/dist/umd/descope-notification-descope-notification-card-index-js.js +1 -1
  79. package/dist/umd/descope-notification-index-js.js +1 -1
  80. package/dist/umd/descope-number-field-index-js.js +1 -1
  81. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +1 -1
  82. package/dist/umd/descope-passcode-index-js.js +1 -1
  83. package/dist/umd/descope-password-index-js.js +1 -1
  84. package/dist/umd/descope-radio-group-index-js.js +1 -1
  85. package/dist/umd/descope-scopes-list-index-js.js +1 -1
  86. package/dist/umd/descope-security-questions-setup-index-js.js +1 -1
  87. package/dist/umd/descope-security-questions-verify-index-js.js +2 -2
  88. package/dist/umd/descope-text-area-index-js.js +1 -1
  89. package/dist/umd/descope-text-field-index-js.js +2 -2
  90. package/dist/umd/descope-text.js +1 -0
  91. package/dist/umd/descope-third-party-app-logo-index-js.js +1 -1
  92. package/dist/umd/descope-upload-file-index-js.js +1 -1
  93. package/dist/umd/descope-user-attribute-index-js.js +1 -1
  94. package/dist/umd/descope-user-auth-method-index-js.js +1 -1
  95. package/dist/umd/index.js +1 -1
  96. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
  97. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
  98. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
  99. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  100. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +2 -2
  101. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +7 -7
  102. package/node_modules/common/.eslintrc.json +18 -0
  103. package/node_modules/common/README.md +7 -0
  104. package/node_modules/common/package.json +34 -0
  105. package/node_modules/common/project.json +7 -0
  106. package/node_modules/common/src/baseClasses/baseClasses/createBaseClass.js +66 -0
  107. package/node_modules/common/src/baseClasses/baseClasses/createBaseInputClass.js +14 -0
  108. package/node_modules/common/src/baseClasses/baseClasses/createCssVarImageClass.js +55 -0
  109. package/node_modules/common/src/baseClasses/index.js +3 -0
  110. package/node_modules/common/src/componentsHelpers/index.js +95 -0
  111. package/node_modules/common/src/componentsMixins/helpers/mixinsHelpers.js +10 -0
  112. package/node_modules/common/src/componentsMixins/index.js +1 -0
  113. package/node_modules/common/src/componentsMixins/mixins/activableMixin.js +14 -0
  114. package/node_modules/common/src/componentsMixins/mixins/changeMixin.js +22 -0
  115. package/node_modules/common/src/componentsMixins/mixins/componentNameValidationMixin.js +23 -0
  116. package/node_modules/common/src/componentsMixins/mixins/componentsContextMixin.js +12 -0
  117. package/node_modules/common/src/componentsMixins/mixins/createDynamicDataMixin.js +100 -0
  118. package/node_modules/common/src/componentsMixins/mixins/createProxy.js +58 -0
  119. package/node_modules/common/src/componentsMixins/mixins/createStyleMixin/helpers.js +106 -0
  120. package/node_modules/common/src/componentsMixins/mixins/createStyleMixin/index.js +167 -0
  121. package/node_modules/common/src/componentsMixins/mixins/draggableMixin.js +62 -0
  122. package/node_modules/common/src/componentsMixins/mixins/externalInputHelpers.js +93 -0
  123. package/node_modules/common/src/componentsMixins/mixins/externalInputMixin.js +170 -0
  124. package/node_modules/common/src/componentsMixins/mixins/hoverableMixin.js +13 -0
  125. package/node_modules/common/src/componentsMixins/mixins/index.js +14 -0
  126. package/node_modules/common/src/componentsMixins/mixins/inputEventsDispatchingMixin.js +76 -0
  127. package/node_modules/common/src/componentsMixins/mixins/inputValidationMixin.js +210 -0
  128. package/node_modules/common/src/componentsMixins/mixins/lifecycleEventsMixin.js +23 -0
  129. package/node_modules/common/src/componentsMixins/mixins/normalizeBooleanAttributesMixin.js +57 -0
  130. package/node_modules/common/src/componentsMixins/mixins/portalMixin.js +112 -0
  131. package/node_modules/common/src/componentsMixins/mixins/proxyInputMixin.js +242 -0
  132. package/node_modules/common/src/constants.js +4 -0
  133. package/node_modules/common/src/icons/errorMessageIconBase64.js +1 -0
  134. package/node_modules/common/src/sbControls.js +302 -0
  135. package/node_modules/common/src/themeHelpers/colorsHelpers.js +94 -0
  136. package/node_modules/common/src/themeHelpers/index.js +176 -0
  137. package/node_modules/common/src/utils/index.js +68 -0
  138. package/node_modules/descope-avatar/e2e/descope-avatar.spec.ts +54 -0
  139. package/node_modules/descope-avatar/package.json +34 -0
  140. package/node_modules/descope-avatar/project.json +7 -0
  141. package/{src/components/descope-avatar → node_modules/descope-avatar/src/component}/AvatarClass.js +4 -4
  142. package/{src/theme/components/avatar.js → node_modules/descope-avatar/src/theme.js} +3 -3
  143. package/node_modules/descope-avatar/stories/avatar.jpeg +0 -0
  144. package/node_modules/descope-avatar/stories/descope-avatar.stories.js +32 -0
  145. package/node_modules/descope-text/e2e/descope-text.spec.ts +35 -0
  146. package/node_modules/descope-text/package.json +31 -0
  147. package/node_modules/descope-text/project.json +7 -0
  148. package/{src/components/descope-text → node_modules/descope-text/src/component}/TextClass.js +4 -4
  149. package/{src/theme/components/text.js → node_modules/descope-text/src/theme.js} +3 -3
  150. package/node_modules/descope-text/stories/descope-text.stories.js +55 -0
  151. package/node_modules/theme-globals/package.json +16 -0
  152. package/node_modules/theme-globals/project.json +7 -0
  153. package/node_modules/theme-globals/src/index.js +180 -0
  154. package/package.json +54 -43
  155. package/src/components/descope-apps-list/AppsListClass.js +1 -1
  156. package/src/components/descope-apps-list/index.js +2 -2
  157. package/src/components/descope-divider/DividerClass.js +1 -1
  158. package/src/components/descope-divider/index.js +1 -1
  159. package/src/components/descope-link/LinkClass.js +1 -1
  160. package/src/components/descope-link/index.js +1 -1
  161. package/src/components/descope-security-questions-verify/SecurityQuestionsVerifyClass.js +1 -1
  162. package/src/components/descope-security-questions-verify/index.js +1 -1
  163. package/src/components/descope-user-attribute/UserAttributeClass.js +1 -1
  164. package/src/components/descope-user-attribute/index.js +1 -1
  165. package/src/components/descope-user-auth-method/UserAuthMethodClass.js +1 -1
  166. package/src/components/descope-user-auth-method/index.js +1 -1
  167. package/src/components/mapping-fields/descope-mappings-field/MappingsFieldClass.js +1 -1
  168. package/src/components/mapping-fields/descope-mappings-field/index.js +1 -1
  169. package/src/helpers/themeHelpers/index.js +1 -1
  170. package/src/index.cjs.js +2 -2
  171. package/src/index.d.ts +0 -2
  172. package/src/index.js +2 -2
  173. package/src/index.umd.js +3 -1
  174. package/src/mixins/createStyleMixin/index.js +1 -1
  175. package/src/theme/components/alert.js +1 -1
  176. package/src/theme/components/comboBox.js +2 -2
  177. package/src/theme/components/enrichedText.js +1 -1
  178. package/src/theme/components/index.js +2 -2
  179. package/dist/umd/1033.js +0 -2
  180. package/dist/umd/1414.js +0 -352
  181. package/dist/umd/1437.js +0 -422
  182. package/dist/umd/1672.js +0 -1
  183. package/dist/umd/2566.js +0 -2
  184. package/dist/umd/2838.js +0 -2
  185. package/dist/umd/2838.js.LICENSE.txt +0 -1
  186. package/dist/umd/286.js +0 -148
  187. package/dist/umd/2919.js +0 -832
  188. package/dist/umd/3222.js +0 -282
  189. package/dist/umd/3607.js +0 -2
  190. package/dist/umd/3711.js +0 -123
  191. package/dist/umd/5412.js +0 -109
  192. package/dist/umd/650.js +0 -1
  193. package/dist/umd/6726.js +0 -148
  194. package/dist/umd/7407.js +0 -450
  195. package/dist/umd/8980.js +0 -143
  196. package/dist/umd/8980.js.LICENSE.txt +0 -29
  197. package/dist/umd/9632.js +0 -275
  198. package/dist/umd/9878.js +0 -1
  199. package/dist/umd/9895.js +0 -17
  200. package/dist/umd/DescopeDev.js.LICENSE.txt +0 -1
  201. package/dist/umd/bcdfe87ae253c2cf789c9a737f8d8c22.woff +0 -0
  202. package/dist/umd/descope-avatar-index-js.js +0 -1
  203. package/dist/umd/descope-text-index-js.js +0 -1
  204. /package/dist/umd/{1414.js.LICENSE.txt → 1172.js.LICENSE.txt} +0 -0
  205. /package/dist/umd/{1437.js.LICENSE.txt → 1396.js.LICENSE.txt} +0 -0
  206. /package/dist/umd/{6726.js.LICENSE.txt → 1484.js.LICENSE.txt} +0 -0
  207. /package/dist/umd/{286.js.LICENSE.txt → 189.js.LICENSE.txt} +0 -0
  208. /package/dist/umd/{6637.js.LICENSE.txt → 201.js.LICENSE.txt} +0 -0
  209. /package/dist/umd/{1053.js.LICENSE.txt → 2159.js.LICENSE.txt} +0 -0
  210. /package/dist/umd/{351.js.LICENSE.txt → 2570.js.LICENSE.txt} +0 -0
  211. /package/dist/umd/{5026.js.LICENSE.txt → 2666.js.LICENSE.txt} +0 -0
  212. /package/dist/umd/{9632.js.LICENSE.txt → 3110.js.LICENSE.txt} +0 -0
  213. /package/dist/umd/{9167.js.LICENSE.txt → 3191.js.LICENSE.txt} +0 -0
  214. /package/dist/umd/{1033.js.LICENSE.txt → 3437.js.LICENSE.txt} +0 -0
  215. /package/dist/umd/{6418.js.LICENSE.txt → 3638.js.LICENSE.txt} +0 -0
  216. /package/dist/umd/{7212.js.LICENSE.txt → 404.js.LICENSE.txt} +0 -0
  217. /package/dist/umd/{3711.js.LICENSE.txt → 4114.js.LICENSE.txt} +0 -0
  218. /package/dist/umd/{7607.js.LICENSE.txt → 4127.js.LICENSE.txt} +0 -0
  219. /package/dist/umd/{3607.js.LICENSE.txt → 4187.js.LICENSE.txt} +0 -0
  220. /package/dist/umd/{3222.js.LICENSE.txt → 4218.js.LICENSE.txt} +0 -0
  221. /package/dist/umd/{5086.js.LICENSE.txt → 4455.js.LICENSE.txt} +0 -0
  222. /package/dist/umd/{5273.js.LICENSE.txt → 4554.js.LICENSE.txt} +0 -0
  223. /package/dist/umd/{4834.js.LICENSE.txt → 4574.js.LICENSE.txt} +0 -0
  224. /package/dist/umd/{9895.js.LICENSE.txt → 4902.js.LICENSE.txt} +0 -0
  225. /package/dist/umd/{5443.js.LICENSE.txt → 507.js.LICENSE.txt} +0 -0
  226. /package/dist/umd/{5412.js.LICENSE.txt → 5096.js.LICENSE.txt} +0 -0
  227. /package/dist/umd/{8164.js.LICENSE.txt → 5563.js.LICENSE.txt} +0 -0
  228. /package/dist/umd/{7407.js.LICENSE.txt → 7097.js.LICENSE.txt} +0 -0
  229. /package/dist/umd/{2919.js.LICENSE.txt → 731.js.LICENSE.txt} +0 -0
  230. /package/dist/umd/{2566.js.LICENSE.txt → 742.js.LICENSE.txt} +0 -0
  231. /package/dist/umd/{7824.js.LICENSE.txt → 7979.js.LICENSE.txt} +0 -0
  232. /package/dist/umd/{6474.js.LICENSE.txt → 9030.js.LICENSE.txt} +0 -0
  233. /package/dist/umd/{8162.js.LICENSE.txt → 9478.js.LICENSE.txt} +0 -0
  234. /package/{src/helpers → node_modules/common/src}/themeHelpers/componentsThemeManager.js +0 -0
  235. /package/{src/components/descope-avatar → node_modules/descope-avatar/src/component}/index.js +0 -0
  236. /package/{src/components/descope-text → node_modules/descope-text/src/component}/index.js +0 -0
@@ -0,0 +1,180 @@
1
+ import { getThemeRefs, getThemeVars, genColors } from 'common/theme-helpers';
2
+
3
+ const direction = 'ltr';
4
+
5
+ export const colors = genColors({
6
+ surface: {
7
+ main: '#ffffff',
8
+ dark: '#636c74',
9
+ light: '#cfd3d7',
10
+ highlight: '#f4f5f6',
11
+ contrast: '#181a1c',
12
+ },
13
+ primary: {
14
+ main: '#006af5',
15
+ dark: '#004094',
16
+ light: '#71aeff',
17
+ highlight: '#f0f6ff',
18
+ contrast: '#ffffff',
19
+ },
20
+ secondary: {
21
+ main: '#802ed6',
22
+ dark: '#6410bc',
23
+ light: '#be89f5',
24
+ highlight: '#ede7f6',
25
+ contrast: '#ffffff',
26
+ },
27
+ success: {
28
+ main: '#008000',
29
+ dark: '#005700',
30
+ light: '#8bc38b',
31
+ highlight: '#f5faf5',
32
+ contrast: '#ffffff',
33
+ },
34
+ error: {
35
+ main: '#e21d12',
36
+ dark: '#b3170f',
37
+ light: '#f4807a',
38
+ highlight: '#fef1f1',
39
+ contrast: '#ffffff',
40
+ },
41
+ });
42
+
43
+ const fonts = {
44
+ font1: {
45
+ family: [
46
+ 'Roboto',
47
+ 'ui-sans-serif',
48
+ 'system-ui',
49
+ '-apple-system',
50
+ 'BlinkMacSystemFont',
51
+ 'Segoe UI',
52
+ 'Helvetica Neue',
53
+ 'Arial',
54
+ 'Noto Sans',
55
+ 'sans-serif',
56
+ 'Apple Color Emoji',
57
+ 'Segoe UI Emoji',
58
+ 'Segoe UI Symbol',
59
+ 'Noto Color Emoji',
60
+ ],
61
+ label: 'Roboto',
62
+ url: 'https://fonts.googleapis.com/css?family=Roboto:100,200,300,400,500,600,700,800,900',
63
+ },
64
+ font2: {
65
+ family: [
66
+ 'ui-sans-serif',
67
+ 'system-ui',
68
+ '-apple-system',
69
+ 'BlinkMacSystemFont',
70
+ 'Segoe UI',
71
+ 'Roboto',
72
+ 'Helvetica Neue',
73
+ 'Arial',
74
+ 'Noto Sans',
75
+ 'sans-serif',
76
+ 'Apple Color Emoji',
77
+ 'Segoe UI Emoji',
78
+ 'Segoe UI Symbol',
79
+ 'Noto Color Emoji',
80
+ ],
81
+ label: 'Sans Serif',
82
+ },
83
+ };
84
+
85
+ const fontsRef = getThemeRefs({ fonts }).fonts;
86
+
87
+ const typography = {
88
+ h1: {
89
+ font: fontsRef.font1.family,
90
+ weight: '900',
91
+ size: '48px',
92
+ },
93
+ h2: {
94
+ font: fontsRef.font1.family,
95
+ weight: '800',
96
+ size: '38px',
97
+ },
98
+ h3: {
99
+ font: fontsRef.font1.family,
100
+ weight: '600',
101
+ size: '28px',
102
+ },
103
+ subtitle1: {
104
+ font: fontsRef.font2.family,
105
+ weight: '500',
106
+ size: '22px',
107
+ },
108
+ subtitle2: {
109
+ font: fontsRef.font2.family,
110
+ weight: '400',
111
+ size: '20px',
112
+ },
113
+ body1: {
114
+ font: fontsRef.font1.family,
115
+ weight: '400',
116
+ size: '16px',
117
+ },
118
+ body2: {
119
+ font: fontsRef.font1.family,
120
+ weight: '400',
121
+ size: '14px',
122
+ },
123
+ };
124
+
125
+ const spacing = {
126
+ xs: '2px',
127
+ sm: '4px',
128
+ md: '8px',
129
+ lg: '16px',
130
+ xl: '32px',
131
+ };
132
+
133
+ const border = {
134
+ xs: '1px',
135
+ sm: '2px',
136
+ md: '3px',
137
+ lg: '4px',
138
+ xl: '5px',
139
+ };
140
+
141
+ const radius = {
142
+ xs: '5px',
143
+ sm: '10px',
144
+ md: '15px',
145
+ lg: '20px',
146
+ xl: '25px',
147
+ '2xl': '30px',
148
+ '3xl': '35px',
149
+ };
150
+
151
+ const shadow = {
152
+ wide: {
153
+ sm: '0 2px 3px -0.5px',
154
+ md: '0 4px 6px -1px',
155
+ lg: '0 10px 15px -3px',
156
+ xl: '0 20px 25px -5px',
157
+ '2xl': '0 25px 50px -12px',
158
+ },
159
+ narrow: {
160
+ sm: '0 1px 2px -1px',
161
+ md: '0 2px 4px -2px',
162
+ lg: '0 4px 6px -4px',
163
+ xl: '0 8px 10px -6px',
164
+ '2xl': '0 16px 16px -8px',
165
+ },
166
+ };
167
+
168
+ const globals = {
169
+ colors,
170
+ typography,
171
+ spacing,
172
+ border,
173
+ radius,
174
+ shadow,
175
+ fonts,
176
+ direction,
177
+ };
178
+
179
+ export default globals;
180
+ export const vars = getThemeVars(globals);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/web-components-ui",
3
- "version": "1.0.419",
3
+ "version": "1.0.421",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -14,36 +14,6 @@
14
14
  "require": "./package.json"
15
15
  }
16
16
  },
17
- "scripts": {
18
- "test:unit": "jest",
19
- "test:pw": "playwright test",
20
- "test:pw:updateSnapshots": "npm run test:pw -- --update-snapshots",
21
- "test:ui": "playwright test --ui",
22
- "test:ui:debug": "PWDEBUG=1 npm run test:ui",
23
- "test:ci": "npm run container:build && docker run --rm --network host -v $(pwd):/work/ -w /work/ descope-wcui-playwright-image",
24
- "test:ci:updateSnapshots": "npm run test:ci -- --update-snapshots",
25
- "lint": "eslint --fix --max-warnings 0",
26
- "lint:all": "npm run lint .",
27
- "build:umd": "webpack -c webpack.prod.js",
28
- "build:lib": "rollup -c",
29
- "build": "npm run build:umd && npm run build:lib && cp src/index.d.ts dist",
30
- "start": "webpack serve -c webpack.dev.js --port=8888",
31
- "format": "prettier --ignore-path .gitignore --write .",
32
- "format:all": "npm run format .",
33
- "format-lint": "lint-staged",
34
- "prepare": "husky install",
35
- "storybook": "start-storybook -p 6006 --quiet",
36
- "build-storybook": "build-storybook",
37
- "container:build": "docker build -t descope-wcui-playwright-image .",
38
- "container:debug": "docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.38.0-jammy /bin/bash",
39
- "postinstall": "if [ \"$PWD\" = \"$INIT_CWD\" ]; then npx patch-package --error-on-fail --error-on-warn && cp ./patches/lumo-icons.woff ./node_modules/@vaadin/vaadin-lumo-styles/lumo-icons.woff; fi"
40
- },
41
- "lint-staged": {
42
- "src/**/*.{js,jsx}": [
43
- "npm run lint",
44
- "npm run format"
45
- ]
46
- },
47
17
  "files": [
48
18
  "dist",
49
19
  "src"
@@ -54,15 +24,18 @@
54
24
  "@babel/preset-env": "^7.22.2",
55
25
  "@jest/globals": "^29.7.0",
56
26
  "@playwright/test": "1.38.1",
57
- "@rollup/plugin-node-resolve": "^16.0.0",
58
- "@storybook/addon-actions": "^6.4.9",
59
- "@storybook/addon-controls": "^6.4.9",
60
- "@storybook/addon-essentials": "^6.4.9",
61
- "@storybook/addon-links": "^6.4.9",
62
- "@storybook/html": "^6.4.9",
63
- "@storybook/manager-api": "^7.4.6",
27
+ "@rollup/plugin-node-resolve": "^15.0.2",
28
+ "@storybook/addon-actions": "^8.4.7",
29
+ "@storybook/addon-controls": "^8.4.7",
30
+ "@storybook/addon-essentials": "^8.4.7",
31
+ "@storybook/addon-links": "^8.4.7",
32
+ "@storybook/addon-webpack5-compiler-babel": "^3.0.3",
33
+ "@storybook/html": "^8.4.7",
34
+ "@storybook/html-webpack5": "^8.4.7",
35
+ "@storybook/manager-api": "^8.4.7",
36
+ "@storybook/web-components-vite": "^8.4.7",
64
37
  "@types/lodash.debounce": "^4.0.9",
65
- "@types/node": "^22.0.0",
38
+ "@types/node": "^20.8.0",
66
39
  "eslint": "^8.48.0",
67
40
  "eslint-config-airbnb-base": "^15.0.0",
68
41
  "eslint-config-prettier": "^9.0.0",
@@ -81,10 +54,18 @@
81
54
  "svg-url-loader": "^8.0.0",
82
55
  "webpack": "^5.79.0",
83
56
  "webpack-cli": "^6.0.0",
84
- "webpack-dev-server": "^5.0.0"
57
+ "webpack-dev-server": "^5.0.0",
58
+ "@rollup/plugin-virtual": "3.0.2",
59
+ "rollup-replace-plugin": "0.0.1",
60
+ "webpack-replace-plugin": "0.0.1"
85
61
  },
62
+ "bundledDependencies": [
63
+ "common",
64
+ "theme-globals",
65
+ "descope-text",
66
+ "descope-avatar"
67
+ ],
86
68
  "dependencies": {
87
- "@vaadin/avatar": "24.3.4",
88
69
  "@vaadin/button": "24.3.4",
89
70
  "@vaadin/checkbox": "24.3.4",
90
71
  "@vaadin/combo-box": "24.3.4",
@@ -109,7 +90,11 @@
109
90
  "libphonenumber-js": "^1.11.12",
110
91
  "lodash.debounce": "4.0.8",
111
92
  "lodash.merge": "4.6.2",
112
- "markdown-it": "14.1.0"
93
+ "markdown-it": "14.1.0",
94
+ "common": "0.0.1",
95
+ "descope-text": "0.0.1",
96
+ "descope-avatar": "0.0.1",
97
+ "theme-globals": "0.0.1"
113
98
  },
114
99
  "overrides": {
115
100
  "@vaadin/avatar": "24.3.4",
@@ -138,5 +123,31 @@
138
123
  },
139
124
  "vaadin": {
140
125
  "disableUsageStatistics": true
126
+ },
127
+ "scripts": {
128
+ "e2e": "npm run e2e:container -- \"$(node ./scripts/printAffectedComponents)\"",
129
+ "e2e:local": "playwright test",
130
+ "e2e:local:ui": "playwright test --ui",
131
+ "e2e:local:ui:debug": "PWDEBUG=1 npm run e2e:local:ui",
132
+ "pree2e:container": "docker build -t descope-wcui-playwright-image .",
133
+ "e2e:container": "MONOREPO_ROOT=$(git rev-parse --show-toplevel) && PROJECT_DIR=$(pwd) && PROJECT_RELATIVE_PATH=${PROJECT_DIR#$MONOREPO_ROOT/} && docker run --rm --network host -v $MONOREPO_ROOT:/work/ -w /work/$PROJECT_RELATIVE_PATH descope-wcui-playwright-image",
134
+ "e2e:container:updateSnapshots": "npm run e2e:container -- --update-snapshots",
135
+ "container:build": "docker build -t descope-wcui-playwright-image .",
136
+ "container:debug": "MONOREPO_ROOT=$(git rev-parse --show-toplevel) && PROJECT_DIR=$(pwd) && PROJECT_RELATIVE_PATH=${PROJECT_DIR#$MONOREPO_ROOT/} && docker run --rm --network host -v $MONOREPO_ROOT:/work/ -w /work/$PROJECT_RELATIVE_PATH -it mcr.microsoft.com/playwright:v1.38.0-jammy /bin/bash",
137
+ "print-components": "nx show projects --projects 'packages/web-components/components/*'",
138
+ "print-components:affected": "nx show projects --projects 'packages/web-components/components/*' --affected",
139
+ "print-components:affected:ci": "nx show projects --projects 'packages/web-components/components/*' --affected --base=$(sh $(git rev-parse --show-toplevel)/tools/scripts/latestTag.sh)",
140
+ "test": "jest",
141
+ "lint": "eslint --fix --max-warnings 0",
142
+ "lint:all": "npm run lint .",
143
+ "build:umd": "webpack -c webpack.prod.js",
144
+ "build:lib": "rollup -c",
145
+ "build": "npm run build:umd && npm run build:lib && cp src/index.d.ts dist",
146
+ "start": "webpack serve -c webpack.dev.js --port=8888",
147
+ "format": "prettier --ignore-path .gitignore --write .",
148
+ "format:all": "npm run format .",
149
+ "storybook": "storybook dev -p 6006 --quiet",
150
+ "build-storybook": "storybook build",
151
+ "lint-staged": "lint-staged"
141
152
  }
142
- }
153
+ }
@@ -7,7 +7,7 @@ import {
7
7
  componentNameValidationMixin,
8
8
  } from '../../mixins';
9
9
  import { createDynamicDataMixin } from '../../mixins/createDynamicDataMixin';
10
- import { TextClass } from '../descope-text/TextClass';
10
+ import { TextClass } from 'descope-text/class';
11
11
 
12
12
  export const componentName = getComponentName('apps-list');
13
13
 
@@ -1,6 +1,6 @@
1
1
  import '../descope-list';
2
- import '../descope-avatar';
3
- import '../descope-text';
2
+ import 'descope-avatar';
3
+ import 'descope-text';
4
4
  import { componentName, AppsListClass } from './AppsListClass';
5
5
 
6
6
  customElements.define(componentName, AppsListClass);
@@ -2,7 +2,7 @@ import { createStyleMixin, draggableMixin, componentNameValidationMixin } from '
2
2
  import { createBaseClass } from '../../baseClasses/createBaseClass';
3
3
  import { compose } from '../../helpers';
4
4
  import { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';
5
- import { TextClass } from '../descope-text/TextClass';
5
+ import { TextClass } from 'descope-text/class';
6
6
 
7
7
  export const componentName = getComponentName('divider');
8
8
  class RawDivider extends createBaseClass({ componentName, baseSelector: ':host > div' }) {
@@ -1,5 +1,5 @@
1
1
  import { componentName, DividerClass } from './DividerClass';
2
- import '../descope-text';
2
+ import 'descope-text';
3
3
 
4
4
  customElements.define(componentName, DividerClass);
5
5
 
@@ -1,6 +1,6 @@
1
1
  import { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';
2
2
  import { createBaseClass } from '../../baseClasses/createBaseClass';
3
- import { TextClass } from '../descope-text/TextClass';
3
+ import { TextClass } from 'descope-text/class';
4
4
  import { compose } from '../../helpers';
5
5
  import { forwardAttrs, getComponentName } from '../../helpers/componentHelpers';
6
6
 
@@ -1,5 +1,5 @@
1
1
  import { componentName, LinkClass } from './LinkClass';
2
- import '../descope-text';
2
+ import 'descope-text';
3
3
 
4
4
  customElements.define(componentName, LinkClass);
5
5
 
@@ -2,7 +2,7 @@ import { createBaseClass } from '../../baseClasses/createBaseClass';
2
2
  import { compose } from '../../helpers';
3
3
  import { getComponentName, observeAttributes } from '../../helpers/componentHelpers';
4
4
  import { componentNameValidationMixin, createStyleMixin, draggableMixin } from '../../mixins';
5
- import { TextClass } from '../descope-text/TextClass';
5
+ import { TextClass } from 'descope-text/class';
6
6
  import { TextFieldClass } from '../descope-text-field/TextFieldClass';
7
7
 
8
8
  export const componentName = getComponentName('security-questions-verify');
@@ -1,5 +1,5 @@
1
1
  import { componentName, SecurityQuestionsVerifyClass } from './SecurityQuestionsVerifyClass';
2
- import '../descope-text';
2
+ import 'descope-text';
3
3
  import '../descope-text-field';
4
4
 
5
5
  customElements.define(componentName, SecurityQuestionsVerifyClass);
@@ -4,7 +4,7 @@ import { compose } from '../../helpers';
4
4
  import { getComponentName } from '../../helpers/componentHelpers';
5
5
  import deleteIcon from './delete.svg';
6
6
  import editIcon from './edit.svg';
7
- import { TextClass } from '../descope-text/TextClass';
7
+ import { TextClass } from 'descope-text/class';
8
8
  import { ButtonClass } from '../descope-button/ButtonClass';
9
9
  import { BadgeClass } from '../descope-badge/BadgeClass';
10
10
 
@@ -1,5 +1,5 @@
1
1
  import { componentName, UserAttributeClass } from './UserAttributeClass';
2
- import '../descope-text';
2
+ import 'descope-text';
3
3
  import '../descope-button';
4
4
  import '../descope-badge';
5
5
  import '@vaadin/icon';
@@ -3,7 +3,7 @@ import { createBaseClass } from '../../baseClasses/createBaseClass';
3
3
  import { compose } from '../../helpers';
4
4
  import { getComponentName } from '../../helpers/componentHelpers';
5
5
  import greenVIcon from './green-v.svg';
6
- import { TextClass } from '../descope-text/TextClass';
6
+ import { TextClass } from 'descope-text/class';
7
7
  import { ButtonClass } from '../descope-button/ButtonClass';
8
8
  import { BadgeClass } from '../descope-badge/BadgeClass';
9
9
  import { IconClass } from '../descope-icon/IconClass';
@@ -1,5 +1,5 @@
1
1
  import { componentName, UserAuthMethodClass } from './UserAuthMethodClass';
2
- import '../descope-text';
2
+ import 'descope-text';
3
3
  import '../descope-button';
4
4
  import '../descope-badge';
5
5
  import '@vaadin/icon';
@@ -5,7 +5,7 @@ import {
5
5
  proxyInputMixin,
6
6
  componentNameValidationMixin,
7
7
  } from '../../../mixins';
8
- import { TextClass } from '../../descope-text/TextClass';
8
+ import { TextClass } from 'descope-text/class';
9
9
  import { compose } from '../../../helpers';
10
10
  import { forwardAttrs, getComponentName, syncAttrs } from '../../../helpers/componentHelpers';
11
11
  import { componentName as descopeInternalComponentName } from './descope-mappings-field-internal/MappingsFieldInternal';
@@ -2,7 +2,7 @@ import '@vaadin/custom-field';
2
2
  import '@vaadin/icon';
3
3
  import '@vaadin/icons';
4
4
  import { componentName, MappingsFieldClass } from './MappingsFieldClass';
5
- import '../../descope-text';
5
+ import 'descope-text';
6
6
  import '../../descope-button';
7
7
  import '../../descope-text-field';
8
8
  import '../../descope-combo-box';
@@ -172,4 +172,4 @@ export const createHelperVars = (theme, prefix) => {
172
172
  return [res.theme, res.useVars, res.vars];
173
173
  };
174
174
 
175
- export { componentsThemeManager } from './componentsThemeManager';
175
+ export { componentsThemeManager } from 'common/theme-helpers';
package/src/index.cjs.js CHANGED
@@ -20,7 +20,6 @@ export { NotpImageClass } from './components/descope-notp-image/NotpImageClass';
20
20
  export { NumberFieldClass } from './components/descope-number-field/NumberFieldClass';
21
21
  export { PasscodeClass } from './components/descope-passcode/PasscodeClass';
22
22
  export { PasswordClass } from './components/descope-password/PasswordClass';
23
- export { TextClass } from './components/descope-text/TextClass';
24
23
  export { EnrichedTextClass } from './components/descope-enriched-text/EnrichedTextClass';
25
24
  export { TextAreaClass } from './components/descope-text-area/TextAreaClass';
26
25
  export { TextFieldClass } from './components/descope-text-field/TextFieldClass';
@@ -38,7 +37,6 @@ export { NotificationClass } from './components/descope-notification/Notificatio
38
37
  export { GridClass } from './components/descope-grid/GridClass';
39
38
  export { BadgeClass } from './components/descope-badge/BadgeClass';
40
39
  export { MultiSelectComboBoxClass } from './components/descope-multi-select-combo-box/MultiSelectComboBoxClass';
41
- export { AvatarClass } from './components/descope-avatar/AvatarClass';
42
40
  export { UserAttributeClass } from './components/descope-user-attribute/UserAttributeClass';
43
41
  export { UserAuthMethodClass } from './components/descope-user-auth-method/UserAuthMethodClass';
44
42
  export { MappingsFieldClass } from './components/mapping-fields/descope-mappings-field/MappingsFieldClass';
@@ -58,3 +56,5 @@ export { SecurityQuestionsSetupClass } from './components/descope-security-quest
58
56
  export { SecurityQuestionsVerifyClass } from './components/descope-security-questions-verify/SecurityQuestionsVerifyClass';
59
57
  export { HybridFieldClass } from './components/descope-hybrid-field/HybridFieldClass';
60
58
  export { AlertClass } from './components/descope-alert/AlertClass';
59
+
60
+ /* INJECT_COMPONENTS */
package/src/index.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- declare module '@descope/web-components-ui';
2
-
3
1
  export {
4
2
  globalsThemeToStyle,
5
3
  createComponentsTheme,
package/src/index.js CHANGED
@@ -15,7 +15,6 @@ export * from './components/descope-notp-image';
15
15
  export * from './components/descope-number-field';
16
16
  export * from './components/descope-passcode';
17
17
  export * from './components/descope-password';
18
- export * from './components/descope-text';
19
18
  export * from './components/descope-enriched-text';
20
19
  export * from './components/descope-text-area';
21
20
  export * from './components/descope-text-field';
@@ -33,7 +32,6 @@ export * from './components/descope-multi-select-combo-box';
33
32
  export * from './components/descope-badge';
34
33
  export * from './components/descope-modal';
35
34
  export * from './components/descope-notification';
36
- export * from './components/descope-avatar';
37
35
  export * from './components/descope-icon';
38
36
  export * from './components/mapping-fields/descope-mappings-field';
39
37
  export * from './components/descope-user-attribute';
@@ -60,3 +58,5 @@ export {
60
58
  export { genColor } from './helpers/themeHelpers/colorsHelpers';
61
59
  export { defaultTheme, themeVars } from './theme';
62
60
  export { default as darkTheme } from './darkTheme';
61
+
62
+ /* INJECT_COMPONENTS */
package/src/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- const { componentsThemeManager } = require('./helpers/themeHelpers/componentsThemeManager');
1
+ const { componentsThemeManager } = require('./helpers/themeHelpers');
2
2
 
3
3
  const components = import.meta.webpackContext('./components', {
4
4
  recursive: true,
@@ -24,3 +24,5 @@ module.exports = components.keys().reduce((acc, key) => {
24
24
  }, {});
25
25
 
26
26
  module.exports.componentsThemeManager = componentsThemeManager;
27
+
28
+ /* INJECT_COMPONENTS */
@@ -1,7 +1,7 @@
1
1
  import { BASE_THEME_SECTION, CSS_SELECTOR_SPECIFIER_MULTIPLY } from '../../constants';
2
2
  import { kebabCaseJoin } from '../../helpers';
3
3
  import { getCssVarName, observeAttributes } from '../../helpers/componentHelpers';
4
- import { componentsThemeManager } from '../../helpers/themeHelpers/componentsThemeManager';
4
+ import { componentsThemeManager } from '../../helpers/themeHelpers';
5
5
  import { createStyle, createCssVarsList, createClassSelectorSpecifier } from './helpers';
6
6
 
7
7
  const STYLE_OVERRIDE_ATTR_PREFIX = 'st';
@@ -1,7 +1,7 @@
1
1
  import globals from '../globals';
2
2
  import { getThemeRefs, useVar } from '../../helpers/themeHelpers';
3
3
  import { AlertClass } from '../../components/descope-alert/AlertClass';
4
- import { vars as textCompVars } from './text';
4
+ import { vars as textCompVars } from 'descope-text/theme';
5
5
 
6
6
  const globalRefs = getThemeRefs(globals);
7
7
  const vars = AlertClass.cssVarList;
@@ -81,8 +81,8 @@ export const comboBox = {
81
81
  [vars.overlay.loaderWidth]: '30px',
82
82
  [vars.overlay.loaderHeight]: '30px',
83
83
  [vars.overlay.loaderBorder]: '2px solid transparent',
84
- [vars.overlay
85
- .loaderBorderColor]: `${globalRefs.colors.primary.highlight} ${globalRefs.colors.primary.highlight} ${globalRefs.colors.primary.main} ${globalRefs.colors.primary.main}`,
84
+ [vars.overlay.loaderBorderColor]:
85
+ `${globalRefs.colors.primary.highlight} ${globalRefs.colors.primary.highlight} ${globalRefs.colors.primary.main} ${globalRefs.colors.primary.main}`,
86
86
  [vars.overlay.loaderBorderRadius]: '50%',
87
87
  [vars.overlay.contentHeight]: '100px',
88
88
  [vars.overlay.contentOpacity]: '0',
@@ -1,7 +1,7 @@
1
1
  import globals from '../globals';
2
2
  import { getThemeRefs, useVar } from '../../helpers/themeHelpers';
3
3
  import { EnrichedTextClass } from '../../components/descope-enriched-text/EnrichedTextClass';
4
- import { vars as textCompVars } from './text';
4
+ import { vars as textCompVars } from 'descope-text/theme';
5
5
  import { vars as linkCompVars } from './link';
6
6
 
7
7
  const globalRefs = getThemeRefs(globals);
@@ -10,7 +10,7 @@ import * as container from './container';
10
10
  import * as logo from './logo';
11
11
  import * as totpImage from './totpImage';
12
12
  import * as notpImage from './notpImage';
13
- import * as text from './text';
13
+ import * as text from 'descope-text/theme';
14
14
  import * as enrichedText from './enrichedText';
15
15
  import * as link from './link';
16
16
  import * as divider from './divider';
@@ -31,7 +31,7 @@ import * as grid from './grid';
31
31
  import * as notificationCard from './notificationCard';
32
32
  import * as multiSelectComboBox from './multiSelectComboBox';
33
33
  import * as badge from './badge';
34
- import * as avatar from './avatar';
34
+ import * as avatar from 'descope-avatar/theme';
35
35
  import * as mappingsField from './mappingsField';
36
36
  import * as userAttribute from './userAttribute';
37
37
  import * as userAuthMethod from './userAuthMethod';
package/dist/umd/1033.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 1033.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1033],{1033:(t,e,n)=>{n.d(e,{e:()=>c});var o=n(27568),i=n(50063),s=n(67766);const c=t=>class extends((0,i.i)((0,s.f)(t))){get _activeKeys(){return[" "]}ready(){super.ready(),(0,o.ch)(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),(0,o.ch)(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}},27568:(t,e,n)=>{n.d(e,{ch:()=>M});var o=n(81510);const i=!1,s="string"==typeof document.head.style.touchAction,c="__polymerGestures",u="__polymerGesturesHandled",r="__polymerGesturesTouchAction",a=["mousedown","mousemove","mouseup","click"],h=[0,1,4,2],d=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function f(t){return a.indexOf(t)>-1}let l=!1;function m(t){if(!f(t)&&"touchend"!==t)return s&&l&&i?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){l=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const p=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),v={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function y(t){const e=t.type;if(!f(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!d&&(e=h[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const w={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function g(t,e,n){t.movefn=e,t.upfn=n,document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)}function _(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const b=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],x={},k=[];function E(t){const e=b(t);return e.length>0?e[0]:t.target}function A(t){const e=t.type,n=t.currentTarget[c];if(!n)return;const o=n[e];if(!o)return;if(!t[u]&&(t[u]={},e.startsWith("touch"))){const n=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(w.touch.id=n.identifier),w.touch.id!==n.identifier)return;s||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],n=t.type;if("touchstart"===n)w.touch.x=e.clientX,w.touch.y=e.clientY,w.touch.scrollDecided=!1;else if("touchmove"===n){if(w.touch.scrollDecided)return;w.touch.scrollDecided=!0;const n=function(t){let e="auto";const n=b(t);for(let t,o=0;o<n.length;o++)if(t=n[o],t[r]){e=t[r];break}return e}(t);let o=!1;const i=Math.abs(w.touch.x-e.clientX),s=Math.abs(w.touch.y-e.clientY);t.cancelable&&("none"===n?o=!0:"pan-x"===n?o=s>i:"pan-y"===n&&(o=i>s)),o?t.preventDefault():X("track")}}(t)}const i=t[u];if(!i.skip){for(let e,n=0;n<k.length;n++)e=k[n],o[e.name]&&!i[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let n,s=0;s<k.length;s++)n=k[s],o[n.name]&&!i[n.name]&&(i[n.name]=!0,n[e](t))}}function M(t,e,n){return!!x[e]&&(function(t,e,n){const i=x[e],u=i.deps,a=i.name;let h=t[c];h||(t[c]=h={});for(let e,n,o=0;o<u.length;o++)e=u[o],p&&f(e)&&"click"!==e||(n=h[e],n||(h[e]=n={_count:0}),0===n._count&&t.addEventListener(e,A,m(e)),n[a]=(n[a]||0)+1,n._count=(n._count||0)+1);t.addEventListener(e,n),i.touchAction&&function(t,e){s&&t instanceof HTMLElement&&o._3.run((()=>{t.style.touchAction=e})),t[r]=e}(t,i.touchAction)}(t,e,n),!0)}function N(t){k.push(t),t.emits.forEach((e=>{x[e]=t}))}function T(t,e,n){const o=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(o.detail=n,t.dispatchEvent(o),o.defaultPrevented){const t=n.preventer||n.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function X(t){const e=function(t){for(let e,n=0;n<k.length;n++){e=k[n];for(let n,o=0;o<e.emits.length;o++)if(n=e.emits[o],n===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function Y(t,e,n,o){e&&T(e,t,{x:n.clientX,y:n.clientY,sourceEvent:n,preventer:o,prevent:t=>X(t)})}function D(t,e,n){if(t.prevent)return!1;if(t.started)return!0;const o=Math.abs(t.x-e),i=Math.abs(t.y-n);return o>=5||i>=5}function L(t,e,n){if(!e)return;const o=t.moves[t.moves.length-2],i=t.moves[t.moves.length-1],s=i.x-t.x,c=i.y-t.y;let u,r=0;o&&(u=i.x-o.x,r=i.y-o.y),T(e,"track",{state:t.state,x:n.clientX,y:n.clientY,dx:s,dy:c,ddx:u,ddy:r,sourceEvent:n,hover:()=>function(t,e){let n=document.elementFromPoint(t,e),o=n;for(;o&&o.shadowRoot&&!window.ShadyDOM;){const i=o;if(o=o.shadowRoot.elementFromPoint(t,e),i===o)break;o&&(n=o)}return n}(n.clientX,n.clientY)})}function P(t,e,n){const o=Math.abs(e.clientX-t.x),i=Math.abs(e.clientY-t.y),s=E(n||e);!s||v[s.localName]&&s.hasAttribute("disabled")||(isNaN(o)||isNaN(i)||o<=25&&i<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=E(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const n=e.getBoundingClientRect(),o=t.pageX,i=t.pageY;return!(o>=n.left&&o<=n.right&&i>=n.top&&i<=n.bottom)}return!1}(e))&&(t.prevent||T(s,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:n}))}N({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){_(this.info)},mousedown(t){if(!y(t))return;const e=E(t),n=this;g(this.info,(t=>{y(t)||(Y("up",e,t),_(n.info))}),(t=>{y(t)&&Y("up",e,t),_(n.info)})),Y("down",e,t)},touchstart(t){Y("down",E(t),t.changedTouches[0],t)},touchend(t){Y("up",E(t),t.changedTouches[0],t)}}),N({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,_(this.info)},mousedown(t){if(!y(t))return;const e=E(t),n=this,o=t=>{const o=t.clientX,i=t.clientY;D(n.info,o,i)&&(n.info.state=n.info.started?"mouseup"===t.type?"end":"track":"start","start"===n.info.state&&X("tap"),n.info.addMove({x:o,y:i}),y(t)||(n.info.state="end",_(n.info)),e&&L(n.info,e,t),n.info.started=!0)};g(this.info,o,(t=>{n.info.started&&o(t),_(n.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=E(t),n=t.changedTouches[0],o=n.clientX,i=n.clientY;D(this.info,o,i)&&("start"===this.info.state&&X("tap"),this.info.addMove({x:o,y:i}),L(this.info,e,n),this.info.state="track",this.info.started=!0)},touchend(t){const e=E(t),n=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),L(this.info,e,n))}}),N({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){y(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){y(t)&&P(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){P(this.info,t.changedTouches[0],t)}})}}]);