urnovl-web-components 0.0.153 → 0.0.154
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.
- package/dist/cjs/{anchor-d8c19f89.js → anchor-60054fb9.js} +12 -12
- package/dist/cjs/appendTo-55674635.js +235 -0
- package/dist/cjs/{button-base-349c4484.js → button-base-1b083de4.js} +52 -51
- package/dist/cjs/check-41154eab.js +14 -0
- package/dist/cjs/children-fb1e1a86.js +18 -0
- package/dist/cjs/class-map-14759be7.js +11 -0
- package/dist/cjs/{default-value-398d3b89.js → default-value-c89bc53d.js} +5 -5
- package/dist/cjs/{form-bdda0b9b.js → form-99470e35.js} +9 -9
- package/dist/cjs/has-slot-cb273eb9.js +57 -0
- package/dist/cjs/{if-defined-e27f8805.js → if-defined-7e2ad69b.js} +2 -2
- package/dist/cjs/{index-60777199.js → index-0f4a0b6f.js} +173 -168
- package/dist/cjs/{index-3b65e71a.js → index-10c3b92d.js} +63 -59
- package/dist/cjs/{index-9b32e2ed.js → index-1687d33e.js} +25 -23
- package/dist/cjs/index-32e5fe53.js +674 -0
- package/dist/cjs/{index-9fc44261.js → index-65d946a7.js} +29 -26
- package/dist/cjs/{index-77a1261e.js → index-703fbbf1.js} +53 -50
- package/dist/cjs/{index-4a388613.js → index-cbe1be8e.js} +8 -3
- package/dist/cjs/index.cjs.js +0 -7
- package/dist/cjs/{index-3e64325e.js → is-3783cb36.js} +80 -1023
- package/dist/cjs/layout-item-base-c62e5efe.js +248 -0
- package/dist/cjs/live-b197ef35.js +11 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{localize-a44b4282.js → localize-b83df35d.js} +2 -2
- package/dist/cjs/{motion-c0ca11c6.js → motion-36411fd6.js} +4 -4
- package/dist/cjs/{observeResize-cce33052.js → observeResize-24f6ea64.js} +2 -2
- package/dist/cjs/ref-c2c9e01c.js +12 -0
- package/dist/cjs/{ripple-mixin-7e22f683.js → ripple-mixin-01f70e13.js} +112 -128
- package/dist/cjs/scroll-bf94d2c2.js +297 -0
- package/dist/cjs/state-613e20ff.js +11 -0
- package/dist/cjs/svg-tag-2fa5fa49.js +11 -0
- package/dist/cjs/template-4077344f.js +7 -0
- package/dist/cjs/top-app-bar-3838462b.js +402 -0
- package/dist/cjs/{ur-avatar-8c7332e6.js → ur-avatar-b1b53360.js} +1 -1
- package/dist/cjs/ur-avatar.cjs.entry.js +2 -2
- package/dist/cjs/ur-button-9d200257.js +24 -0
- package/dist/cjs/ur-button-arrow-left_2.cjs.entry.js +16 -9
- package/dist/cjs/ur-button-icon.cjs.entry.js +18 -11
- package/dist/cjs/ur-button.cjs.entry.js +17 -10
- package/dist/cjs/ur-checkbox.cjs.entry.js +16 -9
- package/dist/cjs/ur-chip.cjs.entry.js +19 -12
- package/dist/cjs/ur-dialog.cjs.entry.js +57 -340
- package/dist/cjs/ur-hero.cjs.entry.js +72 -0
- package/dist/cjs/ur-list-subheader.cjs.entry.js +21 -0
- package/dist/cjs/ur-list_3.cjs.entry.js +345 -0
- package/dist/cjs/ur-loader.cjs.entry.js +2 -2
- package/dist/cjs/ur-locale-filter-button.cjs.entry.js +22 -11
- package/dist/cjs/ur-locale-filter-panel.cjs.entry.js +46 -17
- package/dist/cjs/ur-logo.cjs.entry.js +30 -0
- package/dist/cjs/ur-main-desktop-top-app-bar.cjs.entry.js +44 -0
- package/dist/cjs/ur-main-left-menu.cjs.entry.js +72 -0
- package/dist/cjs/{ur-menu-item-473a06df.js → ur-menu-item-a0b5cd74.js} +77 -72
- package/dist/cjs/ur-menu-item.cjs.entry.js +17 -10
- package/dist/cjs/ur-navigation-drawer.cjs.entry.js +533 -0
- package/dist/cjs/ur-novl-carousel.cjs.entry.js +2 -2
- package/dist/cjs/ur-novl.cjs.entry.js +1 -1
- package/dist/cjs/ur-page-profile.cjs.entry.js +26 -16
- package/dist/cjs/ur-page.cjs.entry.js +4 -4
- package/dist/cjs/ur-profile.cjs.entry.js +19 -12
- package/dist/cjs/ur-radio-button.cjs.entry.js +53 -46
- package/dist/cjs/ur-read-mobile-top-app-bar.cjs.entry.js +46 -0
- package/dist/cjs/ur-segment-button.cjs.entry.js +88 -81
- package/dist/cjs/ur-select.cjs.entry.js +169 -162
- package/dist/cjs/ur-switch.cjs.entry.js +56 -49
- package/dist/cjs/ur-tabs.cjs.entry.js +77 -70
- package/dist/cjs/ur-text-field.cjs.entry.js +23 -16
- package/dist/cjs/ur-top-app-bar.cjs.entry.js +135 -0
- package/dist/cjs/ur-user-profile.cjs.entry.js +2 -2
- package/dist/cjs/ur-user.cjs.entry.js +4 -4
- package/dist/cjs/urnovl-web-components.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +11 -0
- package/dist/collection/components/ur-button/ur-button.css +5 -0
- package/dist/collection/components/ur-button/ur-button.js +19 -1
- package/dist/collection/components/ur-button-icon/ur-button-icon.css +16 -0
- package/dist/collection/components/ur-button-icon/ur-button-icon.js +2 -2
- package/dist/collection/components/ur-chip/ur-chip.js +3 -2
- package/dist/collection/components/ur-dialog/ur-dialog.js +2 -2
- package/dist/collection/components/ur-hero/ur-hero.css +129 -0
- package/dist/collection/components/ur-hero/ur-hero.js +274 -0
- package/dist/collection/components/ur-list/ur-list-item.css +143 -0
- package/dist/collection/components/ur-list/ur-list-item.js +264 -0
- package/dist/collection/components/ur-list/ur-list-subheader.css +7 -0
- package/dist/collection/components/ur-list/ur-list-subheader.js +43 -0
- package/dist/collection/components/ur-list/ur-list.css +9 -0
- package/dist/collection/components/ur-list/ur-list.js +20 -0
- package/dist/collection/components/ur-loader/ur-loader.js +1 -1
- package/dist/collection/components/ur-locale-filter-button/ur-locale-filter-button.css +18 -1
- package/dist/collection/components/ur-locale-filter-button/ur-locale-filter-button.js +23 -1
- package/dist/collection/components/ur-locale-filter-panel/ur-locale-filter-panel.css +25 -16
- package/dist/collection/components/ur-locale-filter-panel/ur-locale-filter-panel.js +77 -13
- package/dist/collection/components/ur-logo/ur-logo.css +8 -0
- package/dist/collection/components/ur-logo/ur-logo.js +124 -0
- package/dist/collection/components/ur-main-desktop-top-app-bar/ur-main-desktop-top-app-bar.css +104 -0
- package/dist/collection/components/ur-main-desktop-top-app-bar/ur-main-desktop-top-app-bar.js +129 -0
- package/dist/collection/components/ur-main-left-menu/ur-main-left-menu.css +248 -0
- package/dist/collection/components/ur-main-left-menu/ur-main-left-menu.js +187 -0
- package/dist/collection/components/ur-menu-item/ur-menu-item.js +2 -2
- package/dist/collection/components/ur-menu-profile/ur-menu-profile.css +86 -0
- package/dist/collection/components/ur-menu-profile/ur-menu-profile.js +100 -0
- package/dist/collection/components/ur-navigation-drawer/ur-navigation-drawer.css +4 -0
- package/dist/collection/components/ur-navigation-drawer/ur-navigation-drawer.js +170 -0
- package/dist/collection/components/ur-novl-carousel/ur-novl-carousel.js +3 -3
- package/dist/collection/components/ur-page/ur-page.js +3 -3
- package/dist/collection/components/ur-page-profile/ur-page-profile.js +4 -4
- package/dist/collection/components/ur-profile/ur-profile.js +3 -3
- package/dist/collection/components/ur-radio-button/ur-radio-button.js +2 -2
- package/dist/collection/components/ur-read-mobile-top-app-bar/ur-read-mobile-top-app-bar.css +48 -0
- package/dist/collection/components/ur-read-mobile-top-app-bar/ur-read-mobile-top-app-bar.js +158 -0
- package/dist/collection/components/ur-segment-button/ur-segment-button.js +3 -3
- package/dist/collection/components/ur-select/ur-select.js +2 -2
- package/dist/collection/components/ur-switch/ur-switch.js +2 -2
- package/dist/collection/components/ur-tabs/ur-tabs.js +6 -6
- package/dist/collection/components/ur-text-field/ur-text-field.js +1 -1
- package/dist/collection/components/ur-top-app-bar/ur-top-app-bar.css +48 -0
- package/dist/collection/components/ur-top-app-bar/ur-top-app-bar.js +145 -0
- package/dist/collection/components/ur-user/ur-user.js +3 -3
- package/dist/collection/components/ur-user-profile/ur-user-profile.js +1 -1
- package/dist/collection/index.js +1 -10
- package/dist/collection/models/locale.js +1 -0
- package/dist/collection/stories/Hero.stories.js +116 -0
- package/dist/collection/stories/List.stories.js +154 -0
- package/dist/collection/stories/ListItem.stories.js +171 -0
- package/dist/collection/stories/MainDesktopTopAppBar.stories.js +26 -0
- package/dist/collection/stories/MainLeftMenu.stories.js +94 -0
- package/dist/collection/stories/MenuProfile.stories.js +55 -0
- package/dist/collection/stories/NavigationDrawer.stories.js +166 -0
- package/dist/collection/stories/NovlFilters.stories.js +33 -37
- package/dist/collection/stories/ReadMobileTopAppBar.stories.js +26 -0
- package/dist/collection/stories/TopAppBar.stories.js +69 -0
- package/dist/collection/stories/UrnovlLogo.stories.js +88 -0
- package/dist/collection/utils/utils.js +10 -3
- package/dist/components/index.js +1 -2
- package/dist/components/{p-e62353b5.js → p-0baf842f.js} +15 -9
- package/dist/components/{p-7b2896c2.js → p-0cdb719d.js} +1 -1
- package/dist/components/{p-29d5f5c4.js → p-13a81287.js} +5 -1
- package/dist/{esm/svg-tag-81da2ce0.js → components/p-1a79b54a.js} +2 -1
- package/dist/components/{p-0b1cfd69.js → p-1d1367ce.js} +2 -2
- package/dist/components/p-269ef41b.js +401 -0
- package/dist/components/{p-8107c4fc.js → p-26d30673.js} +1 -1
- package/dist/{esm/default-value-bb9b5444.js → components/p-3975e7ff.js} +2 -1
- package/dist/components/p-40fd1387.js +86 -0
- package/dist/{esm/anchor-0f73f09f.js → components/p-47154fb2.js} +3 -2
- package/dist/components/p-4a9619e1.js +55 -0
- package/dist/components/p-4f4ffcfd.js +233 -0
- package/dist/components/{p-59fb971f.js → p-5012bc4b.js} +9 -23
- package/dist/components/{p-32e82eb3.js → p-503f1e3d.js} +17 -11
- package/dist/components/{p-b5eb1262.js → p-52a4eade.js} +10 -6
- package/dist/components/p-56acdcc5.js +67 -0
- package/dist/components/{p-b009583e.js → p-5748bc57.js} +1 -1
- package/dist/components/p-57f7c935.js +9 -0
- package/dist/components/p-6b207c18.js +46 -0
- package/dist/components/p-7c89be8c.js +16 -0
- package/dist/components/p-9346d8ce.js +10 -0
- package/dist/components/{p-544c1a6f.js → p-96fec75d.js} +7 -3
- package/dist/components/{p-ea7f0ac0.js → p-9aed892a.js} +12 -7
- package/dist/components/p-a41d45ca.js +81 -0
- package/dist/{esm/live-1ec936c3.js → components/p-a5cf589c.js} +2 -1
- package/dist/components/{p-0c698f3b.js → p-a9079ed1.js} +1 -1
- package/dist/{esm/motion-6f606adb.js → components/p-abb21474.js} +1 -1
- package/dist/components/{p-7d4dd8c1.js → p-b18dc315.js} +1 -1
- package/dist/components/{p-fd043ada.js → p-b4b78a44.js} +8 -6
- package/dist/components/p-bbe40f48.js +764 -0
- package/dist/components/p-cab0f676.js +247 -0
- package/dist/components/p-d34e144e.js +668 -0
- package/dist/components/{p-f2a2508f.js → p-d6c43122.js} +1 -1
- package/dist/components/{p-d1603514.js → p-d733acc5.js} +1 -1
- package/dist/components/{p-b0b45f0d.js → p-e6c43afd.js} +2 -2
- package/dist/components/p-edc8b221.js +10 -0
- package/dist/components/p-ef777a4d.js +260 -0
- package/dist/components/{p-b562e14d.js → p-f3396ec5.js} +2 -2
- package/dist/components/p-f51c1feb.js +48 -0
- package/dist/components/{p-ba0fbfe9.js → p-f9015049.js} +7 -5
- package/dist/components/{p-f679b74c.js → p-fd3f9728.js} +6 -3
- package/dist/components/p-fe445e31.js +293 -0
- package/dist/components/ur-avatar.js +1 -1
- package/dist/components/ur-button-arrow-left.js +1 -1
- package/dist/components/ur-button-arrow-right.js +1 -1
- package/dist/components/ur-button-icon.js +1 -44
- package/dist/components/ur-button.js +1 -1
- package/dist/components/ur-checkbox.js +2 -2
- package/dist/components/ur-chip.js +5 -4
- package/dist/components/ur-dialog.js +12 -295
- package/dist/components/ur-hero.d.ts +11 -0
- package/dist/components/ur-hero.js +105 -0
- package/dist/components/ur-list-item.d.ts +11 -0
- package/dist/components/ur-list-item.js +6 -0
- package/dist/components/ur-list-subheader.d.ts +11 -0
- package/dist/components/ur-list-subheader.js +38 -0
- package/dist/components/ur-list.d.ts +11 -0
- package/dist/components/ur-list.js +6 -0
- package/dist/components/ur-loader.js +2 -2
- package/dist/components/ur-locale-filter-button.js +10 -5
- package/dist/components/ur-locale-filter-panel.js +39 -9
- package/dist/components/ur-logo.d.ts +11 -0
- package/dist/components/ur-logo.js +6 -0
- package/dist/components/ur-main-desktop-top-app-bar.d.ts +11 -0
- package/dist/components/ur-main-desktop-top-app-bar.js +62 -0
- package/dist/components/ur-main-left-menu.d.ts +11 -0
- package/dist/components/ur-main-left-menu.js +138 -0
- package/dist/components/ur-menu-item.js +1 -1
- package/dist/components/ur-menu-profile.d.ts +11 -0
- package/dist/components/ur-menu-profile.js +6 -0
- package/dist/components/ur-navigation-drawer.d.ts +11 -0
- package/dist/components/ur-navigation-drawer.js +555 -0
- package/dist/components/ur-novl-carousel.js +5 -5
- package/dist/components/ur-novl.js +1 -1
- package/dist/components/ur-page-profile.js +11 -8
- package/dist/components/ur-page.js +5 -5
- package/dist/components/ur-profile.js +5 -5
- package/dist/components/ur-radio-button.js +10 -5
- package/dist/components/ur-read-mobile-top-app-bar.d.ts +11 -0
- package/dist/components/ur-read-mobile-top-app-bar.js +64 -0
- package/dist/components/ur-segment-button.js +15 -11
- package/dist/components/ur-select.js +19 -12
- package/dist/components/ur-switch.js +16 -10
- package/dist/components/ur-tabs.js +13 -6
- package/dist/components/ur-text-field.js +3 -3
- package/dist/components/ur-top-app-bar.d.ts +11 -0
- package/dist/components/ur-top-app-bar.js +157 -0
- package/dist/components/ur-user-profile.js +2 -2
- package/dist/components/ur-user.js +5 -5
- package/dist/{components/p-2272b859.js → esm/anchor-bf8e8d48.js} +2 -2
- package/dist/esm/appendTo-7022283c.js +233 -0
- package/dist/esm/{button-base-9d653040.js → button-base-5d6c067c.js} +7 -6
- package/dist/esm/{check-7eec07b0.js → check-26b6e0b9.js} +2 -2
- package/dist/esm/children-0297d4ab.js +16 -0
- package/dist/esm/class-map-573bf048.js +9 -0
- package/dist/{components/p-f48f4a4c.js → esm/default-value-5736394e.js} +1 -1
- package/dist/esm/{form-768c1f53.js → form-bad6b2e6.js} +1 -1
- package/dist/esm/has-slot-beb1360e.js +55 -0
- package/dist/esm/{if-defined-409bae29.js → if-defined-d4ef1802.js} +1 -1
- package/dist/esm/index-05eae1a5.js +667 -0
- package/dist/esm/{index-b7cb3789.js → index-215d6d76.js} +6 -3
- package/dist/esm/{index-416b323a.js → index-35ab9c9d.js} +5 -3
- package/dist/esm/{index-6d4ad6b0.js → index-44032f70.js} +9 -6
- package/dist/esm/{index-8a055ca8.js → index-8e0958ca.js} +16 -11
- package/dist/esm/{index-4dc2872d.js → index-e402ebe8.js} +11 -7
- package/dist/esm/{index-ad09d60e.js → index-fa23999c.js} +8 -3
- package/dist/esm/index.js +1 -1
- package/dist/{components/p-940b89bf.js → esm/is-65d90b1c.js} +71 -1019
- package/dist/esm/layout-item-base-ad45734d.js +246 -0
- package/dist/{components/p-a28ff81d.js → esm/live-414749e8.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{localize-1f29aeeb.js → localize-7c2f35b1.js} +1 -1
- package/dist/{components/p-9fba7d00.js → esm/motion-361cecee.js} +1 -1
- package/dist/esm/{observeResize-8f8427e0.js → observeResize-ddf2b098.js} +1 -1
- package/dist/esm/ref-a3513486.js +9 -0
- package/dist/esm/{ripple-mixin-c1ded4c7.js → ripple-mixin-5f0ae501.js} +8 -23
- package/dist/esm/scroll-e718504c.js +293 -0
- package/dist/esm/state-df6176b9.js +9 -0
- package/dist/{components/p-77c7701b.js → esm/svg-tag-00a56a7f.js} +2 -1
- package/dist/esm/{template-b1166013.js → template-58e012b5.js} +1 -1
- package/dist/esm/top-app-bar-ae781d39.js +400 -0
- package/dist/esm/{ur-avatar-168fcbb1.js → ur-avatar-d5342a0d.js} +1 -1
- package/dist/esm/ur-avatar.entry.js +2 -2
- package/dist/esm/ur-button-58309a7c.js +22 -0
- package/dist/esm/ur-button-arrow-left_2.entry.js +16 -9
- package/dist/esm/ur-button-icon.entry.js +18 -11
- package/dist/esm/ur-button.entry.js +17 -10
- package/dist/esm/ur-checkbox.entry.js +16 -9
- package/dist/esm/ur-chip.entry.js +19 -12
- package/dist/esm/ur-dialog.entry.js +12 -295
- package/dist/esm/ur-hero.entry.js +68 -0
- package/dist/esm/ur-list-subheader.entry.js +17 -0
- package/dist/esm/ur-list_3.entry.js +339 -0
- package/dist/esm/ur-loader.entry.js +2 -2
- package/dist/esm/ur-locale-filter-button.entry.js +22 -11
- package/dist/esm/ur-locale-filter-panel.entry.js +46 -17
- package/dist/esm/ur-logo.entry.js +26 -0
- package/dist/esm/ur-main-desktop-top-app-bar.entry.js +40 -0
- package/dist/esm/ur-main-left-menu.entry.js +68 -0
- package/dist/esm/{ur-menu-item-06b869d2.js → ur-menu-item-4d2f2e8c.js} +14 -9
- package/dist/esm/ur-menu-item.entry.js +17 -10
- package/dist/esm/ur-navigation-drawer.entry.js +529 -0
- package/dist/esm/ur-novl-carousel.entry.js +2 -2
- package/dist/esm/ur-novl.entry.js +1 -1
- package/dist/esm/ur-page-profile.entry.js +26 -16
- package/dist/esm/ur-page.entry.js +4 -4
- package/dist/esm/ur-profile.entry.js +19 -12
- package/dist/esm/ur-radio-button.entry.js +12 -5
- package/dist/esm/ur-read-mobile-top-app-bar.entry.js +42 -0
- package/dist/esm/ur-segment-button.entry.js +19 -12
- package/dist/esm/ur-select.entry.js +27 -20
- package/dist/esm/ur-switch.entry.js +18 -11
- package/dist/esm/ur-tabs.entry.js +13 -6
- package/dist/esm/ur-text-field.entry.js +23 -16
- package/dist/esm/ur-top-app-bar.entry.js +131 -0
- package/dist/esm/ur-user-profile.entry.js +2 -2
- package/dist/esm/ur-user.entry.js +4 -4
- package/dist/esm/urnovl-web-components.js +3 -3
- package/dist/types/components/ur-button/ur-button.d.ts +1 -0
- package/dist/types/components/ur-button-icon/ur-button-icon.d.ts +1 -1
- package/dist/types/components/ur-chip/ur-chip.d.ts +1 -1
- package/dist/types/components/ur-dialog/ur-dialog.d.ts +1 -1
- package/dist/types/components/ur-hero/ur-hero.d.ts +23 -0
- package/dist/types/components/ur-list/ur-list-item.d.ts +16 -0
- package/dist/types/components/ur-list/ur-list-subheader.d.ts +4 -0
- package/dist/types/components/ur-list/ur-list.d.ts +5 -0
- package/dist/types/components/ur-locale-filter-button/ur-locale-filter-button.d.ts +1 -0
- package/dist/types/components/ur-locale-filter-panel/ur-locale-filter-panel.d.ts +15 -2
- package/dist/types/components/ur-logo/ur-logo.d.ts +23 -0
- package/dist/types/components/ur-main-desktop-top-app-bar/ur-main-desktop-top-app-bar.d.ts +12 -0
- package/dist/types/components/ur-main-left-menu/ur-main-left-menu.d.ts +21 -0
- package/dist/types/components/ur-menu-item/ur-menu-item.d.ts +1 -1
- package/dist/types/components/ur-menu-profile/ur-menu-profile.d.ts +10 -0
- package/dist/types/components/ur-navigation-drawer/ur-navigation-drawer.d.ts +19 -0
- package/dist/types/components/ur-radio-button/ur-radio-button.d.ts +1 -1
- package/dist/types/components/ur-read-mobile-top-app-bar/ur-read-mobile-top-app-bar.d.ts +16 -0
- package/dist/types/components/ur-segment-button/ur-segment-button.d.ts +2 -2
- package/dist/types/components/ur-select/ur-select.d.ts +1 -1
- package/dist/types/components/ur-switch/ur-switch.d.ts +1 -1
- package/dist/types/components/ur-tabs/ur-tabs.d.ts +3 -5
- package/dist/types/components/ur-top-app-bar/ur-top-app-bar.d.ts +11 -0
- package/dist/types/components.d.ts +419 -16
- package/dist/types/data/novl-carousel.d.ts +20 -3
- package/dist/types/index.d.ts +1 -1
- package/dist/types/models/locale.d.ts +5 -0
- package/dist/types/stories/Hero.stories.d.ts +183 -0
- package/dist/types/stories/List.stories.d.ts +44 -0
- package/dist/types/stories/ListItem.stories.d.ts +157 -0
- package/dist/types/stories/MainDesktopTopAppBar.stories.d.ts +17 -0
- package/dist/types/stories/MainLeftMenu.stories.d.ts +71 -0
- package/dist/types/stories/MenuProfile.stories.d.ts +55 -0
- package/dist/types/stories/NavigationDrawer.stories.d.ts +35 -0
- package/dist/types/stories/NovlFilters.stories.d.ts +6 -3
- package/dist/types/stories/ReadMobileTopAppBar.stories.d.ts +17 -0
- package/dist/types/stories/TopAppBar.stories.d.ts +59 -0
- package/dist/types/stories/UrnovlLogo.stories.d.ts +85 -0
- package/dist/types/utils/utils.d.ts +2 -1
- package/dist/urnovl-web-components/index.esm.js +0 -1
- package/dist/urnovl-web-components/p-04c12413.js +6 -0
- package/dist/urnovl-web-components/p-0c9f7919.entry.js +1 -0
- package/dist/urnovl-web-components/p-119eb481.entry.js +1 -0
- package/dist/urnovl-web-components/p-123a897d.entry.js +1 -0
- package/dist/urnovl-web-components/p-22c14ff1.js +1 -0
- package/dist/urnovl-web-components/p-2c12c6ae.js +1 -0
- package/dist/urnovl-web-components/p-2de57097.entry.js +1 -0
- package/dist/urnovl-web-components/p-303bc73c.entry.js +1 -0
- package/{www/build/p-3fda3ec3.js → dist/urnovl-web-components/p-3aba2a00.js} +2 -2
- package/dist/urnovl-web-components/{p-ca07a002.entry.js → p-3f41f359.entry.js} +1 -1
- package/dist/urnovl-web-components/p-4301592f.js +28 -0
- package/dist/urnovl-web-components/p-4769f30d.js +50 -0
- package/dist/urnovl-web-components/p-478a5687.js +6 -0
- package/dist/urnovl-web-components/{p-1f8f2a69.entry.js → p-4a606a7f.entry.js} +1 -1
- package/dist/urnovl-web-components/p-4aa7bd52.js +1 -0
- package/dist/urnovl-web-components/p-4c59024f.js +1 -0
- package/{www/build/p-34388ac0.js → dist/urnovl-web-components/p-4d248e62.js} +2 -2
- package/dist/urnovl-web-components/p-55140534.entry.js +1 -0
- package/dist/urnovl-web-components/p-5c649bcb.js +6 -0
- package/dist/urnovl-web-components/p-5ddf41cb.entry.js +1 -0
- package/dist/urnovl-web-components/p-5eed9887.js +1 -0
- package/dist/urnovl-web-components/p-6659d488.js +1 -0
- package/dist/urnovl-web-components/p-668850ed.js +1 -0
- package/dist/urnovl-web-components/p-72f5ebe2.entry.js +1 -0
- package/dist/urnovl-web-components/p-745c78bb.js +1 -0
- package/dist/urnovl-web-components/p-7595aad6.entry.js +1 -0
- package/dist/urnovl-web-components/p-782d2952.entry.js +3 -0
- package/dist/urnovl-web-components/p-7a41d8c5.entry.js +1 -0
- package/dist/urnovl-web-components/{p-ccaeac43.js → p-7d099308.js} +1 -1
- package/dist/urnovl-web-components/p-7e6be841.js +1 -0
- package/dist/urnovl-web-components/{p-bddd6a75.js → p-8a43f03e.js} +1 -1
- package/{www/build/p-898d0366.js → dist/urnovl-web-components/p-8f8bad75.js} +2 -2
- package/dist/urnovl-web-components/p-9142f6a0.js +1 -0
- package/dist/urnovl-web-components/p-92ca13c7.entry.js +1 -0
- package/{www/build/p-a01434f1.js → dist/urnovl-web-components/p-98c0d846.js} +2 -2
- package/dist/urnovl-web-components/p-9a8de161.js +1 -0
- package/dist/urnovl-web-components/p-9bfb6da3.js +1 -0
- package/dist/urnovl-web-components/p-a183365e.entry.js +1 -0
- package/dist/urnovl-web-components/p-a2012ea9.entry.js +1 -0
- package/dist/urnovl-web-components/p-a27ffa78.js +6 -0
- package/dist/urnovl-web-components/{p-7549fbf6.entry.js → p-a32767cd.entry.js} +1 -1
- package/dist/urnovl-web-components/p-a499d3d9.entry.js +3 -0
- package/{www/build/p-23fd0f5c.js → dist/urnovl-web-components/p-acb96a86.js} +2 -2
- package/{www/build/p-8410d797.js → dist/urnovl-web-components/p-b270ea3f.js} +1 -1
- package/dist/urnovl-web-components/p-b2819315.entry.js +1 -0
- package/{www/build/p-7730bad1.js → dist/urnovl-web-components/p-b9030d3f.js} +2 -2
- package/dist/urnovl-web-components/p-ba8a3f01.entry.js +1 -0
- package/dist/urnovl-web-components/p-c0b49e28.js +1 -0
- package/dist/urnovl-web-components/p-c24bb804.entry.js +1 -0
- package/dist/urnovl-web-components/{p-173e6f6d.js → p-c5c61ad2.js} +1 -1
- package/{www/build/p-bd513ea3.entry.js → dist/urnovl-web-components/p-c8d21b34.entry.js} +1 -1
- package/dist/urnovl-web-components/{p-816c6732.entry.js → p-c8d266fb.entry.js} +1 -1
- package/dist/urnovl-web-components/p-cb473063.entry.js +1 -0
- package/dist/urnovl-web-components/p-cdf51a8e.entry.js +1 -0
- package/dist/urnovl-web-components/p-ce17ba79.js +1 -0
- package/dist/urnovl-web-components/p-cf6f7c93.entry.js +1 -0
- package/dist/urnovl-web-components/p-d071d78d.entry.js +1 -0
- package/dist/urnovl-web-components/p-d3c37af7.entry.js +1 -0
- package/dist/urnovl-web-components/p-d4ade9a3.entry.js +1 -0
- package/dist/urnovl-web-components/p-d73fcc3b.entry.js +1 -0
- package/dist/urnovl-web-components/p-de9d5fbe.js +1 -0
- package/dist/urnovl-web-components/p-df32cdeb.js +1 -0
- package/dist/urnovl-web-components/p-e4c5764f.entry.js +1 -0
- package/dist/urnovl-web-components/p-e8cebe4b.entry.js +1 -0
- package/dist/urnovl-web-components/p-f96f2cda.entry.js +1 -0
- package/dist/urnovl-web-components/p-fde3a0dc.js +1 -0
- package/dist/urnovl-web-components/urnovl-web-components.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/index.esm.js +0 -1
- package/www/build/p-04c12413.js +6 -0
- package/www/build/p-0c9f7919.entry.js +1 -0
- package/www/build/p-119eb481.entry.js +1 -0
- package/www/build/p-123a897d.entry.js +1 -0
- package/www/build/p-22c14ff1.js +1 -0
- package/www/build/p-2c12c6ae.js +1 -0
- package/www/build/p-2cd566f3.js +1 -0
- package/www/build/p-2de57097.entry.js +1 -0
- package/www/build/p-303bc73c.entry.js +1 -0
- package/{dist/urnovl-web-components/p-3fda3ec3.js → www/build/p-3aba2a00.js} +2 -2
- package/www/build/{p-ca07a002.entry.js → p-3f41f359.entry.js} +1 -1
- package/www/build/p-4301592f.js +28 -0
- package/www/build/p-4769f30d.js +50 -0
- package/www/build/p-478a5687.js +6 -0
- package/www/build/{p-1f8f2a69.entry.js → p-4a606a7f.entry.js} +1 -1
- package/www/build/p-4aa7bd52.js +1 -0
- package/www/build/p-4c59024f.js +1 -0
- package/{dist/urnovl-web-components/p-34388ac0.js → www/build/p-4d248e62.js} +2 -2
- package/www/build/p-55140534.entry.js +1 -0
- package/www/build/p-5c649bcb.js +6 -0
- package/www/build/p-5ddf41cb.entry.js +1 -0
- package/www/build/p-5eed9887.js +1 -0
- package/www/build/p-6659d488.js +1 -0
- package/www/build/p-668850ed.js +1 -0
- package/www/build/p-72f5ebe2.entry.js +1 -0
- package/www/build/p-745c78bb.js +1 -0
- package/www/build/p-7595aad6.entry.js +1 -0
- package/www/build/p-782d2952.entry.js +3 -0
- package/www/build/p-7a41d8c5.entry.js +1 -0
- package/www/build/{p-ccaeac43.js → p-7d099308.js} +1 -1
- package/www/build/p-7e6be841.js +1 -0
- package/www/build/{p-bddd6a75.js → p-8a43f03e.js} +1 -1
- package/{dist/urnovl-web-components/p-898d0366.js → www/build/p-8f8bad75.js} +2 -2
- package/www/build/p-9142f6a0.js +1 -0
- package/www/build/p-92ca13c7.entry.js +1 -0
- package/{dist/urnovl-web-components/p-a01434f1.js → www/build/p-98c0d846.js} +2 -2
- package/www/build/p-9a8de161.js +1 -0
- package/www/build/p-9bfb6da3.js +1 -0
- package/www/build/p-a183365e.entry.js +1 -0
- package/www/build/p-a2012ea9.entry.js +1 -0
- package/www/build/p-a27ffa78.js +6 -0
- package/www/build/{p-7549fbf6.entry.js → p-a32767cd.entry.js} +1 -1
- package/www/build/p-a499d3d9.entry.js +3 -0
- package/{dist/urnovl-web-components/p-23fd0f5c.js → www/build/p-acb96a86.js} +2 -2
- package/{dist/urnovl-web-components/p-8410d797.js → www/build/p-b270ea3f.js} +1 -1
- package/www/build/p-b2819315.entry.js +1 -0
- package/{dist/urnovl-web-components/p-7730bad1.js → www/build/p-b9030d3f.js} +2 -2
- package/www/build/p-ba8a3f01.entry.js +1 -0
- package/www/build/p-c0b49e28.js +1 -0
- package/www/build/p-c24bb804.entry.js +1 -0
- package/www/build/{p-173e6f6d.js → p-c5c61ad2.js} +1 -1
- package/{dist/urnovl-web-components/p-bd513ea3.entry.js → www/build/p-c8d21b34.entry.js} +1 -1
- package/www/build/{p-816c6732.entry.js → p-c8d266fb.entry.js} +1 -1
- package/www/build/p-cb473063.entry.js +1 -0
- package/www/build/p-cdf51a8e.entry.js +1 -0
- package/www/build/p-ce17ba79.js +1 -0
- package/www/build/p-cf6f7c93.entry.js +1 -0
- package/www/build/p-d071d78d.entry.js +1 -0
- package/www/build/p-d3c37af7.entry.js +1 -0
- package/www/build/p-d4ade9a3.entry.js +1 -0
- package/www/build/p-d73fcc3b.entry.js +1 -0
- package/www/build/p-de9d5fbe.js +1 -0
- package/www/build/p-df32cdeb.js +1 -0
- package/www/build/p-e4c5764f.entry.js +1 -0
- package/www/build/p-e8cebe4b.entry.js +1 -0
- package/www/build/p-f96f2cda.entry.js +1 -0
- package/www/build/p-fde3a0dc.js +1 -0
- package/www/build/urnovl-web-components.esm.js +1 -1
- package/dist/cjs/check-e00396ac.js +0 -14
- package/dist/cjs/live-e617099f.js +0 -11
- package/dist/cjs/svg-tag-41fbcd07.js +0 -10
- package/dist/cjs/template-45f3fd9e.js +0 -7
- package/dist/cjs/ur-button-e4232743.js +0 -23
- package/dist/cjs/utils-842cc2e7.js +0 -11
- package/dist/components/p-b13d78f0.js +0 -8
- package/dist/esm/index-8e611cf4.js +0 -1790
- package/dist/esm/ur-button-24d470f8.js +0 -21
- package/dist/esm/utils-8e86fe32.js +0 -8
- package/dist/urnovl-web-components/p-01994b35.js +0 -1
- package/dist/urnovl-web-components/p-15124dd7.entry.js +0 -1
- package/dist/urnovl-web-components/p-2f04e32a.js +0 -6
- package/dist/urnovl-web-components/p-36994e29.entry.js +0 -3
- package/dist/urnovl-web-components/p-3d163c89.js +0 -1
- package/dist/urnovl-web-components/p-3db231e7.js +0 -1
- package/dist/urnovl-web-components/p-40bfeebd.entry.js +0 -1
- package/dist/urnovl-web-components/p-4948df80.entry.js +0 -1
- package/dist/urnovl-web-components/p-4dfeb18e.entry.js +0 -1
- package/dist/urnovl-web-components/p-50dff0fe.js +0 -1
- package/dist/urnovl-web-components/p-5e3c82bb.entry.js +0 -1
- package/dist/urnovl-web-components/p-7077cb17.entry.js +0 -1
- package/dist/urnovl-web-components/p-799aa6ca.entry.js +0 -1
- package/dist/urnovl-web-components/p-7fc2b929.js +0 -1
- package/dist/urnovl-web-components/p-84d675f2.entry.js +0 -1
- package/dist/urnovl-web-components/p-8511f124.js +0 -1
- package/dist/urnovl-web-components/p-8ec197e5.entry.js +0 -1
- package/dist/urnovl-web-components/p-95452aba.entry.js +0 -1
- package/dist/urnovl-web-components/p-a357d15e.entry.js +0 -1
- package/dist/urnovl-web-components/p-a79a137e.js +0 -87
- package/dist/urnovl-web-components/p-b13d78f0.js +0 -1
- package/dist/urnovl-web-components/p-bd7a107b.entry.js +0 -1
- package/dist/urnovl-web-components/p-c5180928.js +0 -1
- package/dist/urnovl-web-components/p-c9791cda.js +0 -1
- package/dist/urnovl-web-components/p-ccc5a0bd.entry.js +0 -1
- package/dist/urnovl-web-components/p-cce55daf.js +0 -1
- package/dist/urnovl-web-components/p-e4f27de6.js +0 -6
- package/dist/urnovl-web-components/p-e9b41d3d.entry.js +0 -1
- package/dist/urnovl-web-components/p-ea4ef6e2.entry.js +0 -1
- package/dist/urnovl-web-components/p-ea8b5740.js +0 -1
- package/dist/urnovl-web-components/p-f0ca1534.entry.js +0 -1
- package/dist/urnovl-web-components/p-f10deb3c.entry.js +0 -1
- package/dist/urnovl-web-components/p-f682e8a7.entry.js +0 -1
- package/www/build/p-01994b35.js +0 -1
- package/www/build/p-15124dd7.entry.js +0 -1
- package/www/build/p-2f04e32a.js +0 -6
- package/www/build/p-36994e29.entry.js +0 -3
- package/www/build/p-3d163c89.js +0 -1
- package/www/build/p-3db231e7.js +0 -1
- package/www/build/p-40bfeebd.entry.js +0 -1
- package/www/build/p-4948df80.entry.js +0 -1
- package/www/build/p-4dfeb18e.entry.js +0 -1
- package/www/build/p-50dff0fe.js +0 -1
- package/www/build/p-5e3c82bb.entry.js +0 -1
- package/www/build/p-613bef60.js +0 -1
- package/www/build/p-7077cb17.entry.js +0 -1
- package/www/build/p-799aa6ca.entry.js +0 -1
- package/www/build/p-7fc2b929.js +0 -1
- package/www/build/p-84d675f2.entry.js +0 -1
- package/www/build/p-8511f124.js +0 -1
- package/www/build/p-8ec197e5.entry.js +0 -1
- package/www/build/p-95452aba.entry.js +0 -1
- package/www/build/p-a357d15e.entry.js +0 -1
- package/www/build/p-a79a137e.js +0 -87
- package/www/build/p-b13d78f0.js +0 -1
- package/www/build/p-bd7a107b.entry.js +0 -1
- package/www/build/p-c5180928.js +0 -1
- package/www/build/p-c9791cda.js +0 -1
- package/www/build/p-ccc5a0bd.entry.js +0 -1
- package/www/build/p-cce55daf.js +0 -1
- package/www/build/p-e4f27de6.js +0 -6
- package/www/build/p-e9b41d3d.entry.js +0 -1
- package/www/build/p-ea4ef6e2.entry.js +0 -1
- package/www/build/p-ea8b5740.js +0 -1
- package/www/build/p-f0ca1534.entry.js +0 -1
- package/www/build/p-f10deb3c.entry.js +0 -1
- package/www/build/p-f682e8a7.entry.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
const ifDefined = require('./if-defined-
|
|
3
|
+
const is = require('./is-3783cb36.js');
|
|
4
|
+
const ifDefined = require('./if-defined-7e2ad69b.js');
|
|
5
5
|
|
|
6
6
|
function cc(names) {
|
|
7
7
|
if (typeof names === "string" || typeof names === "number") return "" + names
|
|
@@ -25,21 +25,21 @@ function cc(names) {
|
|
|
25
25
|
|
|
26
26
|
const AnchorMixin = (superclass) => {
|
|
27
27
|
class AnchorMixinClass extends superclass {
|
|
28
|
-
renderAnchor({ id, className, part, content =
|
|
29
|
-
return
|
|
28
|
+
renderAnchor({ id, className, part, content = is.ke `<slot></slot>`, refDirective, tabIndex, }) {
|
|
29
|
+
return is.ke `<a ${refDirective} id="${ifDefined.to(id)}" class="_a ${className ? className : ''}" part="${ifDefined.to(part)}" href="${ifDefined.to(this.href)}" download="${ifDefined.to(this.download)}" target="${ifDefined.to(this.target)}" rel="${ifDefined.to(this.rel)}" tabindex="${ifDefined.to(tabIndex)}">${content}</a>`;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
is.__decorate([
|
|
33
|
+
is.n({ reflect: true })
|
|
34
34
|
], AnchorMixinClass.prototype, "href", void 0);
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
is.__decorate([
|
|
36
|
+
is.n({ reflect: true })
|
|
37
37
|
], AnchorMixinClass.prototype, "download", void 0);
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
is.__decorate([
|
|
39
|
+
is.n({ reflect: true })
|
|
40
40
|
], AnchorMixinClass.prototype, "target", void 0);
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
is.__decorate([
|
|
42
|
+
is.n({ reflect: true })
|
|
43
43
|
], AnchorMixinClass.prototype, "rel", void 0);
|
|
44
44
|
return AnchorMixinClass;
|
|
45
45
|
};
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const is = require('./is-3783cb36.js');
|
|
4
|
+
|
|
5
|
+
is.eachArray(['add', 'remove', 'toggle'], (name) => {
|
|
6
|
+
is.$.fn[`${name}Class`] = function (className) {
|
|
7
|
+
if (name === 'remove' && !arguments.length) {
|
|
8
|
+
return this.each((_, element) => {
|
|
9
|
+
is.setAttribute(element, 'class', '');
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
return this.each((i, element) => {
|
|
13
|
+
if (!is.isElement(element)) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const classes = (is.isFunction(className)
|
|
17
|
+
? className.call(element, i, is.getAttribute(element, 'class', ''))
|
|
18
|
+
: className)
|
|
19
|
+
.split(' ')
|
|
20
|
+
.filter((name) => name);
|
|
21
|
+
is.eachArray(classes, (cls) => {
|
|
22
|
+
element.classList[name](cls);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// eslint-disable-next-line
|
|
29
|
+
function each(target, callback) {
|
|
30
|
+
// eachArray 回调函数是 value, key,这里的 each 函数是 key, value
|
|
31
|
+
return is.isArrayLike(target)
|
|
32
|
+
? is.eachArray(target, (value, index) => {
|
|
33
|
+
return callback.call(value, index, value);
|
|
34
|
+
})
|
|
35
|
+
: is.eachObject(target, callback);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// eslint-disable-next-line
|
|
39
|
+
function map(elements, callback) {
|
|
40
|
+
const window = is.getWindow();
|
|
41
|
+
let value;
|
|
42
|
+
const ret = [];
|
|
43
|
+
each(elements, (i, element) => {
|
|
44
|
+
value = callback.call(window, element, i);
|
|
45
|
+
if (value != null) {
|
|
46
|
+
ret.push(value);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
return [].concat(...ret);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// eslint-disable-next-line
|
|
53
|
+
is.$.fn.map = function (callback) {
|
|
54
|
+
return new is.JQ(map(this, (element, i) => {
|
|
55
|
+
return callback.call(element, i, element);
|
|
56
|
+
}));
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* 值上面的 padding、border、margin 处理
|
|
61
|
+
* @param element
|
|
62
|
+
* @param name
|
|
63
|
+
* @param value
|
|
64
|
+
* @param funcIndex
|
|
65
|
+
* @param includeMargin
|
|
66
|
+
* @param multiply
|
|
67
|
+
*/
|
|
68
|
+
const handleExtraWidth = (element, name, value, funcIndex, includeMargin, multiply) => {
|
|
69
|
+
// 获取元素的 padding, border, margin 宽度(两侧宽度的和)
|
|
70
|
+
const getExtraWidthValue = (extra) => {
|
|
71
|
+
return (is.getExtraWidth(element, name.toLowerCase(), extra) *
|
|
72
|
+
multiply);
|
|
73
|
+
};
|
|
74
|
+
if (funcIndex === 2 && includeMargin) {
|
|
75
|
+
value += getExtraWidthValue('margin');
|
|
76
|
+
}
|
|
77
|
+
if (is.isBorderBox(element)) {
|
|
78
|
+
if (funcIndex === 0) {
|
|
79
|
+
value -= getExtraWidthValue('border');
|
|
80
|
+
}
|
|
81
|
+
if (funcIndex === 1) {
|
|
82
|
+
value -= getExtraWidthValue('border');
|
|
83
|
+
value -= getExtraWidthValue('padding');
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
if (funcIndex === 0) {
|
|
88
|
+
value += getExtraWidthValue('padding');
|
|
89
|
+
}
|
|
90
|
+
if (funcIndex === 2) {
|
|
91
|
+
value += getExtraWidthValue('border');
|
|
92
|
+
value += getExtraWidthValue('padding');
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return value;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* 获取元素的样式值
|
|
99
|
+
* @param element
|
|
100
|
+
* @param name
|
|
101
|
+
* @param funcIndex 0: innerWidth, innerHeight; 1: width, height; 2: outerWidth, outerHeight
|
|
102
|
+
* @param includeMargin
|
|
103
|
+
*/
|
|
104
|
+
const get = (element, name, funcIndex, includeMargin) => {
|
|
105
|
+
const document = is.getDocument();
|
|
106
|
+
const clientProp = `client${name}`;
|
|
107
|
+
const scrollProp = `scroll${name}`;
|
|
108
|
+
const offsetProp = `offset${name}`;
|
|
109
|
+
const innerProp = `inner${name}`;
|
|
110
|
+
// $(window).width()
|
|
111
|
+
if (is.isWindow(element)) {
|
|
112
|
+
// outerWidth, outerHeight 需要包含滚动条的宽度
|
|
113
|
+
return funcIndex === 2
|
|
114
|
+
? element[innerProp]
|
|
115
|
+
: is.toElement(document)[clientProp];
|
|
116
|
+
}
|
|
117
|
+
// $(document).width()
|
|
118
|
+
if (is.isDocument(element)) {
|
|
119
|
+
const doc = is.toElement(element);
|
|
120
|
+
return Math.max(
|
|
121
|
+
// @ts-ignore
|
|
122
|
+
element.body[scrollProp], doc[scrollProp],
|
|
123
|
+
// @ts-ignore
|
|
124
|
+
element.body[offsetProp], doc[offsetProp], doc[clientProp]);
|
|
125
|
+
}
|
|
126
|
+
const value = parseFloat(is.getComputedStyleValue(element, name.toLowerCase()) || '0');
|
|
127
|
+
return handleExtraWidth(element, name, value, funcIndex, includeMargin, 1);
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* 设置元素的样式值
|
|
131
|
+
* @param element
|
|
132
|
+
* @param elementIndex
|
|
133
|
+
* @param name
|
|
134
|
+
* @param funcIndex 0: innerWidth, innerHeight; 1: width, height; 2: outerWidth, outerHeight
|
|
135
|
+
* @param includeMargin
|
|
136
|
+
* @param value
|
|
137
|
+
*/
|
|
138
|
+
const set = (element, elementIndex, name, funcIndex, includeMargin, value) => {
|
|
139
|
+
let computedValue = is.isFunction(value)
|
|
140
|
+
? value.call(element, elementIndex, get(element, name, funcIndex, includeMargin))
|
|
141
|
+
: value;
|
|
142
|
+
if (computedValue == null) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const $element = is.$(element);
|
|
146
|
+
const dimension = name.toLowerCase();
|
|
147
|
+
// 特殊的值,不需要计算 padding、border、margin
|
|
148
|
+
if (is.isString(computedValue) &&
|
|
149
|
+
['auto', 'inherit', ''].includes(computedValue)) {
|
|
150
|
+
$element.css(dimension, computedValue);
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
// 其他值保留原始单位。注意:如果不使用 px 作为单位,则算出的值一般是不准确的
|
|
154
|
+
const suffix = computedValue.toString().replace(/\b[0-9.]*/, '');
|
|
155
|
+
const numerical = parseFloat(computedValue);
|
|
156
|
+
computedValue =
|
|
157
|
+
handleExtraWidth(element, name, numerical, funcIndex, includeMargin, -1) +
|
|
158
|
+
(suffix || 'px');
|
|
159
|
+
$element.css(dimension, computedValue);
|
|
160
|
+
};
|
|
161
|
+
is.eachArray(['Width', 'Height'], (name) => {
|
|
162
|
+
is.eachArray([`inner${name}`, name.toLowerCase(), `outer${name}`], (funcName, funcIndex) => {
|
|
163
|
+
is.$.fn[funcName] = function (
|
|
164
|
+
// eslint-disable-next-line
|
|
165
|
+
margin,
|
|
166
|
+
// eslint-disable-next-line
|
|
167
|
+
value) {
|
|
168
|
+
// 是否是赋值操作
|
|
169
|
+
const isSet = arguments.length && (funcIndex < 2 || !is.isBoolean(margin));
|
|
170
|
+
const includeMargin = margin === true || value === true;
|
|
171
|
+
// 获取第一个元素的值
|
|
172
|
+
if (!isSet) {
|
|
173
|
+
return this.length
|
|
174
|
+
? get(this[0], name, funcIndex, includeMargin)
|
|
175
|
+
: undefined;
|
|
176
|
+
}
|
|
177
|
+
// 设置每个元素的值
|
|
178
|
+
return this.each((index, element) => {
|
|
179
|
+
return set(element, index, name, funcIndex, includeMargin, margin);
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
is.eachArray(['insertBefore', 'insertAfter'], (name, nameIndex) => {
|
|
186
|
+
// eslint-disable-next-line
|
|
187
|
+
is.$.fn[name] = function (target) {
|
|
188
|
+
const $element = nameIndex ? is.$(this.get().reverse()) : this; // 顺序和 jQuery 保持一致
|
|
189
|
+
const $target = is.$(target);
|
|
190
|
+
const result = [];
|
|
191
|
+
$target.each((index, target) => {
|
|
192
|
+
if (!target.parentNode) {
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
$element.each((_, element) => {
|
|
196
|
+
const newItem = index
|
|
197
|
+
? element.cloneNode(true)
|
|
198
|
+
: element;
|
|
199
|
+
const existingItem = nameIndex ? target.nextSibling : target;
|
|
200
|
+
result.push(newItem);
|
|
201
|
+
target.parentNode.insertBefore(newItem, existingItem);
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
return is.$(nameIndex ? result.reverse() : result);
|
|
205
|
+
};
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
is.$.fn.remove = function (selector) {
|
|
209
|
+
return this.each((_, element) => {
|
|
210
|
+
if (!selector || is.$(element).is(selector)) {
|
|
211
|
+
is.removeChild(element);
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
is.eachArray(['appendTo', 'prependTo'], (name, nameIndex) => {
|
|
217
|
+
// eslint-disable-next-line
|
|
218
|
+
is.$.fn[name] = function (target) {
|
|
219
|
+
const extraChilds = [];
|
|
220
|
+
const $target = is.$(target).map((_, element) => {
|
|
221
|
+
const childNodes = element.childNodes;
|
|
222
|
+
const childLength = childNodes.length;
|
|
223
|
+
if (childLength) {
|
|
224
|
+
return childNodes[nameIndex ? 0 : childLength - 1];
|
|
225
|
+
}
|
|
226
|
+
const child = is.createElement('div');
|
|
227
|
+
is.appendChild(element, child);
|
|
228
|
+
extraChilds.push(child);
|
|
229
|
+
return child;
|
|
230
|
+
});
|
|
231
|
+
const $result = this[nameIndex ? 'insertBefore' : 'insertAfter']($target);
|
|
232
|
+
is.$(extraChilds).remove();
|
|
233
|
+
return $result;
|
|
234
|
+
};
|
|
235
|
+
});
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
const ifDefined = require('./if-defined-
|
|
5
|
-
const anchor = require('./anchor-
|
|
6
|
-
const form = require('./form-
|
|
7
|
-
const template = require('./template-
|
|
8
|
-
const rippleMixin = require('./ripple-mixin-
|
|
3
|
+
const is = require('./is-3783cb36.js');
|
|
4
|
+
const ifDefined = require('./if-defined-7e2ad69b.js');
|
|
5
|
+
const anchor = require('./anchor-60054fb9.js');
|
|
6
|
+
const form = require('./form-99470e35.js');
|
|
7
|
+
const template = require('./template-4077344f.js');
|
|
8
|
+
const rippleMixin = require('./ripple-mixin-01f70e13.js');
|
|
9
|
+
const classMap = require('./class-map-14759be7.js');
|
|
9
10
|
|
|
10
|
-
const style =
|
|
11
|
+
const style = is.i `:host{position:relative;display:inline-block;flex-shrink:0;width:2.5rem;height:2.5rem;stroke:rgb(var(--mdui-color-primary))}.progress{position:relative;display:inline-block;width:100%;height:100%;text-align:left;transition:opacity var(--mdui-motion-duration-medium1) var(--mdui-motion-easing-linear)}.determinate svg{transform:rotate(-90deg);fill:transparent}.determinate .track{stroke:transparent}.determinate .circle{stroke:inherit;transition:stroke-dashoffset var(--mdui-motion-duration-long2) var(--mdui-motion-easing-standard)}.indeterminate{font-size:0;letter-spacing:0;white-space:nowrap;animation:mdui-comp-circular-progress-rotate 1568ms var(--mdui-motion-easing-linear) infinite}.indeterminate .circle,.indeterminate .layer{position:absolute;width:100%;height:100%}.indeterminate .layer{animation:mdui-comp-circular-progress-layer-rotate 5332ms var(--mdui-motion-easing-standard) infinite both}.indeterminate .circle{fill:transparent;stroke:inherit}.indeterminate .gap-patch{position:absolute;top:0;left:47.5%;width:5%;height:100%;overflow:hidden}.indeterminate .gap-patch .circle{left:-900%;width:2000%;transform:rotate(180deg)}.indeterminate .clipper{position:relative;display:inline-block;width:50%;height:100%;overflow:hidden}.indeterminate .clipper .circle{width:200%}.indeterminate .clipper.left .circle{animation:mdui-comp-circular-progress-left-spin 1333ms var(--mdui-motion-easing-standard) infinite both}.indeterminate .clipper.right .circle{left:-100%;animation:mdui-comp-circular-progress-right-spin 1333ms var(--mdui-motion-easing-standard) infinite both}@keyframes mdui-comp-circular-progress-rotate{to{transform:rotate(360deg)}}@keyframes mdui-comp-circular-progress-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdui-comp-circular-progress-left-spin{0%{transform:rotate(265deg)}50%{transform:rotate(130deg)}100%{transform:rotate(265deg)}}@keyframes mdui-comp-circular-progress-right-spin{0%{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}100%{transform:rotate(-265deg)}}`;
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* @summary 圆形进度指示器组件
|
|
@@ -16,7 +17,7 @@ const style = index.i `:host{position:relative;display:inline-block;flex-shrink:
|
|
|
16
17
|
* <mdui-circular-progress></mdui-circular-progress>
|
|
17
18
|
* ```
|
|
18
19
|
*/
|
|
19
|
-
let CircularProgress = class CircularProgress extends
|
|
20
|
+
let CircularProgress = class CircularProgress extends is.MduiElement {
|
|
20
21
|
constructor() {
|
|
21
22
|
super(...arguments);
|
|
22
23
|
/**
|
|
@@ -25,8 +26,8 @@ let CircularProgress = class CircularProgress extends index.MduiElement {
|
|
|
25
26
|
this.max = 1;
|
|
26
27
|
}
|
|
27
28
|
render() {
|
|
28
|
-
const isDeterminate = !
|
|
29
|
-
return
|
|
29
|
+
const isDeterminate = !is.isUndefined(this.value);
|
|
30
|
+
return is.ke `<div class="progress ${classMap.Rt({
|
|
30
31
|
determinate: isDeterminate,
|
|
31
32
|
indeterminate: !isDeterminate,
|
|
32
33
|
})}">${isDeterminate ? this.renderDeterminate() : this.renderInDeterminate()}</div>`;
|
|
@@ -39,7 +40,7 @@ let CircularProgress = class CircularProgress extends index.MduiElement {
|
|
|
39
40
|
const center = circleRadius + strokeWidth / 2;
|
|
40
41
|
const circumference = 2 * π * circleRadius;
|
|
41
42
|
const determinateStrokeDashOffset = (1 - value / Math.max(this.max ?? value, value)) * circumference;
|
|
42
|
-
return
|
|
43
|
+
return is.ke `<svg viewBox="0 0 ${center * 2} ${center * 2}"><circle class="track" cx="${center}" cy="${center}" r="${circleRadius}" stroke-width="${strokeWidth}"></circle><circle class="circle" cx="${center}" cy="${center}" r="${circleRadius}" stroke-dasharray="${2 * π * circleRadius}" stroke-dashoffset="${determinateStrokeDashOffset}" stroke-width="${strokeWidth}"></circle></svg>`;
|
|
43
44
|
}
|
|
44
45
|
renderInDeterminate() {
|
|
45
46
|
const strokeWidth = 4; // 圆环宽度
|
|
@@ -48,24 +49,24 @@ let CircularProgress = class CircularProgress extends index.MduiElement {
|
|
|
48
49
|
const center = circleRadius + strokeWidth / 2;
|
|
49
50
|
const circumference = 2 * π * circleRadius;
|
|
50
51
|
const halfCircumference = 0.5 * circumference;
|
|
51
|
-
const circle = (thisStrokeWidth) =>
|
|
52
|
-
return
|
|
52
|
+
const circle = (thisStrokeWidth) => is.ke `<svg class="circle" viewBox="0 0 ${center * 2} ${center * 2}"><circle cx="${center}" cy="${center}" r="${circleRadius}" stroke-dasharray="${circumference}" stroke-dashoffset="${halfCircumference}" stroke-width="${thisStrokeWidth}"></circle></svg>`;
|
|
53
|
+
return is.ke `<div class="layer"><div class="clipper left">${circle(strokeWidth)}</div><div class="gap-patch">${circle(strokeWidth * 0.8)}</div><div class="clipper right">${circle(strokeWidth)}</div></div>`;
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
|
-
CircularProgress.styles = [
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
CircularProgress.styles = [is.componentStyle, style];
|
|
57
|
+
is.__decorate([
|
|
58
|
+
is.n({ type: Number, reflect: true })
|
|
58
59
|
], CircularProgress.prototype, "max", void 0);
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
is.__decorate([
|
|
61
|
+
is.n({ type: Number })
|
|
61
62
|
], CircularProgress.prototype, "value", void 0);
|
|
62
|
-
CircularProgress =
|
|
63
|
-
|
|
63
|
+
CircularProgress = is.__decorate([
|
|
64
|
+
is.t('mdui-circular-progress')
|
|
64
65
|
], CircularProgress);
|
|
65
66
|
|
|
66
|
-
const buttonBaseStyle =
|
|
67
|
+
const buttonBaseStyle = is.i `.button{position:relative;display:inline-flex;align-items:center;justify-content:center;height:100%;padding:0;overflow:hidden;color:inherit;font-size:inherit;font-family:inherit;font-weight:inherit;letter-spacing:inherit;white-space:nowrap;text-align:center;text-decoration:none;vertical-align:middle;background:0 0;border:none;outline:0;cursor:inherit;-webkit-user-select:none;user-select:none;touch-action:manipulation;zoom:1;-webkit-user-drag:none}`;
|
|
67
68
|
|
|
68
|
-
class ButtonBase extends anchor.AnchorMixin(rippleMixin.RippleMixin(rippleMixin.FocusableMixin(
|
|
69
|
+
class ButtonBase extends anchor.AnchorMixin(rippleMixin.RippleMixin(rippleMixin.FocusableMixin(is.MduiElement))) {
|
|
69
70
|
constructor() {
|
|
70
71
|
super(...arguments);
|
|
71
72
|
/**
|
|
@@ -199,65 +200,65 @@ class ButtonBase extends anchor.AnchorMixin(rippleMixin.RippleMixin(rippleMixin.
|
|
|
199
200
|
}
|
|
200
201
|
renderLoading() {
|
|
201
202
|
return this.loading
|
|
202
|
-
?
|
|
203
|
+
? is.ke `<mdui-circular-progress part="loading"></mdui-circular-progress>`
|
|
203
204
|
: template.nothingTemplate;
|
|
204
205
|
}
|
|
205
|
-
renderButton({ id, className, part, content =
|
|
206
|
-
return
|
|
206
|
+
renderButton({ id, className, part, content = is.ke `<slot></slot>`, }) {
|
|
207
|
+
return is.ke `<button id="${ifDefined.to(id)}" class="${anchor.cc(['_button', className])}" part="${ifDefined.to(part)}" ?disabled="${this.rippleDisabled || this.focusDisabled}">${content}</button>`;
|
|
207
208
|
}
|
|
208
209
|
isButton() {
|
|
209
210
|
return !this.href;
|
|
210
211
|
}
|
|
211
212
|
}
|
|
212
213
|
ButtonBase.styles = [
|
|
213
|
-
|
|
214
|
+
is.componentStyle,
|
|
214
215
|
buttonBaseStyle,
|
|
215
216
|
];
|
|
216
|
-
|
|
217
|
-
|
|
217
|
+
is.__decorate([
|
|
218
|
+
is.n({
|
|
218
219
|
type: Boolean,
|
|
219
220
|
reflect: true,
|
|
220
|
-
converter:
|
|
221
|
+
converter: is.booleanConverter,
|
|
221
222
|
})
|
|
222
223
|
], ButtonBase.prototype, "disabled", void 0);
|
|
223
|
-
|
|
224
|
-
|
|
224
|
+
is.__decorate([
|
|
225
|
+
is.n({
|
|
225
226
|
type: Boolean,
|
|
226
227
|
reflect: true,
|
|
227
|
-
converter:
|
|
228
|
+
converter: is.booleanConverter,
|
|
228
229
|
})
|
|
229
230
|
], ButtonBase.prototype, "loading", void 0);
|
|
230
|
-
|
|
231
|
-
|
|
231
|
+
is.__decorate([
|
|
232
|
+
is.n({ reflect: true })
|
|
232
233
|
], ButtonBase.prototype, "name", void 0);
|
|
233
|
-
|
|
234
|
-
|
|
234
|
+
is.__decorate([
|
|
235
|
+
is.n({ reflect: true })
|
|
235
236
|
], ButtonBase.prototype, "value", void 0);
|
|
236
|
-
|
|
237
|
-
|
|
237
|
+
is.__decorate([
|
|
238
|
+
is.n({ reflect: true })
|
|
238
239
|
], ButtonBase.prototype, "type", void 0);
|
|
239
|
-
|
|
240
|
-
|
|
240
|
+
is.__decorate([
|
|
241
|
+
is.n({ reflect: true })
|
|
241
242
|
], ButtonBase.prototype, "form", void 0);
|
|
242
|
-
|
|
243
|
-
|
|
243
|
+
is.__decorate([
|
|
244
|
+
is.n({ reflect: true, attribute: 'formaction' })
|
|
244
245
|
], ButtonBase.prototype, "formAction", void 0);
|
|
245
|
-
|
|
246
|
-
|
|
246
|
+
is.__decorate([
|
|
247
|
+
is.n({ reflect: true, attribute: 'formenctype' })
|
|
247
248
|
], ButtonBase.prototype, "formEnctype", void 0);
|
|
248
|
-
|
|
249
|
-
|
|
249
|
+
is.__decorate([
|
|
250
|
+
is.n({ reflect: true, attribute: 'formmethod' })
|
|
250
251
|
], ButtonBase.prototype, "formMethod", void 0);
|
|
251
|
-
|
|
252
|
-
|
|
252
|
+
is.__decorate([
|
|
253
|
+
is.n({
|
|
253
254
|
type: Boolean,
|
|
254
255
|
reflect: true,
|
|
255
|
-
converter:
|
|
256
|
+
converter: is.booleanConverter,
|
|
256
257
|
attribute: 'formnovalidate',
|
|
257
258
|
})
|
|
258
259
|
], ButtonBase.prototype, "formNoValidate", void 0);
|
|
259
|
-
|
|
260
|
-
|
|
260
|
+
is.__decorate([
|
|
261
|
+
is.n({ reflect: true, attribute: 'formtarget' })
|
|
261
262
|
], ButtonBase.prototype, "formTarget", void 0);
|
|
262
263
|
|
|
263
264
|
exports.ButtonBase = ButtonBase;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const is = require('./is-3783cb36.js');
|
|
4
|
+
const svgTag = require('./svg-tag-2fa5fa49.js');
|
|
5
|
+
|
|
6
|
+
let IconCheck = class IconCheck extends is.h {
|
|
7
|
+
render() {
|
|
8
|
+
return svgTag.svgTag('<path d="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/>');
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
IconCheck.styles = svgTag.style;
|
|
12
|
+
IconCheck = is.__decorate([
|
|
13
|
+
is.t('mdui-icon-check')
|
|
14
|
+
], IconCheck);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const is = require('./is-3783cb36.js');
|
|
4
|
+
|
|
5
|
+
is.$.fn.children = function (selector) {
|
|
6
|
+
const children = [];
|
|
7
|
+
this.each((_, element) => {
|
|
8
|
+
is.eachArray(element.childNodes, (childNode) => {
|
|
9
|
+
if (!is.isElement(childNode)) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if (!selector || is.$(childNode).is(selector)) {
|
|
13
|
+
children.push(childNode);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
return new is.JQ(is.unique(children));
|
|
18
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const is = require('./is-3783cb36.js');
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2018 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*/const Rt=is.e(class extends is.i$1{constructor(s){if(super(s),s.type!==is.t$1.ATTRIBUTE||"class"!==s.name||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(t,[s]){if(void 0===this.st){this.st=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in s)s[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(s)}const i=t.element.classList;for(const t of this.st)t in s||(i.remove(t),this.st.delete(t));for(const t in s){const r=!!s[t];r===this.st.has(t)||this.nt?.has(t)||(r?(i.add(t),this.st.add(t)):(i.remove(t),this.st.delete(t)));}return is.R}});
|
|
10
|
+
|
|
11
|
+
exports.Rt = Rt;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const is = require('./is-3783cb36.js');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* defaultValue 装饰器。在 attribute 属性变更时,若值和 property 值不一致,则会保存新的 attribute 值
|
|
@@ -22,14 +22,14 @@ function defaultValue(propertyName = 'value') {
|
|
|
22
22
|
const attributeChangedCallback = constructor.prototype.attributeChangedCallback;
|
|
23
23
|
constructor.prototype.attributeChangedCallback = function (name, old, value) {
|
|
24
24
|
const options = constructor.getPropertyOptions(propertyName);
|
|
25
|
-
const attributeName =
|
|
25
|
+
const attributeName = is.isString(options.attribute)
|
|
26
26
|
? options.attribute
|
|
27
27
|
: propertyName;
|
|
28
28
|
if (name === attributeName) {
|
|
29
|
-
const converter = options.converter ||
|
|
30
|
-
const fromAttribute =
|
|
29
|
+
const converter = options.converter || is.u;
|
|
30
|
+
const fromAttribute = is.isFunction(converter)
|
|
31
31
|
? converter
|
|
32
|
-
: converter?.fromAttribute ??
|
|
32
|
+
: converter?.fromAttribute ?? is.u.fromAttribute;
|
|
33
33
|
const newValue = fromAttribute(value, options.type);
|
|
34
34
|
if (this[propertyName] !== newValue) {
|
|
35
35
|
this[key] = newValue;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const is = require('./is-3783cb36.js');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* 使用该 WeakMap 来存储指定表单中所有的 mdui 表单控件
|
|
@@ -45,12 +45,12 @@ const formResets = new WeakMap();
|
|
|
45
45
|
class FormController {
|
|
46
46
|
constructor(host, options) {
|
|
47
47
|
(this.host = host).addController(this);
|
|
48
|
-
this.definedController = new
|
|
48
|
+
this.definedController = new is.DefinedController(host, {
|
|
49
49
|
needDomReady: true,
|
|
50
50
|
});
|
|
51
51
|
this.options = {
|
|
52
52
|
form: (control) => {
|
|
53
|
-
const formId =
|
|
53
|
+
const formId = is.$(control).attr('form');
|
|
54
54
|
if (formId) {
|
|
55
55
|
const root = control.getRootNode();
|
|
56
56
|
return root.getElementById(formId);
|
|
@@ -62,7 +62,7 @@ class FormController {
|
|
|
62
62
|
defaultValue: (control) => control.defaultValue,
|
|
63
63
|
setValue: (control, value) => (control.value = value),
|
|
64
64
|
disabled: (control) => control.disabled,
|
|
65
|
-
reportValidity: (control) =>
|
|
65
|
+
reportValidity: (control) => is.isFunction(control.reportValidity) ? control.reportValidity() : true,
|
|
66
66
|
...options,
|
|
67
67
|
};
|
|
68
68
|
this.onFormData = this.onFormData.bind(this);
|
|
@@ -148,7 +148,7 @@ class FormController {
|
|
|
148
148
|
if (!this.form) {
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
|
-
const $button =
|
|
151
|
+
const $button = is.$(`<button type="${type}">`).css({
|
|
152
152
|
position: 'absolute',
|
|
153
153
|
width: 0,
|
|
154
154
|
height: 0,
|
|
@@ -167,7 +167,7 @@ class FormController {
|
|
|
167
167
|
'formnovalidate',
|
|
168
168
|
'formtarget',
|
|
169
169
|
].forEach((attr) => {
|
|
170
|
-
$button.attr(attr,
|
|
170
|
+
$button.attr(attr, is.$(invoker).attr(attr));
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
this.form.append(button);
|
|
@@ -188,9 +188,9 @@ class FormController {
|
|
|
188
188
|
].includes(this.host.tagName.toLowerCase());
|
|
189
189
|
if (!disabled &&
|
|
190
190
|
!isButton &&
|
|
191
|
-
|
|
191
|
+
is.isString(name) &&
|
|
192
192
|
name &&
|
|
193
|
-
!
|
|
193
|
+
!is.isUndefined(value)) {
|
|
194
194
|
if (Array.isArray(value)) {
|
|
195
195
|
value.forEach((val) => {
|
|
196
196
|
event.formData.append(name, val.toString());
|
|
@@ -232,7 +232,7 @@ class FormController {
|
|
|
232
232
|
if (this.form && !this.form.noValidate) {
|
|
233
233
|
const elements = getFormControls(this.form);
|
|
234
234
|
for (const element of elements) {
|
|
235
|
-
if (
|
|
235
|
+
if (is.isFunction(element.reportValidity) && !element.reportValidity()) {
|
|
236
236
|
return false;
|
|
237
237
|
}
|
|
238
238
|
}
|