@lion/ui 0.2.2 → 0.3.1

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 (304) hide show
  1. package/README.md +23 -72
  2. package/components/button/src/LionButton.js +1 -1
  3. package/components/checkbox-group/src/LionCheckboxIndeterminate.js +2 -2
  4. package/components/checkbox-group/test/lion-checkbox-indeterminate-integrations.test.js +6 -0
  5. package/components/checkbox-group/{test/lion-checkbox-indeterminate.test.js → test-suites/CheckboxIndeterminate.suite.js} +209 -187
  6. package/components/combobox/src/LionCombobox.js +3 -1
  7. package/components/combobox/test/lion-combobox.test.js +52 -0
  8. package/components/core/src/SlotMixin.js +3 -2
  9. package/components/core/test/SlotMixin.test.js +1 -1
  10. package/components/core/types/SlotMixinTypes.ts +4 -1
  11. package/components/dialog/test/lion-dialog.test.js +56 -0
  12. package/components/form-core/src/FocusMixin.js +33 -2
  13. package/components/form-core/src/LionField.js +3 -1
  14. package/components/form-core/src/validate/LionValidationFeedback.js +2 -5
  15. package/components/form-core/src/validate/ResultValidator.js +1 -1
  16. package/components/form-core/test/FocusMixin.test.js +33 -0
  17. package/components/form-core/types/validate/ValidateMixinTypes.ts +2 -2
  18. package/components/form-integrations/test/dialog-integrations.test.js +19 -0
  19. package/components/form-integrations/test/form-group-methods.test.js +11 -37
  20. package/components/form-integrations/test/form-integrations.test.js +4 -0
  21. package/components/form-integrations/test/helpers/umbrella-form.js +21 -18
  22. package/components/input-amount/src/LionInputAmount.js +13 -4
  23. package/components/input-amount/test/lion-input-amount.test.js +19 -20
  24. package/components/input-date/src/LionInputDate.js +2 -11
  25. package/components/input-datepicker/src/LionInputDatepicker.js +5 -2
  26. package/components/input-datepicker/test/lion-input-datepicker.test.js +20 -0
  27. package/components/input-file/src/FileHandle.js +98 -0
  28. package/components/input-file/src/LionInputFile.js +892 -0
  29. package/components/input-file/src/LionSelectedFileList.js +232 -0
  30. package/components/input-file/src/localizeNamespaceLoader.js +75 -0
  31. package/components/input-file/src/validators.js +114 -0
  32. package/components/input-file/test/FileValidators.test.js +170 -0
  33. package/components/input-file/test/lion-input-file.test.js +1168 -0
  34. package/components/input-file/test/lion-selected-file-list.test.js +207 -0
  35. package/components/input-file/translations/bg-BG.js +5 -0
  36. package/components/input-file/translations/bg.js +12 -0
  37. package/components/input-file/translations/cs-CZ.js +5 -0
  38. package/components/input-file/translations/cs.js +13 -0
  39. package/components/input-file/translations/de-DE.js +5 -0
  40. package/components/input-file/translations/de.js +12 -0
  41. package/components/input-file/translations/en-AU.js +5 -0
  42. package/components/input-file/translations/en-GB.js +5 -0
  43. package/components/input-file/translations/en-PH.js +5 -0
  44. package/components/input-file/translations/en-US.js +5 -0
  45. package/components/input-file/translations/en.js +12 -0
  46. package/components/input-file/translations/es-ES.js +5 -0
  47. package/components/input-file/translations/es.js +12 -0
  48. package/components/input-file/translations/fr-BE.js +5 -0
  49. package/components/input-file/translations/fr-FR.js +5 -0
  50. package/components/input-file/translations/fr.js +13 -0
  51. package/components/input-file/translations/hu-HU.js +5 -0
  52. package/components/input-file/translations/hu.js +12 -0
  53. package/components/input-file/translations/it-IT.js +5 -0
  54. package/components/input-file/translations/it.js +12 -0
  55. package/components/input-file/translations/nl-BE.js +5 -0
  56. package/components/input-file/translations/nl-NL.js +5 -0
  57. package/components/input-file/translations/nl.js +12 -0
  58. package/components/input-file/translations/pl-PL.js +5 -0
  59. package/components/input-file/translations/pl.js +12 -0
  60. package/components/input-file/translations/ro-RO.js +5 -0
  61. package/components/input-file/translations/ro.js +12 -0
  62. package/components/input-file/translations/ru-RU.js +5 -0
  63. package/components/input-file/translations/ru.js +12 -0
  64. package/components/input-file/translations/sk-SK.js +5 -0
  65. package/components/input-file/translations/sk.js +12 -0
  66. package/components/input-file/translations/uk-UA.js +5 -0
  67. package/components/input-file/translations/uk.js +12 -0
  68. package/components/input-file/translations/zh-CN.js +5 -0
  69. package/components/input-file/translations/zh.js +12 -0
  70. package/components/input-file/types/input-file.d.ts +32 -0
  71. package/components/input-tel-dropdown/src/LionInputTelDropdown.js +1 -4
  72. package/components/listbox/src/ListboxMixin.js +3 -2
  73. package/components/listbox/test-suites/ListboxMixin.suite.js +31 -1
  74. package/components/localize/src/number/utils/normalize-format-number-to-parts/forceNoSpaceBetweenCurrencySymbolAndNumber.js +22 -0
  75. package/components/localize/src/number/utils/normalize-format-number-to-parts/forceSymbols.js +64 -0
  76. package/components/localize/src/number/utils/normalize-format-number-to-parts/normalizeIntl.js +13 -7
  77. package/components/localize/test/number/formatNumber.test.js +6 -28
  78. package/custom-elements.json +13822 -9246
  79. package/dist-types/components/checkbox-group/test-suites/CheckboxIndeterminate.suite.d.ts +12 -0
  80. package/dist-types/components/checkbox-group/test-suites/CheckboxIndeterminate.suite.d.ts.map +1 -0
  81. package/dist-types/components/combobox/src/LionCombobox.d.ts.map +1 -1
  82. package/dist-types/components/combobox/test/lion-combobox.test.d.ts.map +1 -1
  83. package/dist-types/components/core/src/SlotMixin.d.ts.map +1 -1
  84. package/dist-types/components/core/types/SlotMixinTypes.d.ts +4 -0
  85. package/dist-types/components/core/types/SlotMixinTypes.d.ts.map +1 -1
  86. package/dist-types/components/dialog/test/lion-dialog.test.d.ts.map +1 -1
  87. package/dist-types/components/form-core/src/FocusMixin.d.ts.map +1 -1
  88. package/dist-types/components/form-core/src/LionField.d.ts +2 -1
  89. package/dist-types/components/form-core/src/LionField.d.ts.map +1 -1
  90. package/dist-types/components/form-core/src/validate/LionValidationFeedback.d.ts +4 -11
  91. package/dist-types/components/form-core/src/validate/LionValidationFeedback.d.ts.map +1 -1
  92. package/dist-types/components/form-core/src/validate/ResultValidator.d.ts +1 -1
  93. package/dist-types/components/form-core/types/validate/ValidateMixinTypes.d.ts +5 -0
  94. package/dist-types/components/form-core/types/validate/ValidateMixinTypes.d.ts.map +1 -1
  95. package/dist-types/components/form-integrations/test/dialog-integrations.test.d.ts.map +1 -1
  96. package/dist-types/components/form-integrations/test/form-group-methods.test.d.ts +1 -0
  97. package/dist-types/components/form-integrations/test/form-group-methods.test.d.ts.map +1 -1
  98. package/dist-types/components/form-integrations/test/helpers/umbrella-form.d.ts.map +1 -1
  99. package/dist-types/components/input-amount/src/LionInputAmount.d.ts +2 -4
  100. package/dist-types/components/input-amount/src/LionInputAmount.d.ts.map +1 -1
  101. package/dist-types/components/input-amount/test/lion-input-amount.test.d.ts +0 -1
  102. package/dist-types/components/input-amount/test/lion-input-amount.test.d.ts.map +1 -1
  103. package/dist-types/components/input-date/src/LionInputDate.d.ts.map +1 -1
  104. package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts +1 -1
  105. package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts.map +1 -1
  106. package/dist-types/components/input-file/src/FileHandle.d.ts +55 -0
  107. package/dist-types/components/input-file/src/FileHandle.d.ts.map +1 -0
  108. package/dist-types/components/input-file/src/LionInputFile.d.ts +230 -0
  109. package/dist-types/components/input-file/src/LionInputFile.d.ts.map +1 -0
  110. package/dist-types/components/input-file/src/LionSelectedFileList.d.ts +69 -0
  111. package/dist-types/components/input-file/src/LionSelectedFileList.d.ts.map +1 -0
  112. package/dist-types/components/input-file/src/localizeNamespaceLoader.d.ts +2 -0
  113. package/dist-types/components/input-file/src/localizeNamespaceLoader.d.ts.map +1 -0
  114. package/dist-types/components/input-file/src/validators.d.ts +58 -0
  115. package/dist-types/components/input-file/src/validators.d.ts.map +1 -0
  116. package/dist-types/components/input-file/test/FileValidators.test.d.ts +2 -0
  117. package/dist-types/components/input-file/test/FileValidators.test.d.ts.map +1 -0
  118. package/dist-types/components/input-file/test/lion-input-file.test.d.ts +5 -0
  119. package/dist-types/components/input-file/test/lion-input-file.test.d.ts.map +1 -0
  120. package/dist-types/components/input-file/test/lion-selected-file-list.test.d.ts +4 -0
  121. package/dist-types/components/input-file/test/lion-selected-file-list.test.d.ts.map +1 -0
  122. package/dist-types/components/input-file/translations/bg-BG.d.ts +13 -0
  123. package/dist-types/components/input-file/translations/bg-BG.d.ts.map +1 -0
  124. package/dist-types/components/input-file/translations/bg.d.ts +13 -0
  125. package/dist-types/components/input-file/translations/bg.d.ts.map +1 -0
  126. package/dist-types/components/input-file/translations/cs-CZ.d.ts +13 -0
  127. package/dist-types/components/input-file/translations/cs-CZ.d.ts.map +1 -0
  128. package/dist-types/components/input-file/translations/cs.d.ts +13 -0
  129. package/dist-types/components/input-file/translations/cs.d.ts.map +1 -0
  130. package/dist-types/components/input-file/translations/de-DE.d.ts +13 -0
  131. package/dist-types/components/input-file/translations/de-DE.d.ts.map +1 -0
  132. package/dist-types/components/input-file/translations/de.d.ts +13 -0
  133. package/dist-types/components/input-file/translations/de.d.ts.map +1 -0
  134. package/dist-types/components/input-file/translations/en-AU.d.ts +13 -0
  135. package/dist-types/components/input-file/translations/en-AU.d.ts.map +1 -0
  136. package/dist-types/components/input-file/translations/en-GB.d.ts +13 -0
  137. package/dist-types/components/input-file/translations/en-GB.d.ts.map +1 -0
  138. package/dist-types/components/input-file/translations/en-PH.d.ts +13 -0
  139. package/dist-types/components/input-file/translations/en-PH.d.ts.map +1 -0
  140. package/dist-types/components/input-file/translations/en-US.d.ts +13 -0
  141. package/dist-types/components/input-file/translations/en-US.d.ts.map +1 -0
  142. package/dist-types/components/input-file/translations/en.d.ts +13 -0
  143. package/dist-types/components/input-file/translations/en.d.ts.map +1 -0
  144. package/dist-types/components/input-file/translations/es-ES.d.ts +13 -0
  145. package/dist-types/components/input-file/translations/es-ES.d.ts.map +1 -0
  146. package/dist-types/components/input-file/translations/es.d.ts +13 -0
  147. package/dist-types/components/input-file/translations/es.d.ts.map +1 -0
  148. package/dist-types/components/input-file/translations/fr-BE.d.ts +13 -0
  149. package/dist-types/components/input-file/translations/fr-BE.d.ts.map +1 -0
  150. package/dist-types/components/input-file/translations/fr-FR.d.ts +13 -0
  151. package/dist-types/components/input-file/translations/fr-FR.d.ts.map +1 -0
  152. package/dist-types/components/input-file/translations/fr.d.ts +13 -0
  153. package/dist-types/components/input-file/translations/fr.d.ts.map +1 -0
  154. package/dist-types/components/input-file/translations/hu-HU.d.ts +13 -0
  155. package/dist-types/components/input-file/translations/hu-HU.d.ts.map +1 -0
  156. package/dist-types/components/input-file/translations/hu.d.ts +13 -0
  157. package/dist-types/components/input-file/translations/hu.d.ts.map +1 -0
  158. package/dist-types/components/input-file/translations/it-IT.d.ts +13 -0
  159. package/dist-types/components/input-file/translations/it-IT.d.ts.map +1 -0
  160. package/dist-types/components/input-file/translations/it.d.ts +13 -0
  161. package/dist-types/components/input-file/translations/it.d.ts.map +1 -0
  162. package/dist-types/components/input-file/translations/nl-BE.d.ts +13 -0
  163. package/dist-types/components/input-file/translations/nl-BE.d.ts.map +1 -0
  164. package/dist-types/components/input-file/translations/nl-NL.d.ts +13 -0
  165. package/dist-types/components/input-file/translations/nl-NL.d.ts.map +1 -0
  166. package/dist-types/components/input-file/translations/nl.d.ts +13 -0
  167. package/dist-types/components/input-file/translations/nl.d.ts.map +1 -0
  168. package/dist-types/components/input-file/translations/pl-PL.d.ts +13 -0
  169. package/dist-types/components/input-file/translations/pl-PL.d.ts.map +1 -0
  170. package/dist-types/components/input-file/translations/pl.d.ts +13 -0
  171. package/dist-types/components/input-file/translations/pl.d.ts.map +1 -0
  172. package/dist-types/components/input-file/translations/ro-RO.d.ts +13 -0
  173. package/dist-types/components/input-file/translations/ro-RO.d.ts.map +1 -0
  174. package/dist-types/components/input-file/translations/ro.d.ts +13 -0
  175. package/dist-types/components/input-file/translations/ro.d.ts.map +1 -0
  176. package/dist-types/components/input-file/translations/ru-RU.d.ts +13 -0
  177. package/dist-types/components/input-file/translations/ru-RU.d.ts.map +1 -0
  178. package/dist-types/components/input-file/translations/ru.d.ts +13 -0
  179. package/dist-types/components/input-file/translations/ru.d.ts.map +1 -0
  180. package/dist-types/components/input-file/translations/sk-SK.d.ts +13 -0
  181. package/dist-types/components/input-file/translations/sk-SK.d.ts.map +1 -0
  182. package/dist-types/components/input-file/translations/sk.d.ts +13 -0
  183. package/dist-types/components/input-file/translations/sk.d.ts.map +1 -0
  184. package/dist-types/components/input-file/translations/uk-UA.d.ts +13 -0
  185. package/dist-types/components/input-file/translations/uk-UA.d.ts.map +1 -0
  186. package/dist-types/components/input-file/translations/uk.d.ts +13 -0
  187. package/dist-types/components/input-file/translations/uk.d.ts.map +1 -0
  188. package/dist-types/components/input-file/translations/zh-CN.d.ts +13 -0
  189. package/dist-types/components/input-file/translations/zh-CN.d.ts.map +1 -0
  190. package/dist-types/components/input-file/translations/zh.d.ts +13 -0
  191. package/dist-types/components/input-file/translations/zh.d.ts.map +1 -0
  192. package/dist-types/components/input-stepper/src/LionInputStepper.d.ts +6 -0
  193. package/dist-types/components/input-stepper/src/LionInputStepper.d.ts.map +1 -1
  194. package/dist-types/components/input-tel-dropdown/src/LionInputTelDropdown.d.ts +0 -1
  195. package/dist-types/components/input-tel-dropdown/src/LionInputTelDropdown.d.ts.map +1 -1
  196. package/dist-types/components/listbox/src/ListboxMixin.d.ts.map +1 -1
  197. package/dist-types/components/listbox/test-suites/ListboxMixin.suite.d.ts.map +1 -1
  198. package/dist-types/components/localize/src/number/utils/normalize-format-number-to-parts/forceNoSpaceBetweenCurrencySymbolAndNumber.d.ts +14 -0
  199. package/dist-types/components/localize/src/number/utils/normalize-format-number-to-parts/forceNoSpaceBetweenCurrencySymbolAndNumber.d.ts.map +1 -0
  200. package/dist-types/components/localize/src/number/utils/normalize-format-number-to-parts/forceSymbols.d.ts +20 -0
  201. package/dist-types/components/localize/src/number/utils/normalize-format-number-to-parts/forceSymbols.d.ts.map +1 -0
  202. package/dist-types/components/localize/src/number/utils/normalize-format-number-to-parts/normalizeIntl.d.ts.map +1 -1
  203. package/dist-types/exports/checkbox-group-test-suites.d.ts +2 -0
  204. package/dist-types/exports/checkbox-group-test-suites.d.ts.map +1 -0
  205. package/dist-types/exports/define/lion-input-file.d.ts +2 -0
  206. package/dist-types/exports/define/lion-input-file.d.ts.map +1 -0
  207. package/dist-types/exports/define/lion-selected-file-list.d.ts +2 -0
  208. package/dist-types/exports/define/lion-selected-file-list.d.ts.map +1 -0
  209. package/dist-types/exports/input-file.d.ts +4 -0
  210. package/dist-types/exports/input-file.d.ts.map +1 -0
  211. package/dist-types/tsconfig.tsbuildinfo +1 -1
  212. package/docs/components/button/extensions/bootstrap-button.mjs +240 -0
  213. package/docs/components/button/extensions.md +30 -0
  214. package/docs/components/checkbox-group/overview.md +9 -10
  215. package/docs/components/checkbox-group/use-cases.md +110 -142
  216. package/docs/components/collapsible/overview.md +1 -1
  217. package/docs/components/combobox/{examples.md → extensions.md} +51 -43
  218. package/docs/components/combobox/overview.md +1 -1
  219. package/docs/components/combobox/src/google-combobox/google-combobox.js +4 -1
  220. package/docs/components/combobox/src/md-combobox/md-combobox.js +40 -38
  221. package/docs/components/combobox/src/wa-combobox/wa-combobox.js +204 -209
  222. package/docs/components/combobox/use-cases.md +1 -1
  223. package/docs/components/dialog/overview.md +1 -1
  224. package/docs/components/fieldset/overview.md +5 -5
  225. package/docs/components/form/overview.md +3 -3
  226. package/docs/components/icon/use-cases.md +1 -1
  227. package/docs/components/input/overview.md +1 -1
  228. package/docs/components/input-amount/overview.md +3 -3
  229. package/docs/components/input-amount/use-cases.md +4 -2
  230. package/docs/components/input-date/overview.md +3 -3
  231. package/docs/components/input-datepicker/overview.md +5 -5
  232. package/docs/components/input-datepicker/use-cases.md +11 -0
  233. package/docs/components/input-email/overview.md +2 -2
  234. package/docs/components/input-file/index.md +3 -0
  235. package/docs/components/input-file/overview.md +32 -0
  236. package/docs/components/input-file/use-cases.md +424 -0
  237. package/docs/components/input-iban/overview.md +2 -2
  238. package/docs/components/input-range/overview.md +2 -2
  239. package/docs/components/input-stepper/overview.md +1 -1
  240. package/docs/components/input-tel/overview.md +1 -1
  241. package/docs/components/input-tel/use-cases.md +6 -6
  242. package/docs/components/input-tel-dropdown/{examples.md → extensions.md} +1 -1
  243. package/docs/components/input-tel-dropdown/overview.md +1 -1
  244. package/docs/components/radio-group/overview.md +3 -3
  245. package/docs/components/select-rich/use-cases.md +1 -1
  246. package/docs/components/tabs/examples.md +1 -1
  247. package/docs/fundamentals/index.md +4 -4
  248. package/docs/fundamentals/node-tools/providence-analytics/LocalConfiguration.md +1 -1
  249. package/docs/fundamentals/node-tools/providence-analytics/QueryResult.md +1 -1
  250. package/docs/fundamentals/node-tools/providence-analytics/analyzer.md +1 -1
  251. package/docs/fundamentals/node-tools/providence-analytics/dashboard.md +1 -1
  252. package/docs/fundamentals/node-tools/providence-analytics/overview.md +3 -3
  253. package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
  254. package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
  255. package/docs/fundamentals/rationales/accessibility.md +28 -0
  256. package/docs/fundamentals/systems/core/SlotMixin.md +148 -0
  257. package/docs/fundamentals/systems/core/overview.md +1 -1
  258. package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
  259. package/docs/fundamentals/systems/form/model-value.md +1 -1
  260. package/docs/fundamentals/systems/form/overview.md +28 -28
  261. package/docs/fundamentals/systems/form/use-cases.md +2 -0
  262. package/docs/fundamentals/systems/form/validate.md +1 -1
  263. package/docs/fundamentals/systems/localize/overview.md +4 -4
  264. package/docs/fundamentals/systems/overlays/_configuration-positioning.md +116 -0
  265. package/docs/fundamentals/systems/overlays/_edge-cases.md +145 -0
  266. package/docs/fundamentals/systems/overlays/configuration.md +2 -2
  267. package/docs/fundamentals/systems/overlays/overview.md +5 -5
  268. package/docs/fundamentals/systems/overlays/use-cases.md +2 -2
  269. package/docs/fundamentals/tools/helpers/overview.md +1 -1
  270. package/docs/fundamentals/tools/singleton-manager/example-complex/index.md +21 -0
  271. package/docs/fundamentals/tools/singleton-manager/example-fail/index.md +19 -0
  272. package/docs/fundamentals/tools/singleton-manager/example-success/index.md +18 -0
  273. package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
  274. package/docs/guides/how-to/create-a-custom-field.md +5 -5
  275. package/docs/guides/how-to/create-a-form.md +88 -0
  276. package/docs/guides/how-to/extend-a-native-input.md +2 -2
  277. package/docs/guides/how-to/get-started.md +28 -1
  278. package/docs/guides/index.md +8 -8
  279. package/docs/guides/principles/index.md +5 -5
  280. package/docs/guides/principles/styling.md +1 -1
  281. package/exports/checkbox-group-test-suites.js +1 -0
  282. package/exports/define/lion-input-file.js +3 -0
  283. package/exports/define/lion-selected-file-list.js +3 -0
  284. package/exports/input-file.js +3 -0
  285. package/package.json +3 -2
  286. package/components/localize/src/number/utils/normalize-format-number-to-parts/forceENAUSymbols.js +0 -25
  287. package/components/localize/src/number/utils/normalize-format-number-to-parts/forceYenSymbol.js +0 -15
  288. package/dist-types/components/checkbox-group/test/lion-checkbox-indeterminate.test.d.ts +0 -4
  289. package/dist-types/components/checkbox-group/test/lion-checkbox-indeterminate.test.d.ts.map +0 -1
  290. package/dist-types/components/localize/src/number/utils/normalize-format-number-to-parts/forceENAUSymbols.d.ts +0 -14
  291. package/dist-types/components/localize/src/number/utils/normalize-format-number-to-parts/forceENAUSymbols.d.ts.map +0 -1
  292. package/dist-types/components/localize/src/number/utils/normalize-format-number-to-parts/forceYenSymbol.d.ts +0 -9
  293. package/dist-types/components/localize/src/number/utils/normalize-format-number-to-parts/forceYenSymbol.d.ts.map +0 -1
  294. package/docs/components/combobox/src/google-combobox/assets/googlelogo_color_272x92dp.png +0 -0
  295. package/docs/components/dialog/src/demo-dialog-style.js +0 -3
  296. package/docs/components/select-rich/src/flags.png +0 -0
  297. package/docs/components/select-rich/src/flags@2x.png +0 -0
  298. package/docs/fundamentals/systems/form/assets/FormatMixinDiagram-1.svg +0 -1
  299. package/docs/fundamentals/systems/form/assets/FormatMixinDiagram-2.svg +0 -1
  300. package/docs/fundamentals/systems/form/assets/FormatMixinDiagram-3.svg +0 -84
  301. package/docs/fundamentals/tools/ajax/assets/naga.json +0 -9
  302. package/docs/fundamentals/tools/ajax/assets/pabu.json +0 -9
  303. package/docs/fundamentals/tools/singleton-manager/.gitignore +0 -1
  304. package/docs/override.js +0 -15
