urnovl-web-components 0.0.172 → 0.0.174

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 (442) hide show
  1. package/dist/cjs/index-5ef88da0.js +496 -0
  2. package/dist/cjs/{index-82359396.js → index-8ef53368.js} +65 -2
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/{ur-avatar-19f6840e.js → ur-avatar-297f0f56.js} +1 -1
  5. package/dist/cjs/ur-avatar.cjs.entry.js +2 -2
  6. package/dist/cjs/ur-bottom-sheet.cjs.entry.js +152 -0
  7. package/dist/cjs/ur-button-arrow-left_2.cjs.entry.js +3 -3
  8. package/dist/cjs/{ur-button-3cd788a0.js → ur-button-cc455329.js} +3 -2
  9. package/dist/cjs/ur-button-icon.cjs.entry.js +2 -2
  10. package/dist/cjs/ur-button.cjs.entry.js +2 -2
  11. package/dist/cjs/ur-checkbox-group.cjs.entry.js +2 -2
  12. package/dist/cjs/ur-checkbox.cjs.entry.js +2 -2
  13. package/dist/cjs/ur-chip.cjs.entry.js +2 -2
  14. package/dist/cjs/ur-comment-form.cjs.entry.js +71 -0
  15. package/dist/cjs/ur-dialog.cjs.entry.js +2 -2
  16. package/dist/cjs/ur-form.cjs.entry.js +98 -0
  17. package/dist/cjs/ur-hero.cjs.entry.js +5 -5
  18. package/dist/cjs/ur-linear-progress.cjs.entry.js +3 -3
  19. package/dist/cjs/ur-list-subheader.cjs.entry.js +2 -2
  20. package/dist/cjs/ur-list_3.cjs.entry.js +5 -5
  21. package/dist/cjs/ur-loader.cjs.entry.js +2 -2
  22. package/dist/cjs/ur-locale-filter-button.cjs.entry.js +3 -3
  23. package/dist/cjs/ur-locale-filter-panel.cjs.entry.js +3 -3
  24. package/dist/cjs/ur-logo.cjs.entry.js +2 -2
  25. package/dist/cjs/ur-main-desktop-top-app-bar.cjs.entry.js +10 -4
  26. package/dist/cjs/ur-main-left-menu.cjs.entry.js +3 -3
  27. package/dist/cjs/ur-menu-item.cjs.entry.js +73 -8
  28. package/dist/cjs/ur-navigation-drawer-global.cjs.entry.js +71 -0
  29. package/dist/cjs/ur-navigation-drawer.cjs.entry.js +12 -496
  30. package/dist/cjs/ur-novl-carousel.cjs.entry.js +2 -2
  31. package/dist/cjs/ur-novl.cjs.entry.js +1 -1
  32. package/dist/cjs/ur-page-profile.cjs.entry.js +7 -7
  33. package/dist/cjs/ur-page.cjs.entry.js +4 -4
  34. package/dist/cjs/ur-profile.cjs.entry.js +4 -4
  35. package/dist/cjs/ur-radio-button.cjs.entry.js +2 -2
  36. package/dist/cjs/ur-radio-group.cjs.entry.js +2 -2
  37. package/dist/cjs/ur-read-mobile-top-app-bar.cjs.entry.js +2 -2
  38. package/dist/cjs/ur-read-rail-mobile.cjs.entry.js +3 -3
  39. package/dist/cjs/ur-read-rail.cjs.entry.js +3 -17
  40. package/dist/cjs/ur-read-top-app-bar.cjs.entry.js +112 -0
  41. package/dist/cjs/ur-reader.cjs.entry.js +2 -2
  42. package/dist/cjs/ur-segment-button.cjs.entry.js +2 -2
  43. package/dist/cjs/ur-select.cjs.entry.js +2 -2
  44. package/dist/cjs/ur-switch.cjs.entry.js +2 -2
  45. package/dist/cjs/ur-tabs.cjs.entry.js +2 -2
  46. package/dist/cjs/ur-text-field.cjs.entry.js +2 -2
  47. package/dist/cjs/ur-thumbs-rating.cjs.entry.js +42 -0
  48. package/dist/cjs/ur-tooltip.cjs.entry.js +2 -2
  49. package/dist/cjs/ur-top-app-bar.cjs.entry.js +3 -3
  50. package/dist/cjs/ur-user-profile.cjs.entry.js +2 -2
  51. package/dist/cjs/ur-user.cjs.entry.js +4 -4
  52. package/dist/cjs/ur-wizard-step.cjs.entry.js +99 -0
  53. package/dist/cjs/urnovl-web-components.cjs.js +2 -2
  54. package/dist/collection/collection-manifest.json +8 -2
  55. package/dist/collection/components/ur-bottom-sheet/ur-bottom-sheet.css +76 -0
  56. package/dist/collection/components/ur-bottom-sheet/ur-bottom-sheet.js +299 -0
  57. package/dist/collection/components/ur-button/ur-button.js +22 -1
  58. package/dist/collection/components/ur-button-arrow-left/ur-button-arrow-left.js +1 -1
  59. package/dist/collection/components/ur-button-arrow-right/ur-button-arrow-right.js +1 -1
  60. package/dist/collection/components/ur-button-icon/ur-button-icon.js +1 -1
  61. package/dist/collection/components/ur-checkbox/ur-checkbox.js +1 -1
  62. package/dist/collection/components/ur-checkbox-group/ur-checkbox-group.js +1 -1
  63. package/dist/collection/components/ur-chip/ur-chip.js +1 -1
  64. package/dist/collection/components/ur-comment-form/ur-comment-form.css +76 -0
  65. package/dist/collection/components/ur-comment-form/ur-comment-form.js +272 -0
  66. package/dist/collection/components/ur-dialog/ur-dialog.js +1 -1
  67. package/dist/collection/components/ur-form/ur-form.css +0 -0
  68. package/dist/collection/components/ur-form/ur-form.js +196 -0
  69. package/dist/collection/components/ur-hero/ur-hero.js +4 -4
  70. package/dist/collection/components/ur-linear-progress/ur-linear-progress.js +2 -2
  71. package/dist/collection/components/ur-list/ur-list-item.js +2 -2
  72. package/dist/collection/components/ur-list/ur-list-subheader.js +1 -1
  73. package/dist/collection/components/ur-list/ur-list.js +1 -1
  74. package/dist/collection/components/ur-loader/ur-loader.js +1 -1
  75. package/dist/collection/components/ur-locale-filter-button/ur-locale-filter-button.js +2 -2
  76. package/dist/collection/components/ur-locale-filter-panel/ur-locale-filter-panel.js +2 -2
  77. package/dist/collection/components/ur-logo/ur-logo.js +1 -1
  78. package/dist/collection/components/ur-main-desktop-top-app-bar/ur-main-desktop-top-app-bar.css +12 -2
  79. package/dist/collection/components/ur-main-desktop-top-app-bar/ur-main-desktop-top-app-bar.js +22 -2
  80. package/dist/collection/components/ur-main-left-menu/ur-main-left-menu.js +2 -2
  81. package/dist/collection/components/ur-menu-item/ur-menu-item.css +75 -6
  82. package/dist/collection/components/ur-menu-item/ur-menu-item.js +177 -15
  83. package/dist/collection/components/ur-menu-profile/ur-menu-profile.js +1 -1
  84. package/dist/collection/components/ur-navigation-drawer/ur-navigation-drawer.css +18 -0
  85. package/dist/collection/components/ur-navigation-drawer/ur-navigation-drawer.js +1 -1
  86. package/dist/collection/components/ur-navigation-drawer-global/ur-navigation-drawer-global.css +44 -0
  87. package/dist/collection/components/ur-navigation-drawer-global/ur-navigation-drawer-global.js +187 -0
  88. package/dist/collection/components/ur-novl-carousel/ur-novl-carousel.js +1 -1
  89. package/dist/collection/components/ur-page/ur-page.js +3 -3
  90. package/dist/collection/components/ur-page-profile/ur-page-profile.js +4 -4
  91. package/dist/collection/components/ur-profile/ur-profile.js +3 -3
  92. package/dist/collection/components/ur-radio-button/ur-radio-button.js +1 -1
  93. package/dist/collection/components/ur-radio-group/ur-radio-group.js +1 -1
  94. package/dist/collection/components/ur-read-mobile-top-app-bar/ur-read-mobile-top-app-bar.js +1 -1
  95. package/dist/collection/components/ur-read-rail/ur-read-rail.js +2 -16
  96. package/dist/collection/components/ur-read-rail-mobile/ur-read-rail-mobile.js +2 -2
  97. package/dist/collection/components/{ur-read-desktop-top-app-bar/ur-read-desktop-top-app-bar.js → ur-read-top-app-bar/ur-read-top-app-bar.js} +106 -5
  98. package/dist/collection/components/ur-reader/ur-reader.js +1 -1
  99. package/dist/collection/components/ur-segment-button/ur-segment-button.js +1 -1
  100. package/dist/collection/components/ur-select/ur-select.js +1 -1
  101. package/dist/collection/components/ur-switch/ur-switch.js +1 -1
  102. package/dist/collection/components/ur-tabs/ur-tabs.js +1 -1
  103. package/dist/collection/components/ur-text-field/ur-text-field.js +1 -1
  104. package/dist/collection/components/ur-thumbs-rating/ur-thumbs-rating.css +26 -0
  105. package/dist/collection/components/ur-thumbs-rating/ur-thumbs-rating.js +157 -0
  106. package/dist/collection/components/ur-tooltip/ur-tooltip.js +1 -1
  107. package/dist/collection/components/ur-top-app-bar/ur-top-app-bar.js +2 -2
  108. package/dist/collection/components/ur-user/ur-user.js +3 -3
  109. package/dist/collection/components/ur-user-profile/ur-user-profile.js +1 -1
  110. package/dist/collection/components/ur-wizard/ur-wizard.js +0 -0
  111. package/dist/collection/components/ur-wizard-step/ur-wizard-step.css +36 -0
  112. package/dist/collection/components/ur-wizard-step/ur-wizard-step.js +402 -0
  113. package/dist/collection/stories/BottomSheet.stories.js +85 -0
  114. package/dist/collection/stories/CommentForm.stories.js +100 -0
  115. package/dist/collection/stories/Form.stories.js +141 -0
  116. package/dist/collection/stories/MenuItem.stories.js +105 -0
  117. package/dist/collection/stories/NavigationDrawerGlobal.stories.js +96 -0
  118. package/dist/collection/stories/NavigationDrawerLocale.stories.js +74 -0
  119. package/dist/collection/stories/ReadRail.stories.js +90 -38
  120. package/dist/collection/stories/{ReadDesktopTopAppBar.stories.js → ReadTopAppBar.stories.js} +55 -10
  121. package/dist/collection/stories/Reader.stories.js +86 -41
  122. package/dist/collection/stories/ThumbsRating.stories.js +90 -0
  123. package/dist/collection/stories/WizardStep.stories.js +112 -0
  124. package/dist/components/index.js +1 -1
  125. package/dist/components/{p-a9079ed1.js → p-02681f97.js} +1 -1
  126. package/dist/components/{p-0cdb719d.js → p-0bdb799a.js} +1 -1
  127. package/dist/components/{p-5012bc4b.js → p-0ec3e488.js} +6 -7
  128. package/dist/components/{p-9aed892a.js → p-1554fe97.js} +9 -10
  129. package/dist/components/{p-d6c43122.js → p-2adc9b3a.js} +1 -1
  130. package/dist/components/{p-52a4eade.js → p-2e575d2f.js} +7 -8
  131. package/dist/components/{p-4a9619e1.js → p-42b8a48f.js} +9 -2
  132. package/dist/components/p-4c2541e3.js +154 -0
  133. package/dist/components/{p-0d84a5e3.js → p-4f33abe4.js} +6 -7
  134. package/dist/components/{p-abb21474.js → p-5104e8fb.js} +1 -1
  135. package/dist/components/{p-891b2fa5.js → p-5217a6ee.js} +2 -2
  136. package/dist/components/{p-78f40bf6.js → p-5b46abb7.js} +3 -3
  137. package/dist/components/{p-930f05f5.js → p-5df78c40.js} +10 -11
  138. package/dist/components/{p-39eb0448.js → p-63c09451.js} +54 -3
  139. package/dist/components/{p-fd3f9728.js → p-6feaa2bf.js} +3 -4
  140. package/dist/components/{p-fe445e31.js → p-70a1fc21.js} +2 -2
  141. package/dist/components/{p-b4b78a44.js → p-716bb336.js} +5 -5
  142. package/dist/components/{p-47154fb2.js → p-73066e25.js} +1 -1
  143. package/dist/components/{p-bbe40f48.js → p-739058fb.js} +8 -2
  144. package/dist/components/{p-af03fe1d.js → p-8583d142.js} +1 -1
  145. package/dist/components/{p-96fec75d.js → p-8a79f02a.js} +4 -5
  146. package/dist/components/{p-c15c01fd.js → p-8a8918f8.js} +3 -3
  147. package/dist/components/{p-4f4ffcfd.js → p-92f0b613.js} +1 -1
  148. package/dist/components/{p-57f7c935.js → p-9407d361.js} +1 -1
  149. package/dist/components/{p-ff1b0d0c.js → p-95dad41f.js} +3 -3
  150. package/dist/components/{p-cab0f676.js → p-af250af7.js} +3 -3
  151. package/dist/components/{p-a5cf589c.js → p-b14baf11.js} +1 -1
  152. package/dist/components/{p-1d1367ce.js → p-beb09372.js} +1 -1
  153. package/dist/components/{p-5ba92bef.js → p-bedbe8d1.js} +3 -3
  154. package/dist/components/{p-35288657.js → p-c2d2ab43.js} +3 -3
  155. package/dist/components/p-c55f88af.js +494 -0
  156. package/dist/components/{p-6343eeb0.js → p-c646389a.js} +8 -9
  157. package/dist/components/{p-503f1e3d.js → p-d19503a2.js} +12 -14
  158. package/dist/components/{p-7c89be8c.js → p-d2ad0478.js} +1 -1
  159. package/dist/components/{p-35553bb7.js → p-ddfcf070.js} +2 -2
  160. package/dist/components/{p-8da2213f.js → p-e3ec926d.js} +2 -2
  161. package/dist/components/{p-3975e7ff.js → p-ef5eda24.js} +1 -1
  162. package/dist/components/{p-269ef41b.js → p-f083a988.js} +2 -2
  163. package/dist/components/{p-1a79b54a.js → p-f0f6d175.js} +1 -1
  164. package/dist/components/{p-fc419ab6.js → p-f7c0af1d.js} +6 -4
  165. package/dist/components/{p-57097918.js → p-fb4bfb39.js} +1 -1
  166. package/dist/components/{p-d34e144e.js → p-ffbae37b.js} +2 -2
  167. package/dist/components/ur-avatar.js +1 -1
  168. package/dist/components/ur-bottom-sheet.d.ts +11 -0
  169. package/dist/components/ur-bottom-sheet.js +178 -0
  170. package/dist/components/ur-button-arrow-left.js +1 -1
  171. package/dist/components/ur-button-arrow-right.js +1 -1
  172. package/dist/components/ur-button-icon.js +1 -1
  173. package/dist/components/ur-button.js +1 -1
  174. package/dist/components/ur-checkbox-group.js +3 -3
  175. package/dist/components/ur-checkbox.js +1 -1
  176. package/dist/components/ur-chip.js +3 -3
  177. package/dist/components/ur-comment-form.d.ts +11 -0
  178. package/dist/components/ur-comment-form.js +119 -0
  179. package/dist/components/ur-dialog.js +8 -10
  180. package/dist/components/ur-form.d.ts +11 -0
  181. package/dist/components/ur-form.js +116 -0
  182. package/dist/components/ur-hero.js +6 -6
  183. package/dist/components/ur-linear-progress.js +3 -3
  184. package/dist/components/ur-list-item.js +1 -1
  185. package/dist/components/ur-list-subheader.js +2 -2
  186. package/dist/components/ur-list.js +1 -1
  187. package/dist/components/ur-loader.js +2 -2
  188. package/dist/components/ur-locale-filter-button.js +4 -4
  189. package/dist/components/ur-locale-filter-panel.js +6 -6
  190. package/dist/components/ur-logo.js +1 -1
  191. package/dist/components/ur-main-desktop-top-app-bar.js +20 -8
  192. package/dist/components/ur-main-left-menu.js +10 -10
  193. package/dist/components/ur-menu-item.js +85 -9
  194. package/dist/components/ur-menu-profile.js +1 -1
  195. package/dist/components/ur-navigation-drawer-global.d.ts +11 -0
  196. package/dist/components/ur-navigation-drawer-global.js +83 -0
  197. package/dist/components/ur-navigation-drawer.js +4 -498
  198. package/dist/components/ur-novl-carousel.js +5 -5
  199. package/dist/components/ur-novl.js +1 -1
  200. package/dist/components/ur-page-profile.js +7 -7
  201. package/dist/components/ur-page.js +5 -5
  202. package/dist/components/ur-profile.js +5 -5
  203. package/dist/components/ur-radio-button.js +3 -3
  204. package/dist/components/ur-radio-group.js +9 -10
  205. package/dist/components/ur-read-mobile-top-app-bar.js +5 -5
  206. package/dist/components/ur-read-rail-mobile.js +5 -5
  207. package/dist/components/ur-read-rail.js +6 -20
  208. package/dist/components/ur-read-top-app-bar.d.ts +11 -0
  209. package/dist/components/ur-read-top-app-bar.js +133 -0
  210. package/dist/components/ur-reader.js +5 -5
  211. package/dist/components/ur-segment-button.js +11 -12
  212. package/dist/components/ur-select.js +16 -17
  213. package/dist/components/ur-switch.js +11 -13
  214. package/dist/components/ur-tabs.js +9 -11
  215. package/dist/components/ur-text-field.js +1 -152
  216. package/dist/components/ur-thumbs-rating.d.ts +11 -0
  217. package/dist/components/ur-thumbs-rating.js +68 -0
  218. package/dist/components/ur-tooltip.js +1 -1
  219. package/dist/components/ur-top-app-bar.js +8 -9
  220. package/dist/components/ur-user-profile.js +2 -2
  221. package/dist/components/ur-user.js +5 -5
  222. package/dist/components/ur-wizard-step.d.ts +11 -0
  223. package/dist/components/ur-wizard-step.js +134 -0
  224. package/dist/esm/{index-f0fada10.js → index-54bc0034.js} +65 -2
  225. package/dist/esm/index-71f3652c.js +494 -0
  226. package/dist/esm/loader.js +3 -3
  227. package/dist/esm/{ur-avatar-9281dd67.js → ur-avatar-b6fee71f.js} +1 -1
  228. package/dist/esm/ur-avatar.entry.js +2 -2
  229. package/dist/esm/ur-bottom-sheet.entry.js +148 -0
  230. package/dist/esm/ur-button-arrow-left_2.entry.js +3 -3
  231. package/dist/esm/{ur-button-b218cac8.js → ur-button-e66df42d.js} +3 -2
  232. package/dist/esm/ur-button-icon.entry.js +2 -2
  233. package/dist/esm/ur-button.entry.js +2 -2
  234. package/dist/esm/ur-checkbox-group.entry.js +2 -2
  235. package/dist/esm/ur-checkbox.entry.js +2 -2
  236. package/dist/esm/ur-chip.entry.js +2 -2
  237. package/dist/esm/ur-comment-form.entry.js +67 -0
  238. package/dist/esm/ur-dialog.entry.js +2 -2
  239. package/dist/esm/ur-form.entry.js +94 -0
  240. package/dist/esm/ur-hero.entry.js +5 -5
  241. package/dist/esm/ur-linear-progress.entry.js +3 -3
  242. package/dist/esm/ur-list-subheader.entry.js +2 -2
  243. package/dist/esm/ur-list_3.entry.js +5 -5
  244. package/dist/esm/ur-loader.entry.js +2 -2
  245. package/dist/esm/ur-locale-filter-button.entry.js +3 -3
  246. package/dist/esm/ur-locale-filter-panel.entry.js +3 -3
  247. package/dist/esm/ur-logo.entry.js +2 -2
  248. package/dist/esm/ur-main-desktop-top-app-bar.entry.js +10 -4
  249. package/dist/esm/ur-main-left-menu.entry.js +3 -3
  250. package/dist/esm/ur-menu-item.entry.js +73 -8
  251. package/dist/esm/ur-navigation-drawer-global.entry.js +67 -0
  252. package/dist/esm/ur-navigation-drawer.entry.js +12 -496
  253. package/dist/esm/ur-novl-carousel.entry.js +2 -2
  254. package/dist/esm/ur-novl.entry.js +1 -1
  255. package/dist/esm/ur-page-profile.entry.js +7 -7
  256. package/dist/esm/ur-page.entry.js +4 -4
  257. package/dist/esm/ur-profile.entry.js +4 -4
  258. package/dist/esm/ur-radio-button.entry.js +2 -2
  259. package/dist/esm/ur-radio-group.entry.js +2 -2
  260. package/dist/esm/ur-read-mobile-top-app-bar.entry.js +2 -2
  261. package/dist/esm/ur-read-rail-mobile.entry.js +3 -3
  262. package/dist/esm/ur-read-rail.entry.js +3 -17
  263. package/dist/esm/ur-read-top-app-bar.entry.js +108 -0
  264. package/dist/esm/ur-reader.entry.js +2 -2
  265. package/dist/esm/ur-segment-button.entry.js +2 -2
  266. package/dist/esm/ur-select.entry.js +2 -2
  267. package/dist/esm/ur-switch.entry.js +2 -2
  268. package/dist/esm/ur-tabs.entry.js +2 -2
  269. package/dist/esm/ur-text-field.entry.js +2 -2
  270. package/dist/esm/ur-thumbs-rating.entry.js +38 -0
  271. package/dist/esm/ur-tooltip.entry.js +2 -2
  272. package/dist/esm/ur-top-app-bar.entry.js +3 -3
  273. package/dist/esm/ur-user-profile.entry.js +2 -2
  274. package/dist/esm/ur-user.entry.js +4 -4
  275. package/dist/esm/ur-wizard-step.entry.js +95 -0
  276. package/dist/esm/urnovl-web-components.js +3 -3
  277. package/dist/types/components/ur-bottom-sheet/ur-bottom-sheet.d.ts +26 -0
  278. package/dist/types/components/ur-button/ur-button.d.ts +1 -0
  279. package/dist/types/components/ur-comment-form/ur-comment-form.d.ts +28 -0
  280. package/dist/types/components/ur-form/ur-form.d.ts +34 -0
  281. package/dist/types/components/ur-main-desktop-top-app-bar/ur-main-desktop-top-app-bar.d.ts +2 -0
  282. package/dist/types/components/ur-menu-item/ur-menu-item.d.ts +15 -3
  283. package/dist/types/components/ur-navigation-drawer-global/ur-navigation-drawer-global.d.ts +23 -0
  284. package/dist/types/components/ur-read-rail/ur-read-rail.d.ts +0 -2
  285. package/dist/types/components/{ur-read-desktop-top-app-bar/ur-read-desktop-top-app-bar.d.ts → ur-read-top-app-bar/ur-read-top-app-bar.d.ts} +10 -1
  286. package/dist/types/components/ur-thumbs-rating/ur-thumbs-rating.d.ts +12 -0
  287. package/dist/types/components/ur-wizard/ur-wizard.d.ts +0 -0
  288. package/dist/types/components/ur-wizard-step/ur-wizard-step.d.ts +55 -0
  289. package/dist/types/components.d.ts +440 -77
  290. package/dist/types/stories/BottomSheet.stories.d.ts +22 -0
  291. package/dist/types/stories/CommentForm.stories.d.ts +116 -0
  292. package/dist/types/stories/Form.stories.d.ts +64 -0
  293. package/dist/types/stories/MenuItem.stories.d.ts +82 -0
  294. package/dist/types/stories/NavigationDrawerGlobal.stories.d.ts +35 -0
  295. package/dist/types/stories/ReadRail.stories.d.ts +17 -0
  296. package/dist/types/stories/ReadTopAppBar.stories.d.ts +56 -0
  297. package/dist/types/stories/Reader.stories.d.ts +15 -0
  298. package/dist/types/stories/ThumbsRating.stories.d.ts +64 -0
  299. package/dist/types/stories/WizardStep.stories.d.ts +99 -0
  300. package/dist/urnovl-web-components/{p-db497685.entry.js → p-0cf365c5.entry.js} +1 -1
  301. package/dist/urnovl-web-components/{p-00608088.entry.js → p-0edc919e.entry.js} +1 -1
  302. package/dist/urnovl-web-components/{p-b26e314c.entry.js → p-0febcc64.entry.js} +1 -1
  303. package/dist/urnovl-web-components/{p-6dfa23f6.entry.js → p-149fbcba.entry.js} +1 -1
  304. package/dist/urnovl-web-components/p-15f81021.entry.js +1 -0
  305. package/dist/urnovl-web-components/{p-e1b33d5a.js → p-1c4d1d4b.js} +1 -1
  306. package/dist/urnovl-web-components/p-1ffa135c.js +1 -0
  307. package/dist/urnovl-web-components/{p-b3c6dff3.entry.js → p-20219fb7.entry.js} +1 -1
  308. package/dist/urnovl-web-components/p-25042ee6.entry.js +1 -0
  309. package/dist/urnovl-web-components/p-294012fd.entry.js +1 -0
  310. package/{www/build/p-fb114787.entry.js → dist/urnovl-web-components/p-2e7e9312.entry.js} +1 -1
  311. package/dist/urnovl-web-components/{p-de01ab88.entry.js → p-33b6d9b2.entry.js} +1 -1
  312. package/{www/build/p-78b5c0a5.entry.js → dist/urnovl-web-components/p-39326cc8.entry.js} +1 -1
  313. package/dist/urnovl-web-components/p-3c14a49e.entry.js +1 -0
  314. package/dist/urnovl-web-components/{p-275030c9.entry.js → p-4188bc98.entry.js} +1 -1
  315. package/dist/urnovl-web-components/p-45ff07ae.entry.js +3 -0
  316. package/dist/urnovl-web-components/{p-83756f0b.entry.js → p-4b600f41.entry.js} +1 -1
  317. package/dist/urnovl-web-components/{p-4dc78ebe.entry.js → p-4e3d25cf.entry.js} +1 -1
  318. package/{www/build/p-9700e66e.entry.js → dist/urnovl-web-components/p-53b9ad84.entry.js} +2 -2
  319. package/dist/urnovl-web-components/{p-7d3ce8ee.entry.js → p-58d2c9b9.entry.js} +1 -1
  320. package/dist/urnovl-web-components/p-5d136b77.entry.js +1 -0
  321. package/dist/urnovl-web-components/p-68ad5f88.entry.js +1 -0
  322. package/{www/build/p-c879b3df.entry.js → dist/urnovl-web-components/p-6cc3df01.entry.js} +1 -1
  323. package/{www/build/p-ebed8c77.entry.js → dist/urnovl-web-components/p-6e314e43.entry.js} +1 -1
  324. package/dist/urnovl-web-components/{p-e253e90b.entry.js → p-7449f3f4.entry.js} +1 -1
  325. package/{www/build/p-fde7fd21.entry.js → dist/urnovl-web-components/p-777075e1.entry.js} +1 -1
  326. package/dist/urnovl-web-components/p-77bb74b4.entry.js +1 -0
  327. package/dist/urnovl-web-components/p-7a1031b2.entry.js +1 -0
  328. package/{www/build/p-a4bfdd67.entry.js → dist/urnovl-web-components/p-7cb22237.entry.js} +1 -1
  329. package/dist/urnovl-web-components/{p-8a1bfb35.entry.js → p-95cccc52.entry.js} +1 -1
  330. package/{www/build/p-1f64ef6b.entry.js → dist/urnovl-web-components/p-9cdbe38e.entry.js} +1 -1
  331. package/dist/urnovl-web-components/p-9d679890.entry.js +1 -0
  332. package/dist/urnovl-web-components/{p-f1e59d72.entry.js → p-a03f0666.entry.js} +1 -1
  333. package/dist/urnovl-web-components/{p-b068c160.entry.js → p-a2e16f25.entry.js} +1 -1
  334. package/dist/urnovl-web-components/{p-2a57a988.entry.js → p-a5580361.entry.js} +1 -1
  335. package/dist/urnovl-web-components/p-a9e8b998.js +1 -0
  336. package/dist/urnovl-web-components/p-b3dc4035.entry.js +1 -0
  337. package/dist/urnovl-web-components/{p-fbde3ae4.entry.js → p-b645cc3d.entry.js} +1 -1
  338. package/dist/urnovl-web-components/{p-fddd21bb.entry.js → p-b9c6fbb5.entry.js} +1 -1
  339. package/dist/urnovl-web-components/{p-91c84a6b.entry.js → p-bc3f7f1d.entry.js} +1 -1
  340. package/{www/build/p-d81563bc.entry.js → dist/urnovl-web-components/p-c2670ac5.entry.js} +1 -1
  341. package/dist/urnovl-web-components/p-c65611bd.entry.js +1 -0
  342. package/dist/urnovl-web-components/p-c9f1a5a5.js +2 -0
  343. package/dist/urnovl-web-components/p-d938eb8d.entry.js +1 -0
  344. package/dist/urnovl-web-components/p-dbd5fd83.entry.js +1 -0
  345. package/dist/urnovl-web-components/p-e212ef03.entry.js +1 -0
  346. package/dist/urnovl-web-components/p-e4d2b88f.entry.js +1 -0
  347. package/dist/urnovl-web-components/{p-d1c78c7f.entry.js → p-e5088e94.entry.js} +1 -1
  348. package/{www/build/p-daf2b6eb.entry.js → dist/urnovl-web-components/p-eb9c8956.entry.js} +1 -1
  349. package/{www/build/p-1861b158.entry.js → dist/urnovl-web-components/p-f4cc6a24.entry.js} +1 -1
  350. package/dist/urnovl-web-components/{p-dbb539de.entry.js → p-fb939507.entry.js} +1 -1
  351. package/dist/urnovl-web-components/urnovl-web-components.esm.js +1 -1
  352. package/package.json +1 -1
  353. package/www/build/{p-db497685.entry.js → p-0cf365c5.entry.js} +1 -1
  354. package/www/build/{p-00608088.entry.js → p-0edc919e.entry.js} +1 -1
  355. package/www/build/{p-b26e314c.entry.js → p-0febcc64.entry.js} +1 -1
  356. package/www/build/{p-6dfa23f6.entry.js → p-149fbcba.entry.js} +1 -1
  357. package/www/build/p-15f81021.entry.js +1 -0
  358. package/www/build/{p-e1b33d5a.js → p-1c4d1d4b.js} +1 -1
  359. package/www/build/p-1ffa135c.js +1 -0
  360. package/www/build/{p-b3c6dff3.entry.js → p-20219fb7.entry.js} +1 -1
  361. package/www/build/p-25042ee6.entry.js +1 -0
  362. package/www/build/p-294012fd.entry.js +1 -0
  363. package/{dist/urnovl-web-components/p-fb114787.entry.js → www/build/p-2e7e9312.entry.js} +1 -1
  364. package/www/build/{p-de01ab88.entry.js → p-33b6d9b2.entry.js} +1 -1
  365. package/{dist/urnovl-web-components/p-78b5c0a5.entry.js → www/build/p-39326cc8.entry.js} +1 -1
  366. package/www/build/p-3c14a49e.entry.js +1 -0
  367. package/www/build/{p-275030c9.entry.js → p-4188bc98.entry.js} +1 -1
  368. package/www/build/p-45ff07ae.entry.js +3 -0
  369. package/www/build/{p-83756f0b.entry.js → p-4b600f41.entry.js} +1 -1
  370. package/www/build/{p-4dc78ebe.entry.js → p-4e3d25cf.entry.js} +1 -1
  371. package/www/build/p-52223529.js +1 -0
  372. package/{dist/urnovl-web-components/p-9700e66e.entry.js → www/build/p-53b9ad84.entry.js} +2 -2
  373. package/www/build/{p-7d3ce8ee.entry.js → p-58d2c9b9.entry.js} +1 -1
  374. package/www/build/p-5d136b77.entry.js +1 -0
  375. package/www/build/p-68ad5f88.entry.js +1 -0
  376. package/{dist/urnovl-web-components/p-c879b3df.entry.js → www/build/p-6cc3df01.entry.js} +1 -1
  377. package/{dist/urnovl-web-components/p-ebed8c77.entry.js → www/build/p-6e314e43.entry.js} +1 -1
  378. package/www/build/{p-e253e90b.entry.js → p-7449f3f4.entry.js} +1 -1
  379. package/{dist/urnovl-web-components/p-fde7fd21.entry.js → www/build/p-777075e1.entry.js} +1 -1
  380. package/www/build/p-77bb74b4.entry.js +1 -0
  381. package/www/build/p-7a1031b2.entry.js +1 -0
  382. package/{dist/urnovl-web-components/p-a4bfdd67.entry.js → www/build/p-7cb22237.entry.js} +1 -1
  383. package/www/build/{p-8a1bfb35.entry.js → p-95cccc52.entry.js} +1 -1
  384. package/{dist/urnovl-web-components/p-1f64ef6b.entry.js → www/build/p-9cdbe38e.entry.js} +1 -1
  385. package/www/build/p-9d679890.entry.js +1 -0
  386. package/www/build/{p-f1e59d72.entry.js → p-a03f0666.entry.js} +1 -1
  387. package/www/build/{p-b068c160.entry.js → p-a2e16f25.entry.js} +1 -1
  388. package/www/build/{p-2a57a988.entry.js → p-a5580361.entry.js} +1 -1
  389. package/www/build/p-a9e8b998.js +1 -0
  390. package/www/build/p-b3dc4035.entry.js +1 -0
  391. package/www/build/{p-fbde3ae4.entry.js → p-b645cc3d.entry.js} +1 -1
  392. package/www/build/{p-fddd21bb.entry.js → p-b9c6fbb5.entry.js} +1 -1
  393. package/www/build/{p-91c84a6b.entry.js → p-bc3f7f1d.entry.js} +1 -1
  394. package/{dist/urnovl-web-components/p-d81563bc.entry.js → www/build/p-c2670ac5.entry.js} +1 -1
  395. package/www/build/p-c65611bd.entry.js +1 -0
  396. package/www/build/p-c9f1a5a5.js +2 -0
  397. package/www/build/p-d938eb8d.entry.js +1 -0
  398. package/www/build/p-dbd5fd83.entry.js +1 -0
  399. package/www/build/p-e212ef03.entry.js +1 -0
  400. package/www/build/p-e4d2b88f.entry.js +1 -0
  401. package/www/build/{p-d1c78c7f.entry.js → p-e5088e94.entry.js} +1 -1
  402. package/{dist/urnovl-web-components/p-daf2b6eb.entry.js → www/build/p-eb9c8956.entry.js} +1 -1
  403. package/{dist/urnovl-web-components/p-1861b158.entry.js → www/build/p-f4cc6a24.entry.js} +1 -1
  404. package/www/build/{p-dbb539de.entry.js → p-fb939507.entry.js} +1 -1
  405. package/www/build/urnovl-web-components.esm.js +1 -1
  406. package/dist/cjs/ur-read-desktop-top-app-bar.cjs.entry.js +0 -93
  407. package/dist/collection/stories/NavigationDrawer.stories.js +0 -166
  408. package/dist/collection/stories/RandomStory.js +0 -4
  409. package/dist/components/p-9346d8ce.js +0 -10
  410. package/dist/components/p-edc8b221.js +0 -10
  411. package/dist/components/ur-read-desktop-top-app-bar.d.ts +0 -11
  412. package/dist/components/ur-read-desktop-top-app-bar.js +0 -112
  413. package/dist/esm/ur-read-desktop-top-app-bar.entry.js +0 -89
  414. package/dist/types/stories/RandomStory.d.ts +0 -5
  415. package/dist/types/stories/ReadDesktopTopAppBar.stories.d.ts +0 -26
  416. package/dist/urnovl-web-components/p-03b7544a.entry.js +0 -1
  417. package/dist/urnovl-web-components/p-0c1d014f.js +0 -2
  418. package/dist/urnovl-web-components/p-1814afc5.entry.js +0 -1
  419. package/dist/urnovl-web-components/p-3b9e996d.entry.js +0 -1
  420. package/dist/urnovl-web-components/p-3c133b8a.entry.js +0 -1
  421. package/dist/urnovl-web-components/p-56571c66.entry.js +0 -1
  422. package/dist/urnovl-web-components/p-69614d0f.js +0 -1
  423. package/dist/urnovl-web-components/p-7e4c9804.entry.js +0 -1
  424. package/dist/urnovl-web-components/p-b07e1bbb.entry.js +0 -1
  425. package/dist/urnovl-web-components/p-c4547411.entry.js +0 -1
  426. package/dist/urnovl-web-components/p-d968a7fb.entry.js +0 -3
  427. package/dist/urnovl-web-components/p-f48c6b9a.entry.js +0 -1
  428. package/www/build/p-03b7544a.entry.js +0 -1
  429. package/www/build/p-0c1d014f.js +0 -2
  430. package/www/build/p-1814afc5.entry.js +0 -1
  431. package/www/build/p-3b9e996d.entry.js +0 -1
  432. package/www/build/p-3c133b8a.entry.js +0 -1
  433. package/www/build/p-45d80da6.js +0 -1
  434. package/www/build/p-56571c66.entry.js +0 -1
  435. package/www/build/p-69614d0f.js +0 -1
  436. package/www/build/p-7e4c9804.entry.js +0 -1
  437. package/www/build/p-b07e1bbb.entry.js +0 -1
  438. package/www/build/p-c4547411.entry.js +0 -1
  439. package/www/build/p-d968a7fb.entry.js +0 -3
  440. package/www/build/p-f48c6b9a.entry.js +0 -1
  441. /package/dist/collection/components/{ur-read-desktop-top-app-bar/ur-read-desktop-top-app-bar.css → ur-read-top-app-bar/ur-read-top-app-bar.css} +0 -0
  442. /package/dist/types/stories/{NavigationDrawer.stories.d.ts → NavigationDrawerLocale.stories.d.ts} +0 -0
