zartui 3.1.10 → 3.1.12

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 (146) hide show
  1. package/README.md +23 -23
  2. package/es/cascader/Cascader.d.ts +1 -1
  3. package/es/cascader/index.d.ts +1 -1
  4. package/es/cell/Cell.d.ts +24 -1
  5. package/es/cell/Cell.mjs +30 -5
  6. package/es/cell/index.css +1 -1
  7. package/es/cell/index.d.ts +14 -1
  8. package/es/checkbox/Checkbox.d.ts +1 -1
  9. package/es/checkbox/index.d.ts +1 -1
  10. package/es/checkbox-group/CheckboxGroup.d.ts +1 -1
  11. package/es/checkbox-group/index.d.ts +1 -1
  12. package/es/collapse/Collapse.d.ts +1 -1
  13. package/es/collapse/index.d.ts +1 -1
  14. package/es/composables/use-touch.d.ts +1 -0
  15. package/es/composables/use-touch.mjs +8 -1
  16. package/es/config-provider/types.d.ts +1 -1
  17. package/es/date-time-picker/DateTimePicker.d.ts +1 -1
  18. package/es/date-time-picker/DateTimePickerWrapper.d.ts +1 -1
  19. package/es/date-time-picker/index.d.ts +1 -1
  20. package/es/dropdown-item/DropdownItem.d.ts +1 -1
  21. package/es/dropdown-item/index.d.ts +1 -1
  22. package/es/field/Field.d.ts +17 -2
  23. package/es/field/index.d.ts +12 -2
  24. package/es/floating-bubble/FloatingBubble.d.ts +81 -0
  25. package/es/floating-bubble/FloatingBubble.mjs +181 -0
  26. package/es/floating-bubble/index.css +1 -0
  27. package/es/floating-bubble/index.d.ts +63 -0
  28. package/es/floating-bubble/index.mjs +10 -0
  29. package/es/floating-bubble/style/index.d.ts +1 -0
  30. package/es/floating-bubble/style/index.mjs +4 -0
  31. package/es/floating-bubble/types.d.ts +20 -0
  32. package/es/floating-bubble/types.mjs +0 -0
  33. package/es/hierarchy-select/HierarchySelect.mjs +1 -0
  34. package/es/index-bar/IndexBar.mjs +27 -19
  35. package/es/index-bar/index.css +1 -1
  36. package/es/index-bar/types.d.ts +1 -0
  37. package/es/index.d.ts +2 -1
  38. package/es/index.mjs +4 -1
  39. package/es/lazyload/vue-lazyload/index.d.ts +55 -55
  40. package/es/number-keyboard/NumberKeyboard.d.ts +1 -1
  41. package/es/number-keyboard/index.d.ts +1 -1
  42. package/es/picker/Picker.d.ts +1 -1
  43. package/es/picker/index.d.ts +1 -1
  44. package/es/pull-refresh/PullRefresh.d.ts +1 -1
  45. package/es/pull-refresh/index.d.ts +1 -1
  46. package/es/radio-group/RadioGroup.d.ts +1 -1
  47. package/es/radio-group/index.d.ts +1 -1
  48. package/es/radio-picker/RadioPicker.d.ts +1 -1
  49. package/es/radio-picker/index.d.ts +1 -1
  50. package/es/rate/Rate.d.ts +1 -1
  51. package/es/rate/index.d.ts +1 -1
  52. package/es/search/Search.d.ts +2 -2
  53. package/es/search/index.d.ts +2 -2
  54. package/es/stepper/Stepper.d.ts +1 -1
  55. package/es/stepper/index.d.ts +1 -1
  56. package/es/switch/Switch.d.ts +1 -1
  57. package/es/switch/index.d.ts +1 -1
  58. package/es/tabbar/Tabbar.d.ts +1 -1
  59. package/es/tabbar/index.d.ts +1 -1
  60. package/es/tabbar-item/index.css +1 -1
  61. package/es/time-picker/TimePicker.d.ts +1 -1
  62. package/es/time-picker/index.d.ts +1 -1
  63. package/es/utils/closest.d.ts +1 -0
  64. package/es/utils/closest.mjs +8 -0
  65. package/es/utils/constant.d.ts +1 -0
  66. package/es/utils/constant.mjs +3 -1
  67. package/es/utils/index.d.ts +1 -0
  68. package/es/utils/index.mjs +1 -0
  69. package/es/vue-sfc-shim.d.ts +6 -6
  70. package/es/vue-tsx-shim.d.ts +23 -23
  71. package/lib/cascader/Cascader.d.ts +1 -1
  72. package/lib/cascader/index.d.ts +1 -1
  73. package/lib/cell/Cell.d.ts +24 -1
  74. package/lib/cell/Cell.js +28 -3
  75. package/lib/cell/index.css +1 -1
  76. package/lib/cell/index.d.ts +14 -1
  77. package/lib/checkbox/Checkbox.d.ts +1 -1
  78. package/lib/checkbox/index.d.ts +1 -1
  79. package/lib/checkbox-group/CheckboxGroup.d.ts +1 -1
  80. package/lib/checkbox-group/index.d.ts +1 -1
  81. package/lib/collapse/Collapse.d.ts +1 -1
  82. package/lib/collapse/index.d.ts +1 -1
  83. package/lib/composables/use-touch.d.ts +1 -0
  84. package/lib/composables/use-touch.js +8 -1
  85. package/lib/config-provider/types.d.ts +1 -1
  86. package/lib/date-time-picker/DateTimePicker.d.ts +1 -1
  87. package/lib/date-time-picker/DateTimePickerWrapper.d.ts +1 -1
  88. package/lib/date-time-picker/index.d.ts +1 -1
  89. package/lib/dropdown-item/DropdownItem.d.ts +1 -1
  90. package/lib/dropdown-item/index.d.ts +1 -1
  91. package/lib/field/Field.d.ts +17 -2
  92. package/lib/field/index.d.ts +12 -2
  93. package/lib/floating-bubble/FloatingBubble.d.ts +81 -0
  94. package/lib/floating-bubble/FloatingBubble.js +210 -0
  95. package/lib/floating-bubble/index.css +1 -0
  96. package/lib/floating-bubble/index.d.ts +63 -0
  97. package/lib/floating-bubble/index.js +39 -0
  98. package/lib/floating-bubble/style/index.d.ts +1 -0
  99. package/lib/floating-bubble/style/index.js +4 -0
  100. package/lib/floating-bubble/types.d.ts +20 -0
  101. package/lib/floating-bubble/types.js +15 -0
  102. package/lib/hierarchy-select/HierarchySelect.js +1 -0
  103. package/lib/index-bar/IndexBar.js +27 -19
  104. package/lib/index-bar/index.css +1 -1
  105. package/lib/index-bar/types.d.ts +1 -0
  106. package/lib/index.css +1 -1
  107. package/lib/index.d.ts +2 -1
  108. package/lib/index.js +4 -1
  109. package/lib/lazyload/vue-lazyload/index.d.ts +55 -55
  110. package/lib/number-keyboard/NumberKeyboard.d.ts +1 -1
  111. package/lib/number-keyboard/index.d.ts +1 -1
  112. package/lib/picker/Picker.d.ts +1 -1
  113. package/lib/picker/index.d.ts +1 -1
  114. package/lib/pull-refresh/PullRefresh.d.ts +1 -1
  115. package/lib/pull-refresh/index.d.ts +1 -1
  116. package/lib/radio-group/RadioGroup.d.ts +1 -1
  117. package/lib/radio-group/index.d.ts +1 -1
  118. package/lib/radio-picker/RadioPicker.d.ts +1 -1
  119. package/lib/radio-picker/index.d.ts +1 -1
  120. package/lib/rate/Rate.d.ts +1 -1
  121. package/lib/rate/index.d.ts +1 -1
  122. package/lib/search/Search.d.ts +2 -2
  123. package/lib/search/index.d.ts +2 -2
  124. package/lib/stepper/Stepper.d.ts +1 -1
  125. package/lib/stepper/index.d.ts +1 -1
  126. package/lib/switch/Switch.d.ts +1 -1
  127. package/lib/switch/index.d.ts +1 -1
  128. package/lib/tabbar/Tabbar.d.ts +1 -1
  129. package/lib/tabbar/index.d.ts +1 -1
  130. package/lib/tabbar-item/index.css +1 -1
  131. package/lib/time-picker/TimePicker.d.ts +1 -1
  132. package/lib/time-picker/index.d.ts +1 -1
  133. package/lib/utils/closest.d.ts +1 -0
  134. package/lib/utils/closest.js +27 -0
  135. package/lib/utils/constant.d.ts +1 -0
  136. package/lib/utils/constant.js +3 -1
  137. package/lib/utils/index.d.ts +1 -0
  138. package/lib/utils/index.js +1 -0
  139. package/lib/vue-sfc-shim.d.ts +6 -6
  140. package/lib/vue-tsx-shim.d.ts +23 -23
  141. package/lib/web-types.json +1 -1
  142. package/lib/zartui.cjs.js +698 -478
  143. package/lib/zartui.es.js +698 -478
  144. package/lib/zartui.js +698 -478
  145. package/lib/zartui.min.js +1 -1
  146. package/package.json +6 -5
