@nutui/nutui 4.3.5 → 4.3.6

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 (72) hide show
  1. package/CHANGELOG.md +20 -1
  2. package/dist/nutui.es.js +1 -1
  3. package/dist/nutui.js +5014 -5222
  4. package/dist/nutui.umd.js +1 -1
  5. package/dist/packages/audio/Audio.js +2 -1
  6. package/dist/packages/audiooperate/AudioOperate.js +2 -1
  7. package/dist/packages/checkbox/Checkbox.js +1 -1
  8. package/dist/packages/{common-DRG0ue26.js → common-BH7uB7Cn.js} +4 -2
  9. package/dist/packages/countdown/Countdown.js +130 -173
  10. package/dist/packages/form/Form.js +2 -2
  11. package/dist/packages/formitem/FormItem.js +2 -2
  12. package/dist/packages/grid/Grid.js +68 -5
  13. package/dist/packages/griditem/GridItem.js +61 -81
  14. package/dist/packages/input/Input.js +1 -1
  15. package/dist/packages/inputnumber/InputNumber.js +1 -1
  16. package/dist/packages/invoice/Invoice.js +4 -4
  17. package/dist/packages/picker/Picker.js +1 -1
  18. package/dist/packages/radio/Radio.js +112 -1
  19. package/dist/packages/radiogroup/RadioGroup.js +60 -1
  20. package/dist/packages/range/Range.js +1 -1
  21. package/dist/packages/rate/Rate.js +1 -1
  22. package/dist/packages/searchbar/Searchbar.js +1 -1
  23. package/dist/packages/step/Step.js +64 -83
  24. package/dist/packages/steps/Steps.js +44 -40
  25. package/dist/packages/switch/Switch.js +1 -1
  26. package/dist/packages/tabpane/TabPane.js +2 -1
  27. package/dist/packages/tabs/Tabs.js +2 -1
  28. package/dist/packages/textarea/Textarea.js +1 -1
  29. package/dist/packages/types-BMA1Y94E.js +4 -0
  30. package/dist/packages/types-BXlnzugj.js +4 -0
  31. package/dist/packages/types-CJeZIBld.js +4 -0
  32. package/dist/packages/uploader/Uploader.js +1 -1
  33. package/dist/smartips/web-types.json +446 -26
  34. package/dist/types/__VUE/audio/index.vue.d.ts +2 -2
  35. package/dist/types/__VUE/audio/types.d.ts +2 -0
  36. package/dist/types/__VUE/audiooperate/index.vue.d.ts +1 -1
  37. package/dist/types/__VUE/countdown/countdown.vue.d.ts +108 -0
  38. package/dist/types/__VUE/countdown/index.d.ts +5 -0
  39. package/dist/types/__VUE/countdown/util.d.ts +14 -0
  40. package/dist/types/__VUE/form/common.d.ts +1 -0
  41. package/dist/types/__VUE/grid/grid.vue.d.ts +87 -0
  42. package/dist/types/__VUE/grid/index.d.ts +6 -0
  43. package/dist/types/__VUE/grid/types.d.ts +2 -0
  44. package/dist/types/__VUE/griditem/grid-item.vue.d.ts +64 -0
  45. package/dist/types/__VUE/griditem/index.d.ts +5 -0
  46. package/dist/types/__VUE/picker/Column.vue.d.ts +2 -2
  47. package/dist/types/__VUE/radio/index.d.ts +6 -0
  48. package/dist/types/__VUE/radio/radio.vue.d.ts +74 -0
  49. package/dist/types/__VUE/radiogroup/index.d.ts +5 -0
  50. package/dist/types/__VUE/radiogroup/radio-group.vue.d.ts +66 -0
  51. package/dist/types/__VUE/step/index.d.ts +5 -0
  52. package/dist/types/__VUE/step/step.vue.d.ts +55 -0
  53. package/dist/types/__VUE/steps/index.d.ts +6 -0
  54. package/dist/types/__VUE/steps/steps.vue.d.ts +64 -0
  55. package/dist/types/__VUE/tabs/index.vue.d.ts +1 -1
  56. package/dist/types/__VUE/tabs/types.d.ts +1 -0
  57. package/dist/types/index.d.ts +15 -8
  58. package/dist/types/utils/index.d.ts +2 -0
  59. package/dist/types/utils/useRelation/useParent.d.ts +1 -1
  60. package/package.json +1 -1
  61. package/dist/packages/common-Chr7cC9o.js +0 -145
  62. package/dist/packages/index.vue_vue_type_script_lang-CTQUvlgN.js +0 -99
  63. package/dist/packages/index.vue_vue_type_script_lang-CaSiRl9x.js +0 -46
  64. package/dist/types/__VUE/audiooperate/types.d.ts +0 -1
  65. package/dist/types/__VUE/countdown/index.vue.d.ts +0 -125
  66. package/dist/types/__VUE/grid/common.d.ts +0 -73
  67. package/dist/types/__VUE/grid/index.vue.d.ts +0 -84
  68. package/dist/types/__VUE/griditem/index.vue.d.ts +0 -47
  69. package/dist/types/__VUE/radio/index.vue.d.ts +0 -64
  70. package/dist/types/__VUE/radiogroup/index.vue.d.ts +0 -49
  71. package/dist/types/__VUE/step/index.vue.d.ts +0 -42
  72. package/dist/types/__VUE/steps/index.vue.d.ts +0 -48
