zartui 3.1.11 → 3.1.13

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 (258) hide show
  1. package/README.md +23 -23
  2. package/es/action-sheet/index.css +1 -1
  3. package/es/avatar/index.css +1 -1
  4. package/es/badge/index.css +1 -1
  5. package/es/button/index.css +1 -1
  6. package/es/calendar/index.css +1 -1
  7. package/es/calendar/utils.d.ts +2 -2
  8. package/es/cascader/Cascader.d.ts +1 -1
  9. package/es/cascader/index.css +1 -1
  10. package/es/cascader/index.d.ts +1 -1
  11. package/es/cell/Cell.d.ts +34 -0
  12. package/es/cell/Cell.mjs +61 -8
  13. package/es/cell/index.css +1 -1
  14. package/es/cell/index.d.ts +17 -0
  15. package/es/cell/style/index.mjs +1 -0
  16. package/es/cell-group/index.css +1 -1
  17. package/es/checkbox/Checkbox.d.ts +1 -1
  18. package/es/checkbox/index.d.ts +1 -1
  19. package/es/checkbox-group/CheckboxGroup.d.ts +1 -1
  20. package/es/checkbox-group/index.d.ts +1 -1
  21. package/es/collapse/Collapse.d.ts +1 -1
  22. package/es/collapse/index.d.ts +1 -1
  23. package/es/collapse-item/index.css +1 -1
  24. package/es/composables/use-touch.d.ts +1 -0
  25. package/es/composables/use-touch.mjs +8 -1
  26. package/es/config-provider/types.d.ts +1 -1
  27. package/es/date-time-picker/DateTimePicker.d.ts +1 -1
  28. package/es/date-time-picker/DateTimePickerWrapper.d.ts +1 -1
  29. package/es/date-time-picker/index.d.ts +1 -1
  30. package/es/dialog/index.css +1 -1
  31. package/es/divider/index.css +1 -1
  32. package/es/drawer-select/DrawerSelect.d.ts +68 -0
  33. package/es/drawer-select/DrawerSelect.mjs +360 -0
  34. package/es/drawer-select/index.css +1 -0
  35. package/es/drawer-select/index.d.ts +53 -0
  36. package/es/drawer-select/index.mjs +8 -0
  37. package/es/drawer-select/style/index.d.ts +1 -0
  38. package/es/drawer-select/style/index.mjs +15 -0
  39. package/es/drawer-select/types.d.ts +26 -0
  40. package/es/drawer-select/types.mjs +0 -0
  41. package/es/dropdown-item/DropdownItem.d.ts +1 -1
  42. package/es/dropdown-item/index.d.ts +1 -1
  43. package/es/dropdown-item/style/index.mjs +2 -1
  44. package/es/dropdown-menu/DropdownMenu.mjs +3 -0
  45. package/es/dropdown-menu/index.css +1 -1
  46. package/es/field/Field.d.ts +27 -3
  47. package/es/field/Field.mjs +11 -3
  48. package/es/field/index.css +1 -1
  49. package/es/field/index.d.ts +19 -3
  50. package/es/floating-bubble/FloatingBubble.d.ts +81 -0
  51. package/es/floating-bubble/FloatingBubble.mjs +181 -0
  52. package/es/floating-bubble/index.css +1 -0
  53. package/es/floating-bubble/index.d.ts +63 -0
  54. package/es/floating-bubble/index.mjs +10 -0
  55. package/es/floating-bubble/style/index.d.ts +1 -0
  56. package/es/floating-bubble/style/index.mjs +4 -0
  57. package/es/floating-bubble/types.d.ts +20 -0
  58. package/es/floating-bubble/types.mjs +0 -0
  59. package/es/hierarchy-select/index.css +1 -1
  60. package/es/image/index.css +1 -1
  61. package/es/image-preview/index.css +1 -1
  62. package/es/index.d.ts +3 -1
  63. package/es/index.mjs +7 -1
  64. package/es/lazyload/vue-lazyload/index.d.ts +55 -55
  65. package/es/media-picker/index.css +1 -1
  66. package/es/media-picker/watermark/image-processor.mjs +2 -2
  67. package/es/media-player/index.css +1 -1
  68. package/es/multiple-picker/index.css +1 -1
  69. package/es/nav-bar/NavBar.d.ts +1 -1
  70. package/es/nav-bar/index.d.ts +1 -1
  71. package/es/notice-bar/index.css +1 -1
  72. package/es/number-keyboard/NumberKeyboard.d.ts +1 -1
  73. package/es/number-keyboard/index.css +1 -1
  74. package/es/number-keyboard/index.d.ts +1 -1
  75. package/es/password-input/index.css +1 -1
  76. package/es/picker/Picker.d.ts +1 -1
  77. package/es/picker/index.css +1 -1
  78. package/es/picker/index.d.ts +1 -1
  79. package/es/popover/index.css +1 -1
  80. package/es/popup/index.css +1 -1
  81. package/es/pull-refresh/PullRefresh.d.ts +1 -1
  82. package/es/pull-refresh/index.d.ts +1 -1
  83. package/es/radio-group/RadioGroup.d.ts +1 -1
  84. package/es/radio-group/index.d.ts +1 -1
  85. package/es/radio-picker/RadioPicker.d.ts +1 -1
  86. package/es/radio-picker/index.css +1 -1
  87. package/es/radio-picker/index.d.ts +1 -1
  88. package/es/radio-picker/style/index.mjs +3 -3
  89. package/es/rate/Rate.d.ts +1 -1
  90. package/es/rate/index.d.ts +1 -1
  91. package/es/search/Search.d.ts +2 -2
  92. package/es/search/index.css +1 -1
  93. package/es/search/index.d.ts +2 -2
  94. package/es/step/index.css +1 -1
  95. package/es/stepper/Stepper.d.ts +1 -1
  96. package/es/stepper/index.css +1 -1
  97. package/es/stepper/index.d.ts +1 -1
  98. package/es/steps/index.css +1 -1
  99. package/es/style/base.css +1 -1
  100. package/es/style/css-variables.css +1 -1
  101. package/es/switch/Switch.d.ts +1 -1
  102. package/es/switch/index.d.ts +1 -1
  103. package/es/tabbar/Tabbar.d.ts +2 -2
  104. package/es/tabbar/index.css +1 -1
  105. package/es/tabbar/index.d.ts +2 -2
  106. package/es/tabbar-item/index.css +1 -1
  107. package/es/tabs/Tabs.mjs +4 -2
  108. package/es/tabs/TabsTitle.mjs +16 -6
  109. package/es/tabs/index.css +1 -1
  110. package/es/tag/index.css +1 -1
  111. package/es/text-ellipsis/TextEllipsis.mjs +2 -0
  112. package/es/time-picker/TimePicker.d.ts +1 -1
  113. package/es/time-picker/index.css +1 -1
  114. package/es/time-picker/index.d.ts +1 -1
  115. package/es/timeline/index.css +1 -1
  116. package/es/uploader/index.css +1 -1
  117. package/es/utils/closest.d.ts +1 -0
  118. package/es/utils/closest.mjs +8 -0
  119. package/es/utils/constant.d.ts +1 -1
  120. package/es/utils/constant.mjs +3 -3
  121. package/es/utils/index.d.ts +1 -0
  122. package/es/utils/index.mjs +1 -0
  123. package/es/utils/validate.d.ts +2 -1
  124. package/es/utils/validate.mjs +9 -0
  125. package/es/vue-sfc-shim.d.ts +6 -6
  126. package/es/vue-tsx-shim.d.ts +23 -23
  127. package/lib/action-sheet/index.css +1 -1
  128. package/lib/avatar/index.css +1 -1
  129. package/lib/badge/index.css +1 -1
  130. package/lib/button/index.css +1 -1
  131. package/lib/calendar/index.css +1 -1
  132. package/lib/calendar/utils.d.ts +2 -2
  133. package/lib/cascader/Cascader.d.ts +1 -1
  134. package/lib/cascader/index.css +1 -1
  135. package/lib/cascader/index.d.ts +1 -1
  136. package/lib/cell/Cell.d.ts +34 -0
  137. package/lib/cell/Cell.js +61 -8
  138. package/lib/cell/index.css +1 -1
  139. package/lib/cell/index.d.ts +17 -0
  140. package/lib/cell/style/index.js +1 -0
  141. package/lib/cell-group/index.css +1 -1
  142. package/lib/checkbox/Checkbox.d.ts +1 -1
  143. package/lib/checkbox/index.d.ts +1 -1
  144. package/lib/checkbox-group/CheckboxGroup.d.ts +1 -1
  145. package/lib/checkbox-group/index.d.ts +1 -1
  146. package/lib/collapse/Collapse.d.ts +1 -1
  147. package/lib/collapse/index.d.ts +1 -1
  148. package/lib/collapse-item/index.css +1 -1
  149. package/lib/composables/use-touch.d.ts +1 -0
  150. package/lib/composables/use-touch.js +8 -1
  151. package/lib/config-provider/types.d.ts +1 -1
  152. package/lib/date-time-picker/DateTimePicker.d.ts +1 -1
  153. package/lib/date-time-picker/DateTimePickerWrapper.d.ts +1 -1
  154. package/lib/date-time-picker/index.d.ts +1 -1
  155. package/lib/dialog/index.css +1 -1
  156. package/lib/divider/index.css +1 -1
  157. package/lib/drawer-select/DrawerSelect.d.ts +68 -0
  158. package/lib/drawer-select/DrawerSelect.js +389 -0
  159. package/lib/drawer-select/index.css +1 -0
  160. package/lib/drawer-select/index.d.ts +53 -0
  161. package/lib/drawer-select/index.js +37 -0
  162. package/lib/drawer-select/style/index.d.ts +1 -0
  163. package/lib/drawer-select/style/index.js +15 -0
  164. package/lib/drawer-select/types.d.ts +26 -0
  165. package/lib/drawer-select/types.js +15 -0
  166. package/lib/dropdown-item/DropdownItem.d.ts +1 -1
  167. package/lib/dropdown-item/index.d.ts +1 -1
  168. package/lib/dropdown-item/style/index.js +2 -1
  169. package/lib/dropdown-menu/DropdownMenu.js +3 -0
  170. package/lib/dropdown-menu/index.css +1 -1
  171. package/lib/field/Field.d.ts +27 -3
  172. package/lib/field/Field.js +11 -3
  173. package/lib/field/index.css +1 -1
  174. package/lib/field/index.d.ts +19 -3
  175. package/lib/floating-bubble/FloatingBubble.d.ts +81 -0
  176. package/lib/floating-bubble/FloatingBubble.js +210 -0
  177. package/lib/floating-bubble/index.css +1 -0
  178. package/lib/floating-bubble/index.d.ts +63 -0
  179. package/lib/floating-bubble/index.js +39 -0
  180. package/lib/floating-bubble/style/index.d.ts +1 -0
  181. package/lib/floating-bubble/style/index.js +4 -0
  182. package/lib/floating-bubble/types.d.ts +20 -0
  183. package/lib/floating-bubble/types.js +15 -0
  184. package/lib/hierarchy-select/index.css +1 -1
  185. package/lib/image/index.css +1 -1
  186. package/lib/image-preview/index.css +1 -1
  187. package/lib/index.css +1 -1
  188. package/lib/index.d.ts +3 -1
  189. package/lib/index.js +7 -1
  190. package/lib/lazyload/vue-lazyload/index.d.ts +55 -55
  191. package/lib/media-picker/index.css +1 -1
  192. package/lib/media-picker/watermark/image-processor.js +1 -1
  193. package/lib/media-player/index.css +1 -1
  194. package/lib/multiple-picker/index.css +1 -1
  195. package/lib/nav-bar/NavBar.d.ts +1 -1
  196. package/lib/nav-bar/index.d.ts +1 -1
  197. package/lib/notice-bar/index.css +1 -1
  198. package/lib/number-keyboard/NumberKeyboard.d.ts +1 -1
  199. package/lib/number-keyboard/index.css +1 -1
  200. package/lib/number-keyboard/index.d.ts +1 -1
  201. package/lib/password-input/index.css +1 -1
  202. package/lib/picker/Picker.d.ts +1 -1
  203. package/lib/picker/index.css +1 -1
  204. package/lib/picker/index.d.ts +1 -1
  205. package/lib/popover/index.css +1 -1
  206. package/lib/popup/index.css +1 -1
  207. package/lib/pull-refresh/PullRefresh.d.ts +1 -1
  208. package/lib/pull-refresh/index.d.ts +1 -1
  209. package/lib/radio-group/RadioGroup.d.ts +1 -1
  210. package/lib/radio-group/index.d.ts +1 -1
  211. package/lib/radio-picker/RadioPicker.d.ts +1 -1
  212. package/lib/radio-picker/index.css +1 -1
  213. package/lib/radio-picker/index.d.ts +1 -1
  214. package/lib/radio-picker/style/index.js +3 -3
  215. package/lib/rate/Rate.d.ts +1 -1
  216. package/lib/rate/index.d.ts +1 -1
  217. package/lib/search/Search.d.ts +2 -2
  218. package/lib/search/index.css +1 -1
  219. package/lib/search/index.d.ts +2 -2
  220. package/lib/step/index.css +1 -1
  221. package/lib/stepper/Stepper.d.ts +1 -1
  222. package/lib/stepper/index.css +1 -1
  223. package/lib/stepper/index.d.ts +1 -1
  224. package/lib/steps/index.css +1 -1
  225. package/lib/style/base.css +1 -1
  226. package/lib/style/css-variables.css +1 -1
  227. package/lib/switch/Switch.d.ts +1 -1
  228. package/lib/switch/index.d.ts +1 -1
  229. package/lib/tabbar/Tabbar.d.ts +2 -2
  230. package/lib/tabbar/index.css +1 -1
  231. package/lib/tabbar/index.d.ts +2 -2
  232. package/lib/tabbar-item/index.css +1 -1
  233. package/lib/tabs/Tabs.js +4 -2
  234. package/lib/tabs/TabsTitle.js +16 -6
  235. package/lib/tabs/index.css +1 -1
  236. package/lib/tag/index.css +1 -1
  237. package/lib/text-ellipsis/TextEllipsis.js +2 -0
  238. package/lib/time-picker/TimePicker.d.ts +1 -1
  239. package/lib/time-picker/index.css +1 -1
  240. package/lib/time-picker/index.d.ts +1 -1
  241. package/lib/timeline/index.css +1 -1
  242. package/lib/uploader/index.css +1 -1
  243. package/lib/utils/closest.d.ts +1 -0
  244. package/lib/utils/closest.js +27 -0
  245. package/lib/utils/constant.d.ts +1 -1
  246. package/lib/utils/constant.js +3 -3
  247. package/lib/utils/index.d.ts +1 -0
  248. package/lib/utils/index.js +1 -0
  249. package/lib/utils/validate.d.ts +2 -1
  250. package/lib/utils/validate.js +9 -0
  251. package/lib/vue-sfc-shim.d.ts +6 -6
  252. package/lib/vue-tsx-shim.d.ts +23 -23
  253. package/lib/web-types.json +1 -1
  254. package/lib/zartui.cjs.js +3897 -3275
  255. package/lib/zartui.es.js +3898 -3276
  256. package/lib/zartui.js +3886 -3264
  257. package/lib/zartui.min.js +1 -1
  258. package/package.json +9 -8
