pxd 0.1.6 → 0.1.8

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 (237) hide show
  1. package/dist/components/_internal/mention-editor.d.vue.ts +23 -14
  2. package/dist/components/_internal/mention-editor.vue +78 -10
  3. package/dist/components/_internal/tree-node.d.vue.ts +2 -2
  4. package/dist/components/_internal/tree-node.vue +1 -1
  5. package/dist/components/active-graph/index.vue +3 -3
  6. package/dist/components/approval-card/index.d.vue.ts +11 -1
  7. package/dist/components/approval-card/index.vue +28 -8
  8. package/dist/components/approval-card/types.d.ts +5 -6
  9. package/dist/components/avatar/index.vue +1 -1
  10. package/dist/components/backtop/index.d.vue.ts +1 -1
  11. package/dist/components/backtop/index.vue +32 -10
  12. package/dist/components/badge/index.vue +2 -2
  13. package/dist/components/book/index.vue +1 -1
  14. package/dist/components/book/types.d.ts +2 -2
  15. package/dist/components/breadcrumb-item/index.vue +1 -1
  16. package/dist/components/browser/index.vue +1 -1
  17. package/dist/components/bubble/index.d.vue.ts +1 -1
  18. package/dist/components/bubble/index.vue +6 -6
  19. package/dist/components/bubble/types.d.ts +1 -1
  20. package/dist/components/bubble-group/index.d.vue.ts +11 -3
  21. package/dist/components/bubble-group/index.vue +31 -19
  22. package/dist/components/bubble-group/types.d.ts +1 -0
  23. package/dist/components/button/index.vue +2 -2
  24. package/dist/components/button/types.d.ts +2 -2
  25. package/dist/components/button-group/types.d.ts +2 -2
  26. package/dist/components/calendar/index.vue +4 -4
  27. package/dist/components/carousel/types.d.ts +2 -2
  28. package/dist/components/checkbox/index.vue +1 -1
  29. package/dist/components/checkbox/types.d.ts +2 -2
  30. package/dist/components/checkerboard/index.vue +1 -1
  31. package/dist/components/chip/index.vue +1 -1
  32. package/dist/components/chip/types.d.ts +2 -2
  33. package/dist/components/choicebox/types.d.ts +2 -2
  34. package/dist/components/choicebox-item/index.vue +1 -1
  35. package/dist/components/choicebox-item/types.d.ts +2 -2
  36. package/dist/components/code-block/index.vue +12 -12
  37. package/dist/components/code-block/types.d.ts +2 -2
  38. package/dist/components/collapse/index.vue +6 -6
  39. package/dist/components/collapse/types.d.ts +2 -2
  40. package/dist/components/collapse-group/index.vue +6 -6
  41. package/dist/components/command-menu/index.d.vue.ts +1 -1
  42. package/dist/components/command-menu/index.vue +17 -5
  43. package/dist/components/command-menu/types.d.ts +8 -1
  44. package/dist/components/config-provider/index.d.vue.ts +3 -0
  45. package/dist/components/confirm-popover/index.vue +1 -1
  46. package/dist/components/confirm-popover/types.d.ts +5 -5
  47. package/dist/components/context-usage/index.vue +13 -6
  48. package/dist/components/copy-button/index.d.vue.ts +2 -0
  49. package/dist/components/copy-button/index.vue +7 -3
  50. package/dist/components/copy-button/types.d.ts +3 -2
  51. package/dist/components/countdown/index.d.vue.ts +1 -1
  52. package/dist/components/countdown/index.vue +1 -1
  53. package/dist/components/date-picker/index.d.vue.ts +11 -1
  54. package/dist/components/date-picker/index.vue +4 -2
  55. package/dist/components/description/types.d.ts +2 -2
  56. package/dist/components/drawer/index.vue +4 -1
  57. package/dist/components/drawer/types.d.ts +4 -4
  58. package/dist/components/effort-slider/index.vue +13 -16
  59. package/dist/components/ellipsis-text/types.d.ts +3 -3
  60. package/dist/components/empty-state/index.vue +1 -1
  61. package/dist/components/empty-state/types.d.ts +2 -2
  62. package/dist/components/error/index.vue +2 -2
  63. package/dist/components/error/types.d.ts +2 -2
  64. package/dist/components/feedback-bar/index.vue +4 -4
  65. package/dist/components/gauge/index.vue +3 -3
  66. package/dist/components/hint/index.vue +2 -2
  67. package/dist/components/hold-button/index.d.vue.ts +2 -4
  68. package/dist/components/hold-button/index.vue +9 -13
  69. package/dist/components/hold-button/types.d.ts +2 -4
  70. package/dist/components/hue-text/types.d.ts +2 -2
  71. package/dist/components/image-preview/index.vue +6 -6
  72. package/dist/components/input/index.d.vue.ts +6 -6
  73. package/dist/components/input/index.vue +5 -5
  74. package/dist/components/kbd/index.vue +1 -1
  75. package/dist/components/kbd/types.d.ts +2 -2
  76. package/dist/components/link-button/index.d.vue.ts +1 -1
  77. package/dist/components/link-button/types.d.ts +1 -1
  78. package/dist/components/list/index.d.vue.ts +2 -1
  79. package/dist/components/list/index.vue +8 -2
  80. package/dist/components/list/types.d.ts +16 -8
  81. package/dist/components/list-group/index.vue +1 -7
  82. package/dist/components/list-group/types.d.ts +1 -1
  83. package/dist/components/list-item/index.d.vue.ts +2 -2
  84. package/dist/components/list-item/index.vue +16 -3
  85. package/dist/components/list-item/types.d.ts +1 -0
  86. package/dist/components/loading-mask/types.d.ts +1 -1
  87. package/dist/components/marching-ants/index.d.vue.ts +1 -1
  88. package/dist/components/marching-ants/index.vue +2 -2
  89. package/dist/components/marquee/index.d.vue.ts +3 -3
  90. package/dist/components/marquee/types.d.ts +2 -2
  91. package/dist/components/mention/index.d.vue.ts +27 -7
  92. package/dist/components/mention/index.vue +96 -11
  93. package/dist/components/mention/types.d.ts +37 -5
  94. package/dist/components/menu/index.d.vue.ts +3 -1
  95. package/dist/components/menu/index.vue +4 -0
  96. package/dist/components/message/index.d.vue.ts +4 -4
  97. package/dist/components/message/index.vue +3 -3
  98. package/dist/components/message-item/index.vue +1 -1
  99. package/dist/components/modal/index.vue +5 -2
  100. package/dist/components/modal/types.d.ts +4 -4
  101. package/dist/components/more-button/types.d.ts +2 -2
  102. package/dist/components/note/index.vue +3 -3
  103. package/dist/components/note/types.d.ts +3 -3
  104. package/dist/components/number-input/index.d.vue.ts +4 -4
  105. package/dist/components/page-number/index.vue +2 -2
  106. package/dist/components/pagination/index.vue +2 -2
  107. package/dist/components/pin-input/index.d.vue.ts +1 -1
  108. package/dist/components/pin-input/index.vue +1 -1
  109. package/dist/components/popover/index.vue +111 -100
  110. package/dist/components/popover/types.d.ts +0 -2
  111. package/dist/components/progress/index.d.vue.ts +1 -1
  112. package/dist/components/project-banner/index.vue +3 -3
  113. package/dist/components/project-banner/types.d.ts +2 -2
  114. package/dist/components/questionnaire/index.d.vue.ts +1 -1
  115. package/dist/components/questionnaire/index.vue +110 -46
  116. package/dist/components/questionnaire/types.d.ts +5 -1
  117. package/dist/components/radio/index.vue +1 -1
  118. package/dist/components/radio/types.d.ts +2 -2
  119. package/dist/components/rating/index.d.vue.ts +1 -1
  120. package/dist/components/rating/index.vue +1 -0
  121. package/dist/components/rating/types.d.ts +2 -2
  122. package/dist/components/reasoning/index.vue +4 -4
  123. package/dist/components/reasoning/types.d.ts +2 -2
  124. package/dist/components/resizable/index.d.vue.ts +1 -1
  125. package/dist/components/resizable/index.vue +34 -30
  126. package/dist/components/reveal/index.d.vue.ts +1 -1
  127. package/dist/components/reveal/index.vue +2 -2
  128. package/dist/components/rolling-number/index.d.vue.ts +1 -1
  129. package/dist/components/rolling-number/index.vue +6 -6
  130. package/dist/components/rolling-number/types.d.ts +1 -1
  131. package/dist/components/scroll-text/index.vue +3 -2
  132. package/dist/components/scroll-text/types.d.ts +2 -2
  133. package/dist/components/scrollable/index.vue +1 -6
  134. package/dist/components/scrollable/types.d.ts +0 -2
  135. package/dist/components/search-input/index.d.vue.ts +14 -14
  136. package/dist/components/search-input/index.vue +2 -2
  137. package/dist/components/select/index.d.vue.ts +8 -4
  138. package/dist/components/select/index.vue +29 -12
  139. package/dist/components/select/types.d.ts +9 -1
  140. package/dist/components/shimmer-text/index.d.vue.ts +2 -2
  141. package/dist/components/shimmer-text/index.vue +2 -2
  142. package/dist/components/shimmer-text/types.d.ts +4 -2
  143. package/dist/components/slider/index.d.vue.ts +1 -1
  144. package/dist/components/slider/index.vue +34 -2
  145. package/dist/components/snippet/index.d.vue.ts +2 -0
  146. package/dist/components/snippet/index.vue +6 -2
  147. package/dist/components/snippet/types.d.ts +3 -2
  148. package/dist/components/split-button/index.d.vue.ts +10 -6
  149. package/dist/components/split-button/index.vue +25 -6
  150. package/dist/components/split-button/types.d.ts +3 -1
  151. package/dist/components/status-dot/types.d.ts +2 -2
  152. package/dist/components/steps/types.d.ts +3 -3
  153. package/dist/components/stick-to-bottom/index.vue +9 -12
  154. package/dist/components/stick-to-bottom/types.d.ts +0 -2
  155. package/dist/components/switch/index.vue +1 -1
  156. package/dist/components/switch-item/types.d.ts +2 -2
  157. package/dist/components/tabs/index.vue +3 -3
  158. package/dist/components/teleport/index.vue +6 -3
  159. package/dist/components/text/index.vue +1 -1
  160. package/dist/components/text/types.d.ts +1 -1
  161. package/dist/components/textarea/index.d.vue.ts +6 -6
  162. package/dist/components/textarea/index.vue +1 -1
  163. package/dist/components/textarea/types.d.ts +2 -2
  164. package/dist/components/time-picker/index.d.vue.ts +11 -1
  165. package/dist/components/time-picker/index.vue +8 -6
  166. package/dist/components/toc/index.d.vue.ts +4 -1
  167. package/dist/components/toc/index.vue +72 -10
  168. package/dist/components/toc/types.d.ts +11 -1
  169. package/dist/components/todo-list/index.d.vue.ts +1 -1
  170. package/dist/components/todo-list/index.vue +138 -103
  171. package/dist/components/todo-list/types.d.ts +7 -5
  172. package/dist/components/toggle/index.vue +1 -1
  173. package/dist/components/toggle-button/index.vue +11 -9
  174. package/dist/components/toggle-button/types.d.ts +3 -3
  175. package/dist/components/toggle-button-group/index.vue +2 -1
  176. package/dist/components/toggle-button-group/types.d.ts +2 -2
  177. package/dist/components/tool-call/index.vue +31 -35
  178. package/dist/components/tool-call/types.d.ts +2 -2
  179. package/dist/components/tooltip/index.d.vue.ts +1 -1
  180. package/dist/components/tour/index.d.vue.ts +3 -3
  181. package/dist/components/tour/index.vue +1 -1
  182. package/dist/components/tour/types.d.ts +4 -4
  183. package/dist/components/tree/index.d.vue.ts +1 -1
  184. package/dist/components/tree/index.vue +5 -4
  185. package/dist/components/tree/types.d.ts +4 -5
  186. package/dist/components/virtual-list/index.d.vue.ts +1 -0
  187. package/dist/components/virtual-list/index.vue +2 -1
  188. package/dist/components/virtual-list/types.d.ts +3 -3
  189. package/dist/composables/_internal/use-details-collapse.js +28 -3
  190. package/dist/composables/_internal/use-list-search.d.ts +15 -0
  191. package/dist/composables/_internal/use-list-search.js +50 -0
  192. package/dist/composables/_internal/use-mention-editor.d.ts +10 -5
  193. package/dist/composables/_internal/use-mention-editor.js +180 -140
  194. package/dist/composables/_internal/use-mention-suggest.d.ts +10 -8
  195. package/dist/composables/_internal/use-mention-suggest.js +39 -25
  196. package/dist/composables/_internal/use-message-group.js +6 -6
  197. package/dist/composables/_internal/use-popover-responsive.d.ts +1 -1
  198. package/dist/composables/_internal/use-popover-responsive.js +1 -1
  199. package/dist/composables/_internal/use-remote-search.d.ts +17 -0
  200. package/dist/composables/_internal/use-remote-search.js +58 -0
  201. package/dist/composables/_internal/use-tree.d.ts +2 -2
  202. package/dist/composables/_internal/use-tree.js +7 -52
  203. package/dist/composables/_internal/use-word-limit.d.ts +2 -2
  204. package/dist/composables/use-backoff-retry.d.ts +2 -35
  205. package/dist/composables/use-backoff-retry.js +5 -98
  206. package/dist/composables/use-copy-click.js +14 -13
  207. package/dist/composables/use-countdown.d.ts +1 -1
  208. package/dist/composables/use-countdown.js +4 -4
  209. package/dist/composables/use-delay-destroy.js +8 -6
  210. package/dist/composables/use-message.d.ts +1 -1
  211. package/dist/composables/use-message.js +1 -1
  212. package/dist/composables/use-repeat-action.d.ts +1 -1
  213. package/dist/composables/use-repeat-action.js +3 -3
  214. package/dist/composables/use-stick-to-bottom.d.ts +4 -21
  215. package/dist/composables/use-stick-to-bottom.js +138 -24
  216. package/dist/composables/use-view-transition.d.ts +23 -9
  217. package/dist/composables/use-virtual-list.d.ts +20 -0
  218. package/dist/composables/use-virtual-list.js +30 -9
  219. package/dist/constants/tooltip-variants.d.ts +1 -1
  220. package/dist/constants/tooltip-variants.js +1 -1
  221. package/dist/locales/en-us.d.ts +3 -0
  222. package/dist/locales/en-us.js +4 -1
  223. package/dist/locales/zh-cn.d.ts +3 -0
  224. package/dist/locales/zh-cn.js +4 -1
  225. package/dist/styles/styles.css +1 -1
  226. package/dist/styles/tw.css +5 -14
  227. package/dist/types/shared/props.d.ts +5 -2
  228. package/dist/utils/_internal/mention-html.d.ts +1 -0
  229. package/dist/utils/_internal/mention-html.js +6 -4
  230. package/dist/utils/_internal/observer.js +3 -3
  231. package/dist/utils/backoff-retry.d.ts +15 -0
  232. package/dist/utils/backoff-retry.js +94 -0
  233. package/dist/utils/mention-html.d.ts +14 -0
  234. package/dist/utils/mention-html.js +71 -0
  235. package/package.json +2 -9
  236. package/dist/composables/_internal/use-list-filter.d.ts +0 -15
  237. package/dist/composables/_internal/use-list-filter.js +0 -48