@@ -44,7 +44,7 @@ declare const _default: import("vue").DefineComponent<{
44
44
  type: PropType<boolean | null>;
45
45
  default: null;
46
46
  };
47
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
47
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
48
48
  name: PropType<unknown>;
49
49
  shape: {
50
50
  type: PropType<import("./Checker").CheckerShape>;
@@ -19,7 +19,7 @@ export declare const Checkbox: import("../utils").WithInstall<import("vue").Defi
19
19
  type: import("vue").PropType<boolean | null>;
20
20
  default: null;
21
21
  };
22
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
23
23
  name: import("vue").PropType<unknown>;
24
24
  shape: {
25
25
  type: import("vue").PropType<import("./Checker").CheckerShape>;
@@ -30,7 +30,7 @@ declare const _default: import("vue").DefineComponent<{
30
30
  default: () => unknown[];
31
31
  };
32
32
  checkedColor: StringConstructor;
33
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
33
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
34
34
  max: (NumberConstructor | StringConstructor)[];
35
35
  disabled: BooleanConstructor;
36
36
  iconSize: (NumberConstructor | StringConstructor)[];
@@ -11,7 +11,7 @@ export declare const CheckboxGroup: import("../utils").WithInstall<import("vue")
11
11
  default: () => unknown[];
12
12
  };
