@lion/ui 0.2.1 β†’ 0.3.0

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 (272) hide show
  1. package/README.md +23 -72
  2. package/components/button/src/LionButton.js +1 -1
  3. package/components/core/src/SlotMixin.js +3 -2
  4. package/components/core/test/SlotMixin.test.js +1 -1
  5. package/components/core/types/SlotMixinTypes.ts +4 -1
  6. package/components/dialog/test/lion-dialog.test.js +56 -0
  7. package/components/form-core/src/FocusMixin.js +33 -2
  8. package/components/form-core/src/LionField.js +3 -1
  9. package/components/form-core/src/validate/LionValidationFeedback.js +2 -5
  10. package/components/form-core/src/validate/ResultValidator.js +1 -1
  11. package/components/form-core/test/FocusMixin.test.js +33 -0
  12. package/components/form-core/types/validate/ValidateMixinTypes.ts +2 -2
  13. package/components/form-integrations/test/dialog-integrations.test.js +19 -0
  14. package/components/form-integrations/test/form-group-methods.test.js +11 -37
  15. package/components/form-integrations/test/form-integrations.test.js +4 -0
  16. package/components/form-integrations/test/helpers/umbrella-form.js +21 -18
  17. package/components/input-amount/src/LionInputAmount.js +13 -4
  18. package/components/input-amount/test/lion-input-amount.test.js +19 -20
  19. package/components/input-date/src/LionInputDate.js +2 -11
  20. package/components/input-datepicker/src/LionInputDatepicker.js +5 -2
  21. package/components/input-datepicker/test/lion-input-datepicker.test.js +20 -0
  22. package/components/input-file/src/FileHandle.js +98 -0
  23. package/components/input-file/src/LionInputFile.js +892 -0
  24. package/components/input-file/src/LionSelectedFileList.js +232 -0
  25. package/components/input-file/src/localizeNamespaceLoader.js +75 -0
  26. package/components/input-file/src/validators.js +114 -0
  27. package/components/input-file/test/FileValidators.test.js +170 -0
  28. package/components/input-file/test/lion-input-file.test.js +1168 -0
  29. package/components/input-file/test/lion-selected-file-list.test.js +207 -0
  30. package/components/input-file/translations/bg-BG.js +5 -0
  31. package/components/input-file/translations/bg.js +12 -0
  32. package/components/input-file/translations/cs-CZ.js +5 -0
  33. package/components/input-file/translations/cs.js +13 -0
  34. package/components/input-file/translations/de-DE.js +5 -0
  35. package/components/input-file/translations/de.js +12 -0
  36. package/components/input-file/translations/en-AU.js +5 -0
  37. package/components/input-file/translations/en-GB.js +5 -0
  38. package/components/input-file/translations/en-PH.js +5 -0
  39. package/components/input-file/translations/en-US.js +5 -0
  40. package/components/input-file/translations/en.js +12 -0
  41. package/components/input-file/translations/es-ES.js +5 -0
  42. package/components/input-file/translations/es.js +12 -0
  43. package/components/input-file/translations/fr-BE.js +5 -0
  44. package/components/input-file/translations/fr-FR.js +5 -0
  45. package/components/input-file/translations/fr.js +13 -0
  46. package/components/input-file/translations/hu-HU.js +5 -0
  47. package/components/input-file/translations/hu.js +12 -0
  48. package/components/input-file/translations/it-IT.js +5 -0
  49. package/components/input-file/translations/it.js +12 -0
  50. package/components/input-file/translations/nl-BE.js +5 -0
  51. package/components/input-file/translations/nl-NL.js +5 -0
  52. package/components/input-file/translations/nl.js +12 -0
  53. package/components/input-file/translations/pl-PL.js +5 -0
  54. package/components/input-file/translations/pl.js +12 -0
  55. package/components/input-file/translations/ro-RO.js +5 -0
  56. package/components/input-file/translations/ro.js +12 -0
  57. package/components/input-file/translations/ru-RU.js +5 -0
  58. package/components/input-file/translations/ru.js +12 -0
  59. package/components/input-file/translations/sk-SK.js +5 -0
  60. package/components/input-file/translations/sk.js +12 -0
  61. package/components/input-file/translations/uk-UA.js +5 -0
  62. package/components/input-file/translations/uk.js +12 -0
  63. package/components/input-file/translations/zh-CN.js +5 -0
  64. package/components/input-file/translations/zh.js +12 -0
  65. package/components/input-file/types/input-file.d.ts +32 -0
  66. package/components/input-tel-dropdown/src/LionInputTelDropdown.js +1 -4
  67. package/components/localize/src/number/parseNumber.js +7 -1
  68. package/components/localize/test/number/parseNumber.test.js +18 -4
  69. package/custom-elements.json +21949 -17530
  70. package/dist-types/components/core/src/SlotMixin.d.ts.map +1 -1
  71. package/dist-types/components/core/types/SlotMixinTypes.d.ts +4 -0
  72. package/dist-types/components/core/types/SlotMixinTypes.d.ts.map +1 -1
  73. package/dist-types/components/dialog/test/lion-dialog.test.d.ts.map +1 -1
  74. package/dist-types/components/form-core/src/FocusMixin.d.ts.map +1 -1
  75. package/dist-types/components/form-core/src/LionField.d.ts +2 -1
  76. package/dist-types/components/form-core/src/LionField.d.ts.map +1 -1
  77. package/dist-types/components/form-core/src/validate/LionValidationFeedback.d.ts +4 -11
  78. package/dist-types/components/form-core/src/validate/LionValidationFeedback.d.ts.map +1 -1
  79. package/dist-types/components/form-core/src/validate/ResultValidator.d.ts +1 -1
  80. package/dist-types/components/form-core/types/validate/ValidateMixinTypes.d.ts +5 -0
  81. package/dist-types/components/form-core/types/validate/ValidateMixinTypes.d.ts.map +1 -1
  82. package/dist-types/components/form-integrations/test/dialog-integrations.test.d.ts.map +1 -1
  83. package/dist-types/components/form-integrations/test/form-group-methods.test.d.ts +1 -0
  84. package/dist-types/components/form-integrations/test/form-group-methods.test.d.ts.map +1 -1
  85. package/dist-types/components/form-integrations/test/helpers/umbrella-form.d.ts.map +1 -1
  86. package/dist-types/components/input-amount/src/LionInputAmount.d.ts +2 -4
  87. package/dist-types/components/input-amount/src/LionInputAmount.d.ts.map +1 -1
  88. package/dist-types/components/input-amount/test/lion-input-amount.test.d.ts +0 -1
  89. package/dist-types/components/input-amount/test/lion-input-amount.test.d.ts.map +1 -1
  90. package/dist-types/components/input-date/src/LionInputDate.d.ts.map +1 -1
  91. package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts +1 -1
  92. package/dist-types/components/input-datepicker/src/LionInputDatepicker.d.ts.map +1 -1
  93. package/dist-types/components/input-file/src/FileHandle.d.ts +55 -0
  94. package/dist-types/components/input-file/src/FileHandle.d.ts.map +1 -0
  95. package/dist-types/components/input-file/src/LionInputFile.d.ts +230 -0
  96. package/dist-types/components/input-file/src/LionInputFile.d.ts.map +1 -0
  97. package/dist-types/components/input-file/src/LionSelectedFileList.d.ts +69 -0
  98. package/dist-types/components/input-file/src/LionSelectedFileList.d.ts.map +1 -0
  99. package/dist-types/components/input-file/src/localizeNamespaceLoader.d.ts +2 -0
  100. package/dist-types/components/input-file/src/localizeNamespaceLoader.d.ts.map +1 -0
  101. package/dist-types/components/input-file/src/validators.d.ts +58 -0
  102. package/dist-types/components/input-file/src/validators.d.ts.map +1 -0
  103. package/dist-types/components/input-file/test/FileValidators.test.d.ts +2 -0
  104. package/dist-types/components/input-file/test/FileValidators.test.d.ts.map +1 -0
  105. package/dist-types/components/input-file/test/lion-input-file.test.d.ts +5 -0
  106. package/dist-types/components/input-file/test/lion-input-file.test.d.ts.map +1 -0
  107. package/dist-types/components/input-file/test/lion-selected-file-list.test.d.ts +4 -0
  108. package/dist-types/components/input-file/test/lion-selected-file-list.test.d.ts.map +1 -0
  109. package/dist-types/components/input-file/translations/bg-BG.d.ts +13 -0
  110. package/dist-types/components/input-file/translations/bg-BG.d.ts.map +1 -0
  111. package/dist-types/components/input-file/translations/bg.d.ts +13 -0
  112. package/dist-types/components/input-file/translations/bg.d.ts.map +1 -0
  113. package/dist-types/components/input-file/translations/cs-CZ.d.ts +13 -0
  114. package/dist-types/components/input-file/translations/cs-CZ.d.ts.map +1 -0
  115. package/dist-types/components/input-file/translations/cs.d.ts +13 -0
  116. package/dist-types/components/input-file/translations/cs.d.ts.map +1 -0
  117. package/dist-types/components/input-file/translations/de-DE.d.ts +13 -0
  118. package/dist-types/components/input-file/translations/de-DE.d.ts.map +1 -0
  119. package/dist-types/components/input-file/translations/de.d.ts +13 -0
  120. package/dist-types/components/input-file/translations/de.d.ts.map +1 -0
  121. package/dist-types/components/input-file/translations/en-AU.d.ts +13 -0
  122. package/dist-types/components/input-file/translations/en-AU.d.ts.map +1 -0
  123. package/dist-types/components/input-file/translations/en-GB.d.ts +13 -0
  124. package/dist-types/components/input-file/translations/en-GB.d.ts.map +1 -0
  125. package/dist-types/components/input-file/translations/en-PH.d.ts +13 -0
  126. package/dist-types/components/input-file/translations/en-PH.d.ts.map +1 -0
  127. package/dist-types/components/input-file/translations/en-US.d.ts +13 -0
  128. package/dist-types/components/input-file/translations/en-US.d.ts.map +1 -0
  129. package/dist-types/components/input-file/translations/en.d.ts +13 -0
  130. package/dist-types/components/input-file/translations/en.d.ts.map +1 -0
  131. package/dist-types/components/input-file/translations/es-ES.d.ts +13 -0
  132. package/dist-types/components/input-file/translations/es-ES.d.ts.map +1 -0
  133. package/dist-types/components/input-file/translations/es.d.ts +13 -0
  134. package/dist-types/components/input-file/translations/es.d.ts.map +1 -0
  135. package/dist-types/components/input-file/translations/fr-BE.d.ts +13 -0
  136. package/dist-types/components/input-file/translations/fr-BE.d.ts.map +1 -0
  137. package/dist-types/components/input-file/translations/fr-FR.d.ts +13 -0
  138. package/dist-types/components/input-file/translations/fr-FR.d.ts.map +1 -0
  139. package/dist-types/components/input-file/translations/fr.d.ts +13 -0
  140. package/dist-types/components/input-file/translations/fr.d.ts.map +1 -0
  141. package/dist-types/components/input-file/translations/hu-HU.d.ts +13 -0
  142. package/dist-types/components/input-file/translations/hu-HU.d.ts.map +1 -0
  143. package/dist-types/components/input-file/translations/hu.d.ts +13 -0
  144. package/dist-types/components/input-file/translations/hu.d.ts.map +1 -0
  145. package/dist-types/components/input-file/translations/it-IT.d.ts +13 -0
  146. package/dist-types/components/input-file/translations/it-IT.d.ts.map +1 -0
  147. package/dist-types/components/input-file/translations/it.d.ts +13 -0
  148. package/dist-types/components/input-file/translations/it.d.ts.map +1 -0
  149. package/dist-types/components/input-file/translations/nl-BE.d.ts +13 -0
  150. package/dist-types/components/input-file/translations/nl-BE.d.ts.map +1 -0
  151. package/dist-types/components/input-file/translations/nl-NL.d.ts +13 -0
  152. package/dist-types/components/input-file/translations/nl-NL.d.ts.map +1 -0
  153. package/dist-types/components/input-file/translations/nl.d.ts +13 -0
  154. package/dist-types/components/input-file/translations/nl.d.ts.map +1 -0
  155. package/dist-types/components/input-file/translations/pl-PL.d.ts +13 -0
  156. package/dist-types/components/input-file/translations/pl-PL.d.ts.map +1 -0
  157. package/dist-types/components/input-file/translations/pl.d.ts +13 -0
  158. package/dist-types/components/input-file/translations/pl.d.ts.map +1 -0
  159. package/dist-types/components/input-file/translations/ro-RO.d.ts +13 -0
  160. package/dist-types/components/input-file/translations/ro-RO.d.ts.map +1 -0
  161. package/dist-types/components/input-file/translations/ro.d.ts +13 -0
  162. package/dist-types/components/input-file/translations/ro.d.ts.map +1 -0
  163. package/dist-types/components/input-file/translations/ru-RU.d.ts +13 -0
  164. package/dist-types/components/input-file/translations/ru-RU.d.ts.map +1 -0
  165. package/dist-types/components/input-file/translations/ru.d.ts +13 -0
  166. package/dist-types/components/input-file/translations/ru.d.ts.map +1 -0
  167. package/dist-types/components/input-file/translations/sk-SK.d.ts +13 -0
  168. package/dist-types/components/input-file/translations/sk-SK.d.ts.map +1 -0
  169. package/dist-types/components/input-file/translations/sk.d.ts +13 -0
  170. package/dist-types/components/input-file/translations/sk.d.ts.map +1 -0
  171. package/dist-types/components/input-file/translations/uk-UA.d.ts +13 -0
  172. package/dist-types/components/input-file/translations/uk-UA.d.ts.map +1 -0
  173. package/dist-types/components/input-file/translations/uk.d.ts +13 -0
  174. package/dist-types/components/input-file/translations/uk.d.ts.map +1 -0
  175. package/dist-types/components/input-file/translations/zh-CN.d.ts +13 -0
  176. package/dist-types/components/input-file/translations/zh-CN.d.ts.map +1 -0
  177. package/dist-types/components/input-file/translations/zh.d.ts +13 -0
  178. package/dist-types/components/input-file/translations/zh.d.ts.map +1 -0
  179. package/dist-types/components/input-stepper/src/LionInputStepper.d.ts +6 -0
  180. package/dist-types/components/input-stepper/src/LionInputStepper.d.ts.map +1 -1
  181. package/dist-types/components/input-tel-dropdown/src/LionInputTelDropdown.d.ts +0 -1
  182. package/dist-types/components/input-tel-dropdown/src/LionInputTelDropdown.d.ts.map +1 -1
  183. package/dist-types/components/localize/src/number/parseNumber.d.ts.map +1 -1
  184. package/dist-types/exports/define/lion-input-file.d.ts +2 -0
  185. package/dist-types/exports/define/lion-input-file.d.ts.map +1 -0
  186. package/dist-types/exports/define/lion-selected-file-list.d.ts +2 -0
  187. package/dist-types/exports/define/lion-selected-file-list.d.ts.map +1 -0
  188. package/dist-types/exports/input-file.d.ts +4 -0
  189. package/dist-types/exports/input-file.d.ts.map +1 -0
  190. package/dist-types/tsconfig.tsbuildinfo +1 -1
  191. package/docs/components/button/extensions/bootstrap-button.mjs +240 -0
  192. package/docs/components/button/extensions.md +30 -0
  193. package/docs/components/checkbox-group/overview.md +2 -2
  194. package/docs/components/collapsible/overview.md +1 -1
  195. package/docs/components/combobox/{examples.md β†’ extensions.md} +51 -43
  196. package/docs/components/combobox/overview.md +1 -1
  197. package/docs/components/combobox/src/google-combobox/google-combobox.js +4 -1
  198. package/docs/components/combobox/src/md-combobox/md-combobox.js +40 -38
  199. package/docs/components/combobox/src/wa-combobox/wa-combobox.js +204 -209
  200. package/docs/components/combobox/use-cases.md +1 -1
  201. package/docs/components/dialog/overview.md +1 -1
  202. package/docs/components/fieldset/overview.md +5 -5
  203. package/docs/components/form/overview.md +3 -3
  204. package/docs/components/icon/use-cases.md +1 -1
  205. package/docs/components/input/overview.md +1 -1
  206. package/docs/components/input-amount/overview.md +3 -3
  207. package/docs/components/input-amount/use-cases.md +4 -2
  208. package/docs/components/input-date/overview.md +3 -3
  209. package/docs/components/input-datepicker/overview.md +5 -5
  210. package/docs/components/input-datepicker/use-cases.md +11 -0
  211. package/docs/components/input-email/overview.md +2 -2
  212. package/docs/components/input-file/index.md +3 -0
  213. package/docs/components/input-file/overview.md +32 -0
  214. package/docs/components/input-file/use-cases.md +424 -0
  215. package/docs/components/input-iban/overview.md +2 -2
  216. package/docs/components/input-range/overview.md +2 -2
  217. package/docs/components/input-stepper/overview.md +1 -1
  218. package/docs/components/input-tel/overview.md +1 -1
  219. package/docs/components/input-tel/use-cases.md +6 -6
  220. package/docs/components/input-tel-dropdown/{examples.md β†’ extensions.md} +1 -1
  221. package/docs/components/input-tel-dropdown/overview.md +1 -1
  222. package/docs/components/radio-group/overview.md +3 -3
  223. package/docs/components/select-rich/use-cases.md +1 -1
  224. package/docs/components/tabs/examples.md +1 -1
  225. package/docs/fundamentals/index.md +4 -4
  226. package/docs/fundamentals/node-tools/providence-analytics/LocalConfiguration.md +1 -1
  227. package/docs/fundamentals/node-tools/providence-analytics/QueryResult.md +1 -1
  228. package/docs/fundamentals/node-tools/providence-analytics/analyzer.md +1 -1
  229. package/docs/fundamentals/node-tools/providence-analytics/dashboard.md +1 -1
  230. package/docs/fundamentals/node-tools/providence-analytics/overview.md +3 -3
  231. package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
  232. package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
  233. package/docs/fundamentals/rationales/accessibility.md +28 -0
  234. package/docs/fundamentals/systems/core/SlotMixin.md +148 -0
  235. package/docs/fundamentals/systems/core/overview.md +1 -1
  236. package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
  237. package/docs/fundamentals/systems/form/model-value.md +1 -1
  238. package/docs/fundamentals/systems/form/overview.md +28 -28
  239. package/docs/fundamentals/systems/form/use-cases.md +2 -0
  240. package/docs/fundamentals/systems/form/validate.md +1 -1
  241. package/docs/fundamentals/systems/localize/overview.md +4 -4
  242. package/docs/fundamentals/systems/overlays/_configuration-positioning.md +116 -0
  243. package/docs/fundamentals/systems/overlays/_edge-cases.md +145 -0
  244. package/docs/fundamentals/systems/overlays/configuration.md +2 -2
  245. package/docs/fundamentals/systems/overlays/overview.md +5 -5
  246. package/docs/fundamentals/systems/overlays/use-cases.md +2 -2
  247. package/docs/fundamentals/tools/helpers/overview.md +1 -1
  248. package/docs/fundamentals/tools/singleton-manager/example-complex/index.md +21 -0
  249. package/docs/fundamentals/tools/singleton-manager/example-fail/index.md +19 -0
  250. package/docs/fundamentals/tools/singleton-manager/example-success/index.md +18 -0
  251. package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
  252. package/docs/guides/how-to/create-a-custom-field.md +5 -5
  253. package/docs/guides/how-to/create-a-form.md +88 -0
  254. package/docs/guides/how-to/extend-a-native-input.md +2 -2
  255. package/docs/guides/index.md +8 -8
  256. package/docs/guides/principles/index.md +5 -5
  257. package/docs/guides/principles/styling.md +1 -1
  258. package/exports/define/lion-input-file.js +3 -0
  259. package/exports/define/lion-selected-file-list.js +3 -0
  260. package/exports/input-file.js +3 -0
  261. package/package.json +3 -2
  262. package/docs/components/combobox/src/google-combobox/assets/googlelogo_color_272x92dp.png +0 -0
  263. package/docs/components/dialog/src/demo-dialog-style.js +0 -3
  264. package/docs/components/select-rich/src/flags.png +0 -0
  265. package/docs/components/select-rich/src/flags@2x.png +0 -0
  266. package/docs/fundamentals/systems/form/assets/FormatMixinDiagram-1.svg +0 -1
  267. package/docs/fundamentals/systems/form/assets/FormatMixinDiagram-2.svg +0 -1
  268. package/docs/fundamentals/systems/form/assets/FormatMixinDiagram-3.svg +0 -84
  269. package/docs/fundamentals/tools/ajax/assets/naga.json +0 -9
  270. package/docs/fundamentals/tools/ajax/assets/pabu.json +0 -9
  271. package/docs/fundamentals/tools/singleton-manager/.gitignore +0 -1
  272. package/docs/override.js +0 -15
