element-ps 2.0.34 → 2.0.37
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/index.full.js +71 -375
- package/dist/index.full.min.js +5 -5
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +5 -5
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +71 -375
- package/es/components/affix/index.mjs +2 -2
- package/es/components/affix/src/affix.mjs +82 -19
- package/es/components/affix/src/affix.mjs.map +1 -1
- package/es/components/affix/src/affix2.mjs +19 -82
- package/es/components/affix/src/affix2.mjs.map +1 -1
- package/es/components/breadcrumb/index.mjs +2 -2
- package/es/components/breadcrumb/src/breadcrumb-item.mjs +11 -46
- package/es/components/breadcrumb/src/breadcrumb-item.mjs.map +1 -1
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs +46 -11
- package/es/components/breadcrumb/src/breadcrumb-item2.mjs.map +1 -1
- package/es/components/button/index.mjs +3 -3
- package/es/components/button/src/button-group.mjs +5 -30
- package/es/components/button/src/button-group.mjs.map +1 -1
- package/es/components/button/src/button-group2.mjs +30 -5
- package/es/components/button/src/button-group2.mjs.map +1 -1
- package/es/components/button/src/button.mjs +96 -48
- package/es/components/button/src/button.mjs.map +1 -1
- package/es/components/button/src/button2.mjs +48 -96
- package/es/components/button/src/button2.mjs.map +1 -1
- package/es/components/calendar/index.mjs +2 -2
- package/es/components/calendar/src/calendar.mjs +188 -9
- package/es/components/calendar/src/calendar.mjs.map +1 -1
- package/es/components/calendar/src/calendar2.mjs +9 -188
- package/es/components/calendar/src/calendar2.mjs.map +1 -1
- package/es/components/carousel/index.mjs +4 -4
- package/es/components/carousel/src/carousel-item.mjs +7 -148
- package/es/components/carousel/src/carousel-item.mjs.map +1 -1
- package/es/components/carousel/src/carousel-item2.mjs +148 -7
- package/es/components/carousel/src/carousel-item2.mjs.map +1 -1
- package/es/components/carousel/src/carousel.mjs +43 -201
- package/es/components/carousel/src/carousel.mjs.map +1 -1
- package/es/components/carousel/src/carousel2.mjs +201 -43
- package/es/components/carousel/src/carousel2.mjs.map +1 -1
- package/es/components/cascader-panel/src/config.mjs +1 -1
- package/es/components/cascader-panel/src/index.mjs +1 -1
- package/es/components/cascader-panel/src/menu.mjs +1 -1
- package/es/components/cascader-panel/src/node.mjs +200 -120
- package/es/components/cascader-panel/src/node.mjs.map +1 -1
- package/es/components/cascader-panel/src/node2.mjs +120 -200
- package/es/components/cascader-panel/src/node2.mjs.map +1 -1
- package/es/components/cascader-panel/src/store.mjs +1 -1
- package/es/components/collection/index.mjs +1 -1
- package/es/components/collection/src/collection.mjs +30 -10
- package/es/components/collection/src/collection.mjs.map +1 -1
- package/es/components/collection/src/collection2.mjs +10 -30
- package/es/components/collection/src/collection2.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content.mjs +34 -79
- package/es/components/dialog/src/dialog-content.mjs.map +1 -1
- package/es/components/dialog/src/dialog-content2.mjs +79 -34
- package/es/components/dialog/src/dialog-content2.mjs.map +1 -1
- package/es/components/dialog/src/dialog.mjs +1 -1
- package/es/components/dialog/src/dialog2.mjs +1 -1
- package/es/components/divider/index.mjs +2 -2
- package/es/components/divider/src/divider.mjs +34 -17
- package/es/components/divider/src/divider.mjs.map +1 -1
- package/es/components/divider/src/divider2.mjs +17 -34
- package/es/components/divider/src/divider2.mjs.map +1 -1
- package/es/components/drawer/index.mjs +2 -2
- package/es/components/drawer/src/drawer.mjs +117 -23
- package/es/components/drawer/src/drawer.mjs.map +1 -1
- package/es/components/drawer/src/drawer2.mjs +23 -117
- package/es/components/drawer/src/drawer2.mjs.map +1 -1
- package/es/components/dropdown/index.mjs +2 -2
- package/es/components/dropdown/src/dropdown-item-impl.mjs +1 -1
- package/es/components/dropdown/src/dropdown-item.mjs +1 -1
- package/es/components/dropdown/src/dropdown-menu.mjs +1 -1
- package/es/components/dropdown/src/dropdown.mjs +100 -109
- package/es/components/dropdown/src/dropdown.mjs.map +1 -1
- package/es/components/dropdown/src/dropdown2.mjs +109 -100
- package/es/components/dropdown/src/dropdown2.mjs.map +1 -1
- package/es/components/form/index.mjs +4 -4
- package/es/components/form/src/form-item.mjs +171 -46
- package/es/components/form/src/form-item.mjs.map +1 -1
- package/es/components/form/src/form-item2.mjs +46 -177
- package/es/components/form/src/form-item2.mjs.map +1 -1
- package/es/components/form/src/form.mjs +45 -40
- package/es/components/form/src/form.mjs.map +1 -1
- package/es/components/form/src/form2.mjs +40 -45
- package/es/components/form/src/form2.mjs.map +1 -1
- package/es/components/icon/index.mjs +2 -2
- package/es/components/icon/src/icon.mjs +35 -8
- package/es/components/icon/src/icon.mjs.map +1 -1
- package/es/components/icon/src/icon2.mjs +8 -35
- package/es/components/icon/src/icon2.mjs.map +1 -1
- package/es/components/image/index.mjs +2 -2
- package/es/components/image/src/image.mjs +50 -127
- package/es/components/image/src/image.mjs.map +1 -1
- package/es/components/image/src/image2.mjs +127 -50
- package/es/components/image/src/image2.mjs.map +1 -1
- package/es/components/index.mjs +23 -23
- package/es/components/menu/index.mjs +2 -2
- package/es/components/menu/src/menu-item.mjs +15 -74
- package/es/components/menu/src/menu-item.mjs.map +1 -1
- package/es/components/menu/src/menu-item2.mjs +74 -15
- package/es/components/menu/src/menu-item2.mjs.map +1 -1
- package/es/components/popconfirm/index.mjs +2 -2
- package/es/components/popconfirm/src/popconfirm.mjs +53 -20
- package/es/components/popconfirm/src/popconfirm.mjs.map +1 -1
- package/es/components/popconfirm/src/popconfirm2.mjs +22 -53
- package/es/components/popconfirm/src/popconfirm2.mjs.map +1 -1
- package/es/components/popover/src/popover.mjs +1 -1
- package/es/components/popper/index.mjs +2 -2
- package/es/components/popper/src/trigger.mjs +17 -28
- package/es/components/popper/src/trigger.mjs.map +1 -1
- package/es/components/popper/src/trigger2.mjs +28 -17
- package/es/components/popper/src/trigger2.mjs.map +1 -1
- package/es/components/progress/index.mjs +2 -2
- package/es/components/progress/src/progress.mjs +57 -230
- package/es/components/progress/src/progress.mjs.map +1 -1
- package/es/components/progress/src/progress2.mjs +230 -57
- package/es/components/progress/src/progress2.mjs.map +1 -1
- package/es/components/roving-focus-group/index.mjs +3 -3
- package/es/components/roving-focus-group/src/roving-focus-group-impl.mjs +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group.mjs +29 -27
- package/es/components/roving-focus-group/src/roving-focus-group.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs +27 -29
- package/es/components/roving-focus-group/src/roving-focus-group2.mjs.map +1 -1
- package/es/components/roving-focus-group/src/roving-focus-item.mjs +1 -1
- package/es/components/skeleton/index.mjs +2 -2
- package/es/components/skeleton/src/skeleton-item.mjs +23 -18
- package/es/components/skeleton/src/skeleton-item.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton-item2.mjs +18 -23
- package/es/components/skeleton/src/skeleton-item2.mjs.map +1 -1
- package/es/components/skeleton/src/skeleton2.mjs +1 -1
- package/es/components/tabs/index.mjs +3 -3
- package/es/components/tabs/src/tab-bar.mjs +76 -7
- package/es/components/tabs/src/tab-bar.mjs.map +1 -1
- package/es/components/tabs/src/tab-bar2.mjs +7 -76
- package/es/components/tabs/src/tab-bar2.mjs.map +1 -1
- package/es/components/tabs/src/tab-nav.mjs +1 -1
- package/es/components/tabs/src/tab-pane.mjs +15 -61
- package/es/components/tabs/src/tab-pane.mjs.map +1 -1
- package/es/components/tabs/src/tab-pane2.mjs +61 -15
- package/es/components/tabs/src/tab-pane2.mjs.map +1 -1
- package/es/components/timeline/index.mjs +2 -2
- package/es/components/timeline/src/timeline-item.mjs +39 -73
- package/es/components/timeline/src/timeline-item.mjs.map +1 -1
- package/es/components/timeline/src/timeline-item2.mjs +73 -39
- package/es/components/timeline/src/timeline-item2.mjs.map +1 -1
- package/es/components/tooltip/src/tooltip.mjs +1 -1
- package/es/components/tooltip/src/tooltip2.mjs +4 -2
- package/es/components/tooltip/src/tooltip2.mjs.map +1 -1
- package/es/components/tooltip/src/trigger.mjs +1 -1
- package/es/components/tooltip-v2/index.mjs +3 -3
- package/es/components/tooltip-v2/src/content.mjs +50 -113
- package/es/components/tooltip-v2/src/content.mjs.map +1 -1
- package/es/components/tooltip-v2/src/content2.mjs +113 -50
- package/es/components/tooltip-v2/src/content2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root.mjs +17 -81
- package/es/components/tooltip-v2/src/root.mjs.map +1 -1
- package/es/components/tooltip-v2/src/root2.mjs +81 -17
- package/es/components/tooltip-v2/src/root2.mjs.map +1 -1
- package/es/components/tooltip-v2/src/tooltip.mjs +3 -3
- package/es/components/tooltip-v2/src/tooltip2.mjs +6 -6
- package/es/components/tooltip-v2/src/trigger.mjs +11 -89
- package/es/components/tooltip-v2/src/trigger.mjs.map +1 -1
- package/es/components/tooltip-v2/src/trigger2.mjs +89 -11
- package/es/components/tooltip-v2/src/trigger2.mjs.map +1 -1
- package/es/components/upload/index.mjs +1 -1
- package/es/components/upload/src/upload-content.mjs +46 -15
- package/es/components/upload/src/upload-content.mjs.map +1 -1
- package/es/components/upload/src/upload-content2.mjs +15 -46
- package/es/components/upload/src/upload-content2.mjs.map +1 -1
- package/es/components/upload/src/upload2.mjs +1 -1
- package/es/index.mjs +23 -23
- package/lib/components/affix/index.js +2 -2
- package/lib/components/affix/src/affix.js +82 -19
- package/lib/components/affix/src/affix.js.map +1 -1
- package/lib/components/affix/src/affix2.js +19 -82
- package/lib/components/affix/src/affix2.js.map +1 -1
- package/lib/components/breadcrumb/index.js +2 -2
- package/lib/components/breadcrumb/src/breadcrumb-item.js +11 -46
- package/lib/components/breadcrumb/src/breadcrumb-item.js.map +1 -1
- package/lib/components/breadcrumb/src/breadcrumb-item2.js +46 -11
- package/lib/components/breadcrumb/src/breadcrumb-item2.js.map +1 -1
- package/lib/components/button/index.js +3 -3
- package/lib/components/button/src/button-group.js +5 -30
- package/lib/components/button/src/button-group.js.map +1 -1
- package/lib/components/button/src/button-group2.js +30 -5
- package/lib/components/button/src/button-group2.js.map +1 -1
- package/lib/components/button/src/button.js +96 -50
- package/lib/components/button/src/button.js.map +1 -1
- package/lib/components/button/src/button2.js +50 -96
- package/lib/components/button/src/button2.js.map +1 -1
- package/lib/components/calendar/index.js +2 -2
- package/lib/components/calendar/src/calendar.js +192 -9
- package/lib/components/calendar/src/calendar.js.map +1 -1
- package/lib/components/calendar/src/calendar2.js +9 -192
- package/lib/components/calendar/src/calendar2.js.map +1 -1
- package/lib/components/carousel/index.js +4 -4
- package/lib/components/carousel/src/carousel-item.js +7 -148
- package/lib/components/carousel/src/carousel-item.js.map +1 -1
- package/lib/components/carousel/src/carousel-item2.js +148 -7
- package/lib/components/carousel/src/carousel-item2.js.map +1 -1
- package/lib/components/carousel/src/carousel.js +43 -201
- package/lib/components/carousel/src/carousel.js.map +1 -1
- package/lib/components/carousel/src/carousel2.js +201 -43
- package/lib/components/carousel/src/carousel2.js.map +1 -1
- package/lib/components/cascader-panel/src/config.js +1 -1
- package/lib/components/cascader-panel/src/index.js +1 -1
- package/lib/components/cascader-panel/src/menu.js +1 -1
- package/lib/components/cascader-panel/src/node.js +200 -121
- package/lib/components/cascader-panel/src/node.js.map +1 -1
- package/lib/components/cascader-panel/src/node2.js +121 -200
- package/lib/components/cascader-panel/src/node2.js.map +1 -1
- package/lib/components/cascader-panel/src/store.js +1 -1
- package/lib/components/collection/index.js +1 -1
- package/lib/components/collection/src/collection.js +30 -9
- package/lib/components/collection/src/collection.js.map +1 -1
- package/lib/components/collection/src/collection2.js +9 -30
- package/lib/components/collection/src/collection2.js.map +1 -1
- package/lib/components/dialog/src/dialog-content.js +33 -78
- package/lib/components/dialog/src/dialog-content.js.map +1 -1
- package/lib/components/dialog/src/dialog-content2.js +78 -33
- package/lib/components/dialog/src/dialog-content2.js.map +1 -1
- package/lib/components/dialog/src/dialog.js +1 -1
- package/lib/components/dialog/src/dialog2.js +1 -1
- package/lib/components/divider/index.js +2 -2
- package/lib/components/divider/src/divider.js +34 -17
- package/lib/components/divider/src/divider.js.map +1 -1
- package/lib/components/divider/src/divider2.js +17 -34
- package/lib/components/divider/src/divider2.js.map +1 -1
- package/lib/components/drawer/index.js +2 -2
- package/lib/components/drawer/src/drawer.js +117 -23
- package/lib/components/drawer/src/drawer.js.map +1 -1
- package/lib/components/drawer/src/drawer2.js +23 -117
- package/lib/components/drawer/src/drawer2.js.map +1 -1
- package/lib/components/dropdown/index.js +2 -2
- package/lib/components/dropdown/src/dropdown-item-impl.js +1 -1
- package/lib/components/dropdown/src/dropdown-item.js +1 -1
- package/lib/components/dropdown/src/dropdown-menu.js +1 -1
- package/lib/components/dropdown/src/dropdown.js +109 -109
- package/lib/components/dropdown/src/dropdown.js.map +1 -1
- package/lib/components/dropdown/src/dropdown2.js +109 -109
- package/lib/components/dropdown/src/dropdown2.js.map +1 -1
- package/lib/components/form/index.js +4 -4
- package/lib/components/form/src/form-item.js +171 -47
- package/lib/components/form/src/form-item.js.map +1 -1
- package/lib/components/form/src/form-item2.js +47 -177
- package/lib/components/form/src/form-item2.js.map +1 -1
- package/lib/components/form/src/form.js +45 -40
- package/lib/components/form/src/form.js.map +1 -1
- package/lib/components/form/src/form2.js +40 -45
- package/lib/components/form/src/form2.js.map +1 -1
- package/lib/components/icon/index.js +2 -2
- package/lib/components/icon/src/icon.js +35 -8
- package/lib/components/icon/src/icon.js.map +1 -1
- package/lib/components/icon/src/icon2.js +8 -35
- package/lib/components/icon/src/icon2.js.map +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/image/src/image.js +50 -127
- package/lib/components/image/src/image.js.map +1 -1
- package/lib/components/image/src/image2.js +127 -50
- package/lib/components/image/src/image2.js.map +1 -1
- package/lib/components/index.js +23 -23
- package/lib/components/menu/index.js +2 -2
- package/lib/components/menu/src/menu-item.js +16 -74
- package/lib/components/menu/src/menu-item.js.map +1 -1
- package/lib/components/menu/src/menu-item2.js +74 -16
- package/lib/components/menu/src/menu-item2.js.map +1 -1
- package/lib/components/popconfirm/index.js +2 -2
- package/lib/components/popconfirm/src/popconfirm.js +53 -20
- package/lib/components/popconfirm/src/popconfirm.js.map +1 -1
- package/lib/components/popconfirm/src/popconfirm2.js +22 -53
- package/lib/components/popconfirm/src/popconfirm2.js.map +1 -1
- package/lib/components/popover/src/popover.js +1 -1
- package/lib/components/popper/index.js +2 -2
- package/lib/components/popper/src/trigger.js +17 -28
- package/lib/components/popper/src/trigger.js.map +1 -1
- package/lib/components/popper/src/trigger2.js +28 -17
- package/lib/components/popper/src/trigger2.js.map +1 -1
- package/lib/components/progress/index.js +2 -2
- package/lib/components/progress/src/progress.js +57 -230
- package/lib/components/progress/src/progress.js.map +1 -1
- package/lib/components/progress/src/progress2.js +230 -57
- package/lib/components/progress/src/progress2.js.map +1 -1
- package/lib/components/roving-focus-group/index.js +2 -2
- package/lib/components/roving-focus-group/src/roving-focus-group-impl.js +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group.js +33 -27
- package/lib/components/roving-focus-group/src/roving-focus-group.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-group2.js +27 -33
- package/lib/components/roving-focus-group/src/roving-focus-group2.js.map +1 -1
- package/lib/components/roving-focus-group/src/roving-focus-item.js +1 -1
- package/lib/components/skeleton/index.js +2 -2
- package/lib/components/skeleton/src/skeleton-item.js +23 -18
- package/lib/components/skeleton/src/skeleton-item.js.map +1 -1
- package/lib/components/skeleton/src/skeleton-item2.js +18 -23
- package/lib/components/skeleton/src/skeleton-item2.js.map +1 -1
- package/lib/components/skeleton/src/skeleton2.js +1 -1
- package/lib/components/tabs/index.js +3 -3
- package/lib/components/tabs/src/tab-bar.js +76 -7
- package/lib/components/tabs/src/tab-bar.js.map +1 -1
- package/lib/components/tabs/src/tab-bar2.js +7 -76
- package/lib/components/tabs/src/tab-bar2.js.map +1 -1
- package/lib/components/tabs/src/tab-nav.js +1 -1
- package/lib/components/tabs/src/tab-pane.js +15 -61
- package/lib/components/tabs/src/tab-pane.js.map +1 -1
- package/lib/components/tabs/src/tab-pane2.js +61 -15
- package/lib/components/tabs/src/tab-pane2.js.map +1 -1
- package/lib/components/timeline/index.js +2 -2
- package/lib/components/timeline/src/timeline-item.js +39 -73
- package/lib/components/timeline/src/timeline-item.js.map +1 -1
- package/lib/components/timeline/src/timeline-item2.js +73 -39
- package/lib/components/timeline/src/timeline-item2.js.map +1 -1
- package/lib/components/tooltip/src/tooltip.js +1 -1
- package/lib/components/tooltip/src/tooltip2.js +3 -1
- package/lib/components/tooltip/src/tooltip2.js.map +1 -1
- package/lib/components/tooltip/src/trigger.js +1 -1
- package/lib/components/tooltip-v2/index.js +3 -3
- package/lib/components/tooltip-v2/src/content.js +50 -113
- package/lib/components/tooltip-v2/src/content.js.map +1 -1
- package/lib/components/tooltip-v2/src/content2.js +113 -50
- package/lib/components/tooltip-v2/src/content2.js.map +1 -1
- package/lib/components/tooltip-v2/src/root.js +17 -81
- package/lib/components/tooltip-v2/src/root.js.map +1 -1
- package/lib/components/tooltip-v2/src/root2.js +81 -17
- package/lib/components/tooltip-v2/src/root2.js.map +1 -1
- package/lib/components/tooltip-v2/src/tooltip.js +3 -3
- package/lib/components/tooltip-v2/src/tooltip2.js +6 -6
- package/lib/components/tooltip-v2/src/trigger.js +11 -89
- package/lib/components/tooltip-v2/src/trigger.js.map +1 -1
- package/lib/components/tooltip-v2/src/trigger2.js +89 -11
- package/lib/components/tooltip-v2/src/trigger2.js.map +1 -1
- package/lib/components/upload/index.js +1 -1
- package/lib/components/upload/src/upload-content.js +46 -15
- package/lib/components/upload/src/upload-content.js.map +1 -1
- package/lib/components/upload/src/upload-content2.js +15 -46
- package/lib/components/upload/src/upload-content2.js.map +1 -1
- package/lib/components/upload/src/upload2.js +1 -1
- package/lib/index.js +23 -23
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Affix from './src/
|
|
3
|
-
export { affixProps } from './src/
|
|
2
|
+
import Affix from './src/affix.mjs';
|
|
3
|
+
export { affixProps } from './src/affix2.mjs';
|
|
4
4
|
import { withInstall } from '../../utils/vue/install.mjs';
|
|
5
5
|
|
|
6
6
|
const PsAffix = withInstall(Affix);
|
|
@@ -1,25 +1,88 @@
|
|
|
1
|
+
import { defineComponent, shallowRef, ref, computed, onMounted, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createElementVNode, renderSlot } from 'vue';
|
|
2
|
+
import { useWindowSize, useElementBounding } from '@vueuse/core';
|
|
1
3
|
import '../../../utils/index.mjs';
|
|
2
|
-
import
|
|
4
|
+
import '../../../hooks/index.mjs';
|
|
5
|
+
import { affixProps } from './affix2.mjs';
|
|
6
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
8
|
+
import { throwError } from '../../../utils/error.mjs';
|
|
9
|
+
import { getScrollContainer } from '../../../utils/dom/scroll.mjs';
|
|
3
10
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
const __default__ = {
|
|
12
|
+
name: "PsAffix"
|
|
13
|
+
};
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
|
+
...__default__,
|
|
16
|
+
props: affixProps,
|
|
17
|
+
setup(__props, { expose }) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const COMPONENT_NAME = "PsAffix";
|
|
20
|
+
const ns = useNamespace("affix");
|
|
21
|
+
const target = shallowRef();
|
|
22
|
+
const root = shallowRef();
|
|
23
|
+
const scrollContainer = shallowRef();
|
|
24
|
+
const { height: windowHeight } = useWindowSize();
|
|
25
|
+
const {
|
|
26
|
+
height: rootHeight,
|
|
27
|
+
width: rootWidth,
|
|
28
|
+
top: rootTop,
|
|
29
|
+
bottom: rootBottom,
|
|
30
|
+
update: updateRoot
|
|
31
|
+
} = useElementBounding(root);
|
|
32
|
+
const targetRect = useElementBounding(target);
|
|
33
|
+
const fixed = ref(false);
|
|
34
|
+
const scrollTop = ref(0);
|
|
35
|
+
const transform = ref(0);
|
|
36
|
+
const rootStyle = computed(() => {
|
|
37
|
+
return {
|
|
38
|
+
height: fixed.value ? `${rootHeight.value}px` : "",
|
|
39
|
+
width: fixed.value ? `${rootWidth.value}px` : ""
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
const affixStyle = computed(() => {
|
|
43
|
+
if (!fixed.value)
|
|
44
|
+
return {};
|
|
45
|
+
const offset = props.offset ? `${props.offset}px` : 0;
|
|
46
|
+
return {
|
|
47
|
+
height: `${rootHeight.value}px`,
|
|
48
|
+
width: `${rootWidth.value}px`,
|
|
49
|
+
top: props.position === "top" ? offset : "",
|
|
50
|
+
bottom: props.position === "bottom" ? offset : "",
|
|
51
|
+
transform: transform.value ? `translateY(${transform.value}px)` : "",
|
|
52
|
+
zIndex: props.zIndex
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
onMounted(() => {
|
|
56
|
+
var _a;
|
|
57
|
+
if (props.target) {
|
|
58
|
+
target.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
|
|
59
|
+
if (!target.value)
|
|
60
|
+
throwError(COMPONENT_NAME, `Target is not existed: ${props.target}`);
|
|
61
|
+
} else {
|
|
62
|
+
target.value = document.documentElement;
|
|
63
|
+
}
|
|
64
|
+
scrollContainer.value = getScrollContainer(root.value, true);
|
|
65
|
+
updateRoot();
|
|
66
|
+
});
|
|
67
|
+
expose({});
|
|
68
|
+
return (_ctx, _cache) => {
|
|
69
|
+
return openBlock(), createElementBlock("div", {
|
|
70
|
+
ref_key: "root",
|
|
71
|
+
ref: root,
|
|
72
|
+
class: normalizeClass(unref(ns).b()),
|
|
73
|
+
style: normalizeStyle(unref(rootStyle))
|
|
74
|
+
}, [
|
|
75
|
+
createElementVNode("div", {
|
|
76
|
+
class: normalizeClass({ [unref(ns).m("fixed")]: fixed.value }),
|
|
77
|
+
style: normalizeStyle(unref(affixStyle))
|
|
78
|
+
}, [
|
|
79
|
+
renderSlot(_ctx.$slots, "default")
|
|
80
|
+
], 6)
|
|
81
|
+
], 6);
|
|
82
|
+
};
|
|
21
83
|
}
|
|
22
84
|
});
|
|
85
|
+
var Affix = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/affix/src/affix.vue"]]);
|
|
23
86
|
|
|
24
|
-
export {
|
|
87
|
+
export { Affix as default };
|
|
25
88
|
//# sourceMappingURL=affix.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affix.mjs","sources":["../../../../../../packages/components/affix/src/affix.
|
|
1
|
+
{"version":3,"file":"affix.mjs","sources":["../../../../../../packages/components/affix/src/affix.vue"],"sourcesContent":["<template>\n <div ref=\"root\" :class=\"ns.b()\" :style=\"rootStyle\">\n <div :class=\"{ [ns.m('fixed')]: fixed }\" :style=\"affixStyle\">\n <slot />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, onMounted, ref, shallowRef, watch, watchEffect } from 'vue'\nimport {\n useElementBounding,\n useWindowSize,\n} from '@vueuse/core'\nimport { getScrollContainer, throwError } from '@element-ps/utils'\nimport { useNamespace } from '@element-ps/hooks'\nimport { affixProps } from './affix'\nimport type { CSSProperties } from 'vue'\n\nconst COMPONENT_NAME = 'PsAffix'\ndefineOptions({\n name: 'PsAffix',\n})\n\nconst props = defineProps(affixProps)\n\nconst ns = useNamespace('affix')\n\nconst target = shallowRef<HTMLElement>()\nconst root = shallowRef<HTMLDivElement>()\nconst scrollContainer = shallowRef<HTMLElement | Window>()\nconst { height: windowHeight } = useWindowSize()\nconst {\n height: rootHeight,\n width: rootWidth,\n top: rootTop,\n bottom: rootBottom,\n update: updateRoot,\n} = useElementBounding(root)\nconst targetRect = useElementBounding(target)\n\nconst fixed = ref(false)\nconst scrollTop = ref(0)\nconst transform = ref(0)\n\nconst rootStyle = computed<CSSProperties>(() => {\n return {\n height: fixed.value ? `${rootHeight.value}px` : '',\n width: fixed.value ? `${rootWidth.value}px` : '',\n }\n})\n\nconst affixStyle = computed<CSSProperties>(() => {\n if (!fixed.value) return {}\n\n const offset = props.offset ? `${props.offset}px` : 0\n return {\n height: `${rootHeight.value}px`,\n width: `${rootWidth.value}px`,\n top: props.position === 'top' ? offset : '',\n bottom: props.position === 'bottom' ? offset : '',\n transform: transform.value ? `translateY(${transform.value}px)` : '',\n zIndex: props.zIndex,\n }\n})\n\nonMounted(() => {\n if (props.target) {\n target.value =\n document.querySelector<HTMLElement>(props.target) ?? undefined\n if (!target.value)\n throwError(COMPONENT_NAME, `Target is not existed: ${props.target}`)\n } else {\n target.value = document.documentElement\n }\n scrollContainer.value = getScrollContainer(root.value!, true)\n updateRoot()\n})\n\ndefineExpose({\n /** @description update affix status */\n})\n</script>\n"],"names":[],"mappings":"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"}
|
|
@@ -1,88 +1,25 @@
|
|
|
1
|
-
import { defineComponent, shallowRef, ref, computed, onMounted, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createElementVNode, renderSlot } from 'vue';
|
|
2
|
-
import { useWindowSize, useElementBounding } from '@vueuse/core';
|
|
3
1
|
import '../../../utils/index.mjs';
|
|
4
|
-
import '../../../
|
|
5
|
-
import { affixProps } from './affix.mjs';
|
|
6
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
7
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
8
|
-
import { throwError } from '../../../utils/error.mjs';
|
|
9
|
-
import { getScrollContainer } from '../../../utils/dom/scroll.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
|
|
10
3
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
top: rootTop,
|
|
29
|
-
bottom: rootBottom,
|
|
30
|
-
update: updateRoot
|
|
31
|
-
} = useElementBounding(root);
|
|
32
|
-
const targetRect = useElementBounding(target);
|
|
33
|
-
const fixed = ref(false);
|
|
34
|
-
const scrollTop = ref(0);
|
|
35
|
-
const transform = ref(0);
|
|
36
|
-
const rootStyle = computed(() => {
|
|
37
|
-
return {
|
|
38
|
-
height: fixed.value ? `${rootHeight.value}px` : "",
|
|
39
|
-
width: fixed.value ? `${rootWidth.value}px` : ""
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
|
-
const affixStyle = computed(() => {
|
|
43
|
-
if (!fixed.value)
|
|
44
|
-
return {};
|
|
45
|
-
const offset = props.offset ? `${props.offset}px` : 0;
|
|
46
|
-
return {
|
|
47
|
-
height: `${rootHeight.value}px`,
|
|
48
|
-
width: `${rootWidth.value}px`,
|
|
49
|
-
top: props.position === "top" ? offset : "",
|
|
50
|
-
bottom: props.position === "bottom" ? offset : "",
|
|
51
|
-
transform: transform.value ? `translateY(${transform.value}px)` : "",
|
|
52
|
-
zIndex: props.zIndex
|
|
53
|
-
};
|
|
54
|
-
});
|
|
55
|
-
onMounted(() => {
|
|
56
|
-
var _a;
|
|
57
|
-
if (props.target) {
|
|
58
|
-
target.value = (_a = document.querySelector(props.target)) != null ? _a : void 0;
|
|
59
|
-
if (!target.value)
|
|
60
|
-
throwError(COMPONENT_NAME, `Target is not existed: ${props.target}`);
|
|
61
|
-
} else {
|
|
62
|
-
target.value = document.documentElement;
|
|
63
|
-
}
|
|
64
|
-
scrollContainer.value = getScrollContainer(root.value, true);
|
|
65
|
-
updateRoot();
|
|
66
|
-
});
|
|
67
|
-
expose({});
|
|
68
|
-
return (_ctx, _cache) => {
|
|
69
|
-
return openBlock(), createElementBlock("div", {
|
|
70
|
-
ref_key: "root",
|
|
71
|
-
ref: root,
|
|
72
|
-
class: normalizeClass(unref(ns).b()),
|
|
73
|
-
style: normalizeStyle(unref(rootStyle))
|
|
74
|
-
}, [
|
|
75
|
-
createElementVNode("div", {
|
|
76
|
-
class: normalizeClass({ [unref(ns).m("fixed")]: fixed.value }),
|
|
77
|
-
style: normalizeStyle(unref(affixStyle))
|
|
78
|
-
}, [
|
|
79
|
-
renderSlot(_ctx.$slots, "default")
|
|
80
|
-
], 6)
|
|
81
|
-
], 6);
|
|
82
|
-
};
|
|
4
|
+
const affixProps = buildProps({
|
|
5
|
+
zIndex: {
|
|
6
|
+
type: definePropType([Number, String]),
|
|
7
|
+
default: 100
|
|
8
|
+
},
|
|
9
|
+
target: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: ""
|
|
12
|
+
},
|
|
13
|
+
offset: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 0
|
|
16
|
+
},
|
|
17
|
+
position: {
|
|
18
|
+
type: String,
|
|
19
|
+
values: ["top", "bottom"],
|
|
20
|
+
default: "top"
|
|
83
21
|
}
|
|
84
22
|
});
|
|
85
|
-
var Affix = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/affix/src/affix.vue"]]);
|
|
86
23
|
|
|
87
|
-
export {
|
|
24
|
+
export { affixProps };
|
|
88
25
|
//# sourceMappingURL=affix2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affix2.mjs","sources":["../../../../../../packages/components/affix/src/affix.
|
|
1
|
+
{"version":3,"file":"affix2.mjs","sources":["../../../../../../packages/components/affix/src/affix.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-ps/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { ZIndexProperty } from 'csstype'\nimport type Affix from './affix.vue'\n\nexport const affixProps = buildProps({\n zIndex: {\n type: definePropType<ZIndexProperty>([Number, String]),\n default: 100,\n },\n target: {\n type: String,\n default: '',\n },\n offset: {\n type: Number,\n default: 0,\n },\n position: {\n type: String,\n values: ['top', 'bottom'],\n default: 'top',\n },\n} as const)\nexport type AffixProps = ExtractPropTypes<typeof affixProps>\n\nexport type AffixInstance = InstanceType<typeof Affix>\n"],"names":[],"mappings":";;;AACY,MAAC,UAAU,GAAG,UAAU,CAAC;AACrC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;AAC7B,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
2
|
import Breadcrumb from './src/breadcrumb.mjs';
|
|
3
|
-
import BreadcrumbItem from './src/breadcrumb-
|
|
3
|
+
import BreadcrumbItem from './src/breadcrumb-item2.mjs';
|
|
4
4
|
export { breadcrumbProps } from './src/breadcrumb2.mjs';
|
|
5
|
-
export { breadcrumbItemProps } from './src/breadcrumb-
|
|
5
|
+
export { breadcrumbItemProps } from './src/breadcrumb-item.mjs';
|
|
6
6
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
|
7
7
|
|
|
8
8
|
const PsBreadcrumb = withInstall(Breadcrumb, {
|
|
@@ -1,51 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import '../../../tokens/index.mjs';
|
|
4
|
-
import '../../../hooks/index.mjs';
|
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
-
import { breadcrumbKey } from '../../../tokens/breadcrumb.mjs';
|
|
7
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import '../../../utils/index.mjs';
|
|
2
|
+
import { buildProps, definePropType } from '../../../utils/vue/props.mjs';
|
|
8
3
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const { separator, separatorIcon } = breadcrumbInjection;
|
|
18
|
-
const link = ref();
|
|
19
|
-
return (_ctx, _cache) => {
|
|
20
|
-
return openBlock(), createElementBlock("span", {
|
|
21
|
-
class: normalizeClass(unref(ns).e("item"))
|
|
22
|
-
}, [
|
|
23
|
-
createElementVNode("span", {
|
|
24
|
-
ref_key: "link",
|
|
25
|
-
ref: link,
|
|
26
|
-
class: normalizeClass([unref(ns).e("inner"), unref(ns).is("link", !!_ctx.to)]),
|
|
27
|
-
role: "link"
|
|
28
|
-
}, [
|
|
29
|
-
renderSlot(_ctx.$slots, "default")
|
|
30
|
-
], 2),
|
|
31
|
-
unref(separatorIcon) ? (openBlock(), createBlock(unref(PsIcon), {
|
|
32
|
-
key: 0,
|
|
33
|
-
class: normalizeClass(unref(ns).e("separator"))
|
|
34
|
-
}, {
|
|
35
|
-
default: withCtx(() => [
|
|
36
|
-
(openBlock(), createBlock(resolveDynamicComponent(unref(separatorIcon))))
|
|
37
|
-
]),
|
|
38
|
-
_: 1
|
|
39
|
-
}, 8, ["class"])) : (openBlock(), createElementBlock("span", {
|
|
40
|
-
key: 1,
|
|
41
|
-
class: normalizeClass(unref(ns).e("separator")),
|
|
42
|
-
role: "presentation"
|
|
43
|
-
}, toDisplayString(unref(separator)), 3))
|
|
44
|
-
], 2);
|
|
45
|
-
};
|
|
4
|
+
const breadcrumbItemProps = buildProps({
|
|
5
|
+
to: {
|
|
6
|
+
type: definePropType([String, Object]),
|
|
7
|
+
default: ""
|
|
8
|
+
},
|
|
9
|
+
replace: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false
|
|
46
12
|
}
|
|
47
13
|
});
|
|
48
|
-
var BreadcrumbItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/breadcrumb/src/breadcrumb-item.vue"]]);
|
|
49
14
|
|
|
50
|
-
export {
|
|
15
|
+
export { breadcrumbItemProps };
|
|
51
16
|
//# sourceMappingURL=breadcrumb-item.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-item.mjs","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.
|
|
1
|
+
{"version":3,"file":"breadcrumb-item.mjs","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-ps/utils'\nimport type { ExtractPropTypes } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\nimport type BreadcrumbItem from './breadcrumb-item.vue'\n\nexport const breadcrumbItemProps = buildProps({\n to: {\n type: definePropType<RouteLocationRaw>([String, Object]),\n default: '',\n },\n replace: {\n type: Boolean,\n default: false,\n },\n} as const)\nexport type BreadcrumbItemProps = ExtractPropTypes<typeof breadcrumbItemProps>\n\nexport type BreadcrumbItemInstance = InstanceType<typeof BreadcrumbItem>\n"],"names":[],"mappings":";;;AACY,MAAC,mBAAmB,GAAG,UAAU,CAAC;AAC9C,EAAE,EAAE,EAAE;AACN,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,OAAO,EAAE,KAAK;AAClB,GAAG;AACH,CAAC;;;;"}
|
|
@@ -1,16 +1,51 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent, inject, ref, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, renderSlot, createBlock, withCtx, resolveDynamicComponent, toDisplayString } from 'vue';
|
|
2
|
+
import { PsIcon } from '../../icon/index.mjs';
|
|
3
|
+
import '../../../tokens/index.mjs';
|
|
4
|
+
import '../../../hooks/index.mjs';
|
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
+
import { breadcrumbKey } from '../../../tokens/breadcrumb.mjs';
|
|
7
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
3
8
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const __default__ = {
|
|
10
|
+
name: "PsBreadcrumbItem"
|
|
11
|
+
};
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
...__default__,
|
|
14
|
+
setup(__props) {
|
|
15
|
+
const breadcrumbInjection = inject(breadcrumbKey, {});
|
|
16
|
+
const ns = useNamespace("breadcrumb");
|
|
17
|
+
const { separator, separatorIcon } = breadcrumbInjection;
|
|
18
|
+
const link = ref();
|
|
19
|
+
return (_ctx, _cache) => {
|
|
20
|
+
return openBlock(), createElementBlock("span", {
|
|
21
|
+
class: normalizeClass(unref(ns).e("item"))
|
|
22
|
+
}, [
|
|
23
|
+
createElementVNode("span", {
|
|
24
|
+
ref_key: "link",
|
|
25
|
+
ref: link,
|
|
26
|
+
class: normalizeClass([unref(ns).e("inner"), unref(ns).is("link", !!_ctx.to)]),
|
|
27
|
+
role: "link"
|
|
28
|
+
}, [
|
|
29
|
+
renderSlot(_ctx.$slots, "default")
|
|
30
|
+
], 2),
|
|
31
|
+
unref(separatorIcon) ? (openBlock(), createBlock(unref(PsIcon), {
|
|
32
|
+
key: 0,
|
|
33
|
+
class: normalizeClass(unref(ns).e("separator"))
|
|
34
|
+
}, {
|
|
35
|
+
default: withCtx(() => [
|
|
36
|
+
(openBlock(), createBlock(resolveDynamicComponent(unref(separatorIcon))))
|
|
37
|
+
]),
|
|
38
|
+
_: 1
|
|
39
|
+
}, 8, ["class"])) : (openBlock(), createElementBlock("span", {
|
|
40
|
+
key: 1,
|
|
41
|
+
class: normalizeClass(unref(ns).e("separator")),
|
|
42
|
+
role: "presentation"
|
|
43
|
+
}, toDisplayString(unref(separator)), 3))
|
|
44
|
+
], 2);
|
|
45
|
+
};
|
|
12
46
|
}
|
|
13
47
|
});
|
|
48
|
+
var BreadcrumbItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/breadcrumb/src/breadcrumb-item.vue"]]);
|
|
14
49
|
|
|
15
|
-
export {
|
|
50
|
+
export { BreadcrumbItem as default };
|
|
16
51
|
//# sourceMappingURL=breadcrumb-item2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb-item2.mjs","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.
|
|
1
|
+
{"version":3,"file":"breadcrumb-item2.mjs","sources":["../../../../../../packages/components/breadcrumb/src/breadcrumb-item.vue"],"sourcesContent":["<template>\n <span :class=\"ns.e('item')\">\n <span\n ref=\"link\"\n :class=\"[ns.e('inner'), ns.is('link', !!to)]\"\n role=\"link\"\n >\n <slot />\n </span>\n <ps-icon v-if=\"separatorIcon\" :class=\"ns.e('separator')\">\n <component :is=\"separatorIcon\" />\n </ps-icon>\n <span v-else :class=\"ns.e('separator')\" role=\"presentation\">\n {{ separator }}\n </span>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { inject, ref } from 'vue'\nimport PsIcon from '@element-ps/components/icon'\nimport { breadcrumbKey } from '@element-ps/tokens'\nimport { useNamespace } from '@element-ps/hooks'\nimport type { BreadcrumbProps } from './breadcrumb'\n\ndefineOptions({\n name: 'PsBreadcrumbItem',\n})\n\nconst breadcrumbInjection = inject(breadcrumbKey, {} as BreadcrumbProps)!\n\nconst ns = useNamespace('breadcrumb')\n\nconst { separator, separatorIcon } = breadcrumbInjection\n\nconst link = ref<HTMLSpanElement>()\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;AA6BA,IAAA,MAAA,mBAAA,GAAA,MAAA,CAAA,aAAA,EAAA,EAAA,CAAA,CAAA;AAEA,IAAA,MAAA,EAAA,GAAA,aAAA,YAAA,CAAA,CAAA;AAEA,IAAA,MAAA,EAAA,WAAA,aAAA,EAAA,GAAA,mBAAA,CAAA;AAEA,IAAA,MAAA,OAAA,GAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../../utils/index.mjs';
|
|
2
|
-
import Button from './src/
|
|
3
|
-
import ButtonGroup from './src/button-
|
|
4
|
-
export { buttonNativeTypes, buttonProps, buttonTypes } from './src/
|
|
2
|
+
import Button from './src/button.mjs';
|
|
3
|
+
import ButtonGroup from './src/button-group2.mjs';
|
|
4
|
+
export { buttonNativeTypes, buttonProps, buttonTypes } from './src/button2.mjs';
|
|
5
5
|
import { withInstall, withNoopInstall } from '../../utils/vue/install.mjs';
|
|
6
6
|
|
|
7
7
|
const PsButton = withInstall(Button, {
|
|
@@ -1,34 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import '../../../tokens/index.mjs';
|
|
3
|
-
import '../../../hooks/index.mjs';
|
|
4
|
-
import { buttonGroupProps } from './button-group2.mjs';
|
|
5
|
-
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
-
import { buttonGroupContextKey } from '../../../tokens/button.mjs';
|
|
7
|
-
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
1
|
+
import { buttonProps } from './button2.mjs';
|
|
8
2
|
|
|
9
|
-
const
|
|
10
|
-
|
|
3
|
+
const buttonGroupProps = {
|
|
4
|
+
size: buttonProps.size,
|
|
5
|
+
type: buttonProps.type
|
|
11
6
|
};
|
|
12
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
-
...__default__,
|
|
14
|
-
props: buttonGroupProps,
|
|
15
|
-
setup(__props) {
|
|
16
|
-
const props = __props;
|
|
17
|
-
provide(buttonGroupContextKey, reactive({
|
|
18
|
-
size: toRef(props, "size"),
|
|
19
|
-
type: toRef(props, "type")
|
|
20
|
-
}));
|
|
21
|
-
const ns = useNamespace("button");
|
|
22
|
-
return (_ctx, _cache) => {
|
|
23
|
-
return openBlock(), createElementBlock("div", {
|
|
24
|
-
class: normalizeClass(`${unref(ns).b("group")}`)
|
|
25
|
-
}, [
|
|
26
|
-
renderSlot(_ctx.$slots, "default")
|
|
27
|
-
], 2);
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
var ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/button/src/button-group.vue"]]);
|
|
32
7
|
|
|
33
|
-
export {
|
|
8
|
+
export { buttonGroupProps };
|
|
34
9
|
//# sourceMappingURL=button-group.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group.mjs","sources":["../../../../../../packages/components/button/src/button-group.
|
|
1
|
+
{"version":3,"file":"button-group.mjs","sources":["../../../../../../packages/components/button/src/button-group.ts"],"sourcesContent":["import { buttonProps } from './button'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type buttonGroup from './button-group.vue'\n\nexport const buttonGroupProps = {\n size: buttonProps.size,\n type: buttonProps.type,\n} as const\nexport type ButtonGroupProps = ExtractPropTypes<typeof buttonGroupProps>\n\nexport type ButtonGroupInstance = InstanceType<typeof buttonGroup>\n"],"names":[],"mappings":";;AACY,MAAC,gBAAgB,GAAG;AAChC,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI;AACxB,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI;AACxB;;;;"}
|
|
@@ -1,9 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent, provide, reactive, toRef, openBlock, createElementBlock, normalizeClass, unref, renderSlot } from 'vue';
|
|
2
|
+
import '../../../tokens/index.mjs';
|
|
3
|
+
import '../../../hooks/index.mjs';
|
|
4
|
+
import { buttonGroupProps } from './button-group.mjs';
|
|
5
|
+
import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
|
|
6
|
+
import { buttonGroupContextKey } from '../../../tokens/button.mjs';
|
|
7
|
+
import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
|
|
2
8
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
type: buttonProps.type
|
|
9
|
+
const __default__ = {
|
|
10
|
+
name: "PsButtonGroup"
|
|
6
11
|
};
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
...__default__,
|
|
14
|
+
props: buttonGroupProps,
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
provide(buttonGroupContextKey, reactive({
|
|
18
|
+
size: toRef(props, "size"),
|
|
19
|
+
type: toRef(props, "type")
|
|
20
|
+
}));
|
|
21
|
+
const ns = useNamespace("button");
|
|
22
|
+
return (_ctx, _cache) => {
|
|
23
|
+
return openBlock(), createElementBlock("div", {
|
|
24
|
+
class: normalizeClass(`${unref(ns).b("group")}`)
|
|
25
|
+
}, [
|
|
26
|
+
renderSlot(_ctx.$slots, "default")
|
|
27
|
+
], 2);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
var ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/meng/workspace/element-ps/packages/components/button/src/button-group.vue"]]);
|
|
7
32
|
|
|
8
|
-
export {
|
|
33
|
+
export { ButtonGroup as default };
|
|
9
34
|
//# sourceMappingURL=button-group2.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-group2.mjs","sources":["../../../../../../packages/components/button/src/button-group.
|
|
1
|
+
{"version":3,"file":"button-group2.mjs","sources":["../../../../../../packages/components/button/src/button-group.vue"],"sourcesContent":["<template>\n <div :class=\"`${ns.b('group')}`\">\n <slot />\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { provide, reactive, toRef } from 'vue'\nimport { buttonGroupContextKey } from '@element-ps/tokens'\nimport { useNamespace } from '@element-ps/hooks'\nimport { buttonGroupProps } from './button-group'\n\ndefineOptions({\n name: 'PsButtonGroup',\n})\nconst props = defineProps(buttonGroupProps)\nprovide(\n buttonGroupContextKey,\n reactive({\n size: toRef(props, 'size'),\n type: toRef(props, 'type'),\n })\n)\nconst ns = useNamespace('button')\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAeA,IAAA,OAAA,CACA,uBACA,QAAA,CAAA;AAAA,MACA,IAAA,EAAA,KAAA,CAAA,KAAA,EAAA,MAAA,CAAA;AAAA,MACA,IAAA,EAAA,KAAA,CAAA,KAAA,EAAA,MAAA,CAAA;AAAA,KACA,CACA,CAAA,CAAA;AACA,IAAA,MAAA,EAAA,GAAA,aAAA,QAAA,CAAA,CAAA;;;;;;;;;;;;;;"}
|