13
13
  checkedColor: StringConstructor;
14
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
14
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
15
15
  max: (NumberConstructor | StringConstructor)[];
16
16
  disabled: BooleanConstructor;
17
17
  iconSize: (NumberConstructor | StringConstructor)[];
@@ -34,7 +34,7 @@ declare const _default: import("vue").DefineComponent<{
34
34
  type: PropType<Numeric | Numeric[]>;
35
35
  default: string;
36
36
  };
37
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
37
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
38
38
  border: {
39
39
  type: BooleanConstructor;
40
40
  default: true;
@@ -8,7 +8,7 @@ export declare const Collapse: import("../utils").WithInstall<import("vue").Defi
8
8
  type: import("vue").PropType<import("../utils").Numeric | import("../utils").Numeric[]>;
9
9
  default: string;
10
10
  };
11
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
11
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
12
12
  border: {
13
13
  type: BooleanConstructor;
14
14
  default: true;
@@ -12,5 +12,6 @@ export declare function useTouch(): {
12
12
  direction: import("vue").Ref<Direction>;
13
13
  isVertical: () => boolean;
14
14
  isHorizontal: () => boolean;
15
+ isTap: import("vue").Ref<boolean>;
15
16
  };
16
17
  export {};
@@ -21,6 +21,7 @@ __export(stdin_exports, {
21
21
  });
22
22
  module.exports = __toCommonJS(stdin_exports);
23
23
  var import_vue = require("vue");
24
+ var import_utils = require("../utils");
24
25
  function getDirection(x, y) {
25
26
  if (x > y) {
26
27
  return "horizontal";
@@ -38,6 +39,7 @@ function useTouch() {
38
39
  const offsetX = (0, import_vue.ref)(0);
39
40
  const offsetY = (0, import_vue.ref)(0);
40
41
  const direction = (0, import_vue.ref)("");
42
+ const isTap = (0, import_vue.ref)(true);
41
43
  const isVertical = () => direction.value === "vertical";
42
44
  const isHorizontal = () => direction.value === "horizontal";
43
45
  const reset = () => {
@@ -46,6 +48,7 @@ function useTouch() {
46
48
  offsetX.value = 0;
47
49
  offsetY.value = 0;
48
50
  direction.value = "";
51
+ isTap.value = true;
49
52
  };
50
53
  const start = (event) => {
51
54
  reset();
@@ -62,6 +65,9 @@ function useTouch() {
62
65
  if (!direction.value || offsetX.value < LOCK_DIRECTION_DISTANCE && offsetY.value < LOCK_DIRECTION_DISTANCE) {
63
66
  direction.value = getDirection(offsetX.value, offsetY.value);
64
67
  }
68
+ if (isTap.value && (offsetX.value > import_utils.TAP_OFFSET || offsetY.value > import_utils.TAP_OFFSET)) {
69
+ isTap.value = false;
70
+ }
65
71
  };
66
72
  return {
67
73
  move,
@@ -75,6 +81,7 @@ function useTouch() {
75
81
  offsetY,
76
82
  direction,
77
83
  isVertical,
78
- isHorizontal
84
+ isHorizontal,
85
+ isTap
79
86
  };
80
87
  }
@@ -135,4 +135,4 @@ export type BaseThemeVars = {
135
135
  radiusGt?: string;
136
136
  radiusMax?: string;
137
137
  };
138
- export type ConfigProviderThemeVars = BaseThemeVars & import('../action-sheet').ActionSheetThemeVars & import('../avatar').AvatarThemeVars & import('../badge').BadgeThemeVars & import('../button').ButtonThemeVars & import('../calendar').CalendarThemeVars & import('../cascader').CascaderThemeVars & import('../cell').CellThemeVars & import('../checkbox').CheckboxThemeVars & import('../collapse-item').CollapseItemThemeVars & import('../dialog').DialogThemeVars & import('../divider').DividerThemeVars & import('../dropdown-item').DropdownItemThemeVars & import('../dropdown-menu').DropdownMenuThemeVars & import('../empty').EmptyThemeVars & import('../field').FieldThemeVars & import('../grid-item').GridItemThemeVars & import('../hierarchy-select').HierarchySelectThemeVars & import('../image').ImageThemeVars & import('../image-preview').ImagePreviewThemeVars & import('../index-anchor').IndexAnchorThemeVars & import('../index-bar').IndexBarThemeVars & import('../list').ListThemeVars & import('../loading').LoadingThemeVars & import('../media-picker').MediaPickerThemeVars & import('../multiple-picker').MultiplePickerThemeVars & import('../nav-bar').NavBarThemeVars & import('../notice-bar').NoticeBarThemeVars & import('../notify').NotifyThemeVars & import('../number-keyboard').NumberKeyboardThemeVars & import('../overlay').OverlayThemeVars & import('../password-input').PasswordInputThemeVars & import('../picker').PickerThemeVars & import('../popover').PopoverThemeVars & import('../popup').PopupThemeVars & import('../pull-refresh').PullRefreshThemeVars & import('../radio').RadioThemeVars & import('../radio-picker').RadioPickerThemeVars & import('../rate').RateThemeVars & import('../search').SearchThemeVars & import('../signature').SignatureThemeVars & import('../skeleton').SkeletonThemeVars & import('../step').StepThemeVars & import('../stepper').StepperThemeVars & import('../steps').StepsThemeVars & import('../sticky').StickyThemeVars & import('../swipe').SwipeThemeVars & import('../switch').SwitchThemeVars & import('../tabbar').TabbarThemeVars & import('../tabbar-item').TabbarItemThemeVars & import('../table').TableThemeVars & import('../tabs').TabsThemeVars & import('../tag').TagThemeVars & import('../text-ellipsis').TextEllipsisThemeVars & import('../time-picker').TimePickerThemeVars & import('../timeline').TimelineThemeVars & import('../toast').ToastThemeVars & import('../uploader').UploaderThemeVars;
138
+ export type ConfigProviderThemeVars = BaseThemeVars & import('../action-sheet').ActionSheetThemeVars & import('../avatar').AvatarThemeVars & import('../badge').BadgeThemeVars & import('../button').ButtonThemeVars & import('../calendar').CalendarThemeVars & import('../cascader').CascaderThemeVars & import('../cell').CellThemeVars & import('../checkbox').CheckboxThemeVars & import('../collapse-item').CollapseItemThemeVars & import('../dialog').DialogThemeVars & import('../divider').DividerThemeVars & import('../dropdown-item').DropdownItemThemeVars & import('../dropdown-menu').DropdownMenuThemeVars & import('../empty').EmptyThemeVars & import('../field').FieldThemeVars & import('../floating-bubble').FloatingBubbleThemeVars & import('../grid-item').GridItemThemeVars & import('../hierarchy-select').HierarchySelectThemeVars & import('../image').ImageThemeVars & import('../image-preview').ImagePreviewThemeVars & import('../index-anchor').IndexAnchorThemeVars & import('../index-bar').IndexBarThemeVars & import('../list').ListThemeVars & import('../loading').LoadingThemeVars & import('../media-picker').MediaPickerThemeVars & import('../multiple-picker').MultiplePickerThemeVars & import('../nav-bar').NavBarThemeVars & import('../notice-bar').NoticeBarThemeVars & import('../notify').NotifyThemeVars & import('../number-keyboard').NumberKeyboardThemeVars & import('../overlay').OverlayThemeVars & import('../password-input').PasswordInputThemeVars & import('../picker').PickerThemeVars & import('../popover').PopoverThemeVars & import('../popup').PopupThemeVars & import('../pull-refresh').PullRefreshThemeVars & import('../radio').RadioThemeVars & import('../radio-picker').RadioPickerThemeVars & import('../rate').RateThemeVars & import('../search').SearchThemeVars & import('../signature').SignatureThemeVars & import('../skeleton').SkeletonThemeVars & import('../step').StepThemeVars & import('../stepper').StepperThemeVars & import('../steps').StepsThemeVars & import('../sticky').StickyThemeVars & import('../swipe').SwipeThemeVars & import('../switch').SwitchThemeVars & import('../tabbar').TabbarThemeVars & import('../tabbar-item').TabbarItemThemeVars & import('../table').TableThemeVars & import('../tabs').TabsThemeVars & import('../tag').TagThemeVars & import('../text-ellipsis').TextEllipsisThemeVars & import('../time-picker').TimePickerThemeVars & import('../timeline').TimelineThemeVars & import('../toast').ToastThemeVars & import('../uploader').UploaderThemeVars;
@@ -102,7 +102,7 @@ declare const _default: import("vue").DefineComponent<{
102
102
  type: import("vue").PropType<string[]>;
103
103
  default: () => string[];
104
104
  };
105
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "change" | "update:show" | "confirm" | "startChange" | "endChange" | "update:startValue" | "update:endValue")[], "update:modelValue" | "cancel" | "change" | "update:show" | "confirm" | "startChange" | "endChange" | "update:startValue" | "update:endValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
105
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "change" | "update:modelValue" | "update:show" | "confirm" | "startChange" | "endChange" | "update:startValue" | "update:endValue")[], "cancel" | "change" | "update:modelValue" | "update:show" | "confirm" | "startChange" | "endChange" | "update:startValue" | "update:endValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
106
106
  loading: BooleanConstructor;
107
107
  readonly: BooleanConstructor;
108
108
  allowHtml: BooleanConstructor;
@@ -201,7 +201,7 @@ declare const _default: import("vue").DefineComponent<{
201
201
  type: PropType<string[]>;
202
202
  default: () => string[];
203
203
  };
204
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
204
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
205
205
  loading: BooleanConstructor;
206
206
  readonly: BooleanConstructor;
207
207
  allowHtml: BooleanConstructor;
@@ -99,7 +99,7 @@ export declare const DateTimePicker: import("../utils").WithInstall<import("vue"
99
99
  type: import("vue").PropType<string[]>;
100
100
  default: () => string[];
101
101
  };
102
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "cancel" | "change" | "update:show" | "confirm" | "startChange" | "endChange" | "update:startValue" | "update:endValue")[], "update:modelValue" | "cancel" | "change" | "update:show" | "confirm" | "startChange" | "endChange" | "update:startValue" | "update:endValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
102
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "change" | "update:modelValue" | "update:show" | "confirm" | "startChange" | "endChange" | "update:startValue" | "update:endValue")[], "cancel" | "change" | "update:modelValue" | "update:show" | "confirm" | "startChange" | "endChange" | "update:startValue" | "update:endValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
103
103
  loading: BooleanConstructor;
104
104
  readonly: BooleanConstructor;
105
105
  allowHtml: BooleanConstructor;
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<{
40
40
  };
41
41
  titleClass: PropType<unknown>;
42
42
  multiSelect: BooleanConstructor;
43
- }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("reset" | "open" | "update:modelValue" | "change" | "close" | "opened" | "closed" | "confirm")[], "reset" | "open" | "update:modelValue" | "change" | "close" | "opened" | "closed" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
43
+ }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("reset" | "open" | "change" | "close" | "update:modelValue" | "opened" | "closed" | "confirm")[], "reset" | "open" | "change" | "close" | "update:modelValue" | "opened" | "closed" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
44
44
  title: StringConstructor;
