@lion/ui 0.17.0-menu-system.1 → 0.17.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 (221) hide show
  1. package/collapsible.js +0 -1
  2. package/components/button/src/LionButton.js +0 -4
  3. package/components/button/test-suites/LionButton.suite.js +0 -1
  4. package/components/calendar/src/LionCalendar.js +0 -2
  5. package/components/combobox/test/lion-combobox.test.js +0 -1
  6. package/components/form-core/src/form-group/FormGroupMixin.js +0 -7
  7. package/components/form-core/src/registration/FormRegistrarMixin.js +0 -11
  8. package/components/form-core/test/FormControlMixin.test.js +0 -1
  9. package/components/form-core/test/validate/Validator.test.js +0 -2
  10. package/components/form-core/test-suites/ValidateMixin.suite.js +0 -2
  11. package/components/form-core/test-suites/ValidateMixinFeedbackPart.suite.js +0 -1
  12. package/components/input-datepicker/src/localizeNamespaceLoader.js +0 -1
  13. package/components/input-datepicker/test/lion-input-datepicker.test.js +6 -5
  14. package/components/localize/test/date/formatDate.test.js +0 -1
  15. package/components/overlays/src/OverlayController.js +111 -244
  16. package/components/overlays/src/OverlayMixin.js +11 -58
  17. package/components/overlays/src/OverlaysManager.js +2 -2
  18. package/components/overlays/src/configurations/withDropdownConfig.js +2 -22
  19. package/components/overlays/src/configurations/withPopoverConfig.js +32 -0
  20. package/components/overlays/src/utils/adopt-styles.js +1 -2
  21. package/components/overlays/src/utils/get-focusable-elements.js +0 -4
  22. package/components/overlays/src/utils/is-equal-config.js +6 -10
  23. package/components/overlays/test/OverlayController.test.js +3 -5
  24. package/components/overlays/test/utils-tests/is-equal-config.test.js +1 -1
  25. package/components/overlays/test-suites/OverlayMixin.suite.js +8 -8
  26. package/components/overlays/types/OverlayConfig.ts +5 -16
  27. package/components/select-rich/test/lion-select-rich.test.js +0 -3
  28. package/custom-elements.json +1891 -13818
  29. package/dist-types/components/button/src/LionButton.d.ts +0 -1
  30. package/dist-types/components/button/src/LionButton.d.ts.map +1 -1
  31. package/dist-types/components/button/test-suites/LionButton.suite.d.ts.map +1 -1
  32. package/dist-types/components/calendar/src/LionCalendar.d.ts.map +1 -1
  33. package/dist-types/components/dialog/src/LionDialog.d.ts +1 -3
  34. package/dist-types/components/dialog/src/LionDialog.d.ts.map +1 -1
  35. package/dist-types/components/form-core/src/form-group/FormGroupMixin.d.ts.map +1 -1
  36. package/dist-types/components/form-core/src/registration/FormRegistrarMixin.d.ts.map +1 -1
  37. package/dist-types/components/form-core/test-suites/ValidateMixin.suite.d.ts.map +1 -1
  38. package/dist-types/components/form-core/test-suites/ValidateMixinFeedbackPart.suite.d.ts.map +1 -1
  39. package/dist-types/components/input-datepicker/src/localizeNamespaceLoader.d.ts.map +1 -1
  40. package/dist-types/components/overlays/src/OverlayController.d.ts +13 -9
  41. package/dist-types/components/overlays/src/OverlayController.d.ts.map +1 -1
  42. package/dist-types/components/overlays/src/OverlayMixin.d.ts.map +1 -1
  43. package/dist-types/components/overlays/src/configurations/withDropdownConfig.d.ts +0 -1
  44. package/dist-types/components/overlays/src/configurations/withDropdownConfig.d.ts.map +1 -1
  45. package/dist-types/components/overlays/src/configurations/withPopoverConfig.d.ts +6 -0
  46. package/dist-types/components/overlays/src/configurations/withPopoverConfig.d.ts.map +1 -0
  47. package/dist-types/components/overlays/src/utils/get-focusable-elements.d.ts.map +1 -1
  48. package/dist-types/components/overlays/src/utils/is-equal-config.d.ts.map +1 -1
  49. package/dist-types/components/overlays/types/OverlayConfig.d.ts +2 -10
  50. package/dist-types/components/overlays/types/OverlayConfig.d.ts.map +1 -1
  51. package/dist-types/components/select-rich/src/LionSelectRich.d.ts +2 -8
  52. package/dist-types/components/select-rich/src/LionSelectRich.d.ts.map +1 -1
  53. package/dist-types/exports/overlays.d.ts +1 -3
  54. package/dist-types/exports/overlays.d.ts.map +1 -1
  55. package/dist-types/tsconfig.tsbuildinfo +1 -1
  56. package/docs/components/checkbox-group/overview.md +2 -2
  57. package/docs/components/collapsible/overview.md +1 -1
  58. package/docs/components/combobox/api-table.md +8 -21
  59. package/docs/components/combobox/overview.md +1 -1
  60. package/docs/components/combobox/use-cases.md +1 -1
  61. package/docs/components/dialog/api-table.md +6 -31
  62. package/docs/components/dialog/overview.md +1 -1
  63. package/docs/components/fieldset/overview.md +5 -5
  64. package/docs/components/form/overview.md +3 -3
  65. package/docs/components/form/use-cases.md +2 -2
  66. package/docs/components/icon/use-cases.md +1 -1
  67. package/docs/components/input/overview.md +1 -1
  68. package/docs/components/input-amount/overview.md +3 -3
  69. package/docs/components/input-date/overview.md +3 -3
  70. package/docs/components/input-datepicker/api-table.md +4 -21
  71. package/docs/components/input-datepicker/overview.md +5 -5
  72. package/docs/components/input-email/overview.md +2 -2
  73. package/docs/components/input-file/overview.md +1 -1
  74. package/docs/components/input-iban/overview.md +2 -2
  75. package/docs/components/input-range/overview.md +2 -2
  76. package/docs/components/input-stepper/overview.md +1 -1
  77. package/docs/components/input-tel/overview.md +1 -1
  78. package/docs/components/input-tel/use-cases.md +6 -6
  79. package/docs/components/input-tel-dropdown/overview.md +1 -1
  80. package/docs/components/listbox/use-cases.md +1 -1
  81. package/docs/components/radio-group/overview.md +3 -3
  82. package/docs/components/select/use-cases.md +1 -1
  83. package/docs/components/select-rich/api-table.md +5 -21
  84. package/docs/components/select-rich/use-cases.md +2 -2
  85. package/docs/components/tabs/examples.md +1 -1
  86. package/docs/components/tooltip/api-table.md +11 -36
  87. package/docs/fundamentals/index.md +4 -4
  88. package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
  89. package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
  90. package/docs/fundamentals/rationales/accessibility.md +1 -1
  91. package/docs/fundamentals/systems/core/SlotMixin.md +1 -1
  92. package/docs/fundamentals/systems/core/overview.md +1 -1
  93. package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
  94. package/docs/fundamentals/systems/form/model-value.md +1 -1
  95. package/docs/fundamentals/systems/form/overview.md +28 -28
  96. package/docs/fundamentals/systems/form/validate.md +2 -2
  97. package/docs/fundamentals/systems/localize/overview.md +4 -4
  98. package/docs/fundamentals/systems/overlays/api-table.md +34 -34
  99. package/docs/fundamentals/systems/overlays/configuration.md +2 -2
  100. package/docs/fundamentals/systems/overlays/overview.md +5 -5
  101. package/docs/fundamentals/systems/overlays/use-cases.md +2 -2
  102. package/docs/fundamentals/tools/helpers/overview.md +1 -1
  103. package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
  104. package/docs/guides/how-to/create-a-custom-field.md +5 -5
  105. package/docs/guides/how-to/create-a-form.md +4 -4
  106. package/docs/guides/how-to/extend-a-native-input.md +2 -2
  107. package/docs/guides/how-to/index.md +1 -1
  108. package/docs/guides/index.md +8 -8
  109. package/docs/guides/principles/index.md +5 -5
  110. package/docs/guides/principles/styling.md +1 -1
  111. package/exports/collapsible.js +0 -1
  112. package/exports/overlays.js +1 -6
  113. package/overlays.js +1 -6
  114. package/package.json +1 -1
  115. package/components/collapsible/src/DisclosureMixin.js +0 -313
  116. package/components/collapsible/types/DisclosureMixinTypes.ts +0 -48
  117. package/components/menu/CHANGELOG.md +0 -37
  118. package/components/menu/README.md +0 -335
  119. package/components/menu/index.js +0 -2
  120. package/components/menu/lion-menu-overlay.js +0 -3
  121. package/components/menu/lion-menu.js +0 -3
  122. package/components/menu/lion-spinbutton.js +0 -3
  123. package/components/menu/lion-toolbar.js +0 -3
  124. package/components/menu/lion-tree.js +0 -3
  125. package/components/menu/package.json +0 -46
  126. package/components/menu/requirements.temp.md +0 -12
  127. package/components/menu/src/InteractiveListMixin.js +0 -796
  128. package/components/menu/src/LionMenu.js +0 -250
  129. package/components/menu/src/LionMenuHybrid.js +0 -46
  130. package/components/menu/src/LionMenuOverlay.js +0 -155
  131. package/components/menu/src/LionSpinbutton.js +0 -213
  132. package/components/menu/src/LionToolbar.js +0 -94
  133. package/components/menu/src/LionTree.js +0 -52
  134. package/components/menu/src/MultiLevelListMixin.js +0 -274
  135. package/components/menu/src/utils/isInView.js +0 -26
  136. package/components/menu/src/utils/listItemInteractions.js +0 -104
  137. package/components/menu/src/utils/uuid.js +0 -3
  138. package/components/menu/test/lion-menu.test.js +0 -3
  139. package/components/menu/test-suites/InteractiveListMixin.suite.js +0 -142
  140. package/components/menu/types/InteractiveListMixinTypes.d.ts +0 -82
  141. package/components/navigation-bar/README.md +0 -1
  142. package/components/navigation-bar/src/LionNavigationBar.js +0 -422
  143. package/components/navigation-bar/src/types.js +0 -41
  144. package/components/overlays/NEXT.md +0 -49
  145. package/dist-types/components/collapsible/src/DisclosureMixin.d.ts +0 -3
  146. package/dist-types/components/collapsible/src/DisclosureMixin.d.ts.map +0 -1
  147. package/dist-types/components/collapsible/types/DisclosureMixinTypes.d.ts +0 -24
  148. package/dist-types/components/collapsible/types/DisclosureMixinTypes.d.ts.map +0 -1
  149. package/dist-types/components/menu/index.d.ts +0 -3
  150. package/dist-types/components/menu/index.d.ts.map +0 -1
  151. package/dist-types/components/menu/lion-menu-overlay.d.ts +0 -2
  152. package/dist-types/components/menu/lion-menu-overlay.d.ts.map +0 -1
  153. package/dist-types/components/menu/lion-menu.d.ts +0 -2
  154. package/dist-types/components/menu/lion-menu.d.ts.map +0 -1
  155. package/dist-types/components/menu/lion-spinbutton.d.ts +0 -2
  156. package/dist-types/components/menu/lion-spinbutton.d.ts.map +0 -1
  157. package/dist-types/components/menu/lion-toolbar.d.ts +0 -2
  158. package/dist-types/components/menu/lion-toolbar.d.ts.map +0 -1
  159. package/dist-types/components/menu/lion-tree.d.ts +0 -2
  160. package/dist-types/components/menu/lion-tree.d.ts.map +0 -1
  161. package/dist-types/components/menu/src/InteractiveListMixin.d.ts +0 -611
  162. package/dist-types/components/menu/src/InteractiveListMixin.d.ts.map +0 -1
  163. package/dist-types/components/menu/src/LionMenu.d.ts +0 -563
  164. package/dist-types/components/menu/src/LionMenu.d.ts.map +0 -1
  165. package/dist-types/components/menu/src/LionMenuHybrid.d.ts +0 -19
  166. package/dist-types/components/menu/src/LionMenuHybrid.d.ts.map +0 -1
  167. package/dist-types/components/menu/src/LionMenuOverlay.d.ts +0 -1007
  168. package/dist-types/components/menu/src/LionMenuOverlay.d.ts.map +0 -1
  169. package/dist-types/components/menu/src/LionSpinbutton.d.ts +0 -58
  170. package/dist-types/components/menu/src/LionSpinbutton.d.ts.map +0 -1
  171. package/dist-types/components/menu/src/LionToolbar.d.ts +0 -8
  172. package/dist-types/components/menu/src/LionToolbar.d.ts.map +0 -1
  173. package/dist-types/components/menu/src/LionTree.d.ts +0 -445
  174. package/dist-types/components/menu/src/LionTree.d.ts.map +0 -1
  175. package/dist-types/components/menu/src/MultiLevelListMixin.d.ts +0 -493
  176. package/dist-types/components/menu/src/MultiLevelListMixin.d.ts.map +0 -1
  177. package/dist-types/components/menu/src/utils/isInView.d.ts +0 -9
  178. package/dist-types/components/menu/src/utils/isInView.d.ts.map +0 -1
  179. package/dist-types/components/menu/src/utils/listItemInteractions.d.ts +0 -42
  180. package/dist-types/components/menu/src/utils/listItemInteractions.d.ts.map +0 -1
  181. package/dist-types/components/menu/src/utils/uuid.d.ts +0 -2
  182. package/dist-types/components/menu/src/utils/uuid.d.ts.map +0 -1
  183. package/dist-types/components/menu/test/lion-menu.test.d.ts +0 -2
  184. package/dist-types/components/menu/test/lion-menu.test.d.ts.map +0 -1
  185. package/dist-types/components/menu/test-suites/InteractiveListMixin.suite.d.ts +0 -13
  186. package/dist-types/components/menu/test-suites/InteractiveListMixin.suite.d.ts.map +0 -1
  187. package/dist-types/components/navigation-bar/src/LionNavigationBar.d.ts +0 -238
  188. package/dist-types/components/navigation-bar/src/LionNavigationBar.d.ts.map +0 -1
  189. package/dist-types/components/navigation-bar/src/types.d.ts +0 -85
  190. package/dist-types/components/navigation-bar/src/types.d.ts.map +0 -1
  191. package/dist-types/exports/define/lion-item.d.ts +0 -2
  192. package/dist-types/exports/define/lion-item.d.ts.map +0 -1
  193. package/dist-types/exports/define/lion-menu-overlay.d.ts +0 -2
  194. package/dist-types/exports/define/lion-menu-overlay.d.ts.map +0 -1
  195. package/dist-types/exports/define/lion-menu.d.ts +0 -2
  196. package/dist-types/exports/define/lion-menu.d.ts.map +0 -1
  197. package/dist-types/exports/define/lion-navigation-bar.d.ts +0 -2
  198. package/dist-types/exports/define/lion-navigation-bar.d.ts.map +0 -1
  199. package/dist-types/exports/define/lion-toolbar.d.ts +0 -2
  200. package/dist-types/exports/define/lion-toolbar.d.ts.map +0 -1
  201. package/dist-types/exports/define/lion-tree.d.ts +0 -2
  202. package/dist-types/exports/define/lion-tree.d.ts.map +0 -1
  203. package/dist-types/exports/menu.d.ts +0 -7
  204. package/dist-types/exports/menu.d.ts.map +0 -1
  205. package/dist-types/exports/navigation-bar.d.ts +0 -2
  206. package/dist-types/exports/navigation-bar.d.ts.map +0 -1
  207. package/docs/components/menu/api-table.md +0 -450
  208. package/docs/components/menu/applyMenuDemoStyles.js +0 -173
  209. package/docs/components/menu/extensions.md +0 -216
  210. package/docs/components/menu/index.md +0 -13
  211. package/docs/components/menu/overview.md +0 -422
  212. package/exports/define/lion-item.js +0 -3
  213. package/exports/define/lion-menu-overlay.js +0 -3
  214. package/exports/define/lion-menu.js +0 -3
  215. package/exports/define/lion-navigation-bar.js +0 -3
  216. package/exports/define/lion-toolbar.js +0 -3
  217. package/exports/define/lion-tree.js +0 -3
  218. package/exports/menu.js +0 -6
  219. package/exports/navigation-bar.js +0 -1
  220. package/menu.js +0 -6
  221. package/navigation-bar.js +0 -1