@@ -2,11 +2,12 @@ import "../../style/base.css";
2
2
  import "../../badge/index.css";
3
3
  import "../../icon/index.css";
4
4
  import "../../dropdown-menu/index.css";
5
- import "../../cell/index.css";
6
5
  import "../../overlay/index.css";
7
6
  import "../../popup/index.css";
8
7
  import "../../loading/index.css";
9
8
  import "../../button/index.css";
9
+ import "../../cell/index.css";
10
+ import "../../field/index.css";
10
11
  import "../../checkbox-group/index.css";
11
12
  import "../../checkbox/index.css";
12
13
  import "../index.css";
@@ -79,6 +79,9 @@ var stdin_default = defineComponent({
79
79
  disabled,
80
80
  titleClass
81
81
  } = item;
82
+ if (item.$slots.header) {
83
+ return item.$slots.header(item);
84
+ }
82
85
  return _createVNode("div", {
83
86
  "id": `${id}-${index}`,
84
87
  "role": "button",
@@ -1 +1 @@
1
- :root{--zt-dropdown-menu-background: var(--zt-background-2);--zt-dropdown-menu-bar-padding: 0 12px;--zt-dropdown-menu-item-margin: 12px 4px;--zt-dropdown-menu-item-height: 36px;--zt-dropdown-menu-item-padding: 0 12px;--zt-dropdown-menu-title-text-color: var(--zt-text-color);--zt-dropdown-menu-title-active-text-color: var(--zt-primary-color);--zt-dropdown-menu-title-disabled-text-color: var(--zt-text-color-2);--zt-dropdown-menu-option-active-color: var(--zt-primary-color);--zt-dropdown-menu-content-max-height: 80%}:root[zt-theme-size=large]{--zt-dropdown-menu-item-height: 48px}.zt-dropdown-menu{-webkit-user-select:none;user-select:none}.zt-dropdown-menu__bar{position:relative;display:flex;padding:var(--zt-dropdown-menu-bar-padding);align-items:center}.zt-dropdown-menu__bar--opened{z-index:calc(var(--zt-dropdown-item-z-index) + 1)}.zt-dropdown-menu__item{display:flex;flex:1;align-items:center;justify-content:center;background:var(--zt-dropdown-menu-background);min-width:0;margin:var(--zt-dropdown-menu-item-margin);height:var(--zt-dropdown-menu-item-height);border-radius:calc(var(--zt-dropdown-menu-item-height) / 2);padding:var(--zt-dropdown-menu-item-padding);line-height:var(--zt-line-height-xs);cursor:pointer}.zt-dropdown-menu__item:last-child{margin-right:0}.zt-dropdown-menu__item:active{opacity:.7}.zt-dropdown-menu__item--disabled:active{opacity:1}.zt-dropdown-menu__item--disabled .zt-dropdown-menu__title{color:var(--zt-dropdown-menu-title-disabled-text-color)}.zt-dropdown-menu__title{position:relative;box-sizing:border-box;width:100%;color:var(--zt-dropdown-menu-title-text-color);font-size:var(--zt-font-size-md)}.zt-dropdown-menu__title .zt-icon{position:absolute;right:0;margin-top:1px;color:var(--zt-gray-4)}.zt-dropdown-menu__title--active{color:var(--zt-dropdown-menu-title-active-text-color)}.zt-dropdown-menu__title--active .zt-icon{color:currentColor}.zt-dropdown-menu__title--active .zt-dropdown-menu__icon{transform:rotate(180deg)}.zt-dropdown-menu__title--down:after{margin-top:-1px;transform:rotate(135deg)}
1
+ :root{--zt-dropdown-menu-background: var(--zt-background-popup);--zt-dropdown-menu-bar-padding: 0 12px;--zt-dropdown-menu-item-margin: 12px 4px;--zt-dropdown-menu-item-height: 36px;--zt-dropdown-menu-item-padding: 0 12px;--zt-dropdown-menu-title-text-color: var(--zt-text-color);--zt-dropdown-menu-title-active-text-color: var(--zt-primary-color);--zt-dropdown-menu-title-disabled-text-color: var(--zt-text-color-2);--zt-dropdown-menu-option-active-color: var(--zt-primary-color);--zt-dropdown-menu-content-max-height: 80%}:root[zt-theme-size=large]{--zt-dropdown-menu-item-height: 48px}.zt-dropdown-menu{-webkit-user-select:none;user-select:none}.zt-dropdown-menu__bar{position:relative;display:flex;padding:var(--zt-dropdown-menu-bar-padding);align-items:center}.zt-dropdown-menu__bar--opened{z-index:calc(var(--zt-dropdown-item-z-index) + 1)}.zt-dropdown-menu__item{display:flex;flex:1;align-items:center;justify-content:center;background:var(--zt-dropdown-menu-background);min-width:0;margin:var(--zt-dropdown-menu-item-margin);height:var(--zt-dropdown-menu-item-height);border-radius:calc(var(--zt-dropdown-menu-item-height) / 2);padding:var(--zt-dropdown-menu-item-padding);font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-md);cursor:pointer}.zt-dropdown-menu__item:last-child{margin-right:0}.zt-dropdown-menu__item:active{opacity:.7}.zt-dropdown-menu__item--disabled:active{opacity:1}.zt-dropdown-menu__item--disabled .zt-dropdown-menu__title{color:var(--zt-dropdown-menu-title-disabled-text-color)}.zt-dropdown-menu__title{position:relative;box-sizing:border-box;width:100%;color:var(--zt-dropdown-menu-title-text-color);font-size:var(--zt-font-size-md)}.zt-dropdown-menu__title .zt-icon{position:absolute;right:0;margin-top:1px;color:var(--zt-gray-4)}.zt-dropdown-menu__title--active{color:var(--zt-dropdown-menu-title-active-text-color)}.zt-dropdown-menu__title--active .zt-icon{color:currentColor}.zt-dropdown-menu__title--active .zt-dropdown-menu__icon{transform:rotate(180deg)}.zt-dropdown-menu__title--down:after{margin-top:-1px;transform:rotate(135deg)}
@@ -79,6 +79,14 @@ declare const fieldProps: {
79
79
  type: PropType<string>;
80
80
  default: string;
81
81
  };
82
+ placeholder: StringConstructor;
83
+ errorMessage: StringConstructor;
84
+ errorMessageAlign: PropType<FieldTextAlign>;
85
+ descriptionClass: PropType<unknown>;
86
+ description: {
87
+ type: PropType<string>;
88
+ default: string;
89
+ };
82
90
  } & {
83
91
  id: StringConstructor;
84
92
  name: StringConstructor;
@@ -181,6 +189,14 @@ declare const _default: import("vue").DefineComponent<{
181
189
  type: PropType<string>;
182
190
  default: string;
183
191
  };
192
+ placeholder: StringConstructor;
193
+ errorMessage: StringConstructor;
194
+ errorMessageAlign: PropType<FieldTextAlign>;
195
+ descriptionClass: PropType<unknown>;
196
+ description: {
197
+ type: PropType<string>;
198
+ default: string;
199
+ };
184
200
  } & {
185
201
  id: StringConstructor;
186
202
  name: StringConstructor;
@@ -246,7 +262,7 @@ declare const _default: import("vue").DefineComponent<{
246
262
  type: BooleanConstructor;
247
263
  default: null;
248
264
  };
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<{
265
+ }, () => 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<{
250
266
  leftIcon: StringConstructor;
251
267
  titleIcon: StringConstructor;
252
268
  title: (NumberConstructor | StringConstructor)[];
@@ -281,6 +297,14 @@ declare const _default: import("vue").DefineComponent<{
281
297
  type: PropType<string>;
282
298
  default: string;
283
299
  };
300
+ placeholder: StringConstructor;
301
+ errorMessage: StringConstructor;
302
+ errorMessageAlign: PropType<FieldTextAlign>;
303
+ descriptionClass: PropType<unknown>;
304
+ description: {
305
+ type: PropType<string>;
306
+ default: string;
307
+ };
284
308
  } & {
285
309
  id: StringConstructor;
286
310
  name: StringConstructor;
@@ -370,13 +394,13 @@ declare const _default: import("vue").DefineComponent<{
370
394
  clickable: boolean | null;
371
395
  clearable: boolean;
372
396
  clearIcon: string;
373
- error: boolean;
397
+ description: string;
374
398
  modelValue: string | number;
375
399
  clearTrigger: FieldClearTrigger;
376
400
  formatTrigger: FieldFormatTrigger;
401
+ error: boolean;
377
402
  readonly: boolean;
378
403
  showWordLimit: boolean;
379
- description: string;
380
404
  colon: boolean;
381
405
  }, {}>;
382
406
  export default _default;
@@ -466,7 +466,7 @@ var stdin_default = defineComponent({
466
466
  return (_a = clearIconRef.value) == null ? void 0 : _a.$el;
467
467
  })
468
468
  });
469
- return () => {
469
+ const renderField = () => {
470
470
  const disabled = getProp("disabled");
471
471
  const readonly = getProp("readonly");
472
472
  const labelAlign = getProp("labelAlign");
@@ -482,7 +482,7 @@ var stdin_default = defineComponent({
482
482
  disabled,
483
483
  readonly,
484
484
  [`label-${labelAlign}`]: labelAlign,
485
- "error-message": props.errorMessage !== "" && typeof props.errorMessage !== "undefined",
485
+ "error-message": props.errorMessage !== "" && typeof props.errorMessage !== "undefined" || state.validateMessage,
486
486
  description: props.description !== "" && typeof props.description !== "undefined",
487
487
  "is-link": props.isLink
488
488
  }),
@@ -502,9 +502,17 @@ var stdin_default = defineComponent({
502
502
  title: Label ? () => Label : null,
503
503
  value: renderFieldBody,
504
504
  extra: slots.extra,
505
- bottom: renderBottom
505
+ bottom: props.direction === "horizontal" ? null : renderBottom
506
506
  });
507
507
  };
508
+ return () => {
509
+ const field = renderField();
510
+ return props.direction === "horizontal" && form ? _createVNode("div", {
511
+ "class": bem({
512
+ wraper: true
513
+ })
514
+ }, [field, renderBottom()]) : field;
515
+ };
508
516
  }
509
517
  });
