pxd 0.1.4 → 0.1.7

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 (281) hide show
  1. package/dist/components/_internal/dismiss-container.d.vue.ts +2 -2
  2. package/dist/components/_internal/dismiss-container.vue +1 -1
  3. package/dist/components/_internal/mention-editor.d.vue.ts +3 -4
  4. package/dist/components/_internal/mention-editor.vue +7 -5
  5. package/dist/components/_internal/tree-node.d.vue.ts +10 -1
  6. package/dist/components/_internal/tree-node.vue +32 -12
  7. package/dist/components/active-graph/index.d.vue.ts +1 -1
  8. package/dist/components/active-graph/index.vue +4 -18
  9. package/dist/components/active-graph/types.d.ts +1 -1
  10. package/dist/components/approval-card/index.d.vue.ts +2 -2
  11. package/dist/components/approval-card/index.vue +8 -4
  12. package/dist/components/approval-card/types.d.ts +1 -1
  13. package/dist/components/avatar/index.d.vue.ts +2 -2
  14. package/dist/components/avatar/index.vue +1 -1
  15. package/dist/components/backtop/index.d.vue.ts +1 -1
  16. package/dist/components/badge/index.vue +4 -2
  17. package/dist/components/badge/types.d.ts +7 -2
  18. package/dist/components/browser/index.vue +1 -1
  19. package/dist/components/bubble/index.d.vue.ts +1 -1
  20. package/dist/components/bubble/index.vue +35 -14
  21. package/dist/components/bubble/types.d.ts +2 -1
  22. package/dist/components/bubble-group/index.d.vue.ts +10 -3
  23. package/dist/components/bubble-group/index.vue +41 -8
  24. package/dist/components/bubble-group/types.d.ts +5 -4
  25. package/dist/components/button/index.d.vue.ts +1 -1
  26. package/dist/components/button/index.vue +4 -4
  27. package/dist/components/calendar/index.d.vue.ts +2 -2
  28. package/dist/components/calendar/index.vue +3 -3
  29. package/dist/components/calendar/types.d.ts +1 -1
  30. package/dist/components/checkbox/index.d.vue.ts +2 -2
  31. package/dist/components/checkbox/index.vue +3 -3
  32. package/dist/components/checkbox/types.d.ts +1 -1
  33. package/dist/components/checkbox-group/index.d.vue.ts +2 -2
  34. package/dist/components/checkbox-group/index.vue +2 -2
  35. package/dist/components/checkbox-group/types.d.ts +1 -1
  36. package/dist/components/checkerboard/index.d.vue.ts +3 -1
  37. package/dist/components/checkerboard/index.vue +13 -2
  38. package/dist/components/checkerboard/types.d.ts +1 -0
  39. package/dist/components/choicebox/index.d.vue.ts +2 -2
  40. package/dist/components/choicebox/index.vue +2 -2
  41. package/dist/components/choicebox/types.d.ts +1 -1
  42. package/dist/components/choicebox-item/index.vue +1 -1
  43. package/dist/components/code-block/index.d.vue.ts +7 -3
  44. package/dist/components/code-block/index.vue +268 -72
  45. package/dist/components/code-block/types.d.ts +33 -14
  46. package/dist/components/collapse/index.d.vue.ts +3 -1
  47. package/dist/components/collapse/index.vue +37 -41
  48. package/dist/components/collapse/types.d.ts +3 -1
  49. package/dist/components/collapse-group/index.vue +3 -3
  50. package/dist/components/color-selector/index.d.vue.ts +2 -2
  51. package/dist/components/color-selector/index.vue +2 -2
  52. package/dist/components/color-selector/types.d.ts +1 -1
  53. package/dist/components/command-menu/index.d.vue.ts +3 -3
  54. package/dist/components/command-menu/index.vue +2 -2
  55. package/dist/components/command-menu/types.d.ts +1 -1
  56. package/dist/components/confirm-popover/index.d.vue.ts +2 -2
  57. package/dist/components/confirm-popover/index.vue +10 -15
  58. package/dist/components/confirm-popover/types.d.ts +6 -7
  59. package/dist/components/context-usage/index.d.vue.ts +6 -0
  60. package/dist/components/context-usage/index.vue +120 -0
  61. package/dist/components/context-usage/types.d.ts +13 -0
  62. package/dist/components/copy-button/index.vue +17 -9
  63. package/dist/components/copy-button/types.d.ts +3 -1
  64. package/dist/components/countdown/index.vue +1 -1
  65. package/dist/components/date-picker/index.d.vue.ts +13 -3
  66. package/dist/components/date-picker/index.vue +6 -4
  67. package/dist/components/date-picker/types.d.ts +1 -1
  68. package/dist/components/description/index.vue +1 -1
  69. package/dist/components/description/types.d.ts +3 -1
  70. package/dist/components/drawer/index.d.vue.ts +5 -5
  71. package/dist/components/drawer/index.vue +13 -13
  72. package/dist/components/drawer/types.d.ts +2 -2
  73. package/dist/components/effort-slider/index.d.vue.ts +2 -2
  74. package/dist/components/effort-slider/index.vue +63 -17
  75. package/dist/components/effort-slider/types.d.ts +3 -1
  76. package/dist/components/ellipsis-text/index.d.vue.ts +3 -3
  77. package/dist/components/ellipsis-text/index.vue +5 -5
  78. package/dist/components/ellipsis-text/types.d.ts +4 -2
  79. package/dist/components/empty-state/index.vue +1 -1
  80. package/dist/components/empty-state/types.d.ts +3 -1
  81. package/dist/components/feedback-bar/index.d.vue.ts +4 -4
  82. package/dist/components/feedback-bar/index.vue +4 -4
  83. package/dist/components/feedback-bar/types.d.ts +2 -2
  84. package/dist/components/gauge/index.vue +75 -79
  85. package/dist/components/gauge/types.d.ts +2 -0
  86. package/dist/components/hint/index.vue +2 -3
  87. package/dist/components/hold-button/index.d.vue.ts +4 -4
  88. package/dist/components/hold-button/index.vue +86 -75
  89. package/dist/components/hue-text/index.vue +2 -2
  90. package/dist/components/hue-text/types.d.ts +3 -1
  91. package/dist/components/image-preview/index.d.vue.ts +2 -0
  92. package/dist/components/image-preview/index.vue +156 -131
  93. package/dist/components/image-preview/types.d.ts +18 -18
  94. package/dist/components/index.d.ts +132 -0
  95. package/dist/components/index.js +3 -0
  96. package/dist/components/input/index.d.vue.ts +2 -2
  97. package/dist/components/input/index.vue +2 -2
  98. package/dist/components/input/types.d.ts +1 -1
  99. package/dist/components/kbd/index.vue +1 -1
  100. package/dist/components/link-button/index.d.vue.ts +1 -1
  101. package/dist/components/link-button/index.vue +1 -1
  102. package/dist/components/link-button/types.d.ts +1 -1
  103. package/dist/components/list/index.d.vue.ts +3 -3
  104. package/dist/components/list/index.vue +4 -4
  105. package/dist/components/list/types.d.ts +1 -1
  106. package/dist/components/list-group/index.vue +1 -1
  107. package/dist/components/{_internal/loading-mask.d.vue.ts → loading-mask/index.d.vue.ts} +2 -4
  108. package/dist/components/{_internal/loading-mask.vue → loading-mask/index.vue} +1 -1
  109. package/dist/components/loading-mask/types.d.ts +3 -0
  110. package/dist/components/marching-ants/index.d.vue.ts +1 -1
  111. package/dist/components/marquee/index.d.vue.ts +3 -3
  112. package/dist/components/marquee/index.vue +1 -1
  113. package/dist/components/marquee/types.d.ts +2 -2
  114. package/dist/components/mention/index.d.vue.ts +6 -4
  115. package/dist/components/mention/index.vue +6 -2
  116. package/dist/components/mention/types.d.ts +1 -1
  117. package/dist/components/menu/index.d.vue.ts +5 -3
  118. package/dist/components/menu/index.vue +6 -2
  119. package/dist/components/menu/types.d.ts +1 -1
  120. package/dist/components/message/index.d.vue.ts +1 -1
  121. package/dist/components/modal/index.d.vue.ts +4 -4
  122. package/dist/components/modal/index.vue +13 -13
  123. package/dist/components/modal/types.d.ts +2 -2
  124. package/dist/components/more-button/index.d.vue.ts +4 -4
  125. package/dist/components/more-button/index.vue +4 -4
  126. package/dist/components/more-button/types.d.ts +3 -3
  127. package/dist/components/note/index.vue +1 -1
  128. package/dist/components/note/types.d.ts +1 -1
  129. package/dist/components/number-input/index.d.vue.ts +2 -2
  130. package/dist/components/number-input/index.vue +2 -2
  131. package/dist/components/number-input/types.d.ts +1 -1
  132. package/dist/components/overlay/index.d.vue.ts +2 -2
  133. package/dist/components/overlay/index.vue +4 -4
  134. package/dist/components/overlay/types.d.ts +1 -1
  135. package/dist/components/page-number/index.d.vue.ts +3 -3
  136. package/dist/components/page-number/index.vue +3 -3
  137. package/dist/components/page-number/types.d.ts +1 -1
  138. package/dist/components/pagination/index.vue +2 -2
  139. package/dist/components/pin-input/index.d.vue.ts +4 -4
  140. package/dist/components/pin-input/index.vue +3 -3
  141. package/dist/components/pin-input/types.d.ts +1 -1
  142. package/dist/components/placeholder/index.vue +3 -3
  143. package/dist/components/placeholder/types.d.ts +1 -1
  144. package/dist/components/popover/index.vue +73 -36
  145. package/dist/components/popover/types.d.ts +1 -2
  146. package/dist/components/questionnaire/index.d.vue.ts +1 -0
  147. package/dist/components/questionnaire/index.vue +92 -87
  148. package/dist/components/questionnaire/types.d.ts +1 -3
  149. package/dist/components/radio/index.d.vue.ts +2 -2
  150. package/dist/components/radio/index.vue +3 -3
  151. package/dist/components/radio/types.d.ts +1 -1
  152. package/dist/components/radio-group/index.d.vue.ts +2 -2
  153. package/dist/components/radio-group/index.vue +2 -2
  154. package/dist/components/radio-group/types.d.ts +1 -1
  155. package/dist/components/rating/index.d.vue.ts +3 -3
  156. package/dist/components/rating/index.vue +2 -2
  157. package/dist/components/rating/types.d.ts +1 -1
  158. package/dist/components/reactions/index.d.vue.ts +34 -0
  159. package/dist/components/reactions/index.vue +143 -0
  160. package/dist/components/reactions/types.d.ts +23 -0
  161. package/dist/components/reasoning/index.d.vue.ts +2 -0
  162. package/dist/components/reasoning/index.vue +49 -30
  163. package/dist/components/reasoning/types.d.ts +9 -0
  164. package/dist/components/resizable/index.d.vue.ts +2 -2
  165. package/dist/components/resizable/index.vue +3 -3
  166. package/dist/components/resizable/types.d.ts +1 -1
  167. package/dist/components/reveal/index.d.vue.ts +1 -1
  168. package/dist/components/rolling-number/index.vue +1 -1
  169. package/dist/components/scroll-text/index.d.vue.ts +1 -1
  170. package/dist/components/scroll-text/index.vue +2 -2
  171. package/dist/components/scroll-text/types.d.ts +2 -2
  172. package/dist/components/scrollable/index.d.vue.ts +3 -2
  173. package/dist/components/scrollable/types.d.ts +0 -15
  174. package/dist/components/search-input/index.d.vue.ts +5 -5
  175. package/dist/components/search-input/index.vue +1 -1
  176. package/dist/components/select/index.d.vue.ts +10 -6
  177. package/dist/components/select/index.vue +15 -8
  178. package/dist/components/select/types.d.ts +1 -1
  179. package/dist/components/shimmer-text/index.d.vue.ts +1 -1
  180. package/dist/components/shimmer-text/index.vue +1 -1
  181. package/dist/components/shimmer-text/types.d.ts +1 -1
  182. package/dist/components/skeleton/index.d.vue.ts +1 -1
  183. package/dist/components/slider/index.d.vue.ts +2 -3
  184. package/dist/components/slider/index.vue +17 -6
  185. package/dist/components/slider/types.d.ts +2 -1
  186. package/dist/components/snippet/index.vue +1 -5
  187. package/dist/components/snippet/types.d.ts +6 -2
  188. package/dist/components/spinner-dots/types.d.ts +1 -1
  189. package/dist/components/split-button/index.d.vue.ts +5 -3
  190. package/dist/components/split-button/index.vue +6 -2
  191. package/dist/components/split-button/types.d.ts +1 -1
  192. package/dist/components/steps/index.d.vue.ts +2 -2
  193. package/dist/components/steps/index.vue +2 -2
  194. package/dist/components/steps/types.d.ts +1 -1
  195. package/dist/components/stick-to-bottom/index.vue +3 -6
  196. package/dist/components/swipe-cell/index.d.vue.ts +2 -2
  197. package/dist/components/swipe-cell/index.vue +3 -3
  198. package/dist/components/swipe-cell/types.d.ts +1 -1
  199. package/dist/components/switch/index.d.vue.ts +2 -2
  200. package/dist/components/switch/index.vue +2 -2
  201. package/dist/components/switch/types.d.ts +1 -1
  202. package/dist/components/switch-item/index.vue +2 -2
  203. package/dist/components/tabs/index.d.vue.ts +2 -2
  204. package/dist/components/tabs/index.vue +3 -3
  205. package/dist/components/tabs/types.d.ts +1 -1
  206. package/dist/components/text/index.vue +1 -1
  207. package/dist/components/text/types.d.ts +1 -1
  208. package/dist/components/textarea/index.d.vue.ts +2 -2
  209. package/dist/components/textarea/index.vue +2 -2
  210. package/dist/components/textarea/types.d.ts +1 -1
  211. package/dist/components/theme-switcher/index.d.vue.ts +2 -3
  212. package/dist/components/theme-switcher/index.vue +7 -7
  213. package/dist/components/time-picker/index.d.vue.ts +13 -3
  214. package/dist/components/time-picker/index.vue +10 -8
  215. package/dist/components/time-picker/types.d.ts +1 -1
  216. package/dist/components/timeline-item/index.d.vue.ts +0 -1
  217. package/dist/components/timeline-item/index.vue +20 -4
  218. package/dist/components/timeline-item/types.d.ts +2 -2
  219. package/dist/components/toc/index.d.vue.ts +4 -1
  220. package/dist/components/toc/index.vue +65 -8
  221. package/dist/components/toc/types.d.ts +10 -1
  222. package/dist/components/todo-list/index.d.vue.ts +4 -13
  223. package/dist/components/todo-list/index.vue +122 -133
  224. package/dist/components/todo-list/types.d.ts +5 -4
  225. package/dist/components/toggle/index.d.vue.ts +4 -4
  226. package/dist/components/toggle/index.vue +4 -4
  227. package/dist/components/toggle/types.d.ts +6 -6
  228. package/dist/components/toggle-button/index.d.vue.ts +2 -2
  229. package/dist/components/toggle-button/index.vue +2 -2
  230. package/dist/components/toggle-button/types.d.ts +1 -1
  231. package/dist/components/toggle-button-group/index.d.vue.ts +2 -2
  232. package/dist/components/toggle-button-group/index.vue +2 -2
  233. package/dist/components/toggle-button-group/types.d.ts +1 -1
  234. package/dist/components/tool-call/index.d.vue.ts +2 -0
  235. package/dist/components/tool-call/index.vue +139 -133
  236. package/dist/components/tool-call/types.d.ts +6 -1
  237. package/dist/components/tooltip/index.d.vue.ts +1 -1
  238. package/dist/components/tooltip/index.vue +1 -0
  239. package/dist/components/tour/index.d.vue.ts +4 -4
  240. package/dist/components/tour/index.vue +4 -4
  241. package/dist/components/tour/types.d.ts +5 -5
  242. package/dist/components/tree/index.d.vue.ts +27 -18
  243. package/dist/components/tree/index.vue +95 -27
  244. package/dist/components/tree/types.d.ts +18 -17
  245. package/dist/components/virtual-list/index.d.vue.ts +5 -4
  246. package/dist/components/virtual-list/index.vue +5 -4
  247. package/dist/components/virtual-list/types.d.ts +10 -8
  248. package/dist/composables/_internal/use-code-highlight.js +3 -1
  249. package/dist/composables/_internal/use-details-collapse.d.ts +7 -0
  250. package/dist/composables/_internal/use-details-collapse.js +68 -0
  251. package/dist/composables/_internal/use-list-selection.d.ts +1 -1
  252. package/dist/composables/_internal/use-list-selection.js +2 -2
  253. package/dist/composables/_internal/use-model-value.d.ts +1 -1
  254. package/dist/composables/_internal/use-model-value.js +1 -1
  255. package/dist/composables/_internal/use-tailwind-variant.js +1 -1
  256. package/dist/composables/_internal/use-tree.d.ts +32 -6
  257. package/dist/composables/_internal/use-tree.js +89 -54
  258. package/dist/composables/use-color-scheme.d.ts +1 -1
  259. package/dist/composables/use-color-scheme.js +7 -3
  260. package/dist/composables/use-countdown.d.ts +1 -1
  261. package/dist/composables/use-countdown.js +9 -9
  262. package/dist/composables/use-loading-bar.js +4 -0
  263. package/dist/composables/use-stick-to-bottom.d.ts +5 -0
  264. package/dist/composables/use-stick-to-bottom.js +45 -31
  265. package/dist/composables/use-virtual-list.d.ts +21 -1
  266. package/dist/composables/use-virtual-list.js +30 -9
  267. package/dist/constants/tooltip-variants.d.ts +2 -2
  268. package/dist/constants/tooltip-variants.js +3 -3
  269. package/dist/contexts/collapse.d.ts +1 -1
  270. package/dist/styles/styles.css +1 -1
  271. package/dist/styles/tw.css +12 -7
  272. package/package.json +10 -11
  273. package/volar.d.ts +3 -0
  274. package/dist/components/bubble-group/types.js +0 -0
  275. package/dist/components/virtual-list/types.js +0 -0
  276. package/dist/composables/_internal/use-collapse-motion.d.ts +0 -6
  277. package/dist/composables/_internal/use-collapse-motion.js +0 -85
  278. package/dist/utils/_internal/cn-tables.d.ts +0 -27
  279. package/dist/utils/_internal/cn-tables.js +0 -131
  280. package/dist/utils/cn.d.ts +0 -1
  281. package/dist/utils/cn.js +0 -3