@@ -1,4 +1,4 @@
1
- # Combobox >> Examples ||30
1
+ # Combobox >> Extensions ||30
2
2
 
3
3
  ```js script
4
4
  import { html } from '@mdjs/mdjs-preview';
@@ -46,48 +46,56 @@ export const Github = () => html`
46
46
  ## Whatsapp
47
47
 
48
48
  ```js preview-story
49
- export const Whatsapp = () => html`
50
- <wa-combobox name="combo" label="Filter chats">
51
- <wa-option
52
- title="Barack Obama"
53
- text="Yup, let's try that for now👍"
54
- time="15:02"
55
- is-user-text
56
- is-user-text-read
57
- image="https://pbs.twimg.com/profile_images/822547732376207360/5g0FC8XX_400x400.jpg"
58
- .choiceValue=${'Barack Obama'}
59
- ></wa-option>
60
- <wa-option
61
- title="Donald Trump"
62
- text="Take care!"
63
- time="14:59"
64
- is-user-text
65
- image="https://pbs.twimg.com/profile_images/874276197357596672/kUuht00m_400x400.jpg"
66
- .choiceValue=${'Donald Trump'}
67
- ></wa-option>
68
- <wa-option
69
- title="Joe Biden"
70
- text="Hehe😅. You too, man, you too..."
71
- time="yesterday"
72
- image="https://pbs.twimg.com/profile_images/1308769664240160770/AfgzWVE7_400x400.jpg"
73
- .choiceValue=${'Joe Biden'}
74
- ></wa-option>
75
- <wa-option
76
- title="George W. Bush"
77
- time="friday"
78
- text="You bet I will. Let's catch up soon!"
79
- image="https://pbs.twimg.com/profile_images/828483922266877954/ljYUWUCu_400x400.jpg"
80
- .choiceValue=${'George W. Bush'}
81
- ></wa-option>
82
- <wa-option
83
- title="Bill Clinton"
84
- time="thursday"
85
- text="Dude...😂 😂 😂"
86
- image="https://pbs.twimg.com/profile_images/1239440892664086529/iY0Z83Dr_400x400.jpg"
87
- .choiceValue=${'Bill Clinton'}
88
- ></wa-option>
89
- </wa-combobox>
90
- `;
49
+ export const Whatsapp = () => {
50
+ const obamaImgUrl = new URL('../src/wa-combobox/assets/obama.jpeg', import.meta.url).href;
51
+ const trumpImgUrl = new URL('../src/wa-combobox/assets/trump.jpeg', import.meta.url).href;
52
+ const bidenImgUrl = new URL('../src/wa-combobox/assets/biden.jpeg', import.meta.url).href;
53
+ const bushImgUrl = new URL('../src/wa-combobox/assets/bush.jpeg', import.meta.url).href;
54
+ const clintonImgUrl = new URL('../src/wa-combobox/assets/clinton.jpeg', import.meta.url).href;
55
+
56
+ return html`
57
+ <wa-combobox name="combo" label="Filter chats">
58
+ <wa-option
59
+ title="Barack Obama"
60
+ text="Yup, let's try that for now👍"
61
+ time="15:02"
62
+ is-user-text
63
+ is-user-text-read
64
+ image="${obamaImgUrl}"
65
+ .choiceValue=${'Barack Obama'}
66
+ ></wa-option>
67
+ <wa-option
68
+ title="Donald Trump"
69
+ text="Take care!"
70
+ time="14:59"
71
+ is-user-text
72
+ image="${trumpImgUrl}"
73
+ .choiceValue=${'Donald Trump'}
74
+ ></wa-option>
75
+ <wa-option
76
+ title="Joe Biden"
77
+ text="Hehe😅. You too, man, you too..."
78
+ time="yesterday"
79
+ image="${bidenImgUrl}"
80
+ .choiceValue=${'Joe Biden'}
81
+ ></wa-option>
82
+ <wa-option
83
+ title="George W. Bush"
84
+ time="friday"
85
+ text="You bet I will. Let's catch up soon!"
86
+ image="${bushImgUrl}"
87
+ .choiceValue=${'George W. Bush'}
88
+ ></wa-option>
89
+ <wa-option
90
+ title="Bill Clinton"
91
+ time="thursday"
92
+ text="Dude...😂 😂 😂"
93
+ image="${clintonImgUrl}"
94
+ .choiceValue=${'Bill Clinton'}
95
+ ></wa-option>
96
+ </wa-combobox>
97
+ `;
98
+ };
91
99
  ```
