yc-design-vue 1.0.9 → 1.1.0
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/es/Affix/index.vue.js +1 -2
- package/es/Anchor/Anchor.vue2.js +1 -2
- package/es/AutoComplete/index.d.ts +16 -19
- package/es/AutoComplete/index.vue.d.ts +27 -33
- package/es/Avatar/Avatar.vue2.js +1 -2
- package/es/Avatar/AvatarGroup.vue2.js +1 -2
- package/es/Badge/index.vue2.js +1 -2
- package/es/Breadcrumb/BreadcrumbSeparator.vue2.js +1 -1
- package/es/Button/hooks/useContext.d.ts +1 -1
- package/es/Carousel/CarouselIndicator.vue2.js +1 -2
- package/es/Carousel/hooks/useContext.js +1 -2
- package/es/Cascader/Cascader.vue.d.ts +7 -7
- package/es/Cascader/Cascader.vue2.js +1 -2
- package/es/Cascader/CascaderOption.vue2.js +1 -2
- package/es/Cascader/index.d.ts +6 -6
- package/es/Checkbox/CheckboxGroup.vue.d.ts +1 -1
- package/es/Checkbox/index.d.ts +3 -3
- package/es/ColorPicker/ColorControl.vue2.js +1 -2
- package/es/ColorPicker/ColorPalette.vue2.js +1 -2
- package/es/ColorPicker/ColorPicker.vue.d.ts +2 -2
- package/es/ColorPicker/index.d.ts +6 -6
- package/es/Descriptions/Descriptions.vue.d.ts +1 -1
- package/es/Descriptions/index.d.ts +3 -3
- package/es/Divider/index.d.ts +3 -3
- package/es/Divider/index.vue.d.ts +1 -1
- package/es/Divider/index.vue2.js +1 -2
- package/es/Drawer/Drawer.vue2.js +1 -2
- package/es/Dropdown/Dropdown.vue.js +1 -2
- package/es/Dropdown/Dsubmenu.vue2.js +1 -2
- package/es/Grid/Grid.vue2.js +1 -2
- package/es/Grid/GridCol.vue.js +1 -2
- package/es/Grid/GridItem.vue.js +1 -2
- package/es/Grid/GridRow.vue2.js +1 -2
- package/es/Icon/index.vue2.js +1 -2
- package/es/Image/Image.vue2.js +1 -2
- package/es/Image/ImagePreview.vue.d.ts +1 -1
- package/es/Image/ImagePreviewToolbar.vue2.js +6 -6
- package/es/Image/index.d.ts +3 -3
- package/es/Input/Input.vue.d.ts +1 -1
- package/es/Input/index.d.ts +3 -3
- package/es/InputNumber/InputNumber.vue.d.ts +7 -7
- package/es/InputNumber/InputNumber.vue2.js +1 -2
- package/es/InputNumber/InputOperaBtn.vue2.js +1 -1
- package/es/InputNumber/index.d.ts +6 -6
- package/es/InputTag/index.d.ts +5 -5
- package/es/InputTag/index.vue.d.ts +2 -2
- package/es/InputTag/index.vue2.js +1 -2
- package/es/Layout/LayoutSider.vue2.js +1 -2
- package/es/List/List.vue.d.ts +1 -1
- package/es/List/List.vue2.js +1 -2
- package/es/List/hooks/useScrollReach.js +1 -2
- package/es/List/index.d.ts +3 -3
- package/es/Mention/index.d.ts +16 -19
- package/es/Mention/index.vue.d.ts +32 -38
- package/es/Menu/MenuItem.vue2.js +1 -2
- package/es/Menu/MenuItemGroup.vue2.js +1 -2
- package/es/Menu/hooks/useContext.js +1 -2
- package/es/Message/Message.vue.d.ts +2 -2
- package/es/Message/index.d.ts +6 -6
- package/es/Modal/Modal.vue2.js +1 -2
- package/es/Modal/hooks/useModalDraggable.js +1 -2
- package/es/Notification/Notification.vue.d.ts +2 -2
- package/es/Notification/index.d.ts +6 -6
- package/es/OverflowList/index.vue2.js +1 -2
- package/es/Pagination/Pagination.vue2.js +1 -2
- package/es/Progress/ProgressCircle.vue2.js +2 -3
- package/es/Progress/ProgressLine.vue2.js +1 -2
- package/es/Progress/ProgressSteps.vue.js +1 -2
- package/es/Radio/RadioGroup.vue.d.ts +1 -1
- package/es/Radio/index.d.ts +3 -3
- package/es/Rate/index.vue2.js +1 -2
- package/es/ResizeBox/index.vue2.js +1 -2
- package/es/Scrollbar/ScrollbarTrack.vue2.js +1 -2
- package/es/Select/Select.vue.d.ts +13 -14
- package/es/Select/Select.vue.js +1 -1
- package/es/Select/Select.vue2.js +1 -3
- package/es/Select/index.d.ts +13 -16
- package/es/Select/type.d.ts +0 -1
- package/es/Skeleton/SkeletonLine.vue.d.ts +1 -1
- package/es/Skeleton/SkeletonLine.vue2.js +1 -2
- package/es/Skeleton/index.d.ts +1 -1
- package/es/Slider/Slider.vue.d.ts +3 -3
- package/es/Slider/hooks/useSliderDraggable.js +1 -2
- package/es/Slider/index.d.ts +9 -9
- package/es/Space/index.d.ts +3 -3
- package/es/Space/index.vue.d.ts +1 -1
- package/es/Space/index.vue2.js +1 -2
- package/es/Spin/index.vue2.js +1 -2
- package/es/Split/index.d.ts +3 -3
- package/es/Split/index.vue.d.ts +1 -1
- package/es/Split/index.vue2.js +1 -2
- package/es/Statistic/Countdown.vue.d.ts +1 -1
- package/es/Statistic/Countdown.vue.js +1 -2
- package/es/Statistic/Statistic.vue.d.ts +1 -1
- package/es/Statistic/index.d.ts +6 -6
- package/es/Tabs/Tabs.vue2.js +1 -2
- package/es/Tabs/TabsNavInk.vue2.js +1 -2
- package/es/Tabs/hooks/useTabsScroll.js +1 -2
- package/es/Textarea/hooks/useTextareaHeight.js +1 -2
- package/es/TimePicker/TimePicker.vue.d.ts +5 -5
- package/es/TimePicker/TimePickerPanel.vue2.js +1 -2
- package/es/TimePicker/index.d.ts +15 -15
- package/es/Tooltip/index.d.ts +3 -3
- package/es/Tooltip/index.vue.d.ts +1 -1
- package/es/Tooltip/index.vue.js +1 -1
- package/es/Transfer/TransferPanel.vue2.js +2 -2
- package/es/Trigger/hooks/useContext.js +1 -2
- package/es/Trigger/hooks/useTriggerPosition.js +1 -2
- package/es/Typography/TypographyBase.vue.d.ts +6 -6
- package/es/Typography/TypographyBase.vue.js +1 -1
- package/es/Typography/TypographyBase.vue2.js +4 -8
- package/es/VerificationCode/index.vue2.js +1 -2
- package/es/_shared/components/ExpandTransition.vue3.js +1 -2
- package/es/_shared/components/Icon.vue3.js +1 -2
- package/es/_shared/components/IconButton.vue3.js +1 -2
- package/es/_shared/constants/index.d.ts +8 -0
- package/es/_shared/constants/index.js +9 -0
- package/es/_shared/icons/IconCopy.vue.js +16 -1
- package/es/_shared/icons/IconCopy.vue2.js +1 -16
- package/es/_shared/icons/IconDelete.vue.js +1 -16
- package/es/_shared/icons/IconDelete.vue2.js +16 -1
- package/es/_shared/icons/IconEdit.vue.js +16 -1
- package/es/_shared/icons/IconEdit.vue2.js +1 -16
- package/es/_shared/icons/IconExclamation.vue.js +27 -1
- package/es/_shared/icons/IconExclamation.vue2.js +1 -27
- package/es/_shared/icons/IconFullScreen.vue.js +16 -1
- package/es/_shared/icons/IconFullScreen.vue2.js +1 -16
- package/es/_shared/icons/IconMinus.vue.js +16 -1
- package/es/_shared/icons/IconMinus.vue2.js +1 -16
- package/es/_shared/icons/IconOriginSize.vue.js +22 -1
- package/es/_shared/icons/IconOriginSize.vue2.js +1 -22
- package/es/_shared/icons/IconRotateLeft.vue.js +16 -1
- package/es/_shared/icons/IconRotateLeft.vue2.js +1 -16
- package/es/_shared/icons/IconRotateRight.vue.js +16 -1
- package/es/_shared/icons/IconRotateRight.vue2.js +1 -16
- package/es/_shared/icons/IconSearch.vue.js +1 -16
- package/es/_shared/icons/IconSearch.vue2.js +16 -1
- package/es/_shared/icons/IconSeparator.vue.js +1 -16
- package/es/_shared/icons/IconSeparator.vue2.js +16 -1
- package/es/_shared/icons/IconZoomIn.vue.js +16 -1
- package/es/_shared/icons/IconZoomIn.vue2.js +1 -16
- package/es/_shared/icons/IconZoomOut.vue.js +16 -1
- package/es/_shared/icons/IconZoomOut.vue2.js +1 -16
- package/es/_shared/utils/dom.d.ts +7 -18
- package/es/_shared/utils/dom.js +80 -13
- package/es/_shared/utils/index.d.ts +0 -1
- package/es/_shared/utils/time.d.ts +1 -37
- package/es/_shared/utils/time.js +2 -2
- package/es/_shared/utils/vue-utils.d.ts +4 -4
- package/es/_shared/utils/vue-utils.js +6 -6
- package/es/index.d.ts +13 -13
- package/es/style.css +1 -1
- package/lib/Affix/index.vue.js +1 -1
- package/lib/Anchor/Anchor.vue2.js +1 -1
- package/lib/AutoComplete/index.d.ts +16 -19
- package/lib/AutoComplete/index.vue.d.ts +27 -33
- package/lib/Avatar/Avatar.vue2.js +1 -1
- package/lib/Avatar/AvatarGroup.vue2.js +1 -1
- package/lib/Badge/index.vue2.js +1 -1
- package/lib/Breadcrumb/BreadcrumbSeparator.vue2.js +1 -1
- package/lib/Button/hooks/useContext.d.ts +1 -1
- package/lib/Carousel/CarouselIndicator.vue2.js +1 -1
- package/lib/Carousel/hooks/useContext.js +1 -1
- package/lib/Cascader/Cascader.vue.d.ts +7 -7
- package/lib/Cascader/Cascader.vue2.js +1 -1
- package/lib/Cascader/CascaderOption.vue2.js +1 -1
- package/lib/Cascader/index.d.ts +6 -6
- package/lib/Checkbox/CheckboxGroup.vue.d.ts +1 -1
- package/lib/Checkbox/index.d.ts +3 -3
- package/lib/ColorPicker/ColorControl.vue2.js +1 -1
- package/lib/ColorPicker/ColorPalette.vue2.js +1 -1
- package/lib/ColorPicker/ColorPicker.vue.d.ts +2 -2
- package/lib/ColorPicker/index.d.ts +6 -6
- package/lib/Descriptions/Descriptions.vue.d.ts +1 -1
- package/lib/Descriptions/index.d.ts +3 -3
- package/lib/Divider/index.d.ts +3 -3
- package/lib/Divider/index.vue.d.ts +1 -1
- package/lib/Divider/index.vue2.js +1 -1
- package/lib/Drawer/Drawer.vue2.js +1 -1
- package/lib/Dropdown/Dropdown.vue.js +1 -1
- package/lib/Dropdown/Dsubmenu.vue2.js +1 -1
- package/lib/Grid/Grid.vue2.js +1 -1
- package/lib/Grid/GridCol.vue.js +1 -1
- package/lib/Grid/GridItem.vue.js +1 -1
- package/lib/Grid/GridRow.vue2.js +1 -1
- package/lib/Icon/index.vue2.js +1 -1
- package/lib/Image/Image.vue2.js +1 -1
- package/lib/Image/ImagePreview.vue.d.ts +1 -1
- package/lib/Image/ImagePreviewToolbar.vue2.js +1 -1
- package/lib/Image/index.d.ts +3 -3
- package/lib/Input/Input.vue.d.ts +1 -1
- package/lib/Input/index.d.ts +3 -3
- package/lib/InputNumber/InputNumber.vue.d.ts +7 -7
- package/lib/InputNumber/InputNumber.vue2.js +1 -1
- package/lib/InputNumber/InputOperaBtn.vue2.js +1 -1
- package/lib/InputNumber/index.d.ts +6 -6
- package/lib/InputTag/index.d.ts +5 -5
- package/lib/InputTag/index.vue.d.ts +2 -2
- package/lib/InputTag/index.vue2.js +1 -1
- package/lib/Layout/LayoutSider.vue2.js +1 -1
- package/lib/List/List.vue.d.ts +1 -1
- package/lib/List/List.vue2.js +1 -1
- package/lib/List/hooks/useScrollReach.js +1 -1
- package/lib/List/index.d.ts +3 -3
- package/lib/Mention/index.d.ts +16 -19
- package/lib/Mention/index.vue.d.ts +32 -38
- package/lib/Menu/MenuItem.vue2.js +1 -1
- package/lib/Menu/MenuItemGroup.vue2.js +1 -1
- package/lib/Menu/hooks/useContext.js +1 -1
- package/lib/Message/Message.vue.d.ts +2 -2
- package/lib/Message/index.d.ts +6 -6
- package/lib/Modal/Modal.vue2.js +1 -1
- package/lib/Modal/hooks/useModalDraggable.js +1 -1
- package/lib/Notification/Notification.vue.d.ts +2 -2
- package/lib/Notification/index.d.ts +6 -6
- package/lib/OverflowList/index.vue2.js +1 -1
- package/lib/Pagination/Pagination.vue2.js +1 -1
- package/lib/Progress/ProgressCircle.vue2.js +1 -1
- package/lib/Progress/ProgressLine.vue2.js +1 -1
- package/lib/Progress/ProgressSteps.vue.js +1 -1
- package/lib/Radio/RadioGroup.vue.d.ts +1 -1
- package/lib/Radio/index.d.ts +3 -3
- package/lib/Rate/index.vue2.js +1 -1
- package/lib/ResizeBox/index.vue2.js +1 -1
- package/lib/Scrollbar/ScrollbarTrack.vue2.js +1 -1
- package/lib/Select/Select.vue.d.ts +13 -14
- package/lib/Select/Select.vue.js +1 -1
- package/lib/Select/Select.vue2.js +1 -1
- package/lib/Select/index.d.ts +13 -16
- package/lib/Select/type.d.ts +0 -1
- package/lib/Skeleton/SkeletonLine.vue.d.ts +1 -1
- package/lib/Skeleton/SkeletonLine.vue2.js +1 -1
- package/lib/Skeleton/index.d.ts +1 -1
- package/lib/Slider/Slider.vue.d.ts +3 -3
- package/lib/Slider/hooks/useSliderDraggable.js +1 -1
- package/lib/Slider/index.d.ts +9 -9
- package/lib/Space/index.d.ts +3 -3
- package/lib/Space/index.vue.d.ts +1 -1
- package/lib/Space/index.vue2.js +1 -1
- package/lib/Spin/index.vue2.js +1 -1
- package/lib/Split/index.d.ts +3 -3
- package/lib/Split/index.vue.d.ts +1 -1
- package/lib/Split/index.vue2.js +1 -1
- package/lib/Statistic/Countdown.vue.d.ts +1 -1
- package/lib/Statistic/Countdown.vue.js +1 -1
- package/lib/Statistic/Statistic.vue.d.ts +1 -1
- package/lib/Statistic/index.d.ts +6 -6
- package/lib/Tabs/Tabs.vue2.js +1 -1
- package/lib/Tabs/TabsNavInk.vue2.js +1 -1
- package/lib/Tabs/hooks/useTabsScroll.js +1 -1
- package/lib/Textarea/hooks/useTextareaHeight.js +1 -1
- package/lib/TimePicker/TimePicker.vue.d.ts +5 -5
- package/lib/TimePicker/TimePickerPanel.vue2.js +1 -1
- package/lib/TimePicker/index.d.ts +15 -15
- package/lib/Tooltip/index.d.ts +3 -3
- package/lib/Tooltip/index.vue.d.ts +1 -1
- package/lib/Tooltip/index.vue.js +1 -1
- package/lib/Transfer/TransferPanel.vue2.js +1 -1
- package/lib/Trigger/hooks/useContext.js +1 -1
- package/lib/Trigger/hooks/useTriggerPosition.js +1 -1
- package/lib/Typography/TypographyBase.vue.d.ts +6 -6
- package/lib/Typography/TypographyBase.vue.js +1 -1
- package/lib/Typography/TypographyBase.vue2.js +1 -1
- package/lib/VerificationCode/index.vue2.js +1 -1
- package/lib/_shared/components/ExpandTransition.vue3.js +1 -1
- package/lib/_shared/components/Icon.vue3.js +1 -1
- package/lib/_shared/components/IconButton.vue3.js +1 -1
- package/lib/_shared/constants/index.d.ts +8 -0
- package/lib/_shared/constants/index.js +1 -1
- package/lib/_shared/icons/IconCopy.vue.js +1 -1
- package/lib/_shared/icons/IconCopy.vue2.js +1 -1
- package/lib/_shared/icons/IconDelete.vue.js +1 -1
- package/lib/_shared/icons/IconDelete.vue2.js +1 -1
- package/lib/_shared/icons/IconEdit.vue.js +1 -1
- package/lib/_shared/icons/IconEdit.vue2.js +1 -1
- package/lib/_shared/icons/IconExclamation.vue.js +1 -1
- package/lib/_shared/icons/IconExclamation.vue2.js +1 -1
- package/lib/_shared/icons/IconFullScreen.vue.js +1 -1
- package/lib/_shared/icons/IconFullScreen.vue2.js +1 -1
- package/lib/_shared/icons/IconMinus.vue.js +1 -1
- package/lib/_shared/icons/IconMinus.vue2.js +1 -1
- package/lib/_shared/icons/IconOriginSize.vue.js +1 -1
- package/lib/_shared/icons/IconOriginSize.vue2.js +1 -1
- package/lib/_shared/icons/IconRotateLeft.vue.js +1 -1
- package/lib/_shared/icons/IconRotateLeft.vue2.js +1 -1
- package/lib/_shared/icons/IconRotateRight.vue.js +1 -1
- package/lib/_shared/icons/IconRotateRight.vue2.js +1 -1
- package/lib/_shared/icons/IconSearch.vue.js +1 -1
- package/lib/_shared/icons/IconSearch.vue2.js +1 -1
- package/lib/_shared/icons/IconSeparator.vue.js +1 -1
- package/lib/_shared/icons/IconSeparator.vue2.js +1 -1
- package/lib/_shared/icons/IconZoomIn.vue.js +1 -1
- package/lib/_shared/icons/IconZoomIn.vue2.js +1 -1
- package/lib/_shared/icons/IconZoomOut.vue.js +1 -1
- package/lib/_shared/icons/IconZoomOut.vue2.js +1 -1
- package/lib/_shared/utils/dom.d.ts +7 -18
- package/lib/_shared/utils/dom.js +1 -1
- package/lib/_shared/utils/index.d.ts +0 -1
- package/lib/_shared/utils/time.d.ts +1 -37
- package/lib/_shared/utils/time.js +1 -1
- package/lib/_shared/utils/vue-utils.d.ts +4 -4
- package/lib/_shared/utils/vue-utils.js +1 -1
- package/lib/index.d.ts +13 -13
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/es/_shared/utils/fn.d.ts +0 -8
- package/es/_shared/utils/fn.js +0 -79
- package/lib/_shared/utils/fn.d.ts +0 -8
- package/lib/_shared/utils/fn.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js")
|
1
|
+
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js");const l=require("../_shared/utils/dom.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const t=e.defineComponent({name:"SkeletonLine",__name:"SkeletonLine",props:{rows:{default:1},widths:{default:()=>[]},lineHeight:{default:20},lineSpacing:{default:15}},setup(t){const n=t,{lineSpacing:o}=e.toRefs(n),s=e.computed(()=>l.valueToPx(o.value));return(t,n)=>(e.openBlock(),e.createElementBlock("div",{class:"yc-skeleton-line",style:e.normalizeStyle({gap:s.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rows,n=>(e.openBlock(),e.createElementBlock("div",{class:"yc-skeleton-line-row",key:n,style:e.normalizeStyle({height:e.unref(l.valueToPx)(t.lineHeight),width:t.widths[n]?e.unref(l.valueToPx)(t.widths[n]):"100%"})},null,4))),128))],4))}});module.exports=t;
|
package/lib/Skeleton/index.d.ts
CHANGED
@@ -35,8 +35,8 @@ declare const Skeleton: {
|
|
35
35
|
shape: import('./type').SkeletonShapeShape;
|
36
36
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
37
37
|
line: import('vue').DefineComponent<import('./type').SkeletonLineProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('./type').SkeletonLineProps> & Readonly<{}>, {
|
38
|
-
rows: number;
|
39
38
|
lineHeight: number;
|
39
|
+
rows: number;
|
40
40
|
widths: number[];
|
41
41
|
lineSpacing: number;
|
42
42
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
@@ -8,14 +8,14 @@ declare const _default: import('vue').DefineComponent<SliderProps, {}, {}, {}, {
|
|
8
8
|
}>, {
|
9
9
|
disabled: boolean;
|
10
10
|
range: boolean;
|
11
|
-
showTooltip: boolean;
|
12
|
-
step: number;
|
13
|
-
direction: import('..').Direction;
|
14
11
|
modelValue: import('./type').SliderValue;
|
15
12
|
defaultValue: import('./type').SliderValue;
|
16
13
|
showInput: boolean;
|
17
14
|
max: number;
|
15
|
+
direction: import('..').Direction;
|
18
16
|
min: number;
|
17
|
+
step: number;
|
18
|
+
showTooltip: boolean;
|
19
19
|
marks: Record<number, string>;
|
20
20
|
showTicks: boolean;
|
21
21
|
formatTooltip: import('./type').FormatTooltip;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue"),a=require("../../node_modules/@vueuse/core/index.js");require("../../node_modules/tinycolor2/esm/tinycolor.js")
|
1
|
+
"use strict";const e=require("vue"),a=require("../../node_modules/@vueuse/core/index.js");require("../../node_modules/tinycolor2/esm/tinycolor.js");const l=require("../../_shared/utils/dom.js");require("../../_shared/utils/time.js"),require("../../Empty/index.js");/* empty css */module.exports=t=>{const{trackRef:u,triggerRef:v,computedValue:i,direction:o,max:r,min:n,step:s,disabled:c,normalizeValue:m,denormalizeValue:d}=t,{x:g,y:h,isDragging:f}=a.useDraggable(v,{disabled:c,onMove(){const{minTop:e,maxTop:a,minLeft:l,maxLeft:t}=b;let u;"vertical"==o.value?(h.value=h.value>e?e:h.value,h.value=h.value<a?a:h.value,u=q(h.value)):(g.value=g.value<l?l:g.value,g.value=g.value>t?t:g.value,u=q(g.value)),u=d(u),j(u),u!=i.value&&(i.value=u)}}),p=e.computed(()=>m(r.value)),x=e.computed(()=>m(s.value)),T=e.reactive({bottom:0,left:0,top:0,right:0}),b=e.reactive({minLeft:0,maxLeft:0,minTop:0,maxTop:0}),q=e=>{const{left:a,bottom:l,width:t,height:v}=u.value.getBoundingClientRect(),i="vertical"==o.value?(l-e)/v*p.value:(e-a)/t*p.value;return Math.floor(i/x.value)*x.value},w=e=>{e=m(e);const{left:a,bottom:l,width:t,height:v}=u.value.getBoundingClientRect();return e=Math.floor(e/x.value)*x.value,"vertical"==o.value?l-e/p.value*v:e/p.value*t+a},j=e=>{e=m(e);const{width:a,height:t}=u.value.getBoundingClientRect(),v=m(i.value)/p.value*t,r=m(i.value)/p.value*a;"vertical"==o.value?(T.top=100-e,T.bottom=e,T.transform=`translate(-50%,calc(${l.valueToPx(-v)} + 50%))`):(T.left=e,T.right=100-e,T.transform=`translate(calc(${l.valueToPx(r)} - 50%),-50%)`)};return e.watch([n,r],async()=>{await e.nextTick(),b.minTop=w(n.value),b.maxTop=w(r.value),b.minLeft=w(n.value),b.maxLeft=w(r.value),i.value>r.value?i.value=r.value:i.value<n.value&&(i.value=n.value),j(i.value)},{immediate:!0}),e.watch(()=>i.value,async a=>{f.value||(await e.nextTick(),j(a))}),{isDragging:f,position:T}};
|
package/lib/Slider/index.d.ts
CHANGED
@@ -12,14 +12,14 @@ declare const Slider: {
|
|
12
12
|
}, import('vue').PublicProps, {
|
13
13
|
disabled: boolean;
|
14
14
|
range: boolean;
|
15
|
-
showTooltip: boolean;
|
16
|
-
step: number;
|
17
|
-
direction: import('..').Direction;
|
18
15
|
modelValue: import('./type').SliderValue;
|
19
16
|
defaultValue: import('./type').SliderValue;
|
20
17
|
showInput: boolean;
|
21
18
|
max: number;
|
19
|
+
direction: import('..').Direction;
|
22
20
|
min: number;
|
21
|
+
step: number;
|
22
|
+
showTooltip: boolean;
|
23
23
|
marks: Record<number, string>;
|
24
24
|
showTicks: boolean;
|
25
25
|
formatTooltip: import('./type').FormatTooltip;
|
@@ -38,14 +38,14 @@ declare const Slider: {
|
|
38
38
|
}>, {}, {}, {}, {}, {
|
39
39
|
disabled: boolean;
|
40
40
|
range: boolean;
|
41
|
-
showTooltip: boolean;
|
42
|
-
step: number;
|
43
|
-
direction: import('..').Direction;
|
44
41
|
modelValue: import('./type').SliderValue;
|
45
42
|
defaultValue: import('./type').SliderValue;
|
46
43
|
showInput: boolean;
|
47
44
|
max: number;
|
45
|
+
direction: import('..').Direction;
|
48
46
|
min: number;
|
47
|
+
step: number;
|
48
|
+
showTooltip: boolean;
|
49
49
|
marks: Record<number, string>;
|
50
50
|
showTicks: boolean;
|
51
51
|
formatTooltip: import('./type').FormatTooltip;
|
@@ -62,14 +62,14 @@ declare const Slider: {
|
|
62
62
|
}, string, {
|
63
63
|
disabled: boolean;
|
64
64
|
range: boolean;
|
65
|
-
showTooltip: boolean;
|
66
|
-
step: number;
|
67
|
-
direction: import('..').Direction;
|
68
65
|
modelValue: import('./type').SliderValue;
|
69
66
|
defaultValue: import('./type').SliderValue;
|
70
67
|
showInput: boolean;
|
71
68
|
max: number;
|
69
|
+
direction: import('..').Direction;
|
72
70
|
min: number;
|
71
|
+
step: number;
|
72
|
+
showTooltip: boolean;
|
73
73
|
marks: Record<number, string>;
|
74
74
|
showTicks: boolean;
|
75
75
|
formatTooltip: import('./type').FormatTooltip;
|
package/lib/Space/index.d.ts
CHANGED
@@ -7,8 +7,8 @@ declare const Space: {
|
|
7
7
|
size: import('..').Size | number;
|
8
8
|
fill: boolean;
|
9
9
|
wrap: boolean;
|
10
|
-
align: import('./type').SpaceAlign;
|
11
10
|
direction: import('..').Direction;
|
11
|
+
align: import('./type').SpaceAlign;
|
12
12
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
13
13
|
P: {};
|
14
14
|
B: {};
|
@@ -20,8 +20,8 @@ declare const Space: {
|
|
20
20
|
size: import('..').Size | number;
|
21
21
|
fill: boolean;
|
22
22
|
wrap: boolean;
|
23
|
-
align: import('./type').SpaceAlign;
|
24
23
|
direction: import('..').Direction;
|
24
|
+
align: import('./type').SpaceAlign;
|
25
25
|
}>;
|
26
26
|
__isFragment?: never;
|
27
27
|
__isTeleport?: never;
|
@@ -30,8 +30,8 @@ declare const Space: {
|
|
30
30
|
size: import('..').Size | number;
|
31
31
|
fill: boolean;
|
32
32
|
wrap: boolean;
|
33
|
-
align: import('./type').SpaceAlign;
|
34
33
|
direction: import('..').Direction;
|
34
|
+
align: import('./type').SpaceAlign;
|
35
35
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
36
36
|
$slots: Readonly<import('./type').SpaceSlots> & import('./type').SpaceSlots;
|
37
37
|
}) & {
|
package/lib/Space/index.vue.d.ts
CHANGED
@@ -10,8 +10,8 @@ declare const __VLS_component: import('vue').DefineComponent<SpaceProps, {}, {},
|
|
10
10
|
size: import('..').Size | number;
|
11
11
|
fill: boolean;
|
12
12
|
wrap: boolean;
|
13
|
-
align: import('./type').SpaceAlign;
|
14
13
|
direction: import('..').Direction;
|
14
|
+
align: import('./type').SpaceAlign;
|
15
15
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
16
16
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
17
17
|
export default _default;
|
package/lib/Space/index.vue2.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js")
|
1
|
+
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js");const l=require("../_shared/utils/dom.js"),t=require("../_shared/utils/is.js");require("../_shared/utils/time.js");const o=require("../_shared/utils/vue-utils.js");require("../Empty/index.js");/* empty css */const s={class:"yc-space-item"},a={key:0,class:"yc-space-split"},r=e.defineComponent({name:"Space",__name:"index",props:{align:{default:void 0},direction:{default:"horizontal"},wrap:{type:Boolean,default:!1},fill:{type:Boolean,default:!1},size:{default:"small"}},setup(r){const n=e.useSlots(),i=r,{size:c,direction:u,align:d}=e.toRefs(i),m=e.computed(()=>l.valueToPx(t.isNumber(c.value)?c.value:{mini:4,small:8,medium:16,large:24}[c.value])),p=e.computed(()=>t.isUndefined(d.value)?"horizontal"==u.value?"center":"start":d.value),v=e.computed(()=>{var l;if(!n.split)return[];const t=[];return((null==(l=n.default)?void 0:l.call(n))||[]).forEach(l=>{l.type===e.Fragment?t.push(...l.children):l.type!==e.Comment&&t.push(l)}),t});return(l,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-space",`yc-space-align-${p.value}`,`yc-space-direction-${e.unref(u)}`,{"yc-space-wrap":l.wrap,"yc-space-fill":l.fill}]),style:e.normalizeStyle({gap:m.value})},[l.$slots.split?e.createCommentVNode("",!0):e.renderSlot(l.$slots,"default",{key:0},void 0,!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(t,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:r},[e.createElementVNode("div",s,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o.getSlotFunction)(t))))]),r<v.value.length-1?(e.openBlock(),e.createElementBlock("div",a,[e.renderSlot(l.$slots,"split",{},void 0,!0)])):e.createCommentVNode("",!0)],64))),128))],6))}});module.exports=r;
|
package/lib/Spin/index.vue2.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue"),o=require("../node_modules/@vueuse/core/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js")
|
1
|
+
"use strict";const e=require("vue"),o=require("../node_modules/@vueuse/core/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js");const t=require("../_shared/utils/dom.js");require("../_shared/utils/time.js");const n=require("../_shared/utils/global-config.js"),l={class:"yc-spin"},i={key:0,class:"yc-dot-loading"},r={key:1,class:"yc-spin-tip"},a={key:0,class:"yc-spin-mask"},c=e.defineComponent({name:"Spin",__name:"index",props:{size:{default:20},loading:{type:Boolean,default:!1},dot:{type:Boolean,default:!1},tip:{default:""},hideIcon:{type:Boolean,default:!1},isSizeInherit:{type:Boolean,default:!1}},setup(c){const{define:s,reuse:d}=o.createReusableTemplate(),{renderLoading:u}=n.getGlobalConfig();return(o,n)=>(e.openBlock(),e.createElementBlock("div",l,[e.createVNode(e.unref(s),null,{default:e.withCtx(()=>[o.hideIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["yc-spin-icon",{"yc-spin-icon-loading":!o.dot}]),style:e.normalizeStyle({fontSize:o.isSizeInherit?"inherit":e.unref(t.valueToPx)(o.size)})},[e.renderSlot(o.$slots,"icon",{},()=>[o.dot?(e.openBlock(),e.createElementBlock("div",i,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,o=>e.createElementVNode("div",{key:o,class:"yc-dot-loading-item"})),64))])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(u)()),{key:1}))],!0)],6)),o.tip?(e.openBlock(),e.createElementBlock("div",r,[e.renderSlot(o.$slots,"tip",{},()=>[e.createTextVNode(e.toDisplayString(o.tip),1)],!0)])):e.createCommentVNode("",!0)]),_:3}),o.$slots.default?(e.openBlock(),e.createBlock(e.Transition,{key:1,name:"fade"},{default:e.withCtx(()=>[o.loading?(e.openBlock(),e.createElementBlock("div",a,[e.createVNode(e.unref(d))])):e.createCommentVNode("",!0)]),_:1})):(e.openBlock(),e.createBlock(e.unref(d),{key:0})),e.renderSlot(o.$slots,"default",{},void 0,!0)]))}});module.exports=c;
|
package/lib/Split/index.d.ts
CHANGED
@@ -17,8 +17,8 @@ declare const Split: {
|
|
17
17
|
size: number | string;
|
18
18
|
disabled: boolean;
|
19
19
|
component: string;
|
20
|
-
direction: import('..').Direction;
|
21
20
|
max: number;
|
21
|
+
direction: import('..').Direction;
|
22
22
|
min: number;
|
23
23
|
defaultSize: number | string;
|
24
24
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
@@ -40,8 +40,8 @@ declare const Split: {
|
|
40
40
|
size: number | string;
|
41
41
|
disabled: boolean;
|
42
42
|
component: string;
|
43
|
-
direction: import('..').Direction;
|
44
43
|
max: number;
|
44
|
+
direction: import('..').Direction;
|
45
45
|
min: number;
|
46
46
|
defaultSize: number | string;
|
47
47
|
}>;
|
@@ -62,8 +62,8 @@ declare const Split: {
|
|
62
62
|
size: number | string;
|
63
63
|
disabled: boolean;
|
64
64
|
component: string;
|
65
|
-
direction: import('..').Direction;
|
66
65
|
max: number;
|
66
|
+
direction: import('..').Direction;
|
67
67
|
min: number;
|
68
68
|
defaultSize: number | string;
|
69
69
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
package/lib/Split/index.vue.d.ts
CHANGED
@@ -23,8 +23,8 @@ declare const __VLS_component: import('vue').DefineComponent<SplitProps, {}, {},
|
|
23
23
|
size: number | string;
|
24
24
|
disabled: boolean;
|
25
25
|
component: string;
|
26
|
-
direction: import('..').Direction;
|
27
26
|
max: number;
|
27
|
+
direction: import('..').Direction;
|
28
28
|
min: number;
|
29
29
|
defaultSize: number | string;
|
30
30
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
package/lib/Split/index.vue2.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js")
|
1
|
+
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js");const t=require("../_shared/utils/dom.js"),l=require("../_shared/utils/is.js");require("../_shared/utils/time.js"),require("../Empty/index.js");const a=require("../_shared/utils/control.js");;/* empty css */const i=require("../_shared/icons/IconDragDot.vue.js"),o=require("../node_modules/@vueuse/core/index.js"),r={class:"yc-split-trigger-icon-wrapper"},n={class:"yc-split-trigger-icon"},u={class:"yc-split-pane yc-split-pane-second"},s=e.defineComponent({name:"Split",__name:"index",props:{component:{default:"div"},direction:{default:"horizontal"},size:{default:void 0},defaultSize:{default:.5},min:{default:0},max:{default:1},disabled:{type:Boolean,default:!1}},emits:["update:size","moving-start","moving","moving-end"],setup(s,{emit:d}){const v=s,c=d,{size:m,defaultSize:p,direction:f,min:g,max:y}=e.toRefs(v),h=a(m,p.value,e=>{c("update:size",e)}),z=e.computed(()=>100*(l.isNumber(h.value)?h.value:E(h.value))+"%"),_=e.ref(),x=e.ref(),N=e.computed(()=>{var e,t;return("horizontal"==f.value?null==(e=x.value)?void 0:e.offsetWidth:null==(t=x.value)?void 0:t.offsetHeight)??6}),q=e.computed(()=>{var e;const t=null==(e=_.value)?void 0:e.getBoundingClientRect();return("horizontal"==f.value?null==t?void 0:t.width:null==t?void 0:t.height)??0}),{isDragging:j,x:S,y:b}=o.useDraggable(x,{onMove(){c("moving");const{left:e,top:t}=_.value.getBoundingClientRect(),a="horizontal"==f.value?e:t,i=a+C(g.value),o=a+C(y.value)-N.value;let r="";"horizontal"==f.value?(S.value=S.value<i?i:S.value,S.value=S.value>o?o:S.value,r=S.value-e+"px"):(b.value=b.value<i?i:b.value,b.value=b.value>o?o:b.value,r=b.value-t+"px"),h.value=l.isNumber(h.value)?E(r):r},onStart(){c("moving-start")},onEnd(){c("moving-end")}}),C=e=>l.isNumber(e)?e*q.value:Number.parseFloat(e),E=e=>Number.parseFloat(e)/q.value;return e.watch(()=>h.value,async e=>{if(j.value)return;await t.sleep(0);const{left:l,top:a}=_.value.getBoundingClientRect();S.value=l+C(e),b.value=a+C(e)},{immediate:!0}),(l,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.component),{class:e.normalizeClass(["yc-split",`yc-split-direction-${e.unref(f)}`]),ref_key:"splitRef",ref:_},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"yc-split-pane yc-split-pane-first",style:e.normalizeStyle({flex:`0 0 calc(${z.value} - ${e.unref(t.valueToPx)(N.value/2)}`})},[e.renderSlot(l.$slots,"first",{},void 0,!0)],4),e.createElementVNode("div",{class:"yc-split-trigger",ref_key:"triggerRef",ref:x},[e.renderSlot(l.$slots,"resize-trigger",{},()=>[e.createElementVNode("div",r,[e.createElementVNode("div",n,[e.renderSlot(l.$slots,"resize-trigger-icon",{},()=>[e.createVNode(e.unref(i),{rotate:"horizontal"==e.unref(f)?90:0,size:12},null,8,["rotate"])],!0)])])],!0)],512),e.createElementVNode("div",u,[e.renderSlot(l.$slots,"second",{},void 0,!0)])]),_:3},8,["class"]))}});module.exports=s;
|
@@ -14,8 +14,8 @@ declare const __VLS_component: import('vue').DefineComponent<CountdownProps, {},
|
|
14
14
|
value: number;
|
15
15
|
start: boolean;
|
16
16
|
title: string;
|
17
|
-
format: string;
|
18
17
|
easeing: string;
|
18
|
+
format: string;
|
19
19
|
valueStyle: import('vue').CSSProperties;
|
20
20
|
now: number;
|
21
21
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js")
|
1
|
+
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js");const a=require("../_shared/utils/dom.js"),t=require("../_shared/utils/is.js"),u=require("../_shared/utils/time.js");require("../Empty/index.js");/* empty css */const l=require("./Statistic.vue.js"),i=e.defineComponent({name:"Countdown",__name:"Countdown",props:{title:{default:""},value:{default:void 0},now:{default:void 0},format:{default:"HH:mm:ss"},start:{type:Boolean,default:!0},easeing:{default:"quadOut"},valueStyle:{default:()=>({})}},emits:["finish"],setup(i,{emit:n}){const o=i,r=n,{value:s,now:v,format:d,start:f}=e.toRefs(o),m=e.ref(0),c=e.ref(0),p=e.ref(m.value),w=e.ref(!1),y=()=>{if(p.value-1e3<=0)return w.value=!1,r("finish");p.value-=1e3};return e.watch(()=>f.value,async e=>{w.value||(m.value=t.isUndefined(s.value)?Date.now()+3e5:s.value,c.value=t.isUndefined(v.value)?Date.now():v.value,p.value=m.value-c.value),e&&(await a.sleep(0),w.value=!0)},{immediate:!0}),(a,t)=>(e.openBlock(),e.createBlock(l,{title:a.title,value:p.value-1e3,"value-from":p.value,start:e.unref(f),animation:w.value,format:e.unref(d),"value-style":a.valueStyle,easeing:a.easeing,"animation-duration":1e3,"is-countdown":"",onFinish:y},{value:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u.formatSeconds)(m.value-c.value,e.unref(d))),1)]),_:1},8,["title","value","value-from","start","animation","format","value-style","easeing"]))}});module.exports=i;
|
@@ -19,10 +19,10 @@ declare const __VLS_component: import('vue').DefineComponent<StatisticProps, {},
|
|
19
19
|
title: string;
|
20
20
|
placeholder: string;
|
21
21
|
animation: boolean;
|
22
|
-
format: string;
|
23
22
|
animationDuration: number;
|
24
23
|
easeing: string;
|
25
24
|
extra: string;
|
25
|
+
format: string;
|
26
26
|
precision: number;
|
27
27
|
valueStyle: import('vue').CSSProperties;
|
28
28
|
showGroupSeparator: boolean;
|
package/lib/Statistic/index.d.ts
CHANGED
@@ -16,10 +16,10 @@ declare const Statistic: {
|
|
16
16
|
title: string;
|
17
17
|
placeholder: string;
|
18
18
|
animation: boolean;
|
19
|
-
format: string;
|
20
19
|
animationDuration: number;
|
21
20
|
easeing: string;
|
22
21
|
extra: string;
|
22
|
+
format: string;
|
23
23
|
precision: number;
|
24
24
|
valueStyle: import('vue').CSSProperties;
|
25
25
|
showGroupSeparator: boolean;
|
@@ -43,10 +43,10 @@ declare const Statistic: {
|
|
43
43
|
title: string;
|
44
44
|
placeholder: string;
|
45
45
|
animation: boolean;
|
46
|
-
format: string;
|
47
46
|
animationDuration: number;
|
48
47
|
easeing: string;
|
49
48
|
extra: string;
|
49
|
+
format: string;
|
50
50
|
precision: number;
|
51
51
|
valueStyle: import('vue').CSSProperties;
|
52
52
|
showGroupSeparator: boolean;
|
@@ -67,10 +67,10 @@ declare const Statistic: {
|
|
67
67
|
title: string;
|
68
68
|
placeholder: string;
|
69
69
|
animation: boolean;
|
70
|
-
format: string;
|
71
70
|
animationDuration: number;
|
72
71
|
easeing: string;
|
73
72
|
extra: string;
|
73
|
+
format: string;
|
74
74
|
precision: number;
|
75
75
|
valueStyle: import('vue').CSSProperties;
|
76
76
|
showGroupSeparator: boolean;
|
@@ -88,8 +88,8 @@ declare const Statistic: {
|
|
88
88
|
value: number;
|
89
89
|
start: boolean;
|
90
90
|
title: string;
|
91
|
-
format: string;
|
92
91
|
easeing: string;
|
92
|
+
format: string;
|
93
93
|
valueStyle: import('vue').CSSProperties;
|
94
94
|
now: number;
|
95
95
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
@@ -105,8 +105,8 @@ declare const Statistic: {
|
|
105
105
|
value: number;
|
106
106
|
start: boolean;
|
107
107
|
title: string;
|
108
|
-
format: string;
|
109
108
|
easeing: string;
|
109
|
+
format: string;
|
110
110
|
valueStyle: import('vue').CSSProperties;
|
111
111
|
now: number;
|
112
112
|
}>;
|
@@ -121,8 +121,8 @@ declare const Statistic: {
|
|
121
121
|
value: number;
|
122
122
|
start: boolean;
|
123
123
|
title: string;
|
124
|
-
format: string;
|
125
124
|
easeing: string;
|
125
|
+
format: string;
|
126
126
|
valueStyle: import('vue').CSSProperties;
|
127
127
|
now: number;
|
128
128
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
package/lib/Tabs/Tabs.vue2.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js")
|
1
|
+
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js");const t=require("../_shared/utils/dom.js");require("../_shared/utils/time.js");const a=require("../_shared/utils/vue-utils.js");require("../Empty/index.js");/* empty css */const n=require("../_shared/icons/IconArrowRight.vue.js"),o=require("../_shared/icons/IconPlus.vue.js"),l=require("./hooks/useContext.js"),r=require("./hooks/useTabsScroll.js"),i=require("./TabPane.vue.js");;/* empty css */const s=require("./TabsTab.vue.js"),c=require("./TabsNavInk.vue.js"),u=require("./TabButton.vue.js"),d={class:"yc-tabs-nav"},f={key:3,class:"yc-tabs-nav-extra"},y=e.defineComponent({name:"Tabs",__name:"Tabs",props:{activeKey:{default:void 0},defaultActiveKey:{default:""},position:{default:void 0},size:{default:void 0},type:{default:"line"},direction:{default:"horizontal"},editable:{type:Boolean,default:!1},showAddButton:{type:Boolean,default:!1},destoryOnHide:{type:Boolean,default:!1},justify:{type:Boolean,default:!1},animation:{type:Boolean,default:!1},headerPadding:{type:Boolean,default:!0},autoSwitch:{type:Boolean,default:!1},hideContent:{type:Boolean,default:!1},trigger:{default:"click"}},emits:["update:activeKey","change","tab-click","add","delete"],setup(y,{emit:p}){const m=e.useSlots(),v=y,h=p,k=e.ref(),{computedActiveKey:b,size:B,direction:z,autoSwitch:x,position:C}=l().provide(v,h,k),j=e.computed(()=>{var e;return a.findComponentsFromVnodes((null==(e=m.default)?void 0:e.call(m))||[],i.name)}),q=e.computed(()=>j.value.map(e=>({title:"",path:"",disabled:!1,...e.props||{},slots:e.children}))),g=e.computed(()=>v.showAddButton&&["line","card","card-gutter"].includes(v.type)),N=e.computed(()=>{const e=q.value.findIndex(e=>e.path==b.value);return e<0?0:e}),{scrollDis:V,isScrollable:_,preDisabled:T,nextDisabled:$,navHeight:w,handleScroll:E}=r({listRef:k,panes:q,direction:z}),S=async()=>{h("add"),x.value&&(await e.nextTick(),b.value=q.value[q.value.length-1].path)};return(a,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["yc-tabs",`yc-tabs-${e.unref(z)}`,`yc-tabs-type-${a.type}`,`yc-tabs-size-${e.unref(B)}`,{"yc-tabs-animation":a.animation,"yc-tabs-justify":"horizontal"==e.unref(z)&&a.justify,"yc-tabs-no-padding":a.headerPadding&&["line","text"].includes(a.type)&&"horizontal"===v.direction,[`yc-tabs-${e.unref(C)}`]:e.unref(C)}])},[e.createElementVNode("div",d,[e.unref(_)?(e.openBlock(),e.createBlock(u,{key:0,disabled:e.unref(T),direction:"horizontal"==e.unref(z)?"left":"up",onClick:l[0]||(l[0]=t=>e.unref(E)("pre"))},{default:e.withCtx(()=>[e.createVNode(e.unref(n),{rotate:"horizontal"==e.unref(z)?180:-90,size:14},null,8,["rotate"])]),_:1},8,["disabled","direction"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["yc-tabs-nav-tab",{"yc-tabs-nav-tab-scroll":e.unref(_)}])},[e.createElementVNode("div",{class:"yc-tabs-nav-tab-list",style:e.normalizeStyle({transform:`translate${"horizontal"==e.unref(z)?"X":"Y"}(${e.unref(t.valueToPx)(e.unref(V))})`}),ref_key:"listRef",ref:k},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,(t,a)=>(e.openBlock(),e.createBlock(s,{key:a,index:a,node:t},null,8,["index","node"]))),128)),"line"==a.type?(e.openBlock(),e.createBlock(c,{key:0,"cur-index":N.value,panes:q.value},null,8,["cur-index","panes"])):e.createCommentVNode("",!0)],4)],2),e.unref(_)?(e.openBlock(),e.createBlock(u,{key:1,disabled:e.unref($),direction:"horizontal"==e.unref(z)?"right":"down",onClick:l[1]||(l[1]=t=>e.unref(E)("next"))},{default:e.withCtx(()=>[e.createVNode(e.unref(n),{rotate:"horizontal"==e.unref(z)?0:90,size:14},null,8,["rotate"])]),_:1},8,["disabled","direction"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createBlock(u,{key:2,type:"add",size:"12",onClick:S},{default:e.withCtx(()=>[e.createVNode(e.unref(o),{size:12})]),_:1})):e.createCommentVNode("",!0),a.$slots.extra?(e.openBlock(),e.createElementBlock("div",f,[e.renderSlot(a.$slots,"extra",{},void 0,!0)])):e.createCommentVNode("",!0)]),a.hideContent?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"yc-tabs-content",style:e.normalizeStyle({height:"vertical"==e.unref(z)?`${e.unref(t.valueToPx)(e.unref(w))}`:""})},[e.createElementVNode("div",{class:"yc-tabs-content-list",style:e.normalizeStyle({transform:`translate${"horizontal"==e.unref(z)?"X":"Y"}(${100*-N.value}%)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value,(t,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t),{key:a}))),128))],4)],4))],2))}});module.exports=y;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js")
|
1
|
+
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js");const l=require("../_shared/utils/dom.js"),t=require("../_shared/utils/is.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const o=require("./hooks/useContext.js"),s=e.defineComponent({__name:"TabsNavInk",props:{curIndex:{},panes:{}},setup(s){const n=s,{curIndex:i,panes:u}=e.toRefs(n),{titleRefs:r,listRef:a,direction:c,editable:d}=o().inject(),v=e.computed(()=>{var e,o,s;const n=u.value[i.value],v=d.value&&(t.isUndefined(n.closable)||n.closable)?22:0,f=r.value[i.value],{left:p,top:h}=(null==(o=null==(e=a.value)?void 0:e.getBoundingClientRect)?void 0:o.call(e))??{left:0,top:0},{scrollLeft:m,scrollTop:x}=a.value??{scrollLeft:0,scrollTop:0},{left:j,top:q}=(null==(s=null==f?void 0:f.getBoundingClientRect)?void 0:s.call(f))??{left:0,top:0},{offsetHeight:g,offsetWidth:T}=f??{offsetHeight:0,offsetWidth:0};return"horizontal"==c.value?{width:l.valueToPx(T+v),left:l.valueToPx(j-p+m)}:{height:l.valueToPx(g),top:l.valueToPx(q-h+x)}});return(l,t)=>(e.openBlock(),e.createElementBlock("div",{class:"yc-tabs-nav-ink",style:e.normalizeStyle(v.value)},null,4))}});module.exports=s;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue"),l=require("../../node_modules/@vueuse/core/index.js");require("../../node_modules/tinycolor2/esm/tinycolor.js")
|
1
|
+
"use strict";const e=require("vue"),l=require("../../node_modules/@vueuse/core/index.js");require("../../node_modules/tinycolor2/esm/tinycolor.js");const a=require("../../_shared/utils/dom.js");require("../../_shared/utils/time.js"),require("../../Empty/index.js");/* empty css */module.exports=u=>{const{direction:t,panes:r,listRef:s}=u,v=e.ref(!1),o=e.ref(0),n=e.ref(0),i=e.ref(0),c=e.ref(0),h=e.ref(0),d=e.ref(0),m=e.computed(()=>!o.value),f=e.computed(()=>"horizontal"==t.value?Math.abs(o.value)+c.value>=n.value:Math.abs(o.value)+h.value>=i.value);l.useResizeObserver(s,()=>q()),e.watch(()=>r.value.length,async()=>{await a.sleep(0),q()});const p=()=>{i.value=s.value.scrollHeight,n.value=s.value.scrollWidth,c.value=s.value.parentElement.offsetWidth,h.value=s.value.parentElement.offsetHeight,d.value=s.value.parentElement.parentElement.offsetHeight},q=()=>{p(),"horizontal"==t.value?v.value=n.value>c.value:v.value=i.value>h.value};return{navHeight:d,scrollDis:o,isScrollable:v,preDisabled:m,nextDisabled:f,handleScroll:e=>{p();const l="horizontal"===t.value?c.value:h.value,a="horizontal"===t.value?n.value:i.value,u=.8*l;let r=o.value;r="next"===e?Math.max(o.value-u,l-a):Math.min(o.value+u,0),o.value=r}}};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue"),r=require("../../node_modules/@vueuse/core/index.js");require("../../node_modules/tinycolor2/esm/tinycolor.js")
|
1
|
+
"use strict";const e=require("vue"),r=require("../../node_modules/@vueuse/core/index.js");require("../../node_modules/tinycolor2/esm/tinycolor.js");const o=require("../../_shared/utils/dom.js");require("../../_shared/utils/time.js"),require("../../Empty/index.js");/* empty css */module.exports=(s,u)=>{if(!u)return{};const{height:t}=r.useElementSize(s,void 0,{box:"border-box"}),i=e=>14*e*1.5715+8;return{style:e.computed(()=>{const{minRows:e=1,maxRows:r=1e4}=u,s=e<=1?1:e,n=i(e),d=i(r<=s?s:r);let l=t.value;return l=l<n?n:l,l=l>d?d:l,{minHeight:o.valueToPx(n),height:o.valueToPx(l)}})}};
|
@@ -79,16 +79,16 @@ declare const __VLS_component: import('vue').DefineComponent<TimePickerProps, {}
|
|
79
79
|
error: boolean;
|
80
80
|
type: import('./type').TimePickerType;
|
81
81
|
placeholder: string | string[];
|
82
|
+
modelValue: import('./type').TimePickerValue;
|
83
|
+
defaultValue: import('./type').TimePickerValue;
|
84
|
+
allowClear: boolean;
|
85
|
+
readonly: boolean;
|
82
86
|
triggerProps: import('../Trigger').TriggerProps;
|
83
87
|
format: string;
|
88
|
+
hideDisabledOptions: boolean;
|
84
89
|
disabledHours: import('./type').DisabledHours;
|
85
90
|
disabledMinutes: import('./type').DisabledMinutes;
|
86
91
|
disabledSeconds: import('./type').DisabledSeconds;
|
87
|
-
hideDisabledOptions: boolean;
|
88
|
-
modelValue: import('./type').TimePickerValue;
|
89
|
-
defaultValue: import('./type').TimePickerValue;
|
90
|
-
allowClear: boolean;
|
91
|
-
readonly: boolean;
|
92
92
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
93
93
|
panelRef: ({
|
94
94
|
$: import('vue').ComponentInternalInstance;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue"),l=require("../node_modules/b-tween/dist/b-tween.es.js"),t=require("../node_modules/dayjs/dayjs.min.js");require("../node_modules/tinycolor2/esm/tinycolor.js")
|
1
|
+
"use strict";const e=require("vue"),l=require("../node_modules/b-tween/dist/b-tween.es.js"),t=require("../node_modules/dayjs/dayjs.min.js");require("../node_modules/tinycolor2/esm/tinycolor.js");const r=require("../_shared/utils/dom.js"),o=require("../_shared/utils/is.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const u=require("./hooks/useContext.js"),i=require("../Button/index.js"),a=require("../Scrollbar/index.js"),n={class:"yc-timepicker-container"},s={class:"yc-timepicker"},c=["onClick"],d={class:"yc-timepicker-cell-inner"},m={key:0,class:"yc-timepicker-footer-extra-wrapper"},v={key:1,class:"yc-timepicker-footer-btn-wrapper"},p=e.defineComponent({__name:"TimePickerPanel",setup(p,{expose:f}){const{timeColumn:k,timeColumnCells:y,curValue:h,format:_,computedValue:C,computedVisible:b,disableConfirm:x,hideDisabledOptions:B,curIndex:j,inputRefs:q,disabledHours:g,disabledMinutes:w,disabledSeconds:E}=u().inject(),V=e.ref([]),N=e.computed(()=>!h.value.length||h.value.some(e=>!`${e}`)),S=(e,l)=>{var t,r,o;return"hour"==l?null==(t=null==g?void 0:g())?void 0:t.includes(e):"minute"==l?null==(r=null==w?void 0:w(...h.value))?void 0:r.includes(e):null==(o=null==E?void 0:E(...h.value))?void 0:o.includes(e)},T=(e,t,r)=>{h.value[t]=e,k.value.forEach((e,l)=>{h.value[l]=o.isUndefined(h.value[l])?0:h.value[l]});const u=V.value[t].getScrollRef();new l({from:{scroll:u.scrollTop},to:{scroll:r.offsetTop},duration:300,easing:"quadOut",onUpdate:e=>{u.scrollTo({top:e.scroll,behavior:"instant"})}}).start(),x.value&&z()},D=e=>{const l=V.value.map(e=>e.getScrollRef().querySelectorAll(".yc-timepicker-cell"));k.value.map((t,r)=>{const o=e[t];T(o,r,Array.from(l[r])[o])})},z=()=>{var e;let l=t();k.value.forEach((e,t)=>{l=l.set(e,h.value[t])});const r=l.format(_.value);if(o.isArray(C.value)){if(C.value[j.value]=r,x.value)return;if(j.value||C.value[j.value+1])return b.value=!1;j.value++,null==(e=q.value[j.value])||e.focus(),h.value=[]}else b.value=!1,C.value=r};return f({async scroll(e){if(!b.value||!e)return;await r.sleep(0);const l=t(e,_.value),o={hour:l.hour(),minute:l.minute(),second:l.second()};h.value=k.value.map(e=>o[e]),D(o)}}),(l,t)=>(e.openBlock(),e.createElementBlock("div",n,[e.createElementVNode("div",s,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y),(l,t)=>(e.openBlock(),e.createElementBlock("div",{key:t,class:"yc-timepicker-column"},[e.createVNode(e.unref(a),{"outer-style":{height:"100%"},style:{height:"100%",overflow:"auto"},ref_for:!0,ref:e=>V.value[t]=e},{default:e.withCtx(()=>[e.createElementVNode("ul",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.cells,r=>e.withDirectives((e.openBlock(),e.createElementBlock("li",{key:r.value,class:e.normalizeClass(["yc-timepicker-cell",{"yc-timepicker-cell-selected":r.value==e.unref(h)[t],"yc-timepicker-cell-disabled":S(r.value,l.unit)}]),onClick:e=>!S(r.value,l.unit)&&T(r.value,t,e.target)},[e.createElementVNode("div",d,e.toDisplayString(r.label),1)],10,c)),[[e.vShow,!e.unref(B)||!S(r.value,l.unit)]])),128))])]),_:2},1536)]))),128))]),l.$slots.extra?(e.openBlock(),e.createElementBlock("div",m,[e.renderSlot(l.$slots,"extra",{},void 0,!0)])):e.createCommentVNode("",!0),e.unref(x)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",v,[e.createVNode(e.unref(i.default),{size:"mini",onClick:t[0]||(t[0]=()=>{const e=new Date;D({hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds()})})},{default:e.withCtx(()=>t[1]||(t[1]=[e.createTextVNode("此刻",-1)])),_:1,__:[1]}),e.createVNode(e.unref(i.default),{type:"primary",size:"mini",disabled:N.value,onClick:z},{default:e.withCtx(()=>t[2]||(t[2]=[e.createTextVNode(" 确定 ",-1)])),_:1,__:[2]},8,["disabled"])]))]))}});module.exports=p;
|
@@ -28,16 +28,16 @@ declare const TimePicker: {
|
|
28
28
|
error: boolean;
|
29
29
|
type: import('./type').TimePickerType;
|
30
30
|
placeholder: string | string[];
|
31
|
+
modelValue: import('./type').TimePickerValue;
|
32
|
+
defaultValue: import('./type').TimePickerValue;
|
33
|
+
allowClear: boolean;
|
34
|
+
readonly: boolean;
|
31
35
|
triggerProps: import('..').TriggerProps;
|
32
36
|
format: string;
|
37
|
+
hideDisabledOptions: boolean;
|
33
38
|
disabledHours: import('./type').DisabledHours;
|
34
39
|
disabledMinutes: import('./type').DisabledMinutes;
|
35
40
|
disabledSeconds: import('./type').DisabledSeconds;
|
36
|
-
hideDisabledOptions: boolean;
|
37
|
-
modelValue: import('./type').TimePickerValue;
|
38
|
-
defaultValue: import('./type').TimePickerValue;
|
39
|
-
allowClear: boolean;
|
40
|
-
readonly: boolean;
|
41
41
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
42
42
|
panelRef: ({
|
43
43
|
$: import('vue').ComponentInternalInstance;
|
@@ -111,16 +111,16 @@ declare const TimePicker: {
|
|
111
111
|
error: boolean;
|
112
112
|
type: import('./type').TimePickerType;
|
113
113
|
placeholder: string | string[];
|
114
|
+
modelValue: import('./type').TimePickerValue;
|
115
|
+
defaultValue: import('./type').TimePickerValue;
|
116
|
+
allowClear: boolean;
|
117
|
+
readonly: boolean;
|
114
118
|
triggerProps: import('..').TriggerProps;
|
115
119
|
format: string;
|
120
|
+
hideDisabledOptions: boolean;
|
116
121
|
disabledHours: import('./type').DisabledHours;
|
117
122
|
disabledMinutes: import('./type').DisabledMinutes;
|
118
123
|
disabledSeconds: import('./type').DisabledSeconds;
|
119
|
-
hideDisabledOptions: boolean;
|
120
|
-
modelValue: import('./type').TimePickerValue;
|
121
|
-
defaultValue: import('./type').TimePickerValue;
|
122
|
-
allowClear: boolean;
|
123
|
-
readonly: boolean;
|
124
124
|
}>;
|
125
125
|
__isFragment?: never;
|
126
126
|
__isTeleport?: never;
|
@@ -150,16 +150,16 @@ declare const TimePicker: {
|
|
150
150
|
error: boolean;
|
151
151
|
type: import('./type').TimePickerType;
|
152
152
|
placeholder: string | string[];
|
153
|
+
modelValue: import('./type').TimePickerValue;
|
154
|
+
defaultValue: import('./type').TimePickerValue;
|
155
|
+
allowClear: boolean;
|
156
|
+
readonly: boolean;
|
153
157
|
triggerProps: import('..').TriggerProps;
|
154
158
|
format: string;
|
159
|
+
hideDisabledOptions: boolean;
|
155
160
|
disabledHours: import('./type').DisabledHours;
|
156
161
|
disabledMinutes: import('./type').DisabledMinutes;
|
157
162
|
disabledSeconds: import('./type').DisabledSeconds;
|
158
|
-
hideDisabledOptions: boolean;
|
159
|
-
modelValue: import('./type').TimePickerValue;
|
160
|
-
defaultValue: import('./type').TimePickerValue;
|
161
|
-
allowClear: boolean;
|
162
|
-
readonly: boolean;
|
163
163
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
164
164
|
$slots: Readonly<import('./type').TimePickerSlots> & import('./type').TimePickerSlots;
|
165
165
|
}) & {
|
package/lib/Tooltip/index.d.ts
CHANGED
@@ -23,8 +23,8 @@ declare const Tooltip: {
|
|
23
23
|
arrowStyle: import('vue').CSSProperties;
|
24
24
|
popupContainer: import('..').PopupContainer;
|
25
25
|
content: string;
|
26
|
-
backgroundColor: string;
|
27
26
|
triggerProps: import('..').TriggerProps;
|
27
|
+
backgroundColor: string;
|
28
28
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
29
29
|
P: {};
|
30
30
|
B: {};
|
@@ -49,8 +49,8 @@ declare const Tooltip: {
|
|
49
49
|
arrowStyle: import('vue').CSSProperties;
|
50
50
|
popupContainer: import('..').PopupContainer;
|
51
51
|
content: string;
|
52
|
-
backgroundColor: string;
|
53
52
|
triggerProps: import('..').TriggerProps;
|
53
|
+
backgroundColor: string;
|
54
54
|
}>;
|
55
55
|
__isFragment?: never;
|
56
56
|
__isTeleport?: never;
|
@@ -75,8 +75,8 @@ declare const Tooltip: {
|
|
75
75
|
arrowStyle: import('vue').CSSProperties;
|
76
76
|
popupContainer: import('..').PopupContainer;
|
77
77
|
content: string;
|
78
|
-
backgroundColor: string;
|
79
78
|
triggerProps: import('..').TriggerProps;
|
79
|
+
backgroundColor: string;
|
80
80
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
81
81
|
$slots: Readonly<import('./type').TooltipSlots> & import('./type').TooltipSlots;
|
82
82
|
}) & {
|
@@ -27,8 +27,8 @@ declare const __VLS_component: import('vue').DefineComponent<TooltipProps, {
|
|
27
27
|
arrowStyle: CSSProperties;
|
28
28
|
popupContainer: import('..').PopupContainer;
|
29
29
|
content: string;
|
30
|
-
backgroundColor: string;
|
31
30
|
triggerProps: import('../Trigger').TriggerProps;
|
31
|
+
backgroundColor: string;
|
32
32
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
33
33
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
34
34
|
export default _default;
|
package/lib/Tooltip/index.vue.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const o=require("../_shared/utils/control.js"),t=require("../Trigger/index.js"),l=e.defineComponent({name:"Tooltip",__name:"index",props:{popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},content:{default:""},position:{default:"
|
1
|
+
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const o=require("../_shared/utils/control.js"),t=require("../Trigger/index.js"),l=e.defineComponent({name:"Tooltip",__name:"index",props:{popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},content:{default:""},position:{default:"top"},mini:{type:Boolean,default:!1},backgroundColor:{default:"rgb(29,33,41)"},contentClass:{default:""},contentStyle:{default:()=>({})},arrowClass:{default:""},arrowStyle:{default:()=>({})},popupContainer:{default:void 0},triggerProps:{default:()=>({})}},emits:["update:popupVisible","popup-visible-change"],setup(l,{expose:s,emit:r}){const n=l,p=r,{arrowStyle:i,contentStyle:a,backgroundColor:u}=e.toRefs(n),{popupVisible:c,defaultPopupVisible:d}=e.toRefs(n),f=o(c,d.value,e=>{p("update:popupVisible",e),p("popup-visible-change",e)}),m=e.computed(()=>({backgroundColor:u.value,...a.value})),y=e.computed(()=>({backgroundColor:u.value,...i.value}));return s({show(){f.value=!0},hide(){f.value=!1}}),(o,l)=>(e.openBlock(),e.createBlock(e.unref(t),e.mergeProps({"popup-visible":e.unref(f),"onUpdate:popupVisible":l[0]||(l[0]=o=>e.isRef(f)?f.value=o:null),"popup-container":o.popupContainer,position:o.position,"arrow-class":["yc-tooltip-popup-arrow",o.arrowClass],"arrow-style":m.value,"content-class":["yc-tooltip-popup-content",o.contentClass,{"yc-tooltip-mini":o.mini}],"content-style":y.value,"popup-offset":10,class:["yc-tooltip",o.$attrs.class],style:o.$attrs.style,"animation-name":"zoom-in-fade-out","need-transform-origin":"","show-arrow":""},o.triggerProps),{content:e.withCtx(()=>[e.renderSlot(o.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(o.content),1)])]),default:e.withCtx(()=>[e.renderSlot(o.$slots,"default")]),_:3},16,["popup-visible","popup-container","position","arrow-class","arrow-style","content-class","content-style","class","style"]))}});module.exports=l;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js");const l=require("../_shared/utils/global-config.js");;/* empty css */const t=require("../_shared/icons/IconClose.vue.js"),a=require("../_shared/icons/IconDelete.
|
1
|
+
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js");const l=require("../_shared/utils/global-config.js");;/* empty css */const t=require("../_shared/icons/IconClose.vue.js"),a=require("../_shared/icons/IconDelete.vue2.js"),r=require("../_shared/icons/IconSearch.vue2.js"),n=require("./hooks/useContext.js"),o=require("../Checkbox/index.js"),u=require("../Scrollbar/index.js"),c=require("../Input/index.js"),s=require("../_shared/components/IconButton.vue.js");;/* empty css */const i={class:"yc-transfer-view"},v={class:"yc-transfer-view-header"},d={class:"yc-transfer-view-header-title"},m={class:"yc-transfer-view-header-count"},f={key:0,class:"yc-transfer-view-search"},p={class:"yc-transfer-view-body"},k={key:1,role:"list",class:"yc-transfer-list"},h=["onClick"],y={class:"yc-transfer-list-item-content text-ellipsis"},g=e.defineComponent({__name:"TransferPanel",props:{type:{}},setup(g){const B=g,{type:C}=e.toRefs(B),{renderEmpty:V}=l.getGlobalConfig(),{computedValue:x,computedSelected:N,targetChecked:b,sourceChecked:_,sourceOptions:w,targetOptions:E,disabled:S,oneWay:j,showSearch:q,showSelectAll:D,simple:I,sourceInputSearchProps:T,targetInputSearchProps:F,slots:P,title:z,emits:L}=n().inject(),O=e.ref(""),A=e.computed(()=>("source"==C.value?w.value:E.value).filter(e=>{var l;return null==(l=e.label)?void 0:l.toLowerCase().includes(O.value.toLowerCase())})),U=e.computed(()=>"source"==C.value?_.value:b.value),G=e.computed(()=>"source"==C.value?T.value:F.value),K=e.computed(()=>"source"==C.value?z.value[0]:z.value[1]),R=e.computed({get:()=>!!U.value.length&&U.value.length==A.value.length,set(e){if(e)N.value=[...new Set([...N.value,...A.value.map(e=>e.value)])];else{const e=Object.fromEntries(A.value.map(e=>[e.value,e]));N.value=N.value.filter(l=>!e[l])}}}),W=e.computed(()=>!!U.value.length&&U.value.length<=A.value.length),$=()=>{!S.value&&x.value.length&&(x.value=[])},H=()=>{var e;return null==(e=P["source"==C.value?"source-title":"target-title"])?void 0:e.call(P,{countTotal:"source"==C.value?w.value.length:E.value.length,countSelected:"source"==C.value?_.value.length:b.value.length,searchValue:O.value,checked:R.value,indeterminate:W.value,onSelectAllChange:e=>{R.value=e},onClear:$})},J=()=>{var e;return null==(e=P[C.value])?void 0:e.call(P,{selectedKeys:U.value,data:A.value,onSelect:e=>{N.value=e}})},M=e=>()=>{var l;return null==(l=P.item)?void 0:l.call(P,e)};return(l,n)=>(e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("div",v,[e.unref(P)[`${e.unref(C)}-title`]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",d,[!e.unref(D)||e.unref(I)||e.unref(j)&&"target"==e.unref(C)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(K.value),1)],64)):(e.openBlock(),e.createBlock(e.unref(o.default),{key:0,modelValue:R.value,"onUpdate:modelValue":n[0]||(n[0]=e=>R.value=e),indeterminate:W.value,disabled:!A.value.length||e.unref(S)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(K.value),1)]),_:1},8,["modelValue","indeterminate","disabled"]))]),e.createElementVNode("span",m,[e.unref(I)||e.unref(j)&&"target"==e.unref(C)?"target"!=e.unref(C)||e.unref(I)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(s),{key:1,size:14,onClick:$},{default:e.withCtx(()=>[e.createVNode(e.unref(a))]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(U.value.length)+" / "+e.toDisplayString(A.value.length),1)],64))])],64))]),e.unref(q)?(e.openBlock(),e.createElementBlock("div",f,[e.createVNode(e.unref(c),e.mergeProps({modelValue:O.value,"onUpdate:modelValue":n[1]||(n[1]=e=>O.value=e)},G.value,{onInput:n[2]||(n[2]=l=>e.unref(L)("search",l,e.unref(C)))}),{suffix:e.withCtx(()=>[e.createVNode(e.unref(r))]),_:1},16,["modelValue"])])):e.createCommentVNode("",!0),e.createElementVNode("div",p,[A.value.length?(e.openBlock(),e.createBlock(e.unref(u),{key:0},{default:e.withCtx(()=>[e.unref(P)[e.unref(C)]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(J),{key:0})):(e.openBlock(),e.createElementBlock("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,l=>(e.openBlock(),e.createElementBlock("div",{key:l.value,role:"listitem",class:e.normalizeClass(["yc-transfer-list-item",{"yc-transfer-list-item-disabled":l.disabled||e.unref(S)}]),onClick:e=>(e=>{const{value:l}=e;S.value||e.disabled||(j.value&&"source"!=C.value||I.value)&&(x.value="source"==C.value?[...x.value,l]:x.value.filter(e=>e!=l))})(l)},[e.unref(j)&&(!e.unref(j)||"source"!=e.unref(C))||e.unref(I)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",y,[e.unref(P).item?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(M(l)),{key:0})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(e.unref(P).item?"":l.label),1)]),"target"!=e.unref(C)||e.unref(I)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(s),{key:0,"hover-size":20},{default:e.withCtx(()=>[e.createVNode(e.unref(t))]),_:1}))],64)):(e.openBlock(),e.createBlock(e.unref(o.default),{key:0,"model-value":U.value.includes(l.value),disabled:l.disabled||e.unref(S),onChange:e=>((e,l)=>{N.value=e?[...N.value,l]:N.value.filter(e=>e!=l),L("select",N.value)})(e,l.value)},{default:e.withCtx(()=>[e.unref(P).item?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(M(l)),{key:0})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(e.unref(P).item?"":l.label),1)]),_:2},1032,["model-value","disabled","onChange"]))],10,h))),128))]))]),_:1})):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(V)("Transfer"))))])]))}});module.exports=g;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue"),t=require("../../node_modules/nanoid/index.browser.js"),r=require("../../node_modules/@vueuse/core/index.js");require("../../node_modules/tinycolor2/esm/tinycolor.js")
|
1
|
+
"use strict";const e=require("vue"),t=require("../../node_modules/nanoid/index.browser.js"),r=require("../../node_modules/@vueuse/core/index.js");require("../../node_modules/tinycolor2/esm/tinycolor.js");const u=require("../../_shared/utils/dom.js");require("../../_shared/utils/time.js"),require("../../Empty/index.js");/* empty css */const o="trigger-context";module.exports=i=>{const{trigger:n,popupRef:s,computedVisible:a,mouseEnterDelay:d}=i,{depth:l,curDepth:p,groupIds:c,timeout:m,hoverTimeout:v}=e.inject(o,{depth:-1,curDepth:e.ref(0),groupIds:e.ref([]),timeout:e.ref(),hoverTimeout:e.ref()}),h=l+1,g=t.nanoid(32);c.value[h]=g,e.provide(o,{depth:h,curDepth:p,groupIds:c,hoverTimeout:v,timeout:m});const f=e=>{const t=e.getAttribute("data-group-id"),r=e.getAttribute("data-group-depth"),u=!!t&&c.value.includes(g);return u||"BODY"==e.tagName?{isGroup:u,groupId:t,depth:u?Number.parseInt(r):-1}:f(e.parentElement)};return e.watch(()=>p.value,e=>{h<=e||"hover"!=n||(a.value=!1)}),e.watch(()=>a.value,async e=>{if(!e)return;await u.sleep(0);const t=r.unrefElement(s);null==t||t.setAttribute("data-group-id",g),null==t||t.setAttribute("data-group-depth",`${h}`)},{immediate:!0}),{timeout:m,mouseEnterHandler:()=>{v.value&&clearTimeout(v.value),v.value=setTimeout(()=>{p.value=h},d.value)},clickOutsideHandler:e=>{if(c.value.length<=1)return!1;const{isGroup:t,depth:r}=f(e.target??e);return a.value=t?h<=r:a.value,t},mosueLeaveHandler:e=>{if(c.value.length<=1)return!1;const{isGroup:t}=f(e.relatedTarget);return t?a.value=!1:p.value=-1,!0}}};
|