@@ -1,59 +1,63 @@
1
- import { reactive, computed, provide, h } from "vue";
2
- import { c as createComponent } from "../component-DQf3CENX.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, computed, openBlock, createElementBlock, normalizeClass, renderSlot } from "vue";
21
+ import { u as useChildren } from "../useChildren-BZ4-J79J.js";
3
22
  import { S as STEPS_KEY } from "../types-1HzUV14W.js";
4
- const { create, componentName } = createComponent("steps");
5
- const _sfc_main = create({
23
+ import { w as withInstall } from "../with-install-Ch3FF0uS.js";
24
+ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
25
+ name: "NutSteps"
26
+ }), {
27
+ __name: "steps",
6
28
  props: {
7
- direction: {
8
- type: String,
9
- default: "horizontal"
10
- },
11
- current: {
12
- type: [String, Number],
13
- default: "0"
14
- },
15
- progressDot: {
16
- type: Boolean,
17
- default: false
18
- }
29
+ direction: { default: "horizontal" },
30
+ current: { default: "0" },
31
+ progressDot: { type: Boolean, default: false }
19
32
  },
20
33
  emits: ["clickStep"],
21
- setup(props, { emit, slots }) {
22
- const state = reactive({
23
- children: []
24
- });
34
+ setup(__props, { emit: __emit }) {
35
+ const props = __props;
36
+ const emit = __emit;
25
37
  const classes = computed(() => {
26
- const prefixCls = componentName;
38
+ const prefixCls = "nut-steps";
27
39
  return {
28
40
  [prefixCls]: true,
29
41
  [`${prefixCls}-${props.direction}`]: true,
30
42
  [`${prefixCls}-dot`]: !!props.progressDot
31
43
  };
32
44
  });
33
- const relation = (child) => {
34
- child && state.children.push(child);
35
- };
45
+ const { linkChildren } = useChildren(STEPS_KEY);
36
46
  const onEmit = (index) => {
37
47
  emit("clickStep", index);
38
48
  };
39
- provide(STEPS_KEY, {
40
- relation,
41
- state,
42
- props,
43
- onEmit
44
- });
45
- return () => {
46
- var _a;
47
- return h(
48
- "view",
49
- {
50
- class: classes.value
51
- },
52
- (_a = slots.default) == null ? void 0 : _a.call(slots)
53
- );
49
+ linkChildren({ props, onEmit });
50
+ return (_ctx, _cache) => {
51
+ return openBlock(), createElementBlock("view", {
52
+ class: normalizeClass(classes.value)
53
+ }, [
54
+ renderSlot(_ctx.$slots, "default")
55
+ ], 2);
54
56
  };
55
57
  }
56
- });
58
+ }));
59
+ withInstall(_sfc_main);
57
60
  export {
61
+ _sfc_main as Steps,
58
62
  _sfc_main as default
59
63
  };
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { defineComponent, computed, watch, openBlock, createElementBlock, normalizeClass, normalizeStyle, createElementVNode, renderSlot, createVNode, unref, createCommentVNode, Fragment, withDirectives, toDisplayString, vShow } from "vue";
21
21
  import { Loading1 } from "@nutui/icons-vue";
