pxd 0.1.8 → 0.2.0

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 (244) hide show
  1. package/README.md +2 -2
  2. package/dist/components/_internal/calendar-day.d.vue.ts +15 -13
  3. package/dist/components/_internal/dismiss-container.d.vue.ts +5 -3
  4. package/dist/components/_internal/fragment-container.d.vue.ts +5 -3
  5. package/dist/components/_internal/mention-editor.d.vue.ts +3 -1
  6. package/dist/components/_internal/mention-editor.vue +9 -3
  7. package/dist/components/_internal/step-item.d.vue.ts +5 -3
  8. package/dist/components/_internal/tree-node.d.vue.ts +37 -33
  9. package/dist/components/_internal/tree-node.vue +17 -3
  10. package/dist/components/active-graph/index.d.vue.ts +7 -5
  11. package/dist/components/active-graph/index.vue +63 -63
  12. package/dist/components/approval-card/index.d.vue.ts +5 -3
  13. package/dist/components/avatar/index.d.vue.ts +7 -5
  14. package/dist/components/avatar/index.vue +1 -1
  15. package/dist/components/backtop/index.d.vue.ts +6 -4
  16. package/dist/components/backtop/index.vue +71 -38
  17. package/dist/components/backtop/types.d.ts +1 -0
  18. package/dist/components/badge/index.d.vue.ts +7 -5
  19. package/dist/components/book/index.d.vue.ts +9 -7
  20. package/dist/components/border-beam/index.d.vue.ts +5 -3
  21. package/dist/components/breadcrumb/index.d.vue.ts +5 -3
  22. package/dist/components/breadcrumb-item/index.d.vue.ts +7 -5
  23. package/dist/components/browser/index.d.vue.ts +5 -3
  24. package/dist/components/browser/index.vue +1 -1
  25. package/dist/components/bubble/index.d.vue.ts +14 -12
  26. package/dist/components/bubble/index.vue +8 -6
  27. package/dist/components/bubble/types.d.ts +1 -1
  28. package/dist/components/bubble-group/index.d.vue.ts +17 -14
  29. package/dist/components/bubble-group/index.vue +121 -9
  30. package/dist/components/bubble-group/types.d.ts +1 -1
  31. package/dist/components/button/index.d.vue.ts +9 -7
  32. package/dist/components/button/index.vue +6 -3
  33. package/dist/components/button-group/index.d.vue.ts +5 -3
  34. package/dist/components/calendar/index.d.vue.ts +20 -18
  35. package/dist/components/card/index.d.vue.ts +9 -7
  36. package/dist/components/carousel/index.d.vue.ts +13 -11
  37. package/dist/components/checkbox/index.d.vue.ts +5 -3
  38. package/dist/components/checkbox-group/index.d.vue.ts +5 -3
  39. package/dist/components/checkerboard/index.d.vue.ts +5 -3
  40. package/dist/components/chip/index.d.vue.ts +5 -3
  41. package/dist/components/choicebox/index.d.vue.ts +5 -3
  42. package/dist/components/choicebox/types.d.ts +2 -2
  43. package/dist/components/choicebox-item/index.d.vue.ts +9 -7
  44. package/dist/components/choicebox-item/index.vue +9 -5
  45. package/dist/components/choicebox-item/types.d.ts +1 -1
  46. package/dist/components/code-block/index.d.vue.ts +7 -5
  47. package/dist/components/code-block/index.vue +6 -6
  48. package/dist/components/collapse/index.d.vue.ts +7 -5
  49. package/dist/components/collapse-group/index.d.vue.ts +5 -3
  50. package/dist/components/command-menu/index.d.vue.ts +12 -10
  51. package/dist/components/command-menu/index.vue +1 -1
  52. package/dist/components/config-provider/index.d.vue.ts +5 -14
  53. package/dist/components/confirm-popover/index.d.vue.ts +16 -14
  54. package/dist/components/confirm-popover/index.vue +1 -1
  55. package/dist/components/context-usage/index.vue +19 -12
  56. package/dist/components/copy-button/index.d.vue.ts +7 -5
  57. package/dist/components/countdown/index.d.vue.ts +17 -16
  58. package/dist/components/countdown/index.vue +3 -8
  59. package/dist/components/countdown/types.d.ts +1 -1
  60. package/dist/components/date-picker/index.d.vue.ts +5 -3
  61. package/dist/components/description/index.d.vue.ts +7 -5
  62. package/dist/components/description/index.vue +5 -2
  63. package/dist/components/description/types.d.ts +1 -1
  64. package/dist/components/drawer/index.d.vue.ts +13 -11
  65. package/dist/components/drawer/index.vue +1 -1
  66. package/dist/components/effort-slider/index.vue +47 -47
  67. package/dist/components/empty-state/index.d.vue.ts +11 -9
  68. package/dist/components/empty-state/index.vue +2 -2
  69. package/dist/components/empty-state/types.d.ts +1 -1
  70. package/dist/components/error/index.d.vue.ts +5 -3
  71. package/dist/components/error/index.vue +1 -1
  72. package/dist/components/fader/index.d.vue.ts +2 -0
  73. package/dist/components/fader/index.vue +55 -29
  74. package/dist/components/fader/types.d.ts +2 -1
  75. package/dist/components/grid/index.d.vue.ts +5 -3
  76. package/dist/components/grid-item/index.d.vue.ts +5 -3
  77. package/dist/components/hint/index.d.vue.ts +15 -13
  78. package/dist/components/hold-button/index.d.vue.ts +9 -7
  79. package/dist/components/hue-text/index.d.vue.ts +7 -5
  80. package/dist/components/image-preview/index.d.vue.ts +24 -7
  81. package/dist/components/image-preview/index.vue +122 -23
  82. package/dist/components/image-preview/types.d.ts +9 -1
  83. package/dist/components/input/index.d.vue.ts +7 -5
  84. package/dist/components/input/index.vue +1 -1
  85. package/dist/components/intersection-observer/index.d.vue.ts +7 -5
  86. package/dist/components/kbd/index.d.vue.ts +5 -3
  87. package/dist/components/kbd/index.vue +1 -1
  88. package/dist/components/label/index.d.vue.ts +5 -3
  89. package/dist/components/link-button/index.d.vue.ts +10 -8
  90. package/dist/components/list/index.d.vue.ts +12 -10
  91. package/dist/components/list/index.vue +36 -43
  92. package/dist/components/list/types.d.ts +5 -5
  93. package/dist/components/list-group/index.vue +1 -1
  94. package/dist/components/list-item/index.d.vue.ts +5 -3
  95. package/dist/components/list-item/index.vue +16 -6
  96. package/dist/components/loading-dots/index.vue +0 -1
  97. package/dist/components/loading-mask/index.d.vue.ts +13 -1
  98. package/dist/components/loading-mask/index.vue +5 -3
  99. package/dist/components/marching-ants/index.d.vue.ts +6 -4
  100. package/dist/components/marquee/index.d.vue.ts +12 -10
  101. package/dist/components/material/index.d.vue.ts +5 -3
  102. package/dist/components/mention/index.d.vue.ts +17 -13
  103. package/dist/components/mention/index.vue +35 -3
  104. package/dist/components/mention/types.d.ts +11 -0
  105. package/dist/components/menu/index.d.vue.ts +16 -14
  106. package/dist/components/message/index.d.vue.ts +1 -1
  107. package/dist/components/modal/index.d.vue.ts +13 -11
  108. package/dist/components/modal/index.vue +2 -2
  109. package/dist/components/note/index.d.vue.ts +9 -7
  110. package/dist/components/number-input/index.d.vue.ts +15 -13
  111. package/dist/components/number-input/index.vue +7 -3
  112. package/dist/components/overlay/index.d.vue.ts +5 -3
  113. package/dist/components/pagination/index.d.vue.ts +5 -3
  114. package/dist/components/pagination/index.vue +2 -2
  115. package/dist/components/pin-input/index.d.vue.ts +1 -1
  116. package/dist/components/pin-input/index.vue +1 -1
  117. package/dist/components/placeholder/index.d.vue.ts +5 -3
  118. package/dist/components/popover/index.vue +4 -5
  119. package/dist/components/progress/index.d.vue.ts +5 -3
  120. package/dist/components/project-banner/index.d.vue.ts +9 -7
  121. package/dist/components/radial-burst/index.d.vue.ts +5 -3
  122. package/dist/components/radio/index.d.vue.ts +5 -3
  123. package/dist/components/radio-group/index.d.vue.ts +5 -3
  124. package/dist/components/rating/index.d.vue.ts +1 -1
  125. package/dist/components/reactions/index.d.vue.ts +5 -3
  126. package/dist/components/reasoning/index.d.vue.ts +6 -4
  127. package/dist/components/reasoning/index.vue +14 -12
  128. package/dist/components/reasoning/types.d.ts +5 -7
  129. package/dist/components/resizable/index.d.vue.ts +11 -9
  130. package/dist/components/resizable/index.vue +2 -2
  131. package/dist/components/reveal/index.d.vue.ts +6 -4
  132. package/dist/components/rolling-number/index.d.vue.ts +1 -1
  133. package/dist/components/scroll-progress/index.d.vue.ts +7 -5
  134. package/dist/components/scroll-text/index.d.vue.ts +6 -3
  135. package/dist/components/scroll-text/index.vue +11 -2
  136. package/dist/components/scroll-text/types.d.ts +1 -0
  137. package/dist/components/scrollable/index.d.vue.ts +5 -3
  138. package/dist/components/scrollable/index.vue +119 -179
  139. package/dist/components/search-input/index.d.vue.ts +7 -5
  140. package/dist/components/select/index.d.vue.ts +22 -20
  141. package/dist/components/select/index.vue +2 -2
  142. package/dist/components/shimmer-text/index.d.vue.ts +6 -4
  143. package/dist/components/skeleton/index.d.vue.ts +5 -3
  144. package/dist/components/slider/index.vue +74 -74
  145. package/dist/components/spinner/index.vue +0 -1
  146. package/dist/components/spinner-dots/index.vue +0 -1
  147. package/dist/components/split-button/index.d.vue.ts +18 -16
  148. package/dist/components/stack/index.d.vue.ts +5 -3
  149. package/dist/components/steps/index.d.vue.ts +9 -7
  150. package/dist/components/steps/index.vue +3 -3
  151. package/dist/components/stick-to-bottom/index.d.vue.ts +13 -10
  152. package/dist/components/stick-to-bottom/index.vue +25 -10
  153. package/dist/components/stick-to-bottom/types.d.ts +2 -1
  154. package/dist/components/swipe-cell/index.d.vue.ts +21 -19
  155. package/dist/components/switch/index.d.vue.ts +5 -3
  156. package/dist/components/switch/index.vue +1 -1
  157. package/dist/components/switch-item/index.d.vue.ts +5 -3
  158. package/dist/components/tabs/index.vue +1 -1
  159. package/dist/components/teleport/index.d.vue.ts +7 -5
  160. package/dist/components/text/index.d.vue.ts +5 -3
  161. package/dist/components/textarea/index.vue +1 -1
  162. package/dist/components/time-picker/index.d.vue.ts +5 -3
  163. package/dist/components/time-picker/index.vue +3 -8
  164. package/dist/components/timeline-item/index.d.vue.ts +7 -5
  165. package/dist/components/toc/index.d.vue.ts +11 -9
  166. package/dist/components/toc/index.vue +81 -62
  167. package/dist/components/todo-list/index.d.vue.ts +25 -23
  168. package/dist/components/todo-list/index.vue +2 -3
  169. package/dist/components/todo-list/types.d.ts +1 -1
  170. package/dist/components/toggle/index.d.vue.ts +7 -5
  171. package/dist/components/toggle/index.vue +1 -1
  172. package/dist/components/toggle-button/index.d.vue.ts +5 -3
  173. package/dist/components/toggle-button/index.vue +1 -1
  174. package/dist/components/toggle-button-group/index.d.vue.ts +5 -3
  175. package/dist/components/tool-call/index.d.vue.ts +15 -1
  176. package/dist/components/tool-call/index.vue +26 -16
  177. package/dist/components/tooltip/index.d.vue.ts +11 -9
  178. package/dist/components/tour/index.d.vue.ts +2 -2
  179. package/dist/components/tour/index.vue +1 -1
  180. package/dist/components/tour/types.d.ts +1 -1
  181. package/dist/components/tree/index.d.vue.ts +44 -42
  182. package/dist/components/tree/index.vue +16 -12
  183. package/dist/components/virtual-list/index.d.vue.ts +13 -10
  184. package/dist/components/virtual-list/index.vue +10 -5
  185. package/dist/components/virtual-list/types.d.ts +2 -1
  186. package/dist/composables/_internal/use-details-collapse.d.ts +2 -1
  187. package/dist/composables/_internal/use-focus-trap.d.ts +1 -2
  188. package/dist/composables/_internal/use-forward-ref-expose.d.ts +1 -1
  189. package/dist/composables/_internal/use-list-keyboard-controller.d.ts +1 -1
  190. package/dist/composables/_internal/use-list-navigation.d.ts +2 -1
  191. package/dist/composables/_internal/use-list-search.d.ts +2 -1
  192. package/dist/composables/_internal/use-list-search.js +1 -3
  193. package/dist/composables/_internal/use-mention-editor.d.ts +10 -5
  194. package/dist/composables/_internal/use-mention-editor.js +97 -25
  195. package/dist/composables/_internal/use-message-group.d.ts +1 -1
  196. package/dist/composables/_internal/use-overlay-manager.d.ts +1 -1
  197. package/dist/composables/_internal/use-remote-search.d.ts +2 -1
  198. package/dist/composables/_internal/use-selected-list-item.d.ts +1 -1
  199. package/dist/composables/_internal/use-swipe-gesture.d.ts +1 -2
  200. package/dist/composables/_internal/use-tailwind-variant.js +1 -1
  201. package/dist/composables/_internal/use-tour-target.d.ts +1 -1
  202. package/dist/composables/_internal/use-tree.d.ts +2 -2
  203. package/dist/composables/_internal/use-word-limit.d.ts +2 -1
  204. package/dist/composables/use-countdown.d.ts +2 -7
  205. package/dist/composables/use-countdown.js +6 -6
  206. package/dist/composables/use-deferred-value.d.ts +2 -1
  207. package/dist/composables/use-delay-change.d.ts +2 -1
  208. package/dist/composables/use-delay-destroy.d.ts +2 -2
  209. package/dist/composables/use-intersection-observer.d.ts +1 -1
  210. package/dist/composables/use-mutation-observer.d.ts +1 -1
  211. package/dist/composables/use-mutation-observer.js +4 -1
  212. package/dist/composables/use-outside-click.d.ts +1 -2
  213. package/dist/composables/use-repeat-action.d.ts +1 -2
  214. package/dist/composables/use-resize-observer.d.ts +1 -1
  215. package/dist/composables/use-scrollspy.d.ts +2 -1
  216. package/dist/composables/use-stick-to-bottom.d.ts +6 -2
  217. package/dist/composables/use-stick-to-bottom.js +18 -2
  218. package/dist/composables/use-virtual-list.d.ts +9 -3
  219. package/dist/composables/use-virtual-list.js +92 -48
  220. package/dist/constants/size.d.ts +1 -0
  221. package/dist/constants/size.js +1 -0
  222. package/dist/constants/tooltip-variants.d.ts +1 -1
  223. package/dist/constants/tooltip-variants.js +1 -1
  224. package/dist/index.d.ts +1 -1
  225. package/dist/index.js +1 -1
  226. package/dist/locales/en-us.d.ts +0 -11
  227. package/dist/locales/en-us.js +0 -11
  228. package/dist/locales/zh-cn.d.ts +0 -11
  229. package/dist/locales/zh-cn.js +0 -11
  230. package/dist/styles/styles.css +2 -2
  231. package/dist/types/shared/props.d.ts +4 -0
  232. package/dist/types/shared/utils.d.ts +4 -1
  233. package/dist/utils/_internal/mention-html.d.ts +32 -0
  234. package/dist/utils/_internal/mention-html.js +45 -17
  235. package/dist/utils/_internal/observer.d.ts +2 -1
  236. package/dist/utils/dom.d.ts +5 -6
  237. package/dist/utils/dom.js +5 -31
  238. package/dist/utils/event.d.ts +0 -1
  239. package/dist/utils/event.js +0 -3
  240. package/dist/utils/helper.d.ts +1 -4
  241. package/dist/utils/mention-html.js +13 -38
  242. package/dist/version.d.ts +1 -0
  243. package/dist/version.js +1 -0
  244. package/package.json +12 -12