@@ -22,7 +22,7 @@ Primarily useful if two major version of a package with a singleton is used.
22
22
  npm i --save singleton-manager
23
23
  ```
24
24
 
25
- ⚠️ You need to make SURE that only ONE version of `singleton-manager` is installed. For how see [Non Goals](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/tools/singleton-manager/#non-goals).
25
+ ⚠️ You need to make SURE that only ONE version of `singleton-manager` is installed. For how see [Non Goals](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/fundamentals/tools/singleton-manager/#non-goals).
26
26
 
27
27
  ### Example Singleton Users
28
28
 
@@ -172,7 +172,7 @@ Steps to reproduce:
172
172
  1. Page A click on block
173
173
  2. Page B => "Blocked: false" (even when hitting the refresh button)
174
174
 
175
- ➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/tools/singleton-manager/example-fail/index.md). <br>
175
+ ➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/fundamentals/tools/singleton-manager/example-fail/index.md). <br>
176
176
  ➡️ See [the code](https://github.com/ing-bank/lion/tree/master/docs/fundamentals/tools/singleton-manager/example-fail/demo-app.js).
177
177
 
178
178
  ---
@@ -215,7 +215,7 @@ See it in action
215
215
  npm run start:singleton
216
216
  ```
217
217
 
218
- ➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/tools/singleton-manager/example-success/index.md). <br>
218
+ ➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/fundamentals/tools/singleton-manager/example-success/index.md). <br>
219
219
  ➡️ See [the code](https://github.com/ing-bank/lion/tree/master/docs/fundamentals/tools/singleton-manager/example-success/demo-app.js).
220
220
 
221
221
  ---
@@ -256,7 +256,7 @@ See it in action
256
256
  npm run start:singleton-complex
257
257
  ```
258
258
 
259
- ➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/tools/singleton-manager/example-complex/index.md). <br>
259
+ ➡️ See [it on the example page](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/fundamentals/tools/singleton-manager/example-complex/index.md). <br>
260
260
  ➡️ See [the code](https://github.com/ing-bank/lion/tree/master/docs/fundamentals/tools/singleton-manager/example-complex/demo-app.js).
261
261
 
262
262
  ---
@@ -87,9 +87,9 @@ if (!customElements.get('dummy-slider')) {
87
87
  }
88
88
  ```
89
89
 
90
- Custom Fields can be created in just a few steps. All you need is an interaction element (like for instance a slider, a listbox or a combobox) and connect it to the [LionField](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/components/input/overview.md).
90
+ Custom Fields can be created in just a few steps. All you need is an interaction element (like for instance a slider, a listbox or a combobox) and connect it to the [LionField](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/components/input/overview.md).
91
91
 
92
- > In case you want to extend a native element, follow [Extend a native Input](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/how-to/extend-a-native-input.md).
92
+ > In case you want to extend a native element, follow [Extend a native Input](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/guides/how-to/extend-a-native-input.md).
93
93
 
94
94
  ## A) an interaction element
95
95
 
@@ -138,7 +138,7 @@ export const createAnInteractiveElement = () => {
138
138
  ## B) your LionField extension
139
139
 
140
140
  Now we want to integrate the slider in our form system to enrich the user interface, get
141
- validation support and all other [benefits of LionField](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/components/input/overview.md).
141
+ validation support and all other [benefits of LionField](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/components/input/overview.md).
142
142
  We start by creating a component `<slider-field>` that extends from `LionField`.
143
143
  Then we follow the steps below:
144
144
 
@@ -151,7 +151,7 @@ Then we follow the steps below:
151
151
 
152
152
  The `user-input-changed` event is listened to by the FormatMixin: it should be regarded as the
153
153
  equivalent of the `input` event of the platform, but for custom built interaction elements.
154
- You now synchronized [modelValue](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/systems/form/model-value.md), which can be regarded as
154
+ You now synchronized [modelValue](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/fundamentals/systems/form/model-value.md), which can be regarded as
155
155
  the glue to integrate all other functionality like parsing/formatting/serializing, validating,
156
156
  tracking interaction states etc.
157
157
 
@@ -159,7 +159,7 @@ Then we follow the steps below:
159
159
  > because those properties will lose their reactivity (they won't be considered anymore in the
160
160
  > update loop of LitElement).
161
161
  > Whenever a .modelValue/.formattedValue/.serializedValue needs to be computed, use
162
- > [parser/formatter/serializer](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/systems/form/formatting-and-parsing.md)
162
+ > [parser/formatter/serializer](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/fundamentals/systems/form/formatting-and-parsing.md)
163
163
 
164
164
  Implement with the following code:
165
165
 
@@ -39,7 +39,7 @@ Large or complex forms might need to be split up into multiple files. This compo
39
39
 
40
40
  In the latter case: make sure that your components don't have a shadow root. This can be achieved by rendering into Light DOM. The form registration mechanism relies on light dom by design: as soon as you do start to use shadow roots, you will notice that your form components won't register themselves anymore to their parents.
41
41
 
42
- > Today, rendering to light dom is the only way to [stay accessible](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/fundamentals/rationales/accessibility.md#shadow-roots-and-accessibility).
42
+ > Today, rendering to light dom is the only way to [stay accessible](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/fundamentals/rationales/accessibility.md#shadow-roots-and-accessibility).
43
43
 
44
44
  ### Example of a component that renders into Light DOM
45
45
 
@@ -86,7 +86,7 @@ Extending form components is not recommended for Application Developers: it shou
86
86
  This team will add the styling and default configuration needed to make it fit the particular Design System.
87
87
 
88
88
  With the toolbox provided by the team that creates your Design System, you should be able to build all your forms. Only if you have a really good reason, look into
89
- [exceptional cases](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/how-to/#exceptional-cases) below.
89
+ [exceptional cases](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/guides/how-to/#exceptional-cases) below.
90
90
 
91
91
  ### Exceptional cases
92
92
 
@@ -94,8 +94,8 @@ If the form component you need is still missing, you have two options:
94
94
 
95
95
  - is it a generic primitive that should be part of Lion? Request it in [Lion discussions](https://github.com/ing-bank/lion/discussions)
96
96
  - is it a non generic component that is unique to your app?
97
- - follow [create a custom field](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/how-to/create-a-custom-field.md)
98
- - follow [extend a native input](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/how-to/extend-a-native-input.md)
97
+ - follow [create a custom field](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/guides/how-to/create-a-custom-field.md)
98
+ - follow [extend a native input](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/guides/how-to/extend-a-native-input.md)
99
99
 
100
100
  It's also possible to extend other components, like LionListbox or LionCombobox. You need to be aware that you're building on top of protected apis.
101
101
  Changing/overriding functionality is only recommended if the source code in `form-core` is fully understood.
@@ -23,9 +23,9 @@ import '../../fundamentals/systems/form/assets/h-output.js';
23
23
  loadDefaultFeedbackMessages();
24
24
  ```
25
25
 
26
- Input fields can be created by extending [LionInput](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/components/input/overview.md).
26
+ Input fields can be created by extending [LionInput](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/components/input/overview.md).
27
27
 
28
- > In case you want to wrap a custom form element, follow [Create a custom Field](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/how-to/create-a-custom-field.md).
28
+ > In case you want to wrap a custom form element, follow [Create a custom Field](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/guides/how-to/create-a-custom-field.md).
29
29
 
30
30
  For this tutorial, we create an input that wraps native `input[type=datetime-local]`.
31
31
  This is as simple as adding a type:
@@ -22,4 +22,4 @@ Whether you're just getting started with Lion, building your first form, extendi
22
22
  - Build custom form fields tailored to your needs
23
23
  - Follow proven patterns and best practices used by the Lion community
24
24
 
25
- If you can't find what you're looking for, check out our [Fundamentals](../../fundamentals/) section for deeper conceptual knowledge, or visit our [Components](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/components) documentation for detailed API references.
25
+ If you can't find what you're looking for, check out our [Fundamentals](../../fundamentals/) section for deeper conceptual knowledge, or visit our [Components](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/components) documentation for detailed API references.
@@ -22,9 +22,9 @@ Developers consuming our web components inside an application (not extending the
22
22
  `Application Developers` are only allowed to interact with `public` properties and methods.
23
23
  Can be abbreviated as `AD`. Sometimes also called `Consuming Developer`.
24
24
 
25
- - [Definitions and Terms](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/definitions-and-terms.md)
26
- - [Styling](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/styling.md)
27
- - [Scoped Elements](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/scoped-elements.md)
25
+ - [Definitions and Terms](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/guides/principles/definitions-and-terms.md)
26
+ - [Styling](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/guides/principles/styling.md)
27
+ - [Scoped Elements](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/guides/principles/scoped-elements.md)
28
28
 
29
29
  ## Extending Developer
30
30
 
@@ -32,13 +32,13 @@ Developers extending our web components, for instance: `class MaterialInput exte
32
32
 
33
33
  Especially for subclassers we have some extra documentation:
34
34
 
35
- - [Subclasser APIs](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/subclasser-apis.md)
36
- - [Extend documentation](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/blog/extending-documentation.md)
35
+ - [Subclasser APIs](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/guides/principles/subclasser-apis.md)
36
+ - [Extend documentation](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/blog/extending-documentation.md)
37
37
 
38
38
  ## How To
39
39
 
40
40
  Next to that we have some specific "How To" documentations.
41
41
 
42
- - [Get started](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/how-to/get-started.md)
43
- - [Create a custom field](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/how-to/create-a-custom-field.md)
44
- - [Extend a native input](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/how-to/extend-a-native-input.md)
42
+ - [Get started](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/guides/how-to/get-started.md)
43
+ - [Create a custom field](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/guides/how-to/create-a-custom-field.md)
44
+ - [Extend a native input](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/guides/how-to/extend-a-native-input.md)
@@ -22,9 +22,9 @@ Developers consuming our web components inside an application (not extending the
22
22
  `Application Developers` are only allowed to interact with `public` properties and methods.
23
23
  Can be abbreviated as `AD`. Sometimes also called `Consuming Developer`.
24
24
 
25
- - [Definitions and Terms](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/definitions-and-terms.md)
26
- - [Styling](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/styling.md)
27
- - [Scoped Elements](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/scoped-elements.md)
25
+ - [Definitions and Terms](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/guides/principles/definitions-and-terms.md)
26
+ - [Styling](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/guides/principles/styling.md)
27
+ - [Scoped Elements](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/guides/principles/scoped-elements.md)
28
28
 
29
29
  ## Extending Developer
30
30
 
@@ -32,5 +32,5 @@ Developers extending our web components, for instance: `class MaterialInput exte
32
32
 
33
33
  Especially for subclassers we have some extra documentation:
34
34
 
35
- - [Subclasser APIs](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/subclasser-apis.md)
36
- - [Extend documentation](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/blog/extending-documentation.md)
35
+ - [Subclasser APIs](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/guides/principles/subclasser-apis.md)
36
+ - [Extend documentation](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/blog/extending-documentation.md)
@@ -30,7 +30,7 @@ Examples for both categories can be found below:
30
30
  - Accessibility examples:
31
31
  - Content (for instance a caption in a table) can be `visually hidden`: it will be
32
32
  readable by screen readers, but invisible for end users.
33
- - When an html table is used, we allow [subclassers](https://github.com/ing-bank/lion/blob/800791cbc9a0c2191fd0ab6d934aa09eb012356c/docs/guides/principles/subclasser-apis.md) to override the display property (`table-cell`) to `flex`. By putting the proper accessible roles (`role="cell"`) in the markup, we guarantee our markup stays accessible.
33
+ - When an html table is used, we allow [subclassers](https://github.com/ing-bank/lion/blob/9793ae76cf6f06cf2d15086940532d809183dd1c/docs/guides/principles/subclasser-apis.md) to override the display property (`table-cell`) to `flex`. By putting the proper accessible roles (`role="cell"`) in the markup, we guarantee our markup stays accessible.
34
34
 
35
35
  Although Lion components try to stay as unbiased as possible with regard to styling, defaults will be needed. In these cases we try to follow the platform as much as possible. If the platform doesn't provide defaults, the largest common denominator across existing UI systems is taken as a lead.
36
36
 
@@ -1,2 +1 @@
1
1
  export { LionCollapsible } from '../components/collapsible/src/LionCollapsible.js';
2
- // export { DisclosureMixin } from '../components/collapsible/src/DisclosureMixin.js';
@@ -8,8 +8,7 @@ export { withBottomSheetConfig } from '../components/overlays/src/configurations
8
8
  export { withModalDialogConfig } from '../components/overlays/src/configurations/withModalDialogConfig.js';
9
9
  export { withDropdownConfig } from '../components/overlays/src/configurations/withDropdownConfig.js';
10
10
  export { withTooltipConfig } from '../components/overlays/src/configurations/withTooltipConfig.js';
11
- export { withClickInteraction } from '../components/overlays/src/configurations/visibility-trigger-partials/withClickInteraction.js';
12
- export { withHoverInteraction } from '../components/overlays/src/configurations/visibility-trigger-partials/withHoverInteraction.js';
11
+ export { withPopoverConfig } from '../components/overlays/src/configurations/withPopoverConfig.js';
13
12
 
14
13
  export { deepContains } from '../components/overlays/src/utils/deep-contains.js';
15
14
  // re-export via this entrypoint for backwards compatibility
@@ -21,7 +20,3 @@ export {
21
20
  } from '../components/overlays/src/utils/inert-siblings.js';
22
21
 
23
22
  export { overlays } from '../components/overlays/src/singleton.js';
24
-
25
- /**
26
- * @typedef {import('../components/overlays/types/OverlayConfig.js').OverlayConfig} OverlayConfig
27
- */
package/overlays.js CHANGED
@@ -6,8 +6,7 @@ export { withBottomSheetConfig } from './components/overlays/src/configurations/
6
6
  export { withModalDialogConfig } from './components/overlays/src/configurations/withModalDialogConfig.js';
7
7
  export { withDropdownConfig } from './components/overlays/src/configurations/withDropdownConfig.js';
8
8
  export { withTooltipConfig } from './components/overlays/src/configurations/withTooltipConfig.js';
9
- export { withClickInteraction } from './components/overlays/src/configurations/visibility-trigger-partials/withClickInteraction.js';
10
- export { withHoverInteraction } from './components/overlays/src/configurations/visibility-trigger-partials/withHoverInteraction.js';
9
+ export { withPopoverConfig } from './components/overlays/src/configurations/withPopoverConfig.js';
11
10
  export { deepContains } from './components/overlays/src/utils/deep-contains.js';
12
11
  // re-export via this entrypoint for backwards compatibility
13
12
  export { getDeepActiveElement } from './components/core/src/getDeepActiveElement.js';
@@ -17,7 +16,3 @@ export {
17
16
  setSiblingsInert,
18
17
  } from './components/overlays/src/utils/inert-siblings.js';
19
18
  export { overlays } from './components/overlays/src/singleton.js';
20
-
21
- /**
22
- * @typedef {import('../components/overlays/types/OverlayConfig.js').OverlayConfig} OverlayConfig
23
- */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lion/ui",
3
- "version": "0.17.0-menu-system.1",
3
+ "version": "0.17.1",
4
4
  "description": "A package of extendable web components",
5
5
  "license": "MIT",
6
6
  "author": "ing-bank",
@@ -1,313 +0,0 @@
1
- /**
2
- * @typedef {import('../types/DisclosureMixinTypes.js').DisclosureHost} DisclosureHost
3
- * @typedef {import('../types/DisclosureMixinTypes.js').DisclosureMixin} DisclosureMixin
4
- */
5
-
6
- // /**
7
- // * @type {DisclosureMixin}
8
- // */
9
- // const DisclosureMixinImplementation = superclass =>
10
- // // @ts-ignore https://github.com/microsoft/TypeScript/issues/36821#issuecomment-588375051
11
- // class DisclosureMixin extends superclass {
12
- // /** @type {any} */
13
- // static get properties() {
14
- // return {
15
- // opened: { type: Boolean, reflect: true },
16
- // handleFocus: { type: Boolean, attribute: 'handle-focus' },
17
- // invokerInteraction: { type: String, attribute: 'invoker-interaction' },
18
- // };
19
- // }
20
-
21
- // /**
22
- // * @param {Element} focusableElOrWrapper
23
- // * @returns {Element|null}
24
- // */
25
- // static _getFocusableInvokerEl(focusableElOrWrapper) {
26
- // // return focusableElOrWrapper;
27
- // return (
28
- // focusableElOrWrapper &&
29
- // (focusableElOrWrapper.hasAttribute('tabindex') || focusableElOrWrapper.tagName === 'BUTTON'
30
- // ? focusableElOrWrapper
31
- // : focusableElOrWrapper.querySelector('[role=button], button'))
32
- // );
33
- // }
34
-
35
- // get _invokerNode() {
36
- // const ctor = this.constructor;
37
- // if (!this.__invokerNode) {
38
- // const slottedNode = Array.from(this.children).find(child => child.slot === 'invoker');
39
- // if (slottedNode) {
40
- // this.__invokerNode = ctor._getFocusableInvokerEl(slottedNode);
41
- // } else {
42
- // this.__invokerNode =
43
- // this.previousElementSibling?.hasAttribute('data-invoker') &&
44
- // ctor._getFocusableInvokerEl(this.previousElementSibling);
45
- // }
46
- // }
47
- // return this.__invokerNode;
48
- // }
49
-
50
- // get _contentNode() {
51
- // if (!this._cachedOverlayContentNode) {
52
- // this._cachedOverlayContentNode = Array.from(this.children).find(
53
- // child => child.slot === 'content',
54
- // );
55
- // }
56
- // return this._cachedOverlayContentNode;
57
- // }
58
-
59
- // constructor() {
60
- // super();
61
- // this.opened = false;
62
- // /**
63
- // * @type {'click'|'hover'}
64
- // */
65
- // this.invokerInteraction = 'click';
66
- // /**
67
- // * Puts focus on `_contentNode` on open and on `_invokerNode` on close.
68
- // * @type {Boolean}
69
- // */
70
- // this.handleFocus = false;
71
- // this.__disclosureNeedsSetup = true;
72
-
73
- // this.toggle = this.toggle.bind(this);
74
- // this.open = this.open.bind(this);
75
- // this.close = this.close.bind(this);
76
-
77
- // this.__handleAnimateComplete = this.__handleAnimateComplete.bind(this);
78
-
79
- // this.__onInvokerMouseenter = this.__onInvokerMouseenter.bind(this);
80
- // this.__onContentMouseenter = this.__onContentMouseenter.bind(this);
81
- // this.__onInvokerMouseleave = this.__onInvokerMouseleave.bind(this);
82
- // this.__onContentMouseleave = this.__onContentMouseleave.bind(this);
83
- // }
84
-
85
- // connectedCallback() {
86
- // super.connectedCallback();
87
- // // we do a setup after every connectedCallback as firstUpdated will only be called once
88
- // this.__disclosureNeedsSetup = true;
89
- // this.updateComplete.then(() => {
90
- // if (this.__disclosureNeedsSetup) {
91
- // this._setupDisclosure();
92
- // }
93
- // this.__disclosureNeedsSetup = false;
94
- // });
95
- // this.__setupAnimation();
96
- // }
97
-
98
- // disconnectedCallback() {
99
- // super.disconnectedCallback();
100
- // this._teardownDisclosure();
101
- // this.__teardownAnimation();
102
- // }
103
-
104
- // /**
105
- // * @overridable
106
- // */
107
- // _setupDisclosure() {
108
- // console.log('_setupDisclosure', this.level);
109
-
110
- // this._setupOpenCloseListeners();
111
- // }
112
-
113
- // /**
114
- // * @overridable
115
- // */
116
- // _teardownDisclosure() {
117
- // this._teardownOpenCloseListeners();
118
- // }
119
-
120
- // /**
121
- // * @overridable
122
- // */
123
- // _setupOpenCloseListeners() {
124
- // console.log('setup listeners', this.level);
125
- // if (!this._invokerNode) {
126
- // return;
127
- // }
128
-
129
- // const interactions = this.invokerInteraction.split(' ');
130
-
131
- // if (interactions.includes('hover')) {
132
- // this._invokerNode.addEventListener('mouseenter', this.__onInvokerMouseenter);
133
- // this._contentNode?.addEventListener('mouseenter', this.__onContentMouseenter);
134
- // this._invokerNode.addEventListener('mouseleave', this.__onInvokerMouseleave);
135
- // this._contentNode?.addEventListener('mouseleave', this.__onContentMouseleave);
136
- // }
137
- // if (interactions.includes('click')) {
138
- // this._invokerNode.addEventListener('click', this.toggle);
139
- // }
140
- // }
141
-
142
- // __onInvokerMouseenter() {
143
- // this.__invokerHover = true;
144
- // this.open();
145
- // }
146
-
147
- // __onContentMouseenter() {
148
- // this.__contentHover = true;
149
- // console.log('this.__contentHover', this.__contentHover);
150
- // this.open();
151
- // }
152
-
153
- // __onInvokerMouseleave() {
154
- // setTimeout(() => {
155
- // if (!this.__contentHover) {
156
- // this.close();
157
- // }
158
- // });
159
- // this.__invokerHover = false;
160
- // }
161
-
162
- // __onContentMouseleave() {
163
- // setTimeout(() => {
164
- // if (!this.__invokerHover) {
165
- // this.close();
166
- // }
167
- // });
168
- // this.__contentHover = false;
169
- // }
170
-
171
- // /**
172
- // * @overridable
173
- // */
174
- // _teardownOpenCloseListeners() {
175
- // if (!this._invokerNode) {
176
- // return;
177
- // }
178
-
179
- // this._invokerNode.removeEventListener('mouseenter', this.open);
180
- // this._invokerNode.removeEventListener('mouseleave', this.close);
181
- // this._contentNode?.removeEventListener('mouseenter', this.open);
182
- // this._contentNode?.removeEventListener('mouseleave', this.close);
183
-
184
- // // console.log(this, 'removetCLick');
185
-
186
- // this._invokerNode.removeEventListener('click', this.toggle);
187
- // }
188
-
189
- // // TODO: fire event on updated?
190
- // /**
191
- // * @override
192
- // * @param {string} name
193
- // * @param {any} oldValue
194
- // */
195
- // requestUpdate(name, oldValue) {
196
- // super.requestUpdate(name, oldValue);
197
- // if (name === 'opened') {
198
- // this.dispatchEvent(new Event('opened-changed'));
199
- // }
200
- // }
201
-
202
- // /**
203
- // * @param {import('lit-element').PropertyValues } changedProperties
204
- // */
205
- // updated(changedProperties) {
206
- // super.updated(changedProperties);
207
-
208
- // if (changedProperties.has('opened')) {
209
- // this._onOpenedChanged();
210
- // }
211
- // }
212
-
213
- // /**
214
- // * @param {import('lit-element').PropertyValues } changedProperties
215
- // */
216
- // firstUpdated(changedProperties) {
217
- // super.firstUpdated(changedProperties);
218
- // this._onOpenedChanged();
219
-
220
- // if (this.handleFocus && !this._contentNode?.hasAttribute('tabindex')) {
221
- // this._contentNode?.setAttribute('tabindex', '-1');
222
- // }
223
- // }
224
-
225
- // /**
226
- // * @overridable
227
- // */
228
- // async _onOpenedChanged() {
229
- // this._invokerNode.setAttribute('aria-expanded', `${this.opened}`);
230
-
231
- // if (this.opened) {
232
- // this._contentNode.style.setProperty('display', '');
233
- // await this._showAnimation({ contentNode: this._contentNode });
234
- // this._onDisclosureShow();
235
- // } else {
236
- // this._onDisclosureHide();
237
- // await this._hideAnimation({ contentNode: this._contentNode });
238
- // this._contentNode.style.setProperty('display', 'none');
239
- // }
240
- // }
241
-
242
- // _onDisclosureShow() {
243
- // // if (this.checkedIndex != null) {
244
- // // this.activeIndex = this.checkedIndex;
245
- // // }
246
-
247
- // if (this.handleFocus) {
248
- // this._contentNode.focus();
249
- // }
250
- // }
251
-
252
- // _onDisclosureHide() {
253
- // if (this.handleFocus) {
254
- // this._invokerNode.focus();
255
- // }
256
- // }
257
-
258
- // /**
259
- // * Show animation implementation in sub-classer.
260
- // * @param {{ contentNode: HTMLElement; }} cfg
261
- // */
262
- // // eslint-disable-next-line class-methods-use-this, no-empty-function
263
- // async _showAnimation(cfg) {
264
- // this._refreshAnimateCompletePromise();
265
- // }
266
-
267
- // /**
268
- // * Hide animation implementation in sub-classer.
269
- // * @param {{ contentNode: HTMLElement; }} cfg
270
- // */
271
- // // eslint-disable-next-line class-methods-use-this, no-empty-function
272
- // async _hideAnimation(cfg) {
273
- // this._refreshAnimateCompletePromise();
274
- // }
275
-
276
- // _refreshAnimateCompletePromise() {
277
- // this._animateComplete = new Promise(resolve => {
278
- // // Note that when a lib like GSAP is used, neither 'transitionend' or 'animationend' will be called.
279
- // // In such a case, a subclasser needs to resolve this pending promise by calling this method
280
- // this._resolveAnimateComplete = resolve;
281
- // });
282
- // }
283
-
284
- // __setupAnimation() {
285
- // this._contentNode.addEventListener('transitionend', this.__handleAnimateComplete);
286
- // this._contentNode.addEventListener('animationend', this.__handleAnimateComplete);
287
- // }
288
-
289
- // __teardownAnimation() {
290
- // this._contentNode.removeEventListener('transitionend', this.__handleAnimateComplete);
291
- // this._contentNode.removeEventListener('animationend', this.__handleAnimateComplete);
292
- // }
293
-
294
- // __handleAnimateComplete() {
295
- // if (typeof this._resolveAnimateComplete === 'function') {
296
- // this._resolveAnimateComplete();
297
- // }
298
- // }
299
-
300
- // toggle() {
301
- // // console.log('toggul', this);
302
- // this.opened = !this.opened;
303
- // }
304
-
305
- // open() {
306
- // this.opened = true;
307
- // }
308
-
309
- // close() {
310
- // this.opened = false;
311
- // }
312
- // };
313
- // export const DisclosureMixin = dedupeMixin(DisclosureMixinImplementation);
@@ -1,48 +0,0 @@
1
- import { Constructor } from '@open-wc/dedupe-mixin';
2
- import { LitElement } from 'lit';
3
-
4
- export declare class DisclosureHost {
5
- public opened: Boolean;
6
-
7
- protected get _invokerNode(): HTMLElement;
8
-
9
- protected get _contentNode(): HTMLElement;
10
-
11
- public toggle(): void;
12
-
13
- public open(): void;
14
-
15
- public close(): void;
16
-
17
- protected _onOpenedChanged(): Promise<void>;
18
-
19
- protected _onDisclosureShow(): void;
20
-
21
- protected _onDisclosureHide(): void;
22
-
23
- protected _showAnimation(cfg: object): Promise<void>;
24
-
25
- protected _hideAnimation(cfg: object): Promise<void>;
26
-
27
- protected _refreshAnimateCompletePromise(): void;
28
-
29
- protected _setupOpenCloseListeners(): void;
30
-
31
- protected _teardownOpenCloseListeners(): void;
32
-
33
- private __setupAnimation(): void;
34
-
35
- private __teardownAnimation(): void;
36
-
37
- private __handleAnimateComplete(): void;
38
- }
39
-
40
- export declare function DisclosureImplementation<T extends Constructor<LitElement>>(
41
- superclass: T,
42
- ): T &
43
- Constructor<DisclosureHost> &
44
- DisclosureHost &
45
- Pick<typeof DisclosureHost, keyof typeof DisclosureHost> &
46
- Pick<typeof LitElement, keyof typeof LitElement>;
47
-
48
- export type DisclosureMixin = typeof DisclosureImplementation;
@@ -1,37 +0,0 @@
1
- Allow advanced preprocessing
2
-
3
- - Turn '1' into '01-__-____'
4
- - Turn ’20’ into ’20-’, -> ’20-4’ into ’20-04’ etc…
5
-
6
- See: https://nosir.github.io/cleave.js/(But we should enhance the UX when editing the middle of a date)So:
7
-
8
- ```js
9
- /** * @returns {string | { viewValue:string, caretIndex:number } } */
10
- preprocessor(viewValue, { previousViewValue = ‘’, currentCaretIndex }) {
11
- const diff = viewValue.length - previousViewValue.length;
12
- if (diff === -1) && !isNaN(Number(previousViewValue[currentCaretIndex]))) {
13
- // don’t respond to delete actions
14
- return viewValue;
15
- }
16
-
17
- let newValue = '';
18
- const strippedVal = viewValue.replace('-', '');
19
- let dashesPlaced = 0;
20
- let newCaretIndex;
21
- for (let i = 0; i < 10; i+= 1) {
22
- if (i === 2 || i === 4) {
23
- newValue += ‘-’;
24
- dashesPlaced += 1;
25
- }
26
- else if (i < strippedVal.length + dashesPlaced) {
27
- newValue += strippedVal[i];
28
- } else {
29
- newValue += ‘_’;
30
- if (newCaretIndex === undefined) {
31
- newCaretIndex = i;
32
- }
33
- }
34
- }
35
- return { viewValue: newValue, caretIndex: newCaretIndex };
36
- }
37
- ```