@@ -2,13 +2,21 @@ import type { BubbleGroupProps } from './types';
2
2
  declare var __VLS_8: {
3
3
  item: any;
4
4
  index: number;
5
- }, __VLS_10: {};
5
+ }, __VLS_11: {
6
+ item: any;
7
+ index: number;
8
+ }, __VLS_13: {};
6
9
  type __VLS_Slots = {} & {
7
10
  item?: (props: typeof __VLS_8) => any;
8
11
  } & {
9
- default?: (props: typeof __VLS_10) => any;
12
+ item?: (props: typeof __VLS_11) => any;
13
+ } & {
14
+ default?: (props: typeof __VLS_13) => any;
10
15
  };
11
- declare const __VLS_base: import("vue").DefineComponent<BubbleGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BubbleGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_base: import("vue").DefineComponent<BubbleGroupProps, {
17
+ scrollSource: import("../../composables/use-virtual-list.js").VirtualListScrollSource;
18
+ forceStickToBottom: () => void | undefined;
19
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BubbleGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
20
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
21
  declare const _default: typeof __VLS_export;
14
22
  export default _default;
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { computed, nextTick, onMounted, shallowRef, watch } from "vue";
2
+ import { computed, onMounted, shallowRef } from "vue";
3
3
  import { useVirtualList } from "../../composables/use-virtual-list.js";
4
4
  import PBacktop from "../backtop/index.vue";
5
5
  import PStickToBottom from "../stick-to-bottom/index.vue";
@@ -12,6 +12,10 @@ const props = defineProps({
12
12
  type: Array,
13
13
  required: false
14
14
  },
15
+ virtual: {
16
+ type: Boolean,
17
+ required: false
18
+ },
15
19
  dataKey: {
16
20
  type: String,
17
21
  required: false
@@ -26,7 +30,9 @@ const props = defineProps({
26
30
  }
27
31
  });
28
32
  const stickRef = shallowRef();
29
- const { totalSize, virtualItems, measureElement } = useVirtualList(() => stickRef.value?.containerRef ?? null, {
33
+ const isVirtual = computed(() => props.virtual === true && !!props.data);
34
+ const { totalSize, virtualItems, measureElement, scrollSource } = useVirtualList(() => stickRef.value?.containerRef ?? null, {
35
+ enabled: () => isVirtual.value,
30
36
  get dataKey() {
31
37
  return props.dataKey;
32
38
  },
@@ -41,25 +47,21 @@ const { totalSize, virtualItems, measureElement } = useVirtualList(() => stickRe
41
47
  }
42
48
  });
43
49
  const contentStyle = computed(() => {
44
- if (!props.data) {
50
+ if (!isVirtual.value) {
45
51
  return undefined;
46
52
  }
47
- return {
48
- height: `${totalSize.value}px`,
49
- containIntrinsicSize: `auto ${totalSize.value}px`
50
- };
51
- });
52
- watch(() => props.data?.length, (newLen, oldLen) => {
53
- if (!props.data || !newLen || !oldLen || newLen <= oldLen) {
54
- return;
55
- }
56
- void nextTick(() => {
57
- stickRef.value?.stickIfNeeded();
58
- });
53
+ return { "--bubble-group-height": `${totalSize.value}px` };
59
54
  });
55
+ function getDataItemKey(item, index) {
56
+ return (props.dataKey ? item[props.dataKey] : index) ?? index;
57
+ }
60
58
  onMounted(() => {
61
59
  stickRef.value?.forceStickToBottom();
62
60
  });
61
+ defineExpose({
62
+ scrollSource,
63
+ forceStickToBottom: () => stickRef.value?.forceStickToBottom()
64
+ });
63
65
  </script>
64
66
 
65
67
  <template>
@@ -68,23 +70,33 @@ onMounted(() => {
68
70
  data-bubble-group
69
71
  class="pxd-bubble-group relative overflow-x-hidden"
70
72
  :threshold="8"
71
- content-class="pxd-bubble-group--content relative w-full content-visibility-auto"
72
- :content-style="contentStyle"
73
+ content-class="pxd-bubble-group--content relative w-full h-(--bubble-group-height)"
74
+ :style="contentStyle"
73
75
  v-bind="$attrs"
74
76
  >
75
- <template v-if="data">
77
+ <template v-if="data && virtual">
76
78
  <div
77
79
  v-for="virtualItem in virtualItems"
78
80
  :key="virtualItem.key"
79
81
  :ref="(el) => measureElement(el)"
80
82
  :data-index="virtualItem.index"
81
- class="pxd-bubble-group--item sibling:pbs-2 left-0 top-0 absolute w-full"
83
+ class="pxd-bubble-group--item sibling:pbs-3 left-0 top-0 absolute w-full"
82
84
  :style="{ transform: `translateY(${virtualItem.start}px)` }"
83
85
  >
84
86
  <slot name="item" :item="data[virtualItem.index]" :index="virtualItem.index" />
85
87
  </div>
86
88
  </template>
87
89
 
90
+ <template v-else-if="data">
91
+ <div
92
+ v-for="(item, index) in data"
93
+ :key="getDataItemKey(item, index)"
94
+ class="pxd-bubble-group--item sibling:pbs-3 w-full"
95
+ >
96
+ <slot name="item" :item="item" :index="index" />
97
+ </div>
98
+ </template>
99
+
88
100
  <slot v-else />
89
101
 
90
102
  <template #action>
@@ -1,5 +1,6 @@
1
1
  export interface BubbleGroupProps {
2
2
  data?: readonly any[]
3
+ virtual?: boolean
3
4
  dataKey?: string
4
5
  itemSize?: number
5
6
  overScan?: number
@@ -74,9 +74,9 @@ const { attrs, classes } = useTailwindVariant({
74
74
  base: "pxd-button inline-flex shrink-0 cursor-pointer touch-manipulation items-center font-inherit select-none focus-visible:z-1 motion-safe:transition-appearance within-group:not-first:rounded-l-none within-group:not-first:border-l-0 within-group:not-last:rounded-r-none",
75
75
  variants: {
76
76
  size: {
77
- xxs: `${BASIC_HEIGHTS.xxs} px-1 rounded-sm text-[10px]`,
77
+ xxs: `${BASIC_HEIGHTS.xxs} px-1 rounded-sm text-[0.6875rem]`,
78
78
  xs: `${BASIC_HEIGHTS.xs} px-1 text-xs rounded-sm`,
79
- sm: `${BASIC_HEIGHTS.sm} px-2 text-sm rounded-md`,
79
+ sm: `${BASIC_HEIGHTS.sm} px-2 rounded-md text-[0.8125rem]`,
80
80
  md: `${BASIC_HEIGHTS.md} px-3 text-sm rounded-md`,
81
81
  lg: `${BASIC_HEIGHTS.lg} px-4 text-base rounded-lg`
82
82
  },
@@ -2,7 +2,7 @@ import type {
2
2
  ComponentAs,
3
3
  ComponentAlign,
4
4
  ComponentShape,
5
- ComponentSizeWithXs,
5
+ ComponentSizeWithXxs,
6
6
  ComponentVariantWithDefault,
7
7
  } from '../../types/shared/props'
8
8
 
@@ -11,7 +11,7 @@ export type ButtonVariant = ComponentVariantWithDefault | 'ghost' | 'simple' | '
11
11
  export interface ButtonProps {
12
12
  as?: ComponentAs
13
13
  variant?: ButtonVariant
14
- size?: ComponentSizeWithXs | 'xxs'
14
+ size?: ComponentSizeWithXxs
15
15
  shape?: ComponentShape
16
16
  align?: ComponentAlign
17
17
  icon?: boolean
@@ -1,8 +1,8 @@
1
- import type { ComponentSizeWithXs, ComponentAlign } from '../../types/shared/props'
1
+ import type { ComponentSizeWithXxs, ComponentAlign } from '../../types/shared/props'
2
2
  import type { ButtonVariant } from '../button/types'
3
3
 
4
4
  export interface ButtonGroupProps {
5
- size?: ComponentSizeWithXs | 'xxs'
5
+ size?: ComponentSizeWithXxs
6
6
  align?: ComponentAlign
7
7
  variant?: ButtonVariant
8
8
  disabled?: boolean
@@ -164,7 +164,7 @@ watch(() => props.modelValue, (value) => {
164
164
  aria-label="Previous year"
165
165
  @click="changeYear(-1)"
166
166
  >
167
- <ChevronDoubleLeftIcon class="size-4" aria-hidden="true" />
167
+ <ChevronDoubleLeftIcon class="size-em" aria-hidden="true" />
168
168
  </PButton>
169
169
  <PButton
170
170
  icon
@@ -174,7 +174,7 @@ watch(() => props.modelValue, (value) => {
174
174
  aria-label="Previous month"
175
175
  @click="changeMonth(-1)"
176
176
  >
177
- <ChevronRightIcon class="size-4 rotate-180" aria-hidden="true" />
177
+ <ChevronRightIcon class="size-em rotate-180" aria-hidden="true" />
178
178
  </PButton>
179
179
 
180
180
  <PButton size="xs" class="px-0" @click="selectToday">
@@ -189,7 +189,7 @@ watch(() => props.modelValue, (value) => {
189
189
  aria-label="Next month"
190
190
  @click="changeMonth(1)"
191
191
  >
192
- <ChevronRightIcon class="size-4" aria-hidden="true" />
192
+ <ChevronRightIcon class="size-em" aria-hidden="true" />
193
193
  </PButton>
194
194
  <PButton
195
195
  icon
@@ -199,7 +199,7 @@ watch(() => props.modelValue, (value) => {
199
199
  aria-label="Next year"
200
200
  @click="changeYear(1)"
201
201
  >
202
- <ChevronDoubleRightIcon class="size-4" aria-hidden="true" />
202
+ <ChevronDoubleRightIcon class="size-em" aria-hidden="true" />
203
203
  </PButton>
204
204
  </div>
205
205
 
@@ -1,13 +1,13 @@
1
1
  import type {
2
2
  BasePosition,
3
3
  ComponentDirection,
4
- ComponentLabel,
4
+ ComponentText,
5
5
  ComponentValue,
6
6
  } from '../../types/shared/props'
7
7
 
8
8
  export interface CarouselOption {
9
9
  /** Rendered as the slide content when no `item` slot is provided. */
10
- label?: ComponentLabel
10
+ label?: ComponentText
11
11
  /** Used as the vnode key; falls back to the slide index. */
12
12
  value?: ComponentValue
13
13
  [key: string]: any
@@ -122,7 +122,7 @@ function onInputChange(event) {
122
122
  role="checkbox"
123
123
  :aria-selected="isSelected"
124
124
  :data-disabled="isDisabled"
125
- class="pxd-checkbox group/checkbox relative gap-2 inline-flex max-w-full cursor-pointer touch-manipulation items-center data-[disabled=true]:cursor-not-allowed data-[disabled=true]:text-gray-500"
125
+ class="pxd-checkbox group/checkbox gap-2 relative inline-flex max-w-full cursor-pointer touch-manipulation items-center data-[disabled=true]:cursor-not-allowed data-[disabled=true]:text-gray-500"
126
126
  :for="uniqueId"
127
127
  v-bind="$attrs"
128
128
  >
@@ -1,9 +1,9 @@
1
- import type { ComponentLabel, ComponentValue, ComponentShape } from '../../types/shared/props'
1
+ import type { ComponentText, ComponentValue, ComponentShape } from '../../types/shared/props'
2
2
 
3
3
  type CheckboxModelValue = ComponentValue | boolean
4
4
 
5
5
  export interface CheckboxProps {
6
- label?: ComponentLabel
6
+ label?: ComponentText
7
7
  value?: CheckboxModelValue
8
8
  shape?: ComponentShape
9
9
  disabled?: boolean
@@ -44,5 +44,5 @@ const computedStyle = computed(() => ({
44
44
  </template>
45
45
 
46
46
  <style>
47
- .pxd-checkerboard{--checkerboard-size:20px;--checkerboard-primary-color:var(--color-gray-200);--checkerboard-background-color:var(--color-background-100);background-image:repeating-conic-gradient(var(--checkerboard-background-color) 0,var(--checkerboard-background-color) 25%,var(--checkerboard-primary-color) 25%,var(--checkerboard-primary-color) 50%);background-size:var(--checkerboard-size) var(--checkerboard-size)}.pxd-checkerboard[data-variant=dots],.pxd-checkerboard[data-variant=grid]{background-color:var(--checkerboard-background-color)}.pxd-checkerboard[data-variant=grid]{background-image:linear-gradient(to right,transparent calc(100% - 1px),var(--checkerboard-primary-color) calc(100% - 1px)),linear-gradient(to bottom,transparent calc(100% - 1px),var(--checkerboard-primary-color) calc(100% - 1px));background-position:calc(var(--checkerboard-size)/2) calc(var(--checkerboard-size)/2)}.pxd-checkerboard[data-variant=dots]{background-image:radial-gradient(var(--checkerboard-primary-color) 1px,transparent 1px);background-position:0 0}
47
+ .pxd-checkerboard{--checkerboard-size:1.25rem;--checkerboard-primary-color:var(--color-gray-200);--checkerboard-background-color:var(--color-background-100);background-image:repeating-conic-gradient(var(--checkerboard-background-color) 0,var(--checkerboard-background-color) 25%,var(--checkerboard-primary-color) 25%,var(--checkerboard-primary-color) 50%);background-size:var(--checkerboard-size) var(--checkerboard-size)}.pxd-checkerboard[data-variant=dots],.pxd-checkerboard[data-variant=grid]{background-color:var(--checkerboard-background-color)}.pxd-checkerboard[data-variant=grid]{background-image:linear-gradient(to right,transparent calc(100% - 1px),var(--checkerboard-primary-color) calc(100% - 1px)),linear-gradient(to bottom,transparent calc(100% - 1px),var(--checkerboard-primary-color) calc(100% - 1px));background-position:calc(var(--checkerboard-size)/2) calc(var(--checkerboard-size)/2)}.pxd-checkerboard[data-variant=dots]{background-image:radial-gradient(var(--checkerboard-primary-color) 1px,transparent 1px);background-position:0 0}
48
48
  </style>
@@ -62,5 +62,5 @@ const { classes } = useTailwindVariant({
62
62
  </template>
63
63
 
64
64
  <style>
65
- .pxd-chip--label:after{content:attr(data-label);display:block;padding-inline:2px;transform:scale(.875)}
65
+ .pxd-chip--label:after{content:attr(data-label);display:block;padding-inline:.125rem;transform:scale(.875)}
66
66
  </style>
@@ -1,8 +1,8 @@
1
- import type { ComponentLabel, ComponentVariant } from '../../types/shared/props'
1
+ import type { ComponentText, ComponentVariant } from '../../types/shared/props'
2
2
 
3
3
  export interface ChipProps {
4
4
  size?: number | string
5
5
  inset?: boolean
6
- label?: ComponentLabel
6
+ label?: ComponentText
7
7
  variant?: ComponentVariant | 'secondary'
8
8
  }
@@ -1,5 +1,5 @@
1
1
  import type {
2
- ComponentLabel,
2
+ ComponentText,
3
3
  ComponentValue,
4
4
  ComponentOption,
5
5
  ResponsiveValue,
@@ -7,7 +7,7 @@ import type {
7
7
 
8
8
  export interface ChoiceboxProps {
9
9
  gap?: ResponsiveValue<number | string>
10
- label?: ComponentLabel
10
+ label?: ComponentText
11
11
  multiple?: boolean
12
12
  disabled?: boolean
13
13
  options?: ComponentOption[]
@@ -140,7 +140,7 @@ function onInputChange(event) {
140
140
  v-bind="attrs"
141
141
  >
142
142
  <div
143
- class="pxd-choicebox-item--option relative p-3 flex items-center justify-between motion-safe:transition-colors"
143
+ class="pxd-choicebox-item--option p-3 relative flex items-center justify-between motion-safe:transition-colors"
144
144
  >
145
145
  <input
146
146
  :id="inputId"
@@ -1,7 +1,7 @@
1
- import type { ComponentLabel, ComponentValue } from '../../types/shared/props'
1
+ import type { ComponentText, ComponentValue } from '../../types/shared/props'
2
2
 
3
3
  export interface ChoiceboxItemProps {
4
- label?: ComponentLabel
4
+ label?: ComponentText
5
5
  value: ComponentValue
6
6
  disabled?: boolean
7
7
  description?: string
@@ -105,11 +105,11 @@ const { scheduleHighlight } = useCodeHighlight();
105
105
  const slots = useSlots();
106
106
  const hasHeader = computed(() => !!(props.title || props.switcher || slots.header || slots.actions));
107
107
  const { attrs, classes } = useTailwindVariant({
108
- base: "pxd-code-block relative flex flex-col text-gray-1000",
108
+ base: "pxd-code-block min-w-0 relative flex max-w-full flex-col text-gray-1000",
109
109
  variants: { size: {
110
- sm: "text-[13px]",
111
- md: "text-[13px]",
112
- lg: "text-[15px]"
110
+ sm: "text-[0.8125rem]",
111
+ md: "text-[0.8125rem]",
112
+ lg: "text-[0.9375rem]"
113
113
  } }
114
114
  }, { selection: () => ({ size: props.size || configProvider.size }) });
115
115
  /** FNV-1a over the code: line anchors must stay stable across reloads to be shareable. */
@@ -234,7 +234,7 @@ onUnmounted(() => {
234
234
  role="tab"
235
235
  :tabindex="option.value === activeTabValue ? 0 : -1"
236
236
  :aria-selected="option.value === activeTabValue"
237
- class="h-8 px-3 font-medium cursor-pointer rounded-md text-[13px] text-gray-900 not-aria-selected:hover:text-gray-1000 aria-selected:bg-gray-200 aria-selected:text-gray-1000 motion-safe:transition-colors"
237
+ class="h-8 px-3 font-medium cursor-pointer rounded-md text-[0.8125rem] text-gray-900 not-aria-selected:hover:text-gray-1000 aria-selected:bg-gray-200 aria-selected:text-gray-1000 motion-safe:transition-colors"
238
238
  @click="onTabSelect(option.value)"
239
239
  >
240
240
  {{ option.label || option.value }}
@@ -244,11 +244,11 @@ onUnmounted(() => {
244
244
 
245
245
  <div
246
246
  v-if="hasHeader"
247
- class="pxd-code-block--header gap-2 ps-3 pe-1 h-9 flex items-center rounded-t-lg border bg-background-200"
247
+ class="pxd-code-block--header gap-2 ps-3 pe-0.75 h-9 flex items-center rounded-t-lg border bg-background-200"
248
248
  >
249
249
  <slot name="header">
250
- <FileIcon class="size-4 shrink-0 text-gray-900" aria-hidden="true" />
251
- <span class="min-w-0 truncate text-[13px] text-gray-900">{{ title }}</span>
250
+ <FileIcon class="size-em shrink-0 text-gray-900" aria-hidden="true" />
251
+ <span class="min-w-0 truncate text-[0.8125rem] text-gray-900">{{ title }}</span>
252
252
  </slot>
253
253
 
254
254
  <div class="gap-1 min-w-0 ms-auto flex items-center">
@@ -257,10 +257,10 @@ onUnmounted(() => {
257
257
  <div v-if="switcher" class="h-7 group/select relative shrink-0">
258
258
  <div
259
259
  aria-hidden="true"
260
- class="px-2 gap-1 flex h-full cursor-pointer items-center rounded-md bg-background-200 text-[13px] whitespace-nowrap text-gray-900 group-hover/select:bg-gray-200 has-focus-visible:self-focus-ring motion-safe:transition-colors"
260
+ class="px-2 gap-1 flex h-full cursor-pointer items-center rounded-md bg-background-200 text-[0.8125rem] whitespace-nowrap text-gray-900 group-hover/select:bg-gray-200 has-focus-visible:self-focus-ring motion-safe:transition-colors"
261
261
  >
262
262
  <span class="truncate">{{ activeSwitcherLabel }}</span>
263
- <ChevronDownIcon class="size-3.5 shrink-0" />
263
+ <ChevronDownIcon class="size-3 shrink-0" />
264
264
  </div>
265
265
 
266
266
  <select
@@ -341,7 +341,7 @@ onUnmounted(() => {
341
341
 
342
342
  <div
343
343
  v-if="copyBtn !== 'hidden' && !hasHeader"
344
- class="end-3 top-3 max-sm:opacity-100 absolute focus-within:opacity-100 motion-safe:transition-opacity"
344
+ class="end-3.5 top-2 max-sm:opacity-100 absolute focus-within:opacity-100 motion-safe:transition-opacity"
345
345
  :class="{ 'opacity-0 group-hover/code-block:opacity-100': copyBtn === 'hover' }"
346
346
  >
347
347
  <PCopyButton icon size="sm" variant="ghost" :text="code" @copy="onCopy" />
@@ -358,5 +358,5 @@ onUnmounted(() => {
358
358
  </template>
359
359
 
360
360
  <style>
361
- .pxd-code-block{--syntax-comment:hsl(var(--color-gray-700-value));--syntax-keyword:hsl(var(--color-purple-900-value));--syntax-operator:hsl(var(--color-gray-800-value));--syntax-string:hsl(var(--color-green-900-value));--syntax-constant:hsl(var(--color-blue-900-value));--syntax-function:hsl(var(--color-teal-900-value));--syntax-type:hsl(var(--color-blue-900-value));--syntax-variable:hsl(var(--color-amber-900-value));--syntax-property:hsl(var(--color-gray-1000-value));--syntax-tag:hsl(var(--color-red-900-value));--syntax-selector:hsl(var(--color-green-900-value));--syntax-inserted:hsl(var(--color-green-900-value));--syntax-deleted:hsl(var(--color-red-900-value))}.pxd-code-block code::highlight(comment),.pxd-code-block code::highlight(quote){color:var(--syntax-comment)}.pxd-code-block code::highlight(at-rule),.pxd-code-block code::highlight(doctype),.pxd-code-block code::highlight(important),.pxd-code-block code::highlight(keyword),.pxd-code-block code::highlight(section),.pxd-code-block code::highlight(storage){color:var(--syntax-keyword)}.pxd-code-block code::highlight(operator),.pxd-code-block code::highlight(punctuation){color:var(--syntax-operator)}.pxd-code-block code::highlight(attribute-value),.pxd-code-block code::highlight(link),.pxd-code-block code::highlight(raw),.pxd-code-block code::highlight(regexp),.pxd-code-block code::highlight(string){color:var(--syntax-string)}.pxd-code-block code::highlight(anchor),.pxd-code-block code::highlight(boolean),.pxd-code-block code::highlight(character-entity),.pxd-code-block code::highlight(constant),.pxd-code-block code::highlight(entity),.pxd-code-block code::highlight(numeric),.pxd-code-block code::highlight(symbol){color:var(--syntax-constant)}.pxd-code-block code::highlight(animation),.pxd-code-block code::highlight(decorator),.pxd-code-block code::highlight(function){color:var(--syntax-function)}.pxd-code-block code::highlight(support),.pxd-code-block code::highlight(type){color:var(--syntax-type)}.pxd-code-block code::highlight(interpolation),.pxd-code-block code::highlight(variable){color:var(--syntax-variable)}.pxd-code-block code::highlight(attribute-name),.pxd-code-block code::highlight(key),.pxd-code-block code::highlight(property){color:var(--syntax-property)}.pxd-code-block code::highlight(tag){color:var(--syntax-tag)}.pxd-code-block code::highlight(selector){color:var(--syntax-selector)}.pxd-code-block code::highlight(inserted){color:var(--syntax-inserted)}.pxd-code-block code::highlight(deleted){color:var(--syntax-deleted)}.pxd-code-block--fade{-webkit-mask-image:linear-gradient(0deg,#000,transparent);mask-image:linear-gradient(0deg,#000,transparent)}.pxd-code-block--line[data-added=true]:after,.pxd-code-block--line[data-removed=true]:after{font-weight:500;inset:0;padding-left:8px;pointer-events:none;position:absolute}.pxd-code-block--line[data-added=true]:after{color:var(--color-green-900);content:"+"}.pxd-code-block--line[data-removed=true]:after{color:var(--color-red-900);content:"-"}@media (max-width:600px){.pxd-code-block--line-number{display:none}}
361
+ .pxd-code-block{--syntax-comment:hsl(var(--color-gray-700-value));--syntax-keyword:hsl(var(--color-purple-900-value));--syntax-operator:hsl(var(--color-gray-800-value));--syntax-string:hsl(var(--color-green-900-value));--syntax-constant:hsl(var(--color-blue-900-value));--syntax-function:hsl(var(--color-teal-900-value));--syntax-type:hsl(var(--color-blue-900-value));--syntax-variable:hsl(var(--color-amber-900-value));--syntax-property:hsl(var(--color-gray-1000-value));--syntax-tag:hsl(var(--color-red-900-value));--syntax-selector:hsl(var(--color-green-900-value));--syntax-inserted:hsl(var(--color-green-900-value));--syntax-deleted:hsl(var(--color-red-900-value))}.pxd-code-block code::highlight(comment),.pxd-code-block code::highlight(quote){color:var(--syntax-comment)}.pxd-code-block code::highlight(at-rule),.pxd-code-block code::highlight(doctype),.pxd-code-block code::highlight(important),.pxd-code-block code::highlight(keyword),.pxd-code-block code::highlight(section),.pxd-code-block code::highlight(storage){color:var(--syntax-keyword)}.pxd-code-block code::highlight(operator),.pxd-code-block code::highlight(punctuation){color:var(--syntax-operator)}.pxd-code-block code::highlight(attribute-value),.pxd-code-block code::highlight(link),.pxd-code-block code::highlight(raw),.pxd-code-block code::highlight(regexp),.pxd-code-block code::highlight(string){color:var(--syntax-string)}.pxd-code-block code::highlight(anchor),.pxd-code-block code::highlight(boolean),.pxd-code-block code::highlight(character-entity),.pxd-code-block code::highlight(constant),.pxd-code-block code::highlight(entity),.pxd-code-block code::highlight(numeric),.pxd-code-block code::highlight(symbol){color:var(--syntax-constant)}.pxd-code-block code::highlight(animation),.pxd-code-block code::highlight(decorator),.pxd-code-block code::highlight(function){color:var(--syntax-function)}.pxd-code-block code::highlight(support),.pxd-code-block code::highlight(type){color:var(--syntax-type)}.pxd-code-block code::highlight(interpolation),.pxd-code-block code::highlight(variable){color:var(--syntax-variable)}.pxd-code-block code::highlight(attribute-name),.pxd-code-block code::highlight(key),.pxd-code-block code::highlight(property){color:var(--syntax-property)}.pxd-code-block code::highlight(tag){color:var(--syntax-tag)}.pxd-code-block code::highlight(selector){color:var(--syntax-selector)}.pxd-code-block code::highlight(inserted){color:var(--syntax-inserted)}.pxd-code-block code::highlight(deleted){color:var(--syntax-deleted)}.pxd-code-block--fade{-webkit-mask-image:linear-gradient(0deg,#000,transparent);mask-image:linear-gradient(0deg,#000,transparent)}.pxd-code-block--line[data-added=true]:after,.pxd-code-block--line[data-removed=true]:after{font-weight:500;inset:0;padding-left:.5rem;pointer-events:none;position:absolute}.pxd-code-block--line[data-added=true]:after{color:var(--color-green-900);content:"+"}.pxd-code-block--line[data-removed=true]:after{color:var(--color-red-900);content:"-"}@media (max-width:600px){.pxd-code-block--line-number{display:none}}
362
362
  </style>
@@ -1,4 +1,4 @@
1
- import type { ComponentLabel } from '../../types/shared/props'
1
+ import type { ComponentText } from '../../types/shared/props'
2
2
 
3
3
  export interface CodeBlockSwitcherOption {
4
4
  label?: string
@@ -13,7 +13,7 @@ export interface CodeBlockSwitcherProps {
13
13
  export interface CodeBlockProps {
14
14
  code: string
15
15
  language?: string
16
- title?: ComponentLabel
16
+ title?: ComponentText
17
17
  size?: 'sm' | 'md' | 'lg'
18
18
  lineNumbers?: boolean
19
19
  highlightedLines?: number[]
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import ChevronDownIcon from "@gdsicon/vue/chevron-down";
2
+ import ChevronRightIcon from "@gdsicon/vue/chevron-right";
3
3
  import { onBeforeUnmount, shallowRef, watch } from "vue";
4
4
  import { useDetailsCollapse } from "../../composables/_internal/use-details-collapse.js";
5
5
  import { useCollapseGroupContext } from "../../contexts/collapse.js";
@@ -28,7 +28,7 @@ function onTriggerClick(ev) {
28
28
  emits("toggle", ev);
29
29
  onToggleClick();
30
30
  }
31
- watch(isOpen, (open) => {
31
+ watch(() => isOpen.value, (open) => {
32
32
  const group = collapseGroup;
33
33
  if (!group || group.props.multiple) {
34
34
  return;
@@ -69,9 +69,9 @@ onBeforeUnmount(() => {
69
69
  </slot>
70
70
  </h3>
71
71
 
72
- <ChevronDownIcon
73
- class="size-4 shrink-0 motion-safe:transition-transform"
74
- :class="{ '-rotate-180': detailsOpen }"
72
+ <ChevronRightIcon
73
+ class="size-em shrink-0 motion-safe:transition-transform"
74
+ :class="{ 'rotate-90': isOpen }"
75
75
  />
76
76
  </summary>
77
77
 
@@ -88,5 +88,5 @@ onBeforeUnmount(() => {
88
88
  </template>
89
89
 
90
90
  <style>
91
- .pxd-collapse--trigger{font-size:var(--collapse-font-size,24px);font-weight:var(--collapse-font-weight,600);padding-block:var(--collapse-padding,24px)}
91
+ .pxd-collapse--trigger{font-size:var(--collapse-font-size,1.5rem);font-weight:var(--collapse-font-weight,600);padding-block:var(--collapse-padding,1.5rem)}
92
92
  </style>
@@ -1,7 +1,7 @@
1
- import type { ComponentLabel } from '../../types/shared/props'
1
+ import type { ComponentText } from '../../types/shared/props'
2
2
 
3
3
  export interface CollapseProps {
4
- title?: ComponentLabel
4
+ title?: ComponentText
5
5
  expand?: boolean
6
6
  }
7
7
 
@@ -19,18 +19,18 @@ const props = defineProps({
19
19
  });
20
20
  const SIZES = {
21
21
  sm: {
22
- padding: "12px",
23
- fontSize: "16px",
22
+ padding: "0.75rem",
23
+ fontSize: "1rem",
24
24
  fontWeight: "500"
25
25
  },
26
26
  md: {
27
- padding: "24px",
28
- fontSize: "24px",
27
+ padding: "1.5rem",
28
+ fontSize: "1.5rem",
29
29
  fontWeight: "600"
30
30
  },
31
31
  lg: {
32
- padding: "30px",
33
- fontSize: "28px",
32
+ padding: "1.875rem",
33
+ fontSize: "1.75rem",
34
34
  fontWeight: "600"
35
35
  }
36
36
  };
@@ -23,8 +23,8 @@ declare const __VLS_base: import("vue").DefineComponent<CommandMenuProps, {}, {}
23
23
  }>, {
24
24
  width: string | number;
25
25
  modelValue: boolean;
26
- closeOnPressEscape: boolean;
27
26
  placeholder: string;
27
+ closeOnPressEscape: boolean;
28
28
  closeOnClickOverlay: boolean;
29
29
  closeOnSelectItem: boolean;
30
30
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  import { nextTick, shallowRef, watch } from "vue";
3
- import { useListFilter } from "../../composables/_internal/use-list-filter.js";
4
3
  import { useListKeyboardController } from "../../composables/_internal/use-list-keyboard-controller.js";
4
+ import { useListSearch } from "../../composables/_internal/use-list-search.js";
5
5
  import { useModelValue } from "../../composables/_internal/use-model-value.js";
6
6
  import { PRESET_MEDIA_QUERIES, useMediaQuery } from "../../composables/use-media-query.js";
7
7
  import { useConfigProvider } from "../../contexts/config-provider.js";
@@ -20,7 +20,7 @@ const props = defineProps({
20
20
  width: {
21
21
  type: [String, Number],
22
22
  required: false,
23
- default: "640px"
23
+ default: "40rem"
24
24
  },
25
25
  virtual: {
26
26
  type: Boolean,
@@ -54,6 +54,14 @@ const props = defineProps({
54
54
  type: Boolean,
55
55
  required: false,
56
56
  default: true
57
+ },
58
+ filterMethod: {
59
+ type: Function,
60
+ required: false
61
+ },
62
+ remoteFilter: {
63
+ type: Function,
64
+ required: false
57
65
  }
58
66
  });
59
67
  const emits = defineEmits([
@@ -68,7 +76,10 @@ const listRef = shallowRef();
68
76
  const configProvider = useConfigProvider();
69
77
  const modelValue = useModelValue(props, emits);
70
78
  const isSmallScreen = useMediaQuery(PRESET_MEDIA_QUERIES.IS_XS);
71
- const { filteredOptions } = useListFilter(() => props.options ?? [], filterKeyword);
79
+ const { listOptions, pending } = useListSearch(() => props.options ?? [], filterKeyword, {
80
+ filterMethod: () => props.filterMethod,
81
+ remoteFilter: () => props.remoteFilter
82
+ });
72
83
  const { onKeydown: onListKeydown } = useListKeyboardController({
73
84
  enabled: () => modelValue.value,
74
85
  onCommand: (command) => listRef.value?.dispatch(command) ?? false,
@@ -105,7 +116,7 @@ function onInputKeyword(event) {
105
116
  const input = event.target;
106
117
  filterKeyword.value = input.value.replaceAll("'", "");
107
118
  }
108
- watch(filteredOptions, async () => {
119
+ watch(listOptions, async () => {
109
120
  await nextTick();
110
121
  listRef.value?.setFirstAsActive();
111
122
  });
@@ -164,7 +175,8 @@ watch(filteredOptions, async () => {
164
175
  <PList
165
176
  ref="listRef"
166
177
  :virtual="virtual"
167
- :options="filteredOptions"
178
+ :options="listOptions"
179
+ :loading="pending"
168
180
  :default-active-index="0"
169
181
  class="sm:max-h-110 h-full"
170
182
  @change="onListItemSelect"
@@ -1,4 +1,9 @@
1
- import type { ListOptions, ListOptionSelected } from '../list/types'
1
+ import type {
2
+ ListFilterMethodFn,
3
+ ListOptions,
4
+ ListOptionSelected,
5
+ ListRemoteFilterFn,
6
+ } from '../list/types'
2
7
 
3
8
  export interface CommandMenuProps {
4
9
  width?: string | number
@@ -9,6 +14,8 @@ export interface CommandMenuProps {
9
14
  closeOnSelectItem?: boolean
10
15
  closeOnPressEscape?: boolean
11
16
  closeOnClickOverlay?: boolean
17
+ filterMethod?: ListFilterMethodFn
18
+ remoteFilter?: ListRemoteFilterFn
12
19
  }
13
20
 
14
21
  export interface CommandMenuEmits {
@@ -66,6 +66,8 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
66
66
  skipAll: string;
67
67
  prev: string;
68
68
  next: string;
69
+ expand: string;
70
+ collapse: string;
69
71
  };
70
72
  tour: {
71
73
  next: string;
@@ -99,6 +101,7 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
99
101
  approve: string;
100
102
  reject: string;
101
103
  remember: string;
104
+ reason: string;
102
105
  pending: string;
103
106
  approved: string;
104
107
  rejected: string;
@@ -176,7 +176,7 @@ watch(() => props.modelValue, (value) => {
176
176
  {{ title }}
177
177
  </h3>
178
178
 
179
- <p v-if="description" class="m-0 text-[13px] text-foreground-secondary">
179
+ <p v-if="description" class="m-0 text-[0.8125rem] text-foreground-secondary">
180
180
  {{ description }}
181
181
  </p>
182
182
  </slot>
@@ -1,4 +1,4 @@
1
- import type { ComponentPosition, ComponentLabel } from '../../types/shared/props'
1
+ import type { ComponentPosition, ComponentText } from '../../types/shared/props'
2
2
  import type { Awaitable } from '../../types/shared/utils'
3
3
  import type { ButtonVariant } from '../button/types'
4
4
 
@@ -6,10 +6,10 @@ export type ConfirmBeforeConfirm = () => Awaitable<boolean | void>
6
6
 
7
7
  export interface ConfirmPopoverProps {
8
8
  modelValue?: boolean
9
- title?: ComponentLabel
10
- description?: ComponentLabel
11
- confirmText?: ComponentLabel
12
- cancelText?: ComponentLabel
9
+ title?: ComponentText
10
+ description?: ComponentText
11
+ confirmText?: ComponentText
12
+ cancelText?: ComponentText
13
13
  confirmVariant?: ButtonVariant
14
14
  position?: ComponentPosition
15
15
  disabled?: boolean