@nutui/nutui 4.3.0-beta.1 → 4.3.0-beta.2

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 (155) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.js +4095 -4104
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/addresslist/AddressList.js +4 -3
  6. package/dist/packages/audiooperate/AudioOperate.js +3 -2
  7. package/dist/packages/avatar/index.css +1 -1
  8. package/dist/packages/avatar/index.scss +1 -1
  9. package/dist/packages/avatarcropper/AvatarCropper.js +10 -5
  10. package/dist/packages/avatarcropper/index.css +1 -1
  11. package/dist/packages/avatarcropper/index.scss +3 -0
  12. package/dist/packages/button/Button.js +58 -39
  13. package/dist/packages/calendarcard/CalendarCard.js +113 -109
  14. package/dist/packages/dialog/Dialog.js +4 -3
  15. package/dist/packages/divider/Divider.js +40 -18
  16. package/dist/packages/invoice/Invoice.js +3 -2
  17. package/dist/packages/signature/Signature.js +3 -2
  18. package/dist/packages/skeleton/index.css +1 -1
  19. package/dist/packages/with-install-p59gYYU_.js +12 -0
  20. package/dist/smartips/web-types.json +10 -1
  21. package/dist/style.css +1 -1
  22. package/dist/types/__VUE/actionsheet/index.vue.d.ts +7 -7
  23. package/dist/types/__VUE/address/index.vue.d.ts +11 -11
  24. package/dist/types/__VUE/addresslist/index.vue.d.ts +5 -5
  25. package/dist/types/__VUE/animate/index.vue.d.ts +4 -4
  26. package/dist/types/__VUE/audio/index.vue.d.ts +6 -6
  27. package/dist/types/__VUE/audiooperate/index.vue.d.ts +4 -4
  28. package/dist/types/__VUE/avatar/index.vue.d.ts +5 -5
  29. package/dist/types/__VUE/avatarcropper/index.vue.d.ts +16 -7
  30. package/dist/types/__VUE/avatarcropper/types.d.ts +1 -0
  31. package/dist/types/__VUE/avatargroup/index.vue.d.ts +5 -5
  32. package/dist/types/__VUE/backtop/index.vue.d.ts +6 -6
  33. package/dist/types/__VUE/badge/index.vue.d.ts +6 -6
  34. package/dist/types/__VUE/barrage/index.vue.d.ts +5 -5
  35. package/dist/types/__VUE/button/{index.vue.d.ts → button.vue.d.ts} +36 -27
  36. package/dist/types/__VUE/button/index.d.ts +5 -0
  37. package/dist/types/__VUE/calendar/index.vue.d.ts +7 -7
  38. package/dist/types/__VUE/calendarcard/{index.vue.d.ts → calendar-card.vue.d.ts} +47 -30
  39. package/dist/types/__VUE/calendarcard/index.d.ts +5 -0
  40. package/dist/types/__VUE/calendaritem/index.vue.d.ts +10 -10
  41. package/dist/types/__VUE/card/index.vue.d.ts +4 -4
  42. package/dist/types/__VUE/cascader/cascader-item.vue.d.ts +4 -4
  43. package/dist/types/__VUE/cascader/index.vue.d.ts +7 -7
  44. package/dist/types/__VUE/category/index.vue.d.ts +4 -4
  45. package/dist/types/__VUE/categorypane/index.vue.d.ts +4 -4
  46. package/dist/types/__VUE/cell/index.vue.d.ts +7 -7
  47. package/dist/types/__VUE/cellgroup/index.vue.d.ts +4 -4
  48. package/dist/types/__VUE/checkbox/index.vue.d.ts +6 -6
  49. package/dist/types/__VUE/checkboxgroup/index.vue.d.ts +4 -4
  50. package/dist/types/__VUE/circleprogress/index.vue.d.ts +5 -5
  51. package/dist/types/__VUE/col/index.vue.d.ts +4 -4
  52. package/dist/types/__VUE/collapse/index.vue.d.ts +4 -4
  53. package/dist/types/__VUE/collapseitem/index.vue.d.ts +7 -7
  54. package/dist/types/__VUE/comment/components/CmtBottom.vue.d.ts +1 -1
  55. package/dist/types/__VUE/comment/components/CmtHeader.vue.d.ts +1 -1
  56. package/dist/types/__VUE/comment/components/CmtImages.vue.d.ts +1 -1
  57. package/dist/types/__VUE/comment/index.vue.d.ts +9 -9
  58. package/dist/types/__VUE/configprovider/index.vue.d.ts +5 -5
  59. package/dist/types/__VUE/countdown/index.vue.d.ts +4 -4
  60. package/dist/types/__VUE/countup/index.vue.d.ts +8 -8
  61. package/dist/types/__VUE/datepicker/index.vue.d.ts +9 -9
  62. package/dist/types/__VUE/dialog/index.vue.d.ts +7 -7
  63. package/dist/types/__VUE/divider/divider.vue.d.ts +56 -0
  64. package/dist/types/__VUE/divider/index.d.ts +5 -0
  65. package/dist/types/__VUE/drag/index.vue.d.ts +4 -4
  66. package/dist/types/__VUE/ecard/index.vue.d.ts +7 -7
  67. package/dist/types/__VUE/elevator/index.vue.d.ts +4 -4
  68. package/dist/types/__VUE/ellipsis/index.vue.d.ts +7 -7
  69. package/dist/types/__VUE/empty/index.vue.d.ts +4 -4
  70. package/dist/types/__VUE/fixednav/index.vue.d.ts +6 -6
  71. package/dist/types/__VUE/form/index.vue.d.ts +4 -4
  72. package/dist/types/__VUE/formitem/index.vue.d.ts +4 -4
  73. package/dist/types/__VUE/grid/index.vue.d.ts +6 -6
  74. package/dist/types/__VUE/griditem/index.vue.d.ts +4 -4
  75. package/dist/types/__VUE/image/index.vue.d.ts +8 -8
  76. package/dist/types/__VUE/imagepreview/imagePreviewItem.vue.d.ts +5 -5
  77. package/dist/types/__VUE/imagepreview/index.vue.d.ts +9 -9
  78. package/dist/types/__VUE/indicator/index.vue.d.ts +5 -5
  79. package/dist/types/__VUE/infiniteloading/index.vue.d.ts +4 -4
  80. package/dist/types/__VUE/input/index.vue.d.ts +15 -15
  81. package/dist/types/__VUE/inputnumber/index.vue.d.ts +7 -7
  82. package/dist/types/__VUE/invoice/index.vue.d.ts +6 -6
  83. package/dist/types/__VUE/layout/index.vue.d.ts +4 -4
  84. package/dist/types/__VUE/list/index.vue.d.ts +6 -6
  85. package/dist/types/__VUE/menu/index.vue.d.ts +7 -7
  86. package/dist/types/__VUE/menuitem/index.vue.d.ts +4 -4
  87. package/dist/types/__VUE/navbar/index.vue.d.ts +6 -6
  88. package/dist/types/__VUE/noticebar/index.vue.d.ts +7 -7
  89. package/dist/types/__VUE/notify/index.vue.d.ts +7 -7
  90. package/dist/types/__VUE/numberkeyboard/index.vue.d.ts +8 -8
  91. package/dist/types/__VUE/overlay/index.vue.d.ts +4 -4
  92. package/dist/types/__VUE/pagination/index.vue.d.ts +5 -5
  93. package/dist/types/__VUE/picker/Column.vue.d.ts +7 -7
  94. package/dist/types/__VUE/picker/baseProps.d.ts +4 -4
  95. package/dist/types/__VUE/picker/index.vue.d.ts +6 -6
  96. package/dist/types/__VUE/popover/index.vue.d.ts +9 -9
  97. package/dist/types/__VUE/popup/index.vue.d.ts +6 -6
  98. package/dist/types/__VUE/price/index.vue.d.ts +4 -4
  99. package/dist/types/__VUE/progress/index.vue.d.ts +6 -6
  100. package/dist/types/__VUE/pullrefresh/index.vue.d.ts +4 -4
  101. package/dist/types/__VUE/radio/index.vue.d.ts +8 -8
  102. package/dist/types/__VUE/radiogroup/index.vue.d.ts +7 -7
  103. package/dist/types/__VUE/range/index.vue.d.ts +8 -8
  104. package/dist/types/__VUE/rate/index.vue.d.ts +9 -9
  105. package/dist/types/__VUE/row/index.vue.d.ts +5 -5
  106. package/dist/types/__VUE/searchbar/index.vue.d.ts +15 -15
  107. package/dist/types/__VUE/shortpassword/index.vue.d.ts +5 -5
  108. package/dist/types/__VUE/sidenavbar/index.vue.d.ts +4 -4
  109. package/dist/types/__VUE/sidenavbaritem/index.vue.d.ts +4 -4
  110. package/dist/types/__VUE/signature/index.vue.d.ts +6 -6
  111. package/dist/types/__VUE/skeleton/index.vue.d.ts +7 -7
  112. package/dist/types/__VUE/sku/components/SkuStepper.vue.d.ts +2 -2
  113. package/dist/types/__VUE/sku/index.vue.d.ts +6 -6
  114. package/dist/types/__VUE/space/index.vue.d.ts +4 -4
  115. package/dist/types/__VUE/step/index.vue.d.ts +4 -4
  116. package/dist/types/__VUE/steps/index.vue.d.ts +5 -5
  117. package/dist/types/__VUE/sticky/index.vue.d.ts +5 -5
  118. package/dist/types/__VUE/subsidenavbar/index.vue.d.ts +4 -4
  119. package/dist/types/__VUE/swipe/index.vue.d.ts +4 -4
  120. package/dist/types/__VUE/swipegroup/index.vue.d.ts +4 -4
  121. package/dist/types/__VUE/swiper/index.vue.d.ts +5 -5
  122. package/dist/types/__VUE/swiperitem/index.vue.d.ts +4 -4
  123. package/dist/types/__VUE/switch/index.vue.d.ts +13 -13
  124. package/dist/types/__VUE/tabbar/index.vue.d.ts +6 -6
  125. package/dist/types/__VUE/tabbaritem/index.vue.d.ts +6 -6
  126. package/dist/types/__VUE/table/index.vue.d.ts +4 -4
  127. package/dist/types/__VUE/table/renderColumn.d.ts +4 -4
  128. package/dist/types/__VUE/tabpane/index.vue.d.ts +5 -5
  129. package/dist/types/__VUE/tabs/index.vue.d.ts +10 -10
  130. package/dist/types/__VUE/tag/index.vue.d.ts +8 -8
  131. package/dist/types/__VUE/textarea/index.vue.d.ts +11 -11
  132. package/dist/types/__VUE/timedetail/index.vue.d.ts +4 -4
  133. package/dist/types/__VUE/timepannel/index.vue.d.ts +4 -4
  134. package/dist/types/__VUE/timeselect/index.vue.d.ts +5 -5
  135. package/dist/types/__VUE/toast/index.vue.d.ts +10 -10
  136. package/dist/types/__VUE/tour/index.vue.d.ts +9 -9
  137. package/dist/types/__VUE/trendarrow/index.vue.d.ts +5 -5
  138. package/dist/types/__VUE/uploader/index.vue.d.ts +10 -10
  139. package/dist/types/__VUE/video/index.vue.d.ts +5 -5
  140. package/dist/types/__VUE/watermark/index.vue.d.ts +7 -7
  141. package/dist/types/index.d.ts +7 -4
  142. package/dist/types/utils/canvas.d.ts +1 -1
  143. package/dist/types/utils/create/renderIcon.d.ts +2 -2
  144. package/dist/types/utils/index.d.ts +1 -0
  145. package/dist/types/utils/with-install.d.ts +5 -0
  146. package/package.json +1 -1
  147. package/dist/types/__VUE/address/address-list.d.ts +0 -30
  148. package/dist/types/__VUE/calendarcard/icon.taro.d.ts +0 -12
  149. package/dist/types/__VUE/divider/index.vue.d.ts +0 -71
  150. package/dist/types/__VUE/icon/index.vue.d.ts +0 -13
  151. package/dist/types/__VUE/invoice/types.d.ts +0 -6
  152. package/dist/types/__VUE/picker/doc.en.d.ts +0 -90
  153. package/dist/types/__VUE/sku/data.d.ts +0 -22
  154. package/dist/types/__VUE/tour/type.d.ts +0 -2
  155. /package/dist/types/__VUE/button/{type.d.ts → types.d.ts} +0 -0
