@nutui/nutui 4.2.3 → 4.2.4

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 (69) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.js +5563 -5529
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/address/Address.js +0 -1
  6. package/dist/packages/calendar/Calendar.js +3 -4
  7. package/dist/packages/calendaritem/CalendarItem.js +1 -2
  8. package/dist/packages/cascader/index.css +1 -1
  9. package/dist/packages/checkbox/Checkbox.js +148 -152
  10. package/dist/packages/checkboxgroup/CheckboxGroup.js +2 -3
  11. package/dist/packages/divider/Divider.js +2 -2
  12. package/dist/packages/elevator/Elevator.js +5 -6
  13. package/dist/packages/form/Form.js +9 -2
  14. package/dist/packages/formitem/FormItem.js +30 -3
  15. package/dist/packages/formitem/index.css +1 -1
  16. package/dist/packages/formitem/index.scss +25 -0
  17. package/dist/packages/imagepreview/ImagePreview.js +0 -1
  18. package/dist/packages/{index-cDNmNOtI.js → index-NLe0VBkN.js} +2 -3
  19. package/dist/packages/{index.vue_vue_type_script_lang-Lc2BXA17.js → index.vue_vue_type_script_lang-54PRh3YM.js} +0 -1
  20. package/dist/packages/{index.vue_vue_type_script_lang-KuoPcQZs.js → index.vue_vue_type_script_lang-MJYVRFbp.js} +10 -6
  21. package/dist/packages/inputnumber/InputNumber.js +1 -1
  22. package/dist/packages/invoice/Invoice.js +2 -2
  23. package/dist/packages/invoice/index.css +1 -1
  24. package/dist/packages/navbar/index.css +1 -1
  25. package/dist/packages/navbar/index.scss +5 -16
  26. package/dist/packages/popover/Popover.js +3 -2
  27. package/dist/packages/radio/Radio.js +1 -1
  28. package/dist/packages/radio/index.css +1 -1
  29. package/dist/packages/radio/index.scss +21 -0
  30. package/dist/packages/radiogroup/RadioGroup.js +1 -1
  31. package/dist/packages/radiogroup/index.scss +0 -5
  32. package/dist/packages/range/Range.js +0 -2
  33. package/dist/packages/swiper/Swiper.js +2 -3
  34. package/dist/packages/swiperitem/SwiperItem.js +7 -2
  35. package/dist/packages/tabs/Tabs.js +1 -1
  36. package/dist/packages/tabs/index.css +1 -1
  37. package/dist/packages/tabs/index.scss +114 -117
  38. package/dist/packages/textarea/index.css +1 -1
  39. package/dist/packages/textarea/index.scss +1 -0
  40. package/dist/smartips/web-types.json +28 -1
  41. package/dist/style.css +1 -1
  42. package/dist/types/__VUE/address/index.vue.d.ts +3 -3
  43. package/dist/types/__VUE/avatargroup/index.vue.d.ts +1 -1
  44. package/dist/types/__VUE/cell/index.vue.d.ts +1 -1
  45. package/dist/types/__VUE/checkbox/index.vue.d.ts +72 -1
  46. package/dist/types/__VUE/collapse/index.vue.d.ts +3 -28
  47. package/dist/types/__VUE/collapseitem/index.vue.d.ts +1 -1
  48. package/dist/types/__VUE/countup/index.vue.d.ts +2 -2
  49. package/dist/types/__VUE/divider/index.vue.d.ts +15 -1
  50. package/dist/types/__VUE/form/common.d.ts +9 -1
  51. package/dist/types/__VUE/form/index.vue.d.ts +18 -0
  52. package/dist/types/__VUE/form/types.d.ts +3 -1
  53. package/dist/types/__VUE/formitem/index.vue.d.ts +21 -1
  54. package/dist/types/__VUE/formitem/types.d.ts +2 -0
  55. package/dist/types/__VUE/image/index.vue.d.ts +1 -1
  56. package/dist/types/__VUE/navbar/index.vue.d.ts +1 -1
  57. package/dist/types/__VUE/radio/index.vue.d.ts +14 -3
  58. package/dist/types/__VUE/radio/types.d.ts +4 -0
  59. package/dist/types/__VUE/radiogroup/index.vue.d.ts +8 -6
  60. package/dist/types/__VUE/sku/components/SkuStepper.vue.d.ts +1 -1
  61. package/dist/types/__VUE/sku/index.vue.d.ts +1 -1
  62. package/dist/types/__VUE/tabs/index.vue.d.ts +1 -1
  63. package/dist/types/__VUE/toast/index.vue.d.ts +1 -1
  64. package/dist/types/__VUE/uploader/index.vue.d.ts +2 -28
  65. package/dist/types/index.d.ts +1 -1
  66. package/package.json +1 -1
  67. package/dist/packages/index-nRNEaTqA.js +0 -10
  68. package/dist/types/__VUE/checkbox/common.d.ts +0 -2
  69. package/dist/types/__VUE/picker/common.d.ts +0 -406
@@ -26,7 +26,6 @@ import { u as useLocale } from "../index-s3RgMhc7.js";
26
26
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
27
27
  import "../overlay/Overlay.js";
28
28
  import "../util-4Jkyw4BJ.js";
29
- import "../index-nRNEaTqA.js";
30
29
  import "@nutui/nutui/dist/packages/locale/lang";
31
30
  const { create } = createComponent("address");
32
31
  const cN = "NutAddress";
@@ -1,8 +1,7 @@
1
1
  import { computed, ref, resolveComponent, openBlock, createBlock, mergeProps, withCtx, createVNode, createSlots, renderSlot } from "vue";
2
2
  import { c as createComponent } from "../component-TCzwHGVq.js";
3
- import { N as NutCalendarItem, U as Utils } from "../index-cDNmNOtI.js";
3
+ import { N as NutCalendarItem, U as Utils } from "../index-NLe0VBkN.js";
4
4
  import { N as NutPopup } from "../index-rbZsBckW.js";
5
- import { u as useExpose } from "../index-nRNEaTqA.js";
6
5
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
7
6
  import "../raf-MQjoO-Ag.js";
8
7
  import "../index-s3RgMhc7.js";
