@nutui/nutui 4.3.0-beta.6 → 4.3.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.
Files changed (34) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +1 -1
  3. package/dist/nutui.es.js +1 -1
  4. package/dist/nutui.js +3771 -3783
  5. package/dist/nutui.umd.js +1 -1
  6. package/dist/packages/audio/Audio.js +1 -1
  7. package/dist/packages/avatarcropper/AvatarCropper.js +1 -1
  8. package/dist/packages/button/Button.js +17 -18
  9. package/dist/packages/calendarcard/CalendarCard.js +6 -24
  10. package/dist/packages/cascader/Cascader.js +1 -1
  11. package/dist/packages/imagepreview/ImagePreview.js +1 -1
  12. package/dist/packages/{index-rf29bejW.js → index-cp6Ms_Qe.js} +1 -1
  13. package/dist/packages/inputnumber/InputNumber.js +1 -0
  14. package/dist/packages/list/List.js +1 -1
  15. package/dist/packages/menu/Menu.js +1 -1
  16. package/dist/packages/noticebar/Noticebar.js +9 -10
  17. package/dist/packages/popover/Popover.js +89 -87
  18. package/dist/packages/popover/index.css +1 -1
  19. package/dist/packages/popover/index.scss +3 -12
  20. package/dist/packages/range/Range.js +1 -1
  21. package/dist/packages/sticky/Sticky.js +1 -1
  22. package/dist/packages/tabs/Tabs.js +1 -1
  23. package/dist/packages/tour/Tour.js +2 -2
  24. package/dist/packages/tour/index.css +1 -1
  25. package/dist/smartips/web-types.json +2 -2
  26. package/dist/style.css +1 -1
  27. package/dist/types/__VUE/calendarcard/calendar-card.vue.d.ts +59 -57
  28. package/dist/types/__VUE/calendarcard/index.d.ts +1 -0
  29. package/dist/types/__VUE/noticebar/index.vue.d.ts +4 -3
  30. package/dist/types/__VUE/noticebar/types.d.ts +1 -0
  31. package/dist/types/__VUE/popover/index.vue.d.ts +0 -1
  32. package/dist/types/__VUE/popover/type.d.ts +7 -0
  33. package/dist/types/index.d.ts +1 -1
  34. package/package.json +1 -1
@@ -1,32 +1,28 @@
1
1
  import type { WithInstall } from '../../utils';
