@lion/ui 0.0.2 → 0.0.4

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 (319) hide show
  1. package/components/core/src/SlotMixin.js +180 -42
  2. package/components/core/test/SlotMixin.test.js +355 -145
  3. package/components/core/types/SlotMixinTypes.ts +12 -1
  4. package/components/input-tel/src/LionInputTel.js +0 -9
  5. package/components/input-tel-dropdown/src/LionInputTelDropdown.js +32 -29
  6. package/components/input-tel-dropdown/test-suites/LionInputTelDropdown.suite.js +5 -6
  7. package/components/localize/src/number/parseNumber.js +15 -36
  8. package/components/localize/test/number/parseNumber.test.js +3 -12
  9. package/components/localize/types/LocalizeMixinTypes.ts +1 -1
  10. package/custom-elements.json +1435 -133
  11. package/dist-types/components/calendar/src/LionCalendar.d.ts +1 -37
  12. package/dist-types/components/calendar/src/LionCalendar.d.ts.map +1 -1
  13. package/dist-types/components/core/src/SlotMixin.d.ts +2 -0
  14. package/dist-types/components/core/src/SlotMixin.d.ts.map +1 -1
  15. package/dist-types/components/core/test/SlotMixin.test.d.ts +1 -1
  16. package/dist-types/components/core/test/SlotMixin.test.d.ts.map +1 -1
  17. package/dist-types/components/core/types/SlotMixinTypes.d.ts +9 -1
  18. package/dist-types/components/core/types/SlotMixinTypes.d.ts.map +1 -1
  19. package/dist-types/components/input-amount/src/LionInputAmount.d.ts +1 -37
  20. package/dist-types/components/input-amount/src/LionInputAmount.d.ts.map +1 -1
  21. package/dist-types/components/input-date/src/LionInputDate.d.ts +1 -37
  22. package/dist-types/components/input-date/src/LionInputDate.d.ts.map +1 -1
  23. package/dist-types/components/input-datepicker/src/LionCalendarOverlayFrame.d.ts +1 -37
  24. package/dist-types/components/input-datepicker/src/LionCalendarOverlayFrame.d.ts.map +1 -1
  25. package/dist-types/components/input-email/src/LionInputEmail.d.ts +1 -37
  26. package/dist-types/components/input-email/src/LionInputEmail.d.ts.map +1 -1
  27. package/dist-types/components/input-iban/src/LionInputIban.d.ts +1 -37
  28. package/dist-types/components/input-iban/src/LionInputIban.d.ts.map +1 -1
  29. package/dist-types/components/input-tel/src/LionInputTel.d.ts +1 -42
  30. package/dist-types/components/input-tel/src/LionInputTel.d.ts.map +1 -1
  31. package/dist-types/components/input-tel-dropdown/src/LionInputTelDropdown.d.ts +14 -8
  32. package/dist-types/components/input-tel-dropdown/src/LionInputTelDropdown.d.ts.map +1 -1
  33. package/dist-types/components/input-tel-dropdown/test-suites/LionInputTelDropdown.suite.d.ts.map +1 -1
  34. package/dist-types/components/localize/src/LocalizeMixin.d.ts +1 -37
  35. package/dist-types/components/localize/src/LocalizeMixin.d.ts.map +1 -1
  36. package/dist-types/components/localize/src/number/parseNumber.d.ts.map +1 -1
  37. package/dist-types/components/localize/types/LocalizeMixinTypes.d.ts +1 -1
  38. package/dist-types/components/localize/types/LocalizeMixinTypes.d.ts.map +1 -1
  39. package/dist-types/components/pagination/src/LionPagination.d.ts +1 -37
  40. package/dist-types/components/pagination/src/LionPagination.d.ts.map +1 -1
  41. package/dist-types/components/progress-indicator/src/LionProgressIndicator.d.ts +1 -37
  42. package/dist-types/components/progress-indicator/src/LionProgressIndicator.d.ts.map +1 -1
  43. package/dist-types/exports/core.d.ts +1 -0
  44. package/dist-types/exports/core.d.ts.map +1 -1
  45. package/dist-types/exports/form-core.d.ts +2 -0
  46. package/dist-types/exports/form-core.d.ts.map +1 -1
  47. package/dist-types/exports/input-tel-dropdown.d.ts +2 -0
  48. package/dist-types/exports/input-tel-dropdown.d.ts.map +1 -1
  49. package/dist-types/exports/input-tel.d.ts +1 -0
  50. package/dist-types/exports/input-tel.d.ts.map +1 -1
  51. package/dist-types/exports/localize.d.ts +3 -0
  52. package/dist-types/exports/localize.d.ts.map +1 -1
  53. package/dist-types/exports/overlays.d.ts +4 -0
  54. package/dist-types/exports/overlays.d.ts.map +1 -1
  55. package/dist-types/tsconfig.tsbuildinfo +1 -1
  56. package/docs/components/accordion/index.md +3 -0
  57. package/docs/components/accordion/overview.md +129 -0
  58. package/docs/components/accordion/reference.md +47 -0
  59. package/docs/components/accordion/use-cases.md +252 -0
  60. package/docs/components/button/examples.md +30 -0
  61. package/docs/components/button/index.md +3 -0
  62. package/docs/components/button/overview.md +30 -0
  63. package/docs/components/button/src/icon.svg.js +5 -0
  64. package/docs/components/button/use-cases.md +106 -0
  65. package/docs/components/calendar/index.md +3 -0
  66. package/docs/components/calendar/overview.md +49 -0
  67. package/docs/components/calendar/use-cases.md +192 -0
  68. package/docs/components/checkbox-group/index.md +3 -0
  69. package/docs/components/checkbox-group/overview.md +40 -0
  70. package/docs/components/checkbox-group/use-cases.md +256 -0
  71. package/docs/components/collapsible/assets/CustomCollapsible.js +113 -0
  72. package/docs/components/collapsible/assets/applyDemoCollapsibleStyles.js +37 -0
  73. package/docs/components/collapsible/examples.md +83 -0
  74. package/docs/components/collapsible/index.md +3 -0
  75. package/docs/components/collapsible/overview.md +39 -0
  76. package/docs/components/collapsible/use-cases.md +79 -0
  77. package/docs/components/combobox/examples.md +153 -0
  78. package/docs/components/combobox/index.md +3 -0
  79. package/docs/components/combobox/overview.md +51 -0
  80. package/docs/components/combobox/src/LinkMixin.js +60 -0
  81. package/docs/components/combobox/src/demo-selection-display.js +191 -0
  82. package/docs/components/combobox/src/gh-combobox/gh-button.js +69 -0
  83. package/docs/components/combobox/src/gh-combobox/gh-combobox.js +508 -0
  84. package/docs/components/combobox/src/google-combobox/assets/google-clear-icon.js +9 -0
  85. package/docs/components/combobox/src/google-combobox/assets/google-search-icon.js +9 -0
  86. package/docs/components/combobox/src/google-combobox/assets/google-voice-search-icon.js +19 -0
  87. package/docs/components/combobox/src/google-combobox/assets/googlelogo_color_272x92dp.png +0 -0
  88. package/docs/components/combobox/src/google-combobox/google-combobox.js +460 -0
  89. package/docs/components/combobox/src/lazyRender.js +29 -0
  90. package/docs/components/combobox/src/levenshtein.js +95 -0
  91. package/docs/components/combobox/src/md-combobox/MdFieldMixin.js +341 -0
  92. package/docs/components/combobox/src/md-combobox/md-combobox.js +89 -0
  93. package/docs/components/combobox/src/md-combobox/md-input.js +5 -0
  94. package/docs/components/combobox/src/md-combobox/style/load-roboto.js +6 -0
  95. package/docs/components/combobox/src/md-combobox/style/md-ripple.js +81 -0
  96. package/docs/components/combobox/src/wa-combobox/wa-combobox.js +368 -0
  97. package/docs/components/combobox/use-cases.md +377 -0
  98. package/docs/components/dialog/index.md +3 -0
  99. package/docs/components/dialog/overview.md +63 -0
  100. package/docs/components/dialog/src/demo-dialog-style.js +3 -0
  101. package/docs/components/dialog/src/demoStyle.js +39 -0
  102. package/docs/components/dialog/src/slots-dialog-content.js +32 -0
  103. package/docs/components/dialog/src/styled-dialog-content.js +38 -0
  104. package/docs/components/dialog/use-cases.md +154 -0
  105. package/docs/components/drawer/index.md +3 -0
  106. package/docs/components/drawer/overview.md +68 -0
  107. package/docs/components/drawer/src/demoStyle.js +71 -0
  108. package/docs/components/drawer/use-cases.md +194 -0
  109. package/docs/components/fieldset/index.md +3 -0
  110. package/docs/components/fieldset/overview.md +49 -0
  111. package/docs/components/fieldset/use-cases.md +185 -0
  112. package/docs/components/form/index.md +3 -0
  113. package/docs/components/form/overview.md +43 -0
  114. package/docs/components/form/use-cases.md +72 -0
  115. package/docs/components/icon/assets/bugs/bug01.svg.js +2 -0
  116. package/docs/components/icon/assets/bugs/bug02.svg.js +2 -0
  117. package/docs/components/icon/assets/bugs/bug05.svg.js +2 -0
  118. package/docs/components/icon/assets/bugs/bug06.svg.js +2 -0
  119. package/docs/components/icon/assets/bugs/bug08.svg.js +2 -0
  120. package/docs/components/icon/assets/bugs/bug12.svg.js +2 -0
  121. package/docs/components/icon/assets/bugs/bug19.svg.js +2 -0
  122. package/docs/components/icon/assets/bugs/bug23.svg.js +2 -0
  123. package/docs/components/icon/assets/bugs/bug24.svg.js +2 -0
  124. package/docs/components/icon/assets/iconset-bugs.js +11 -0
  125. package/docs/components/icon/assets/iconset-misc.js +3 -0
  126. package/docs/components/icon/assets/iconset-space.js +31 -0
  127. package/docs/components/icon/assets/misc/arrowLeft.svg.js +6 -0
  128. package/docs/components/icon/assets/space/aliens-spaceship.svg.js +2 -0
  129. package/docs/components/icon/assets/space/meteor.svg.js +2 -0
  130. package/docs/components/icon/assets/space/moon-flag.svg.js +2 -0
  131. package/docs/components/icon/assets/space/moon.svg.js +2 -0
  132. package/docs/components/icon/assets/space/night.svg.js +2 -0
  133. package/docs/components/icon/assets/space/orbit.svg.js +2 -0
  134. package/docs/components/icon/assets/space/planet.svg.js +2 -0
  135. package/docs/components/icon/assets/space/robot.svg.js +2 -0
  136. package/docs/components/icon/assets/space/rocket.svg.js +2 -0
  137. package/docs/components/icon/assets/space/satellite.svg.js +2 -0
  138. package/docs/components/icon/assets/space/signal.svg.js +2 -0
  139. package/docs/components/icon/assets/space/space-helmet.svg.js +2 -0
  140. package/docs/components/icon/assets/space/sun.svg.js +2 -0
  141. package/docs/components/icon/assets/space/telescope.svg.js +2 -0
  142. package/docs/components/icon/index.md +3 -0
  143. package/docs/components/icon/overview.md +40 -0
  144. package/docs/components/icon/use-cases.md +93 -0
  145. package/docs/components/index.md +7 -0
  146. package/docs/components/input/index.md +3 -0
  147. package/docs/components/input/overview.md +36 -0
  148. package/docs/components/input/use-cases.md +77 -0
  149. package/docs/components/input-amount/index.md +3 -0
  150. package/docs/components/input-amount/overview.md +49 -0
  151. package/docs/components/input-amount/use-cases.md +122 -0
  152. package/docs/components/input-date/index.md +3 -0
  153. package/docs/components/input-date/overview.md +39 -0
  154. package/docs/components/input-date/use-cases.md +83 -0
  155. package/docs/components/input-datepicker/index.md +3 -0
  156. package/docs/components/input-datepicker/overview.md +42 -0
  157. package/docs/components/input-datepicker/use-cases.md +78 -0
  158. package/docs/components/input-email/index.md +3 -0
  159. package/docs/components/input-email/overview.md +32 -0
  160. package/docs/components/input-email/use-cases.md +48 -0
  161. package/docs/components/input-iban/index.md +3 -0
  162. package/docs/components/input-iban/overview.md +37 -0
  163. package/docs/components/input-iban/use-cases.md +102 -0
  164. package/docs/components/input-range/index.md +3 -0
  165. package/docs/components/input-range/overview.md +34 -0
  166. package/docs/components/input-range/use-cases.md +108 -0
  167. package/docs/components/input-stepper/index.md +3 -0
  168. package/docs/components/input-stepper/overview.md +36 -0
  169. package/docs/components/input-stepper/use-cases.md +41 -0
  170. package/docs/components/input-tel/index.md +3 -0
  171. package/docs/components/input-tel/overview.md +62 -0
  172. package/docs/components/input-tel/src/h-region-code-table.js +109 -0
  173. package/docs/components/input-tel/use-cases.md +307 -0
  174. package/docs/components/input-tel-dropdown/examples.md +32 -0
  175. package/docs/components/input-tel-dropdown/index.md +3 -0
  176. package/docs/components/input-tel-dropdown/overview.md +38 -0
  177. package/docs/components/input-tel-dropdown/src/intl-input-tel-dropdown.js +127 -0
  178. package/docs/components/input-tel-dropdown/use-cases.md +159 -0
  179. package/docs/components/listbox/index.md +3 -0
  180. package/docs/components/listbox/overview.md +42 -0
  181. package/docs/components/listbox/src/listboxData.js +65 -0
  182. package/docs/components/listbox/use-cases.md +147 -0
  183. package/docs/components/pagination/index.md +3 -0
  184. package/docs/components/pagination/overview.md +29 -0
  185. package/docs/components/pagination/use-cases.md +99 -0
  186. package/docs/components/progress-indicator/assets/my-determinate-progress-bar.js +30 -0
  187. package/docs/components/progress-indicator/assets/my-indeterminate-progress-spinner.js +55 -0
  188. package/docs/components/progress-indicator/examples.md +125 -0
  189. package/docs/components/progress-indicator/index.md +3 -0
  190. package/docs/components/progress-indicator/overview.md +36 -0
  191. package/docs/components/radio-group/index.md +3 -0
  192. package/docs/components/radio-group/overview.md +46 -0
  193. package/docs/components/radio-group/use-cases.md +140 -0
  194. package/docs/components/select/index.md +3 -0
  195. package/docs/components/select/overview.md +44 -0
  196. package/docs/components/select/use-cases.md +55 -0
  197. package/docs/components/select-rich/examples.md +31 -0
  198. package/docs/components/select-rich/index.md +3 -0
  199. package/docs/components/select-rich/overview.md +46 -0
  200. package/docs/components/select-rich/src/flagStyles.js +1250 -0
  201. package/docs/components/select-rich/src/flags.png +0 -0
  202. package/docs/components/select-rich/src/flags@2x.png +0 -0
  203. package/docs/components/select-rich/src/intl-select-rich.js +194 -0
  204. package/docs/components/select-rich/src/regionMetaList.js +1717 -0
  205. package/docs/components/select-rich/use-cases.md +370 -0
  206. package/docs/components/steps/index.md +3 -0
  207. package/docs/components/steps/overview.md +63 -0
  208. package/docs/components/steps/use-cases.md +163 -0
  209. package/docs/components/switch/index.md +3 -0
  210. package/docs/components/switch/overview.md +75 -0
  211. package/docs/components/switch/reference.md +39 -0
  212. package/docs/components/switch/use-cases.md +76 -0
  213. package/docs/components/tabs/examples.md +23 -0
  214. package/docs/components/tabs/index.md +3 -0
  215. package/docs/components/tabs/overview.md +48 -0
  216. package/docs/components/tabs/src/lea-tab-panel.js +24 -0
  217. package/docs/components/tabs/src/lea-tab.js +45 -0
  218. package/docs/components/tabs/src/lea-tabs.js +28 -0
  219. package/docs/components/tabs/use-cases.md +219 -0
  220. package/docs/components/textarea/index.md +3 -0
  221. package/docs/components/textarea/overview.md +35 -0
  222. package/docs/components/textarea/use-cases.md +95 -0
  223. package/docs/components/tooltip/examples.md +39 -0
  224. package/docs/components/tooltip/index.md +3 -0
  225. package/docs/components/tooltip/overview.md +44 -0
  226. package/docs/components/tooltip/use-cases.md +208 -0
  227. package/docs/fundamentals/index.md +19 -0
  228. package/docs/fundamentals/node-tools/babel-plugin-extend-docs/index.md +1 -0
  229. package/docs/fundamentals/node-tools/babel-plugin-extend-docs/overview.md +233 -0
  230. package/docs/fundamentals/node-tools/index.md +1 -0
  231. package/docs/fundamentals/node-tools/providence-analytics/LocalConfiguration.md +68 -0
  232. package/docs/fundamentals/node-tools/providence-analytics/QueryResult.md +111 -0
  233. package/docs/fundamentals/node-tools/providence-analytics/analyzer.md +69 -0
  234. package/docs/fundamentals/node-tools/providence-analytics/assets/_mermaid.svg.js +1202 -0
  235. package/docs/fundamentals/node-tools/providence-analytics/dashboard.md +22 -0
  236. package/docs/fundamentals/node-tools/providence-analytics/index.md +1 -0
  237. package/docs/fundamentals/node-tools/providence-analytics/overview.md +192 -0
  238. package/docs/fundamentals/node-tools/publish-docs/index.md +1 -0
  239. package/docs/fundamentals/node-tools/publish-docs/overview.md +136 -0
  240. package/docs/fundamentals/node-tools/remark-extend/index.md +1 -0
  241. package/docs/fundamentals/node-tools/remark-extend/overview.md +274 -0
  242. package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/index.md +1 -0
  243. package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +285 -0
  244. package/docs/fundamentals/rationales/TypeScript.md +18 -0
  245. package/docs/fundamentals/rationales/index.md +1 -0
  246. package/docs/fundamentals/rationales/side-effects.md +203 -0
  247. package/docs/fundamentals/rationales/versioning.md +35 -0
  248. package/docs/fundamentals/systems/core/index.md +3 -0
  249. package/docs/fundamentals/systems/core/overview.md +85 -0
  250. package/docs/fundamentals/systems/form/assets/FormatMixinDiagram-1.svg +1 -0
  251. package/docs/fundamentals/systems/form/assets/FormatMixinDiagram-2.svg +1 -0
  252. package/docs/fundamentals/systems/form/assets/FormatMixinDiagram-3.svg +84 -0
  253. package/docs/fundamentals/systems/form/assets/h-output.js +155 -0
  254. package/docs/fundamentals/systems/form/formatting-and-parsing.md +245 -0
  255. package/docs/fundamentals/systems/form/index.md +3 -0
  256. package/docs/fundamentals/systems/form/interaction-states.md +177 -0
  257. package/docs/fundamentals/systems/form/model-value.md +35 -0
  258. package/docs/fundamentals/systems/form/overview.md +82 -0
  259. package/docs/fundamentals/systems/form/styling.md +101 -0
  260. package/docs/fundamentals/systems/form/use-cases.md +156 -0
  261. package/docs/fundamentals/systems/form/validate.md +929 -0
  262. package/docs/fundamentals/systems/icon/index.md +3 -0
  263. package/docs/fundamentals/systems/icon/overview.md +124 -0
  264. package/docs/fundamentals/systems/index.md +1 -0
  265. package/docs/fundamentals/systems/localize/assets/all-locales.js +437 -0
  266. package/docs/fundamentals/systems/localize/assets/en-AU.js +6 -0
  267. package/docs/fundamentals/systems/localize/assets/en-GB.js +6 -0
  268. package/docs/fundamentals/systems/localize/assets/en-US.js +6 -0
  269. package/docs/fundamentals/systems/localize/assets/en.js +4 -0
  270. package/docs/fundamentals/systems/localize/assets/nl-BE.js +6 -0
  271. package/docs/fundamentals/systems/localize/assets/nl-NL.js +6 -0
  272. package/docs/fundamentals/systems/localize/assets/nl.js +4 -0
  273. package/docs/fundamentals/systems/localize/dates.md +195 -0
  274. package/docs/fundamentals/systems/localize/index.md +3 -0
  275. package/docs/fundamentals/systems/localize/numbers.md +217 -0
  276. package/docs/fundamentals/systems/localize/overview.md +48 -0
  277. package/docs/fundamentals/systems/localize/rationale.md +62 -0
  278. package/docs/fundamentals/systems/localize/text.md +125 -0
  279. package/docs/fundamentals/systems/localize/use-cases.md +319 -0
  280. package/docs/fundamentals/systems/overlays/assets/applyDemoOverlayStyles.js +22 -0
  281. package/docs/fundamentals/systems/overlays/assets/demo-overlay-backdrop.js +48 -0
  282. package/docs/fundamentals/systems/overlays/assets/demo-overlay-system.js +42 -0
  283. package/docs/fundamentals/systems/overlays/assets/umbrella-form.js +133 -0
  284. package/docs/fundamentals/systems/overlays/configuration.md +453 -0
  285. package/docs/fundamentals/systems/overlays/form-integration.md +65 -0
  286. package/docs/fundamentals/systems/overlays/index.md +3 -0
  287. package/docs/fundamentals/systems/overlays/overview.md +118 -0
  288. package/docs/fundamentals/systems/overlays/rationale.md +232 -0
  289. package/docs/fundamentals/systems/overlays/scope.md +176 -0
  290. package/docs/fundamentals/systems/overlays/use-cases.md +699 -0
  291. package/docs/fundamentals/tools/ajax/assets/naga.json +9 -0
  292. package/docs/fundamentals/tools/ajax/assets/pabu.json +9 -0
  293. package/docs/fundamentals/tools/ajax/index.md +3 -0
  294. package/docs/fundamentals/tools/ajax/overview.md +128 -0
  295. package/docs/fundamentals/tools/ajax/use-cases.md +456 -0
  296. package/docs/fundamentals/tools/helpers/action-logger.md +165 -0
  297. package/docs/fundamentals/tools/helpers/index.md +3 -0
  298. package/docs/fundamentals/tools/helpers/overview.md +30 -0
  299. package/docs/fundamentals/tools/index.md +1 -0
  300. package/docs/fundamentals/tools/singleton-manager/index.md +3 -0
  301. package/docs/fundamentals/tools/singleton-manager/overview.md +304 -0
  302. package/docs/guides/how-to/create-a-custom-field.md +200 -0
  303. package/docs/guides/how-to/extend-a-native-input.md +66 -0
  304. package/docs/guides/how-to/get-started.md +77 -0
  305. package/docs/guides/how-to/index.md +1 -0
  306. package/docs/guides/index.md +34 -0
  307. package/docs/guides/principles/definitions-and-terms.md +41 -0
  308. package/docs/guides/principles/index.md +26 -0
  309. package/docs/guides/principles/scoped-elements.md +103 -0
  310. package/docs/guides/principles/styling.md +32 -0
  311. package/docs/guides/principles/subclasser-apis.md +28 -0
  312. package/docs/override.js +15 -0
  313. package/exports/core.js +2 -0
  314. package/exports/form-core.js +3 -0
  315. package/exports/input-tel-dropdown.js +3 -0
  316. package/exports/input-tel.js +2 -0
  317. package/exports/localize.js +4 -0
  318. package/exports/overlays.js +5 -0
  319. package/package.json +3 -2