@@ -4,9 +4,10 @@ import { l as floatData } from "../util-4Jkyw4BJ.js";
4
4
  import { u as useLocale } from "../index-s3RgMhc7.js";
5
5
  import { Del, Edit } from "@nutui/icons-vue";
6
6
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
7
- import NutButton from "../button/Button.js";
7
+ import { Button as _sfc_main$3 } from "../button/Button.js";
8
8
  import NutSwipe from "../swipe/Swipe.js";
9
9
  import "@nutui/nutui/dist/packages/locale/lang";
10
+ import "../with-install-p59gYYU_.js";
10
11
  import "../index-084nl_oE.js";
11
12
  import "../types-qOrhXtA_.js";
12
13
  const { create: create$2 } = createComponent("address-list-item");
@@ -109,7 +110,7 @@ const _sfc_main$1 = create$1({
109
110
  emits: ["delIcon", "editIcon", "clickItem", "longDown", "longCopy", "longSet", "longDel", "swipeDel"],
110
111
  components: {
111
112
  ItemContents,
112
- NutButton,
113
+ NutButton: _sfc_main$3,
113
114
  NutSwipe
114
115
  },
115
116
  setup(props, { emit }) {
@@ -328,7 +329,7 @@ const _sfc_main = create({
328
329
  },
329
330
  components: {
330
331
  GeneralShell,
331
- NutButton
332
+ NutButton: _sfc_main$3
332
333
  },
333
334
  emits: ["delIcon", "editIcon", "clickItem", "longCopy", "longSet", "longDel", "swipeDel", "add"],
334
335
  setup(props, { emit }) {
@@ -19,10 +19,11 @@ var __spreadValues = (a, b) => {
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { inject, reactive, ref, useSlots, toRefs, resolveComponent, openBlock, createElementBlock, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode, renderSlot } from "vue";
21
21
  import { c as createComponent } from "../component-TCzwHGVq.js";
22
- import NutButton from "../button/Button.js";
22
+ import { Button as _sfc_main$1 } from "../button/Button.js";
23
23
  import { u as useLocale } from "../index-s3RgMhc7.js";
24
24
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
25
25
  import "@nutui/icons-vue";
26
+ import "../with-install-p59gYYU_.js";
26
27
  import "@nutui/nutui/dist/packages/locale/lang";
27
28
  import "../util-4Jkyw4BJ.js";
28
29
  const { create } = createComponent("audio-operate");
@@ -36,7 +37,7 @@ const _sfc_main = create({
36
37
  }
37
38
  },
38
39
  components: {
39
- NutButton
40
+ NutButton: _sfc_main$1
40
41
  },
41
42
  emits: ["click"],
42
43
  setup(props) {
@@ -1 +1 @@
1
- .nut-avatar{background-size:100% 100%;background-repeat:no-repeat;background-position:center center;display:inline-block;position:relative;flex:0 0 auto;text-align:center;vertical-align:top}.nut-avatar img{display:block;width:100%;height:100%}.nut-avatar .nut-icon{background-size:100% 100%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.nut-avatar-large{width:var(--nut-avatar-large-width, 60px);height:var(--nut-avatar-large-height, 60px);line-height:var(--nut-avatar-large-height, 60px)}.nut-avatar-small{width:var(--nut-avatar-small-width, 32px);height:var(--nut-avatar-small-height, 32px);line-height:var(--nut-avatar-small-height, 32px)}.nut-avatar-normal{width:var(--nut-avatar-normal-width, 40px);height:var(--nut-avatar-normal-height, 40px);line-height:var(--nut-avatar-normal-height, 40px)}.nut-avatar-round{border-radius:50%}.nut-avatar-square{border-radius:var(--nut-avatar-square, 5px)}
1
+ .nut-avatar{background-size:100% 100%;background-repeat:no-repeat;background-position:center center;display:inline-block;position:relative;flex:0 0 auto;text-align:center;vertical-align:top}.nut-avatar img{display:block;width:100%;height:100%}.nut-avatar .nut-icon{background-size:100% 100%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.nut-avatar-large{width:var(--nut-avatar-large-width, 60px);height:var(--nut-avatar-large-height, 60px);line-height:var(--nut-avatar-large-height, 60px)}.nut-avatar-small{width:var(--nut-avatar-small-width, 32px);height:var(--nut-avatar-small-height, 32px);line-height:var(--nut-avatar-small-height, 32px)}.nut-avatar-normal{width:var(--nut-avatar-normal-width, 40px);height:var(--nut-avatar-normal-height, 40px);line-height:var(--nut-avatar-normal-height, 40px)}.nut-avatar-round{border-radius:50%;overflow:hidden}.nut-avatar-square{border-radius:var(--nut-avatar-square, 5px)}
@@ -37,7 +37,7 @@
37
37
  }
38
38
  .nut-avatar-round {
39
39
  border-radius: 50%;
40
- // overflow: hidden;
40
+ overflow: hidden;
41
41
  }
42
42
  .nut-avatar-square {
43
43
  border-radius: $avatar-square;
@@ -38,18 +38,19 @@ var __async = (__this, __arguments, generator) => {
38
38
  step((generator = generator.apply(__this, __arguments)).next());
39
39
  });
40
40
  };
41
- import { reactive, ref, computed, watch, toRefs, resolveComponent, openBlock, createElementBlock, Fragment, createElementVNode, renderSlot, withDirectives, normalizeStyle, normalizeClass, createVNode, withCtx, createTextVNode, toDisplayString, vShow } from "vue";
42
- import NutButton from "../button/Button.js";
41
+ import { reactive, ref, computed, watch, toRefs, resolveComponent, openBlock, createElementBlock, Fragment, createElementVNode, renderSlot, withDirectives, normalizeClass, normalizeStyle, createVNode, withCtx, createTextVNode, toDisplayString, vShow } from "vue";
42
+ import { Button as _sfc_main$1 } from "../button/Button.js";
43
43
  import { c as createComponent } from "../component-TCzwHGVq.js";
44
44
  import { d as preventDefault, e as clamp } from "../util-4Jkyw4BJ.js";
45
45
  import { Refresh2, Retweet } from "@nutui/icons-vue";
46
46
  import { u as useTouch } from "../index-084nl_oE.js";
47
47
  import { u as useRect } from "../index-rf29bejW.js";
48
48
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
49
+ import "../with-install-p59gYYU_.js";
49
50
  const { create } = createComponent("avatar-cropper");
50
51
  const _sfc_main = create({
51
52
  components: {
52
- NutButton,
53
+ NutButton: _sfc_main$1,
53
54
  Refresh2,
54
55
  Retweet
55
56
  },
@@ -77,6 +78,10 @@ const _sfc_main = create({
77
78
  confirmText: {
78
79
  type: String,
79
80
  default: "确定"
81
+ },
82
+ shape: {
83
+ type: String,
84
+ default: "square"
80
85
  }
81
86
  },
82
87
  emits: ["confirm", "cancel"],
@@ -412,9 +417,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
412
417
  onTouchcancel: _cache[4] || (_cache[4] = (...args) => _ctx.onTouchEnd && _ctx.onTouchEnd(...args))
413
418
  }, [
414
419
  createElementVNode("div", {
415
- class: "highlight",
420
+ class: normalizeClass(["highlight", { highlight__round: _ctx.shape === "round" }]),
416
421
  style: normalizeStyle(_ctx.highlightStyle)
417
- }, null, 4)
422
+ }, null, 6)
418
423
  ], 32),
419
424
  createElementVNode("div", {
420
425
  class: normalizeClass(["nut-cropper-popup__toolbar", [_ctx.toolbarPosition]])
@@ -1 +1 @@
1
- .nut-avatar-cropper{position:relative}.nut-avatar-cropper::after,.nut-avatar-cropper__edit-text{content:attr(data-edit-text);position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.3);z-index:1;color:#fff;display:flex;justify-content:center;align-items:center}.nut-avatar-cropper.taro::after{content:none}.nut-avatar-cropper__input{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer;z-index:2}.nut-cropper-popup{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--nut-overlay-bg-color, rgba(0, 0, 0, 0.7));z-index:1000}.nut-cropper-popup__canvas,.nut-cropper-popup__cut-canvas{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1}.nut-cropper-popup__cut-canvas{z-index:0}.nut-cropper-popup__toolbar{position:absolute;bottom:0;left:0;width:100%;z-index:2}.nut-cropper-popup__toolbar.top{top:0;bottom:inherit}.nut-cropper-popup__toolbar .flex-sb{width:100%;display:flex;justify-content:space-between}.nut-cropper-popup__toolbar-item{color:#fff;padding:15px;cursor:pointer;display:flex;align-items:center}.nut-cropper-popup__highlight{position:absolute;left:0;top:0;width:100%;height:100%;z-index:1;background-color:rgba(0,0,0,0)}.nut-cropper-popup__highlight .highlight{position:absolute;width:365px;height:365px;left:50%;top:50%;transform:translate(-50%, -50%);z-index:1;background-color:rgba(0,0,0,0);box-shadow:0 0 1000px 1000px rgba(0,0,0,.6)}
1
+ .nut-avatar-cropper{position:relative}.nut-avatar-cropper::after,.nut-avatar-cropper__edit-text{content:attr(data-edit-text);position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.3);z-index:1;color:#fff;display:flex;justify-content:center;align-items:center}.nut-avatar-cropper.taro::after{content:none}.nut-avatar-cropper__input{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer;z-index:2}.nut-cropper-popup{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--nut-overlay-bg-color, rgba(0, 0, 0, 0.7));z-index:1000}.nut-cropper-popup__canvas,.nut-cropper-popup__cut-canvas{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1}.nut-cropper-popup__cut-canvas{z-index:0}.nut-cropper-popup__toolbar{position:absolute;bottom:0;left:0;width:100%;z-index:2}.nut-cropper-popup__toolbar.top{top:0;bottom:inherit}.nut-cropper-popup__toolbar .flex-sb{width:100%;display:flex;justify-content:space-between}.nut-cropper-popup__toolbar-item{color:#fff;padding:15px;cursor:pointer;display:flex;align-items:center}.nut-cropper-popup__highlight{position:absolute;left:0;top:0;width:100%;height:100%;z-index:1;background-color:rgba(0,0,0,0)}.nut-cropper-popup__highlight .highlight{position:absolute;width:365px;height:365px;left:50%;top:50%;transform:translate(-50%, -50%);z-index:1;background-color:rgba(0,0,0,0);box-shadow:0 0 1000px 1000px rgba(0,0,0,.6)}.nut-cropper-popup__highlight .highlight__round{border-radius:50%}
@@ -93,6 +93,9 @@
93
93
  z-index: 1;
94
94
  background-color: transparent;
95
95
  box-shadow: 0 0 1000px 1000px rgba(0, 0, 0, 0.6);
96
+ &__round {
97
+ border-radius: 50%;
98
+ }
96
99
  }
97
100
  }
98
101
  }
@@ -1,12 +1,35 @@
1
- import { toRefs, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, createBlock, createCommentVNode, renderSlot } from "vue";
2
- import { c as createComponent } from "../component-TCzwHGVq.js";
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { defineComponent, toRefs, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, unref, createBlock, createCommentVNode, renderSlot } from "vue";
3
21
  import { Loading } from "@nutui/icons-vue";
4
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
5
- const { componentName, create } = createComponent("button");
6
- const _sfc_main = create({
7
- components: { Loading },
22
+ import { w as withInstall } from "../with-install-p59gYYU_.js";
23
+ const _hoisted_1 = { class: "nut-button__wrap" };
24
+ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
25
+ name: "NutButton"
26
+ }), {
27
+ __name: "button",
8
28
  props: {
9
- color: String,
29
+ color: {
30
+ type: String,
31
+ default: ""
32
+ },
10
33
  shape: {
11
34
  type: String,
12
35
  default: "round"
@@ -37,7 +60,9 @@ const _sfc_main = create({
37
60
  }
38
61
  },
39
62
  emits: ["click"],
40
- setup(props, { emit }) {
63
+ setup(__props, { emit: __emit }) {
64
+ const props = __props;
65
+ const emit = __emit;
41
66
  const { type, size, shape, disabled, loading, color, plain, block } = toRefs(props);
42
67
  const handleClick = (event) => {
43
68
  if (!loading.value && !disabled.value) {
@@ -45,7 +70,7 @@ const _sfc_main = create({
45
70
  }
46
71
  };
47
72
  const classes = computed(() => {
48
- const prefixCls = componentName;
73
+ const prefixCls = "nut-button";
49
74
  return {
50
75
  [prefixCls]: true,
51
76
  [`${prefixCls}--${type.value}`]: type.value,
@@ -74,37 +99,31 @@ const _sfc_main = create({
74
99
  }
75
100
  return style;
76
101
  });
77
- return {
78
- handleClick,
79
- classes,
80
- getStyle
102
+ return (_ctx, _cache) => {
103
+ return openBlock(), createElementBlock("view", {
104
+ class: normalizeClass(classes.value),
105
+ style: normalizeStyle(getStyle.value),
106
+ onClick: handleClick
107
+ }, [
108
+ createElementVNode("view", _hoisted_1, [
109
+ unref(loading) ? (openBlock(), createBlock(unref(Loading), {
110
+ key: 0,
111
+ class: "nut-icon-loading"
112
+ })) : createCommentVNode("", true),
113
+ _ctx.$slots.icon && !unref(loading) ? renderSlot(_ctx.$slots, "icon", { key: 1 }) : createCommentVNode("", true),
114
+ _ctx.$slots.default ? (openBlock(), createElementBlock("view", {
115
+ key: 2,
116
+ class: normalizeClass({ "nut-button__text": _ctx.$slots.icon || unref(loading) })
117
+ }, [
118
+ renderSlot(_ctx.$slots, "default")
119
+ ], 2)) : createCommentVNode("", true)
120
+ ])
121
+ ], 6);
81
122
  };
82
123
  }
83
- });
84
- const _hoisted_1 = { class: "nut-button__wrap" };
85
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
86
- const _component_Loading = resolveComponent("Loading");
87
- return openBlock(), createElementBlock("view", {
88
- class: normalizeClass(_ctx.classes),
89
- style: normalizeStyle(_ctx.getStyle),
90
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
91
- }, [
92
- createElementVNode("view", _hoisted_1, [
93
- _ctx.loading ? (openBlock(), createBlock(_component_Loading, {
94
- key: 0,
95
- class: "nut-icon-loading"
96
- })) : createCommentVNode("", true),
97
- _ctx.$slots.icon && !_ctx.loading ? renderSlot(_ctx.$slots, "icon", { key: 1 }) : createCommentVNode("", true),
98
- _ctx.$slots.default ? (openBlock(), createElementBlock("view", {
99
- key: 2,
100
- class: normalizeClass({ "nut-button__text": _ctx.$slots.icon || _ctx.loading })
101
- }, [
102
- renderSlot(_ctx.$slots, "default")
103
- ], 2)) : createCommentVNode("", true)
104
- ])
105
- ], 6);
106
- }
107
- const NutButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
124
+ }));
125
+ withInstall(_sfc_main);
108
126
  export {
109
- NutButton as default
127
+ _sfc_main as Button,
128
+ _sfc_main as default
110
129
  };
@@ -1,8 +1,26 @@
1
- import { h, ref, computed, watchEffect, resolveComponent, withDirectives, openBlock, createElementBlock, createElementVNode, createVNode, toDisplayString, Fragment, renderList, normalizeClass, renderSlot, createTextVNode, vShow } from "vue";
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { h, defineComponent, ref, computed, watchEffect, withDirectives, openBlock, createElementBlock, createElementVNode, createVNode, unref, toDisplayString, Fragment, renderList, normalizeClass, renderSlot, createTextVNode, vShow } from "vue";
2
21
  import { U as Utils } from "../date-djiVNSnJ.js";
3
22
  import { u as useLocale } from "../index-s3RgMhc7.js";
4
- import { c as createComponent } from "../component-TCzwHGVq.js";
5
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
23
+ import { w as withInstall } from "../with-install-p59gYYU_.js";
6
24
  import "@nutui/nutui/dist/packages/locale/lang";
7
25
  import "../util-4Jkyw4BJ.js";
8
26
  const Left = () => {
@@ -168,15 +186,23 @@ const compareDay = (day1, day2) => {
168
186
  const isSameDay = (day1, day2) => {
169
187
  return compareDay(day1, day2) === 0;
170
188
  };
189
+ const _hoisted_1 = { class: "nut-calendarcard" };
190
+ const _hoisted_2 = { class: "nut-calendarcard-header" };
191
+ const _hoisted_3 = { class: "nut-calendarcard-header-left" };
192
+ const _hoisted_4 = { class: "nut-calendarcard-header-title" };
193
+ const _hoisted_5 = { class: "nut-calendarcard-header-right" };
194
+ const _hoisted_6 = { class: "nut-calendarcard-content" };
195
+ const _hoisted_7 = { class: "nut-calendarcard-days" };
196
+ const _hoisted_8 = { class: "nut-calendarcard-days" };
197
+ const _hoisted_9 = ["onClick"];
198
+ const _hoisted_10 = { class: "nut-calendarcard-day-top" };
199
+ const _hoisted_11 = { class: "nut-calendarcard-day-inner" };
200
+ const _hoisted_12 = { class: "nut-calendarcard-day-bottom" };
171
201
  const cN = "NutCalendarCard";
172
- const { create } = createComponent("calendar-card");
173
- const _sfc_main = create({
174
- components: {
175
- DoubleLeft,
176
- Left,
177
- Right,
178
- DoubleRight
179
- },
202
+ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
203
+ name: cN
204
+ }), {
205
+ __name: "calendar-card",
180
206
  props: {
181
207
  type: {
182
208
  type: String,
@@ -204,7 +230,9 @@ const _sfc_main = create({
204
230
  }
205
231
  },
206
232
  emits: ["update:modelValue", "change", "dayClick", "pageChange"],
207
- setup(props, { emit, expose }) {
233
+ setup(__props, { expose: __expose, emit: __emit }) {
234
+ const props = __props;
235
+ const emit = __emit;
208
236
  const translate = useLocale(cN);
209
237
  const initMonth = () => {
210
238
  let date = new Date(Date.now());
@@ -224,10 +252,10 @@ const _sfc_main = create({
224
252
  const month = ref(initMonth());
225
253
  const days = ref([]);
226
254
  const weekHeader = computed(() => {
227
- const weekdays = translate("weekdays").map((day, index2) => {
255
+ const weekdays = translate("weekdays").map((day, index) => {
228
256
  return {
229
257
  name: day,
230
- key: index2
258
+ key: index
231
259
  };
232
260
  });
233
261
  return [...weekdays.slice(props.firstDayOfWeek, 7), ...weekdays.slice(0, props.firstDayOfWeek)];
@@ -420,106 +448,82 @@ const _sfc_main = create({
420
448
  }
421
449
  }
422
450
  };
423
- expose({
451
+ __expose({
424
452
  jump,
425
453
  jumpTo
426
454
  });
427
- return {
428
- days,
429
- month,
430
- weekHeader,
431
- getClasses,
432
- handleDayClick,
433
- jump,
434
- translate
435
- };
436
- }
437
- });
438
- const _hoisted_1 = { class: "nut-calendarcard" };
439
- const _hoisted_2 = { class: "nut-calendarcard-header" };
440
- const _hoisted_3 = { class: "nut-calendarcard-header-left" };
441
- const _hoisted_4 = { class: "nut-calendarcard-header-title" };
442
- const _hoisted_5 = { class: "nut-calendarcard-header-right" };
443
- const _hoisted_6 = { class: "nut-calendarcard-content" };
444
- const _hoisted_7 = { class: "nut-calendarcard-days" };
445
- const _hoisted_8 = { class: "nut-calendarcard-days" };
446
- const _hoisted_9 = ["onClick"];
447
- const _hoisted_10 = { class: "nut-calendarcard-day-top" };
448
- const _hoisted_11 = { class: "nut-calendarcard-day-inner" };
449
- const _hoisted_12 = { class: "nut-calendarcard-day-bottom" };
450
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
451
- const _component_DoubleLeft = resolveComponent("DoubleLeft");
452
- const _component_Left = resolveComponent("Left");
453
- const _component_Right = resolveComponent("Right");
454
- const _component_DoubleRight = resolveComponent("DoubleRight");
455
- return withDirectives((openBlock(), createElementBlock("div", _hoisted_1, [
456
- createElementVNode("div", _hoisted_2, [
457
- createElementVNode("div", _hoisted_3, [
458
- createElementVNode("div", {
459
- class: "double-left",
460
- onClick: _cache[0] || (_cache[0] = ($event) => _ctx.jump(-12))
461
- }, [
462
- createVNode(_component_DoubleLeft)
463
- ]),
464
- createElementVNode("div", {
465
- class: "left",
466
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.jump(-1))
467
- }, [
468
- createVNode(_component_Left)
469
- ])
470
- ]),
471
- createElementVNode("div", _hoisted_4, toDisplayString(_ctx.translate("monthTitle", _ctx.month.year, _ctx.month.month)), 1),
472
- createElementVNode("div", _hoisted_5, [
473
- createElementVNode("div", {
474
- class: "right",
475
- onClick: _cache[2] || (_cache[2] = ($event) => _ctx.jump(1))
476
- }, [
477
- createVNode(_component_Right)
478
- ]),
479
- createElementVNode("div", {
480
- class: "double-right",
481
- onClick: _cache[3] || (_cache[3] = ($event) => _ctx.jump(12))
482
- }, [
483
- createVNode(_component_DoubleRight)
484
- ])
485
- ])
486
- ]),
487
- createElementVNode("div", _hoisted_6, [
488
- createElementVNode("div", _hoisted_7, [
489
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.weekHeader, (d) => {
490
- return openBlock(), createElementBlock("div", {
491
- key: d.name,
492
- class: normalizeClass(["nut-calendarcard-day header", d.key === 0 || d.key === 6 ? "weekend" : ""])
493
- }, toDisplayString(d.name), 3);
494
- }), 128))
495
- ]),
496
- createElementVNode("div", _hoisted_8, [
497
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.days, (day) => {
498
- return openBlock(), createElementBlock("div", {
499
- key: `${day.year}-${day.month}-${day.date}`,
500
- class: normalizeClass(["nut-calendarcard-day", [day.type, ..._ctx.getClasses(day)]]),
501
- onClick: ($event) => _ctx.handleDayClick(day)
502
- }, [
503
- createElementVNode("div", _hoisted_10, [
504
- renderSlot(_ctx.$slots, "top", { day })
455
+ return (_ctx, _cache) => {
456
+ return withDirectives((openBlock(), createElementBlock("div", _hoisted_1, [
457
+ createElementVNode("div", _hoisted_2, [
458
+ createElementVNode("div", _hoisted_3, [
459
+ createElementVNode("div", {
460
+ class: "double-left",
461
+ onClick: _cache[0] || (_cache[0] = ($event) => jump(-12))
462
+ }, [
463
+ createVNode(unref(DoubleLeft))
505
464
  ]),
506
- createElementVNode("div", _hoisted_11, [
507
- renderSlot(_ctx.$slots, "default", { day }, () => [
508
- createTextVNode(toDisplayString(day.date), 1)
509
- ])
465
+ createElementVNode("div", {
466
+ class: "left",
467
+ onClick: _cache[1] || (_cache[1] = ($event) => jump(-1))
468
+ }, [
469
+ createVNode(unref(Left))
470
+ ])
471
+ ]),
472
+ createElementVNode("div", _hoisted_4, toDisplayString(unref(translate)("monthTitle", month.value.year, month.value.month)), 1),
473
+ createElementVNode("div", _hoisted_5, [
474
+ createElementVNode("div", {
475
+ class: "right",
476
+ onClick: _cache[2] || (_cache[2] = ($event) => jump(1))
477
+ }, [
478
+ createVNode(unref(Right))
510
479
  ]),
511
- createElementVNode("div", _hoisted_12, [
512
- renderSlot(_ctx.$slots, "bottom", { day })
480
+ createElementVNode("div", {
481
+ class: "double-right",
482
+ onClick: _cache[3] || (_cache[3] = ($event) => jump(12))
483
+ }, [
484
+ createVNode(unref(DoubleRight))
513
485
  ])
514
- ], 10, _hoisted_9);
515
- }), 128))
516
- ])
517
- ])
518
- ], 512)), [
519
- [vShow, _ctx.days.length > 0]
520
- ]);
521
- }
522
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
486
+ ])
487
+ ]),
488
+ createElementVNode("div", _hoisted_6, [
489
+ createElementVNode("div", _hoisted_7, [
490
+ (openBlock(true), createElementBlock(Fragment, null, renderList(weekHeader.value, (d) => {
491
+ return openBlock(), createElementBlock("div", {
492
+ key: d.name,
493
+ class: normalizeClass(["nut-calendarcard-day header", d.key === 0 || d.key === 6 ? "weekend" : ""])
494
+ }, toDisplayString(d.name), 3);
495
+ }), 128))
496
+ ]),
497
+ createElementVNode("div", _hoisted_8, [
498
+ (openBlock(true), createElementBlock(Fragment, null, renderList(days.value, (day) => {
499
+ return openBlock(), createElementBlock("div", {
500
+ key: `${day.year}-${day.month}-${day.date}`,
501
+ class: normalizeClass(["nut-calendarcard-day", [day.type, ...getClasses(day)]]),
502
+ onClick: ($event) => handleDayClick(day)
503
+ }, [
504
+ createElementVNode("div", _hoisted_10, [
505
+ renderSlot(_ctx.$slots, "top", { day })
506
+ ]),
507
+ createElementVNode("div", _hoisted_11, [
508
+ renderSlot(_ctx.$slots, "default", { day }, () => [
509
+ createTextVNode(toDisplayString(day.date), 1)
510
+ ])
511
+ ]),
512
+ createElementVNode("div", _hoisted_12, [
513
+ renderSlot(_ctx.$slots, "bottom", { day })
514
+ ])
515
+ ], 10, _hoisted_9);
516
+ }), 128))
517
+ ])
518
+ ])
519
+ ], 512)), [
520
+ [vShow, days.value.length > 0]
521
+ ]);
522
+ };
523
+ }
524
+ }));
525
+ withInstall(_sfc_main);
523
526
  export {
524
- index as default
527
+ _sfc_main as CalendarCard,
528
+ _sfc_main as default
525
529
  };
@@ -25,13 +25,14 @@ import { ref, onMounted, watch, computed, resolveComponent, openBlock, createBlo
25
25
  import { c as createComponent } from "../component-TCzwHGVq.js";
26
26
  import { f as funInterceptor } from "../Interceptor-WYVtGbGC.js";
27
27
  import { N as NutPopup, p as popupProps } from "../index-rbZsBckW.js";
28
- import NutButton from "../button/Button.js";
28
+ import { Button as _sfc_main$1 } from "../button/Button.js";
29
29
  import { u as useLocale } from "../index-s3RgMhc7.js";
30
30
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
31
31
  import NutOverlay from "../overlay/Overlay.js";
32
32
  import { C as CreateComponent } from "../mountComponent-uInXoTMp.js";
33
33
  import "../util-4Jkyw4BJ.js";
34
34
  import "@nutui/icons-vue";
35
+ import "../with-install-p59gYYU_.js";
35
36
  import "@nutui/nutui/dist/packages/locale/lang";
36
37
  const { create } = createComponent("dialog");
37
38
  const cN = "NutDialog";
@@ -39,7 +40,7 @@ const _sfc_main = create({
39
40
  inheritAttrs: false,
40
41
  components: {
41
42
  NutPopup,
42
- NutButton
43
+ NutButton: _sfc_main$1
43
44
  },
44
45
  props: __spreadProps(__spreadValues({}, popupProps), {
45
46
  closeOnClickOverlay: {
@@ -293,7 +294,7 @@ class DialogFunction {
293
294
  const options = Object.assign(this.options, _options);
294
295
  const { unmount } = CreateComponent(options, {
295
296
  name: "dialog",
296
- components: [NutPopup, NutButton, NutOverlay],
297
+ components: [NutPopup, _sfc_main$1, NutOverlay],
297
298
  wrapper: (elWrap, root) => {
298
299
  return {
299
300
  setup() {
@@ -1,8 +1,28 @@
1
- import { computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode } from "vue";
2
- import { c as createComponent } from "../component-TCzwHGVq.js";
3
- import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
4
- const { create } = createComponent("divider");
5
- const _sfc_main = create({
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { defineComponent, useSlots, computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode } from "vue";
21
+ import { w as withInstall } from "../with-install-p59gYYU_.js";
22
+ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
23
+ name: "NutDivider"
24
+ }), {
25
+ __name: "divider",
6
26
  props: {
7
27
  contentPosition: {
8
28
  type: String,
@@ -21,13 +41,15 @@ const _sfc_main = create({
21
41
  default: "horizontal"
22
42
  }
23
43
  },
24
- setup(props, context) {
44
+ setup(__props) {
45
+ const props = __props;
46
+ const slots = useSlots();
25
47
  const classes = computed(() => {
26
48
  const prefixCls = "nut-divider";
27
49
  if (props.direction === "horizontal") {
28
50
  return {
29
51
  [prefixCls]: true,
30
- [`${prefixCls}-center`]: context.slots.default,
52
+ [`${prefixCls}-center`]: slots.default,
31
53
  [`${prefixCls}-left`]: props.contentPosition === "left",
32
54
  [`${prefixCls}-right`]: props.contentPosition === "right",
33
55
  [`${prefixCls}-dashed`]: props.dashed,
@@ -40,17 +62,17 @@ const _sfc_main = create({
40
62
  };
41
63
  }
42
64
  });
43
- return { classes };
65
+ return (_ctx, _cache) => {
66
+ return openBlock(), createElementBlock("view", {
67
+ class: normalizeClass(classes.value)
68
+ }, [
69
+ __props.direction === "horizontal" ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true)
70
+ ], 2);
71
+ };
44
72
  }
45
- });
46
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
47
- return openBlock(), createElementBlock("view", {
48
- class: normalizeClass(_ctx.classes)
49
- }, [
50
- _ctx.direction === "horizontal" ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true)
51
- ], 2);
52
- }
53
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
73
+ }));
74
+ withInstall(_sfc_main);
54
75
  export {
55
- index as default
76
+ _sfc_main as Divider,
77
+ _sfc_main as default
56
78
  };