@@ -0,0 +1,240 @@
1
+ import { LionButton } from '@lion/ui/button.js';
2
+ import { css } from 'lit';
3
+
4
+ /**
5
+ * @typedef {import('./BootstrapButtonTypes.js').BootstrapButtonVariant} BootstrapButtonVariant
6
+ */
7
+
8
+ export class BootstrapButton extends LionButton {
9
+ /** @type {any} */
10
+ static properties = {
11
+ variant: { type: String, reflect: true },
12
+ };
13
+
14
+ static styles = [
15
+ ...super.styles,
16
+ css`
17
+ :host {
18
+ --bs-border-radius: 0.375rem;
19
+ --bs-border-width: 1px;
20
+
21
+ --bs-btn-font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
22
+ 'Noto Sans', 'Liberation Sans', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
23
+ 'Segoe UI Symbol', 'Noto Color Emoji';
24
+ margin: 0.25rem 0.125rem;
25
+
26
+ --bs-btn-padding-x: 0.75rem;
27
+ --bs-btn-padding-y: 0.375rem;
28
+ --bs-btn-font-size: 1rem;
29
+ --bs-btn-font-weight: 400;
30
+ --bs-btn-line-height: 1.5;
31
+ --bs-btn-color: var(--bs-body-color);
32
+ --bs-btn-bg: transparent;
33
+ --bs-btn-border-width: var(--bs-border-width);
34
+ --bs-btn-border-color: transparent;
35
+ --bs-btn-border-radius: var(--bs-border-radius);
36
+ --bs-btn-hover-border-color: transparent;
37
+ --bs-btn-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
38
+ --bs-btn-disabled-opacity: 0.65;
39
+ --bs-btn-focus-box-shadow: 0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), 0.5);
40
+ display: inline-block;
41
+ padding: var(--bs-btn-padding-y) var(--bs-btn-padding-x);
42
+ font-family: var(--bs-btn-font-family);
43
+ font-size: var(--bs-btn-font-size);
44
+ font-weight: var(--bs-btn-font-weight);
45
+ line-height: var(--bs-btn-line-height);
46
+ color: var(--bs-btn-color);
47
+ text-align: center;
48
+ text-decoration: none;
49
+ vertical-align: middle;
50
+ cursor: pointer;
51
+ -webkit-user-select: none;
52
+ -moz-user-select: none;
53
+ user-select: none;
54
+ border: var(--bs-btn-border-width) solid var(--bs-btn-border-color);
55
+ border-radius: var(--bs-btn-border-radius);
56
+ background-color: var(--bs-btn-bg);
57
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
58
+ border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
59
+ text-transform: none;
60
+ }
61
+
62
+ :host(:not([disabled])) {
63
+ cursor: pointer;
64
+ }
65
+
66
+ :host(:hover) {
67
+ color: var(--bs-btn-hover-color);
68
+ background-color: var(--bs-btn-hover-bg);
69
+ border-color: var(--bs-btn-hover-border-color);
70
+ }
71
+
72
+ :host(:active),
73
+ :host([active]) {
74
+ color: var(--bs-btn-active-color);
75
+ background-color: var(--bs-btn-active-bg);
76
+ border-color: var(--bs-btn-active-border-color);
77
+ }
78
+
79
+ :host([variant='primary']) {
80
+ --bs-btn-color: #fff;
81
+ --bs-btn-bg: #0d6efd;
82
+ --bs-btn-border-color: #0d6efd;
83
+ --bs-btn-hover-color: #fff;
84
+ --bs-btn-hover-bg: #0b5ed7;
85
+ --bs-btn-hover-border-color: #0a58ca;
86
+ --bs-btn-focus-shadow-rgb: 49, 132, 253;
87
+ --bs-btn-active-color: #fff;
88
+ --bs-btn-active-bg: #0a58ca;
89
+ --bs-btn-active-border-color: #0a53be;
90
+ --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
91
+ --bs-btn-disabled-color: #fff;
92
+ --bs-btn-disabled-bg: #0d6efd;
93
+ --bs-btn-disabled-border-color: #0d6efd;
94
+ }
95
+
96
+ :host([variant='secondary']) {
97
+ --bs-btn-color: #fff;
98
+ --bs-btn-bg: #6c757d;
99
+ --bs-btn-border-color: #6c757d;
100
+ --bs-btn-hover-color: #fff;
101
+ --bs-btn-hover-bg: #5c636a;
102
+ --bs-btn-hover-border-color: #565e64;
103
+ --bs-btn-focus-shadow-rgb: 130, 138, 145;
104
+ --bs-btn-active-color: #fff;
105
+ --bs-btn-active-bg: #565e64;
106
+ --bs-btn-active-border-color: #51585e;
107
+ --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
108
+ --bs-btn-disabled-color: #fff;
109
+ --bs-btn-disabled-bg: #6c757d;
110
+ --bs-btn-disabled-border-color: #6c757d;
111
+ }
112
+
113
+ :host([variant='success']) {
114
+ --bs-btn-color: #fff;
115
+ --bs-btn-bg: #198754;
116
+ --bs-btn-border-color: #198754;
117
+ --bs-btn-hover-color: #fff;
118
+ --bs-btn-hover-bg: #157347;
119
+ --bs-btn-hover-border-color: #146c43;
120
+ --bs-btn-focus-shadow-rgb: 60, 153, 110;
121
+ --bs-btn-active-color: #fff;
122
+ --bs-btn-active-bg: #146c43;
123
+ --bs-btn-active-border-color: #13653f;
124
+ --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
125
+ --bs-btn-disabled-color: #fff;
126
+ --bs-btn-disabled-bg: #198754;
127
+ --bs-btn-disabled-border-color: #198754;
128
+ }
129
+
130
+ :host([variant='danger']) {
131
+ --bs-btn-color: #fff;
132
+ --bs-btn-bg: #dc3545;
133
+ --bs-btn-border-color: #dc3545;
134
+ --bs-btn-hover-color: #fff;
135
+ --bs-btn-hover-bg: #bb2d3b;
136
+ --bs-btn-hover-border-color: #b02a37;
137
+ --bs-btn-focus-shadow-rgb: 225, 83, 97;
138
+ --bs-btn-active-color: #fff;
139
+ --bs-btn-active-bg: #b02a37;
140
+ --bs-btn-active-border-color: #a52834;
141
+ --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
142
+ --bs-btn-disabled-color: #fff;
143
+ --bs-btn-disabled-bg: #dc3545;
144
+ --bs-btn-disabled-border-color: #dc3545;
145
+ }
146
+
147
+ :host([variant='warning']) {
148
+ --bs-btn-color: #000;
149
+ --bs-btn-bg: #ffc107;
150
+ --bs-btn-border-color: #ffc107;
151
+ --bs-btn-hover-color: #000;
152
+ --bs-btn-hover-bg: #ffca2c;
153
+ --bs-btn-hover-border-color: #ffc720;
154
+ --bs-btn-focus-shadow-rgb: 217, 164, 6;
155
+ --bs-btn-active-color: #000;
156
+ --bs-btn-active-bg: #ffcd39;
157
+ --bs-btn-active-border-color: #ffc720;
158
+ --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
159
+ --bs-btn-disabled-color: #000;
160
+ --bs-btn-disabled-bg: #ffc107;
161
+ --bs-btn-disabled-border-color: #ffc107;
162
+ }
163
+
164
+ :host([variant='info']) {
165
+ --bs-btn-color: #000;
166
+ --bs-btn-bg: #0dcaf0;
167
+ --bs-btn-border-color: #0dcaf0;
168
+ --bs-btn-hover-color: #000;
169
+ --bs-btn-hover-bg: #31d2f2;
170
+ --bs-btn-hover-border-color: #25cff2;
171
+ --bs-btn-focus-shadow-rgb: 11, 172, 204;
172
+ --bs-btn-active-color: #000;
173
+ --bs-btn-active-bg: #3dd5f3;
174
+ --bs-btn-active-border-color: #25cff2;
175
+ --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
176
+ --bs-btn-disabled-color: #000;
177
+ --bs-btn-disabled-bg: #0dcaf0;
178
+ --bs-btn-disabled-border-color: #0dcaf0;
179
+ }
180
+
181
+ :host([variant='light']) {
182
+ --bs-btn-color: #000;
183
+ --bs-btn-bg: #f8f9fa;
184
+ --bs-btn-border-color: #f8f9fa;
185
+ --bs-btn-hover-color: #000;
186
+ --bs-btn-hover-bg: #d3d4d5;
187
+ --bs-btn-hover-border-color: #c6c7c8;
188
+ --bs-btn-focus-shadow-rgb: 211, 212, 213;
189
+ --bs-btn-active-color: #000;
190
+ --bs-btn-active-bg: #c6c7c8;
191
+ --bs-btn-active-border-color: #babbbc;
192
+ --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
193
+ --bs-btn-disabled-color: #000;
194
+ --bs-btn-disabled-bg: #f8f9fa;
195
+ --bs-btn-disabled-border-color: #f8f9fa;
196
+ }
197
+
198
+ :host([variant='dark']) {
199
+ --bs-btn-color: #fff;
200
+ --bs-btn-bg: #212529;
201
+ --bs-btn-border-color: #212529;
202
+ --bs-btn-hover-color: #fff;
203
+ --bs-btn-hover-bg: #424649;
204
+ --bs-btn-hover-border-color: #373b3e;
205
+ --bs-btn-focus-shadow-rgb: 66, 70, 73;
206
+ --bs-btn-active-color: #fff;
207
+ --bs-btn-active-bg: #4d5154;
208
+ --bs-btn-active-border-color: #373b3e;
209
+ --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
210
+ --bs-btn-disabled-color: #fff;
211
+ --bs-btn-disabled-bg: #212529;
212
+ --bs-btn-disabled-border-color: #212529;
213
+ }
214
+
215
+ :host([variant='link']) {
216
+ --bs-btn-font-weight: 400;
217
+ --bs-btn-color: var(--bs-link-color);
218
+ --bs-btn-bg: transparent;
219
+ --bs-btn-border-color: transparent;
220
+ --bs-btn-hover-color: var(--bs-link-hover-color);
221
+ --bs-btn-hover-border-color: transparent;
222
+ --bs-btn-active-color: var(--bs-link-hover-color);
223
+ --bs-btn-active-border-color: transparent;
224
+ --bs-btn-disabled-color: #6c757d;
225
+ --bs-btn-disabled-border-color: transparent;
226
+ --bs-btn-box-shadow: 0 0 0 #000;
227
+ --bs-btn-focus-shadow-rgb: 49, 132, 253;
228
+ text-decoration: underline;
229
+ }
230
+ `,
231
+ ];
232
+
233
+ constructor() {
234
+ super();
235
+
236
+ /** @type {BootstrapButtonVariant} */
237
+ this.variant = 'primary';
238
+ }
239
+ }
240
+ customElements.define('bootstrap-button', BootstrapButton);
@@ -0,0 +1,30 @@
1
+ # Button >> Extensions ||90
2
+
3
+ ```js script
4
+ import { html } from '@mdjs/mdjs-preview';
5
+ import './extensions/bootstrap-button.mjs';
6
+ ```
7
+
8
+ ## Bootstrap button
9
+
10
+ ```js preview-story
11
+ const capitalize = s => s[0].toUpperCase() + s.slice(1);
12
+
13
+ export const bootstrapButton = () => {
14
+ const variants = [
15
+ 'primary',
16
+ 'secondary',
17
+ 'success',
18
+ 'danger',
19
+ 'warning',
20
+ 'info',
21
+ 'light',
22
+ 'dark',
23
+ 'link',
24
+ ];
25
+
26
+ return html`<div>
27
+ ${variants.map(v => html`<bootstrap-button variant="${v}">${capitalize(v)}</bootstrap-button>`)}
28
+ </div>`;
29
+ };
30
+ ```
@@ -21,11 +21,11 @@ export const main = () => html`
21
21
  `;