@@ -0,0 +1,192 @@
1
+ # Calendar >> Use Cases ||20
2
+
3
+ ```js script
4
+ import { html, css } from '@mdjs/mdjs-preview';
5
+ import '@lion/ui/define/lion-calendar.js';
6
+ ```
7
+
8
+ ## Selected date
9
+
10
+ The `selectedDate` is the date which is currently marked as selected.
11
+ You usually select a date by clicking on it with the mouse or hitting Enter on the keyboard.
12
+
13
+ The `selectedDate` might not be within the dates in the current month view.
14
+
15
+ ```js preview-story
16
+ export const selectedDate = () => html`
17
+ <style>
18
+ .demo-calendar {
19
+ border: 1px solid #adadad;
20
+ box-shadow: 0 0 16px #ccc;
21
+ max-width: 500px;
22
+ }
23
+ </style>
24
+ <lion-calendar class="demo-calendar" .selectedDate=${new Date(1988, 2, 5)}></lion-calendar>
25
+ `;
26
+ ```
27
+
28
+ ## Central Date
29
+
30
+ The `centralDate` defines which day will be focused when keyboard moves the focus to the current month grid.
31
+ By default it is set to today, or the enabled day of the current month view that is closest to today's date.
32
+
33
+ The next and previous months' buttons work by changing the `centralDate` with plus or minus one month.
34
+ Changing the `centralDate` may mean a different view will be displayed to your users if it is in a different month.
35
+ Usually if you change only the day, "nothing" happens as it's already currently in view.
36
+
37
+ The `centralDate` can be different from `selectedDate` as you can have today as actively selected but still look at date that is years ago.
38
+ When the `selectedDate` changes, it will sync its value to the `centralDate`.
39
+
40
+ ```js preview-story
41
+ export const centralDate = () => {
42
+ const today = new Date();
43
+ const centralDate = new Date(today.getFullYear(), today.getMonth() + 1, today.getDate());
44
+ return html`
45
+ <style>
46
+ .demo-calendar {
47
+ border: 1px solid #adadad;
48
+ box-shadow: 0 0 16px #ccc;
49
+ max-width: 500px;
50
+ }
51
+ </style>
52
+ <lion-calendar class="demo-calendar" .centralDate="${centralDate}"></lion-calendar>
53
+ `;
54
+ };
55
+ ```
56
+
57
+ ## Controlling focus
58
+
59
+ You can control the focus by calling the following methods
60
+
61
+ - `focusCentralDate()`
62
+ - `focusSelectedDate()`
63
+ - `focusDate(dateInstanceToFocus)`
64
+
65
+ > Be aware that the central date changes when a new date is focused.
66
+
67
+ ```js preview-story
68
+ export const controllingFocus = () => {
69
+ const today = new Date();
70
+ const selectedDate = new Date(today.getFullYear(), today.getMonth(), today.getDate() + 1);
71
+ const centralDate = new Date(today.getFullYear(), today.getMonth(), today.getDate() - 5);
72
+ return html`
73
+ <style>
74
+ .demo-calendar {
75
+ border: 1px solid #adadad;
76
+ box-shadow: 0 0 16px #ccc;
77
+ max-width: 500px;
78
+ }
79
+ </style>
80
+ <lion-calendar
81
+ id="js-demo-calendar"
82
+ class="demo-calendar"
83
+ .selectedDate="${selectedDate}"
84
+ .centralDate="${centralDate}"
85
+ ></lion-calendar>
86
+ <button
87
+ @click="${e => e.target.parentElement.querySelector('#js-demo-calendar').focusCentralDate()}"
88
+ >
89
+ Set focus on: Central date
90
+ </button>
91
+ <button
92
+ @click="${e => e.target.parentElement.querySelector('#js-demo-calendar').focusSelectedDate()}"
93
+ >
94
+ Set focus on: Selected date
95
+ </button>
96
+ <button
97
+ @click="${e => e.target.parentElement.querySelector('#js-demo-calendar').focusDate(today)}"
98
+ >
99
+ Set focus on: Today
100
+ </button>
101
+ `;
102
+ };
103
+ ```
104
+
105
+ ## Limiting selectable values
106
+
107
+ ### Providing a lower limit
108
+
109
+ To give a lower limit you can bind a date to the `minDate` property.
110
+
111
+ ```js preview-story
112
+ export const providingLowerLimit = () => {
113
+ const minDate = new Date();
114
+ return html`
115
+ <style>
116
+ .demo-calendar {
117
+ border: 1px solid #adadad;
118
+ box-shadow: 0 0 16px #ccc;
119
+ max-width: 500px;
120
+ }
121
+ </style>
122
+ <lion-calendar class="demo-calendar" .minDate="${minDate}"></lion-calendar>
123
+ `;
124
+ };
125
+ ```
126
+
127
+ ### Provide a higher limit
128
+
129
+ To give a higher limit you can bind a date to the `maxDate` property. In this example, we show how to create an offset of + 2 days.
130
+
131
+ ```js preview-story
132
+ export const providingHigherLimit = () => {
133
+ const today = new Date();
134
+ const maxDate = new Date(today.getFullYear(), today.getMonth(), today.getDate() + 2);
135
+ return html`
136
+ <style>
137
+ .demo-calendar {
138
+ border: 1px solid #adadad;
139
+ box-shadow: 0 0 16px #ccc;
140
+ max-width: 500px;
141
+ }
142
+ </style>
143
+ <lion-calendar class="demo-calendar" .maxDate="${maxDate}"></lion-calendar>
144
+ `;
145
+ };
146
+ ```
147
+
148
+ ### Provide a list of disabled dates
149
+
150
+ In some cases a specific date or day of the week needs to be disabled, supply those days to the `disableDates` property.
151
+
152
+ ```js preview-story
153
+ export const disabledDates = () => html`
154
+ <style>
155
+ .demo-calendar {
156
+ border: 1px solid #adadad;
157
+ box-shadow: 0 0 16px #ccc;
158
+ max-width: 500px;
159
+ }
160
+ </style>
161
+ <lion-calendar
162
+ class="demo-calendar"
163
+ .disableDates=${day => day.getDay() === 6 || day.getDay() === 0}
164
+ ></lion-calendar>
165
+ `;
166
+ ```
167
+
168
+ ### Combined disable dates
169
+
170
+ To limit the scope of possible dates further, combine the methods mentioned above.
171
+
172
+ ```js preview-story
173
+ export const combinedDisabledDates = () => {
174
+ const today = new Date();
175
+ const maxDate = new Date(today.getFullYear(), today.getMonth() + 2, today.getDate());
176
+ return html`
177
+ <style>
178
+ .demo-calendar {
179
+ border: 1px solid #adadad;
180
+ box-shadow: 0 0 16px #ccc;
181
+ max-width: 500px;
182
+ }
183
+ </style>
184
+ <lion-calendar
185
+ class="demo-calendar"
186
+ .disableDates=${day => day.getDay() === 6 || day.getDay() === 0}
187
+ .minDate="${new Date()}"
188
+ .maxDate="${maxDate}"
189
+ ></lion-calendar>
190
+ `;
191
+ };
192
+ ```
@@ -0,0 +1,3 @@
1
+ # Checkbox Group ||10
2
+
3
+ -> go to Overview
@@ -0,0 +1,40 @@
1
+ # Checkbox Group >> Overview ||10
2
+
3
+ A checkbox group enhances the functionality of the native `<input type="checkbox">` element.
4
+ Its purpose is to provide a way for users to check **multiple** options amongst a set of choices, or to function as a single toggle.
5
+
6
+ > You should use our `checkbox` elements as children in checkbox group.
7
+
8
+ ```js script
9
+ import { html } from '@mdjs/mdjs-preview';
10
+ import '@lion/ui/define/lion-checkbox-group.js';
11
+ import '@lion/ui/define/lion-checkbox.js';
12
+ ```
13
+
14
+ ```js preview-story
15
+ export const main = () => html`
16
+ <lion-checkbox-group name="scientists[]" label="Favorite scientists">
17
+ <lion-checkbox label="Archimedes" .choiceValue=${'Archimedes'}></lion-checkbox>
18
+ <lion-checkbox label="Francis Bacon" .choiceValue=${'Francis Bacon'}></lion-checkbox>
19
+ <lion-checkbox label="Marie Curie" .choiceValue=${'Marie Curie'}></lion-checkbox>
20
+ </lion-checkbox-group>
21
+ `;
22
+ ```
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/edc6920a90aa7658358819e7c324daf6badf7d30/docs/components/form/overview.md)'s serialization result.
25
+
26
+ ## Features
27
+
28
+ Since it extends from our [fieldset](https://github.com/ing-bank/lion/blob/edc6920a90aa7658358819e7c324daf6badf7d30/docs/components/fieldset/overview.md),
29
+ it has all the features a fieldset has.
30
+
31
+ ## Installation
32
+
33
+ ```bash
34
+ npm i --save @lion/ui
35
+ ```
36
+
37
+ ```js
38
+ import '@lion/ui/define/lion-checkbox-group.js';
39
+ import '@lion/ui/define/lion-checkbox.js';
40
+ ```
@@ -0,0 +1,256 @@
1
+ # Checkbox Group >> Use Cases ||20
2
+
3
+ ```js script
4
+ import { html } from '@mdjs/mdjs-preview';
5
+ import '@lion/ui/define/lion-checkbox-group.js';
6
+ import '@lion/ui/define/lion-checkbox.js';
7
+ ```
8
+
9
+ ## Model value
10
+
11
+ The `modelValue` of a `lion-checkbox-group` is an array containing the `choiceValues` of the `lion-checkbox` elements that have been checked.
12
+
13
+ Given the scientists example above, say that we were to select the first and last options
14
+ (Archimedes & Marie Curie).
15
+
16
+ Then the `modelValue` of the `lion-checkbox-group` will look as follows:
17
+
18
+ ```js
19
+ const groupElement = [parent].querySelector('lion-checkbox-group');
20
+ groupElement.modelValue;
21
+ => ["Archimedes", "Marie Curie"];
22
+ ```
23
+
24
+ ## The `name` attribute
25
+
26
+ The `name` attribute of a `lion-checkbox-group` automatically gets assigned to its `lion-checkbox` children. You can also specify names for the `lion-checkbox` elements, but if this name is different from the name assigned to `lion-checkbox-group`, then an exception will be thrown.
27
+
28
+ Our recommendation would be to set the `name` attribute only on the `lion-checkbox-group` and not on the `lion-checkbox` elements.
29
+
30
+ ## Example
31
+
32
+ ```html
33
+ <lion-checkbox-group
34
+ name="scientists[]"
35
+ label="Favorite scientists"
36
+ >
37
+ <lion-checkbox label="Archimedes" .choiceValue=${'Archimedes'}></lion-checkbox>
38
+ <lion-checkbox label="Francis Bacon" .choiceValue=${'Francis Bacon'}></lion-checkbox>
39
+ <lion-checkbox label="Marie Curie" .choiceValue=${'Marie Curie'}></lion-checkbox>
40
+ </lion-checkbox-group>
41
+ ```
42
+
43
+ ## Pre-select
44
+
45
+ You can pre-select options by targeting the `modelValue` object of the option and setting the `checked` property to `true`.
46
+
47
+ ```js preview-story
48
+ export const preselect = () => html`
49
+ <lion-checkbox-group name="scientists" label="Favorite scientists">
50
+ <lion-checkbox label="Archimedes" .choiceValue=${'Archimedes'}></lion-checkbox>
51
+ <lion-checkbox label="Francis Bacon" .choiceValue=${'Francis Bacon'} checked></lion-checkbox>
52
+ <lion-checkbox
53
+ label="Marie Curie"
54
+ .modelValue=${{ value: 'Marie Curie', checked: true }}
55
+ ></lion-checkbox>
56
+ </lion-checkbox-group>
57
+ `;
58
+ ```
59
+
60
+ ## Disabled
61
+
62
+ You can disable the entire group by setting the `disabled` attribute on the `<lion-checkbox-group>`.
63
+
64
+ ```js preview-story
65
+ export const disabled = () => html`
66
+ <lion-checkbox-group name="scientists[]" label="Favorite scientists" disabled>
67
+ <lion-checkbox label="Archimedes" .choiceValue=${'Archimedes'}></lion-checkbox>
68
+ <lion-checkbox label="Francis Bacon" .choiceValue=${'Francis Bacon'}></lion-checkbox>
69
+ <lion-checkbox
70
+ label="Marie Curie"
71
+ .modelValue=${{ value: 'Marie Curie', checked: true }}
72
+ ></lion-checkbox>
73
+ </lion-checkbox-group>
74
+ `;
75
+ ```
76
+
77
+ ## Label
78
+
79
+ You can use `slot="label"` instead of the `label` attribute for defining more complex labels, such as containing screen reader only text or an anchor.
80
+
81
+ ```js preview-story
82
+ export const label = () => html`
83
+ <lion-checkbox-group name="scientists[]" label="Favorite scientists">
84
+ <lion-checkbox .choiceValue=${'Archimedes'}>
85
+ <label slot="label"
86
+ ><a href="https://wikipedia.org/wiki/Archimedes" target="_blank">Archimedes</a></label
87
+ >
88
+ </lion-checkbox>
89
+ <lion-checkbox .choiceValue=${'Francis Bacon'}>
90
+ <label slot="label"
91
+ ><a href="https://wikipedia.org/wiki/Francis_Bacon" target="_blank">Francis Bacon</a></label
92
+ >
93
+ </lion-checkbox>
94
+ <lion-checkbox .choiceValue=${'Marie Curie'}>
95
+ <label slot="label"
96
+ ><a href="https://wikipedia.org/wiki/Marie_Curie" target="_blank">Marie Curie</a></label
97
+ >
98
+ </lion-checkbox>
99
+ </lion-checkbox-group>
100
+ `;
101
+ ```
102
+
103
+ ## Help text
104
+
105
+ You can add help text on each checkbox with `help-text` attribute on the `<lion-checkbox>`.
106
+
107
+ ```js preview-story
108
+ export const helpText = () => html`
109
+ <lion-checkbox-group name="scientists[]" label="Favorite scientists">
110
+ <lion-checkbox
111
+ label="Archimedes"
112
+ .choiceValue=${'Archimedes'}
113
+ help-text="Archimedes of Syracuse was a Greek mathematician, physicist, engineer, inventor, and astronomer"
114
+ ></lion-checkbox>
115
+ <lion-checkbox
116
+ label="Francis Bacon"
117
+ .choiceValue=${'Francis Bacon'}
118
+ help-text="Francis Bacon, 1st Viscount St Alban also known as Lord Verulam, was an English philosopher and statesman who served as Attorney General and as Lord Chancellor of England"
119
+ ></lion-checkbox>
120
+ <lion-checkbox
121
+ label="Marie Curie"
122
+ .choiceValue=${'Marie Curie'}
123
+ help-text="Marie Skłodowska Curie born Maria Salomea Skłodowska, was a Polish and naturalized-French physicist and chemist who conducted pioneering research on radioactivity"
124
+ ></lion-checkbox>
125
+ </lion-checkbox-group>
126
+ `;
127
+ ```
128
+
129
+ ## Event
130
+
131
+ You can listen to the `model-value-changed` event whenever the value of the checkbox group is changed.
132
+
133
+ ```js preview-story
134
+ export const event = ({ shadowRoot }) => html`
135
+ <lion-checkbox-group
136
+ name="scientists[]"
137
+ label="Favorite scientists"
138
+ @model-value-changed=${ev =>
139
+ (ev.target.parentElement.querySelector('#selectedDinosaur').innerText = JSON.stringify(
140
+ ev.target.modelValue,
141
+ null,
142
+ 4,
143
+ ))}
144
+ >
145
+ <lion-checkbox label="Archimedes" .choiceValue=${'Archimedes'}></lion-checkbox>
146
+ <lion-checkbox label="Francis Bacon" .choiceValue=${'Francis Bacon'}></lion-checkbox>
147
+ <lion-checkbox label="Marie Curie" .choiceValue=${'Marie Curie'}></lion-checkbox>
148
+ </lion-checkbox-group>
149
+ <br />
150
+ <span>Selected scientists: <strong id="selectedDinosaur">N/A</strong></span>
151
+ `;
152
+ ```
153
+
154
+ ## Indeterminate
155
+
156
+ A `checkbox-indeterminate`'s value is neither true nor false, but is instead indeterminate, meaning that its state cannot be determined or stated in pure binary terms, based on it's `checkbox` children.
157
+
158
+ ```js preview-story
159
+ export const indeterminateSiblings = () => html`
160
+ <lion-checkbox-group name="scientists[]" label="Favorite scientists">
161
+ <lion-checkbox-indeterminate label="Old Greek scientists">
162
+ <lion-checkbox
163
+ slot="checkbox"
164
+ label="Archimedes"
165
+ .choiceValue=${'Archimedes'}
166
+ ></lion-checkbox>
167
+ <lion-checkbox slot="checkbox" label="Plato" .choiceValue=${'Plato'}></lion-checkbox>
168
+ <lion-checkbox
169
+ slot="checkbox"
170
+ label="Pythagoras"
171
+ .choiceValue=${'Pythagoras'}
172
+ ></lion-checkbox>
173
+ </lion-checkbox-indeterminate>
174
+ <lion-checkbox-indeterminate label="17th Century scientists">
175
+ <lion-checkbox
176
+ slot="checkbox"
177
+ label="Isaac Newton"
178
+ .choiceValue=${'Isaac Newton'}
179
+ ></lion-checkbox>
180
+ <lion-checkbox
181
+ slot="checkbox"
182
+ label="Galileo Galilei"
183
+ .choiceValue=${'Galileo Galilei'}
184
+ ></lion-checkbox>
185
+ </lion-checkbox-indeterminate>
186
+ </lion-checkbox-group>
187
+ `;
188
+ ```
189
+
190
+ The `checkbox-indeterminate` can have another `checkbox-indeterminate` as a child.
191
+
192
+ ```js preview-story
193
+ export const indeterminateChildren = () => html`
194
+ <lion-checkbox-group name="scientists[]" label="Favorite scientists">
195
+ <lion-checkbox-indeterminate label="Scientists">
196
+ <lion-checkbox
197
+ slot="checkbox"
198
+ label="Isaac Newton"
199
+ .choiceValue=${'Isaac Newton'}
200
+ ></lion-checkbox>
201
+ <lion-checkbox
202
+ slot="checkbox"
203
+ label="Galileo Galilei"
204
+ .choiceValue=${'Galileo Galilei'}
205
+ ></lion-checkbox>
206
+ <lion-checkbox-indeterminate slot="checkbox" label="Old Greek scientists">
207
+ <lion-checkbox
208
+ slot="checkbox"
209
+ label="Archimedes"
210
+ .choiceValue=${'Archimedes'}
211
+ ></lion-checkbox>
212
+ <lion-checkbox slot="checkbox" label="Plato" .choiceValue=${'Plato'}></lion-checkbox>
213
+ <lion-checkbox
214
+ slot="checkbox"
215
+ label="Pythagoras"
216
+ .choiceValue=${'Pythagoras'}
217
+ ></lion-checkbox>
218
+ </lion-checkbox-indeterminate>
219
+ </lion-checkbox-indeterminate>
220
+ </lion-checkbox-group>
221
+ `;
222
+ ```
223
+
224
+ You can also use `mixed-state` attribute so your indeterminate checkbox toggles through three states (indeterminate, checked, unchecked), where for indeterminate state the old children states are restored when you toggle back into this.
225
+
226
+ ```js preview-story
227
+ export const mixedState = () => html`
228
+ <lion-checkbox-group name="scientists[]" label="Favorite scientists">
229
+ <lion-checkbox-indeterminate mixed-state label="Scientists">
230
+ <lion-checkbox
231
+ slot="checkbox"
232
+ label="Isaac Newton"
233
+ .choiceValue=${'Isaac Newton'}
234
+ ></lion-checkbox>
235
+ <lion-checkbox
236
+ slot="checkbox"
237
+ label="Galileo Galilei"
238
+ .choiceValue=${'Galileo Galilei'}
239
+ ></lion-checkbox>
240
+ <lion-checkbox-indeterminate mixed-state slot="checkbox" label="Old Greek scientists">
241
+ <lion-checkbox
242
+ slot="checkbox"
243
+ label="Archimedes"
244
+ .choiceValue=${'Archimedes'}
245
+ ></lion-checkbox>
246
+ <lion-checkbox slot="checkbox" label="Plato" .choiceValue=${'Plato'}></lion-checkbox>
247
+ <lion-checkbox
248
+ slot="checkbox"
249
+ label="Pythagoras"
250
+ .choiceValue=${'Pythagoras'}
251
+ ></lion-checkbox>
252
+ </lion-checkbox-indeterminate>
253
+ </lion-checkbox-indeterminate>
254
+ </lion-checkbox-group>
255
+ `;
256
+ ```
@@ -0,0 +1,113 @@
1
+ import { LionCollapsible } from '@lion/ui/collapsible.js';
2
+
3
+ const EVENT = {
4
+ TRANSITION_END: 'transitionend',
5
+ TRANSITION_START: 'transitionstart',
6
+ };
7
+ /**
8
+ * `CustomCollapsible` is a class for custom collapsible element (`<custom-collapsible>` web component).
9
+ * @customElement custom-collapsible
10
+ */
11
+ // @ts-expect-error false positive for incompatible static get properties. Lit-element merges super properties already for you.
12
+ export class CustomCollapsible extends LionCollapsible {
13
+ static get properties() {
14
+ return {
15
+ transitioning: {
16
+ type: Boolean,
17
+ reflect: true,
18
+ },
19
+ };
20
+ }
21
+
22
+ constructor() {
23
+ super();
24
+ this.transitioning = false;
25
+ }
26
+
27
+ connectedCallback() {
28
+ super.connectedCallback();
29
+ this._contentNode?.style.setProperty(
30
+ 'transition',
31
+ 'max-height 0.35s, padding 0.35s, opacity 0.35s',
32
+ );
33
+ if (this.opened) {
34
+ this._contentNode?.style.setProperty('padding', '12px 0');
35
+ }
36
+ }
37
+
38
+ /**
39
+ * Wait until transition is finished.
40
+ * @override
41
+ */
42
+ toggle() {
43
+ if (!this.transitioning) {
44
+ super.toggle();
45
+ }
46
+ }
47
+
48
+ /**
49
+ * Trigger show animation and wait for transition to be finished.
50
+ * @param {Object} options - element node and its options
51
+ * @param {HTMLElement} options.contentNode
52
+ * @override
53
+ */
54
+ async _showAnimation({ contentNode }) {
55
+ const expectedHeight = await this.__calculateHeight(contentNode);
56
+ contentNode.style.setProperty('opacity', '1');
57
+ contentNode.style.setProperty('padding', '12px 0');
58
+ contentNode.style.setProperty('max-height', '0px');
59
+ await new Promise(resolve => requestAnimationFrame(() => resolve()));
60
+ contentNode.style.setProperty('max-height', expectedHeight);
61
+ await this._waitForTransition({ contentNode });
62
+ }
63
+
64
+ /**
65
+ * Trigger hide animation and wait for transition to be finished.
66
+ * @param {Object} options - element node and its options
67
+ * @param {HTMLElement} options.contentNode
68
+ * @override
69
+ */
70
+ async _hideAnimation({ contentNode }) {
71
+ if (this._contentHeight === '0px') {
72
+ return;
73
+ }
74
+ ['opacity', 'padding', 'max-height'].map(prop => contentNode.style.setProperty(prop, '0'));
75
+ await this._waitForTransition({ contentNode });
76
+ }
77
+
78
+ /**
79
+ * Wait until the transition event is finished.
80
+ * @param {Object} options - element node and its options
81
+ * @param {HTMLElement} options.contentNode
82
+ * @returns {Promise<void>} transition event
83
+ */
84
+ _waitForTransition({ contentNode }) {
85
+ return new Promise(resolve => {
86
+ const transitionStarted = () => {
87
+ contentNode.removeEventListener(EVENT.TRANSITION_START, transitionStarted);
88
+ this.transitioning = true;
89
+ };
90
+ contentNode.addEventListener(EVENT.TRANSITION_START, transitionStarted);
91
+
92
+ const transitionEnded = () => {
93
+ contentNode.removeEventListener(EVENT.TRANSITION_END, transitionEnded);
94
+ this.transitioning = false;
95
+ resolve();
96
+ };
97
+ contentNode.addEventListener(EVENT.TRANSITION_END, transitionEnded);
98
+ });
99
+ }
100
+
101
+ /**
102
+ * Calculate total content height after collapsible opens
103
+ * @param {HTMLElement} contentNode content node
104
+ * @private
105
+ */
106
+ async __calculateHeight(contentNode) {
107
+ contentNode.style.setProperty('max-height', '');
108
+ await new Promise(resolve => requestAnimationFrame(() => resolve()));
109
+ return this._contentHeight; // Expected height i.e. actual size once collapsed after animation
110
+ }
111
+ }
112
+
113
+ customElements.define('custom-collapsible', CustomCollapsible);
@@ -0,0 +1,37 @@
1
+ import { css } from 'lit';
2
+
3
+ const applyDemoCollapsibleStyles = () => {
4
+ const demoCollapsibleStyles = css`
5
+ .demo-custom-collapsible-container {
6
+ padding: 16px;
7
+ margin: 16px;
8
+ border-radius: 4px;
9
+ width: 400px;
10
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
11
+ }
12
+
13
+ .demo-custom-collapsible-body {
14
+ padding: 12px 0px;
15
+ }
16
+
17
+ .demo-custom-collapsible-invoker {
18
+ border-width: 0;
19
+ border-radius: 2px;
20
+ padding: 12px 24px;
21
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
22
+ font-weight: bold;
23
+ color: #3f51b5;
24
+ }
25
+
26
+ .demo-custom-collapsible-state-container {
27
+ padding: 12px 0;
28
+ }
29
+ `;
30
+
31
+ const styleTag = document.createElement('style');
32
+ styleTag.setAttribute('data-demo-collapsible', '');
33
+ styleTag.textContent = demoCollapsibleStyles.cssText;
34
+ document.head.appendChild(styleTag);
35
+ };
36
+
37
+ applyDemoCollapsibleStyles();