510
518
  export {
@@ -1 +1 @@
1
- :root{--zt-field-value-border-radius: var(--zt-radius-md);--zt-field-input-text-color: var(--zt-text-color);--zt-field-input-disabled-text-color: var(--zt-gray-a4);--zt-field-placeholder-text-color: var(--zt-placeholder-color);--zt-field-clear-icon-color: var(--zt-gray-a6);--zt-field-left-icon-color: var(--zt-gray-a4);--zt-field-right-icon-color: var(--zt-gray-a4);--zt-field-password-icon-color: var(--zt-gray-a6);--zt-field-error-message-background-color: rgb(var(--zt-red-r), var(--zt-red-g), var(--zt-red-b), .1);--zt-field-error-message-color: var(--zt-red);--zt-field-description-background-color: var(--zt-gray-a04);--zt-field-description-color: var(--zt-gray-a6);--zt-field-description-border-color: var(--zt-gray-a2);--zt-field-text-area-min-height: 60px;--zt-field-word-limit-color: var(--zt-gray-a4);--zt-field-disabled-text-color: var(--zt-gray-a6);--zt-field-required-mark-color: var(--zt-red);--zt-field-required-mark-margin: 0 0 0 4px;--zt-field-caret-color: var(--zt-primary-color)}.zt-field__label{flex:none;box-sizing:border-box;word-wrap:break-word;overflow:hidden}.zt-field__label--center{text-align:center}.zt-field__label--right{text-align:right}.zt-field__label--required:after{margin:var(--zt-field-required-mark-margin);color:var(--zt-field-required-mark-color);content:"*";font-weight:var(--zt-font-bold);line-height:var(--zt-line-height-md)}.zt-field--disabled .zt-field__label{color:var(--zt-field-disabled-text-color)}.zt-field--disabled .zt-cell__value--vertical,.zt-field--readonly .zt-cell__value--vertical{background:var(--zt-gray-a04)}.zt-field__value{display:block;overflow:visible;border-radius:var(--zt-field-value-border-radius)}.zt-field__body{width:100%;display:flex;align-items:center}.zt-field__body input,.zt-field__body textarea{caret-color:var(--zt-field-caret-color)}.zt-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:var(--zt-field-input-text-color);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none;-webkit-user-select:auto;user-select:auto}.zt-field__control::-webkit-input-placeholder{color:var(--zt-field-placeholder-text-color)}.zt-field__control::placeholder{color:var(--zt-field-placeholder-text-color)}.zt-field__control:disabled{color:var(--zt-field-input-disabled-text-color);cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--zt-field-input-disabled-text-color)}.zt-field__control:read-only{cursor:default}.zt-field__control--center{justify-content:center;text-align:center}.zt-field__control--right{justify-content:flex-end;text-align:right}.zt-field__control--custom{display:flex;align-items:center;min-height:var(--zt-line-height-md)}.zt-field__control--min-height{min-height:var(--zt-field-text-area-min-height)}.zt-field__control[type=date],.zt-field__control[type=time],.zt-field__control[type=datetime-local]{min-height:var(--zt-line-height-md)}.zt-field__control[type=search]{-webkit-appearance:none}.zt-field__clear,.zt-field__icon,.zt-field__button,.zt-field__right-icon{flex-shrink:0}.zt-field__clear,.zt-field__right-icon{margin-right:calc(var(--zt-padding-xs) * -1);padding:0 var(--zt-padding-xs);line-height:inherit}.zt-field__clear{color:var(--zt-field-clear-icon-color);font-size:var(--zt-font-size-xxl);cursor:pointer}.zt-field__left-icon .zt-icon,.zt-field__right-icon .zt-icon{display:block;font-size:var(--zt-font-size-xxl)}.zt-field__left-icon{color:var(--zt-field-left-icon-color);margin-right:var(--zt-padding-base);display:flex;align-items:center}.zt-field__right-icon{color:var(--zt-field-right-icon-color)}.zt-field__button{padding-left:var(--zt-padding-xs)}.zt-field__error-message{color:var(--zt-field-error-message-color);font-size:var(--zt-font-size-sm);text-align:left}.zt-field__error-message--center{text-align:center}.zt-field__error-message--right{text-align:right}.zt-field__word-limit{margin-top:var(--zt-padding-md);color:var(--zt-field-word-limit-color);font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-md)}.zt-field__word-num--exceed{color:var(--zt-field-error-message-color)}.zt-field--error-message .zt-cell__value,.zt-field--error .zt-cell__value,.zt-field--description .zt-cell__value{border-bottom-left-radius:0;border-bottom-right-radius:0}.zt-field__bottom{border-radius:0 0 var(--zt-radius-md) var(--zt-radius-md)}.zt-field--error-message .zt-field__label,.zt-field--error .zt-field__label{color:var(--zt-field-error-message-color)}.zt-field--error-message .zt-field__error-message,.zt-field--error .zt-field__error-message{background:var(--zt-field-error-message-background-color);border-radius:0 0 var(--zt-radius-md) var(--zt-radius-md);padding:var(--zt-padding-xs);font-size:var(--zt-font-size-sm);color:var(--zt-field-error-message-color);letter-spacing:0;line-height:var(--zt-line-height-xs);position:relative}.zt-field--error-message .zt-field__error-message:before,.zt-field--error .zt-field__error-message:before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:0;left:0;border-top:1px solid var(--zt-field-error-message-color);transform:scaleY(.5)}.zt-field--error-message.zt-field--description .zt-field__error-message,.zt-field--error.zt-field--description .zt-field__error-message{border-radius:0}.zt-field__description{background:var(--zt-field-description-background-color);border-radius:0 0 var(--zt-radius-md) var(--zt-radius-md);padding:var(--zt-padding-xs);font-size:var(--zt-font-size-sm);color:var(--zt-field-description-color);letter-spacing:0;line-height:var(--zt-line-height-xs);position:relative}.zt-field__description:before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:0;left:0;border-top:1px solid var(--zt-field-description-border-color);transform:scaleY(.5)}.zt-field__password{width:100%;display:flex;justify-content:space-between;align-items:center}.zt-field__password .zt-icon{color:var(--zt-field-password-icon-color);font-size:var(--zt-font-size-xxl)}.zt-field--is-link .zt-field__value{display:flex}.zt-theme-dark{--zt-field-left-icon-color: var(--zt-gray)}
1
+ :root{--zt-field-value-border-radius: var(--zt-radius-md);--zt-field-input-text-color: var(--zt-text-color);--zt-field-input-disabled-text-color: var(--zt-gray-a4);--zt-field-placeholder-text-color: var(--zt-placeholder-color);--zt-field-clear-icon-color: var(--zt-gray-a6);--zt-field-left-icon-color: var(--zt-gray-a4);--zt-field-right-icon-color: var(--zt-gray-a4);--zt-field-password-icon-color: var(--zt-gray-a6);--zt-field-error-message-background-color: rgb(var(--zt-red-r), var(--zt-red-g), var(--zt-red-b), .1);--zt-field-error-message-color: var(--zt-red);--zt-field-description-background-color: var(--zt-gray-a04);--zt-field-description-color: var(--zt-gray-a6);--zt-field-description-border-color: var(--zt-gray-a2);--zt-field-text-area-min-height: 60px;--zt-field-word-limit-color: var(--zt-gray-a4);--zt-field-disabled-text-color: var(--zt-gray-a6);--zt-field-required-mark-color: var(--zt-red);--zt-field-required-mark-margin: 0 0 0 4px;--zt-field-caret-color: var(--zt-primary-color)}.zt-field--wraper{position:relative;background:var(--zt-background)}.zt-field--wraper>.zt-cell:after{display:none}.zt-field--wraper .zt-field__bottom{padding:0 var(--zt-padding-md) var(--zt-padding-xs)}.zt-field--wraper:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:var(--zt-padding-md);border-bottom:1px solid var(--zt-border-color);transform:scaleY(.5)}.zt-field__label{flex:none;box-sizing:border-box;word-wrap:break-word;overflow:hidden}.zt-field__label--center{text-align:center}.zt-field__label--right{text-align:right}.zt-field__label--required:after{margin:var(--zt-field-required-mark-margin);color:var(--zt-field-required-mark-color);content:"*";font-weight:var(--zt-font-bold);line-height:var(--zt-line-height-md)}.zt-field--disabled .zt-field__label{color:var(--zt-field-disabled-text-color)}.zt-field--disabled .zt-cell__value--vertical,.zt-field--readonly .zt-cell__value--vertical{background:var(--zt-gray-a04)}.zt-field__value{display:block;overflow:visible;border-radius:var(--zt-field-value-border-radius)}.zt-field__body{width:100%;display:flex;align-items:center}.zt-field__body input,.zt-field__body textarea{caret-color:var(--zt-field-caret-color)}.zt-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:var(--zt-field-input-text-color);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none;-webkit-user-select:auto;user-select:auto}.zt-field__control::-webkit-input-placeholder{color:var(--zt-field-placeholder-text-color)}.zt-field__control::placeholder{color:var(--zt-field-placeholder-text-color)}.zt-field__control:disabled{color:var(--zt-field-input-disabled-text-color);cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--zt-field-input-disabled-text-color)}.zt-field__control:read-only{cursor:default}.zt-field__control--center{justify-content:center;text-align:center}.zt-field__control--right{justify-content:flex-end;text-align:right}.zt-field__control--custom{display:flex;align-items:center;min-height:var(--zt-line-height-md)}.zt-field__control--min-height{min-height:var(--zt-field-text-area-min-height)}.zt-field__control[type=date],.zt-field__control[type=time],.zt-field__control[type=datetime-local]{min-height:var(--zt-line-height-md)}.zt-field__control[type=search]{-webkit-appearance:none}.zt-field__clear,.zt-field__icon,.zt-field__button,.zt-field__right-icon{flex-shrink:0}.zt-field__clear,.zt-field__right-icon{margin-right:calc(var(--zt-padding-xs) * -1);padding:0 var(--zt-padding-xs);line-height:inherit}.zt-field__clear{color:var(--zt-field-clear-icon-color);font-size:var(--zt-font-size-xxl);cursor:pointer}.zt-field__left-icon .zt-icon,.zt-field__right-icon .zt-icon{display:block;font-size:var(--zt-font-size-xxl)}.zt-field__left-icon{color:var(--zt-field-left-icon-color);margin-right:var(--zt-padding-base);display:flex;align-items:center}.zt-field__right-icon{color:var(--zt-field-right-icon-color)}.zt-field__button{padding-left:var(--zt-padding-xs)}.zt-field__error-message{background:var(--zt-field-error-message-background-color);border-radius:0 0 var(--zt-radius-md) var(--zt-radius-md);padding:var(--zt-padding-xs);font-size:var(--zt-font-size-sm);color:var(--zt-field-error-message-color);letter-spacing:0;line-height:var(--zt-line-height-sm);position:relative}.zt-field__error-message:before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:0;left:0;border-top:1px solid var(--zt-field-error-message-color);transform:scaleY(.5)}.zt-field__error-message--center{text-align:center}.zt-field__error-message--right{text-align:right}.zt-field__word-limit{margin-top:var(--zt-padding-md);color:var(--zt-field-word-limit-color);font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-md)}.zt-field__word-num--exceed{color:var(--zt-field-error-message-color)}.zt-field--error-message .zt-cell__value,.zt-field--error .zt-cell__value,.zt-field--description .zt-cell__value{border-bottom-left-radius:0;border-bottom-right-radius:0}.zt-field__bottom{border-radius:0 0 var(--zt-radius-md) var(--zt-radius-md)}.zt-field--error-message .zt-field__label,.zt-field--error .zt-field__label{color:var(--zt-field-error-message-color)}.zt-field--error-message.zt-field--description .zt-field__error-message,.zt-field--error.zt-field--description .zt-field__error-message{border-radius:0}.zt-field__description{background:var(--zt-field-description-background-color);border-radius:0 0 var(--zt-radius-md) var(--zt-radius-md);padding:var(--zt-padding-xs);font-size:var(--zt-font-size-sm);color:var(--zt-field-description-color);letter-spacing:0;line-height:var(--zt-line-height-sm);position:relative}.zt-field__description:before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:0;left:0;border-top:1px solid var(--zt-field-description-border-color);transform:scaleY(.5)}.zt-field__password{width:100%;display:flex;justify-content:space-between;align-items:center}.zt-field__password .zt-icon{color:var(--zt-field-password-icon-color);font-size:var(--zt-font-size-xxl)}.zt-field.zt-cell--horizontal{padding:0 16px}.zt-field.zt-cell--horizontal .zt-cell__title--horizontal{min-height:44px}.zt-field.zt-cell--horizontal .zt-cell__value--horizontal .zt-field__body{height:100%}.zt-field.zt-cell--horizontal .zt-cell__value--horizontal .zt-field__body .zt-field__control{text-align:right}.zt-field.zt-cell--horizontal .zt-cell__value--horizontal .zt-field__control--custom{justify-content:flex-end}.zt-field--is-link .zt-field__value{display:flex}.zt-theme-dark{--zt-field-left-icon-color: var(--zt-gray)}
@@ -34,6 +34,14 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
34
34
  type: import("vue").PropType<string>;