22
22
  ```
23
23
 
24
- > Make sure that the checkbox-group also has a name attribute, this is necessary for our [form](https://github.com/ing-bank/lion/blob/7b2a234c6c05397bc2e2e944c5efbdea08d09d2b/docs/components/form/overview.md)'s serialization result.
24
+ > Make sure that the checkbox-group also has a name attribute, this is necessary for our [form](https://github.com/ing-bank/lion/blob/951de3e9b282ce8b8797f9aae890f125f96ee5ce/docs/components/form/overview.md)'s serialization result.
25
25
 
26
26
  ## Features
27
27
 
28
- Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/7b2a234c6c05397bc2e2e944c5efbdea08d09d2b/docs/components/fieldset/overview.md),
28
+ Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/951de3e9b282ce8b8797f9aae890f125f96ee5ce/docs/components/fieldset/overview.md),
29
29
  it has all the features a fieldset has.
30
30
 
31
31
  ## Installation
@@ -22,7 +22,7 @@ export const main = () => html`
22
22
  ## Features
23
23
 
24
24
  - Use `opened` attribute or `toggle()` method to render default open.
25
- - `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/7b2a234c6c05397bc2e2e944c5efbdea08d09d2b/docs/components/button/overview.md) or native `button` with custom styling.
25
+ - `invoker` slot can be custom template e.g. our [button](https://github.com/ing-bank/lion/blob/951de3e9b282ce8b8797f9aae890f125f96ee5ce/docs/components/button/overview.md) or native `button` with custom styling.
26
26
  - Observe the state with the help of `@opened-changed` event.
27
27
  - `show()` and `hide()` are helper methods to hide or show the content from outside.
28
28
 
@@ -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/7b2a234c6c05397bc2e2e944c5efbdea08d09d2b/docs/components/combobox/examples.md)
36
+ [...show more](https://github.com/ing-bank/lion/blob/951de3e9b282ce8b8797f9aae890f125f96ee5ce/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);