@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,252 @@
1
+ import { getCompatibleStyle as E, adoptStyles as m } from "./css-tag.js";
2
+ import { CSSResult as M, css as R, supportsAdoptingStyleSheets as z, unsafeCSS as j } from "./css-tag.js";
3
+ /**
4
+ * @license
5
+ * Copyright 2017 Google LLC
6
+ * SPDX-License-Identifier: BSD-3-Clause
7
+ */
8
+ const { is: g, defineProperty: b, getOwnPropertyDescriptor: P, getOwnPropertyNames: v, getOwnPropertySymbols: w, getPrototypeOf: S } = Object, n = globalThis, _ = n.trustedTypes, U = _ ? _.emptyScript : "", d = n.reactiveElementPolyfillSupport, c = (a, t) => a, u = { toAttribute(a, t) {
9
+ switch (t) {
10
+ case Boolean:
11
+ a = a ? U : null;
12
+ break;
13
+ case Object:
14
+ case Array:
15
+ a = a == null ? a : JSON.stringify(a);
16
+ }
17
+ return a;
18
+ }, fromAttribute(a, t) {
19
+ let e = a;
20
+ switch (t) {
21
+ case Boolean:
22
+ e = a !== null;
23
+ break;
24
+ case Number:
25
+ e = a === null ? null : Number(a);
26
+ break;
27
+ case Object:
28
+ case Array:
29
+ try {
30
+ e = JSON.parse(a);
31
+ } catch {
32
+ e = null;
33
+ }
34
+ }
35
+ return e;
36
+ } }, y = (a, t) => !g(a, t), $ = { attribute: !0, type: String, converter: u, reflect: !1, useDefault: !1, hasChanged: y };
37
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), n.litPropertyMetadata ?? (n.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
38
+ class l extends HTMLElement {
39
+ static addInitializer(t) {
40
+ this._$Ei(), (this.l ?? (this.l = [])).push(t);
41
+ }
42
+ static get observedAttributes() {
43
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
44
+ }
45
+ static createProperty(t, e = $) {
46
+ if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
47
+ const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
48
+ i !== void 0 && b(this.prototype, t, i);
49
+ }
50
+ }
51
+ static getPropertyDescriptor(t, e, s) {
52
+ const { get: i, set: r } = P(this.prototype, t) ?? { get() {
53
+ return this[e];
54
+ }, set(o) {
55
+ this[e] = o;
56
+ } };
57
+ return { get: i, set(o) {
58
+ const h = i == null ? void 0 : i.call(this);
59
+ r == null || r.call(this, o), this.requestUpdate(t, h, s);
60
+ }, configurable: !0, enumerable: !0 };
61
+ }
62
+ static getPropertyOptions(t) {
63
+ return this.elementProperties.get(t) ?? $;
64
+ }
65
+ static _$Ei() {
66
+ if (this.hasOwnProperty(c("elementProperties"))) return;
67
+ const t = S(this);
68
+ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
69
+ }
70
+ static finalize() {
71
+ if (this.hasOwnProperty(c("finalized"))) return;
72
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(c("properties"))) {
73
+ const e = this.properties, s = [...v(e), ...w(e)];
74
+ for (const i of s) this.createProperty(i, e[i]);
75
+ }
76
+ const t = this[Symbol.metadata];
77
+ if (t !== null) {
78
+ const e = litPropertyMetadata.get(t);
79
+ if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
80
+ }
81
+ this._$Eh = /* @__PURE__ */ new Map();
82
+ for (const [e, s] of this.elementProperties) {
83
+ const i = this._$Eu(e, s);
84
+ i !== void 0 && this._$Eh.set(i, e);
85
+ }
86
+ this.elementStyles = this.finalizeStyles(this.styles);
87
+ }
88
+ static finalizeStyles(t) {
89
+ const e = [];
90
+ if (Array.isArray(t)) {
91
+ const s = new Set(t.flat(1 / 0).reverse());
92
+ for (const i of s) e.unshift(E(i));
93
+ } else t !== void 0 && e.push(E(t));
94
+ return e;
95
+ }
96
+ static _$Eu(t, e) {
97
+ const s = e.attribute;
98
+ return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
99
+ }
100
+ constructor() {
101
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
102
+ }
103
+ _$Ev() {
104
+ var t;
105
+ this._$ES = new Promise(((e) => this.enableUpdating = e)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach(((e) => e(this)));
106
+ }
107
+ addController(t) {
108
+ var e;
109
+ (this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
110
+ }
111
+ removeController(t) {
112
+ var e;
113
+ (e = this._$EO) == null || e.delete(t);
114
+ }
115
+ _$E_() {
116
+ const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
117
+ for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
118
+ t.size > 0 && (this._$Ep = t);
119
+ }
120
+ createRenderRoot() {
121
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
122
+ return m(t, this.constructor.elementStyles), t;
123
+ }
124
+ connectedCallback() {
125
+ var t;
126
+ this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach(((e) => {
127
+ var s;
128
+ return (s = e.hostConnected) == null ? void 0 : s.call(e);
129
+ }));
130
+ }
131
+ enableUpdating(t) {
132
+ }
133
+ disconnectedCallback() {
134
+ var t;
135
+ (t = this._$EO) == null || t.forEach(((e) => {
136
+ var s;
137
+ return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
138
+ }));
139
+ }
140
+ attributeChangedCallback(t, e, s) {
141
+ this._$AK(t, s);
142
+ }
143
+ _$ET(t, e) {
144
+ var r;
145
+ const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
146
+ if (i !== void 0 && s.reflect === !0) {
147
+ const o = (((r = s.converter) == null ? void 0 : r.toAttribute) !== void 0 ? s.converter : u).toAttribute(e, s.type);
148
+ this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
149
+ }
150
+ }
151
+ _$AK(t, e) {
152
+ var r, o;
153
+ const s = this.constructor, i = s._$Eh.get(t);
154
+ if (i !== void 0 && this._$Em !== i) {
155
+ const h = s.getPropertyOptions(i), p = typeof h.converter == "function" ? { fromAttribute: h.converter } : ((r = h.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? h.converter : u;
156
+ this._$Em = i;
157
+ const f = p.fromAttribute(e, h.type);
158
+ this[i] = f ?? ((o = this._$Ej) == null ? void 0 : o.get(i)) ?? f, this._$Em = null;
159
+ }
160
+ }
161
+ requestUpdate(t, e, s) {
162
+ var i;
163
+ if (t !== void 0) {
164
+ const r = this.constructor, o = this[t];
165
+ if (s ?? (s = r.getPropertyOptions(t)), !((s.hasChanged ?? y)(o, e) || s.useDefault && s.reflect && o === ((i = this._$Ej) == null ? void 0 : i.get(t)) && !this.hasAttribute(r._$Eu(t, s)))) return;
166
+ this.C(t, e, s);
167
+ }
168
+ this.isUpdatePending === !1 && (this._$ES = this._$EP());
169
+ }
170
+ C(t, e, { useDefault: s, reflect: i, wrapped: r }, o) {
171
+ s && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, o ?? e ?? this[t]), r !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
172
+ }
173
+ async _$EP() {
174
+ this.isUpdatePending = !0;
175
+ try {
176
+ await this._$ES;
177
+ } catch (e) {
178
+ Promise.reject(e);
179
+ }
180
+ const t = this.scheduleUpdate();
181
+ return t != null && await t, !this.isUpdatePending;
182
+ }
183
+ scheduleUpdate() {
184
+ return this.performUpdate();
185
+ }
186
+ performUpdate() {
187
+ var s;
188
+ if (!this.isUpdatePending) return;
189
+ if (!this.hasUpdated) {
190
+ if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
191
+ for (const [r, o] of this._$Ep) this[r] = o;
192
+ this._$Ep = void 0;
193
+ }
194
+ const i = this.constructor.elementProperties;
195
+ if (i.size > 0) for (const [r, o] of i) {
196
+ const { wrapped: h } = o, p = this[r];
197
+ h !== !0 || this._$AL.has(r) || p === void 0 || this.C(r, void 0, o, p);
198
+ }
199
+ }
200
+ let t = !1;
201
+ const e = this._$AL;
202
+ try {
203
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach(((i) => {
204
+ var r;
205
+ return (r = i.hostUpdate) == null ? void 0 : r.call(i);
206
+ })), this.update(e)) : this._$EM();
207
+ } catch (i) {
208
+ throw t = !1, this._$EM(), i;
209
+ }
210
+ t && this._$AE(e);
211
+ }
212
+ willUpdate(t) {
213
+ }
214
+ _$AE(t) {
215
+ var e;
216
+ (e = this._$EO) == null || e.forEach(((s) => {
217
+ var i;
218
+ return (i = s.hostUpdated) == null ? void 0 : i.call(s);
219
+ })), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
220
+ }
221
+ _$EM() {
222
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
223
+ }
224
+ get updateComplete() {
225
+ return this.getUpdateComplete();
226
+ }
227
+ getUpdateComplete() {
228
+ return this._$ES;
229
+ }
230
+ shouldUpdate(t) {
231
+ return !0;
232
+ }
233
+ update(t) {
234
+ this._$Eq && (this._$Eq = this._$Eq.forEach(((e) => this._$ET(e, this[e])))), this._$EM();
235
+ }
236
+ updated(t) {
237
+ }
238
+ firstUpdated(t) {
239
+ }
240
+ }
241
+ l.elementStyles = [], l.shadowRootOptions = { mode: "open" }, l[c("elementProperties")] = /* @__PURE__ */ new Map(), l[c("finalized")] = /* @__PURE__ */ new Map(), d == null || d({ ReactiveElement: l }), (n.reactiveElementVersions ?? (n.reactiveElementVersions = [])).push("2.1.1");
242
+ export {
243
+ M as CSSResult,
244
+ l as ReactiveElement,
245
+ m as adoptStyles,
246
+ R as css,
247
+ u as defaultConverter,
248
+ E as getCompatibleStyle,
249
+ y as notEqual,
250
+ z as supportsAdoptingStyleSheets,
251
+ j as unsafeCSS
252
+ };
@@ -0,0 +1,51 @@
1
+ import { ReactiveElement as i } from "../../../@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
2
+ import { defaultConverter as m, notEqual as C } from "../../../@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
3
+ import { render as a, noChange as l } from "../../../lit-html@3.3.1/node_modules/lit-html/lit-html.js";
4
+ import { _$LH as E, html as R, nothing as $ } from "../../../lit-html@3.3.1/node_modules/lit-html/lit-html.js";
5
+ /**
6
+ * @license
7
+ * Copyright 2017 Google LLC
8
+ * SPDX-License-Identifier: BSD-3-Clause
9
+ */
10
+ const t = globalThis;
11
+ class r extends i {
12
+ constructor() {
13
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
14
+ }
15
+ createRenderRoot() {
16
+ var n;
17
+ const e = super.createRenderRoot();
18
+ return (n = this.renderOptions).renderBefore ?? (n.renderBefore = e.firstChild), e;
19
+ }
20
+ update(e) {
21
+ const n = this.render();
22
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = a(n, this.renderRoot, this.renderOptions);
23
+ }
24
+ connectedCallback() {
25
+ var e;
26
+ super.connectedCallback(), (e = this._$Do) == null || e.setConnected(!0);
27
+ }
28
+ disconnectedCallback() {
29
+ var e;
30
+ super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
31
+ }
32
+ render() {
33
+ return l;
34
+ }
35
+ }
36
+ var s;
37
+ r._$litElement$ = !0, r.finalized = !0, (s = t.litElementHydrateSupport) == null || s.call(t, { LitElement: r });
38
+ const o = t.litElementPolyfillSupport;
39
+ o == null || o({ LitElement: r });
40
+ (t.litElementVersions ?? (t.litElementVersions = [])).push("4.2.1");
41
+ export {
42
+ r as LitElement,
43
+ i as ReactiveElement,
44
+ E as _$LH,
45
+ m as defaultConverter,
46
+ R as html,
47
+ l as noChange,
48
+ C as notEqual,
49
+ $ as nothing,
50
+ a as render
51
+ };
@@ -0,0 +1,37 @@
1
+ import { _$LH as l } from "./lit-html.js";
2
+ /**
3
+ * @license
4
+ * Copyright 2020 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+ const { I: f } = l, m = () => document.createComment(""), u = (e, A, t) => {
8
+ var o;
9
+ const $ = e._$AA.parentNode, i = A === void 0 ? e._$AB : A._$AA;
10
+ if (t === void 0) {
11
+ const s = $.insertBefore(m(), i), _ = $.insertBefore(m(), i);
12
+ t = new f(s, _, e, e.options);
13
+ } else {
14
+ const s = t._$AB.nextSibling, _ = t._$AM, a = _ !== e;
15
+ if (a) {
16
+ let r;
17
+ (o = t._$AQ) == null || o.call(t, e), t._$AM = e, t._$AP !== void 0 && (r = e._$AU) !== _._$AU && t._$AP(r);
18
+ }
19
+ if (s !== i || a) {
20
+ let r = t._$AA;
21
+ for (; r !== s; ) {
22
+ const d = r.nextSibling;
23
+ $.insertBefore(r, i), r = d;
24
+ }
25
+ }
26
+ }
27
+ return t;
28
+ }, v = (e, A, t = e) => (e._$AI(A, t), e), c = {}, p = (e, A = c) => e._$AH = A, B = (e) => e._$AH, P = (e) => {
29
+ e._$AR(), e._$AA.remove();
30
+ };
31
+ export {
32
+ B as getCommittedValue,
33
+ u as insertPart,
34
+ P as removePart,
35
+ v as setChildPartValue,
36
+ p as setCommittedValue
37
+ };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2017 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ const s = { ATTRIBUTE: 1, CHILD: 2 }, $ = (i) => (...t) => ({ _$litDirective$: i, values: t });
7
+ class _ {
8
+ constructor(t) {
9
+ }
10
+ get _$AU() {
11
+ return this._$AM._$AU;
12
+ }
13
+ _$AT(t, e, r) {
14
+ this._$Ct = t, this._$AM = e, this._$Ci = r;
15
+ }
16
+ _$AS(t, e) {
17
+ return this.update(t, e);
18
+ }
19
+ update(t, e) {
20
+ return this.render(...e);
21
+ }
22
+ }
23
+ export {
24
+ _ as Directive,
25
+ s as PartType,
26
+ $ as directive
27
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ const s = (e, n, o) => {
7
+ for (const r of n) if (r[0] === e) return (0, r[1])();
8
+ return o == null ? void 0 : o();
9
+ };
10
+ export {
11
+ s as choose
12
+ };
@@ -0,0 +1,34 @@
1
+ import { noChange as o } from "../lit-html.js";
2
+ import { directive as h, Directive as c, PartType as d } from "../directive.js";
3
+ /**
4
+ * @license
5
+ * Copyright 2018 Google LLC
6
+ * SPDX-License-Identifier: BSD-3-Clause
7
+ */
8
+ const f = h(class extends c {
9
+ constructor(s) {
10
+ var e;
11
+ if (super(s), s.type !== d.ATTRIBUTE || s.name !== "class" || ((e = s.strings) == null ? void 0 : e.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
12
+ }
13
+ render(s) {
14
+ return " " + Object.keys(s).filter(((e) => s[e])).join(" ") + " ";
15
+ }
16
+ update(s, [e]) {
17
+ var n, i;
18
+ if (this.st === void 0) {
19
+ this.st = /* @__PURE__ */ new Set(), s.strings !== void 0 && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter(((t) => t !== ""))));
20
+ for (const t in e) e[t] && !((n = this.nt) != null && n.has(t)) && this.st.add(t);
21
+ return this.render(e);
22
+ }
23
+ const r = s.element.classList;
24
+ for (const t of this.st) t in e || (r.remove(t), this.st.delete(t));
25
+ for (const t in e) {
26
+ const a = !!e[t];
27
+ a === this.st.has(t) || (i = this.nt) != null && i.has(t) || (a ? (r.add(t), this.st.add(t)) : (r.remove(t), this.st.delete(t)));
28
+ }
29
+ return o;
30
+ }
31
+ });
32
+ export {
33
+ f as classMap
34
+ };
@@ -0,0 +1,10 @@
1
+ import { nothing as i } from "../lit-html.js";
2
+ /**
3
+ * @license
4
+ * Copyright 2018 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+ const t = (o) => o ?? i;
8
+ export {
9
+ t as ifDefined
10
+ };
@@ -0,0 +1,61 @@
1
+ import { noChange as k } from "../lit-html.js";
2
+ import { directive as w, Directive as V, PartType as A } from "../directive.js";
3
+ import { getCommittedValue as D, setChildPartValue as h, insertPart as m, removePart as g, setCommittedValue as M } from "../directive-helpers.js";
4
+ /**
5
+ * @license
6
+ * Copyright 2017 Google LLC
7
+ * SPDX-License-Identifier: BSD-3-Clause
8
+ */
9
+ const P = (r, f, c) => {
10
+ const p = /* @__PURE__ */ new Map();
11
+ for (let e = f; e <= c; e++) p.set(r[e], e);
12
+ return p;
13
+ }, E = w(class extends V {
14
+ constructor(r) {
15
+ if (super(r), r.type !== A.CHILD) throw Error("repeat() can only be used in text expressions");
16
+ }
17
+ dt(r, f, c) {
18
+ let p;
19
+ c === void 0 ? c = f : f !== void 0 && (p = f);
20
+ const e = [], n = [];
21
+ let l = 0;
22
+ for (const a of r) e[l] = p ? p(a, l) : l, n[l] = c(a, l), l++;
23
+ return { values: n, keys: e };
24
+ }
25
+ render(r, f, c) {
26
+ return this.dt(r, f, c).values;
27
+ }
28
+ update(r, [f, c, p]) {
29
+ const e = D(r), { values: n, keys: l } = this.dt(f, c, p);
30
+ if (!Array.isArray(e)) return this.ut = l, n;
31
+ const a = this.ut ?? (this.ut = []), u = [];
32
+ let v, x, t = 0, o = e.length - 1, s = 0, i = n.length - 1;
33
+ for (; t <= o && s <= i; ) if (e[t] === null) t++;
34
+ else if (e[o] === null) o--;
35
+ else if (a[t] === l[s]) u[s] = h(e[t], n[s]), t++, s++;
36
+ else if (a[o] === l[i]) u[i] = h(e[o], n[i]), o--, i--;
37
+ else if (a[t] === l[i]) u[i] = h(e[t], n[i]), m(r, u[i + 1], e[t]), t++, i--;
38
+ else if (a[o] === l[s]) u[s] = h(e[o], n[s]), m(r, e[t], e[o]), o--, s++;
39
+ else if (v === void 0 && (v = P(l, s, i), x = P(a, t, o)), v.has(a[t])) if (v.has(a[o])) {
40
+ const d = x.get(l[s]), y = d !== void 0 ? e[d] : null;
41
+ if (y === null) {
42
+ const C = m(r, e[t]);
43
+ h(C, n[s]), u[s] = C;
44
+ } else u[s] = h(y, n[s]), m(r, e[t], y), e[d] = null;
45
+ s++;
46
+ } else g(e[o]), o--;
47
+ else g(e[t]), t++;
48
+ for (; s <= i; ) {
49
+ const d = m(r, u[i + 1]);
50
+ h(d, n[s]), u[s++] = d;
51
+ }
52
+ for (; t <= o; ) {
53
+ const d = e[t++];
54
+ d !== null && g(d);
55
+ }
56
+ return this.ut = l, M(r, u), k;
57
+ }
58
+ });
59
+ export {
60
+ E as repeat
61
+ };
@@ -0,0 +1,27 @@
1
+ import { nothing as s, noChange as r } from "../lit-html.js";
2
+ import { directive as n, Directive as o, PartType as a } from "../directive.js";
3
+ /**
4
+ * @license
5
+ * Copyright 2017 Google LLC
6
+ * SPDX-License-Identifier: BSD-3-Clause
7
+ */
8
+ class i extends o {
9
+ constructor(t) {
10
+ if (super(t), this.it = s, t.type !== a.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
11
+ }
12
+ render(t) {
13
+ if (t === s || t == null) return this._t = void 0, this.it = t;
14
+ if (t === r) return t;
15
+ if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
16
+ if (t === this.it) return this._t;
17
+ this.it = t;
18
+ const e = [t];
19
+ return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
20
+ }
21
+ }
22
+ i.directiveName = "unsafeHTML", i.resultType = 1;
23
+ const l = n(i);
24
+ export {
25
+ i as UnsafeHTMLDirective,
26
+ l as unsafeHTML
27
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2021 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ function o(e, r, n) {
7
+ return e ? r(e) : n == null ? void 0 : n(e);
8
+ }
9
+ export {
10
+ o as when
11
+ };