@@ -0,0 +1,496 @@
1
+ 'use strict';
2
+
3
+ const get = require('./get-511a0185.js');
4
+ const ref = require('./ref-05dc0add.js');
5
+ const when = require('./when-56b737f5.js');
6
+ require('./appendTo-18fb250c.js');
7
+ const watch = require('./watch-fc873d99.js');
8
+ const motion = require('./motion-ceba572b.js');
9
+ const scroll = require('./scroll-7a932edc.js');
10
+ const observeResize = require('./observeResize-c91c316e.js');
11
+ const layoutItemBase = require('./layout-item-base-1e29df10.js');
12
+
13
+ /**
14
+ * 断点相关的 js 函数
15
+ * 这些函数直接导出到 mdui 全局对象下,供应用使用。框架内部使用时,为避免循环依赖,从 @mdui/shared 包内导入
16
+ */
17
+ /**
18
+ * 获取断点对象,通过返回的对象可用于判断指定宽度、或指定元素的宽度、或当前窗口宽度与各个断点值的关系
19
+ *
20
+ * * 未传入参数时,获取的是 `window` 的宽度对应的断点对象
21
+ * * 若传入数值,则获取的是该数值宽度对应的断点对象
22
+ * * 若传入 CSS 选择器,则获取的是该选择器对应元素的宽度对应的断点对象
23
+ * * 若传入 HTML 元素,则获取的是该元素的宽度对应的断点对象
24
+ * * 若传入 JQ 对象,则获取的是该 JQ 对象中的元素的宽度对应的断点对象
25
+ *
26
+ * 返回的对象包含以下方法:
27
+ *
28
+ * * `up(breakpoint)`:判断当前宽度是否大于指定断点值
29
+ * * `down(breakpoint)`:判断当前宽度是否小于指定断点值
30
+ * * `only(breakpoint)`:判断当前宽度是否在指定断点值内
31
+ * * `not(breakpoint)`:判断当前宽度是否不在指定断点值内
32
+ * * `between(startBreakpoint, endBreakpoint)`:判断当前宽度是否在指定断点值之间
33
+ */
34
+ const breakpoint = (width) => {
35
+ const window = get.getWindow();
36
+ const document = get.getDocument();
37
+ const computedStyle = window.getComputedStyle(document.documentElement);
38
+ // 容器的宽度
39
+ const containerWidth = get.isElement(width)
40
+ ? get.$(width).innerWidth()
41
+ : get.isNumber(width)
42
+ ? width
43
+ : get.$(window).innerWidth();
44
+ // 断点对应的宽度值
45
+ const getBreakpointValue = (breakpoint) => {
46
+ const width = computedStyle
47
+ .getPropertyValue(`--mdui-breakpoint-${breakpoint}`)
48
+ .toLowerCase();
49
+ return parseFloat(width);
50
+ };
51
+ // 获取比指定断点更大的一个断点
52
+ const getNextBreakpoint = (breakpoint) => {
53
+ switch (breakpoint) {
54
+ case 'xs':
55
+ return 'sm';
56
+ case 'sm':
57
+ return 'md';
58
+ case 'md':
59
+ return 'lg';
60
+ case 'lg':
61
+ return 'xl';
62
+ case 'xl':
63
+ return 'xxl';
64
+ }
65
+ };
66
+ return {
67
+ /**
68
+ * 当前宽度是否大于指定断点值
69
+ * @param breakpoint
70
+ */
71
+ up(breakpoint) {
72
+ return containerWidth >= getBreakpointValue(breakpoint);
73
+ },
74
+ /**
75
+ * 当前宽度是否小于指定断点值
76
+ * @param breakpoint
77
+ */
78
+ down(breakpoint) {
79
+ return containerWidth < getBreakpointValue(breakpoint);
80
+ },
81
+ /**
82
+ * 当前宽度是否在指定断点值内
83
+ * @param breakpoint
84
+ */
85
+ only(breakpoint) {
86
+ if (breakpoint === 'xxl') {
87
+ return this.up(breakpoint);
88
+ }
89
+ else {
90
+ return this.up(breakpoint) && this.down(getNextBreakpoint(breakpoint));
91
+ }
92
+ },
93
+ /**
94
+ * 当前宽度是否不在指定断点值内
95
+ * @param breakpoint
96
+ */
97
+ not(breakpoint) {
98
+ return !this.only(breakpoint);
99
+ },
100
+ /**
101
+ * 当前宽度是否在指定断点值之间
102
+ * @param startBreakpoint
103
+ * @param endBreakpoint
104
+ * @returns
105
+ */
106
+ between(startBreakpoint, endBreakpoint) {
107
+ return this.up(startBreakpoint) && this.down(endBreakpoint);
108
+ },
109
+ };
110
+ };
111
+
112
+ const style = get.i `:host{--shape-corner:var(--mdui-shape-corner-large);--z-index:2200;display:none;position:fixed;top:0;bottom:0;left:0;z-index:1;width:22.5rem}:host([placement=right]){left:initial;right:0}:host([mobile]),:host([modal]:not([modal=false i])){top:0!important;right:0;bottom:0!important;width:initial;z-index:var(--z-index)}:host([placement=right][mobile]),:host([placement=right][modal]:not([modal=false i])){left:0}:host([contained]:not([contained=false i])){position:absolute}.overlay{position:absolute;inset:0;z-index:inherit;background-color:rgba(var(--mdui-color-scrim),.4)}.panel{display:block;position:absolute;top:0;bottom:0;left:0;width:100%;overflow:auto;z-index:inherit;background-color:rgb(var(--mdui-color-surface));box-shadow:var(--mdui-elevation-level0)}:host([mobile]) .panel,:host([modal]:not([modal=false i])) .panel{border-radius:0 var(--shape-corner) var(--shape-corner) 0;max-width:80%;width:22.5rem;background-color:rgb(var(--mdui-color-surface-container-low));box-shadow:var(--mdui-elevation-level1)}:host([placement=right]) .panel{left:initial;right:0}:host([placement=right][mobile]) .panel,:host([placement=right][modal]:not([modal=false i])) .panel{border-radius:var(--shape-corner) 0 0 var(--shape-corner)}`;
113
+
114
+ /**
115
+ * 在手机端,`modal` 始终为 `true`;大于手机端时,`modal` 属性才开始生效
116
+ *
117
+ * @summary 侧边抽屉栏组件
118
+ *
119
+ * ```html
120
+ * <mdui-navigation-drawer>content</mdui-navigation-drawer>
121
+ * ```
122
+ *
123
+ * @event open - 抽屉栏打开之前触发。可以通过调用 `event.preventDefault()` 阻止抽屉栏打开
124
+ * @event opened - 抽屉栏打开动画完成之后触发
125
+ * @event close - 抽屉栏关闭之前触发。可以通过调用 `event.preventDefault()` 阻止抽屉栏关闭
126
+ * @event closed - 抽屉栏关闭动画完成之后触发
127
+ * @event overlay-click - 点击遮罩层时触发
128
+ *
129
+ * @slot - 抽屉栏中的内容
130
+ *
131
+ * @csspart overlay - 遮罩层
132
+ * @csspart panel - 抽屉栏容器
133
+ *
134
+ * @cssprop --shape-corner - 组件的圆角大小。可以指定一个具体的像素值;但更推荐引用[设计令牌](/docs/2/styles/design-tokens#shape-corner)
135
+ * @cssprop --z-index - 组件的 CSS `z-index` 值
136
+ */
137
+ let NavigationDrawer = class NavigationDrawer extends layoutItemBase.LayoutItemBase {
138
+ constructor() {
139
+ super(...arguments);
140
+ /**
141
+ * 是否打开抽屉栏
142
+ */
143
+ this.open = false;
144
+ /**
145
+ * 抽屉栏打开时,是否显示遮罩层
146
+ *
147
+ * 在窄屏设备上(屏幕宽度小于 [`--mdui-breakpoint-md`](/docs/2/styles/design-tokens#breakpoint)),会始终显示遮罩层,无视该参数
148
+ */
149
+ this.modal = false;
150
+ /**
151
+ * 在有遮罩层的情况下,按下 ESC 键是否关闭抽屉栏
152
+ */
153
+ this.closeOnEsc = false;
154
+ /**
155
+ * 点击遮罩层时,是否关闭抽屉栏
156
+ */
157
+ this.closeOnOverlayClick = false;
158
+ /**
159
+ * 抽屉栏的位置。可选值包括:
160
+ *
161
+ * * `left`:左侧
162
+ * * `right`:右侧
163
+ */
164
+ this.placement = 'left';
165
+ /**
166
+ * 默认情况下,抽屉栏相对于 `body` 元素显示。当该参数设置为 `true` 时,抽屉栏将相对于其父元素显示。
167
+ *
168
+ * **Note**:设置该属性时,必须在父元素上手动设置样式 `position: relative; overflow: hidden;`。
169
+ */
170
+ this.contained = false;
171
+ // 断点为 mobile 时为 `true` 时,强制使用遮罩层
172
+ this.mobile = false;
173
+ this.overlayRef = ref.ii();
174
+ this.panelRef = ref.ii();
175
+ this.definedController = new get.DefinedController(this, {
176
+ needDomReady: true,
177
+ });
178
+ }
179
+ get layoutPlacement() {
180
+ return this.placement;
181
+ }
182
+ get lockTarget() {
183
+ return this.contained || this.isParentLayout
184
+ ? this.parentElement
185
+ : document.documentElement;
186
+ }
187
+ get isModal() {
188
+ return this.mobile || this.modal;
189
+ }
190
+ // contained 变更后,修改监听尺寸变化的元素。为 true 时,监听父元素;为 false 时,监听 body
191
+ async onContainedChange() {
192
+ await this.definedController.whenDefined();
193
+ this.observeResize?.unobserve();
194
+ this.setObserveResize();
195
+ }
196
+ onPlacementChange() {
197
+ if (this.isParentLayout) {
198
+ this.layoutManager.updateLayout(this);
199
+ }
200
+ }
201
+ async onMobileChange() {
202
+ if (!this.open || this.isParentLayout || this.contained) {
203
+ return;
204
+ }
205
+ await this.definedController.whenDefined();
206
+ if (this.isModal) {
207
+ scroll.lockScreen(this, this.lockTarget);
208
+ await this.getLockTargetAnimate(false, 0);
209
+ }
210
+ else {
211
+ scroll.unlockScreen(this, this.lockTarget);
212
+ await this.getLockTargetAnimate(true, 0);
213
+ }
214
+ }
215
+ async onOpenChange() {
216
+ let panel = this.panelRef.value;
217
+ let overlay = this.overlayRef.value;
218
+ const isRight = this.placement === 'right';
219
+ const easingLinear = motion.getEasing(this, 'linear');
220
+ const easingEmphasized = motion.getEasing(this, 'emphasized');
221
+ // 在当前 drawer 位于 layout 中时,设置所有 layout-item 和 layout-main 元素的 transition 样式
222
+ const setLayoutTransition = (duration, easing) => {
223
+ get.$(this.layoutManager.getItemsAndMain()).css('transition', get.isNull(duration) ? null : `all ${duration}ms ${easing}`);
224
+ };
225
+ // 停止原有动画
226
+ const stopOldAnimations = async () => {
227
+ const elements = [];
228
+ if (this.isModal) {
229
+ elements.push(overlay, panel);
230
+ }
231
+ else if (!this.isParentLayout) {
232
+ elements.push(this.lockTarget);
233
+ }
234
+ if (this.isParentLayout) {
235
+ const layoutItems = this.layoutManager.getItemsAndMain();
236
+ const layoutIndex = layoutItems.indexOf(this);
237
+ elements.push(...layoutItems.slice(layoutIndex));
238
+ }
239
+ if (!this.isModal && !elements.includes(this)) {
240
+ elements.push(this);
241
+ }
242
+ await Promise.all(elements.map((element) => motion.stopAnimations(element)));
243
+ };
244
+ // 打开
245
+ // 要区分是否首次渲染,首次渲染时不触发事件,不执行动画;非首次渲染,触发事件,执行动画
246
+ if (this.open) {
247
+ const hasUpdated = this.hasUpdated;
248
+ if (!hasUpdated) {
249
+ await this.updateComplete;
250
+ panel = this.panelRef.value;
251
+ overlay = this.overlayRef.value;
252
+ }
253
+ if (hasUpdated) {
254
+ const eventProceeded = this.emit('open', { cancelable: true });
255
+ if (!eventProceeded) {
256
+ return;
257
+ }
258
+ }
259
+ await this.definedController.whenDefined();
260
+ this.style.display = 'block';
261
+ this.originalTrigger = document.activeElement;
262
+ if (this.isModal) {
263
+ this.modalHelper.activate();
264
+ if (!this.contained) {
265
+ scroll.lockScreen(this, this.lockTarget);
266
+ }
267
+ }
268
+ await stopOldAnimations();
269
+ // 设置聚焦
270
+ requestAnimationFrame(() => {
271
+ const autoFocusTarget = this.querySelector('[autofocus]');
272
+ if (autoFocusTarget) {
273
+ autoFocusTarget.focus({ preventScroll: true });
274
+ }
275
+ else {
276
+ panel.focus({ preventScroll: true });
277
+ }
278
+ });
279
+ const duration = motion.getDuration(this, 'long2');
280
+ const animations = [];
281
+ // 模态框 drawer,显示 overlay 动画
282
+ if (this.isModal) {
283
+ animations.push(motion.animateTo(overlay, [{ opacity: 0 }, { opacity: 1, offset: 0.3 }, { opacity: 1 }], {
284
+ duration: hasUpdated ? duration : 0,
285
+ easing: easingLinear,
286
+ }));
287
+ }
288
+ // 不位于 layout 中,父元素 padding 变化的动画
289
+ else if (!this.isParentLayout) {
290
+ animations.push(this.getLockTargetAnimate(true, hasUpdated ? duration : 0));
291
+ }
292
+ // 若位于 layout 中,则 layout-main 的 padding 变化需要有和 drawer 相同的动画
293
+ // 但首次渲染不执行动画
294
+ if (this.isParentLayout && hasUpdated) {
295
+ setLayoutTransition(duration, easingEmphasized);
296
+ this.layoutManager.updateLayout(this);
297
+ }
298
+ // drawer 显示动画
299
+ animations.push(motion.animateTo(this.isModal ? panel : this, [
300
+ { transform: `translateX(${isRight ? '' : '-'}100%)` },
301
+ { transform: 'translateX(0)' },
302
+ ], {
303
+ duration: hasUpdated ? duration : 0,
304
+ easing: easingEmphasized,
305
+ }));
306
+ await Promise.all(animations);
307
+ if (!this.open) {
308
+ return;
309
+ }
310
+ // 若位于 layout 中,则 drawer 动画完成后,移除 layout-main 的动画
311
+ if (this.isParentLayout && hasUpdated) {
312
+ setLayoutTransition(null);
313
+ }
314
+ if (hasUpdated) {
315
+ this.emit('opened');
316
+ }
317
+ }
318
+ else if (this.hasUpdated) {
319
+ // 关闭
320
+ const eventProceeded = this.emit('close', { cancelable: true });
321
+ if (!eventProceeded) {
322
+ return;
323
+ }
324
+ await this.definedController.whenDefined();
325
+ if (this.isModal) {
326
+ this.modalHelper.deactivate();
327
+ }
328
+ await stopOldAnimations();
329
+ const duration = motion.getDuration(this, 'short4');
330
+ const animations = [];
331
+ // 模态框 drawer,显示 overlay 动画
332
+ if (this.isModal) {
333
+ animations.push(motion.animateTo(overlay, [{ opacity: 1 }, { opacity: 0 }], {
334
+ duration,
335
+ easing: easingLinear,
336
+ }));
337
+ }
338
+ // 不位于 layout 中,父元素 padding 变化的动画
339
+ else if (!this.isParentLayout) {
340
+ animations.push(this.getLockTargetAnimate(false, duration));
341
+ }
342
+ // 若位于 layout 中,则 layout-main 的 padding 变化需要有和 drawer 相同的动画
343
+ if (this.isParentLayout) {
344
+ setLayoutTransition(duration, easingEmphasized);
345
+ // 关闭动画开始时,drawer 的宽度不变。等到关闭动画结束,drawer 的宽度才变为 0
346
+ // 为了 layout-main 的动画能在关闭动画开始时就执行,强制调用 updateLayout 更新布局
347
+ this.layoutManager.updateLayout(this, { width: 0 });
348
+ }
349
+ // drawer 显示动画
350
+ animations.push(motion.animateTo(this.isModal ? panel : this, [
351
+ { transform: 'translateX(0)' },
352
+ { transform: `translateX(${isRight ? '' : '-'}100%)` },
353
+ ], { duration, easing: easingEmphasized }));
354
+ await Promise.all(animations);
355
+ if (this.open) {
356
+ return;
357
+ }
358
+ // 若位于 layout 中,则 drawer 动画结束后,移除 layout-main 的动画
359
+ if (this.isParentLayout) {
360
+ setLayoutTransition(null);
361
+ }
362
+ this.style.display = 'none';
363
+ if (this.isModal && !this.contained) {
364
+ scroll.unlockScreen(this, this.lockTarget);
365
+ }
366
+ // 抽屉栏关闭后,恢复焦点到原有的元素上
367
+ const trigger = this.originalTrigger;
368
+ if (get.isFunction(trigger?.focus)) {
369
+ setTimeout(() => trigger.focus());
370
+ }
371
+ this.emit('closed');
372
+ }
373
+ }
374
+ connectedCallback() {
375
+ super.connectedCallback();
376
+ this.modalHelper = new scroll.Modal(this);
377
+ this.definedController.whenDefined().then(() => {
378
+ this.setObserveResize();
379
+ });
380
+ }
381
+ disconnectedCallback() {
382
+ super.disconnectedCallback();
383
+ scroll.unlockScreen(this, this.lockTarget);
384
+ this.observeResize?.unobserve();
385
+ }
386
+ firstUpdated(_changedProperties) {
387
+ super.firstUpdated(_changedProperties);
388
+ this.addEventListener('keydown', (event) => {
389
+ if (this.open &&
390
+ this.closeOnEsc &&
391
+ event.key === 'Escape' &&
392
+ this.isModal) {
393
+ event.stopPropagation();
394
+ this.open = false;
395
+ }
396
+ });
397
+ }
398
+ render() {
399
+ return get.ke `${when.nn(this.isModal, () => get.ke `<div ${ref.Kt(this.overlayRef)} part="overlay" class="overlay" @click="${this.onOverlayClick}"></div>`)}<slot ${ref.Kt(this.panelRef)} part="panel" class="panel" tabindex="0"></slot>`;
400
+ }
401
+ setObserveResize() {
402
+ this.observeResize = observeResize.observeResize(this.contained ? this.parentElement : document.documentElement, () => {
403
+ const target = this.contained ? this.parentElement : undefined;
404
+ this.mobile = breakpoint(target).down('md');
405
+ // 若位于 layout 中,且为模态化,则重新布局时,占据的宽度为 0
406
+ if (this.isParentLayout) {
407
+ this.layoutManager.updateLayout(this, {
408
+ width: this.isModal ? 0 : undefined,
409
+ });
410
+ }
411
+ });
412
+ }
413
+ onOverlayClick() {
414
+ this.emit('overlay-click');
415
+ if (this.closeOnOverlayClick) {
416
+ this.open = false;
417
+ }
418
+ }
419
+ getLockTargetAnimate(open, duration) {
420
+ const paddingName = this.placement === 'right' ? 'paddingRight' : 'paddingLeft';
421
+ const panelWidth = get.$(this.panelRef.value).innerWidth() + 'px';
422
+ return motion.animateTo(this.lockTarget, [
423
+ { [paddingName]: open ? 0 : panelWidth },
424
+ { [paddingName]: open ? panelWidth : 0 },
425
+ ], {
426
+ duration,
427
+ easing: motion.getEasing(this, 'emphasized'),
428
+ fill: 'forwards',
429
+ });
430
+ }
431
+ };
432
+ NavigationDrawer.styles = [get.componentStyle, style];
433
+ get.__decorate([
434
+ get.n({
435
+ type: Boolean,
436
+ reflect: true,
437
+ converter: get.booleanConverter,
438
+ })
439
+ ], NavigationDrawer.prototype, "open", void 0);
440
+ get.__decorate([
441
+ get.n({
442
+ type: Boolean,
443
+ reflect: true,
444
+ converter: get.booleanConverter,
445
+ })
446
+ ], NavigationDrawer.prototype, "modal", void 0);
447
+ get.__decorate([
448
+ get.n({
449
+ type: Boolean,
450
+ reflect: true,
451
+ converter: get.booleanConverter,
452
+ attribute: 'close-on-esc',
453
+ })
454
+ ], NavigationDrawer.prototype, "closeOnEsc", void 0);
455
+ get.__decorate([
456
+ get.n({
457
+ type: Boolean,
458
+ reflect: true,
459
+ converter: get.booleanConverter,
460
+ attribute: 'close-on-overlay-click',
461
+ })
462
+ ], NavigationDrawer.prototype, "closeOnOverlayClick", void 0);
463
+ get.__decorate([
464
+ get.n({ reflect: true })
465
+ // eslint-disable-next-line prettier/prettier
466
+ ], NavigationDrawer.prototype, "placement", void 0);
467
+ get.__decorate([
468
+ get.n({
469
+ type: Boolean,
470
+ reflect: true,
471
+ converter: get.booleanConverter,
472
+ })
473
+ ], NavigationDrawer.prototype, "contained", void 0);
474
+ get.__decorate([
475
+ get.n({
476
+ type: Boolean,
477
+ reflect: true,
478
+ converter: get.booleanConverter,
479
+ })
480
+ ], NavigationDrawer.prototype, "mobile", void 0);
481
+ get.__decorate([
482
+ watch.watch('contained', true)
483
+ ], NavigationDrawer.prototype, "onContainedChange", null);
484
+ get.__decorate([
485
+ watch.watch('placement', true)
486
+ ], NavigationDrawer.prototype, "onPlacementChange", null);
487
+ get.__decorate([
488
+ watch.watch('mobile', true),
489
+ watch.watch('modal', true)
490
+ ], NavigationDrawer.prototype, "onMobileChange", null);
491
+ get.__decorate([
492
+ watch.watch('open')
493
+ ], NavigationDrawer.prototype, "onOpenChange", null);
494
+ NavigationDrawer = get.__decorate([
495
+ get.t('mdui-navigation-drawer')
496
+ ], NavigationDrawer);
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'urnovl-web-components';
24
- const BUILD = /* urnovl-web-components */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
24
+ const BUILD = /* urnovl-web-components */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
25
25
 