45
45
  options: {
46
46
  type: PropType<DropdownItemOption[]>;
@@ -18,7 +18,7 @@ export declare const DropdownItem: import("../utils").WithInstall<import("vue").
18
18
  };
19
19
  titleClass: import("vue").PropType<unknown>;
20
20
  multiSelect: BooleanConstructor;
21
- }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("reset" | "open" | "update:modelValue" | "change" | "close" | "opened" | "closed" | "confirm")[], "reset" | "open" | "update:modelValue" | "change" | "close" | "opened" | "closed" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
21
+ }, (() => JSX.Element) | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("reset" | "open" | "change" | "close" | "update:modelValue" | "opened" | "closed" | "confirm")[], "reset" | "open" | "change" | "close" | "update:modelValue" | "opened" | "closed" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
22
  title: StringConstructor;
23
23
  options: {
24
24
  type: import("vue").PropType<import("./types").DropdownItemOption[]>;
@@ -74,6 +74,11 @@ declare const fieldProps: {
74
74
  type: PropType<boolean | null>;
75
75
  default: null;
76
76
  };
77
+ clearable: BooleanConstructor;
78
+ clearIcon: {
79
+ type: PropType<string>;
80
+ default: string;
81
+ };
77
82
  } & {
78
83
  id: StringConstructor;
79
84
  name: StringConstructor;
@@ -171,6 +176,11 @@ declare const _default: import("vue").DefineComponent<{
171
176
  type: PropType<boolean | null>;
172
177
  default: null;
173
178
  };
179
+ clearable: BooleanConstructor;
180
+ clearIcon: {
181
+ type: PropType<string>;
182
+ default: string;
183
+ };
174
184
  } & {
175
185
  id: StringConstructor;
176
186
  name: StringConstructor;
@@ -236,7 +246,7 @@ declare const _default: import("vue").DefineComponent<{
236
246
  type: BooleanConstructor;
237
247
  default: null;
238
248
  };
239
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue")[], "clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
249
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "blur" | "focus" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue")[], "clear" | "blur" | "focus" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
240
250
  leftIcon: StringConstructor;
241
251
  titleIcon: StringConstructor;
242
252
  title: (NumberConstructor | StringConstructor)[];
@@ -266,6 +276,11 @@ declare const _default: import("vue").DefineComponent<{
266
276
  type: PropType<boolean | null>;
267
277
  default: null;
268
278
  };
279
+ clearable: BooleanConstructor;
280
+ clearIcon: {
281
+ type: PropType<string>;
282
+ default: string;
283
+ };
269
284
  } & {
270
285
  id: StringConstructor;
271
286
  name: StringConstructor;
@@ -355,10 +370,10 @@ declare const _default: import("vue").DefineComponent<{
355
370
  clickable: boolean | null;
356
371
  clearable: boolean;
357
372
  clearIcon: string;
373
+ error: boolean;
358
374
  modelValue: string | number;
359
375
  clearTrigger: FieldClearTrigger;
360
376
  formatTrigger: FieldFormatTrigger;
361
- error: boolean;
362
377
  readonly: boolean;
363
378
  showWordLimit: boolean;
364
379
  description: string;
@@ -29,6 +29,11 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
29
29
  type: import("vue").PropType<boolean | null>;
30
30
  default: null;
31
31
  };
32
+ clearable: BooleanConstructor;
33
+ clearIcon: {
34
+ type: import("vue").PropType<string>;
35
+ default: string;
36
+ };
32
37
  } & {
33
38
  id: StringConstructor;
34
39
  name: StringConstructor;
@@ -94,7 +99,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
94
99
  type: BooleanConstructor;
95
100
  default: null;
96
101
  };