35
35
  default: string;
36
36
  };
37
+ placeholder: StringConstructor;
38
+ errorMessage: StringConstructor;
39
+ errorMessageAlign: import("vue").PropType<import("./types").FieldTextAlign>;
40
+ descriptionClass: import("vue").PropType<unknown>;
41
+ description: {
42
+ type: import("vue").PropType<string>;
43
+ default: string;
44
+ };
37
45
  } & {
38
46
  id: StringConstructor;
39
47
  name: StringConstructor;
@@ -99,7 +107,7 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
99
107
  type: BooleanConstructor;
100
108
  default: null;
101
109
  };
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<{
110
+ }, () => 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<{
103
111
  leftIcon: StringConstructor;
104
112
  titleIcon: StringConstructor;
105
113
  title: (NumberConstructor | StringConstructor)[];
@@ -134,6 +142,14 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
134
142
  type: import("vue").PropType<string>;
135
143
  default: string;
136
144
  };
145
+ placeholder: StringConstructor;
146
+ errorMessage: StringConstructor;
147
+ errorMessageAlign: import("vue").PropType<import("./types").FieldTextAlign>;
148
+ descriptionClass: import("vue").PropType<unknown>;
149
+ description: {
150
+ type: import("vue").PropType<string>;
151
+ default: string;
152
+ };
137
153
  } & {
138
154
  id: StringConstructor;
139
155
  name: StringConstructor;
@@ -223,13 +239,13 @@ export declare const Field: import("../utils").WithInstall<import("vue").DefineC
223
239
  clickable: boolean | null;
224
240
  clearable: boolean;
225
241
  clearIcon: string;
226
- error: boolean;
242
+ description: string;
227
243
  modelValue: string | number;
228
244
  clearTrigger: import("./types").FieldClearTrigger;
229
245
  formatTrigger: import("./types").FieldFormatTrigger;
246
+ error: boolean;
230
247
  readonly: boolean;
231
248
  showWordLimit: boolean;
232
- description: string;
233
249
  colon: boolean;
234
250
  }, {}>>;