92
100
 
93
101
  **Whatsapp example shows:**
@@ -33,7 +33,7 @@ export const main = () => html`
33
33
  `;
34
34
  ```
35
35
 
36
- [...show more](https://github.com/ing-bank/lion/blob/ede8412cbca3f6dd025797336745330f31706ad3/docs/components/combobox/examples.md)
36
+ [...show more](https://github.com/ing-bank/lion/blob/a19e02c443e21d4e6c62bb08bbe6db64f7446010/docs/components/combobox/extensions.md)
37
37
 
38
38
  ## Features
39
39
 
@@ -397,7 +397,10 @@ export class GoogleCombobox extends LionCombobox {
397
397
  get slots() {
398
398
  return {
399
399
  ...super.slots,
400
- label: () => renderLitAsNode(html` <img alt="Google Search" src="${googleSearchLogoUrl}" />`),
400
+ label: () =>
401
+ renderLitAsNode(
402
+ html` <img alt="Google Search" src="${googleSearchLogoUrl}" style="width:auto; " />`,
403
+ ),
401
404
  prefix: () => renderLitAsNode(html` <span>${googleSearchIcon}</span> `),
402
405
  suffix: () =>
403
406
  renderLitAsNode(
@@ -7,31 +7,29 @@ import './style/load-roboto.js';
7
7
 
8
8
  // TODO: insert ink wc here
9
9
  export class MdOption extends LionOption {
10
- static get styles() {
11
- return [
12
- ...super.styles,
13
- css`
14
- :host {
15
- position: relative;
16
- padding: 8px;
17
- }
10
+ static styles = [
11
+ ...super.styles,
12
+ css`
13
+ :host {
14
+ position: relative;
15
+ padding: 8px;
16
+ }
18
17
 
19
- :host([focused]) {
20
- background: lightgray;
21
- }
18
+ :host([focused]) {
19
+ background: lightgray;
20
+ }
22
21
 
23
- :host([active]) {
24
- color: #1867c0 !important;
25
- caret-color: #1867c0 !important;
26
- }
22
+ :host([active]) {
23
+ color: #1867c0 !important;
24
+ caret-color: #1867c0 !important;
25
+ }
27
26
 
28
- :host ::slotted(.md-highlight) {
29
- color: rgba(0, 0, 0, 0.38);
30
- background: #eee;
31
- }
32
- `,
33
- ];
34
- }
27
+ :host ::slotted(.md-highlight) {
28
+ color: rgba(0, 0, 0, 0.38);
29
+ background: #eee;
30
+ }
31
+ `,
32
+ ];
35
33
 
36
34
  /**
37
35
  * @override
@@ -67,23 +65,27 @@ export class MdOption extends LionOption {
67
65
  customElements.define('md-option', MdOption);
68
66
 
69
67
  export class MdCombobox extends MdFieldMixin(LionCombobox) {
70
- static get styles() {
71
- return [
72
- ...super.styles,
73
- css`
74
- .input-group__container {
75
- display: flex;
76
- border-bottom: none;
77
- }
68
+ static styles = [
69
+ ...super.styles,
70
+ css`
71
+ .input-group__container {
72
+ display: flex;
73
+ border-bottom: none;
74
+ }
75
+
76
+ * > ::slotted([role='listbox']) {
77
+ box-shadow: 0 4px 6px 0 rgba(32, 33, 36, 0.28);
78
+ padding-top: 8px;
79
+ padding-bottom: 8px;
80
+ top: 2px;
81
+ }
82
+ `,
83
+ ];
84
+
85
+ constructor() {
86
+ super();
78
87
 
79
- * > ::slotted([role='listbox']) {
80
- box-shadow: 0 4px 6px 0 rgba(32, 33, 36, 0.28);
81
- padding-top: 8px;
82
- padding-bottom: 8px;
83
- top: 2px;
84
- }
85
- `,
86
- ];
88
+ this.showAllOnEmpty = true;
87
89
  }
88
90
  }
89
91
  customElements.define('md-combobox', MdCombobox);
@@ -15,164 +15,162 @@ class WaOption extends LionOption {
15
15
  };
16
16
  }
17
17
 
18
- static get styles() {
19
- return [
20
- ...super.styles,
21
- css`
22
- :host {
23
- --background-default: white;
24
- --background-default-active: gray;
25
- --secondary: #777;
26
- --secondary-lighter: #aaa;
27
- --chatlist-icon: #aaa;
28
- background-color: var(--background-default);
29
- cursor: pointer;
30
- color: rgb(74, 74, 74);
31
- padding: 0;
32
- transition: max-height 0.4s ease, opacity 0.3s ease;
33
- max-height: 500px;
34
- }
35
-
36
- :host([checked]) {
37
- background-color: #eee;
38
- }
39
-
40
- :host(:hover) {
41
- background-color: #f6f6f6;
42
- }
43
-
44
- .wa-option {
45
- position: relative;
46
- display: flex;
47
- flex-direction: row;
48
- height: 72px;
49
- pointer-events: all;
50
- }
51
-
52
- .wa-option__image {
53
- display: flex;
54
- flex: none;
55
- align-items: center;
56
- margin-top: -1px;
57
- padding: 0 15px 0 13px;
58
- }
59
-
60
- .wa-option__image-inner {
61
- position: relative;
62
- overflow: hidden;
63
- background-color: var(--avatar-background);
64
- border-radius: 50%;
65
- height: 49px;
66
- width: 49px;
67
- }
68
-
69
- .wa-option__image-inner img,
70
- .wa-option__image-inner svg {
71
- width: 100%;
72
- height: 100%;
73
- }
74
-
75
- .wa-option__image-inner-inner {
76
- position: absolute;
77
- top: 0;
78
- z-index: 1;
79
- display: flex;
80
- align-items: center;
81
- justify-content: center;
82
- width: 100%;
83
- height: 100%;
84
- }
85
-
86
- .wa-option__content {
87
- display: flex;
88
- flex-basis: auto;
89
- flex-direction: column;
90
- flex-grow: 1;
91
- justify-content: center;
92
- min-width: 0;
93
- border-bottom: 1px solid #eee;
94
- padding-right: 15px;
95
- }
96
-
97
- .wa-option__content-row1 {
98
- display: flex;
99
- align-items: center;
100
- line-height: normal;
101
- text-align: left;
102
- }
103
-
104
- .wa-option__content-row1-title {
105
- display: flex;
106
- flex-grow: 1;
107
- overflow: hidden;
108
- color: var(--primary-strong);
109
- font-weight: 400;
110
- font-size: 17px;
111
- line-height: 21px;
112
- }
113
-
114
- .wa-option__content-row1-time {
115
- line-height: 14px;
116
- overflow: hidden;
117
- text-overflow: ellipsis;
118
- white-space: nowrap;
119
- margin-left: 6px;
120
- margin-top: 3px;
121
-
122
- flex: none;
123
- max-width: 100%;
124
- color: var(--secondary-lighter);
125
- font-size: 12px;
126
- line-height: 20px;
127
- }
128
-
129
- .wa-option__content-row2 {
130
- display: flex;
131
- align-items: center;
132
- min-height: 20px;
133
- color: var(--secondary);
134
- font-size: 13px;
135
- line-height: 20px;
136
- margin-top: 2px;
137
- /* color: var(--secondary-stronger); */
138
- }
139
-
140
- .wa-option__content-row2-text {
141
- flex-grow: 1;
142
- overflow: hidden;
143
- font-weight: 400;
144
- font-size: 14px;
145
- line-height: 20px;
146
- white-space: nowrap;
147
- text-overflow: ellipsis;
148
- }
149
-
150
- .wa-option__content-row2-text-inner {
151
- display: flex;
152
- align-items: flex-start;
153
- }
154
-
155
- .wa-option__content-row2-text-inner-icon {
156
- display: none;
157
- flex: none;
158
- color: var(--chatlist-icon);
159
- vertical-align: top;
160
- margin-right: 2px;
161
- }
162
-
163
- :host([is-user-text]) .wa-option__content-row2-text-inner-icon {
164
- display: inline-block;
165
- }
166
-
167
- :host([is-user-text-read]) .wa-option__content-row2-text-inner-icon {
168
- color: lightblue;
169
- }
170
- /*
18
+ static styles = [
19
+ ...super.styles,
20
+ css`
21
+ :host {
22
+ --background-default: white;
23
+ --background-default-active: gray;
24
+ --secondary: #777;
25
+ --secondary-lighter: #aaa;
26
+ --chatlist-icon: #aaa;
27
+ background-color: var(--background-default);
28
+ cursor: pointer;
29
+ color: rgb(74, 74, 74);
30
+ padding: 0;
31
+ transition: max-height 0.4s ease, opacity 0.3s ease;
32
+ max-height: 500px;
33
+ }
34
+
35
+ :host([checked]) {
36
+ background-color: #eee;
37
+ }
38
+
39
+ :host(:hover) {
40
+ background-color: #f6f6f6;
41
+ }
42
+
43
+ .wa-option {
44
+ position: relative;
45
+ display: flex;
46
+ flex-direction: row;
47
+ height: 72px;
48
+ pointer-events: all;
49
+ }
50
+
51
+ .wa-option__image {
52
+ display: flex;
53
+ flex: none;
54
+ align-items: center;
55
+ margin-top: -1px;
56
+ padding: 0 15px 0 13px;
57
+ }
58
+
59
+ .wa-option__image-inner {
60
+ position: relative;
61
+ overflow: hidden;
62
+ background-color: var(--avatar-background);
63
+ border-radius: 50%;
64
+ height: 49px;
65
+ width: 49px;
66
+ }
67
+
68
+ .wa-option__image-inner img,
69
+ .wa-option__image-inner svg {
70
+ width: 100%;
71
+ height: 100%;
72
+ }
73
+
74
+ .wa-option__image-inner-inner {
75
+ position: absolute;
76
+ top: 0;
77
+ z-index: 1;
78
+ display: flex;
79
+ align-items: center;
80
+ justify-content: center;
81
+ width: 100%;
82
+ height: 100%;
83
+ }
84
+
85
+ .wa-option__content {
86
+ display: flex;
87
+ flex-basis: auto;
88
+ flex-direction: column;
89
+ flex-grow: 1;
90
+ justify-content: center;
91
+ min-width: 0;
92
+ border-bottom: 1px solid #eee;
93
+ padding-right: 15px;
94
+ }
95
+
96
+ .wa-option__content-row1 {
97
+ display: flex;
98
+ align-items: center;
99
+ line-height: normal;
100
+ text-align: left;
101
+ }
102
+
103
+ .wa-option__content-row1-title {
104
+ display: flex;
105
+ flex-grow: 1;
106
+ overflow: hidden;
107
+ color: var(--primary-strong);
108
+ font-weight: 400;
109
+ font-size: 17px;
110
+ line-height: 21px;
111
+ }
112
+
113
+ .wa-option__content-row1-time {
114
+ line-height: 14px;
115
+ overflow: hidden;
116
+ text-overflow: ellipsis;
117
+ white-space: nowrap;
118
+ margin-left: 6px;
119
+ margin-top: 3px;
120
+
121
+ flex: none;
122
+ max-width: 100%;
123
+ color: var(--secondary-lighter);
124
+ font-size: 12px;
125
+ line-height: 20px;
126
+ }
127
+
128
+ .wa-option__content-row2 {
129
+ display: flex;
130
+ align-items: center;
131
+ min-height: 20px;
132
+ color: var(--secondary);
133
+ font-size: 13px;
134
+ line-height: 20px;
135
+ margin-top: 2px;
136
+ /* color: var(--secondary-stronger); */
137
+ }
138
+
139
+ .wa-option__content-row2-text {
140
+ flex-grow: 1;
141
+ overflow: hidden;
142
+ font-weight: 400;
143
+ font-size: 14px;
144
+ line-height: 20px;
145
+ white-space: nowrap;
146
+ text-overflow: ellipsis;
147
+ }
148
+
149
+ .wa-option__content-row2-text-inner {
150
+ display: flex;
151
+ align-items: flex-start;
152
+ }
153
+
154
+ .wa-option__content-row2-text-inner-icon {
155
+ display: none;
156
+ flex: none;
157
+ color: var(--chatlist-icon);
158
+ vertical-align: top;
159
+ margin-right: 2px;
160
+ }
161
+
162
+ :host([is-user-text]) .wa-option__content-row2-text-inner-icon {
163
+ display: inline-block;
164
+ }
165
+
166
+ :host([is-user-text-read]) .wa-option__content-row2-text-inner-icon {
167
+ color: lightblue;
168
+ }
169
+ /*
171
170
  .wa-option__content-row2-menu {
172
171
  } */
