@cupra/ui-kit 0.2.0-canary.0 → 1.0.0-canary.10

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 (351) hide show
  1. package/README.md +97 -778
  2. package/THIRD_PARTY_LICENSES.MD +79 -0
  3. package/dist/components/base/DsUiElement.js +47 -0
  4. package/dist/components/base/UiKitElement.js +80 -0
  5. package/dist/components/base/ds-base-input/ds-base-input.js +112 -0
  6. package/dist/components/base/ds-base-input/styles/common.styles.js +63 -0
  7. package/dist/components/base/ds-base-input/styles/cupra.styles.js +124 -0
  8. package/dist/components/base/ds-base-progress-bar/ds-base-progress-bar.js +64 -0
  9. package/dist/components/base/ds-base-progress-bar/styles/common.styles.js +22 -0
  10. package/dist/components/base/ds-base-progress-bar/styles/cupra-diagonal.styles.js +27 -0
  11. package/dist/components/base/ds-base-progress-bar/styles/cupra.styles.js +27 -0
  12. package/dist/components/base/ds-base-progress-bar/styles/seat.styles.js +8 -0
  13. package/dist/components/ds-accordion/ds-accordion.js +124 -0
  14. package/dist/components/ds-accordion/styles/common.styles.js +64 -0
  15. package/dist/components/ds-accordion/theme-config.js +26 -0
  16. package/dist/components/ds-avatar/ds-avatar.js +102 -0
  17. package/dist/components/ds-avatar/styles/common.styles.js +12 -0
  18. package/dist/components/ds-bullets/ds-bullets.js +79 -0
  19. package/dist/components/ds-bullets/styles/common.styles.js +26 -0
  20. package/dist/components/ds-button/ds-button.js +196 -0
  21. package/dist/components/ds-button/ds-button.types.d.ts +1 -3
  22. package/dist/components/ds-button/styles/common.styles.js +116 -0
  23. package/dist/components/ds-carousel-indicator/ds-carousel-indicator.js +63 -0
  24. package/dist/components/ds-carousel-indicator/styles/common.styles.js +19 -0
  25. package/dist/components/ds-checkbox/ds-checkbox.js +142 -0
  26. package/dist/components/ds-checkbox/styles/common.styles.js +60 -0
  27. package/dist/components/ds-chip/ds-chip.js +130 -0
  28. package/dist/components/ds-chip/styles/common.styles.js +25 -0
  29. package/dist/components/ds-chips/ds-chips.js +143 -0
  30. package/dist/components/ds-chips/styles/common.styles.js +78 -0
  31. package/dist/components/ds-currency/ds-currency.js +139 -0
  32. package/dist/components/ds-currency/styles/common.styles.js +17 -0
  33. package/dist/components/ds-dialog/ds-dialog.js +107 -0
  34. package/dist/components/ds-dialog/styles/common.styles.js +82 -0
  35. package/dist/components/ds-dialog-body/ds-dialog-body.js +46 -0
  36. package/dist/components/ds-dialog-body/styles/common.styles.js +12 -0
  37. package/dist/components/ds-dialog-footer/ds-dialog-footer.js +47 -0
  38. package/dist/components/ds-dialog-footer/styles/common.styles.js +16 -0
  39. package/dist/components/ds-dialog-header/ds-dialog-header.js +68 -0
  40. package/dist/components/ds-dialog-header/styles/common.styles.js +12 -0
  41. package/dist/components/ds-divider/ds-divider.js +58 -0
  42. package/dist/components/ds-divider/styles/common.styles.js +13 -0
  43. package/dist/components/ds-hyperlink/ds-hyperlink.js +93 -0
  44. package/dist/components/ds-hyperlink/styles/common.styles.js +22 -0
  45. package/dist/components/ds-icon/ds-icon.js +100 -0
  46. package/dist/components/ds-icon/iconNames.js +393 -0
  47. package/dist/components/ds-icon-button/ds-icon-button.js +138 -0
  48. package/dist/components/ds-icon-button/ds-icon-button.types.d.ts +1 -3
  49. package/dist/components/ds-icon-button/styles/common.styles.js +24 -0
  50. package/dist/components/ds-input/ds-input.js +138 -0
  51. package/dist/components/ds-interactive-card/ds-interactive-card.js +90 -0
  52. package/dist/components/ds-interactive-card/styles/common.styles.js +12 -0
  53. package/dist/components/ds-link-button/ds-link-button.js +120 -0
  54. package/dist/components/ds-link-button/styles/common.styles.js +24 -0
  55. package/dist/components/ds-loader-bar/ds-loader-bar.js +23 -0
  56. package/dist/components/ds-loader-bar/styles/common.styles.js +23 -0
  57. package/dist/components/ds-loader-dots/ds-loader-dots.js +62 -0
  58. package/dist/components/ds-loader-dots/styles/common.styles.js +35 -0
  59. package/dist/components/ds-loader-logo/ds-loader-logo.js +65 -0
  60. package/dist/components/ds-loader-logo/ds-loader-logo.styles.js +67 -0
  61. package/dist/components/ds-loader-spinner/ds-loader-spinner.js +53 -0
  62. package/dist/components/ds-loader-spinner/styles/common.styles.js +56 -0
  63. package/dist/components/ds-logo/ds-logo.js +69 -0
  64. package/dist/components/ds-logo/styles/common.styles.js +18 -0
  65. package/dist/components/ds-map-pin/ds-map-pin.js +116 -0
  66. package/dist/components/ds-map-pin/styles/common.styles.js +43 -0
  67. package/dist/components/ds-modal/ds-modal.js +215 -0
  68. package/dist/components/ds-modal/styles/common.styles.js +289 -0
  69. package/dist/components/ds-password-input/ds-password-input.js +43 -0
  70. package/dist/components/ds-picker-item/ds-picker-item.js +89 -0
  71. package/dist/components/ds-picker-item/ds-picker-item.types.d.ts +1 -4
  72. package/dist/components/ds-picker-item/styles/common.styles.js +12 -0
  73. package/dist/components/ds-portal/ds-portal.js +41 -0
  74. package/dist/components/ds-progress-bar/ds-progress-bar.js +34 -0
  75. package/dist/components/ds-progress-bar/styles/common.styles.js +12 -0
  76. package/dist/components/ds-radio/ds-radio.js +111 -0
  77. package/dist/components/ds-radio/styles/common.styles.js +44 -0
  78. package/dist/components/ds-radio-button/ds-radio-button.js +185 -0
  79. package/dist/components/ds-radio-button/styles/common.styles.js +52 -0
  80. package/dist/components/ds-radio-button-group/ds-radio-button-group.js +83 -0
  81. package/dist/components/ds-radio-button-group/styles/common.styles.js +25 -0
  82. package/dist/components/ds-radio-group/ds-radio-group.js +79 -0
  83. package/dist/components/ds-radio-group/ds-radio-group.styles.js +21 -0
  84. package/dist/components/ds-search/ds-search.js +210 -0
  85. package/dist/components/ds-search/styles/common.styles.js +61 -0
  86. package/dist/components/ds-search-input/ds-search-input.js +158 -0
  87. package/dist/components/ds-search-input/styles/common.styles.js +12 -0
  88. package/dist/components/ds-secondary-navigation/ds-secondary-navigation.js +233 -0
  89. package/dist/components/ds-secondary-navigation/styles/common.styles.js +12 -0
  90. package/dist/components/ds-segmented-control/ds-segmented-control.js +71 -0
  91. package/dist/components/ds-segmented-control/styles/common.styles.js +56 -0
  92. package/dist/components/ds-select/controllers/SelectKeyboardController.js +33 -0
  93. package/dist/components/ds-select/ds-select.js +274 -0
  94. package/dist/components/ds-select/styles/common.styles.js +29 -0
  95. package/dist/components/ds-selection/ds-selection.js +57 -0
  96. package/dist/components/ds-selection/styles/common.styles.js +17 -0
  97. package/dist/components/ds-sidebar-navigation/ds-sidebar-navigation.js +102 -0
  98. package/dist/components/ds-sidebar-navigation/styles/common.styles.js +25 -0
  99. package/dist/components/ds-slider/ds-slider.js +409 -0
  100. package/dist/components/ds-slider/ds-slider.types.d.ts +1 -3
  101. package/dist/components/ds-slider/styles/common.styles.js +61 -0
  102. package/dist/components/ds-slider/utils/getStepValue/getStepValue.js +28 -0
  103. package/dist/components/ds-slider/utils/roundToDecimals/roundToDecimals.js +7 -0
  104. package/dist/components/ds-static-box/ds-static-box.js +77 -0
  105. package/dist/components/ds-static-box/ds-static-box.types.d.ts +1 -1
  106. package/dist/components/ds-static-box/styles/common.styles.js +12 -0
  107. package/dist/components/ds-stepper/ds-stepper.js +57 -0
  108. package/dist/components/ds-stepper/styles/common.styles.js +12 -0
  109. package/dist/components/ds-tabs/ds-tabs.js +203 -0
  110. package/dist/components/ds-tabs/styles/common.styles.js +97 -0
  111. package/dist/components/ds-tabs/theme-config.js +14 -0
  112. package/dist/components/ds-tag/ds-tag.js +87 -0
  113. package/dist/components/ds-tag/styles/common.styles.js +20 -0
  114. package/dist/components/ds-text/ds-text.js +83 -0
  115. package/dist/components/ds-text/styles/common.styles.js +29 -0
  116. package/dist/components/ds-text-input/ds-text-input.js +100 -0
  117. package/dist/components/ds-text-input/styles/common.styles.js +12 -0
  118. package/dist/components/ds-textarea/ds-textarea.js +87 -0
  119. package/dist/components/ds-textarea/styles/common.styles.js +12 -0
  120. package/dist/components/ds-theme-provider/ds-theme-provider.js +89 -0
  121. package/dist/components/ds-theme-provider/ds-theme-provider.types.d.ts +1 -1
  122. package/dist/components/ds-theme-provider/themeContext.js +5 -0
  123. package/dist/components/ds-toast/ds-toast.js +95 -0
  124. package/dist/components/ds-toast/styles/common.styles.js +112 -0
  125. package/dist/components/ds-toast/utils/ToastManager.js +48 -0
  126. package/dist/components/ds-toast-message/ds-toast-message.js +103 -0
  127. package/dist/components/ds-toast-message/styles/common.styles.js +12 -0
  128. package/dist/components/ds-toggle-button/ds-toggle-button.js +73 -0
  129. package/dist/components/ds-toggle-switch/ds-toggle-switch.js +100 -0
  130. package/dist/components/ds-toggle-switch/styles/common.styles.js +47 -0
  131. package/dist/components/ds-tooltip/ds-tooltip.js +198 -0
  132. package/dist/components/ds-tooltip/styles/common.styles.js +163 -0
  133. package/dist/decorators/customUiKitElement.js +23 -0
  134. package/dist/index.d.ts +1 -0
  135. package/dist/index.js +59 -9285
  136. package/dist/mixins/FormAssociatedMixin.js +14 -0
  137. package/dist/mixins/ViewportMixin.js +32 -0
  138. package/dist/mixins/inputStatesMixin.js +46 -0
  139. package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/context-request-event.js +13 -0
  140. package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-consumer.js +29 -0
  141. package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-provider.js +37 -0
  142. package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/create-context.js +11 -0
  143. package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/consume.js +22 -0
  144. package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/provide.js +42 -0
  145. package/dist/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/value-notifier.js +36 -0
  146. package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js +50 -0
  147. package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/base.js +9 -0
  148. package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js +37 -0
  149. package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js +19 -0
  150. package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js +19 -0
  151. package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js +20 -0
  152. package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js +12 -0
  153. package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js +252 -0
  154. package/dist/node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js +51 -0
  155. package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive-helpers.js +37 -0
  156. package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive.js +27 -0
  157. package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/choose.js +12 -0
  158. package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js +34 -0
  159. package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/if-defined.js +10 -0
  160. package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/repeat.js +61 -0
  161. package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js +27 -0
  162. package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/when.js +11 -0
  163. package/dist/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js +243 -0
  164. package/dist/styles/fonts-config.js +28 -0
  165. package/dist/utils/IconsManager.js +30 -0
  166. package/dist/utils/PubSub.js +28 -0
  167. package/dist/utils/StylesRegistry/StylesRegistry.js +32 -0
  168. package/dist/utils/arrayConverter.js +19 -0
  169. package/dist/utils/booleanConverter.js +4 -0
  170. package/dist/utils/componentFactory.js +167 -0
  171. package/dist/utils/cssQueries.js +16 -0
  172. package/dist/utils/cssWithTokens.js +11 -0
  173. package/dist/utils/formatNumber/formatNumber.js +54 -0
  174. package/dist/utils/htmlWithTokens.js +11 -0
  175. package/dist/utils/objectConverter.js +11 -0
  176. package/dist/utils/validateMaxLength.js +6 -0
  177. package/dist-react/components/base/DsUiElement.js +47 -0
  178. package/dist-react/components/base/UiKitElement.js +80 -0
  179. package/dist-react/components/base/ds-base-input/ds-base-input.js +112 -0
  180. package/dist-react/components/base/ds-base-input/styles/common.styles.js +63 -0
  181. package/dist-react/components/base/ds-base-input/styles/cupra.styles.js +124 -0
  182. package/dist-react/components/base/ds-base-progress-bar/ds-base-progress-bar.js +64 -0
  183. package/dist-react/components/base/ds-base-progress-bar/styles/common.styles.js +22 -0
  184. package/dist-react/components/base/ds-base-progress-bar/styles/cupra-diagonal.styles.js +27 -0
  185. package/dist-react/components/base/ds-base-progress-bar/styles/cupra.styles.js +27 -0
  186. package/dist-react/components/base/ds-base-progress-bar/styles/seat.styles.js +8 -0
  187. package/dist-react/components/ds-accordion/ds-accordion.js +124 -0
  188. package/dist-react/components/ds-accordion/styles/common.styles.js +64 -0
  189. package/dist-react/components/ds-accordion/theme-config.js +26 -0
  190. package/dist-react/components/ds-avatar/ds-avatar.js +102 -0
  191. package/dist-react/components/ds-avatar/styles/common.styles.js +12 -0
  192. package/dist-react/components/ds-bullets/ds-bullets.js +79 -0
  193. package/dist-react/components/ds-bullets/styles/common.styles.js +26 -0
  194. package/dist-react/components/ds-button/ds-button.js +196 -0
  195. package/dist-react/components/ds-button/ds-button.types.d.ts +1 -3
  196. package/dist-react/components/ds-button/styles/common.styles.js +116 -0
  197. package/dist-react/components/ds-carousel-indicator/ds-carousel-indicator.js +63 -0
  198. package/dist-react/components/ds-carousel-indicator/styles/common.styles.js +19 -0
  199. package/dist-react/components/ds-checkbox/ds-checkbox.js +142 -0
  200. package/dist-react/components/ds-checkbox/styles/common.styles.js +60 -0
  201. package/dist-react/components/ds-chip/ds-chip.js +130 -0
  202. package/dist-react/components/ds-chip/styles/common.styles.js +25 -0
  203. package/dist-react/components/ds-chips/ds-chips.js +143 -0
  204. package/dist-react/components/ds-chips/styles/common.styles.js +78 -0
  205. package/dist-react/components/ds-currency/ds-currency.js +139 -0
  206. package/dist-react/components/ds-currency/styles/common.styles.js +17 -0
  207. package/dist-react/components/ds-dialog/ds-dialog.js +107 -0
  208. package/dist-react/components/ds-dialog/styles/common.styles.js +82 -0
  209. package/dist-react/components/ds-dialog-body/ds-dialog-body.js +46 -0
  210. package/dist-react/components/ds-dialog-body/styles/common.styles.js +12 -0
  211. package/dist-react/components/ds-dialog-footer/ds-dialog-footer.js +47 -0
  212. package/dist-react/components/ds-dialog-footer/styles/common.styles.js +16 -0
  213. package/dist-react/components/ds-dialog-header/ds-dialog-header.js +68 -0
  214. package/dist-react/components/ds-dialog-header/styles/common.styles.js +12 -0
  215. package/dist-react/components/ds-divider/ds-divider.js +58 -0
  216. package/dist-react/components/ds-divider/styles/common.styles.js +13 -0
  217. package/dist-react/components/ds-hyperlink/ds-hyperlink.js +93 -0
  218. package/dist-react/components/ds-hyperlink/styles/common.styles.js +22 -0
  219. package/dist-react/components/ds-icon/ds-icon.js +100 -0
  220. package/dist-react/components/ds-icon/iconNames.js +393 -0
  221. package/dist-react/components/ds-icon-button/ds-icon-button.js +138 -0
  222. package/dist-react/components/ds-icon-button/ds-icon-button.types.d.ts +1 -3
  223. package/dist-react/components/ds-icon-button/styles/common.styles.js +24 -0
  224. package/dist-react/components/ds-input/ds-input.js +138 -0
  225. package/dist-react/components/ds-interactive-card/ds-interactive-card.js +90 -0
  226. package/dist-react/components/ds-interactive-card/styles/common.styles.js +12 -0
  227. package/dist-react/components/ds-link-button/ds-link-button.js +120 -0
  228. package/dist-react/components/ds-link-button/styles/common.styles.js +24 -0
  229. package/dist-react/components/ds-loader-bar/ds-loader-bar.js +23 -0
  230. package/dist-react/components/ds-loader-bar/styles/common.styles.js +23 -0
  231. package/dist-react/components/ds-loader-dots/ds-loader-dots.js +62 -0
  232. package/dist-react/components/ds-loader-dots/styles/common.styles.js +35 -0
  233. package/dist-react/components/ds-loader-logo/ds-loader-logo.js +65 -0
  234. package/dist-react/components/ds-loader-logo/ds-loader-logo.styles.js +67 -0
  235. package/dist-react/components/ds-loader-spinner/ds-loader-spinner.js +53 -0
  236. package/dist-react/components/ds-loader-spinner/styles/common.styles.js +56 -0
  237. package/dist-react/components/ds-logo/ds-logo.js +69 -0
  238. package/dist-react/components/ds-logo/styles/common.styles.js +18 -0
  239. package/dist-react/components/ds-map-pin/ds-map-pin.js +116 -0
  240. package/dist-react/components/ds-map-pin/styles/common.styles.js +43 -0
  241. package/dist-react/components/ds-modal/ds-modal.js +215 -0
  242. package/dist-react/components/ds-modal/styles/common.styles.js +289 -0
  243. package/dist-react/components/ds-password-input/ds-password-input.js +43 -0
  244. package/dist-react/components/ds-picker-item/ds-picker-item.js +89 -0
  245. package/dist-react/components/ds-picker-item/ds-picker-item.types.d.ts +1 -4
  246. package/dist-react/components/ds-picker-item/styles/common.styles.js +12 -0
  247. package/dist-react/components/ds-portal/ds-portal.js +41 -0
  248. package/dist-react/components/ds-progress-bar/ds-progress-bar.js +34 -0
  249. package/dist-react/components/ds-progress-bar/styles/common.styles.js +12 -0
  250. package/dist-react/components/ds-radio/ds-radio.js +111 -0
  251. package/dist-react/components/ds-radio/styles/common.styles.js +44 -0
  252. package/dist-react/components/ds-radio-button/ds-radio-button.js +185 -0
  253. package/dist-react/components/ds-radio-button/styles/common.styles.js +52 -0
  254. package/dist-react/components/ds-radio-button-group/ds-radio-button-group.js +83 -0
  255. package/dist-react/components/ds-radio-button-group/styles/common.styles.js +25 -0
  256. package/dist-react/components/ds-radio-group/ds-radio-group.js +79 -0
  257. package/dist-react/components/ds-radio-group/ds-radio-group.styles.js +21 -0
  258. package/dist-react/components/ds-search/ds-search.js +210 -0
  259. package/dist-react/components/ds-search/styles/common.styles.js +61 -0
  260. package/dist-react/components/ds-search-input/ds-search-input.js +158 -0
  261. package/dist-react/components/ds-search-input/styles/common.styles.js +12 -0
  262. package/dist-react/components/ds-secondary-navigation/ds-secondary-navigation.js +233 -0
  263. package/dist-react/components/ds-secondary-navigation/styles/common.styles.js +12 -0
  264. package/dist-react/components/ds-segmented-control/ds-segmented-control.js +71 -0
  265. package/dist-react/components/ds-segmented-control/styles/common.styles.js +56 -0
  266. package/dist-react/components/ds-select/controllers/SelectKeyboardController.js +33 -0
  267. package/dist-react/components/ds-select/ds-select.js +274 -0
  268. package/dist-react/components/ds-select/styles/common.styles.js +29 -0
  269. package/dist-react/components/ds-selection/ds-selection.js +57 -0
  270. package/dist-react/components/ds-selection/styles/common.styles.js +17 -0
  271. package/dist-react/components/ds-sidebar-navigation/ds-sidebar-navigation.js +102 -0
  272. package/dist-react/components/ds-sidebar-navigation/styles/common.styles.js +25 -0
  273. package/dist-react/components/ds-slider/ds-slider.js +409 -0
  274. package/dist-react/components/ds-slider/ds-slider.types.d.ts +1 -3
  275. package/dist-react/components/ds-slider/styles/common.styles.js +61 -0
  276. package/dist-react/components/ds-slider/utils/getStepValue/getStepValue.js +28 -0
  277. package/dist-react/components/ds-slider/utils/roundToDecimals/roundToDecimals.js +7 -0
  278. package/dist-react/components/ds-static-box/ds-static-box.js +77 -0
  279. package/dist-react/components/ds-static-box/ds-static-box.types.d.ts +1 -1
  280. package/dist-react/components/ds-static-box/styles/common.styles.js +12 -0
  281. package/dist-react/components/ds-stepper/ds-stepper.js +57 -0
  282. package/dist-react/components/ds-stepper/styles/common.styles.js +12 -0
  283. package/dist-react/components/ds-tabs/ds-tabs.js +203 -0
  284. package/dist-react/components/ds-tabs/styles/common.styles.js +97 -0
  285. package/dist-react/components/ds-tabs/theme-config.js +14 -0
  286. package/dist-react/components/ds-tag/ds-tag.js +87 -0
  287. package/dist-react/components/ds-tag/styles/common.styles.js +20 -0
  288. package/dist-react/components/ds-text/ds-text.js +83 -0
  289. package/dist-react/components/ds-text/styles/common.styles.js +29 -0
  290. package/dist-react/components/ds-text-input/ds-text-input.js +100 -0
  291. package/dist-react/components/ds-text-input/styles/common.styles.js +12 -0
  292. package/dist-react/components/ds-textarea/ds-textarea.js +87 -0
  293. package/dist-react/components/ds-textarea/styles/common.styles.js +12 -0
  294. package/dist-react/components/ds-theme-provider/ds-theme-provider.js +89 -0
  295. package/dist-react/components/ds-theme-provider/ds-theme-provider.types.d.ts +1 -1
  296. package/dist-react/components/ds-theme-provider/themeContext.js +5 -0
  297. package/dist-react/components/ds-toast/ds-toast.js +95 -0
  298. package/dist-react/components/ds-toast/styles/common.styles.js +112 -0
  299. package/dist-react/components/ds-toast/utils/ToastManager.js +48 -0
  300. package/dist-react/components/ds-toast-message/ds-toast-message.js +103 -0
  301. package/dist-react/components/ds-toast-message/styles/common.styles.js +12 -0
  302. package/dist-react/components/ds-toggle-button/ds-toggle-button.js +73 -0
  303. package/dist-react/components/ds-toggle-switch/ds-toggle-switch.js +100 -0
  304. package/dist-react/components/ds-toggle-switch/styles/common.styles.js +47 -0
  305. package/dist-react/components/ds-tooltip/ds-tooltip.js +198 -0
  306. package/dist-react/components/ds-tooltip/styles/common.styles.js +163 -0
  307. package/dist-react/decorators/customUiKitElement.js +23 -0
  308. package/dist-react/index.d.ts +1 -0
  309. package/dist-react/index.js +59 -9210
  310. package/dist-react/mixins/FormAssociatedMixin.js +14 -0
  311. package/dist-react/mixins/ViewportMixin.js +32 -0
  312. package/dist-react/mixins/inputStatesMixin.js +46 -0
  313. package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/context-request-event.js +13 -0
  314. package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-consumer.js +29 -0
  315. package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/controllers/context-provider.js +37 -0
  316. package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/create-context.js +11 -0
  317. package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/consume.js +22 -0
  318. package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/decorators/provide.js +42 -0
  319. package/dist-react/node_modules/.pnpm/@lit_context@1.1.6/node_modules/@lit/context/lib/value-notifier.js +36 -0
  320. package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js +50 -0
  321. package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/base.js +9 -0
  322. package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js +37 -0
  323. package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js +19 -0
  324. package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-nodes.js +19 -0
  325. package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js +20 -0
  326. package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js +12 -0
  327. package/dist-react/node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js +252 -0
  328. package/dist-react/node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js +51 -0
  329. package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive-helpers.js +37 -0
  330. package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive.js +27 -0
  331. package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/choose.js +12 -0
  332. package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js +34 -0
  333. package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/if-defined.js +10 -0
  334. package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/repeat.js +61 -0
  335. package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js +27 -0
  336. package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/when.js +11 -0
  337. package/dist-react/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js +243 -0
  338. package/dist-react/styles/fonts-config.js +28 -0
  339. package/dist-react/utils/IconsManager.js +30 -0
  340. package/dist-react/utils/PubSub.js +28 -0
  341. package/dist-react/utils/StylesRegistry/StylesRegistry.js +32 -0
  342. package/dist-react/utils/arrayConverter.js +19 -0
  343. package/dist-react/utils/booleanConverter.js +4 -0
  344. package/dist-react/utils/componentFactory.js +90 -0
  345. package/dist-react/utils/cssQueries.js +16 -0
  346. package/dist-react/utils/cssWithTokens.js +11 -0
  347. package/dist-react/utils/formatNumber/formatNumber.js +54 -0
  348. package/dist-react/utils/htmlWithTokens.js +11 -0
  349. package/dist-react/utils/objectConverter.js +11 -0
  350. package/dist-react/utils/validateMaxLength.js +6 -0
  351. package/package.json +27 -13