@@ -17,7 +17,7 @@ defineOptions({
17
17
  inheritAttrs: false,
18
18
  model: {
19
19
  prop: "modelValue",
20
- event: "update:modelValue"
20
+ event: "update:model-value"
21
21
  }
22
22
  });
23
23
  const props = defineProps({
@@ -84,7 +84,7 @@ const props = defineProps({
84
84
  required: false
85
85
  }
86
86
  });
87
- const emits = defineEmits(["change", "update:modelValue"]);
87
+ const emits = defineEmits(["change", "update:model-value"]);
88
88
  const listId = getUniqueId("select-list");
89
89
  const searchInputId = getUniqueId("select-search");
90
90
  const FILTERABLE_KEYMAP = {
@@ -172,7 +172,7 @@ watch(listOptions, async () => {
172
172
  @wrapper-keydown="onKeydown"
173
173
  >
174
174
  <PButton
175
- class="px-1.5 justify-between"
175
+ class="px-1.5 justify-between text-inherit"
176
176
  align="left"
177
177
  full-width
178
178
  :class="{ 'text-gray-600': !translatedLabel }"
@@ -194,11 +194,14 @@ watch(listOptions, async () => {
194
194
  {{ placeholder }}
195
195
  </template>
196
196
 
197
- <template v-if="suffixIcon" #suffix>
198
- <ChevronDownIcon
199
- class="text-sm me-1.5 text-foreground-secondary motion-safe:transition-transform"
200
- :class="{ 'rotate-180': popoverVisible }"
201
- />
197
+ <template #suffix>
198
+ <slot name="suffix">
199
+ <ChevronDownIcon
200
+ v-if="suffixIcon"
201
+ class="text-sm me-1.5 text-foreground-secondary motion-safe:transition-transform"
202
+ :class="{ 'rotate-180': popoverVisible }"
203
+ />
204
+ </slot>
202
205
  </template>
203
206
  </PButton>
204
207
 
@@ -254,6 +257,10 @@ watch(listOptions, async () => {
254
257
  </slot>
255
258
  </template>
256
259
  </PList>
260
+
261
+ <div v-if="$slots.footer" class="pxd-select--footer p-2 border-t">
262
+ <slot name="footer" />
263
+ </div>
257
264
  </template>
258
265
  </PPopover>
259
266
  </template>
@@ -21,5 +21,5 @@ export interface SelectProps {
21
21
 
22
22
  export interface SelectEmits {
23
23
  change: [ListModelValue]
24
- 'update:modelValue': [ListModelValue]
24
+ 'update:model-value': [ListModelValue]
25
25
  }
@@ -4,8 +4,8 @@ type __VLS_Slots = {} & {
4
4
  default?: (props: typeof __VLS_1) => any;
5
5
  };
6
6
  declare const __VLS_base: import("vue").DefineComponent<ShimmerTextProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ShimmerTextProps> & Readonly<{}>, {
7
- color: string | ShimmerGradientStop[];
8
7
  disabled: boolean;
8
+ color: string | ShimmerGradientStop[];
9
9
  durations: number;
10
10
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
11
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -6,7 +6,7 @@ defineOptions({
6
6
  });
7
7
  const props = defineProps({
8
8
  text: {
9
- type: String,
9
+ type: null,
10
10
  required: false
11
11
  },
12
12
  color: {
@@ -6,7 +6,7 @@ export interface ShimmerGradientStop {
6
6
  }
7
7
 
8
8
  export interface ShimmerTextProps {
9
- text?: string
9
+ text?: ComponentLabel
10
10
  color?: string | ShimmerGradientStop[]
11
11
  variant?: ShimmerTextVariant
12
12
  disabled?: boolean
@@ -4,9 +4,9 @@ type __VLS_Slots = {} & {
4
4
  default?: (props: typeof __VLS_1) => any;
5
5
  };
6
6
  declare const __VLS_base: import("vue").DefineComponent<SkeletonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SkeletonProps> & Readonly<{}>, {
7
- loading: boolean;
8
7
  shape: import("../../types/shared/props.js").ComponentShape;
9
8
  height: string | number;
9
+ loading: boolean;
10
10
  animated: boolean;
11
11
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
12
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,13 +1,12 @@
1
1
  import type { SliderProps } from './types';
2
2
  declare const __VLS_export: import("vue").DefineComponent<SliderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
3
  change: (args_0: NonNullable<number | number[] | null | undefined>) => any;
4
- "update:modelValue": (args_0: NonNullable<number | number[] | null | undefined>) => any;
4
+ "update:model-value": (args_0: NonNullable<number | number[] | null | undefined>) => any;
5
5
  }, string, import("vue").PublicProps, Readonly<SliderProps> & Readonly<{
6
6
  onChange?: ((args_0: NonNullable<number | number[] | null | undefined>) => any) | undefined;
7
- "onUpdate:modelValue"?: ((args_0: NonNullable<number | number[] | null | undefined>) => any) | undefined;
7
+ "onUpdate:model-value"?: ((args_0: NonNullable<number | number[] | null | undefined>) => any) | undefined;
8
8
  }>, {
9
9
  variant: "secondary" | import("../../types/shared/props.js").ComponentVariant;
10
- modelValue: number | number[] | null;
11
10
  max: number;
12
11
  step: number | number[];
13
12
  min: number;
@@ -10,7 +10,7 @@ defineOptions({
10
10
  inheritAttrs: false,
11
11
  model: {
12
12
  prop: "modelValue",
13
- event: "update:modelValue"
13
+ event: "update:model-value"
14
14
  }
15
15
  });
16
16
  function clamp(value, lower, upper) {
@@ -63,11 +63,18 @@ const props = defineProps({
63
63
  Array,
64
64
  null
65
65
  ],
66
- required: false,
67
- default: 0
66
+ required: false
67
+ },
68
+ defaultValue: {
69
+ type: [
70
+ Number,
71
+ Array,
72
+ null
73
+ ],
74
+ required: false
68
75
  }
69
76
  });
70
- const emits = defineEmits(["change", "update:modelValue"]);
77
+ const emits = defineEmits(["change", "update:model-value"]);
71
78
  const configProvider = useConfigProvider();
72
79
  const { attrs, classes } = useTailwindVariant({
73
80
  base: "pxd-slider group/slider relative flex w-full max-w-full shrink-0 touch-none items-center rounded-full bg-gray-200 select-none",
@@ -129,10 +136,12 @@ let stopMoveListener = null;
129
136
  const sliderRef = shallowRef();
130
137
  const activeThumb = shallowRef(null);
131
138
  const modelValue = useModelValue(props, emits, { withChange: false });
139
+ const innerValue = shallowRef(props.defaultValue ?? (props.range ? [props.min, props.min] : props.min));
140
+ const activeValue = computed(() => props.modelValue ?? innerValue.value);
132
141
  // Outside range mode the start slot is pinned to `min`, so both modes share one pair and
133
142
  // only the emitted payload differs.
134
143
  const valueRange = computed(() => {
135
- const value = modelValue.value;
144
+ const value = activeValue.value;
136
145
  if (props.range) {
137
146
  return Array.isArray(value) ? value : [props.min, value];
138
147
  }
@@ -140,6 +149,7 @@ const valueRange = computed(() => {
140
149
  });
141
150
  function setValue(range) {
142
151
  const value = props.range ? range : range[1];
152
+ innerValue.value = value;
143
153
  modelValue.value = value;
144
154
  return value;
145
155
  }
@@ -334,7 +344,8 @@ function initModelValue() {
334
344
  // instead of lingering until the first interaction.
335
345
  const snapped = Array.isArray(props.step) ? [toValidValue(start), toValidValue(end)].sort((a, b) => a - b) : [start, end];
336
346
  const value = props.range ? snapped : snapped[1];
337
- if (!isSameValue(modelValue.value, value)) {
347
+ if (!isSameValue(activeValue.value, value)) {
348
+ innerValue.value = value;
338
349
  modelValue.value = value;
339
350
  }
340
351
  }
@@ -11,9 +11,10 @@ export interface SliderProps {
11
11
  size?: ComponentSize
12
12
  variant?: ComponentVariant | 'secondary'
13
13
  modelValue?: number | number[] | null
14
+ defaultValue?: number | number[] | null
14
15
  }
15
16
 
16
17
  export interface SliderEmits {
17
18
  change: [NonNullable<SliderProps['modelValue']>]
18
- 'update:modelValue': [NonNullable<SliderProps['modelValue']>]
19
+ 'update:model-value': [NonNullable<SliderProps['modelValue']>]
19
20
  }
@@ -11,11 +11,7 @@ defineOptions({
11
11
  });
12
12
  const props = defineProps({
13
13
  text: {
14
- type: [
15
- String,
16
- Array,
17
- null
18
- ],
14
+ type: null,
19
15
  required: false
20
16
  },
21
17
  size: {
@@ -1,7 +1,11 @@
1
- import type { ComponentSize, ComponentVariantWithDefault } from '../../types/shared/props'
1
+ import type {
2
+ ComponentSize,
3
+ ComponentVariantWithDefault,
4
+ ComponentLabel,
5
+ } from '../../types/shared/props'
2
6
 
3
7
  export interface SnippetProps {
4
- text?: string | string[] | null
8
+ text?: ComponentLabel | ComponentLabel[]
5
9
  size?: ComponentSize
6
10
  prompt?: boolean | string
7
11
  copyBtn?: 'always' | 'hover' | 'hidden'
@@ -5,5 +5,5 @@ type Range<N extends number, Acc extends number[] = []> = Acc['length'] extends
5
5
  export interface SpinnerDotsProps {
6
6
  variant?: `dots${Range<10>}`
7
7
  interval?: number
8
- data?: string[]
8
+ data?: readonly string[]
9
9
  }
@@ -6,20 +6,22 @@ declare var __VLS_13: {
6
6
  index: number;
7
7
  group: import("../list/types.js").ListOptionGroup | undefined;
8
8
  groupIndex: number | undefined;
9
- };
9
+ }, __VLS_31: {};
10
10
  type __VLS_Slots = {} & {
11
11
  default?: (props: typeof __VLS_13) => any;
12
12
  } & {
13
13
  icon?: (props: typeof __VLS_21) => any;
14
14
  } & {
15
15
  item?: (props: typeof __VLS_29) => any;
16
+ } & {
17
+ footer?: (props: typeof __VLS_31) => any;
16
18
  };
17
19
  declare const __VLS_base: import("vue").DefineComponent<SplitButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
20
  change: (args_0: import("../list/types.js").ListModelValue) => any;
19
- "update:modelValue": (args_0: import("../list/types.js").ListModelValue) => any;
21
+ "update:model-value": (args_0: import("../list/types.js").ListModelValue) => any;
20
22
  }, string, import("vue").PublicProps, Readonly<SplitButtonProps> & Readonly<{
21
23
  onChange?: ((args_0: import("../list/types.js").ListModelValue) => any) | undefined;
22
- "onUpdate:modelValue"?: ((args_0: import("../list/types.js").ListModelValue) => any) | undefined;
24
+ "onUpdate:model-value"?: ((args_0: import("../list/types.js").ListModelValue) => any) | undefined;
23
25
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
26
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
27
  declare const _default: typeof __VLS_export;
@@ -11,7 +11,7 @@ defineOptions({
11
11
  inheritAttrs: false,
12
12
  model: {
13
13
  prop: "modelValue",
14
- event: "update:modelValue"
14
+ event: "update:model-value"
15
15
  }
16
16
  });
17
17
  const props = defineProps({
@@ -49,7 +49,7 @@ const props = defineProps({
49
49
  required: false
50
50
  }
51
51
  });
52
- const emits = defineEmits(["change", "update:modelValue"]);
52
+ const emits = defineEmits(["change", "update:model-value"]);
53
53
  const modelValue = useModelValue(props, emits);
54
54
  const selectedItem = useSelectedListItem(() => props.options || [], modelValue);
55
55
  const configProvider = useConfigProvider();
@@ -89,5 +89,9 @@ const computedSize = computed(() => props.size || configProvider.size);
89
89
  <template v-if="$slots.item" #item="itemSlotProps">
90
90
  <slot name="item" v-bind="itemSlotProps" />
91
91
  </template>
92
+
93
+ <template v-if="$slots.footer">
94
+ <slot name="footer" />
95
+ </template>
92
96
  </PMenu>
93
97
  </template>
@@ -14,5 +14,5 @@ export interface SplitButtonProps {
14
14
 
15
15
  export interface SplitButtonEmits {
16
16
  change: [ListModelValue]
17
- 'update:modelValue': [ListModelValue]
17
+ 'update:model-value': [ListModelValue]
18
18
  }
@@ -9,10 +9,10 @@ type __VLS_Slots = {} & {
9
9
  };
10
10
  declare const __VLS_base: import("vue").DefineComponent<StepsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
11
  change: (args_0: number) => any;
12
- "update:modelValue": (args_0: number) => any;
12
+ "update:model-value": (args_0: number) => any;
13
13
  }, string, import("vue").PublicProps, Readonly<StepsProps> & Readonly<{
14
14
  onChange?: ((args_0: number) => any) | undefined;
15
- "onUpdate:modelValue"?: ((args_0: number) => any) | undefined;
15
+ "onUpdate:model-value"?: ((args_0: number) => any) | undefined;
16
16
  }>, {
17
17
  options: StepsOption[];
18
18
  status: StepsStatus;
@@ -9,7 +9,7 @@ defineOptions({
9
9
  inheritAttrs: false,
10
10
  model: {
11
11
  prop: "modelValue",
12
- event: "update:modelValue"
12
+ event: "update:model-value"
13
13
  }
14
14
  });
15
15
  const props = defineProps({
@@ -45,7 +45,7 @@ const props = defineProps({
45
45
  default: () => []
46
46
  }
47
47
  });
48
- const emits = defineEmits(["change", "update:modelValue"]);
48
+ const emits = defineEmits(["change", "update:model-value"]);
49
49
  const SIZES = {
50
50
  sm: {
51
51
  indicatorSize: "1.25rem",
@@ -21,5 +21,5 @@ export interface StepsProps {
21
21
 
22
22
  export interface StepsEmits {
23
23
  change: [number]
24
- 'update:modelValue': [number]
24
+ 'update:model-value': [number]
25
25
  }
@@ -1,5 +1,6 @@
1
1
  <script setup>
2
2
  import { shallowRef, watch } from "vue";
3
+ import { useTailwindVariant } from "../../composables/_internal/use-tailwind-variant.js";
3
4
  import { useStickToBottom } from "../../composables/use-stick-to-bottom.js";
4
5
  defineOptions({
5
6
  name: "PStickToBottom",
@@ -32,6 +33,7 @@ const props = defineProps({
32
33
  const emits = defineEmits(["change"]);
33
34
  const containerRef = shallowRef();
34
35
  const contentRef = shallowRef();
36
+ const { classes, attrs } = useTailwindVariant({ base: "pxd-stick-to-bottom min-h-0 w-full max-w-full overflow-y-auto [overflow-anchor:none]" });
35
37
  const { isAtBottom, scrollToBottom, forceStickToBottom, stickIfNeeded, update } = useStickToBottom(containerRef, contentRef, {
36
38
  threshold: () => props.threshold,
37
39
  enabled: () => props.enabled
@@ -51,12 +53,7 @@ defineExpose({
51
53
  </script>
52
54
 
53
55
  <template>
54
- <div
55
- data-stick-to-bottom
56
- ref="containerRef"
57
- class="pxd-stick-to-bottom min-h-0 w-full max-w-full overflow-y-auto"
58
- v-bind="$attrs"
59
- >
56
+ <div data-stick-to-bottom ref="containerRef" :class="classes" v-bind="attrs">
60
57
  <div
61
58
  ref="contentRef"
62
59
  class="pxd-stick-to-bottom--content"
@@ -25,12 +25,12 @@ declare const __VLS_base: import("vue").DefineComponent<SwipeCellProps, {
25
25
  open: (side: SwipeCellSide) => Promise<boolean>;
26
26
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
27
  close: () => any;
28
- "update:modelValue": (side: false | SwipeCellSide) => any;
28
+ "update:model-value": (side: false | SwipeCellSide) => any;
29
29
  open: (side: SwipeCellSide) => any;
30
30
  "over-swipe": (state: import("./types").SwipeCellOverSwipeState) => any;
31
31
  }, string, import("vue").PublicProps, Readonly<SwipeCellProps> & Readonly<{
32
32
  onClose?: (() => any) | undefined;
33
- "onUpdate:modelValue"?: ((side: false | SwipeCellSide) => any) | undefined;
33
+ "onUpdate:model-value"?: ((side: false | SwipeCellSide) => any) | undefined;
34
34
  onOpen?: ((side: SwipeCellSide) => any) | undefined;
35
35
  "onOver-swipe"?: ((state: import("./types").SwipeCellOverSwipeState) => any) | undefined;
36
36
  }>, {
@@ -10,7 +10,7 @@ defineOptions({
10
10
  inheritAttrs: false,
11
11
  model: {
12
12
  prop: "modelValue",
13
- event: "update:modelValue"
13
+ event: "update:model-value"
14
14
  }
15
15
  });
16
16
  const props = defineProps({
@@ -91,7 +91,7 @@ const emits = defineEmits([
91
91
  "open",
92
92
  "close",
93
93
  "over-swipe",
94
- "update:modelValue"
94
+ "update:model-value"
95
95
  ]);
96
96
  let alive = true;
97
97
  let offset = 0;
@@ -279,7 +279,7 @@ async function setOpen(side, trigger) {
279
279
  }
280
280
  openedSide.value = side;
281
281
  syncOpenOffset();
282
- emits("update:modelValue", side);
282
+ emits("update:model-value", side);
283
283
  if (side) {
284
284
  emits("open", side);
285
285
  } else {
@@ -49,5 +49,5 @@ export interface SwipeCellEmits {
49
49
  open: [side: SwipeCellSide]
50
50
  close: []
51
51
  'over-swipe': [state: SwipeCellOverSwipeState]
52
- 'update:modelValue': [side: SwipeCellSide | false]
52
+ 'update:model-value': [side: SwipeCellSide | false]
53
53
  }
@@ -5,10 +5,10 @@ type __VLS_Slots = {} & {
5
5
  };
6
6
  declare const __VLS_base: import("vue").DefineComponent<SwitchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
7
  change: (args_0: NonNullable<string | number | undefined>) => any;
8
- "update:modelValue": (args_0: NonNullable<string | number | undefined>) => any;
8
+ "update:model-value": (args_0: NonNullable<string | number | undefined>) => any;
9
9
  }, string, import("vue").PublicProps, Readonly<SwitchProps> & Readonly<{
10
10
  onChange?: ((args_0: NonNullable<string | number | undefined>) => any) | undefined;
11
- "onUpdate:modelValue"?: ((args_0: NonNullable<string | number | undefined>) => any) | undefined;
11
+ "onUpdate:model-value"?: ((args_0: NonNullable<string | number | undefined>) => any) | undefined;
12
12
  }>, {
13
13
  modelValue: string | number;
14
14
  options: import("../../types/shared/props.js").ComponentOption[];
@@ -11,7 +11,7 @@ defineOptions({
11
11
  inheritAttrs: false,
12
12
  model: {
13
13
  prop: "modelValue",
14
- event: "update:modelValue"
14
+ event: "update:model-value"
15
15
  }
16
16
  });
17
17
  const props = defineProps({
@@ -38,7 +38,7 @@ const props = defineProps({
38
38
  default: ""
39
39
  }
40
40
  });
41
- const emits = defineEmits(["change", "update:modelValue"]);
41
+ const emits = defineEmits(["change", "update:model-value"]);
42
42
  const SIZES = {
43
43
  sm: `${BASIC_HEIGHTS.sm} text-sm`,
44
44
  md: `${BASIC_HEIGHTS.md} text-sm`,
@@ -10,5 +10,5 @@ export interface SwitchProps {
10
10
 
11
11
  export interface SwitchEmits {
12
12
  change: [NonNullable<SwitchProps['modelValue']>]
13
- 'update:modelValue': [NonNullable<SwitchProps['modelValue']>]
13
+ 'update:model-value': [NonNullable<SwitchProps['modelValue']>]
14
14
  }
@@ -9,7 +9,7 @@ defineOptions({
9
9
  inheritAttrs: false,
10
10
  model: {
11
11
  prop: "modelValue",
12
- event: "update:modelValue"
12
+ event: "update:model-value"
13
13
  }
14
14
  });
15
15
  const props = defineProps({
@@ -54,7 +54,7 @@ function onInputChange() {
54
54
  role="switch"
55
55
  :aria-selected="isChecked"
56
56
  :data-disabled="isDisabled"
57
- class="pxd-switch-item flex-1 shrink-0 cursor-pointer"
57
+ class="pxd-switch-item relative flex-1 shrink-0 cursor-pointer"
58
58
  :for="uniqueId"
59
59
  v-bind="$attrs"
60
60
  >
@@ -2,10 +2,10 @@ import type { ComponentValue } from '../../types/shared/props';
2
2
  import type { TabsProps, TabsOptions } from './types';
3
3
  declare const __VLS_export: import("vue").DefineComponent<TabsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
4
  change: (args_0: NonNullable<ComponentValue>) => any;
5
- "update:modelValue": (args_0: NonNullable<ComponentValue>) => any;
5
+ "update:model-value": (args_0: NonNullable<ComponentValue>) => any;
6
6
  }, string, import("vue").PublicProps, Readonly<TabsProps> & Readonly<{
7
7
  onChange?: ((args_0: NonNullable<ComponentValue>) => any) | undefined;
8
- "onUpdate:modelValue"?: ((args_0: NonNullable<ComponentValue>) => any) | undefined;
8
+ "onUpdate:model-value"?: ((args_0: NonNullable<ComponentValue>) => any) | undefined;
9
9
  }>, {
10
10
  variant: "default" | "secondary" | "segmented";
11
11
  options: TabsOptions[];
@@ -11,7 +11,7 @@ defineOptions({
11
11
  inheritAttrs: false,
12
12
  model: {
13
13
  prop: "modelValue",
14
- event: "update:modelValue"
14
+ event: "update:model-value"
15
15
  }
16
16
  });
17
17
  const props = defineProps({
@@ -38,7 +38,7 @@ const props = defineProps({
38
38
  default: () => []
39
39
  }
40
40
  });
41
- const emits = defineEmits(["change", "update:modelValue"]);
41
+ const emits = defineEmits(["change", "update:model-value"]);
42
42
  const BORDER_WIDTH = 2;
43
43
  const SCROLL_EPSILON = 2;
44
44
  const uid = getUniqueId("pxd-tabs");
@@ -309,5 +309,5 @@ onBeforeUnmount(() => {
309
309
  </template>
310
310
 
311
311
  <style>
312
- .pxd-tabs--header[data-variant=default]{box-shadow:0 -1px 0 0 var(--color-border) inset;padding-bottom:1px}.pxd-tabs--header[data-variant=default]+.pxd-tabs--content{padding-top:.75rem}.pxd-tabs--header[data-variant=default] .pxd-tabs--scroll{margin-bottom:-1px}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav{gap:1.5rem}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav-item{border-bottom:2px solid transparent;padding:.875rem .375rem}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav-item:not(:disabled){color:var(--color-gray-900)}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav-item[aria-selected=true]{border-color:currentColor;color:var(--color-primary)}.pxd-tabs--header[data-variant=secondary]+.pxd-tabs--content{padding-top:.5rem}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav{gap:.5rem}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav-item{background-color:var(--color-gray-alpha-200);border-radius:var(--radius-md);font-size:var(--text-13px);height:1.5rem;padding:0 .375rem}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav-item:disabled{background-color:var(--color-gray-100)}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav-item[aria-selected=true]{background-color:var(--color-primary);color:var(--color-gray-100)}.pxd-tabs--header[data-variant=segmented]{background-color:var(--color-gray-alpha-200);border-radius:var(--radius-md);color:var(--color-gray-800);padding:.25rem;width:-moz-max-content;width:max-content}.pxd-tabs--header[data-variant=segmented]+.pxd-tabs--content{padding-top:.75rem}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--arrow{border-width:0}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav{gap:.25rem}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav-item{border-radius:var(--radius-sm);height:1.5rem;padding:0 .5rem}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav-item:hover{color:var(--color-foreground)}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav-item:disabled{color:var(--color-gray-500)}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav-item[aria-selected=true]{background-color:var(--color-background-100);box-shadow:var(--shadow-small);color:var(--color-foreground)}
312
+ .pxd-tabs--header[data-variant=default]{box-shadow:0 -1px 0 0 var(--color-border) inset;padding-bottom:1px}.pxd-tabs--header[data-variant=default]+.pxd-tabs--content{padding-top:.75rem}.pxd-tabs--header[data-variant=default] .pxd-tabs--scroll{margin-bottom:-1px}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav{gap:1.5rem}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav-item{border-bottom:2px solid transparent;padding:.875rem .375rem}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav-item:not(:disabled){color:var(--color-gray-900)}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav-item[aria-selected=true]{border-color:currentColor;color:var(--color-primary)}.pxd-tabs--header[data-variant=secondary]+.pxd-tabs--content{padding-top:.5rem}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav{gap:.5rem}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav-item{background-color:var(--color-gray-alpha-200);border-radius:var(--radius-md);font-size:13px;height:1.5rem;padding:0 .375rem}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav-item:disabled{background-color:var(--color-gray-100)}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav-item[aria-selected=true]{background-color:var(--color-primary);color:var(--color-gray-100)}.pxd-tabs--header[data-variant=segmented]{background-color:var(--color-gray-alpha-200);border-radius:var(--radius-md);color:var(--color-gray-800);padding:.25rem;width:-moz-max-content;width:max-content}.pxd-tabs--header[data-variant=segmented]+.pxd-tabs--content{padding-top:.75rem}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--arrow{border-width:0}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav{gap:.25rem}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav-item{border-radius:var(--radius-sm);height:1.5rem;padding:0 .5rem}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav-item:hover{color:var(--color-foreground)}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav-item:disabled{color:var(--color-gray-500)}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav-item[aria-selected=true]{background-color:var(--color-background-100);box-shadow:var(--shadow-small);color:var(--color-foreground)}
313
313
  </style>
@@ -14,5 +14,5 @@ export interface TabsProps {
14
14
 
15
15
  export interface TabsEmits {
16
16
  change: [NonNullable<ComponentValue>]
17
- 'update:modelValue': [NonNullable<ComponentValue>]
17
+ 'update:model-value': [NonNullable<ComponentValue>]
18
18
  }
@@ -14,7 +14,7 @@ const props = defineProps({
14
14
  default: "p"
15
15
  },
16
16
  text: {
17
- type: String,
17
+ type: null,
18
18
  required: false
19
19
  },
20
20
  size: {
@@ -2,7 +2,7 @@ import type { ComponentAs, ResponsiveValue } from '../../types/shared/props'
2
2
 
3
3
  export interface TextProps {
4
4
  as?: ComponentAs
5
- text?: string
5
+ text?: ComponentLabel
6
6
  size?: ResponsiveValue<string | number>
7
7
  align?: 'left' | 'center' | 'right'
8
8
  monospace?: boolean
@@ -1,12 +1,12 @@
1
1
  import type { TextareaProps } from './types';
2
2
  declare const __VLS_export: import("vue").DefineComponent<TextareaProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
3
  change: (args_0: NonNullable<import("../../types/shared/props.js").ComponentLabel>) => any;
4
- "update:modelValue": (args_0: NonNullable<import("../../types/shared/props.js").ComponentLabel>) => any;
4
+ "update:model-value": (args_0: NonNullable<import("../../types/shared/props.js").ComponentLabel>) => any;
5
5
  blur: (args_0: FocusEvent) => any;
6
6
  focus: (args_0: FocusEvent) => any;
7
7
  }, string, import("vue").PublicProps, Readonly<TextareaProps> & Readonly<{
8
8
  onChange?: ((args_0: NonNullable<import("../../types/shared/props.js").ComponentLabel>) => any) | undefined;
9
- "onUpdate:modelValue"?: ((args_0: NonNullable<import("../../types/shared/props.js").ComponentLabel>) => any) | undefined;
9
+ "onUpdate:model-value"?: ((args_0: NonNullable<import("../../types/shared/props.js").ComponentLabel>) => any) | undefined;
10
10
  onBlur?: ((args_0: FocusEvent) => any) | undefined;
11
11
  onFocus?: ((args_0: FocusEvent) => any) | undefined;
12
12
  }>, {
@@ -11,7 +11,7 @@ defineOptions({
11
11
  inheritAttrs: false,
12
12
  model: {
13
13
  prop: "modelValue",
14
- event: "update:modelValue"
14
+ event: "update:model-value"
15
15
  }
16
16
  });
17
17
  const props = defineProps({
@@ -76,7 +76,7 @@ const props = defineProps({
76
76
  }
77
77
  });
78
78
  const emits = defineEmits([
79
- "update:modelValue",
79
+ "update:model-value",
80
80
  "change",
81
81
  "focus",
82
82
  "blur"
@@ -18,7 +18,7 @@ export interface TextareaProps {
18
18
  }
19
19
 
20
20
  export interface TextareaEmits {
21
- 'update:modelValue': [NonNullable<TextareaProps['modelValue']>]
21
+ 'update:model-value': [NonNullable<TextareaProps['modelValue']>]
22
22
  change: [NonNullable<TextareaProps['modelValue']>]
23
23
  focus: [FocusEvent]
24
24
  blur: [FocusEvent]
@@ -1,8 +1,7 @@
1
- import type { ColorPreference } from '../../composables/use-color-scheme';
2
1
  declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
- toggle: (args_0: ColorPreference) => any;
2
+ toggle: (args_0: import("../../composables/use-color-scheme.js").ColorPreference) => any;
4
3
  }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
5
- onToggle?: ((args_0: ColorPreference) => any) | undefined;
4
+ onToggle?: ((args_0: import("../../composables/use-color-scheme.js").ColorPreference) => any) | undefined;
6
5
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7
6
  declare const _default: typeof __VLS_export;
8
7
  export default _default;
@@ -10,13 +10,13 @@ defineOptions({
10
10
  inheritAttrs: false
11
11
  });
12
12
  const emits = defineEmits(["toggle"]);
13
- const SCHEME_ICONS = {
14
- auto: DeviceAlternateIcon,
15
- light: SunIcon,
16
- dark: MoonIcon
17
- };
18
- const { colorScheme, toggleDarkMode } = useColorScheme({ syncStatus: true });
19
- const renderIcon = computed(() => SCHEME_ICONS[colorScheme.value]);
13
+ const { colorScheme, isDark, toggleDarkMode } = useColorScheme({ syncStatus: true });
14
+ const renderIcon = computed(() => {
15
+ if (colorScheme.value === "auto") {
16
+ return DeviceAlternateIcon;
17
+ }
18
+ return isDark.value ? MoonIcon : SunIcon;
19
+ });
20
20
  watch(() => colorScheme.value, (newVal) => {
21
21
  emits("toggle", newVal);
22
22
  });