@@ -1,17 +1,19 @@
1
1
  import type { CountdownProps } from './types';
2
- declare var __VLS_1: {
3
- active: boolean;
4
- times: {
5
- dd: string;
6
- hh: string;
7
- mm: string;
8
- ss: string;
9
- ms: string;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ default?: (props: {
5
+ enabled: boolean;
6
+ times: {
7
+ dd: string;
8
+ hh: string;
9
+ mm: string;
10
+ ss: string;
11
+ ms: string;
12
+ };
13
+ }) => any;
10
14
  };
11
15
  };
12
- type __VLS_Slots = {} & {
13
- default?: (props: typeof __VLS_1) => any;
14
- };
16
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
15
17
  declare const __VLS_base: import("vue").DefineComponent<CountdownProps, {
16
18
  reset: () => void;
17
19
  times: import("vue").ComputedRef<{
@@ -22,21 +24,20 @@ declare const __VLS_base: import("vue").DefineComponent<CountdownProps, {
22
24
  ms: string;
23
25
  }>;
24
26
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
- change: (active: boolean) => any;
27
+ change: (enabled: boolean) => any;
26
28
  reset: () => any;
27
29
  finish: () => any;
28
30
  }, string, import("vue").PublicProps, Readonly<CountdownProps> & Readonly<{
29
- onChange?: ((active: boolean) => any) | undefined;
31
+ onChange?: ((enabled: boolean) => any) | undefined;
30
32
  onReset?: (() => any) | undefined;
31
33
  onFinish?: (() => any) | undefined;
32
34
  }>, {
33
- duration: number;
34
35
  format: string;
35
36
  millisecond: boolean;
36
- active: boolean;
37
+ duration: number;
38
+ enabled: boolean;
37
39
  endTime: number;
38
40
  autoReset: boolean;
39
- precision: number;
40
41
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
41
42
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
42
43
  declare const _default: typeof __VLS_export;
@@ -3,7 +3,7 @@ import { computed, onBeforeUnmount } from "vue";
3
3
  import { useCountdown } from "../../composables/use-countdown.js";
4
4
  import { dayjs, dayjsDurationPlugin, dayjsMillisecondTokenPlugin } from "../../utils/date.js";
5
5
  defineOptions({
6
- name: "PCountDown",
6
+ name: "PCountdown",
7
7
  inheritAttrs: false
8
8
  });
9
9
  const props = defineProps({
@@ -16,7 +16,7 @@ const props = defineProps({
16
16
  type: Boolean,
17
17
  required: false
18
18
  },
19
- active: {
19
+ enabled: {
20
20
  type: Boolean,
21
21
  required: false,
22
22
  default: false
@@ -40,11 +40,6 @@ const props = defineProps({
40
40
  required: false,
41
41
  default: 0
42
42
  },
43
- precision: {
44
- type: Number,
45
- required: false,
46
- default: 0
47
- },
48
43
  millisecond: {
49
44
  type: Boolean,
50
45
  required: false,
@@ -95,7 +90,7 @@ defineExpose({
95
90
  class="pxd-countdown relative w-max max-w-full leading-none tabular-nums text-trim-both"
96
91
  v-bind="$attrs"
97
92
  >
98
- <slot :active="active" :times="times">
93
+ <slot :enabled="enabled" :times="times">
99
94
  {{ displayTimes }}
100
95
  </slot>
101
96
  </div>
@@ -5,7 +5,7 @@ export interface CountdownProps extends CountdownOptions {
5
5
  }
6
6
 
7
7
  export interface CountdownEmits {
8
- change: [active: boolean]
8
+ change: [enabled: boolean]
9
9
  reset: []
10
10
  finish: []
11
11
  }
@@ -1,9 +1,11 @@
1
1
  import type { ComponentDateTimeValue } from '../../types/shared/props';
2
2
  import type { DatePickerProps } from './types';
3
- declare var __VLS_20: {};
4
- type __VLS_Slots = {} & {
5
- suffix?: (props: typeof __VLS_20) => any;
3
+ declare const __VLS_template: () => {
4
+ __VLS_Slots: {
5
+ suffix?: (props: {}) => any;
6
+ };
6
7
  };
8
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
7
9
  declare const __VLS_base: import("vue").DefineComponent<DatePickerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
10
  change: (args_0: ComponentDateTimeValue) => any;
9
11
  "update:model-value": (args_0: ComponentDateTimeValue) => any;
@@ -1,10 +1,12 @@
1
1
  import type { DescriptionProps } from './types';
2
- declare var __VLS_1: {}, __VLS_14: {};
3
- type __VLS_Slots = {} & {
4
- title?: (props: typeof __VLS_1) => any;
5
- } & {
6
- description?: (props: typeof __VLS_14) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ title?: (props: {}) => any;
5
+ } & {
6
+ description?: (props: {}) => any;
7
+ };
7
8
  };
9
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
8
10
  declare const __VLS_base: import("vue").DefineComponent<DescriptionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DescriptionProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
11
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
12
  declare const _default: typeof __VLS_export;
@@ -15,7 +15,7 @@ defineProps({
15
15
  required: false
16
16
  },
17
17
  description: {
18
- type: String,
18
+ type: null,
19
19
  required: false
20
20
  }
21
21
  });
@@ -34,7 +34,10 @@ defineProps({
34
34
  <InformationIcon class="text-base scale-125" />
35
35
  </PTooltip>
36
36
  </dt>
37
- <dd class="pxd-description--description text-sm font-medium leading-4 text-foreground">
37
+ <dd
38
+ v-if="description || $slots.description"
39
+ class="pxd-description--description text-sm font-medium leading-4 text-foreground empty:hidden"
40
+ >
38
41
  <slot name="description">
39
42
  {{ description }}
40
43
  </slot>
@@ -3,5 +3,5 @@ import type { ComponentText } from '../../types/shared/props'
3
3
  export interface DescriptionProps {
4
4
  title?: ComponentText
5
5
  tooltip?: string
6
- description?: string
6
+ description?: ComponentText
7
7
  }
@@ -1,16 +1,18 @@
1
1
  import type { DrawerProps } from './types';
2
- declare var __VLS_16: {}, __VLS_18: {}, __VLS_20: {}, __VLS_35: {}, __VLS_37: {};
3
- type __VLS_Slots = {} & {
4
- header?: (props: typeof __VLS_16) => any;
5
- } & {
6
- title?: (props: typeof __VLS_18) => any;
7
- } & {
8
- subtitle?: (props: typeof __VLS_20) => any;
9
- } & {
10
- default?: (props: typeof __VLS_35) => any;
11
- } & {
12
- footer?: (props: typeof __VLS_37) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ header?: (props: {}) => any;
5
+ } & {
6
+ title?: (props: {}) => any;
7
+ } & {
8
+ subtitle?: (props: {}) => any;
9
+ } & {
10
+ default?: (props: {}) => any;
11
+ } & {
12
+ footer?: (props: {}) => any;
13
+ };
13
14
  };
15
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
14
16
  declare const __VLS_base: import("vue").DefineComponent<DrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
17
  change: (args_0: boolean) => any;
16
18
  "update:model-value": (visible: boolean) => any;
@@ -211,7 +211,7 @@ watch(() => isVisible.value, (visible) => {
211
211
  </header>
212
212
 
213
213
  <div
214
- class="pxd-drawer--content p-5 empty:py-2.5 h-full flex-1 scrollbar-gutter-stable overflow-auto"
214
+ class="pxd-drawer--content p-5 empty:py-2.5 h-full flex-1 overflow-auto"
215
215
  :class="contentClass"
216
216
  >
217
217
  <slot />
@@ -52,22 +52,6 @@ const props = defineProps({
52
52
  }
53
53
  });
54
54
  const emits = defineEmits(["change", "update:model-value"]);
55
- const configProvider = useConfigProvider();
56
- const modelValue = useModelValue(props, emits, { withChange: false });
57
- const { attrs, classes } = useTailwindVariant({
58
- base: "pxd-effort-slider--track group relative flex w-full max-w-full shrink-0 touch-none items-center rounded-full bg-gray-200 select-none",
59
- variants: {
60
- size: {
61
- sm: "h-2",
62
- md: "h-2.5",
63
- lg: "h-3.5"
64
- },
65
- disabled: { true: "cursor-not-allowed" }
66
- }
67
- }, { selection: () => ({
68
- size: props.size || configProvider.size,
69
- disabled: props.disabled
70
- }) });
71
55
  const thumbClasses = createTailwindVariant({
72
56
  base: "pxd-effort-slider--thumb group rounded-xs absolute -translate-x-1/2 transform-gpu touch-none bg-none self-focus-ring outline-none motion-safe:before:transition-appearance",
73
57
  variants: {
@@ -87,6 +71,11 @@ let lastUpdatedValue = null;
87
71
  let stopMoveListener = null;
88
72
  const PARTICLE_COUNT = 16;
89
73
  const PARTICLE_DURATION = 2;
74
+ const scheduleUpdate = throttleByRaf(() => {
75
+ if (lastClientX !== null) {
76
+ updateFromPosition(lastClientX);
77
+ }
78
+ });
90
79
  const trackRef = shallowRef();
91
80
  const labelRef = shallowRef();
92
81
  const dragging = shallowRef(false);
@@ -118,32 +107,6 @@ const percentage = computed(() => {
118
107
  return count > 1 ? currentIndex.value / (count - 1) * 100 : 100;
119
108
  });
120
109
  const labelVisible = computed(() => dragging.value || focused.value);
121
- function clamp(value, lower, upper) {
122
- return Math.min(Math.max(value, lower), upper);
123
- }
124
- function particleSeed(index, salt) {
125
- const value = Math.sin(index * 127.1 + salt * 311.7) * 43758.5453;
126
- return value - Math.floor(value);
127
- }
128
- function updateLabelShift() {
129
- const label = labelRef.value;
130
- const track = trackRef.value;
131
- if (!label || !track) {
132
- return;
133
- }
134
- // Layout pixels: `getBoundingClientRect()` reports the box already scaled by an ancestor
135
- // zoom or transform, while the shift below is applied in unscaled pixels.
136
- const trackWidth = track.clientWidth;
137
- const labelWidth = label.offsetWidth;
138
- if (!trackWidth || labelWidth > trackWidth) {
139
- labelShift.value = 0;
140
- return;
141
- }
142
- const center = percentage.value / 100 * trackWidth;
143
- const half = labelWidth / 2;
144
- // The label stays inside the track, so at the ends it stops at the track edge.
145
- labelShift.value = clamp(center, half, trackWidth - half) - center;
146
- }
147
110
  const tickList = computed(() => {
148
111
  const count = levelCount.value;
149
112
  return Array.from({ length: Math.max(0, count - 2) }, (_, index) => {
@@ -181,6 +144,48 @@ const particleList = computed(() => {
181
144
  };
182
145
  });
183
146
  });
147
+ const configProvider = useConfigProvider();
148
+ const modelValue = useModelValue(props, emits, { withChange: false });
149
+ const { attrs, classes } = useTailwindVariant({
150
+ base: "pxd-effort-slider--track group relative flex w-full max-w-full shrink-0 touch-none items-center rounded-full bg-gray-200 select-none",
151
+ variants: {
152
+ size: {
153
+ sm: "h-2",
154
+ md: "h-2.5",
155
+ lg: "h-3.5"
156
+ },
157
+ disabled: { true: "cursor-not-allowed" }
158
+ }
159
+ }, { selection: () => ({
160
+ size: props.size || configProvider.size,
161
+ disabled: props.disabled
162
+ }) });
163
+ function clamp(value, lower, upper) {
164
+ return Math.min(Math.max(value, lower), upper);
165
+ }
166
+ function particleSeed(index, salt) {
167
+ const value = Math.sin(index * 127.1 + salt * 311.7) * 43758.5453;
168
+ return value - Math.floor(value);
169
+ }
170
+ function updateLabelShift() {
171
+ const label = labelRef.value;
172
+ const track = trackRef.value;
173
+ if (!label || !track) {
174
+ return;
175
+ }
176
+ // Layout pixels: `getBoundingClientRect()` reports the box already scaled by an ancestor
177
+ // zoom or transform, while the shift below is applied in unscaled pixels.
178
+ const trackWidth = track.clientWidth;
179
+ const labelWidth = label.offsetWidth;
180
+ if (!trackWidth || labelWidth > trackWidth) {
181
+ labelShift.value = 0;
182
+ return;
183
+ }
184
+ const center = percentage.value / 100 * trackWidth;
185
+ const half = labelWidth / 2;
186
+ // The label stays inside the track, so at the ends it stops at the track edge.
187
+ labelShift.value = clamp(center, half, trackWidth - half) - center;
188
+ }
184
189
  function setValue(index) {
185
190
  const option = optionList.value[index];
186
191
  if (!option) {
@@ -218,11 +223,6 @@ function updateFromPosition(clientX) {
218
223
  // what this drag emitted, not against `modelValue`.
219
224
  lastUpdatedValue = setValue(index);
220
225
  }
221
- const scheduleUpdate = throttleByRaf(() => {
222
- if (lastClientX !== null) {
223
- updateFromPosition(lastClientX);
224
- }
225
- });
226
226
  function onTrackPointerdown(ev) {
227
227
  if (props.disabled || dragging.value) {
228
228
  return;
@@ -1,14 +1,16 @@
1
1
  import type { EmptyStateProps } from './types';
2
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
3
- type __VLS_Slots = {} & {
4
- icon?: (props: typeof __VLS_1) => any;
5
- } & {
6
- title?: (props: typeof __VLS_3) => any;
7
- } & {
8
- description?: (props: typeof __VLS_5) => any;
9
- } & {
10
- default?: (props: typeof __VLS_7) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ icon?: (props: {}) => any;
5
+ } & {
6
+ title?: (props: {}) => any;
7
+ } & {
8
+ description?: (props: {}) => any;
9
+ } & {
10
+ default?: (props: {}) => any;
11
+ };
11
12
  };
13
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
12
14
  declare const __VLS_base: import("vue").DefineComponent<EmptyStateProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<EmptyStateProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
15
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
16
  declare const _default: typeof __VLS_export;
@@ -9,7 +9,7 @@ defineProps({
9
9
  required: false
10
10
  },
11
11
  description: {
12
- type: String,
12
+ type: null,
13
13
  required: false
14
14
  }
15
15
  });
@@ -37,7 +37,7 @@ defineProps({
37
37
  </slot>
38
38
  </p>
39
39
 
40
- <p class="pxd-empty-state--description text-[0.8125rem] text-center text-foreground-secondary">
40
+ <p class="pxd-empty-state--description text-xs text-center text-foreground-secondary">
41
41
  <slot name="description">
42
42
  {{ description }}
43
43
  </slot>
@@ -2,5 +2,5 @@ import type { ComponentText } from '../../types/shared/props'
2
2
 
3
3
  export interface EmptyStateProps {
4
4
  title?: ComponentText
5
- description?: string
5
+ description?: ComponentText
6
6
  }
@@ -1,8 +1,10 @@
1
1
  import type { ErrorProps } from './types';
2
- declare var __VLS_6: {};
3
- type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_6) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ default?: (props: {}) => any;
5
+ };
5
6
  };
7
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
6
8
  declare const __VLS_base: import("vue").DefineComponent<ErrorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ErrorProps> & Readonly<{}>, {
7
9
  variant: "default" | "card";
8
10
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -37,7 +37,7 @@ const { attrs, classes } = useTailwindVariant({
37
37
  },
38
38
  size: {
39
39
  xs: "text-xs [--mt:0.125rem]",
40
- sm: "text-[0.8125rem] [--mt:0.125rem]",
40
+ sm: "text-sm [--mt:0.125rem]",
41
41
  md: "text-sm [--mt:0.125rem]",
42
42
  lg: "text-base [--mt:0.25rem]"
43
43
  }
@@ -1,5 +1,7 @@
1
1
  import type { FaderProps } from './types';
2
2
  declare const __VLS_export: import("vue").DefineComponent<FaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FaderProps> & Readonly<{}>, {
3
+ size: number;
4
+ threshold: number;
3
5
  direction: import("../../types/shared/props.js").ComponentDirection | "both";
4
6
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
7
  declare const _default: typeof __VLS_export;
@@ -1,5 +1,6 @@
1
1
  <script setup>
2
2
  import { computed, onBeforeUnmount, shallowRef, watch } from "vue";
3
+ import { useMutationObserver } from "../../composables/use-mutation-observer.js";
3
4
  import { useResizeObserver } from "../../composables/use-resize-observer.js";
4
5
  import { getElement } from "../../utils/dom.js";
5
6
  import { cachedOff, cachedOn, throttleByRaf } from "../../utils/event.js";
@@ -11,62 +12,87 @@ defineOptions({
11
12
  const props = defineProps({
12
13
  size: {
13
14
  type: Number,
14
- required: false
15
+ required: false,
16
+ default: 16
15
17
  },
16
18
  color: {
17
19
  type: String,
18
20
  required: false
19
21
  },
20
- scrollTarget: {
21
- type: null,
22
- required: false
22
+ threshold: {
23
+ type: Number,
24
+ required: false,
25
+ default: 16
23
26
  },
24
27
  direction: {
25
28
  type: String,
26
29
  required: false,
27
30
  default: "both"
31
+ },
32
+ scrollTarget: {
33
+ type: null,
34
+ required: false
28
35
  }
29
36
  });
30
- const DEFAULT_SIZE = 16;
31
- const DIFF_THRESHOLD = 16;
32
- const fader = shallowRef({
33
- top: false,
34
- left: false,
35
- right: false,
36
- bottom: false
37
- });
37
+ const showTop = shallowRef(false);
38
+ const showLeft = shallowRef(false);
39
+ const showRight = shallowRef(false);
40
+ const showBottom = shallowRef(false);
41
+ const observedContent = shallowRef([]);
38
42
  const computedStyle = computed(() => ({
39
43
  "--fader-color": props.color,
40
44
  "--fader-size": getCssUnitValue(props.size)
41
45
  }));
42
46
  const formattedContainer = computed(() => getElement(props.scrollTarget));
43
- const onContainerScroll = throttleByRaf(() => {
47
+ const updateFaders = throttleByRaf(() => {
44
48
  const container = formattedContainer.value;
45
49
  if (!container || !container.isConnected) {
46
50
  return;
47
51
  }
48
- const { size = DEFAULT_SIZE } = props;
52
+ const { size, threshold } = props;
49
53
  const { scrollLeft, scrollWidth, clientWidth, scrollTop, clientHeight, scrollHeight } = container;
50
- fader.value = {
51
- left: scrollLeft >= size,
52
- right: scrollLeft + clientWidth < scrollWidth - DIFF_THRESHOLD,
53
- top: scrollTop >= size,
54
- bottom: scrollTop + clientHeight < scrollHeight - DIFF_THRESHOLD
55
- };
54
+ showLeft.value = scrollLeft >= size;
55
+ showRight.value = scrollLeft + clientWidth < scrollWidth - threshold;
56
+ showTop.value = scrollTop >= size;
57
+ showBottom.value = scrollTop + clientHeight < scrollHeight - threshold;
56
58
  });
57
- useResizeObserver(() => formattedContainer.value, onContainerScroll);
59
+ useResizeObserver(() => {
60
+ const container = formattedContainer.value;
61
+ return container ? [container, ...observedContent.value] : [];
62
+ }, updateFaders);
63
+ useMutationObserver(() => formattedContainer.value, (items) => {
64
+ if (items.some((item) => item.entry.type === "childList")) {
65
+ syncObservedContent();
66
+ }
67
+ updateFaders();
68
+ }, {
69
+ childList: true,
70
+ subtree: true,
71
+ attributes: true,
72
+ attributeFilter: ["class", "style"]
73
+ });
74
+ function syncObservedContent() {
75
+ const container = formattedContainer.value;
76
+ const next = container ? Array.from(container.children) : [];
77
+ const prev = observedContent.value;
78
+ if (prev.length === next.length && prev.every((el, i) => el === next[i])) {
79
+ return;
80
+ }
81
+ observedContent.value = next;
82
+ }
58
83
  watch(() => formattedContainer.value, (container, oldDom) => {
59
84
  if (oldDom) {
60
- cachedOff(oldDom, "scroll", onContainerScroll);
85
+ cachedOff(oldDom, "scroll", updateFaders);
61
86
  }
62
87
  if (!container) {
63
88
  return;
64
89
  }
65
- cachedOn(container, "scroll", onContainerScroll, { passive: true });
90
+ cachedOn(container, "scroll", updateFaders, { passive: true });
91
+ syncObservedContent();
66
92
  }, { immediate: true });
67
93
  onBeforeUnmount(() => {
68
- onContainerScroll.cancel();
69
- cachedOff(formattedContainer.value, "scroll", onContainerScroll);
94
+ updateFaders.cancel();
95
+ cachedOff(formattedContainer.value, "scroll", updateFaders);
70
96
  });
71
97
  </script>
72
98
 
@@ -79,14 +105,14 @@ onBeforeUnmount(() => {
79
105
  v-bind="$attrs"
80
106
  >
81
107
  <div
82
- v-if="['both', 'horizontal'].includes(direction)"
108
+ v-if="direction !== 'vertical'"
83
109
  class="pxd-fader--item horizontal inset-0 absolute rounded-inherit before:default-transition-duration before:default-transition-timing-function after:default-transition-duration after:default-transition-timing-function"
84
- :class="{ left: fader.left, right: fader.right }"
110
+ :class="{ left: showLeft, right: showRight }"
85
111
  />
86
112
  <div
87
- v-if="['both', 'vertical'].includes(direction)"
113
+ v-if="direction !== 'horizontal'"
88
114
  class="pxd-fader--item vertical inset-0 absolute rounded-inherit before:default-transition-duration before:default-transition-timing-function after:default-transition-duration after:default-transition-timing-function"
89
- :class="{ top: fader.top, bottom: fader.bottom }"
115
+ :class="{ top: showTop, bottom: showBottom }"
90
116
  />
91
117
  </div>
92
118
  </template>
@@ -4,6 +4,7 @@ import type { ComponentPublicInstance } from 'vue'
4
4
  export interface FaderProps {
5
5
  size?: number
6
6
  color?: string
7
- scrollTarget?: string | HTMLElement | ComponentPublicInstance | null
7
+ threshold?: number
8
8
  direction?: ComponentDirection | 'both'
9
+ scrollTarget?: string | HTMLElement | ComponentPublicInstance | null
9
10
  }
@@ -1,8 +1,10 @@
1
1
  import type { GridProps } from './types';
2
- declare var __VLS_1: {};
3
- type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_1) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ default?: (props: {}) => any;
5
+ };
5
6
  };
7
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
6
8
  declare const __VLS_base: import("vue").DefineComponent<GridProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<GridProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
9
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
8
10
  declare const _default: typeof __VLS_export;
@@ -1,8 +1,10 @@
1
1
  import type { GridItemProps } from './types';
2
- declare var __VLS_1: {};
3
- type __VLS_Slots = {} & {
4
- default?: (props: typeof __VLS_1) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ default?: (props: {}) => any;
5
+ };
5
6
  };
7
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
6
8
  declare const __VLS_base: import("vue").DefineComponent<GridItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<GridItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
9
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
8
10
  declare const _default: typeof __VLS_export;
@@ -1,18 +1,20 @@
1
1
  import type { HintProps, HintStatus } from './types';
2
- declare var __VLS_10: {
3
- status: HintStatus;
4
- }, __VLS_13: {
5
- status: HintStatus;
6
- value: unknown;
7
- error: unknown;
8
- activeTrigger: HTMLElement | null;
9
- activeTriggerIndex: number;
10
- };
11
- type __VLS_Slots = {} & {
12
- default?: (props: typeof __VLS_10) => any;
13
- } & {
14
- content?: (props: typeof __VLS_13) => any;
2
+ declare const __VLS_template: () => {
3
+ __VLS_Slots: {
4
+ default?: (props: {
5
+ status: HintStatus;
6
+ }) => any;
7
+ } & {
8
+ content?: (props: {
9
+ status: HintStatus;
10
+ value: unknown;
11
+ error: unknown;
12
+ activeTrigger: HTMLElement | null;
13
+ activeTriggerIndex: number;
14
+ }) => any;
15
+ };
15
16
  };
17
+ type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
16
18
  declare const __VLS_base: import("vue").DefineComponent<HintProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
19
  close: () => any;
18
20
  }, string, import("vue").PublicProps, Readonly<HintProps> & Readonly<{