@@ -0,0 +1,143 @@
1
+ import { UiKitElement as p } from "../base/UiKitElement.js";
2
+ import { customUiKitElement as d } from "../../decorators/customUiKitElement.js";
3
+ import { arrayConverter as m } from "../../utils/arrayConverter.js";
4
+ import { booleanConverter as u } from "../../utils/booleanConverter.js";
5
+ import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
6
+ import { nothing as C, html as v } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
7
+ import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
8
+ import { property as o } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
9
+ import { state as n } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
10
+ import { query as f } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";
11
+ import { queryAssignedElements as S } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query-assigned-elements.js";
12
+ import { classMap as b } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
13
+ import { commonStyles as y } from "./styles/common.styles.js";
14
+ var g = Object.defineProperty, z = Object.getOwnPropertyDescriptor, h = (e, t, s, i) => {
15
+ for (var r = i > 1 ? void 0 : i ? z(t, s) : t, a = e.length - 1, c; a >= 0; a--)
16
+ (c = e[a]) && (r = (i ? c(t, s, r) : c(r)) || r);
17
+ return i && r && g(t, s, r), r;
18
+ };
19
+ let l = class extends p {
20
+ constructor() {
21
+ super(...arguments), this.multiChoice = null, this.size = "medium", this.mode = "light", this.hasScrollLeft = !1, this.hasScrollRight = !1, this.resizeObserver = new ResizeObserver(() => {
22
+ this.handleScrollNav();
23
+ }), this.handleScrollNav = () => {
24
+ var t, s, i, r;
25
+ const e = ((t = this.chipsContainer) == null ? void 0 : t.scrollLeft) + ((s = this.chipsContainer) == null ? void 0 : s.clientWidth);
26
+ this.hasScrollLeft = ((i = this.chipsContainer) == null ? void 0 : i.scrollLeft) > 0, this.hasScrollRight = e < ((r = this.chipsContainer) == null ? void 0 : r.scrollWidth);
27
+ }, this.handleScrollLeft = () => {
28
+ this.chipsContainer.scrollBy({ left: -150, behavior: "smooth" });
29
+ }, this.handleScrollRight = () => {
30
+ this.chipsContainer.scrollBy({ left: 150, behavior: "smooth" });
31
+ };
32
+ }
33
+ firstUpdated() {
34
+ this.handleScrollNav(), this.resizeObserver.observe(this.chipsContainer), this.chips.forEach((e) => this.resizeObserver.observe(e)), window.addEventListener("resize", this.handleScrollNav), this.chipsContainer.addEventListener("scroll", this.handleScrollNav);
35
+ }
36
+ disconnectedCallback() {
37
+ super.disconnectedCallback(), this.resizeObserver.disconnect(), window.removeEventListener("resize", this.handleScrollNav), this.chipsContainer.removeEventListener("scroll", this.handleScrollNav);
38
+ }
39
+ getScrollButtonTemplate(e, t) {
40
+ if (e === "left" && !this.hasScrollLeft || e === "right" && !this.hasScrollRight)
41
+ return C;
42
+ const s = `arrow-${e}`;
43
+ return this.componentFactory.createIconButton({
44
+ class: `scroll-button ${e}`,
45
+ "data-testid": `scroll-button-${e}`,
46
+ "data-aria-label": `scroll-button-${e}`,
47
+ "@click": t,
48
+ size: this.size || "large",
49
+ "icon-name": s,
50
+ variant: "standard",
51
+ mode: this.mode
52
+ });
53
+ }
54
+ updated(e) {
55
+ super.updated(e), (e.has("selectedChips") || e.has("multiChoice") || e.has("size") || e.has("mode")) && this.updateChildChips();
56
+ }
57
+ updateChildChips() {
58
+ var e;
59
+ (e = this.chips) == null || e.forEach((t) => {
60
+ var s, i;
61
+ t.size = this.size, t.selected = (i = (s = this.selectedChips) == null ? void 0 : s.includes) == null ? void 0 : i.call(s, t.value), t.deselectable = !!this.multiChoice, t.mode = this.mode;
62
+ });
63
+ }
64
+ get chipsContainerClasses() {
65
+ return {
66
+ "chips-container": !0,
67
+ "scroll-left": this.hasScrollLeft,
68
+ "scroll-right": this.hasScrollRight
69
+ };
70
+ }
71
+ handleSelect(e) {
72
+ var s, i;
73
+ let t;
74
+ this.multiChoice && !((i = (s = this.selectedChips) == null ? void 0 : s.includes) != null && i.call(s, e.detail.value)) ? t = [...this.selectedChips || [], e.detail.value] : t = [e.detail.value], this.selectedChips = t, this.updateChildChips(), this.dispatchEvent(
75
+ new CustomEvent("ds-chips:change", {
76
+ bubbles: !0,
77
+ composed: !0,
78
+ detail: {
79
+ selectedChips: t
80
+ }
81
+ })
82
+ );
83
+ }
84
+ handleDeselect(e) {
85
+ const t = [...(this.selectedChips || []).filter((s) => s !== e.detail.value)];
86
+ this.selectedChips = t, this.updateChildChips(), this.dispatchEvent(
87
+ new CustomEvent("ds-chips:change", {
88
+ bubbles: !0,
89
+ composed: !0,
90
+ detail: {
91
+ selectedChips: t
92
+ }
93
+ })
94
+ );
95
+ }
96
+ render() {
97
+ return v`
98
+ <div
99
+ class="container"
100
+ data-testid="ds-chips-container"
101
+ @select=${this.handleSelect}
102
+ @deselect=${this.handleDeselect}
103
+ >
104
+ ${this.getScrollButtonTemplate("left", this.handleScrollLeft)}
105
+ <nav tabindex="0" class=${b(this.chipsContainerClasses)}>
106
+ <slot @slotchange=${this.updateChildChips}></slot>
107
+ </nav>
108
+ ${this.getScrollButtonTemplate("right", this.handleScrollRight)}
109
+ </div>
110
+ `;
111
+ }
112
+ };
113
+ l.styles = [y];
114
+ h([
115
+ o({ type: Array, attribute: "selected-chips", converter: m, reflect: !0 })
116
+ ], l.prototype, "selectedChips", 2);
117
+ h([
118
+ o({ type: Boolean, attribute: "multi-choice", converter: u })
119
+ ], l.prototype, "multiChoice", 2);
120
+ h([
121
+ o({ type: String })
122
+ ], l.prototype, "size", 2);
123
+ h([
124
+ o({ type: String, reflect: !0 })
125
+ ], l.prototype, "mode", 2);
126
+ h([
127
+ n()
128
+ ], l.prototype, "hasScrollLeft", 2);
129
+ h([
130
+ n()
131
+ ], l.prototype, "hasScrollRight", 2);
132
+ h([
133
+ S({ slot: "" })
134
+ ], l.prototype, "chips", 2);
135
+ h([
136
+ f(".chips-container")
137
+ ], l.prototype, "chipsContainer", 2);
138
+ l = h([
139
+ d("ds-chips")
140
+ ], l);
141
+ export {
142
+ l as DsChips
143
+ };
@@ -0,0 +1,78 @@
1
+ import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
2
+ import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
3
+ import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
4
+ import { css as r } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
5
+ const l = r`
6
+ .container {
7
+ display: inline-flex;
8
+ position: relative;
9
+ max-width: 100%;
10
+ }
11
+
12
+ .chips-container {
13
+ box-sizing: border-box;
14
+ display: inline-flex;
15
+ justify-content: flex-start;
16
+ overflow-y: auto;
17
+ scrollbar-width: none;
18
+ scroll-behavior: smooth;
19
+ }
20
+
21
+ .chips-container.scroll-left {
22
+ mask-image: linear-gradient(
23
+ to left,
24
+ rgba(0, 0, 0, 1) 0,
25
+ rgba(0, 0, 0, 1) calc(100% - 48px),
26
+ rgba(0, 0, 0, 0) calc(100% - 32px),
27
+ rgba(0, 0, 0, 0) 100%
28
+ );
29
+ }
30
+
31
+ .chips-container.scroll-right {
32
+ mask-image: linear-gradient(
33
+ to right,
34
+ rgba(0, 0, 0, 1) 0,
35
+ rgba(0, 0, 0, 1) calc(100% - 48px),
36
+ rgba(0, 0, 0, 0) calc(100% - 32px),
37
+ rgba(0, 0, 0, 0) 100%
38
+ );
39
+ }
40
+
41
+ .chips-container.scroll-left.scroll-right {
42
+ mask-image: linear-gradient(
43
+ to right,
44
+ rgba(0, 0, 0, 0) 0px,
45
+ rgba(0, 0, 0, 0) 32px,
46
+ rgba(0, 0, 0, 1) 48px,
47
+ rgba(0, 0, 0, 1) calc(100% - 48px),
48
+ rgba(0, 0, 0, 0) calc(100% - 32px),
49
+ rgba(0, 0, 0, 0) 100%
50
+ );
51
+ }
52
+
53
+ .chips-container::-webkit-scrollbar {
54
+ display: none;
55
+ }
56
+
57
+ ::slotted(*) {
58
+ white-space: nowrap;
59
+ flex: 0 1 auto;
60
+ }
61
+
62
+ .scroll-button {
63
+ position: absolute;
64
+ top: 0;
65
+ z-index: 1;
66
+ }
67
+
68
+ .scroll-button.left {
69
+ left: 0;
70
+ }
71
+
72
+ .scroll-button.right {
73
+ right: 0;
74
+ }
75
+ `;
76
+ export {
77
+ l as commonStyles
78
+ };
@@ -0,0 +1,139 @@
1
+ import { UiKitElement as y } from "../base/UiKitElement.js";
2
+ import { customUiKitElement as g } from "../../decorators/customUiKitElement.js";
3
+ import { formatNumber as l } from "../../utils/formatNumber/formatNumber.js";
4
+ import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
5
+ import { nothing as c, html as a } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
6
+ import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
7
+ import { property as i } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
8
+ import { classMap as m } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
9
+ import { commonStyles as d } from "./styles/common.styles.js";
10
+ var S = Object.defineProperty, b = Object.getOwnPropertyDescriptor, e = (n, r, s, p) => {
11
+ for (var o = p > 1 ? void 0 : p ? b(r, s) : r, u = n.length - 1, h; u >= 0; u--)
12
+ (h = n[u]) && (o = (p ? h(r, s, o) : h(o)) || o);
13
+ return p && o && S(r, s, o), o;
14
+ };
15
+ let t = class extends y {
16
+ constructor() {
17
+ super(...arguments), this.minimumFractionDigits = 0, this.maximumFractionDigits = 20, this.amountSize = "medium", this.amountWeight = "medium", this.currencySize = "medium", this.currencyWeight = "medium", this.periodSize = "medium", this.periodWeight = "medium", this.noteSize = "medium", this.noteWeight = "medium";
18
+ }
19
+ get valueTemplate() {
20
+ const { formattedValue: n, unitSymbol: r, unitSymbolPosition: s } = l({
21
+ value: this.amountNumber ?? 0,
22
+ locale: this.locale,
23
+ style: "currency",
24
+ currency: this.currencyCode,
25
+ localeMatcher: "lookup",
26
+ minimumFractionDigits: this.minimumFractionDigits,
27
+ maximumFractionDigits: this.maximumFractionDigits
28
+ }), p = this.amountText || n, o = {
29
+ amount: !0,
30
+ text: !0,
31
+ [`size-${this.amountSize}`]: !0,
32
+ [`weight-${this.amountWeight}`]: !0
33
+ }, u = {
34
+ currency: !0,
35
+ left: s === "left",
36
+ right: s === "right",
37
+ text: !0,
38
+ [`size-${this.currencySize}`]: !0,
39
+ [`weight-${this.currencyWeight}`]: !0
40
+ };
41
+ return a`
42
+ ${s === "left" ? a`<span class=${m(u)}>${r}</span>` : c}
43
+ <span class=${m(o)}>${p}</span>
44
+ ${s === "right" ? a`<span class=${m(u)}>${r}</span>` : c}
45
+ `;
46
+ }
47
+ get periodTemplate() {
48
+ if (!this.period) return c;
49
+ const n = new Intl.DisplayNames(this.locale, { type: "dateTimeField" }), r = {
50
+ period: !0,
51
+ text: !0,
52
+ [`size-${this.periodSize}`]: !0,
53
+ [`weight-${this.periodWeight}`]: !0
54
+ };
55
+ return a`
56
+ <span class=${m(r)}"period">/${n.of(this.period)}</span>
57
+ `;
58
+ }
59
+ get noteTemplate() {
60
+ if (!this.note) return c;
61
+ const n = {
62
+ note: !0,
63
+ text: !0,
64
+ [`size-${this.noteSize}`]: !0,
65
+ [`weight-${this.noteWeight}`]: !0
66
+ };
67
+ return a` <span class=${m(n)}>${this.note}</span> `;
68
+ }
69
+ render() {
70
+ return a`
71
+ <div class="container">
72
+ ${this.valueTemplate}
73
+ ${this.noteTemplate}
74
+ ${this.periodTemplate}
75
+ </div>
76
+ `;
77
+ }
78
+ };
79
+ t.styles = [d];
80
+ e([
81
+ i({ type: String })
82
+ ], t.prototype, "locale", 2);
83
+ e([
84
+ i({ type: String, attribute: "currency-code" })
85
+ ], t.prototype, "currencyCode", 2);
86
+ e([
87
+ i({ type: String, attribute: "amount-text" })
88
+ ], t.prototype, "amountText", 2);
89
+ e([
90
+ i({ type: Number, attribute: "amount-number" })
91
+ ], t.prototype, "amountNumber", 2);
92
+ e([
93
+ i({ type: Number, attribute: "minimum-fraction-digits" })
94
+ ], t.prototype, "minimumFractionDigits", 2);
95
+ e([
96
+ i({ type: Number, attribute: "maximum-fraction-digits" })
97
+ ], t.prototype, "maximumFractionDigits", 2);
98
+ e([
99
+ i({ type: String })
100
+ ], t.prototype, "period", 2);
101
+ e([
102
+ i({ type: String })
103
+ ], t.prototype, "note", 2);
104
+ e([
105
+ i({ type: String, attribute: "thousand-separator" })
106
+ ], t.prototype, "thousandSeparator", 2);
107
+ e([
108
+ i({ type: String, attribute: "fraction-separator" })
109
+ ], t.prototype, "fractionSeparator", 2);
110
+ e([
111
+ i({ type: String, attribute: "amount-size" })
112
+ ], t.prototype, "amountSize", 2);
113
+ e([
114
+ i({ type: String, attribute: "amount-weight" })
115
+ ], t.prototype, "amountWeight", 2);
116
+ e([
117
+ i({ type: String, attribute: "currency-size" })
118
+ ], t.prototype, "currencySize", 2);
119
+ e([
120
+ i({ type: String, attribute: "currency-weight" })
121
+ ], t.prototype, "currencyWeight", 2);
122
+ e([
123
+ i({ type: String, attribute: "period-size" })
124
+ ], t.prototype, "periodSize", 2);
125
+ e([
126
+ i({ type: String, attribute: "period-weight" })
127
+ ], t.prototype, "periodWeight", 2);
128
+ e([
129
+ i({ type: String, attribute: "note-size" })
130
+ ], t.prototype, "noteSize", 2);
131
+ e([
132
+ i({ type: String, attribute: "note-weight" })
133
+ ], t.prototype, "noteWeight", 2);
134
+ t = e([
135
+ g("ds-currency")
136
+ ], t);
137
+ export {
138
+ t as DsCurrency
139
+ };
@@ -0,0 +1,17 @@
1
+ import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
2
+ import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
3
+ import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
4
+ import { css as i } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
5
+ const s = i`
6
+ :host {
7
+ display: inline;
8
+ }
9
+
10
+ .container {
11
+ display: inline-flex;
12
+ align-items: flex-end;
13
+ }
14
+ `;
15
+ export {
16
+ s as commonStyles
17
+ };
@@ -0,0 +1,107 @@
1
+ import { UiKitElement as p } from "../base/UiKitElement.js";
2
+ import { customUiKitElement as m } from "../../decorators/customUiKitElement.js";
3
+ import { booleanConverter as v } from "../../utils/booleanConverter.js";
4
+ import { debounce as u } from "../../utils/debounce.js";
5
+ import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
6
+ import { nothing as f, html as b } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
7
+ import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
8
+ import { property as c } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
9
+ import { state as d } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
10
+ import { query as y } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";
11
+ import { classMap as h } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
12
+ import { commonStyles as w } from "./styles/common.styles.js";
13
+ var O = Object.defineProperty, C = Object.getOwnPropertyDescriptor, i = (e, t, r, n) => {
14
+ for (var o = n > 1 ? void 0 : n ? C(t, r) : t, l = e.length - 1, a; l >= 0; l--)
15
+ (a = e[l]) && (o = (n ? a(t, r, o) : a(o)) || o);
16
+ return n && o && O(t, r, o), o;
17
+ };
18
+ let s = class extends p {
19
+ constructor() {
20
+ super(...arguments), this.open = !1, this.size = "medium", this.hasBeenOpened = !1, this.hasScroll = !1, this.debouncedCheckScroll = u({ func: () => this.checkScroll() }), this.handleKeyDown = (e) => {
21
+ this.open && e.key === "Escape" && this.handleClose();
22
+ };
23
+ }
24
+ async updated(e) {
25
+ super.updated(e), !this.hasBeenOpened && e.has("open") && this.open && (this.hasBeenOpened = !0), e.has("open") && this.handleResizeObserver(), e.has("open") && this.open && (await this.updateComplete, this.requestUpdate());
26
+ }
27
+ async handleResizeObserver() {
28
+ var e;
29
+ document.body.style.overflow = this.open ? "hidden" : "", (e = this.resizeObserver) == null || e.disconnect(), this.content && (this.resizeObserver.observe(this.content), await new Promise(requestAnimationFrame), this.checkScroll());
30
+ }
31
+ get containerClasses() {
32
+ return {
33
+ container: !0,
34
+ close: !this.open,
35
+ "with-scroll": this.open && this.hasScroll
36
+ };
37
+ }
38
+ get dialogClasses() {
39
+ return {
40
+ dialog: !0,
41
+ [this.size]: !!this.size
42
+ };
43
+ }
44
+ handleClose() {
45
+ this.open = !1, this.dispatchEvent(
46
+ new Event("ds-dialog:close", {
47
+ bubbles: !0,
48
+ composed: !0
49
+ })
50
+ );
51
+ }
52
+ connectedCallback() {
53
+ super.connectedCallback(), window.addEventListener("keydown", this.handleKeyDown), this.resizeObserver = new ResizeObserver(this.debouncedCheckScroll), this.handleResizeObserver();
54
+ }
55
+ disconnectedCallback() {
56
+ var e;
57
+ super.disconnectedCallback(), window.removeEventListener("keydown", this.handleKeyDown), document.body.style.overflow = "", (e = this.resizeObserver) == null || e.disconnect();
58
+ }
59
+ checkScroll() {
60
+ var e, t;
61
+ this.hasScroll = ((e = this.content) == null ? void 0 : e.scrollHeight) > ((t = this.content) == null ? void 0 : t.clientHeight);
62
+ }
63
+ render() {
64
+ return !this.hasBeenOpened && !this.open ? f : b`
65
+ <style>
66
+ :host {
67
+ display: ${this.open ? "flex" : "none"};
68
+ }
69
+ </style>
70
+
71
+ <div class=${h(this.containerClasses)}>
72
+ <div class="overlay" @click=${this.handleClose}></div>
73
+ <dialog ?open=${this.open} data-testid="ds-dialog-container" class=${h(this.dialogClasses)}>
74
+ <slot name="close-button" @click=${this.handleClose}></slot>
75
+ <div class="content-container">
76
+ <div tabindex="0" class="content ds-scroll">
77
+ <slot @slotchange=${this.handleResizeObserver}></slot>
78
+ </div>
79
+ <slot name="footer"></slot>
80
+ </div>
81
+ </dialog>
82
+ </div>
83
+ `;
84
+ }
85
+ };
86
+ s.styles = [w];
87
+ i([
88
+ c({ type: Boolean, converter: v })
89
+ ], s.prototype, "open", 2);
90
+ i([
91
+ c({ type: String })
92
+ ], s.prototype, "size", 2);
93
+ i([
94
+ d()
95
+ ], s.prototype, "hasBeenOpened", 2);
96
+ i([
97
+ d()
98
+ ], s.prototype, "hasScroll", 2);
99
+ i([
100
+ y(".content")
101
+ ], s.prototype, "content", 2);
102
+ s = i([
103
+ m("ds-dialog")
104
+ ], s);
105
+ export {
106
+ s as DsDialog
107
+ };
@@ -0,0 +1,82 @@
1
+ import { cssQueries as l } from "../../../utils/cssQueries.js";
2
+ import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
3
+ import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
4
+ import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
5
+ import { css as o } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
6
+ const a = o`
7
+ :host {
8
+ transition: display 0.3s cubic-bezier(0, 0, 0.2, 1) allow-discrete;
9
+ }
10
+
11
+ .container.close {
12
+ display: none;
13
+ opacity: 0;
14
+ }
15
+
16
+ .container {
17
+ position: fixed;
18
+ top: 0;
19
+ left: 0;
20
+ width: 100dvw;
21
+ height: 100dvh;
22
+ display: flex;
23
+ justify-content: center;
24
+ align-items: center;
25
+ z-index: var(--ds-z-index-modal);
26
+ transition:
27
+ opacity 0.3s cubic-bezier(0, 0, 0.2, 1),
28
+ display 0.3s cubic-bezier(0, 0, 0.2, 1) allow-discrete;
29
+ opacity: 1;
30
+ @starting-style {
31
+ opacity: 0;
32
+ }
33
+ }
34
+
35
+ .dialog {
36
+ padding: 0;
37
+ position: relative;
38
+ }
39
+
40
+ .content-container {
41
+ display: flex;
42
+ flex-direction: column;
43
+ overflow: hidden;
44
+ }
45
+
46
+ .ds-scroll::-webkit-scrollbar,
47
+ .ds-scroll-global *::-webkit-scrollbar {
48
+ appearance: none;
49
+ display: initial;
50
+ }
51
+
52
+ .ds-scroll::-webkit-scrollbar-thumb,
53
+ .ds-scroll-global *::-webkit-scrollbar-thumb {
54
+ border-radius: var(--dg-border-radius-full);
55
+ background-clip: padding-box;
56
+ background-color: var(--dg-global-opacity-white-70);
57
+ }
58
+
59
+ .ds-scroll::-webkit-scrollbar-track,
60
+ .ds-scroll-global *::-webkit-scrollbar-track {
61
+ background-color: transparent;
62
+ }
63
+
64
+ ${l.xs} {
65
+ .ds-scroll::-webkit-scrollbar,
66
+ .ds-scroll-global *::-webkit-scrollbar {
67
+ height: 4px;
68
+ width: 4px;
69
+ }
70
+ }
71
+
72
+ ${l.m} {
73
+ .ds-scroll::-webkit-scrollbar,
74
+ .ds-scroll-global *::-webkit-scrollbar {
75
+ height: 8px;
76
+ width: 8px;
77
+ }
78
+ }
79
+ `;
80
+ export {
81
+ a as commonStyles
82
+ };
@@ -0,0 +1,46 @@
1
+ import { UiKitElement as a } from "../base/UiKitElement.js";
2
+ import { customUiKitElement as n } from "../../decorators/customUiKitElement.js";
3
+ import { htmlWithTokens as d } from "../../utils/htmlWithTokens.js";
4
+ import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
5
+ import { html as p } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
6
+ import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
7
+ import { classMap as c } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
8
+ import { commonStyles as y } from "./styles/common.styles.js";
9
+ var g = Object.getOwnPropertyDescriptor, f = (o, r, m, l) => {
10
+ for (var t = l > 1 ? void 0 : l ? g(r, m) : r, e = o.length - 1, i; e >= 0; e--)
11
+ (i = o[e]) && (t = i(t) || t);
12
+ return t;
13
+ };
14
+ let s = class extends a {
15
+ get classes() {
16
+ return {
17
+ container: !0
18
+ };
19
+ }
20
+ get styleTokens() {
21
+ return d`
22
+ <style>
23
+ :host{
24
+ grid-area: body;
25
+ }
26
+ </style>
27
+ `;
28
+ }
29
+ render() {
30
+ return p`
31
+ ${this.styleTokens}
32
+ <div data-testid="ds-dialog-body-container" class=${c(this.classes)}>
33
+ <slot name="description"></slot>
34
+ <slot name="image"></slot>
35
+ <slot></slot>
36
+ </div>
37
+ `;
38
+ }
39
+ };
40
+ s.styles = [y];
41
+ s = f([
42
+ n("ds-dialog-body")
43
+ ], s);
44
+ export {
45
+ s as DsDialogBody
46
+ };
@@ -0,0 +1,12 @@
1
+ import "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
2
+ import "../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
3
+ import "../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
4
+ import { css as o } from "../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";
5
+ const p = o`
6
+ :host {
7
+ display: inline-block;
8
+ }
9
+ `;
10
+ export {
11
+ p as commonStyles
12
+ };
@@ -0,0 +1,47 @@
1
+ import { UiKitElement as p } from "../base/UiKitElement.js";
2
+ import { customUiKitElement as d } from "../../decorators/customUiKitElement.js";
3
+ import { booleanConverter as v } from "../../utils/booleanConverter.js";
4
+ import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
5
+ import { nothing as c, html as m } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
6
+ import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
7
+ import { property as f } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
8
+ import { classMap as u } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
9
+ import { commonStyles as h } from "./styles/common.styles.js";
10
+ var D = Object.defineProperty, g = Object.getOwnPropertyDescriptor, n = (l, r, i, e) => {
11
+ for (var t = e > 1 ? void 0 : e ? g(r, i) : r, s = l.length - 1, a; s >= 0; s--)
12
+ (a = l[s]) && (t = (e ? a(r, i, t) : a(t)) || t);
13
+ return e && t && D(r, i, t), t;
14
+ };
15
+ let o = class extends p {
16
+ constructor() {
17
+ super(...arguments), this.withDivider = !0;
18
+ }
19
+ get classes() {
20
+ return {
21
+ container: !0
22
+ };
23
+ }
24
+ render() {
25
+ return m`
26
+ <div data-testid="ds-dialog-footer-container" class=${u(this.classes)}>
27
+ ${this.withDivider ? m`<div class="divider"></div>` : c}
28
+ <slot></slot>
29
+ <slot name="actions"></slot>
30
+ </div>
31
+ `;
32
+ }
33
+ };
34
+ o.styles = [h];
35
+ n([
36
+ f({
37
+ type: Boolean,
38
+ attribute: "with-divider",
39
+ converter: v
40
+ })
41
+ ], o.prototype, "withDivider", 2);
42
+ o = n([
43
+ d("ds-dialog-footer")
44
+ ], o);
45
+ export {
46
+ o as DsDialogFooter
47
+ };