26
26
  /*
27
27
  Stencil Client Platform v4.23.0 | MIT Licensed | https://stenciljs.com
@@ -97,6 +97,22 @@ var plt = {
97
97
  rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
98
98
  ce: (eventName, opts) => new CustomEvent(eventName, opts)
99
99
  };
100
+ var supportsListenerOptions = /* @__PURE__ */ (() => {
101
+ let supportsListenerOptions2 = false;
102
+ try {
103
+ doc.addEventListener(
104
+ "e",
105
+ null,
106
+ Object.defineProperty({}, "passive", {
107
+ get() {
108
+ supportsListenerOptions2 = true;
109
+ }
110
+ })
111
+ );
112
+ } catch (e) {
113
+ }
114
+ return supportsListenerOptions2;
115
+ })();
100
116
  var promiseResolve = (v) => Promise.resolve(v);
101
117
  var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
102
118
  try {
@@ -821,6 +837,13 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
821
837
  }
822
838
  let maybePromise;
823
839
  if (isInitialLoad) {
840
+ {
841
+ hostRef.$flags$ |= 256 /* isListenReady */;
842
+ if (hostRef.$queuedListeners$) {
843
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
844
+ hostRef.$queuedListeners$ = void 0;
845
+ }
846
+ }
824
847
  {
825
848
  maybePromise = safeCall(instance, "componentWillLoad");
826
849
  }
@@ -1226,6 +1249,7 @@ var connectedCallback = (elm) => {
1226
1249
  initializeComponent(elm, hostRef, cmpMeta);
1227
1250
  }
1228
1251
  } else {
1252
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1229
1253
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1230
1254
  fireConnectedCallback(hostRef.$lazyInstance$);
1231
1255
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
@@ -1243,6 +1267,12 @@ var disconnectInstance = (instance) => {
1243
1267
  var disconnectedCallback = async (elm) => {
1244
1268
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1245
1269
  const hostRef = getHostRef(elm);
1270
+ {
1271
+ if (hostRef.$rmListeners$) {
1272
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
1273
+ hostRef.$rmListeners$ = void 0;
1274
+ }
1275
+ }
1246
1276
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1247
1277
  disconnectInstance(hostRef.$lazyInstance$);
1248
1278
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
@@ -1282,6 +1312,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1282
1312
  {
1283
1313
  cmpMeta.$members$ = compactMeta[2];
1284
1314
  }
1315
+ {
1316
+ cmpMeta.$listeners$ = compactMeta[3];
1317
+ }
1285
1318
  {
1286
1319
  cmpMeta.$attrsToReflect$ = [];
1287
1320
  }
@@ -1313,9 +1346,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1313
1346
  }
1314
1347
  }
1315
1348
  connectedCallback() {
1316
- getHostRef(this);
1349
+ const hostRef = getHostRef(this);
1317
1350
  if (!this.hasRegisteredEventListeners) {
1318
1351
  this.hasRegisteredEventListeners = true;
1352
+ addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
1319
1353
  }
1320
1354
  if (appLoadFallback) {
1321
1355
  clearTimeout(appLoadFallback);
@@ -1370,6 +1404,35 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1370
1404
  }
1371
1405
  endBootstrap();
1372
1406
  };
1407
+ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1408
+ if (listeners) {
1409
+ listeners.map(([flags, name, method]) => {
1410
+ const target = elm;
1411
+ const handler = hostListenerProxy(hostRef, method);
1412
+ const opts = hostListenerOpts(flags);
1413
+ plt.ael(target, name, handler, opts);
1414
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1415
+ });
1416
+ }
1417
+ };
1418
+ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1419
+ var _a;
1420
+ try {
1421
+ {
1422
+ if (hostRef.$flags$ & 256 /* isListenReady */) {
1423
+ (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
1424
+ } else {
1425
+ (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1426
+ }
1427
+ }
1428
+ } catch (e) {
1429
+ consoleError(e);
1430
+ }
1431
+ };
1432
+ var hostListenerOpts = (flags) => supportsListenerOptions ? {
1433
+ passive: (flags & 1 /* Passive */) !== 0,
1434
+ capture: (flags & 2 /* Capture */) !== 0
1435
+ } : (flags & 2 /* Capture */) !== 0;
1373
1436
 
1374
1437
  // src/runtime/nonce.ts
1375
1438
  var setNonce = (nonce) => plt.$nonce$ = nonce;