22
- import { u as useFormDisabled } from "../common-DRG0ue26.js";
22
+ import { u as useFormDisabled } from "../common-BH7uB7Cn.js";
23
23
  import { w as withInstall } from "../with-install-Ch3FF0uS.js";
24
24
  const _hoisted_1 = { class: "nut-switch-button" };
25
25
  const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
@@ -19,6 +19,7 @@ var __spreadValues = (a, b) => {
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { inject, computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot } from "vue";
21
21
  import { c as createComponent } from "../component-DQf3CENX.js";
22
+ import { T as TABS_KEY } from "../types-BXlnzugj.js";
22
23
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
23
24
  const { create } = createComponent("tab-pane");
24
25
  const _sfc_main = create({
@@ -38,7 +39,7 @@ const _sfc_main = create({
38
39
  },
39
40
  emits: ["click"],
40
41
  setup(props) {
41
- const parentOption = inject("tabsOpiton");
42
+ const parentOption = inject(TABS_KEY);
42
43
  const paneStyle = computed(() => {
43
44
  return {
44
45
  display: parentOption.animatedTime.value == 0 && props.paneKey != parentOption.activeKey.value ? "none" : void 0
@@ -47,6 +47,7 @@ import { p as pxCheck } from "../pxCheck-DN6FYV6q.js";
47
47
  import { u as useRect } from "../index-B1qsj2XR.js";
48
48
  import { r as requestAniFrame } from "../raf-c01wDYCo.js";
49
49
  import { u as useTouch } from "../index-I8tfW3Kf.js";
50
+ import { T as TABS_KEY } from "../types-BXlnzugj.js";
50
51
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
51
52
  const useTabContentTouch = (props, tabMethods, taro, useTaroRect) => {
52
53
  const tabsContentRef = ref();
@@ -231,7 +232,7 @@ const _sfc_main = create({
231
232
  setup(props, { emit, slots }) {
232
233
  const container = ref(null);
233
234
  let stickyFixed;
234
- provide("tabsOpiton", {
235
+ provide(TABS_KEY, {
235
236
  activeKey: computed(() => props.modelValue || "0"),
236
237
  autoHeight: computed(() => props.autoHeight),
237
238
  animatedTime: computed(() => props.animatedTime)
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { defineComponent, toRef, ref, computed, onMounted, nextTick, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle, unref, toDisplayString, createCommentVNode } from "vue";
21
21
  import { u as useLocale } from "../index-CFigyH92.js";
22
- import { u as useFormDisabled } from "../common-DRG0ue26.js";
22
+ import { u as useFormDisabled } from "../common-BH7uB7Cn.js";
23
23
  import { w as withInstall } from "../with-install-Ch3FF0uS.js";
24
24
  const _hoisted_1 = ["rows", "disabled", "readonly", "value", "maxlength", "placeholder", "autofocus"];
25
25
  const _hoisted_2 = {
@@ -0,0 +1,4 @@
1
+ const AUDIO_KEY = Symbol("nut-audio");
2
+ export {
3
+ AUDIO_KEY as A
4
+ };
@@ -0,0 +1,4 @@
1
+ const TABS_KEY = Symbol("nut-tab");
2
+ export {
3
+ TABS_KEY as T
4
+ };
@@ -0,0 +1,4 @@
1
+ const GRID_KEY = Symbol("grid");
2
+ export {
3
+ GRID_KEY as G
4
+ };
@@ -10,7 +10,7 @@ import { f as funInterceptor } from "../Interceptor-DlY2h6Y7.js";
10
10
  import { Progress as _sfc_main$1 } from "../progress/Progress.js";
11
11
  import { Photograph, Failure, Loading, Del, Link } from "@nutui/icons-vue";
12
12
  import { u as useLocale } from "../index-CFigyH92.js";
13
- import { u as useFormDisabled } from "../common-DRG0ue26.js";
13
+ import { u as useFormDisabled } from "../common-BH7uB7Cn.js";
14
14
  import { _ as _export_sfc } from "../_plugin-vue_export-helper-1tPrXgE0.js";
15
15
  class UploadOptions {
16
16
  constructor() {