@sdata/web-vue 1.4.0 → 1.5.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/dist/sd.css +26 -0
- package/dist/sd.min.css +1 -1
- package/es/components.d.ts +2 -0
- package/es/ellipsis/ellipsis.js +72 -0
- package/es/ellipsis/ellipsis.vue.d.ts +1417 -0
- package/es/ellipsis/ellipsis.vue_vue_type_script_lang.js +170 -0
- package/es/ellipsis/index.d.ts +5826 -0
- package/es/ellipsis/index.js +16 -0
- package/es/ellipsis/interface.d.ts +15 -0
- package/es/ellipsis/performant-ellipsis.js +47 -0
- package/es/ellipsis/performant-ellipsis.vue.d.ts +1462 -0
- package/es/ellipsis/performant-ellipsis.vue_vue_type_script_lang.js +104 -0
- package/es/ellipsis/style/css.js +2 -0
- package/es/ellipsis/style/index.css +43 -0
- package/es/ellipsis/style/index.d.ts +2 -0
- package/es/ellipsis/style/index.js +2 -0
- package/es/ellipsis/style/index.less +33 -0
- package/es/ellipsis/style/token.less +5 -0
- package/es/form/form-item-label.vue_vue_type_script_lang.js +1 -1
- package/es/index.css +26 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -2
- package/es/index.less +1 -0
- package/es/sd-vue.js +5 -1
- package/json/vetur-attributes.json +937 -1387
- package/json/vetur-tags.json +409 -512
- package/json/web-types.json +2423 -3330
- package/package.json +1 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { getPrefixCls } from "../_utils/global-config.js";
|
|
2
|
+
import { _asyncToGenerator } from "../_virtual/_@oxc-project_runtime@0.124.0/helpers/asyncToGenerator.js";
|
|
3
|
+
import ellipsis_default from "./ellipsis.js";
|
|
4
|
+
import { computed, defineComponent, nextTick, ref } from "vue";
|
|
5
|
+
//#region components/ellipsis/performant-ellipsis.vue?vue&type=script&lang.ts
|
|
6
|
+
var performant_ellipsis_vue_vue_type_script_lang_default = defineComponent({
|
|
7
|
+
name: "PerformantEllipsis",
|
|
8
|
+
components: { Ellipsis: ellipsis_default },
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
props: {
|
|
11
|
+
lineClamp: {
|
|
12
|
+
type: [Number, String],
|
|
13
|
+
default: void 0
|
|
14
|
+
},
|
|
15
|
+
expandTrigger: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: void 0
|
|
18
|
+
},
|
|
19
|
+
tooltip: {
|
|
20
|
+
type: [Boolean, Object],
|
|
21
|
+
default: true
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
setup(props) {
|
|
25
|
+
const prefixCls = getPrefixCls("ellipsis");
|
|
26
|
+
const activated = ref(false);
|
|
27
|
+
const ellipsisRef = ref(null);
|
|
28
|
+
const isLineClamp = computed(() => props.lineClamp !== void 0);
|
|
29
|
+
const componentTag = computed(() => isLineClamp.value ? "div" : "span");
|
|
30
|
+
const rootCls = computed(() => [prefixCls, {
|
|
31
|
+
[`${prefixCls}--single-line`]: !isLineClamp.value,
|
|
32
|
+
[`${prefixCls}--line-clamp`]: isLineClamp.value,
|
|
33
|
+
[`${prefixCls}--expandable`]: props.expandTrigger === "click"
|
|
34
|
+
}]);
|
|
35
|
+
const rootStyle = computed(() => {
|
|
36
|
+
if (isLineClamp.value) return {
|
|
37
|
+
overflow: "hidden",
|
|
38
|
+
textOverflow: "ellipsis",
|
|
39
|
+
display: "-webkit-box",
|
|
40
|
+
whiteSpace: "normal",
|
|
41
|
+
WebkitLineClamp: String(props.lineClamp),
|
|
42
|
+
WebkitBoxOrient: "vertical"
|
|
43
|
+
};
|
|
44
|
+
return {
|
|
45
|
+
overflow: "hidden",
|
|
46
|
+
textOverflow: "ellipsis",
|
|
47
|
+
whiteSpace: "nowrap"
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
const getActivatedTriggerElement = () => {
|
|
51
|
+
var _ellipsisInstance$tri;
|
|
52
|
+
const ellipsisInstance = ellipsisRef.value;
|
|
53
|
+
return (_ellipsisInstance$tri = ellipsisInstance === null || ellipsisInstance === void 0 ? void 0 : ellipsisInstance.triggerRef) !== null && _ellipsisInstance$tri !== void 0 ? _ellipsisInstance$tri : ellipsisInstance === null || ellipsisInstance === void 0 ? void 0 : ellipsisInstance.$el;
|
|
54
|
+
};
|
|
55
|
+
const replayInteraction = (type) => {
|
|
56
|
+
const triggerElement = getActivatedTriggerElement();
|
|
57
|
+
if (!triggerElement || !type) return;
|
|
58
|
+
if (type === "hover") {
|
|
59
|
+
triggerElement.dispatchEvent(new MouseEvent("mouseenter", { bubbles: false }));
|
|
60
|
+
triggerElement.dispatchEvent(new MouseEvent("mousemove", { bubbles: true }));
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (type === "focus") {
|
|
64
|
+
triggerElement.dispatchEvent(new FocusEvent("focusin", { bubbles: true }));
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
triggerElement.dispatchEvent(new MouseEvent("click", { bubbles: true }));
|
|
68
|
+
};
|
|
69
|
+
const activate = function() {
|
|
70
|
+
var _ref = _asyncToGenerator(function* (interactionType) {
|
|
71
|
+
if (activated.value) return;
|
|
72
|
+
activated.value = true;
|
|
73
|
+
yield nextTick();
|
|
74
|
+
replayInteraction(interactionType);
|
|
75
|
+
});
|
|
76
|
+
return function activate(_x) {
|
|
77
|
+
return _ref.apply(this, arguments);
|
|
78
|
+
};
|
|
79
|
+
}();
|
|
80
|
+
const handleMouseenter = () => {
|
|
81
|
+
activate("hover");
|
|
82
|
+
};
|
|
83
|
+
const handleFocus = () => {
|
|
84
|
+
activate("focus");
|
|
85
|
+
};
|
|
86
|
+
const handleClick = () => {
|
|
87
|
+
activate(props.expandTrigger === "click" ? "click" : void 0);
|
|
88
|
+
};
|
|
89
|
+
return {
|
|
90
|
+
prefixCls,
|
|
91
|
+
activated,
|
|
92
|
+
ellipsisRef,
|
|
93
|
+
isLineClamp,
|
|
94
|
+
componentTag,
|
|
95
|
+
rootCls,
|
|
96
|
+
rootStyle,
|
|
97
|
+
handleMouseenter,
|
|
98
|
+
handleFocus,
|
|
99
|
+
handleClick
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
//#endregion
|
|
104
|
+
export { performant_ellipsis_vue_vue_type_script_lang_default as default };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/******** borderSize *******/
|
|
2
|
+
/******** borderStyle *******/
|
|
3
|
+
/******** radius *******/
|
|
4
|
+
/******** shadow distance *******/
|
|
5
|
+
/******** size *******/
|
|
6
|
+
/******** spacing *******/
|
|
7
|
+
/******** shadow *******/
|
|
8
|
+
/******** opacity *******/
|
|
9
|
+
/******** fontSize *******/
|
|
10
|
+
/******** fontWeight ********/
|
|
11
|
+
/******** Primary *******/
|
|
12
|
+
/******** success *******/
|
|
13
|
+
/******** warning *******/
|
|
14
|
+
/******** danger *******/
|
|
15
|
+
/******** link *******/
|
|
16
|
+
/******** radius *******/
|
|
17
|
+
/********* icon hover *********/
|
|
18
|
+
.sd-ellipsis {
|
|
19
|
+
display: inline-block;
|
|
20
|
+
max-width: 100%;
|
|
21
|
+
color: inherit;
|
|
22
|
+
vertical-align: bottom;
|
|
23
|
+
}
|
|
24
|
+
.sd-ellipsis--single-line {
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
text-overflow: ellipsis;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
}
|
|
29
|
+
.sd-ellipsis-content {
|
|
30
|
+
display: inline;
|
|
31
|
+
max-width: none;
|
|
32
|
+
}
|
|
33
|
+
.sd-ellipsis--line-clamp {
|
|
34
|
+
display: -webkit-box;
|
|
35
|
+
width: 100%;
|
|
36
|
+
word-break: break-word;
|
|
37
|
+
}
|
|
38
|
+
.sd-ellipsis--expandable {
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
}
|
|
41
|
+
.sd-ellipsis--expanded {
|
|
42
|
+
white-space: normal;
|
|
43
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@import url('./token.less');
|
|
2
|
+
|
|
3
|
+
.@{prefix}-ellipsis {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
max-width: @ellipsis-max-width;
|
|
6
|
+
color: @ellipsis-color-text;
|
|
7
|
+
vertical-align: bottom;
|
|
8
|
+
|
|
9
|
+
&--single-line {
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
text-overflow: ellipsis;
|
|
12
|
+
white-space: nowrap;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&-content {
|
|
16
|
+
display: inline;
|
|
17
|
+
max-width: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&--line-clamp {
|
|
21
|
+
display: -webkit-box;
|
|
22
|
+
width: 100%;
|
|
23
|
+
word-break: break-word;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&--expandable {
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&--expanded {
|
|
31
|
+
white-space: normal;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -2,8 +2,8 @@ import { formInjectionKey } from "./context.js";
|
|
|
2
2
|
import { getPrefixCls } from "../_utils/global-config.js";
|
|
3
3
|
import { isNumber } from "../_utils/is.js";
|
|
4
4
|
import resize_observer_v2_default from "../_components/resize-observer-v2.js";
|
|
5
|
-
import IconQuestionCircle from "../icon/icon-question-circle/index.js";
|
|
6
5
|
import Tooltip from "../tooltip/index.js";
|
|
6
|
+
import IconQuestionCircle from "../icon/icon-question-circle/index.js";
|
|
7
7
|
import { defineComponent, getCurrentInstance, inject, onBeforeUnmount, onMounted, ref } from "vue";
|
|
8
8
|
//#region components/form/form-item-label.vue?vue&type=script&lang.ts
|
|
9
9
|
var form_item_label_vue_vue_type_script_lang_default = defineComponent({
|
package/es/index.css
CHANGED
|
@@ -12592,6 +12592,32 @@ body[sd-theme='dark'] .sd-radio-button::after {
|
|
|
12592
12592
|
color: rgb(var(--gray-5));
|
|
12593
12593
|
font-size: 14px;
|
|
12594
12594
|
}
|
|
12595
|
+
.sd-ellipsis {
|
|
12596
|
+
display: inline-block;
|
|
12597
|
+
max-width: 100%;
|
|
12598
|
+
color: inherit;
|
|
12599
|
+
vertical-align: bottom;
|
|
12600
|
+
}
|
|
12601
|
+
.sd-ellipsis--single-line {
|
|
12602
|
+
overflow: hidden;
|
|
12603
|
+
text-overflow: ellipsis;
|
|
12604
|
+
white-space: nowrap;
|
|
12605
|
+
}
|
|
12606
|
+
.sd-ellipsis-content {
|
|
12607
|
+
display: inline;
|
|
12608
|
+
max-width: none;
|
|
12609
|
+
}
|
|
12610
|
+
.sd-ellipsis--line-clamp {
|
|
12611
|
+
display: -webkit-box;
|
|
12612
|
+
width: 100%;
|
|
12613
|
+
word-break: break-word;
|
|
12614
|
+
}
|
|
12615
|
+
.sd-ellipsis--expandable {
|
|
12616
|
+
cursor: pointer;
|
|
12617
|
+
}
|
|
12618
|
+
.sd-ellipsis--expanded {
|
|
12619
|
+
white-space: normal;
|
|
12620
|
+
}
|
|
12595
12621
|
.sd-dropdown {
|
|
12596
12622
|
box-sizing: border-box;
|
|
12597
12623
|
padding: 4px 0;
|
package/es/index.d.ts
CHANGED
|
@@ -45,6 +45,8 @@ export { default as Drawer } from './drawer';
|
|
|
45
45
|
export type { DrawerConfig, DrawerInstance, DrawerMethod, DrawerReturn } from './drawer';
|
|
46
46
|
export { default as Dropdown, Dgroup, Doption, DropdownButton, Dsubmenu } from './dropdown';
|
|
47
47
|
export type { DGroup, DOption, DropdownButtonInstance, DropdownGroupInstance, DropdownInstance, DropdownOption, DropdownOptionInstance, DropDownProps, DropdownSubmenuInstance, DSubmenu, } from './dropdown';
|
|
48
|
+
export { default as Ellipsis, PerformantEllipsis } from './ellipsis';
|
|
49
|
+
export type { EllipsisInstance, EllipsisTooltipProps, PerformantEllipsisInstance, } from './ellipsis';
|
|
48
50
|
export { default as Empty } from './empty';
|
|
49
51
|
export type { EmptyInstance } from './empty';
|
|
50
52
|
export { default as Form, FormItem } from './form';
|
package/es/index.js
CHANGED
|
@@ -61,11 +61,12 @@ import descriptions_item_default from "./descriptions/descriptions-item.js";
|
|
|
61
61
|
import Descriptions from "./descriptions/index.js";
|
|
62
62
|
import Divider from "./divider/index.js";
|
|
63
63
|
import Drawer from "./drawer/index.js";
|
|
64
|
+
import Tooltip from "./tooltip/index.js";
|
|
65
|
+
import Ellipsis, { PerformantEllipsis } from "./ellipsis/index.js";
|
|
64
66
|
import grid_col_default from "./grid/grid-col.js";
|
|
65
67
|
import grid_item_default from "./grid/grid-item.js";
|
|
66
68
|
import grid_row_default from "./grid/grid-row.js";
|
|
67
69
|
import Grid from "./grid/index.js";
|
|
68
|
-
import Tooltip from "./tooltip/index.js";
|
|
69
70
|
import form_item_default from "./form/form-item.js";
|
|
70
71
|
import Form from "./form/index.js";
|
|
71
72
|
import Icon from "./icon-component/index.js";
|
|
@@ -132,4 +133,4 @@ import Upload from "./upload/index.js";
|
|
|
132
133
|
import VerificationCode from "./verification-code/index.js";
|
|
133
134
|
import Watermark from "./watermark/index.js";
|
|
134
135
|
import SDVue from "./sd-vue.js";
|
|
135
|
-
export { Affix, Alert, Anchor, anchor_link_default as AnchorLink, AutoComplete, Avatar, AvatarGroup, BackTop, Badge, Breadcrumb, breadcrumb_item_default as BreadcrumbItem, Button, button_group_default as ButtonGroup, Calendar, Card, card_grid_default as CardGrid, card_meta_default as CardMeta, Carousel, carousel_item_default as CarouselItem, Cascader, cascader_panel_default as CascaderPanel, Checkbox, checkbox_group_default as CheckboxGroup, grid_col_default as Col, Collapse, collapse_item_default as CollapseItem, ColorPicker, Comment, ConfigProvider, countdown_default as Countdown, DatePicker, Descriptions, descriptions_item_default as DescriptionsItem, dropdown_group_default as Dgroup, Divider, dropdown_option_default as Doption, Drawer, Dropdown, dropdown_button_default as DropdownButton, dropdown_submenu_default as Dsubmenu, Empty, Form, form_item_default as FormItem, Grid, grid_item_default as GridItem, Icon, Image, preview_default as ImagePreview, preview_action_default as ImagePreviewAction, preview_group_default as ImagePreviewGroup, Input, input_group_default as InputGroup, InputNumber, input_password_default as InputPassword, input_search_default as InputSearch, InputTag, Layout, content_default as LayoutContent, footer_default as LayoutFooter, header_default as LayoutHeader, sider_default as LayoutSider, Link, List, list_item_default as ListItem, list_item_meta_default as ListItemMeta, Mention, Menu, item_default as MenuItem, item_group_default as MenuItemGroup, Message, Modal, month_picker_default as MonthPicker, Notification, optgroup_default as Optgroup, option_default as Option, OverflowList, PageHeader, Pagination, Popconfirm, Popover, Progress, quarter_picker_default as QuarterPicker, Radio, radio_group_default as RadioGroup, range_picker_default as RangePicker, Rate, ResizeBox, Result, grid_row_default as Row, Scrollbar, Select, Skeleton, line_default as SkeletonLine, shape_default as SkeletonShape, Slider, Space, Spin, Split, Statistic, step_default as Step, Steps, SubMenu, Switch, tab_pane_default as TabPane, Table, table_column_default as TableColumn, Tabs, Tag, table_tbody_default as Tbody, table_td_default as Td, Textarea, table_th_default as Th, table_thead_default as Thead, TimePicker, Timeline, item_default$1 as TimelineItem, Tooltip, table_tr_default as Tr, Transfer, Tree, TreeSelect, Trigger, Typography, paragraph_default as TypographyParagraph, text_default as TypographyText, title_default as TypographyTitle, Upload, VerificationCode, Watermark, week_picker_default as WeekPicker, year_picker_default as YearPicker, addI18nMessages, SDVue as default, getLocale, useFormItem, useLocale };
|
|
136
|
+
export { Affix, Alert, Anchor, anchor_link_default as AnchorLink, AutoComplete, Avatar, AvatarGroup, BackTop, Badge, Breadcrumb, breadcrumb_item_default as BreadcrumbItem, Button, button_group_default as ButtonGroup, Calendar, Card, card_grid_default as CardGrid, card_meta_default as CardMeta, Carousel, carousel_item_default as CarouselItem, Cascader, cascader_panel_default as CascaderPanel, Checkbox, checkbox_group_default as CheckboxGroup, grid_col_default as Col, Collapse, collapse_item_default as CollapseItem, ColorPicker, Comment, ConfigProvider, countdown_default as Countdown, DatePicker, Descriptions, descriptions_item_default as DescriptionsItem, dropdown_group_default as Dgroup, Divider, dropdown_option_default as Doption, Drawer, Dropdown, dropdown_button_default as DropdownButton, dropdown_submenu_default as Dsubmenu, Ellipsis, Empty, Form, form_item_default as FormItem, Grid, grid_item_default as GridItem, Icon, Image, preview_default as ImagePreview, preview_action_default as ImagePreviewAction, preview_group_default as ImagePreviewGroup, Input, input_group_default as InputGroup, InputNumber, input_password_default as InputPassword, input_search_default as InputSearch, InputTag, Layout, content_default as LayoutContent, footer_default as LayoutFooter, header_default as LayoutHeader, sider_default as LayoutSider, Link, List, list_item_default as ListItem, list_item_meta_default as ListItemMeta, Mention, Menu, item_default as MenuItem, item_group_default as MenuItemGroup, Message, Modal, month_picker_default as MonthPicker, Notification, optgroup_default as Optgroup, option_default as Option, OverflowList, PageHeader, Pagination, PerformantEllipsis, Popconfirm, Popover, Progress, quarter_picker_default as QuarterPicker, Radio, radio_group_default as RadioGroup, range_picker_default as RangePicker, Rate, ResizeBox, Result, grid_row_default as Row, Scrollbar, Select, Skeleton, line_default as SkeletonLine, shape_default as SkeletonShape, Slider, Space, Spin, Split, Statistic, step_default as Step, Steps, SubMenu, Switch, tab_pane_default as TabPane, Table, table_column_default as TableColumn, Tabs, Tag, table_tbody_default as Tbody, table_td_default as Td, Textarea, table_th_default as Th, table_thead_default as Thead, TimePicker, Timeline, item_default$1 as TimelineItem, Tooltip, table_tr_default as Tr, Transfer, Tree, TreeSelect, Trigger, Typography, paragraph_default as TypographyParagraph, text_default as TypographyText, title_default as TypographyTitle, Upload, VerificationCode, Watermark, week_picker_default as WeekPicker, year_picker_default as YearPicker, addI18nMessages, SDVue as default, getLocale, useFormItem, useLocale };
|
package/es/index.less
CHANGED
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
@import './grid/style/index.less';
|
|
49
49
|
@import './form/style/index.less';
|
|
50
50
|
@import './empty/style/index.less';
|
|
51
|
+
@import './ellipsis/style/index.less';
|
|
51
52
|
@import './dropdown/style/index.less';
|
|
52
53
|
@import './drawer/style/index.less';
|
|
53
54
|
@import './divider/style/index.less';
|
package/es/sd-vue.js
CHANGED
|
@@ -62,11 +62,12 @@ import descriptions_item_default from "./descriptions/descriptions-item.js";
|
|
|
62
62
|
import Descriptions from "./descriptions/index.js";
|
|
63
63
|
import Divider from "./divider/index.js";
|
|
64
64
|
import Drawer from "./drawer/index.js";
|
|
65
|
+
import Tooltip from "./tooltip/index.js";
|
|
66
|
+
import Ellipsis, { PerformantEllipsis } from "./ellipsis/index.js";
|
|
65
67
|
import grid_col_default from "./grid/grid-col.js";
|
|
66
68
|
import grid_item_default from "./grid/grid-item.js";
|
|
67
69
|
import grid_row_default from "./grid/grid-row.js";
|
|
68
70
|
import Grid from "./grid/index.js";
|
|
69
|
-
import Tooltip from "./tooltip/index.js";
|
|
70
71
|
import form_item_default from "./form/form-item.js";
|
|
71
72
|
import Form from "./form/index.js";
|
|
72
73
|
import Icon from "./icon-component/index.js";
|
|
@@ -193,6 +194,8 @@ var components = {
|
|
|
193
194
|
Skeleton,
|
|
194
195
|
Breadcrumb,
|
|
195
196
|
Dropdown,
|
|
197
|
+
Ellipsis,
|
|
198
|
+
PerformantEllipsis,
|
|
196
199
|
Menu,
|
|
197
200
|
PageHeader,
|
|
198
201
|
Pagination,
|
|
@@ -235,6 +238,7 @@ var SDVue = _objectSpread2(_objectSpread2({}, components), {}, {
|
|
|
235
238
|
Dgroup: dropdown_group_default,
|
|
236
239
|
Dsubmenu: dropdown_submenu_default,
|
|
237
240
|
DropdownButton: dropdown_button_default,
|
|
241
|
+
PerformantEllipsis,
|
|
238
242
|
FormItem: form_item_default,
|
|
239
243
|
Row: grid_row_default,
|
|
240
244
|
Col: grid_col_default,
|