2
- import { PropType } from 'vue';
3
- import { CalendarCardType, CalendarCardValue } from './types';
4
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
5
- type: {
6
- type: PropType<CalendarCardType>;
7
- default: string;
8
- };
9
- firstDayOfWeek: {
10
- type: NumberConstructor;
11
- default: number;
12
- };
13
- modelValue: {
14
- type: PropType<CalendarCardValue>;
15
- default: () => never[];
16
- };
17
- startDate: {
18
- type: DateConstructor;
19
- default: null;
20
- };
21
- endDate: {
22
- type: DateConstructor;
23
- default: null;
24
- };
25
- disableDay: {
26
- type: FunctionConstructor;
27
- default: () => boolean;
28
- };
29
- }, {
2
+ import type { CalendarCardDay, CalendarCardType, CalendarCardValue } from './types';
3
+ export type CalendarCardProps = Partial<{
4
+ type: CalendarCardType;
5
+ firstDayOfWeek: number;
6
+ modelValue: CalendarCardValue;
7
+ startDate: Date | null;
8
+ endDate: Date | null;
9
+ disableDay: (day: CalendarCardDay) => boolean;
10
+ }>;
11
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
12
+ type: CalendarCardType;
13
+ firstDayOfWeek: number;
14
+ modelValue: CalendarCardValue;
15
+ startDate: Date | null;
16
+ endDate: Date | null;
17
+ disableDay: (day: CalendarCardDay) => boolean;
18
+ }>>, {
19
+ type: string;
20
+ firstDayOfWeek: number;
21
+ modelValue: null;
22
+ startDate: null;
23
+ endDate: null;
24
+ disableDay: () => false;
25
+ }>, {
30
26
  jump: (step?: number) => void;
31
27
  jumpTo: (y: number, m: number) => void;
32
28
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -34,32 +30,21 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
34
30
  "update:modelValue": (...args: any[]) => void;
35
31
  dayClick: (...args: any[]) => void;
36
32
  pageChange: (...args: any[]) => void;
37
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
38
- type: {
39
- type: PropType<CalendarCardType>;
40
- default: string;
41
- };
42
- firstDayOfWeek: {
43
- type: NumberConstructor;
44
- default: number;
45
- };
46
- modelValue: {
47
- type: PropType<CalendarCardValue>;
48
- default: () => never[];
49
- };
50
- startDate: {
51
- type: DateConstructor;
52
- default: null;
53
- };
54
- endDate: {
55
- type: DateConstructor;
56
- default: null;
57
- };
58
- disableDay: {
59
- type: FunctionConstructor;
60
- default: () => boolean;
61
- };
62
- }>> & {
33
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Partial<{
34
+ type: CalendarCardType;
35
+ firstDayOfWeek: number;
36
+ modelValue: CalendarCardValue;
37
+ startDate: Date | null;
38
+ endDate: Date | null;
39
+ disableDay: (day: CalendarCardDay) => boolean;
40
+ }>>, {
41
+ type: string;
42
+ firstDayOfWeek: number;
43
+ modelValue: null;
44
+ startDate: null;
45
+ endDate: null;
46
+ disableDay: () => false;
47
+ }>>> & {
63
48
  onChange?: ((...args: any[]) => any) | undefined;
64
49
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
65
50
  onDayClick?: ((...args: any[]) => any) | undefined;
@@ -67,10 +52,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
67
52
  }, {
68
53
  type: CalendarCardType;
69
54
  modelValue: CalendarCardValue;
70
- startDate: Date;
71
- endDate: Date;
55
+ startDate: Date | null;
56
+ endDate: Date | null;
72
57
  firstDayOfWeek: number;
73
- disableDay: Function;
58
+ disableDay: (day: CalendarCardDay) => boolean;
74
59
  }, {}>, {
75
60
  top?(_: {
76
61
  day: {
@@ -105,6 +90,23 @@ declare module 'vue' {
105
90
  NutCalendarCard: typeof _default;
106
91
  }
107
92
  }
93
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
94
+ type __VLS_TypePropsToRuntimeProps<T> = {
95
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
96
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
97
+ } : {
98
+ type: import('vue').PropType<T[K]>;
99
+ required: true;
100
+ };
101
+ };
102
+ type __VLS_WithDefaults<P, D> = {
103
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
104
+ default: D[K];
105
+ }> : P[K];
106
+ };
107
+ type __VLS_Prettify<T> = {
108
+ [K in keyof T]: T[K];
109
+ } & {};
108
110
  type __VLS_WithTemplateSlots<T, S> = T & {
109
111
  new (): {
110
112
  $slots: S;
@@ -1,5 +1,6 @@
1
1
  import CalendarCard from './calendar-card.vue';
2
2
  import type { ComponentPublicInstance } from 'vue';
3
+ export type { CalendarCardProps } from './calendar-card.vue';
3
4
  export type { CalendarCardType, CalendarCardDay, CalendarCardMonth, CalendarCardValue } from './types';
4
5
  export type CalendarCardInstance = ComponentPublicInstance & InstanceType<typeof CalendarCard>;
5
6
  export { CalendarCard, CalendarCard as default };
@@ -1,11 +1,12 @@
1
1
  import { PropType } from 'vue';
2
+ import { NoticebarDirection } from './types';
2
3
 
3
4
  declare type Install<T> = T & {
4
5
  install(app: import('vue').App): void;
5
6
  };
6
7
  declare const _default: Install< import("vue").DefineComponent<{
7
8
  direction: {
8
- type: StringConstructor;
9
+ type: PropType<NoticebarDirection>;
9
10
  default: string;
10
11
  };
11
12
  list: {
@@ -104,7 +105,7 @@ declare const _default: Install< import("vue").DefineComponent<{
104
105
  showNotica: import("vue").Ref<boolean>;
105
106
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "close" | "acrossEnd")[], "click" | "close" | "acrossEnd", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
106
107
  direction: {
107
- type: StringConstructor;
108
+ type: PropType<NoticebarDirection>;
108
109
  default: string;
109
110
  };
110
111
  list: {
@@ -168,7 +169,7 @@ declare const _default: Install< import("vue").DefineComponent<{
168
169
  height: number;
169
170
  text: string;
170
171
  background: string;
171
- direction: string;
172
+ direction: NoticebarDirection;
172
173
  list: any[];
173
174
  standTime: number;
174
175
  complexAm: boolean;
@@ -0,0 +1 @@
1
+ export type NoticebarDirection = 'across' | 'vertical';
@@ -81,7 +81,6 @@ declare const _default: Install< import("vue").DefineComponent<{
81
81
  popoverRef: import("vue").Ref<any>;
82
82
  popoverContentRef: import("vue").Ref<any>;
83
83
  getRootPosition: import("vue").ComputedRef<CSSProperties>;
84
- customStyle: import("vue").ComputedRef<CSSProperties>;
85
84
  popoverArrowStyle: import("vue").ComputedRef<CSSProperties>;
86
85
  renderIcon: (icon: import("vue").Component, props?: any) => "" | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
87
86
  [key: string]: any;
@@ -1,4 +1,11 @@
1
1
  import { Component } from 'vue';
2
+ export interface PopoverRootPosition {
3
+ width: number;
4
+ height: number;
5
+ left: number;
6
+ top: number;
7
+ right: number;
8
+ }
2
9
  export type PopoverTheme = 'light' | 'dark';
3
10
  export type PopoverLocation = 'bottom' | 'top' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
4
11
  export type PopoverList = {
@@ -114,7 +114,7 @@ import Comment from './__VUE/comment/index.vue';
114
114
  import Invoice from './__VUE/invoice/index.vue';
115
115
  import AvatarCropper from './__VUE/avatarcropper/index.vue';
116
116
  declare function install(app: App): void;
117
- declare const version = "4.3.0-beta.6";
117
+ declare const version = "4.3.0";
118
118
  export { install, version, Locale, Button, Cell, CellGroup, Overlay, Popup, ConfigProvider, Image, Layout, Col, Row, Sticky, Divider, Grid, GridItem, Space, Navbar, FixedNav, Menu, MenuItem, Tabbar, TabbarItem, Elevator, Pagination, Tabs, TabPane, Indicator, SideNavbar, SideNavbarItem, SubSideNavbar, Range, Searchbar, Cascader, Calendar, CalendarCard, Checkbox, CheckboxGroup, DatePicker, InputNumber, Input, Radio, RadioGroup, Rate, CalendarItem, Picker, ShortPassword, Textarea, Uploader, NumberKeyboard, Form, FormItem, Swipe, SwipeGroup, ActionSheet, Backtop, Drag, Dialog, InfiniteLoading, PullRefresh, Notify, Switch, Toast, Audio, AudioOperate, Avatar, AvatarGroup, List, Progress, CircleProgress, Noticebar, Empty, Video, Steps, Step, Swiper, SwiperItem, Price, ImagePreview, Countup, Countdown, Badge, Tag, Popover, Skeleton, Collapse, CollapseItem, Table, Animate, Ellipsis, Watermark, TrendArrow, Tour, Address, Barrage, Signature, TimeSelect, TimePannel, TimeDetail, Sku, Card, Ecard, AddressList, Category, CategoryPane, Comment, Invoice, AvatarCropper, showDialog, showNotify, showToast, showImagePreview };
119
119
  declare const _default: {
120
120
  install: typeof install;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nutui/nutui",
3
- "version": "4.3.0-beta.6",
3
+ "version": "4.3.0",
4
4
  "description": "京东风格的轻量级移动端 Vue2、Vue3 组件库(支持小程序开发)",
5
5
  "main": "dist/nutui.umd.js",
6
6
  "module": "dist/nutui.es.js",