97
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue")[], "clear" | "focus" | "blur" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
102
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("clear" | "blur" | "focus" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue")[], "clear" | "blur" | "focus" | "keypress" | "clickInput" | "endValidate" | "startValidate" | "clickLeftIcon" | "clickRightIcon" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
98
103
  leftIcon: StringConstructor;
99
104
  titleIcon: StringConstructor;
100
105
  title: (NumberConstructor | StringConstructor)[];
@@ -124,6 +129,11 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
124
129
  type: import("vue").PropType<boolean | null>;
125
130
  default: null;
126
131
  };
132
+ clearable: BooleanConstructor;
133
+ clearIcon: {
134
+ type: import("vue").PropType<string>;
135
+ default: string;
136
+ };
127
137
  } & {
128
138
  id: StringConstructor;
129
139
  name: StringConstructor;
@@ -213,10 +223,10 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
213
223
  clickable: boolean | null;
214
224
  clearable: boolean;
215
225
  clearIcon: string;
226
+ error: boolean;
216
227
  modelValue: string | number;
217
228
  clearTrigger: import("./types").FieldClearTrigger;
218
229
  formatTrigger: import("./types").FieldFormatTrigger;
219
- error: boolean;
220
230
  readonly: boolean;
221
231
  showWordLimit: boolean;
222
232
  description: string;
@@ -0,0 +1,81 @@
1
+ import { PropType, type ExtractPropTypes } from 'vue';
2
+ import { FloatingBubbleAxis, FloatingBubbleMagnetic, FloatingBubbleOffset } from './types';
3
+ export declare const floatingBubbleProps: {
4
+ gap: {
5
+ type: NumberConstructor;
6
+ default: number;
7
+ };
8
+ icon: StringConstructor;
9
+ axis: {
10
+ type: PropType<FloatingBubbleAxis>;
11
+ default: FloatingBubbleAxis;
12
+ };
13
+ magnetic: PropType<FloatingBubbleMagnetic>;
14
+ offset: {
15
+ type: PropType<FloatingBubbleOffset>;
16
+ default: () => {
17
+ x: number;
18
+ y: number;
19
+ };
20
+ };
21
+ teleport: {
22
+ type: PropType<string | import("vue").RendererElement | null | undefined>;
23
+ default: string;
24
+ };
25
+ };
26
+ export type FloatingBubbleProps = ExtractPropTypes<typeof floatingBubbleProps>;
27
+ declare const _default: import("vue").DefineComponent<{
28
+ gap: {
29
+ type: NumberConstructor;
30
+ default: number;
31
+ };
32
+ icon: StringConstructor;
33
+ axis: {
34
+ type: PropType<FloatingBubbleAxis>;
35
+ default: FloatingBubbleAxis;
36
+ };
37
+ magnetic: PropType<FloatingBubbleMagnetic>;
38
+ offset: {
39
+ type: PropType<FloatingBubbleOffset>;
40
+ default: () => {
41
+ x: number;
42
+ y: number;
43
+ };
44
+ };
45
+ teleport: {
46
+ type: PropType<string | import("vue").RendererElement | null | undefined>;
47
+ default: string;
48
+ };
49
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "update:offset" | "offsetChange")[], "click" | "update:offset" | "offsetChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
50
+ gap: {
51
+ type: NumberConstructor;
52
+ default: number;
53
+ };
54
+ icon: StringConstructor;
55
+ axis: {
56
+ type: PropType<FloatingBubbleAxis>;
57
+ default: FloatingBubbleAxis;
58
+ };
59
+ magnetic: PropType<FloatingBubbleMagnetic>;
60
+ offset: {
61
+ type: PropType<FloatingBubbleOffset>;
62
+ default: () => {
63
+ x: number;
64
+ y: number;
65
+ };
66
+ };
67
+ teleport: {
68
+ type: PropType<string | import("vue").RendererElement | null | undefined>;
69
+ default: string;
70
+ };
71
+ }>> & {
72
+ onClick?: ((...args: any[]) => any) | undefined;
73
+ "onUpdate:offset"?: ((...args: any[]) => any) | undefined;
74
+ onOffsetChange?: ((...args: any[]) => any) | undefined;
75
+ }, {
76
+ offset: FloatingBubbleOffset;
77
+ teleport: string | import("vue").RendererElement | null | undefined;
78
+ gap: number;
79
+ axis: FloatingBubbleAxis;
80
+ }, {}>;
81
+ export default _default;
@@ -0,0 +1,210 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name2 in all)
9
+ __defProp(target, name2, { get: all[name2], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var stdin_exports = {};
29
+ __export(stdin_exports, {
30
+ default: () => stdin_default,
31
+ floatingBubbleProps: () => floatingBubbleProps
32
+ });
33
+ module.exports = __toCommonJS(stdin_exports);
34
+ var import_vue = require("vue");
35
+ var import_vue2 = require("vue");
36
+ var import_utils = require("../utils");
37
+ var import_use = require("@zartui/use");
38
+ var import_use_touch = require("../composables/use-touch");
39
+ var import_icon = __toESM(require("../icon"));
40
+ const floatingBubbleProps = {
41
+ gap: (0, import_utils.makeNumberProp)(24),
42
+ icon: String,
43
+ axis: (0, import_utils.makeStringProp)("y"),
44
+ magnetic: String,
45
+ offset: {
46
+ type: Object,
47
+ default: () => ({
48
+ x: -1,
49
+ y: -1
50
+ })
51
+ },
52
+ teleport: {
53
+ type: [String, Object],
54
+ default: "body"
55
+ }
56
+ };
57
+ const [name, bem] = (0, import_utils.createNamespace)("floating-bubble");
58
+ var stdin_default = (0, import_vue2.defineComponent)({
59
+ name,
60
+ inheritAttrs: false,
61
+ props: floatingBubbleProps,
62
+ emits: ["click", "update:offset", "offsetChange"],
63
+ setup(props, {
64
+ slots,
65
+ emit,
66
+ attrs
67
+ }) {
68
+ const rootRef = (0, import_vue2.ref)();
69
+ const state = (0, import_vue2.ref)({
70
+ x: 0,
71
+ y: 0,
72
+ width: 0,
73
+ height: 0
74
+ });
75
+ const boundary = (0, import_vue2.computed)(() => ({
76
+ top: props.gap,
77
+ right: import_utils.windowWidth.value - state.value.width - props.gap,
78
+ bottom: import_utils.windowHeight.value - state.value.height - props.gap,
79
+ left: props.gap
80
+ }));
81
+ const dragging = (0, import_vue2.ref)(false);
82
+ let initialized = false;
83
+ const rootStyle = (0, import_vue2.computed)(() => {
84
+ const style = {};
85
+ const x = (0, import_utils.addUnit)(state.value.x);
86
+ const y = (0, import_utils.addUnit)(state.value.y);
87
+ style.transform = `translate3d(${x}, ${y}, 0)`;
88
+ if (dragging.value || !initialized) {
89
+ style.transition = "none";
90
+ }
91
+ return style;
92
+ });
93
+ const updateState = () => {
94
+ if (!show.value)
95
+ return;
96
+ const {
97
+ width,
98
+ height
99
+ } = (0, import_use.useRect)(rootRef.value);
100
+ const {
101
+ offset
102
+ } = props;
103
+ state.value = {
104
+ x: offset.x > -1 ? offset.x : import_utils.windowWidth.value - width - props.gap,
105
+ y: offset.y > -1 ? offset.y : import_utils.windowHeight.value - height - props.gap,
106
+ width,
107
+ height
108
+ };
109
+ };
110
+ const touch = (0, import_use_touch.useTouch)();
111
+ let prevX = 0;
112
+ let prevY = 0;
113
+ const onTouchStart = (e) => {
114
+ touch.start(e);
115
+ dragging.value = true;
116
+ prevX = state.value.x;
117
+ prevY = state.value.y;
118
+ };
119
+ const onTouchMove = (e) => {
120
+ e.preventDefault();
121
+ touch.move(e);
122
+ if (props.axis === "lock")
123
+ return;
124
+ if (!touch.isTap.value) {
125
+ if (props.axis === "x" || props.axis === "xy") {
126
+ let nextX = prevX + touch.deltaX.value;
127
+ if (nextX < boundary.value.left)
128
+ nextX = boundary.value.left;
129
+ if (nextX > boundary.value.right)
130
+ nextX = boundary.value.right;
131
+ state.value.x = nextX;
132
+ }
133
+ if (props.axis === "y" || props.axis === "xy") {
134
+ let nextY = prevY + touch.deltaY.value;
135
+ if (nextY < boundary.value.top)
136
+ nextY = boundary.value.top;
137
+ if (nextY > boundary.value.bottom)
138
+ nextY = boundary.value.bottom;
139
+ state.value.y = nextY;
140
+ }
141
+ const offset = (0, import_utils.pick)(state.value, ["x", "y"]);
142
+ emit("update:offset", offset);
143
+ }
144
+ };
145
+ (0, import_use.useEventListener)("touchmove", onTouchMove, {
146
+ target: rootRef
147
+ });
148
+ const onTouchEnd = () => {
149
+ dragging.value = false;
150
+ (0, import_vue2.nextTick)(() => {
151
+ if (props.magnetic === "x") {
152
+ const nextX = (0, import_utils.closest)([boundary.value.left, boundary.value.right], state.value.x);
153
+ state.value.x = nextX;
154
+ }
155
+ if (props.magnetic === "y") {
156
+ const nextY = (0, import_utils.closest)([boundary.value.top, boundary.value.bottom], state.value.y);
157
+ state.value.y = nextY;
158
+ }
159
+ if (!touch.isTap.value) {
160
+ const offset = (0, import_utils.pick)(state.value, ["x", "y"]);
161
+ emit("update:offset", offset);
162
+ if (prevX !== offset.x || prevY !== offset.y) {
163
+ emit("offsetChange", offset);
164
+ }
165
+ }
166
+ });
167
+ };
168
+ const onClick = (e) => {
169
+ if (touch.isTap.value)
170
+ emit("click", e);
171
+ else
172
+ e.stopPropagation();
173
+ };
174
+ (0, import_vue2.onMounted)(() => {
175
+ updateState();
176
+ (0, import_vue2.nextTick)(() => {
177
+ initialized = true;
178
+ });
179
+ });
180
+ (0, import_vue2.watch)([import_utils.windowWidth, import_utils.windowHeight, () => props.gap, () => props.offset], updateState);
181
+ const show = (0, import_vue2.ref)(true);
182
+ (0, import_vue2.onActivated)(() => {
183
+ show.value = true;
184
+ });
185
+ (0, import_vue2.onDeactivated)(() => {
186
+ if (props.teleport) {
187
+ show.value = false;
188
+ }
189
+ });
190
+ return () => {
191
+ const Content = (0, import_vue.withDirectives)((0, import_vue.createVNode)("div", (0, import_vue.mergeProps)({
192
+ "class": bem(),
193
+ "ref": rootRef,
194
+ "onTouchstartPassive": onTouchStart,
195
+ "onTouchend": onTouchEnd,
196
+ "onTouchcancel": onTouchEnd,
197
+ "onClick": onClick,
198
+ "style": rootStyle.value
199
+ }, attrs), [slots.default ? slots.default() : (0, import_vue.createVNode)(import_icon.default, {
200
+ "name": props.icon,
201
+ "class": bem("icon")
202
+ }, null)]), [[import_vue.vShow, show.value]]);
203
+ return props.teleport ? (0, import_vue.createVNode)(import_vue2.Teleport, {
204
+ "to": props.teleport
205
+ }, {
206
+ default: () => [Content]
207
+ }) : Content;
208
+ };
209
+ }
210
+ });
@@ -0,0 +1 @@
1
+ :root{--zt-floating-bubble-size: 48px;--zt-floating-bubble-initial-gap: 24px;--zt-floating-bubble-icon-size: 28px;--zt-floating-bubble-background: var(--zt-primary-color);--zt-floating-bubble-color: var(--zt-background-2);--zt-floating-bubble-z-index: 999;--zt-floating-bubble-border-radius: var(--zt-radius-max)}.zt-floating-bubble{position:fixed;left:0;top:0;right:var(--zt-floating-bubble-initial-gap);bottom:var(--zt-floating-bubble-initial-gap);width:var(--zt-floating-bubble-size);height:var(--zt-floating-bubble-size);box-sizing:border-box;display:flex;justify-content:center;align-items:center;overflow:hidden;cursor:pointer;touch-action:none;background:var(--zt-floating-bubble-background);color:var(--zt-floating-bubble-color);border-radius:var(--zt-floating-bubble-border-radius);z-index:var(--zt-floating-bubble-z-index);transition:transform var(--zt-duration-base);-webkit-user-select:none;user-select:none}.zt-floating-bubble:active{opacity:.7}.zt-floating-bubble__icon{font-size:var(--zt-floating-bubble-icon-size)}