@@ -88,7 +87,7 @@ const _sfc_main = create({
88
87
  disabledDate: Function
89
88
  },
90
89
  emits: ["choose", "close", "update:visible", "select"],
91
- setup(props, { emit, slots }) {
90
+ setup(props, { emit, slots, expose }) {
92
91
  const showTopBtn = computed(() => {
93
92
  return slots.btn;
94
93
  });
@@ -113,7 +112,7 @@ const _sfc_main = create({
113
112
  var _a;
114
113
  (_a = calendarRef.value) == null ? void 0 : _a.initPosition();
115
114
  };
116
- useExpose({
115
+ expose({
117
116
  scrollToDate,
118
117
  initPosition
119
118
  });
@@ -1,9 +1,8 @@
1
- import { N } from "../index-cDNmNOtI.js";
1
+ import { N } from "../index-NLe0VBkN.js";
2
2
  import "vue";
3
3
  import "../_plugin-vue_export-helper-yVxbj29m.js";
4
4
  import "../component-TCzwHGVq.js";
5
5
  import "../raf-MQjoO-Ag.js";
6
- import "../index-nRNEaTqA.js";
7
6
  import "../index-s3RgMhc7.js";
8
7
  import "@nutui/nutui/dist/packages/locale/lang";
9
8
  import "../util-4Jkyw4BJ.js";
@@ -1 +1 @@
1
- .overlay-fade-enter-active,.overlay-fade-leave-active{transition-property:opacity;transition-timing-function:ease}.overlay-fade-enter-from,.overlay-fade-leave-to{opacity:0}.nut-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--nut-overlay-bg-color, rgba(0, 0, 0, 0.7))}.nut-overflow-hidden{overflow:hidden !important}.nut-theme-dark .nut-popup{background:var(--nut-dark-background2, #1b1b1b)}.nut-theme-dark .nut-popup__close-icon{color:var(--nut-dark-color, var(--nut-white, #fff))}.nut-popup-slide-center-enter-active,.nut-popup-slide-center-leave-active{transition-property:opacity;transition-timing-function:ease}.nut-popup-slide-center-enter-from,.nut-popup-slide-center-leave-to{opacity:0}.nut-popup-slide-top-enter-from,.nut-popup-slide-top-leave-active{transform:translate(0, -100%)}.nut-popup-slide-right-enter-from,.nut-popup-slide-right-leave-active{transform:translate(100%, 0)}.nut-popup-slide-bottom-enter-from,.nut-popup-slide-bottom-leave-active{transform:translate(0, 100%)}.nut-popup-slide-left-enter-from,.nut-popup-slide-left-leave-active{transform:translate(-100%, 0)}.nut-popup--center{top:50%;left:50%;transform:translate(-50%, -50%)}.nut-popup--center.round{border-radius:var(--nut-popup-border-radius, 20px)}.nut-popup--bottom{bottom:0;left:0;width:100%}.nut-popup--bottom.round{border-radius:var(--nut-popup-border-radius, 20px) var(--nut-popup-border-radius, 20px) 0 0}.nut-popup--bottom--safebottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.nut-popup--right{top:0;right:0}.nut-popup--right.round{border-radius:var(--nut-popup-border-radius, 20px) 0 0 var(--nut-popup-border-radius, 20px)}.nut-popup--left{top:0;left:0}.nut-popup--left.round{border-radius:0 var(--nut-popup-border-radius, 20px) var(--nut-popup-border-radius, 20px) 0}.nut-popup--top{top:0;left:0;width:100%}.nut-popup--top.round{border-radius:0 0 var(--nut-popup-border-radius, 20px) var(--nut-popup-border-radius, 20px)}.nut-popup{position:fixed;max-height:100%;overflow-y:auto;background-color:var(--nut-white, #fff);-webkit-overflow-scrolling:touch}.nut-popup__close-icon{position:absolute !important;z-index:1;color:#969799;font-size:18px;cursor:pointer;width:30px;height:30px;line-height:30px;text-align:center}.nut-popup__close-icon:active{opacity:.7}.nut-popup__close-icon--top-left{top:var(--nut-popup-close-icon-margin, 16px);left:var(--nut-popup-close-icon-margin, 16px)}.nut-popup__close-icon--top-right{top:var(--nut-popup-close-icon-margin, 16px);right:var(--nut-popup-close-icon-margin, 16px)}.nut-popup__close-icon--bottom-left{bottom:var(--nut-popup-close-icon-margin, 16px);left:var(--nut-popup-close-icon-margin, 16px)}.nut-popup__close-icon--bottom-right{right:var(--nut-popup-close-icon-margin, 16px);bottom:var(--nut-popup-close-icon-margin, 16px)}.nut-theme-dark .nut-tabs__titles{background:var(--nut-dark-background3, #141414)}.nut-theme-dark .nut-tabs__titles-item{color:var(--nut-dark-color-gray, var(--nut-text-color, #808080))}.nut-theme-dark .nut-tabs__titles-item.active{color:var(--nut-dark-color, var(--nut-white, #fff))}.nut-theme-dark .nut-tabs.vertical .nut-tabs__titles-item.active{background-color:var(--nut-dark-background2, #1b1b1b)}.nut-tabs{display:flex;overflow:hidden}.nut-tabs.horizontal{flex-direction:column}.nut-tabs.vertical{flex-direction:row;width:100%}.nut-tabs.vertical .nut-tabs__titles{flex-direction:column;height:100%;padding:10px 0 !important;width:var(--nut-tabs-vertical-titles-width, 100px);flex-shrink:0}.nut-tabs.vertical .nut-tabs__titles .nut-tabs__list{width:100%;display:flex;flex-direction:column;flex-shrink:0}.nut-tabs.vertical .nut-tabs__titles.scrollable{overflow-x:hidden;overflow-y:auto}.nut-tabs.vertical .nut-tabs__titles.scrollable .nut-tabs__titles-item{padding:0 10px 0 15px}.nut-tabs.vertical .nut-tabs__titles.scroll-vertical{overflow-y:scroll;height:auto}.nut-tabs.vertical .nut-tabs__titles.scroll-vertical .nut-tabs__titles-placeholder{height:22px}.nut-tabs.vertical .nut-tabs__titles-item{height:var(--nut-tabs-vertical-titles-item-height, 40px);flex:none}.nut-tabs.vertical .nut-tabs__titles-item__smile{transition:width .3s ease}.nut-tabs.vertical .nut-tabs__titles-item__line{bottom:none;transform:translate(0, -50%);transition:height .3s ease;width:0;height:0}.nut-tabs.vertical .nut-tabs__titles-item.active{background-color:#fff}.nut-tabs.vertical .nut-tabs__titles-item.active .nut-tabs__titles-item__line{left:10px;width:3px;background:var(--nut-tabs-vertical-tab-line-color, linear-gradient(180deg, var(--nut-primary-color, #fa2c19) 0%, rgba(250, 44, 25, 0.15) 100%));height:var(--nut-tabs-vertical-titles-item-active-line-height, 14px)}.nut-tabs.vertical .nut-tabs__titles-item.active .nut-tabs__titles-item__smile{right:-8px;bottom:2px;left:auto;width:3px;transform:rotate(320deg);height:var(--nut-tabs-vertical-titles-item-active-line-height, 14px)}.nut-tabs.vertical .nut-tabs__content{flex:1;flex-direction:column}.nut-tabs.vertical .nut-tabs__content .nut-tab-pane{height:100%}.nut-tabs__titles{height:var(--nut-tabs-horizontal-titles-height, 46px);display:flex;user-select:none;background:var(--nut-tabs-titles-background-color, var(--nut-help-color, #f5f5f5));border-radius:var(--nut-tabs-titles-border-radius, 0);flex-shrink:0}.nut-tabs__titles .nut-tabs__list{width:100%;height:var(--nut-tabs-horizontal-titles-height, 46px);display:flex;flex-shrink:0}.nut-tabs__titles.large .nut-tabs__titles-item{font-size:var(--nut-tabs-titles-item-large-font-size, var(--nut-font-size-3, 16px))}.nut-tabs__titles.normal .nut-tabs__titles-item{font-size:var(--nut-tabs-titles-item-font-size, var(--nut-font-size-2, 14px))}.nut-tabs__titles.small .nut-tabs__titles-item{font-size:var(--nut-tabs-titles-item-small-font-size, var(--nut-font-size-1, 12px))}.nut-tabs__titles::-webkit-scrollbar{display:none;width:0;background:rgba(0,0,0,0)}.nut-tabs__titles.smile .nut-tabs__titles-item.active .nut-tabs__titles-item__smile{width:36px;height:10px}.nut-tabs__titles.scrollable{overflow-x:auto;overflow-y:hidden}.nut-tabs__titles.scrollable .nut-tabs__titles-item{width:auto}.nut-tabs__titles-item{position:relative;font-size:var(--nut-tabs-titles-item-font-size, var(--nut-font-size-2, 14px));flex:1 0 auto;min-width:var(--nut-tabs-horizontal-titles-item-min-width, 50px);width:0;display:flex;align-items:center;justify-content:center;color:var(--nut-tabs-titles-item-color, var(--nut-title-color, #1a1a1a))}.nut-tabs__titles-item__text{text-align:center}.nut-tabs__titles-item__text.ellipsis{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nut-tabs__titles-item__smile,.nut-tabs__titles-item__line{position:absolute;transition:width .3s ease;width:0;height:0;content:" ";bottom:15%;left:50%;transform:translate(-50%, 0);overflow:hidden;border-radius:var(--nut-tabs-titles-item-line-border-radius, 0);opacity:var(--nut-tabs-titles-item-line-opacity, 1)}.nut-tabs__titles-item__smile .nut-icon{position:absolute;font-size:12px;width:100%;height:100%;color:var(--nut-tabs-tab-smile-color, var(--nut-primary-color, #fa2c19))}.nut-tabs__titles-item.disabled{color:var(--nut-disable-color, #cccccc)}.nut-tabs__titles-item.active{font-weight:bold;color:var(--nut-tabs-titles-item-active-color, var(--nut-title-color, #1a1a1a))}.nut-tabs__titles-item.active .nut-tabs__titles-item__line{content:" ";width:var(--nut-tabs-horizontal-titles-item-active-line-width, 40px);height:3px;background:var(--nut-tabs-horizontal-tab-line-color, linear-gradient(90deg, var(--nut-primary-color, #fa2c19) 0%, rgba(250, 44, 25, 0.15) 100%))}.nut-tabs__content{display:flex;box-sizing:border-box}.tabs-scrollview{white-space:nowrap}.nut-tabs__titles-item.nut-tabs__titles-placeholder{width:auto;min-width:10px}.nut-tabs__titles-item .taro{height:46px;line-height:46px}.nut-theme-dark .nut-tab-pane{background:var(--nut-dark-background2, #1b1b1b)}.nut-tab-pane{width:100%;flex-shrink:0;display:block;background-color:#fff;padding:24px 20px;box-sizing:border-box;overflow:auto;height:100%;word-break:break-all}.nut-tab-pane.inactive{overflow:visible;height:0}.nut-theme-dark .nut-cascader__bar{background:var(--nut-dark-background2, #1b1b1b);color:var(--nut-dark-color, var(--nut-white, #fff))}.nut-theme-dark .nut-tabs__titles{background:var(--nut-dark-background3, #141414) !important}.nut-theme-dark .nut-cascader-item{color:var(--nut-dark-color-gray, var(--nut-text-color, #808080))}.nut-cascader{width:100%;font-size:var(--nut-cascader-font-size, var(--nut-font-size-2, 14px));line-height:var(--nut-cascader-line-height, 22px)}.nut-cascader .nut-tab-pane{padding:0}.nut-cascader .nut-tabs__titles-item{flex:initial;min-width:auto;padding:var(--nut-cascader-tabs-item-padding, 0 10px);white-space:nowrap}.nut-cascader .nut-tabs__titles{padding:var(--nut-cascader-tabs-item-padding, 0 10px);background:#fff}.nut-cascader__bar{display:flex;justify-content:center;align-items:center;padding:var(--nut-cascader-bar-padding, 24px 20px 17px);text-align:center;font-weight:bold;line-height:var(--nut-cascader-bar-line-height, 20px);color:var(--nut-cascader-bar-color, var(--nut-title-color, #1a1a1a));font-size:var(--nut-cascader-bar-font-size, var(--nut-font-size-4, 18px))}.nut-cascader-pane{display:block;padding:0;margin:0;width:100%;padding-top:10px;height:342px;overflow-y:auto;-webkit-overflow-scrolling:touch}.nut-cascader-item{display:flex;align-items:center;padding:var(--nut-cascader-item-padding, 10px 20px);margin:0;cursor:pointer;font-size:var(--nut-cascader-item-font-size, var(--nut-font-size-2, 14px));color:var(--nut-cascader-item-color, var(--nut-title-color, #1a1a1a))}.nut-cascader-item__title{flex:1}.nut-cascader-item__icon-check{margin-left:10px;visibility:hidden}.nut-cascader-item__icon-loading{margin-left:10px}.nut-cascader-item.active:not(.disabled){color:var(--nut-cascader-item-active-color, var(--nut-primary-color, #fa2c19))}.nut-cascader-item.active .nut-cascader-item__icon-check{visibility:visible;color:var(--nut-cascader-item-active-color, var(--nut-primary-color, #fa2c19))}.nut-cascader-item.disabled{opacity:.6;cursor:not-allowed}
1
+ .overlay-fade-enter-active,.overlay-fade-leave-active{transition-property:opacity;transition-timing-function:ease}.overlay-fade-enter-from,.overlay-fade-leave-to{opacity:0}.nut-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:var(--nut-overlay-bg-color, rgba(0, 0, 0, 0.7))}.nut-overflow-hidden{overflow:hidden !important}.nut-theme-dark .nut-popup{background:var(--nut-dark-background2, #1b1b1b)}.nut-theme-dark .nut-popup__close-icon{color:var(--nut-dark-color, var(--nut-white, #fff))}.nut-popup-slide-center-enter-active,.nut-popup-slide-center-leave-active{transition-property:opacity;transition-timing-function:ease}.nut-popup-slide-center-enter-from,.nut-popup-slide-center-leave-to{opacity:0}.nut-popup-slide-top-enter-from,.nut-popup-slide-top-leave-active{transform:translate(0, -100%)}.nut-popup-slide-right-enter-from,.nut-popup-slide-right-leave-active{transform:translate(100%, 0)}.nut-popup-slide-bottom-enter-from,.nut-popup-slide-bottom-leave-active{transform:translate(0, 100%)}.nut-popup-slide-left-enter-from,.nut-popup-slide-left-leave-active{transform:translate(-100%, 0)}.nut-popup--center{top:50%;left:50%;transform:translate(-50%, -50%)}.nut-popup--center.round{border-radius:var(--nut-popup-border-radius, 20px)}.nut-popup--bottom{bottom:0;left:0;width:100%}.nut-popup--bottom.round{border-radius:var(--nut-popup-border-radius, 20px) var(--nut-popup-border-radius, 20px) 0 0}.nut-popup--bottom--safebottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.nut-popup--right{top:0;right:0}.nut-popup--right.round{border-radius:var(--nut-popup-border-radius, 20px) 0 0 var(--nut-popup-border-radius, 20px)}.nut-popup--left{top:0;left:0}.nut-popup--left.round{border-radius:0 var(--nut-popup-border-radius, 20px) var(--nut-popup-border-radius, 20px) 0}.nut-popup--top{top:0;left:0;width:100%}.nut-popup--top.round{border-radius:0 0 var(--nut-popup-border-radius, 20px) var(--nut-popup-border-radius, 20px)}.nut-popup{position:fixed;max-height:100%;overflow-y:auto;background-color:var(--nut-white, #fff);-webkit-overflow-scrolling:touch}.nut-popup__close-icon{position:absolute !important;z-index:1;color:#969799;font-size:18px;cursor:pointer;width:30px;height:30px;line-height:30px;text-align:center}.nut-popup__close-icon:active{opacity:.7}.nut-popup__close-icon--top-left{top:var(--nut-popup-close-icon-margin, 16px);left:var(--nut-popup-close-icon-margin, 16px)}.nut-popup__close-icon--top-right{top:var(--nut-popup-close-icon-margin, 16px);right:var(--nut-popup-close-icon-margin, 16px)}.nut-popup__close-icon--bottom-left{bottom:var(--nut-popup-close-icon-margin, 16px);left:var(--nut-popup-close-icon-margin, 16px)}.nut-popup__close-icon--bottom-right{right:var(--nut-popup-close-icon-margin, 16px);bottom:var(--nut-popup-close-icon-margin, 16px)}.nut-theme-dark .nut-tabs__titles{background:var(--nut-dark-background3, #141414)}.nut-theme-dark .nut-tabs__titles-item{color:var(--nut-dark-color-gray, var(--nut-text-color, #808080))}.nut-theme-dark .nut-tabs__titles-item.active{color:var(--nut-dark-color, var(--nut-white, #fff))}.nut-theme-dark .nut-tabs.vertical .nut-tabs__titles-item.active{background-color:var(--nut-dark-background2, #1b1b1b)}.nut-tabs{display:flex;overflow:hidden}.nut-tabs .nut-tabs__titles{display:flex;user-select:none;white-space:nowrap;flex-shrink:0;background:var(--nut-tabs-titles-background-color, var(--nut-help-color, #f5f5f5));border-radius:var(--nut-tabs-titles-border-radius, 0)}.nut-tabs .nut-tabs__titles .nut-tabs__list{width:100%;display:flex;flex-shrink:0}.nut-tabs .nut-tabs__titles .nut-tabs__titles-item{position:relative;font-size:var(--nut-tabs-titles-item-font-size, var(--nut-font-size-2, 14px));display:flex;align-items:center;justify-content:center;color:var(--nut-tabs-titles-item-color, var(--nut-title-color, #1a1a1a))}.nut-tabs .nut-tabs__titles .nut-tabs__titles-item__text{text-align:center}.nut-tabs .nut-tabs__titles .nut-tabs__titles-item__text.ellipsis{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nut-tabs .nut-tabs__titles .nut-tabs__titles-item__smile .nut-icon{position:absolute;font-size:12px;width:100%;height:100%;color:var(--nut-tabs-tab-smile-color, var(--nut-primary-color, #fa2c19))}.nut-tabs .nut-tabs__titles .nut-tabs__titles-item__smile,.nut-tabs .nut-tabs__titles .nut-tabs__titles-item__line{position:absolute;transition:width .3s ease;width:0;height:0;content:" ";bottom:15%;left:50%;transform:translate(-50%, 0);overflow:hidden;border-radius:var(--nut-tabs-titles-item-line-border-radius, 0);opacity:var(--nut-tabs-titles-item-line-opacity, 1)}.nut-tabs .nut-tabs__titles .nut-tabs__titles-item.active{font-weight:bold;color:var(--nut-tabs-titles-item-active-color, var(--nut-title-color, #1a1a1a))}.nut-tabs .nut-tabs__titles .nut-tabs__titles-item.active .nut-tabs__titles-item__line{content:" ";width:var(--nut-tabs-horizontal-titles-item-active-line-width, 40px);height:3px;background:var(--nut-tabs-horizontal-tab-line-color, linear-gradient(90deg, var(--nut-primary-color, #fa2c19) 0%, rgba(250, 44, 25, 0.15) 100%))}.nut-tabs .nut-tabs__titles .nut-tabs__titles-item.disabled{color:var(--nut-disable-color, #cccccc)}.nut-tabs.horizontal{flex-direction:column}.nut-tabs.horizontal .nut-sticky__box>.nut-tabs__titles,.nut-tabs.horizontal>.nut-tabs__titles{flex-direction:row;height:var(--nut-tabs-horizontal-titles-height, 46px)}.nut-tabs.horizontal .nut-sticky__box>.nut-tabs__titles .nut-tabs__list,.nut-tabs.horizontal>.nut-tabs__titles .nut-tabs__list{height:100%}.nut-tabs.horizontal .nut-sticky__box>.nut-tabs__titles.scrollable,.nut-tabs.horizontal>.nut-tabs__titles.scrollable{overflow-x:auto;overflow-y:hidden}.nut-tabs.horizontal .nut-sticky__box>.nut-tabs__titles .nut-tabs__titles-item,.nut-tabs.horizontal>.nut-tabs__titles .nut-tabs__titles-item{flex:1 0 auto;min-width:var(--nut-tabs-horizontal-titles-item-min-width, 50px);width:0}.nut-tabs.horizontal .nut-sticky__box>.nut-tabs__titles .nut-tabs__titles-item__smile .nut-icon,.nut-tabs.horizontal>.nut-tabs__titles .nut-tabs__titles-item__smile .nut-icon{position:absolute;font-size:12px;width:100%;height:100%;color:var(--nut-tabs-tab-smile-color, var(--nut-primary-color, #fa2c19))}.nut-tabs.vertical{flex-direction:row;width:100%}.nut-tabs.vertical>.nut-tabs__titles{flex-direction:column;height:auto;padding:10px 0;width:var(--nut-tabs-vertical-titles-width, 100px)}.nut-tabs.vertical>.nut-tabs__titles .nut-tabs__list{flex-direction:column}.nut-tabs.vertical>.nut-tabs__titles.scrollable{overflow-x:hidden;overflow-y:auto;height:auto}.nut-tabs.vertical>.nut-tabs__titles.scrollable .nut-tabs__titles-placeholder{height:22px}.nut-tabs.vertical>.nut-tabs__titles .nut-tabs__titles-item{min-width:var(--nut-tabs-horizontal-titles-item-min-width, 50px);width:100%;height:var(--nut-tabs-vertical-titles-item-height, 40px);flex:none}.nut-tabs.vertical>.nut-tabs__titles .nut-tabs__titles-item__line{bottom:none;transform:translate(0, -50%);transition:height .3s ease;width:0;height:0}.nut-tabs.vertical>.nut-tabs__titles .nut-tabs__titles-item.active{background-color:#fff}.nut-tabs.vertical>.nut-tabs__titles .nut-tabs__titles-item.active .nut-tabs__titles-item__line{left:10px;width:3px;background:var(--nut-tabs-vertical-tab-line-color, linear-gradient(180deg, var(--nut-primary-color, #fa2c19) 0%, rgba(250, 44, 25, 0.15) 100%));height:var(--nut-tabs-vertical-titles-item-active-line-height, 14px)}.nut-tabs.vertical>.nut-tabs__titles .nut-tabs__titles-item.active .nut-tabs__titles-item__smile{position:absolute;right:-8px;bottom:2px;left:auto;width:36px;transform:rotate(320deg);height:var(--nut-tabs-vertical-titles-item-active-line-height, 14px)}.nut-tabs.vertical .nut-tabs__content{flex:1;flex-direction:column}.nut-tabs.vertical .nut-tabs__content .nut-tab-pane{height:100%}.nut-tabs__titles.large .nut-tabs__titles-item{font-size:var(--nut-tabs-titles-item-large-font-size, var(--nut-font-size-3, 16px))}.nut-tabs__titles.normal .nut-tabs__titles-item{font-size:var(--nut-tabs-titles-item-font-size, var(--nut-font-size-2, 14px))}.nut-tabs__titles.small .nut-tabs__titles-item{font-size:var(--nut-tabs-titles-item-small-font-size, var(--nut-font-size-1, 12px))}.nut-tabs__titles::-webkit-scrollbar{display:none;width:0;background:rgba(0,0,0,0)}.nut-tabs__titles.smile .nut-tabs__titles-item.active .nut-tabs__titles-item__smile{width:36px;height:10px}.nut-tabs__content{display:flex;box-sizing:border-box}.nut-tabs .nut-tabs__titles-item.nut-tabs__titles-placeholder{width:auto;min-width:10px}.nut-tabs .nut-tabs__titles-item .taro{height:46px;line-height:46px}.nut-theme-dark .nut-tab-pane{background:var(--nut-dark-background2, #1b1b1b)}.nut-tab-pane{width:100%;flex-shrink:0;display:block;background-color:#fff;padding:24px 20px;box-sizing:border-box;overflow:auto;height:100%;word-break:break-all}.nut-tab-pane.inactive{overflow:visible;height:0}.nut-theme-dark .nut-cascader__bar{background:var(--nut-dark-background2, #1b1b1b);color:var(--nut-dark-color, var(--nut-white, #fff))}.nut-theme-dark .nut-tabs__titles{background:var(--nut-dark-background3, #141414) !important}.nut-theme-dark .nut-cascader-item{color:var(--nut-dark-color-gray, var(--nut-text-color, #808080))}.nut-cascader{width:100%;font-size:var(--nut-cascader-font-size, var(--nut-font-size-2, 14px));line-height:var(--nut-cascader-line-height, 22px)}.nut-cascader .nut-tab-pane{padding:0}.nut-cascader .nut-tabs__titles-item{flex:initial;min-width:auto;padding:var(--nut-cascader-tabs-item-padding, 0 10px);white-space:nowrap}.nut-cascader .nut-tabs__titles{padding:var(--nut-cascader-tabs-item-padding, 0 10px);background:#fff}.nut-cascader__bar{display:flex;justify-content:center;align-items:center;padding:var(--nut-cascader-bar-padding, 24px 20px 17px);text-align:center;font-weight:bold;line-height:var(--nut-cascader-bar-line-height, 20px);color:var(--nut-cascader-bar-color, var(--nut-title-color, #1a1a1a));font-size:var(--nut-cascader-bar-font-size, var(--nut-font-size-4, 18px))}.nut-cascader-pane{display:block;padding:0;margin:0;width:100%;padding-top:10px;height:342px;overflow-y:auto;-webkit-overflow-scrolling:touch}.nut-cascader-item{display:flex;align-items:center;padding:var(--nut-cascader-item-padding, 10px 20px);margin:0;cursor:pointer;font-size:var(--nut-cascader-item-font-size, var(--nut-font-size-2, 14px));color:var(--nut-cascader-item-color, var(--nut-title-color, #1a1a1a))}.nut-cascader-item__title{flex:1}.nut-cascader-item__icon-check{margin-left:10px;visibility:hidden}.nut-cascader-item__icon-loading{margin-left:10px}.nut-cascader-item.active:not(.disabled){color:var(--nut-cascader-item-active-color, var(--nut-primary-color, #fa2c19))}.nut-cascader-item.active .nut-cascader-item__icon-check{visibility:visible;color:var(--nut-cascader-item-active-color, var(--nut-primary-color, #fa2c19))}.nut-cascader-item.disabled{opacity:.6;cursor:not-allowed}
@@ -1,165 +1,161 @@
1
- import { c as createComponent } from "../component-TCzwHGVq.js";
2
1
  import { inject, reactive, computed, watch, onMounted, getCurrentInstance, onBeforeUnmount, h } from "vue";
2
+ import { c as createComponent } from "../component-TCzwHGVq.js";
3
+ import { CheckNormal, Checked, CheckDisabled } from "@nutui/icons-vue";
3
4
  import { p as pxCheck } from "../pxCheck-OnXlN1NC.js";
4
5
  import { C as CHECKBOX_KEY } from "../types-zeKkNDAq.js";
5
- import { CheckNormal, Checked, CheckDisabled } from "@nutui/icons-vue";
6
- const component = (componentName2, components) => {
7
- return {
8
- components,
9
- props: {
10
- modelValue: {
11
- type: Boolean,
12
- default: false
13
- },
14
- disabled: {
15
- type: Boolean,
16
- default: false
17
- },
18
- textPosition: {
19
- type: String,
20
- default: "right"
21
- },
22
- iconSize: {
23
- type: [String, Number],
24
- default: ""
25
- },
26
- label: {
27
- type: String,
28
- default: ""
29
- },
30
- indeterminate: {
31
- type: Boolean,
32
- default: false
33
- },
34
- shape: {
35
- type: String,
36
- default: "round"
37
- // button
38
- }
6
+ const { create, componentName } = createComponent("checkbox");
7
+ const _sfc_main = create({
8
+ props: {
9
+ modelValue: {
10
+ type: Boolean,
11
+ default: false
39
12
  },
40
- emits: ["change", "update:modelValue"],
41
- setup(props, { emit, slots }) {
42
- const parent = inject(CHECKBOX_KEY, null);
43
- const state = reactive({
44
- partialSelect: props.indeterminate
45
- });
46
- const hasParent = computed(() => !!parent);
47
- const pValue = computed(() => {
48
- if (hasParent.value) {
49
- return parent.value.value.includes(props.label);
13
+ disabled: {
14
+ type: Boolean,
15
+ default: false
16
+ },
17
+ textPosition: {
18
+ type: String,
19
+ default: "right"
20
+ },
21
+ iconSize: {
22
+ type: [String, Number],
23
+ default: ""
24
+ },
25
+ label: {
26
+ type: String,
27
+ default: ""
28
+ },
29
+ indeterminate: {
30
+ type: Boolean,
31
+ default: false
32
+ },
33
+ shape: {
34
+ type: String,
35
+ default: "round"
36
+ // button
37
+ }
38
+ },
39
+ emits: ["change", "update:modelValue"],
40
+ setup(props, { emit, slots }) {
41
+ const parent = inject(CHECKBOX_KEY, null);
42
+ const state = reactive({
43
+ partialSelect: props.indeterminate
44
+ });
45
+ const hasParent = computed(() => !!parent);
46
+ const pValue = computed(() => {
47
+ if (hasParent.value) {
48
+ return parent.value.value.includes(props.label);
49
+ } else {
50
+ return props.modelValue;
51
+ }
52
+ });
53
+ const pDisabled = computed(() => {
54
+ return hasParent.value ? parent.disabled.value ? parent.disabled.value : props.disabled : props.disabled;
55
+ });
56
+ const checked = computed(() => !!props.modelValue);
57
+ const color = computed(() => {
58
+ return !pDisabled.value ? state.partialSelect ? "nut-checkbox__icon--indeterminate" : !pValue.value ? "nut-checkbox__icon--unchecked" : "nut-checkbox__icon" : "nut-checkbox__icon--disable";
59
+ });
60
+ let updateType = "";
61
+ const emitChange = (value, label) => {
62
+ updateType = "click";
63
+ emit("update:modelValue", value);
64
+ emit("change", value, label);
65
+ };
66
+ watch(
67
+ () => props.modelValue,
68
+ (v) => {
69
+ if (updateType == "click") {
70
+ updateType = "";
50
71
  } else {
51
- return props.modelValue;
52
- }
53
- });
54
- const pDisabled = computed(() => {
55
- return hasParent.value ? parent.disabled.value ? parent.disabled.value : props.disabled : props.disabled;
56
- });
57
- const checked = computed(() => !!props.modelValue);
58
- const color = computed(() => {
59
- return !pDisabled.value ? state.partialSelect ? "nut-checkbox__icon--indeterminate" : !pValue.value ? "nut-checkbox__icon--unchecked" : "nut-checkbox__icon" : "nut-checkbox__icon--disable";
60
- });
61
- let updateType = "";
62
- const emitChange = (value, label) => {
63
- updateType = "click";
64
- emit("update:modelValue", value);
65
- emit("change", value, label);
66
- };
67
- watch(
68
- () => props.modelValue,
69
- (v) => {
70
- if (updateType == "click") {
71
- updateType = "";
72
- } else {
73
- emit("change", v);
74
- }
75
- }
76
- );
77
- const renderIcon = () => {
78
- const { iconSize } = props;
79
- const iconNodeMap = {
80
- CheckNormal: slots.icon ? slots.icon : components.CheckNormal,
81
- Checked: slots.checkedIcon ? slots.checkedIcon : components.Checked,
82
- CheckDisabled: slots.indeterminate ? slots.indeterminate : components.CheckDisabled
83
- };
84
- const iconNode = state.partialSelect ? iconNodeMap.CheckDisabled : !pValue.value ? iconNodeMap.CheckNormal : iconNodeMap.Checked;
85
- const size = pxCheck(iconSize);
86
- return h(iconNode, {
87
- width: size,
88
- height: size,
89
- size,
90
- class: color.value
91
- });
92
- };
93
- const renderLabel = () => {
94
- var _a;
95
- return h(
96
- "view",
97
- {
98
- class: `${componentName2}__label ${pDisabled.value ? `${componentName2}__label--disabled` : ""}`
99
- },
100
- (_a = slots.default) == null ? void 0 : _a.call(slots)
101
- );
102
- };
103
- const renderButton = () => {
104
- var _a;
105
- return h(
106
- "view",
107
- {
108
- class: `${componentName2}__button ${pValue.value && `${componentName2}__button--active`} ${pDisabled.value ? `${componentName2}__button--disabled` : ""}`
109
- },
110
- (_a = slots.default) == null ? void 0 : _a.call(slots)
111
- );
112
- };
113
- const handleClick = () => {
114
- var _a, _b;
115
- if (pDisabled.value)
116
- return;
117
- if (checked.value && state.partialSelect) {
118
- state.partialSelect = false;
119
- emitChange(checked.value, (_a = slots.default) == null ? void 0 : _a.call(slots)[0].children);
120
- return;
121
- }
122
- emitChange(!checked.value, (_b = slots.default) == null ? void 0 : _b.call(slots)[0].children);
123
- if (hasParent.value) {
124
- const value = parent.value.value;
125
- const max = parent.max.value;
126
- const { label } = props;
127
- const index = value.indexOf(label);
128
- if (index > -1) {
129
- value.splice(index, 1);
130
- } else if (index <= -1 && (value.length < max || !max)) {
131
- value.push(label);
132
- }
133
- parent.updateValue(value);
72
+ emit("change", v);
134
73
  }
74
+ }
75
+ );
76
+ const renderIcon = () => {
77
+ const { iconSize } = props;
78
+ const iconNodeMap = {
79
+ CheckNormal: slots.icon ? slots.icon : CheckNormal,
80
+ Checked: slots.checkedIcon ? slots.checkedIcon : Checked,
81
+ CheckDisabled: slots.indeterminate ? slots.indeterminate : CheckDisabled
135
82
  };
136
- onMounted(() => {
137
- hasParent.value && parent.link(getCurrentInstance());
138
- });
139
- onBeforeUnmount(() => {
140
- hasParent.value && parent.unlink(getCurrentInstance());
83
+ const iconNode = state.partialSelect ? iconNodeMap.CheckDisabled : !pValue.value ? iconNodeMap.CheckNormal : iconNodeMap.Checked;
84
+ const size = pxCheck(iconSize);
85
+ return h(iconNode, {
86
+ width: size,
87
+ height: size,
88
+ size,
89
+ class: color.value
141
90
  });
142
- watch(
143
- () => props.indeterminate,
144
- (newVal) => {
145
- state.partialSelect = newVal;
91
+ };
92
+ const renderLabel = () => {
93
+ var _a;
94
+ return h(
95
+ "view",
96
+ {
97
+ class: `${componentName}__label ${pDisabled.value ? `${componentName}__label--disabled` : ""}`
98
+ },
99
+ (_a = slots.default) == null ? void 0 : _a.call(slots)
100
+ );
101
+ };
102
+ const renderButton = () => {
103
+ var _a;
104
+ return h(
105
+ "view",
106
+ {
107
+ class: `${componentName}__button ${pValue.value && `${componentName}__button--active`} ${pDisabled.value ? `${componentName}__button--disabled` : ""}`
108
+ },
109
+ (_a = slots.default) == null ? void 0 : _a.call(slots)
110
+ );
111
+ };
112
+ const handleClick = () => {
113
+ var _a, _b;
114
+ if (pDisabled.value)
115
+ return;
116
+ if (checked.value && state.partialSelect) {
117
+ state.partialSelect = false;
118
+ emitChange(checked.value, (_a = slots.default) == null ? void 0 : _a.call(slots)[0].children);
119
+ return;
120
+ }
121
+ emitChange(!checked.value, (_b = slots.default) == null ? void 0 : _b.call(slots)[0].children);
122
+ if (hasParent.value) {
123
+ const value = parent.value.value;
124
+ const max = parent.max.value;
125
+ const { label } = props;
126
+ const index = value.indexOf(label);
127
+ if (index > -1) {
128
+ value.splice(index, 1);
129
+ } else if (index <= -1 && (value.length < max || !max)) {
130
+ value.push(label);
146
131
  }
132
+ parent.updateValue(value);
133
+ }
134
+ };
135
+ onMounted(() => {
136
+ hasParent.value && parent.link(getCurrentInstance());
137
+ });
138
+ onBeforeUnmount(() => {
139
+ hasParent.value && parent.unlink(getCurrentInstance());
140
+ });
141
+ watch(
142
+ () => props.indeterminate,
143
+ (newVal) => {
144
+ state.partialSelect = newVal;
145
+ }
146
+ );
147
+ return () => {
148
+ return h(
149
+ "view",
150
+ {
151
+ class: `${componentName} ${componentName}--${props.shape} ${props.textPosition === "left" ? `${componentName}--reverse` : ""}`,
152
+ onClick: handleClick
153
+ },
154
+ [props.shape == "button" ? renderButton() : [renderIcon(), renderLabel()]]
147
155
  );
148
- return () => {
149
- return h(
150
- "view",
151
- {
152
- class: `${componentName2} ${componentName2}--${props.shape} ${props.textPosition === "left" ? `${componentName2}--reverse` : ""}`,
153
- onClick: handleClick
154
- },
155
- [props.shape == "button" ? renderButton() : [renderIcon(), renderLabel()]]
156
- );
157
- };
158
- }
159
- };
160
- };
161
- const { create, componentName } = createComponent("checkbox");
162
- const _sfc_main = create(component(componentName, { CheckNormal, Checked, CheckDisabled }));
156
+ };
157
+ }
158
+ });
163
159
  export {
164
160
  _sfc_main as default
165
161
  };
@@ -1,6 +1,5 @@
1
1
  import { reactive, provide, computed, watch, h } from "vue";
2
2
  import { c as createComponent } from "../component-TCzwHGVq.js";
3
- import { u as useExpose } from "../index-nRNEaTqA.js";
4
3
  import { C as CHECKBOX_KEY } from "../types-zeKkNDAq.js";
5
4
  const { create, componentName } = createComponent("checkbox-group");
6
5
  const _sfc_main = create({
@@ -19,7 +18,7 @@ const _sfc_main = create({
19
18
  }
20
19
  },
21
20
  emits: ["change", "update:modelValue"],
22
- setup(props, { slots, emit }) {
21
+ setup(props, { slots, emit, expose }) {
23
22
  const state = reactive({
24
23
  children: []
25
24
  });
@@ -68,7 +67,7 @@ const _sfc_main = create({
68
67
  emit("change", value);
69
68
  }
70
69
  );
71
- useExpose({ toggleAll, toggleReverse });
70
+ expose({ toggleAll, toggleReverse });
72
71
  return () => {
73
72
  var _a;
74
73
  return h(
@@ -1,7 +1,7 @@
1
1
  import { computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode } from "vue";
2
2
  import { c as createComponent } from "../component-TCzwHGVq.js";
3
3
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
4
- const { componentName, create } = createComponent("divider");
4
+ const { create } = createComponent("divider");
5
5
  const _sfc_main = create({
6
6
  props: {
7
7
  contentPosition: {
@@ -23,7 +23,7 @@ const _sfc_main = create({
23
23
  },
24
24
  setup(props, context) {
25
25
  const classes = computed(() => {
26
- const prefixCls = componentName;
26
+ const prefixCls = "nut-divider";
27
27
  if (props.direction === "horizontal") {
28
28
  return {
29
29
  [prefixCls]: true,
@@ -19,7 +19,6 @@ var __spreadValues = (a, b) => {
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { ref, reactive, computed, onMounted, watch, nextTick, toRefs, openBlock, createElementBlock, createElementVNode, normalizeStyle, Fragment, renderList, toDisplayString, normalizeClass, renderSlot, withDirectives, vShow, createCommentVNode, withModifiers } from "vue";
21
21
  import { c as createComponent } from "../component-TCzwHGVq.js";
22
- import { u as useExpose } from "../index-nRNEaTqA.js";
23
22
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-yVxbj29m.js";
24
23
  const { create } = createComponent("elevator");
25
24
  const _sfc_main = create({
@@ -50,7 +49,7 @@ const _sfc_main = create({
50
49
  }
51
50
  },
52
51
  emits: ["clickItem", "clickIndex", "change"],
53
- setup(props, context) {
52
+ setup(props, { emit, expose }) {
54
53
  const listview = ref(null);
55
54
  const state = reactive({
56
55
  anchorIndex: 0,
@@ -123,12 +122,12 @@ const _sfc_main = create({
123
122
  state.scrollStart = false;
124
123
  };
125
124
  const handleClickItem = (key, item) => {
126
- context.emit("clickItem", key, item);
125
+ emit("clickItem", key, item);
127
126
  state.currentData = item;
128
127
  state.currentKey = key;
129
128
  };
130
129
  const handleClickIndex = (key) => {
131
- context.emit("clickIndex", key);
130
+ emit("clickIndex", key);
132
131
  };
133
132
  const listViewScroll = (e) => {
134
133
  let target = e.target;
@@ -151,7 +150,7 @@ const _sfc_main = create({
151
150
  listview.value.addEventListener("scroll", listViewScroll);
152
151
  }
153
152
  });
154
- useExpose({
153
+ expose({
155
154
  scrollTo
156
155
  });
157
156
  watch(
@@ -178,7 +177,7 @@ const _sfc_main = create({
178
177
  watch(
179
178
  () => state.currentIndex,
180
179
  (newVal) => {
181
- context.emit("change", newVal);
180
+ emit("change", newVal);
182
181
  }
183
182
  );
184
183
  return __spreadProps(__spreadValues({}, toRefs(state)), {
@@ -50,6 +50,14 @@ const component = (components) => {
50
50
  rules: {
51
51
  type: Object,
52
52
  default: () => ({})
53
+ },
54
+ labelPosition: {
55
+ type: String,
56
+ default: "left"
57
+ },
58
+ starPosition: {
59
+ type: String,
60
+ default: "left"
53
61
  }
54
62
  },
55
63
  components,
@@ -181,7 +189,6 @@ const _sfc_main = create(
181
189
  NutCellGroup
182
190
  })
183
191
  );
184
- const _hoisted_1 = ["onSubmit"];
185
192
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
186
193
  const _component_nut_cell_group = resolveComponent("nut-cell-group");
187
194
  return openBlock(), createElementBlock("form", {
@@ -195,7 +202,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
195
202
  ]),
196
203
  _: 3
197
204
  })
198
- ], 40, _hoisted_1);
205
+ ], 32);
199
206
  }
200
207
  const NutForm = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
201
208
  export {
@@ -50,6 +50,14 @@ const _sfc_main = create({
50
50
  bodyAlign: {
51
51
  type: String,
52
52
  default: ""
53
+ },
54
+ labelPosition: {
55
+ type: String,
56
+ default: ""
57
+ },
58
+ starPosition: {
59
+ type: String,
60
+ default: ""
53
61
  }
54
62
  },
55
63
  components: {
@@ -68,6 +76,16 @@ const _sfc_main = create({
68
76
  }
69
77
  return props.required || props.rules.some((rule) => rule.required) || formRequired;
70
78
  });
79
+ const labelPositionClass = computed(() => {
80
+ const labelPosition = parentObj.props.labelPosition;
81
+ const position = props.labelPosition ? props.labelPosition : labelPosition;
82
+ return position !== "left" ? `nut-form-item__${position}` : "";
83
+ });
84
+ const starPositionClass = computed(() => {
85
+ const starPosition = parentObj.props.starPosition;
86
+ const position = props.starPosition ? props.starPosition : starPosition;
87
+ return position !== "left" ? `nut-form-item__star-${position}` : "";
88
+ });
71
89
  const parent = inject("formErrorTip");
72
90
  const labelStyle = computed(() => {
73
91
  return {
@@ -86,20 +104,29 @@ const _sfc_main = create({
86
104
  };
87
105
  });
88
106
  const getSlots = (name) => slots[name];
89
- return { parent, labelStyle, bodyStyle, errorMessageStyle, getSlots, isRequired };
107
+ return {
108
+ parent,
109
+ labelStyle,
110
+ bodyStyle,
111
+ errorMessageStyle,
112
+ getSlots,
113
+ isRequired,
114
+ labelPositionClass,
115
+ starPositionClass
116
+ };
90
117
  }
91
118
  });
92
119
  const _hoisted_1 = { class: "nut-cell__value nut-form-item__body" };
93
120
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
94
121
  const _component_nut_cell = resolveComponent("nut-cell");
95
122
  return openBlock(), createBlock(_component_nut_cell, {
96
- class: normalizeClass(["nut-form-item", [{ error: _ctx.parent[_ctx.prop], line: _ctx.showErrorLine }, _ctx.$attrs.class]]),
123
+ class: normalizeClass(["nut-form-item", [{ error: _ctx.parent[_ctx.prop], line: _ctx.showErrorLine }, _ctx.$attrs.class, _ctx.labelPositionClass]]),
97
124
  style: normalizeStyle(_ctx.$attrs.style)
98
125
  }, {
99
126
  default: withCtx(() => [
100
127
  _ctx.label || _ctx.getSlots("label") ? (openBlock(), createElementBlock("view", {
101
128
  key: 0,
102
- class: normalizeClass(["nut-cell__title nut-form-item__label", { required: _ctx.isRequired }]),
129
+ class: normalizeClass(["nut-cell__title nut-form-item__label", { required: _ctx.isRequired, [_ctx.starPositionClass]: _ctx.starPositionClass }]),
103
130
  style: normalizeStyle(_ctx.labelStyle)
104
131
  }, [
105
132
  renderSlot(_ctx.$slots, "label", {}, () => [
@@ -1 +1 @@
1
- .nut-theme-dark .nut-cell{background:var(--nut-dark-background2, #1b1b1b);color:var(--nut-dark-color, var(--nut-white, #fff));box-shadow:none}.nut-cell{position:relative;display:flex;width:100%;line-height:var(--nut-cell-line-height, 20px);padding:var(--nut-cell-padding, 13px 16px);background:var(--nut-cell-background, var(--nut-white, #fff));border-radius:var(--nut-cell-border-radius, 6px);box-shadow:var(--nut-cell-box-shadow, 0px 1px 7px 0px rgb(237, 238, 241));font-size:var(--nut-cell-title-font, var(--nut-font-size-2, 14px));color:var(--nut-cell-color, var(--nut-title-color2, #666666));margin:10px 0;box-sizing:border-box}.nut-cell--center{align-items:center}.nut-cell--large{font-size:var(--nut-cell-large-title-font, var(--nut-font-size-large, var(--nut-font-size-3, 16px)));padding:var(--nut-cell-large-padding, 15px 16px)}.nut-cell--large .nut-cell__title-desc{font-size:var(--nut-cell-large-title-desc-font, var(--nut-font-size-base, var(--nut-font-size-2, 14px)))}.nut-cell:last-child::after{border:0 !important}.nut-cell::after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--nut-cell-after-right, 16px);bottom:0;left:16px;transform:scaleY(0.5)}.nut-cell:active::before{opacity:.1}.nut-cell--clickable{cursor:pointer}.nut-cell--clickable::before{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:var(--nut-black, #000);border:inherit;border-color:var(--nut-black, #000);border-radius:inherit;transform:translate(-50%, -50%);opacity:0;content:" "}.nut-cell__icon{display:flex;flex-direction:row;margin:var(--nut-cell-default-icon-margin, 0 4px 0 0px);align-items:center}.nut-cell__title{display:flex;flex-direction:column;flex:1;min-width:80px}.nut-cell__title-desc{font-size:var(--nut-cell-title-desc-font, var(--nut-font-size-1, 12px))}.nut-cell__value{display:inline-block;text-align:right;flex:1;font-size:var(--nut-cell-desc-font, var(--nut-font-size-2, 14px));color:var(--nut-cell-desc-color, var(--nut-disable-color, #cccccc))}.nut-cell__value--alone{color:var(--nut-cell-color, var(--nut-title-color2, #666666))}.nut-cell__link{color:#979797;align-self:center}.nut-theme-dark .nut-form-item__body__slots .nut-input-text{color:var(--nut-dark-color, var(--nut-white, #fff))}.nut-form-item{display:flex}.nut-form-item::before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:16px;bottom:0;left:16px;transform:scaleX(0)}.nut-form-item.error.line::before{border-bottom:1px solid var(--nut-form-item-error-line-color, var(--nut-required-color, #fa2c19));transform:scaleX(1);transition:transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms}.nut-form-item__label{font-size:var(--nut-form-item-label-font-size, 14px);font-weight:normal;width:var(--nut-form-item-label-width, 90px);margin-right:var(--nut-form-item-label-margin-right, 10px);flex:none !important;display:inline-block !important;word-wrap:break-word;text-align:var(--nut-form-item-label-text-align, left)}.nut-form-item__label.nut-cell__title{min-width:auto}.nut-form-item__label.required::before{content:"*";color:var(--nut-form-item-required-color, var(--nut-required-color, #fa2c19));margin-right:var(--nut-form-item-required-margin-right, 4px)}.nut-form-item__body{flex:1;display:flex !important;flex-direction:column}.nut-form-item__body__slots{text-align:var(--nut-form-item-body-slots-text-align, left)}.nut-form-item__body__slots .nut-input-text{font-size:var(--nut-form-item-body-font-size, 14px);text-align:var(--nut-form-item-body-input-text-align, left);color:var(--nut-black, #000);width:100%;outline:0 none;border:0;text-decoration:none;background:rgba(0,0,0,0);padding:0;margin:0}.nut-form-item__body__slots .nut-range-container{min-height:24px}.nut-form-item__body__slots .nut-textarea{padding:0 !important}.nut-form-item__body__slots .nut-textarea .nut-textarea__textarea{text-align:var(--nut-form-item-body-input-text-align, left)}.nut-form-item__body__tips{text-align:var(--nut-form-item-tip-text-align, left);font-size:var(--nut-form-item-tip-font-size, 10px);color:var(--nut-form-item-error-message-color, var(--nut-required-color, #fa2c19))}
1
+ .nut-theme-dark .nut-cell{background:var(--nut-dark-background2, #1b1b1b);color:var(--nut-dark-color, var(--nut-white, #fff));box-shadow:none}.nut-cell{position:relative;display:flex;width:100%;line-height:var(--nut-cell-line-height, 20px);padding:var(--nut-cell-padding, 13px 16px);background:var(--nut-cell-background, var(--nut-white, #fff));border-radius:var(--nut-cell-border-radius, 6px);box-shadow:var(--nut-cell-box-shadow, 0px 1px 7px 0px rgb(237, 238, 241));font-size:var(--nut-cell-title-font, var(--nut-font-size-2, 14px));color:var(--nut-cell-color, var(--nut-title-color2, #666666));margin:10px 0;box-sizing:border-box}.nut-cell--center{align-items:center}.nut-cell--large{font-size:var(--nut-cell-large-title-font, var(--nut-font-size-large, var(--nut-font-size-3, 16px)));padding:var(--nut-cell-large-padding, 15px 16px)}.nut-cell--large .nut-cell__title-desc{font-size:var(--nut-cell-large-title-desc-font, var(--nut-font-size-base, var(--nut-font-size-2, 14px)))}.nut-cell:last-child::after{border:0 !important}.nut-cell::after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--nut-cell-after-right, 16px);bottom:0;left:16px;transform:scaleY(0.5)}.nut-cell:active::before{opacity:.1}.nut-cell--clickable{cursor:pointer}.nut-cell--clickable::before{position:absolute;top:50%;left:50%;width:100%;height:100%;background-color:var(--nut-black, #000);border:inherit;border-color:var(--nut-black, #000);border-radius:inherit;transform:translate(-50%, -50%);opacity:0;content:" "}.nut-cell__icon{display:flex;flex-direction:row;margin:var(--nut-cell-default-icon-margin, 0 4px 0 0px);align-items:center}.nut-cell__title{display:flex;flex-direction:column;flex:1;min-width:80px}.nut-cell__title-desc{font-size:var(--nut-cell-title-desc-font, var(--nut-font-size-1, 12px))}.nut-cell__value{display:inline-block;text-align:right;flex:1;font-size:var(--nut-cell-desc-font, var(--nut-font-size-2, 14px));color:var(--nut-cell-desc-color, var(--nut-disable-color, #cccccc))}.nut-cell__value--alone{color:var(--nut-cell-color, var(--nut-title-color2, #666666))}.nut-cell__link{color:#979797;align-self:center}.nut-theme-dark .nut-form-item__body__slots .nut-input-text{color:var(--nut-dark-color, var(--nut-white, #fff))}.nut-form-item{display:flex}.nut-form-item::before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:16px;bottom:0;left:16px;transform:scaleX(0)}.nut-form-item.error.line::before{border-bottom:1px solid var(--nut-form-item-error-line-color, var(--nut-required-color, #fa2c19));transform:scaleX(1);transition:transform 200ms cubic-bezier(0, 0, 0.2, 1) 0ms}.nut-form-item__label{font-size:var(--nut-form-item-label-font-size, 14px);font-weight:normal;width:var(--nut-form-item-label-width, 90px);margin-right:var(--nut-form-item-label-margin-right, 10px);flex:none !important;display:inline-block !important;word-wrap:break-word;text-align:var(--nut-form-item-label-text-align, left)}.nut-form-item__label.nut-cell__title{min-width:auto}.nut-form-item__label.required::before{content:"*";color:var(--nut-form-item-required-color, var(--nut-required-color, #fa2c19));margin-right:var(--nut-form-item-required-margin-right, 4px)}.nut-form-item__label.required.nut-form-item__star-right::before{content:none}.nut-form-item__label.required.nut-form-item__star-right::after{content:"*";color:var(--nut-form-item-required-color, var(--nut-required-color, #fa2c19));margin-left:var(--nut-form-item-required-margin-right, 4px)}.nut-form-item__body{flex:1;display:flex !important;flex-direction:column}.nut-form-item__body__slots{text-align:var(--nut-form-item-body-slots-text-align, left)}.nut-form-item__body__slots .nut-input-text{font-size:var(--nut-form-item-body-font-size, 14px);text-align:var(--nut-form-item-body-input-text-align, left);color:var(--nut-black, #000);width:100%;outline:0 none;border:0;text-decoration:none;background:rgba(0,0,0,0);padding:0;margin:0}.nut-form-item__body__slots .nut-range-container{min-height:24px}.nut-form-item__body__slots .nut-textarea{padding:0 !important}.nut-form-item__body__slots .nut-textarea .nut-textarea__textarea{text-align:var(--nut-form-item-body-input-text-align, left)}.nut-form-item__body__tips{text-align:var(--nut-form-item-tip-text-align, left);font-size:var(--nut-form-item-tip-font-size, 10px);color:var(--nut-form-item-error-message-color, var(--nut-required-color, #fa2c19))}.nut-form-item__right{--nut-form-item-label-text-align: right}.nut-form-item__top{flex-direction:column}.nut-form-item__top .nut-form-item__label{padding-bottom:5px;width:100%;box-sizing:border-box;display:block;padding-right:24px}
@@ -51,6 +51,16 @@
51
51
  color: $form-item-required-color;
52
52
  margin-right: $form-item-required-margin-right;
53
53
  }
54
+ &.nut-form-item__star-right {
55
+ &::before {
56
+ content: none;
57
+ }
58
+ &::after {
59
+ content: '*';
60
+ color: $form-item-required-color;
61
+ margin-left: $form-item-required-margin-right;
62
+ }
63
+ }
54
64
  }
55
65
  }
56
66
  &__body {
@@ -87,4 +97,19 @@
87
97
  color: $form-item-error-message-color;
88
98
  }
89
99
  }
100
+
101
+ &__right {
102
+ --nut-form-item-label-text-align: right;
103
+ }
104
+
105
+ &__top {
106
+ flex-direction: column;
107
+ .nut-form-item__label {
108
+ padding-bottom: 5px;
109
+ width: 100%;
110
+ box-sizing: border-box;
111
+ display: block;
112
+ padding-right: 24px;
113
+ }
114
+ }
90
115
  }
@@ -38,7 +38,6 @@ import { C as CreateComponent } from "../mountComponent-uInXoTMp.js";
38
38
  import NutOverlay from "../overlay/Overlay.js";
39
39
  import "../index-s3RgMhc7.js";
40
40
  import "@nutui/nutui/dist/packages/locale/lang";
41
- import "../index-nRNEaTqA.js";
42
41
  import "../types-9wCQwtH3.js";
43
42
  import "../raf-MQjoO-Ag.js";
44
43
  const baseProps = {