235
251
  export default Field;
@@ -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,181 @@
1
+ import { withDirectives as _withDirectives, mergeProps as _mergeProps, vShow as _vShow, createVNode as _createVNode } from "vue";
2
+ import { Teleport, computed, defineComponent, nextTick, onMounted, ref, watch, onActivated, onDeactivated } from "vue";
3
+ import { pick, addUnit, closest, createNamespace, makeNumberProp, makeStringProp, windowWidth, windowHeight } from "../utils/index.mjs";
4
+ import { useRect, useEventListener } from "@zartui/use";
5
+ import { useTouch } from "../composables/use-touch.mjs";
6
+ import Icon from "../icon/index.mjs";
7
+ const floatingBubbleProps = {
8
+ gap: makeNumberProp(24),
9
+ icon: String,
10
+ axis: makeStringProp("y"),
11
+ magnetic: String,
12
+ offset: {
13
+ type: Object,
14
+ default: () => ({
15
+ x: -1,
16
+ y: -1
17
+ })
18
+ },
19
+ teleport: {
20
+ type: [String, Object],
21
+ default: "body"
22
+ }
23
+ };
24
+ const [name, bem] = createNamespace("floating-bubble");
25
+ var stdin_default = defineComponent({
26
+ name,
27
+ inheritAttrs: false,
28
+ props: floatingBubbleProps,
29
+ emits: ["click", "update:offset", "offsetChange"],
30
+ setup(props, {
31
+ slots,
32
+ emit,
33
+ attrs
34
+ }) {
35
+ const rootRef = ref();
36
+ const state = ref({
37
+ x: 0,
38
+ y: 0,
39
+ width: 0,
40
+ height: 0
41
+ });
42
+ const boundary = computed(() => ({
43
+ top: props.gap,
44
+ right: windowWidth.value - state.value.width - props.gap,
45
+ bottom: windowHeight.value - state.value.height - props.gap,
46
+ left: props.gap
47
+ }));
48
+ const dragging = ref(false);
49
+ let initialized = false;
50
+ const rootStyle = computed(() => {
51
+ const style = {};
52
+ const x = addUnit(state.value.x);
53
+ const y = addUnit(state.value.y);
54
+ style.transform = `translate3d(${x}, ${y}, 0)`;
55
+ if (dragging.value || !initialized) {
56
+ style.transition = "none";
57
+ }
58
+ return style;
59
+ });
60
+ const updateState = () => {
61
+ if (!show.value)
62
+ return;
63
+ const {
64
+ width,
65
+ height
66
+ } = useRect(rootRef.value);
67
+ const {
68
+ offset
69
+ } = props;
70
+ state.value = {
71
+ x: offset.x > -1 ? offset.x : windowWidth.value - width - props.gap,
72
+ y: offset.y > -1 ? offset.y : windowHeight.value - height - props.gap,
73
+ width,
74
+ height
75
+ };
76
+ };
77
+ const touch = useTouch();
78
+ let prevX = 0;
79
+ let prevY = 0;
80
+ const onTouchStart = (e) => {
81
+ touch.start(e);
82
+ dragging.value = true;
83
+ prevX = state.value.x;
84
+ prevY = state.value.y;
85
+ };
86
+ const onTouchMove = (e) => {
87
+ e.preventDefault();
88
+ touch.move(e);
89
+ if (props.axis === "lock")
90
+ return;
91
+ if (!touch.isTap.value) {
92
+ if (props.axis === "x" || props.axis === "xy") {
93
+ let nextX = prevX + touch.deltaX.value;
94
+ if (nextX < boundary.value.left)
95
+ nextX = boundary.value.left;
96
+ if (nextX > boundary.value.right)
97
+ nextX = boundary.value.right;
98
+ state.value.x = nextX;
99
+ }
100
+ if (props.axis === "y" || props.axis === "xy") {
101
+ let nextY = prevY + touch.deltaY.value;
102
+ if (nextY < boundary.value.top)
103
+ nextY = boundary.value.top;
104
+ if (nextY > boundary.value.bottom)
105
+ nextY = boundary.value.bottom;
106
+ state.value.y = nextY;
107
+ }
108
+ const offset = pick(state.value, ["x", "y"]);
109
+ emit("update:offset", offset);
110
+ }
111
+ };
112
+ useEventListener("touchmove", onTouchMove, {
113
+ target: rootRef
114
+ });
115
+ const onTouchEnd = () => {
116
+ dragging.value = false;
117
+ nextTick(() => {
118
+ if (props.magnetic === "x") {
119
+ const nextX = closest([boundary.value.left, boundary.value.right], state.value.x);
120
+ state.value.x = nextX;
121
+ }
122
+ if (props.magnetic === "y") {
123
+ const nextY = closest([boundary.value.top, boundary.value.bottom], state.value.y);
124
+ state.value.y = nextY;
125
+ }
126
+ if (!touch.isTap.value) {
127
+ const offset = pick(state.value, ["x", "y"]);
128
+ emit("update:offset", offset);
129
+ if (prevX !== offset.x || prevY !== offset.y) {
130
+ emit("offsetChange", offset);
131
+ }
132
+ }
133
+ });
134
+ };
135
+ const onClick = (e) => {
136
+ if (touch.isTap.value)
137
+ emit("click", e);
138
+ else
139
+ e.stopPropagation();
140
+ };
141
+ onMounted(() => {
142
+ updateState();
143
+ nextTick(() => {
144
+ initialized = true;
145
+ });
146
+ });
147
+ watch([windowWidth, windowHeight, () => props.gap, () => props.offset], updateState);
148
+ const show = ref(true);
149
+ onActivated(() => {
150
+ show.value = true;
151
+ });
152
+ onDeactivated(() => {
153
+ if (props.teleport) {
154
+ show.value = false;
155
+ }
156
+ });
157
+ return () => {
158
+ const Content = _withDirectives(_createVNode("div", _mergeProps({
159
+ "class": bem(),
160
+ "ref": rootRef,
161
+ "onTouchstartPassive": onTouchStart,
162
+ "onTouchend": onTouchEnd,
163
+ "onTouchcancel": onTouchEnd,
164
+ "onClick": onClick,
165
+ "style": rootStyle.value
166
+ }, attrs), [slots.default ? slots.default() : _createVNode(Icon, {
167
+ "name": props.icon,
168
+ "class": bem("icon")
169
+ }, null)]), [[_vShow, show.value]]);
170
+ return props.teleport ? _createVNode(Teleport, {
171
+ "to": props.teleport
172
+ }, {
173
+ default: () => [Content]
174
+ }) : Content;
175
+ };
176
+ }
177
+ });
178
+ export {
179
+ stdin_default as default,
180
+ floatingBubbleProps
181
+ };
@@ -0,0 +1 @@
1
+ :root{--zt-floating-bubble-size: 56px;--zt-floating-bubble-initial-gap: 24px;--zt-floating-bubble-icon-size: 28px;--zt-floating-bubble-background: linear-gradient(136.5deg, #058ce6 0%, #00b4ff 100%);--zt-floating-bubble-color: var(--zt-background-popup);--zt-floating-bubble-z-index: 999;--zt-floating-bubble-border-radius: var(--zt-radius-max);--zt-floating-bubble-box-shadow: 0 4px 12px 0 rgba(5, 140, 230, .4), inset -2px -2px 1px 1px #058ce6, inset 2px 2px 2px 1px #c3ebff}.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;box-shadow:var(--zt-floating-bubble-box-shadow)}.zt-floating-bubble:active{opacity:.7}.zt-floating-bubble__icon{font-size:var(--zt-floating-bubble-icon-size)}
@@ -0,0 +1,63 @@
1
+ export declare const FloatingBubble: import("../utils").WithInstall<import("vue").DefineComponent<{
2
+ gap: {
3
+ type: NumberConstructor;
4
+ default: number;
5
+ };
6
+ icon: StringConstructor;
7
+ axis: {
8
+ type: import("vue").PropType<import("./types").FloatingBubbleAxis>;
9
+ default: import("./types").FloatingBubbleAxis;
10
+ };
11
+ magnetic: import("vue").PropType<import("./types").FloatingBubbleMagnetic>;
12
+ offset: {
13
+ type: import("vue").PropType<import("./types").FloatingBubbleOffset>;
14
+ default: () => {
15
+ x: number;
16
+ y: number;
17
+ };
18
+ };
19
+ teleport: {
20
+ type: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
21
+ default: string;
22
+ };
23
+ }, () => 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<import("vue").ExtractPropTypes<{
24
+ gap: {
25
+ type: NumberConstructor;
26
+ default: number;
27
+ };
28
+ icon: StringConstructor;
29
+ axis: {
30
+ type: import("vue").PropType<import("./types").FloatingBubbleAxis>;
31
+ default: import("./types").FloatingBubbleAxis;
32
+ };
33
+ magnetic: import("vue").PropType<import("./types").FloatingBubbleMagnetic>;
34
+ offset: {
35
+ type: import("vue").PropType<import("./types").FloatingBubbleOffset>;
36
+ default: () => {
37
+ x: number;
38
+ y: number;
39
+ };
40
+ };
41
+ teleport: {
42
+ type: import("vue").PropType<string | import("vue").RendererElement | null | undefined>;
43
+ default: string;
44
+ };
45
+ }>> & {
46
+ onClick?: ((...args: any[]) => any) | undefined;
47
+ "onUpdate:offset"?: ((...args: any[]) => any) | undefined;
48
+ onOffsetChange?: ((...args: any[]) => any) | undefined;
49
+ }, {
50
+ offset: import("./types").FloatingBubbleOffset;
51
+ teleport: string | import("vue").RendererElement | null | undefined;
52
+ gap: number;
53
+ axis: import("./types").FloatingBubbleAxis;
54
+ }, {}>>;
55
+ export default FloatingBubble;
56
+ export { floatingBubbleProps } from './FloatingBubble';
57
+ export type { FloatingBubbleProps } from './FloatingBubble';
58
+ export type { FloatingBubbleThemeVars, FloatingBubbleAxis, FloatingBubbleMagnetic, FloatingBubbleOffset, } from './types';
59
+ declare module 'vue' {
60
+ interface GlobalComponents {
61
+ ZtFloatingBubble: typeof FloatingBubble;
62
+ }
63
+ }
@@ -0,0 +1,10 @@
1
+ import { withInstall } from "../utils/index.mjs";
2
+ import _FloatingBubble from "./FloatingBubble.mjs";
3
+ const FloatingBubble = withInstall(_FloatingBubble);
4
+ var stdin_default = FloatingBubble;
5
+ import { floatingBubbleProps } from "./FloatingBubble.mjs";
6
+ export {
7
+ FloatingBubble,
8
+ stdin_default as default,
9
+ floatingBubbleProps
10
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import "../../style/base.css";
2
+ import "../../badge/index.css";
3
+ import "../../icon/index.css";
4
+ import "../index.css";
@@ -0,0 +1,20 @@
1
+ export type FloatingBubbleThemeVars = {
2
+ floatingBubbleSize?: string;
3
+ floatingBubbleInitialGap?: string;
4
+ floatingBubbleIconSize?: string;
5
+ floatingBubbleBackground?: string;
6
+ floatingBubbleColor?: string;
7
+ floatingBubbleZIndex?: number | string;
8
+ };
9
+ export type FloatingBubbleAxis = 'x' | 'y' | 'xy' | 'lock';
10
+ export type FloatingBubbleMagnetic = 'x' | 'y';
11
+ export type FloatingBubbleOffset = {
12
+ x: number;
13
+ y: number;
14
+ };
15
+ export type FloatingBubbleBoundary = {
16
+ top: number;
17
+ right: number;
18
+ bottom: number;
19
+ left: number;
20
+ };
File without changes
@@ -1 +1 @@
1
- :root{--zt-hierarchy-select-color: var(--zt-gray-5);--zt-hierarchy-select-duration: var(--zt-duration-fast);--zt-hierarchy-select-round-icon-border: 1px solid rgba(45, 75, 115, .13);--zt-hierarchy-select-round-icon-box-shadow: -1px -1px 2px 0 #ffffff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-hierarchy-select-round-icon-background: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%);--zt-hierarchy-select-checked-icon-color: var(--zt-primary-color);--zt-hierarchy-select-checked-icon-shadow: inset 1px 1px 2px 0 rgba(0, 0, 0, .2);--zt-hierarchy-select-checked-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-hierarchy-select-disabled-icon-shadow: -1px -1px 2px 0 #fff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-hierarchy-select-disabled-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-hierarchy-select-disabled-checked-icon-opacity: .4;--zt-hierarchy-select-disabled-icon-background: linear-gradient(134deg, #e1e6eb 0%, #e5edf5 100%);--zt-hierarchy-breadcrumb-line-height: 44px;--zt-hierarchy-select-sub-icon-gap: 4px}:root[zt-theme-size=large]{--zt-hierarchy-breadcrumb-line-height: 56px}.zt-hierarchy-select__score-item{position:relative;display:flex;justify-content:space-between;align-items:center;padding:10px 0 10px var(--zt-padding-md);background-color:var(--zt-background-2)}.zt-hierarchy-select__score-item:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:var(--zt-padding-md);border-bottom:1px solid var(--zt-border-color);transform:scaleY(.5)}.zt-hierarchy-select__item-content{flex:1;margin-right:var(--zt-padding-md);width:278px;font-size:var(--zt-font-size-md);font-weight:400;text-align:left;color:var(--zt-gray);line-height:var(--zt-line-height-xl);word-break:break-all}.zt-hierarchy-select__item-content--selected,.zt-hierarchy-select__item-content span{color:var(--zt-primary-color)}.zt-hierarchy-select__disable .zt-hierarchy-select__sub-level,.zt-hierarchy-select__disable-parent .zt-hierarchy-select__sub-level,.zt-hierarchy-select__disable .zt-hierarchy-select__item-content,.zt-hierarchy-select__disable-parent .zt-hierarchy-select__item-content{opacity:.4}.zt-hierarchy-select__item-nav{padding:0 16px;border-left:rgba(0,0,0,.1) 1px solid}.zt-hierarchy-select__svg-defs-path-fill{fill:var(--zt-primary-color)}.zt-hierarchy-select__sub-level{display:flex;align-items:center;gap:var(--zt-hierarchy-select-sub-icon-gap)}.zt-hierarchy-select__sub-level span{color:var(--zt-primary-color);font-size:var(--zt-font-size-md)}.zt-hierarchy-select__sub-level--disable{opacity:.2}.zt-hierarchy-select__sub-icon{line-height:.75}.zt-hierarchy-select__svg-sub-icon{width:var(--zt-font-size-md);height:var(--zt-font-size-md)}.zt-hierarchy-select__multiple-button{margin-right:8px;display:flex;justify-content:center;align-items:center}.zt-hierarchy-select__icon{font-size:0;font-size:var(--zt-font-size-lg);cursor:pointer;box-sizing:border-box}.zt-hierarchy-select__icon .zt-icon{display:flex;justify-content:center;align-items:center;color:transparent;text-align:center;width:18px;height:18px;border:1px solid var(--zt-hierarchy-select-color);transition-duration:var(--zt-hierarchy-select-duration);transition-property:color,border-color,background-color}.zt-hierarchy-select__icon--round .zt-icon{border-radius:100%;border:var(--zt-hierarchy-select-round-icon-border);box-shadow:var(--zt-hierarchy-select-round-icon-box-shadow);background:var(--zt-hierarchy-select-round-icon-background)}.zt-hierarchy-select__icon--indeterminate .zt-icon{color:var(--zt-white);background:var(--zt-checkbox-checked-icon-color);box-shadow:var(--zt-checkbox-checked-icon-shadow);border:var(--zt-checkbox-checked-icon-border)}.zt-hierarchy-select__icon--checked .zt-icon{color:var(--zt-white);background:var(--zt-hierarchy-select-checked-icon-color);box-shadow:var(--zt-hierarchy-select-checked-icon-shadow);border:var(--zt-hierarchy-select-checked-icon-border)}.zt-hierarchy-select__icon--disabled{cursor:not-allowed}.zt-hierarchy-select__icon--disabled .zt-icon{border:var(--zt-hierarchy-select-disabled-icon-border);box-shadow:var(--zt-hierarchy-select-disabled-icon-shadow);background:var(--zt-hierarchy-select-disabled-icon-background)}.zt-hierarchy-select__icon--disabled.zt-hierarchy-select__icon--checked .zt-icon{opacity:var(--zt-hierarchy-select-disabled-checked-icon-opacity);background:var(--zt-primary-color);color:var(--zt-white)}.zt-breadcrumb{padding:0 16px}.zt-breadcrumb__list{box-sizing:border-box;height:var(--zt-hierarchy-breadcrumb-line-height);display:flex;align-items:center;color:var(--zt-primary-color);width:100%;overflow-x:scroll;font-size:var(--zt-font-size-lg)}.zt-breadcrumb__list::-webkit-scrollbar{width:0;height:0}.zt-breadcrumb__default{display:flex;white-space:nowrap}.zt-breadcrumb__item{height:44px;display:flex;align-items:center;white-space:nowrap}.zt-breadcrumb__item:last-child{color:var(--zt-gray)}.zt-breadcrumb__icon{padding:0 4px}
1
+ :root{--zt-hierarchy-select-color: var(--zt-gray-5);--zt-hierarchy-select-duration: var(--zt-duration-fast);--zt-hierarchy-select-round-icon-border: 1px solid rgba(45, 75, 115, .13);--zt-hierarchy-select-round-icon-box-shadow: -1px -1px 2px 0 #ffffff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-hierarchy-select-round-icon-background: linear-gradient(135deg, #e6ebf0 0%, #ffffff 100%);--zt-hierarchy-select-checked-icon-color: var(--zt-primary-color);--zt-hierarchy-select-checked-icon-shadow: inset 1px 1px 2px 0 rgba(0, 0, 0, .2);--zt-hierarchy-select-checked-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-hierarchy-select-disabled-icon-shadow: -1px -1px 2px 0 #fff, 0 0 3px 0 rgba(45, 75, 115, .2);--zt-hierarchy-select-disabled-icon-border: 1px solid rgba(255, 255, 255, .5);--zt-hierarchy-select-disabled-checked-icon-opacity: .4;--zt-hierarchy-select-disabled-icon-background: linear-gradient(134deg, #e1e6eb 0%, #e5edf5 100%);--zt-hierarchy-breadcrumb-line-height: 44px;--zt-hierarchy-select-sub-icon-gap: 4px}:root[zt-theme-size=large]{--zt-hierarchy-breadcrumb-line-height: 56px}.zt-hierarchy-select__score-item{position:relative;display:flex;justify-content:space-between;align-items:center;padding:var(--zt-padding-sm) 0 var(--zt-padding-sm) var(--zt-padding-md);background-color:var(--zt-background-popup)}.zt-hierarchy-select__score-item:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:0;bottom:0;left:var(--zt-padding-md);border-bottom:1px solid var(--zt-border-color);transform:scaleY(.5)}.zt-hierarchy-select__item-content{flex:1;margin-right:var(--zt-padding-md);font-size:var(--zt-font-size-md);color:var(--zt-gray);line-height:var(--zt-line-height-md);word-break:break-all}.zt-hierarchy-select__item-content--selected,.zt-hierarchy-select__item-content span{color:var(--zt-primary-color)}.zt-hierarchy-select__disable .zt-hierarchy-select__sub-level,.zt-hierarchy-select__disable-parent .zt-hierarchy-select__sub-level,.zt-hierarchy-select__disable .zt-hierarchy-select__item-content,.zt-hierarchy-select__disable-parent .zt-hierarchy-select__item-content{opacity:.4}.zt-hierarchy-select__item-nav{padding:0 16px;border-left:rgba(0,0,0,.1) 1px solid}.zt-hierarchy-select__svg-defs-path-fill{fill:var(--zt-primary-color)}.zt-hierarchy-select__sub-level{display:flex;align-items:center;gap:var(--zt-hierarchy-select-sub-icon-gap)}.zt-hierarchy-select__sub-level span{color:var(--zt-primary-color);font-size:var(--zt-font-size-md)}.zt-hierarchy-select__sub-level--disable{opacity:.2}.zt-hierarchy-select__sub-icon{line-height:.75}.zt-hierarchy-select__svg-sub-icon{width:var(--zt-font-size-md);height:var(--zt-font-size-md)}.zt-hierarchy-select__multiple-button{margin-right:8px;display:flex;justify-content:center;align-items:center}.zt-hierarchy-select__icon{font-size:var(--zt-font-size-lg);cursor:pointer;box-sizing:border-box}.zt-hierarchy-select__icon .zt-icon{display:flex;justify-content:center;align-items:center;color:transparent;text-align:center;width:18px;height:18px;border:1px solid var(--zt-hierarchy-select-color);transition-duration:var(--zt-hierarchy-select-duration);transition-property:color,border-color,background-color}.zt-hierarchy-select__icon--round .zt-icon{border-radius:100%;border:var(--zt-hierarchy-select-round-icon-border);box-shadow:var(--zt-hierarchy-select-round-icon-box-shadow);background:var(--zt-hierarchy-select-round-icon-background)}.zt-hierarchy-select__icon--indeterminate .zt-icon{color:var(--zt-white);background:var(--zt-checkbox-checked-icon-color);box-shadow:var(--zt-checkbox-checked-icon-shadow);border:var(--zt-checkbox-checked-icon-border)}.zt-hierarchy-select__icon--checked .zt-icon{color:var(--zt-white);background:var(--zt-hierarchy-select-checked-icon-color);box-shadow:var(--zt-hierarchy-select-checked-icon-shadow);border:var(--zt-hierarchy-select-checked-icon-border)}.zt-hierarchy-select__icon--disabled{cursor:not-allowed}.zt-hierarchy-select__icon--disabled .zt-icon{border:var(--zt-hierarchy-select-disabled-icon-border);box-shadow:var(--zt-hierarchy-select-disabled-icon-shadow);background:var(--zt-hierarchy-select-disabled-icon-background)}.zt-hierarchy-select__icon--disabled.zt-hierarchy-select__icon--checked .zt-icon{opacity:var(--zt-hierarchy-select-disabled-checked-icon-opacity);background:var(--zt-primary-color);color:var(--zt-white)}.zt-breadcrumb{padding:0 16px}.zt-breadcrumb__list{box-sizing:border-box;height:var(--zt-hierarchy-breadcrumb-line-height);display:flex;align-items:center;color:var(--zt-primary-color);width:100%;overflow-x:scroll;font-size:var(--zt-font-size-lg)}.zt-breadcrumb__list::-webkit-scrollbar{width:0;height:0}.zt-breadcrumb__default{display:flex;white-space:nowrap}.zt-breadcrumb__item{height:44px;display:flex;align-items:center;white-space:nowrap}.zt-breadcrumb__item:last-child{color:var(--zt-gray)}.zt-breadcrumb__icon{padding:0 4px}
@@ -1 +1 @@
1
- :root{--zt-image-placeholder-text-color: var(--zt-gray-a4);--zt-image-placeholder-background: var(--zt-background-3);--zt-image-icon-font-size: 32px}:root[zt-theme-size=large]{--zt-image-icon-font-size: 38px}.zt-image{position:relative;display:inline-block}.zt-image--round{overflow:hidden;border-radius:var(--zt-radius-max)}.zt-image--round .zt-image__img{border-radius:inherit}.zt-image--block{display:block}.zt-image__img,.zt-image__error,.zt-image__loading{display:block;width:100%;height:100%}.zt-image__error,.zt-image__loading{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--zt-image-placeholder-text-color);font-size:var(--zt-font-size-md);background:var(--zt-image-placeholder-background)}.zt-image__loading-icon,.zt-image__error-icon{font-size:var(--zt-image-icon-font-size)}
1
+ :root{--zt-image-placeholder-text-color: var(--zt-gray-a4);--zt-image-placeholder-background: var(--zt-background-2);--zt-image-icon-font-size: 32px}:root[zt-theme-size=large]{--zt-image-icon-font-size: 38px}.zt-image{position:relative;display:inline-block}.zt-image--round{overflow:hidden;border-radius:var(--zt-radius-max)}.zt-image--round .zt-image__img{border-radius:inherit}.zt-image--block{display:block}.zt-image__img,.zt-image__error,.zt-image__loading{display:block;width:100%;height:100%}.zt-image__error,.zt-image__loading{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--zt-image-placeholder-text-color);font-size:var(--zt-font-size-md);background:var(--zt-image-placeholder-background)}.zt-image__loading-icon,.zt-image__error-icon{font-size:var(--zt-image-icon-font-size)}
@@ -1 +1 @@
1
- :root{--zt-image-preview-index-height: 48px;--zt-image-preview-index-background: var(--zt-gray-a4);--zt-image-preview-index-text-color: var(--zt-white);--zt-image-preview-overlay-background: rgba(0, 0, 0, .9);--zt-image-preview-close-icon-color: var(--zt-gray-5);--zt-image-preview-close-icon-margin: var(--zt-padding-md);--zt-image-preview-close-icon-z-index: 1;--zt-image-preview-error-font-size: 36px}:root[zt-theme-size=large]{--zt-image-preview-error-font-size: 42px}.zt-image-preview{position:fixed;top:0;left:0;width:100%;height:100%;max-width:none;background-color:transparent;transform:none}.zt-image-preview__swipe{height:100%}.zt-image-preview__swipe-item{display:flex;align-items:center;justify-content:center;overflow:hidden}.zt-image-preview__cover{position:absolute;top:0;left:0}.zt-image-preview__image,.zt-image-preview__image-wrap{width:100%;transition-property:transform}.zt-image-preview__image--vertical,.zt-image-preview__image-wrap--vertical{width:auto;height:100%}.zt-image-preview__image img,.zt-image-preview__image-wrap img,.zt-image-preview__image video,.zt-image-preview__image-wrap video{-webkit-user-drag:none}.zt-image-preview__image .zt-image__error,.zt-image-preview__image-wrap .zt-image__error{top:30%;height:40%}.zt-image-preview__image .zt-image__error-icon,.zt-image-preview__image-wrap .zt-image__error-icon{font-size:var(--zt-image-preview-error-font-size)}.zt-image-preview__image .zt-image__loading,.zt-image-preview__image-wrap .zt-image__loading{background-color:transparent}.zt-image-preview__index{box-sizing:border-box;display:flex;align-items:center;position:absolute;bottom:0;left:0;width:100%;height:var(--zt-image-preview-index-height);padding:0 16px;background-color:var(--zt-image-preview-index-background);color:var(--zt-image-preview-index-text-color);overflow:hidden}.zt-image-preview__index-number{height:var(--zt-line-height-xl);background:rgba(45,75,115,.8);border-radius:2px;font-size:var(--zt-font-size-sm);text-align:center;line-height:var(--zt-line-height-xl);padding:0 8px}.zt-image-preview__title{flex-shrink:0;margin-left:8px;font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-xl)}.zt-image-preview__overlay{background:var(--zt-image-preview-overlay-background)}.zt-image-preview__close-icon{position:absolute;z-index:var(--zt-image-preview-close-icon-z-index);color:var(--zt-image-preview-close-icon-color);font-size:var(--zt-font-size-xxxl)}.zt-image-preview__close-icon--top-left{top:var(--zt-image-preview-close-icon-margin);left:var(--zt-image-preview-close-icon-margin)}.zt-image-preview__close-icon--top-right{top:var(--zt-image-preview-close-icon-margin);right:var(--zt-image-preview-close-icon-margin)}.zt-image-preview__close-icon--bottom-left{bottom:var(--zt-image-preview-close-icon-margin);left:var(--zt-image-preview-close-icon-margin)}.zt-image-preview__close-icon--bottom-right{right:var(--zt-image-preview-close-icon-margin);bottom:var(--zt-image-preview-close-icon-margin)}
1
+ :root{--zt-image-preview-index-height: 48px;--zt-image-preview-index-background: var(--zt-gray-a4);--zt-image-preview-index-text-color: var(--zt-white);--zt-image-preview-overlay-background: rgba(0, 0, 0, .9);--zt-image-preview-close-icon-color: var(--zt-gray-5);--zt-image-preview-close-icon-margin: var(--zt-padding-md);--zt-image-preview-close-icon-z-index: 1;--zt-image-preview-error-font-size: 36px}:root[zt-theme-size=large]{--zt-image-preview-error-font-size: 42px}.zt-image-preview{position:fixed;top:0;left:0;width:100%;height:100%;max-width:none;background-color:transparent;transform:none}.zt-image-preview__swipe{height:100%}.zt-image-preview__swipe-item{display:flex;align-items:center;justify-content:center;overflow:hidden}.zt-image-preview__cover{position:absolute;top:0;left:0}.zt-image-preview__image,.zt-image-preview__image-wrap{width:100%;transition-property:transform}.zt-image-preview__image--vertical,.zt-image-preview__image-wrap--vertical{width:auto;height:100%}.zt-image-preview__image img,.zt-image-preview__image-wrap img,.zt-image-preview__image video,.zt-image-preview__image-wrap video{-webkit-user-drag:none}.zt-image-preview__image .zt-image__error,.zt-image-preview__image-wrap .zt-image__error{top:30%;height:40%}.zt-image-preview__image .zt-image__error-icon,.zt-image-preview__image-wrap .zt-image__error-icon{font-size:var(--zt-image-preview-error-font-size)}.zt-image-preview__image .zt-image__loading,.zt-image-preview__image-wrap .zt-image__loading{background-color:transparent}.zt-image-preview__index{box-sizing:border-box;display:flex;align-items:center;position:absolute;bottom:0;left:0;width:100%;height:var(--zt-image-preview-index-height);padding:0 16px;background-color:var(--zt-image-preview-index-background);color:var(--zt-image-preview-index-text-color);overflow:hidden}.zt-image-preview__index-number{height:var(--zt-line-height-xl);background:rgba(45,75,115,.8);border-radius:2px;font-size:var(--zt-font-size-sm);text-align:center;line-height:var(--zt-line-height-xl);padding:0 8px}.zt-image-preview__title{flex-shrink:0;margin-left:8px;font-size:var(--zt-font-size-md);line-height:var(--zt-line-height-md)}.zt-image-preview__overlay{background:var(--zt-image-preview-overlay-background)}.zt-image-preview__close-icon{position:absolute;z-index:var(--zt-image-preview-close-icon-z-index);color:var(--zt-image-preview-close-icon-color);font-size:var(--zt-font-size-xxxl)}.zt-image-preview__close-icon--top-left{top:var(--zt-image-preview-close-icon-margin);left:var(--zt-image-preview-close-icon-margin)}.zt-image-preview__close-icon--top-right{top:var(--zt-image-preview-close-icon-margin);right:var(--zt-image-preview-close-icon-margin)}.zt-image-preview__close-icon--bottom-left{bottom:var(--zt-image-preview-close-icon-margin);left:var(--zt-image-preview-close-icon-margin)}.zt-image-preview__close-icon--bottom-right{right:var(--zt-image-preview-close-icon-margin);bottom:var(--zt-image-preview-close-icon-margin)}