173
- `,
174
- ];
175
- }
172
+ `,
173
+ ];
176
174
 
177
175
  render() {
178
176
  return html`<div class="wa-option">
@@ -285,59 +283,56 @@ class WaOption extends LionOption {
285
283
  customElements.define('wa-option', WaOption);
286
284
 
287
285
  class WaCombobox extends LionCombobox {
288
- static get styles() {
289
- return [
290
- ...super.styles,
291
- css`
292
- :host {
293
- font-family: SF Pro Text, SF Pro Icons, system, -apple-system, system-ui,
294
- BlinkMacSystemFont, Helvetica Neue, Helvetica, Lucida Grande, Kohinoor Devanagari,
295
- sans-serif;
296
- }
297
-
298
- .input-group__container {
299
- display: flex;
300
- border-bottom: none;
301
- }
302
-
303
- * > ::slotted([role='listbox']) {
304
- max-height: none;
305
- }
306
-
307
- * > ::slotted([slot='input']) {
308
- font-size: 14px;
309
- }
310
-
311
- .input-group {
312
- padding: 15px;
313
- background: #f6f6f6;
314
- }
315
-
316
- .input-group__prefix {
317
- margin-right: 20px;
318
- color: #999;
319
- display: flex;
320
- }
321
-
322
- .input-group__container {
323
- border-radius: 18px;
324
- background: white;
325
- padding: 7px;
326
- padding-left: 16px;
327
- }
328
-
329
- /** Undo Popper */
330
- #overlay-content-node-wrapper {
331
- position: static !important;
332
- width: auto !important;
333
- transform: none !important;
334
-
335
- /* height: 300px;
286
+ static styles = [
287
+ ...super.styles,
288
+ css`
289
+ :host {
290
+ font-family: SF Pro Text, SF Pro Icons, system, -apple-system, system-ui, BlinkMacSystemFont,
291
+ Helvetica Neue, Helvetica, Lucida Grande, Kohinoor Devanagari, sans-serif;
292
+ }
293
+
294
+ .input-group__container {
295
+ display: flex;
296
+ border-bottom: none;
297
+ }
298
+
299
+ * > ::slotted([role='listbox']) {
300
+ max-height: none;
301
+ }
302
+
303
+ * > ::slotted([slot='input']) {
304
+ font-size: 14px;
305
+ }
306
+
307
+ .input-group {
308
+ padding: 15px;
309
+ background: #f6f6f6;
310
+ }
311
+
312
+ .input-group__prefix {
313
+ margin-right: 20px;
314
+ color: #999;
315
+ display: flex;
316
+ }
317
+
318
+ .input-group__container {
319
+ border-radius: 18px;
320
+ background: white;
321
+ padding: 7px;
322
+ padding-left: 16px;
323
+ }
324
+
325
+ /** Undo Popper */
326
+ #overlay-content-node-wrapper {
327
+ position: static !important;
328
+ width: auto !important;
329
+ transform: none !important;
330
+
331
+ /* height: 300px;
336
332
  overflow: scroll; */
337
- }
338
- `,
339
- ];
340
- }
333
+ }
334
+ `,
335
+ ];
341
336
 
342
337
  get slots() {
343
338
  return {
@@ -360,7 +355,7 @@ class WaCombobox extends LionCombobox {
360
355
  /** @configure OverlayMixin */
361
356
  this.opened = true;
362
357
  /** @configure LionCombobox */
363
- this.showAllOnEmpty = true;
358
+ this.showAllOnEmpty = false;
364
359
  /** @configure LionCombobox */
365
360
  this.rotateKeyboardNavigation = false;
366
361
  }