@expcat/tigercat-vue 2.1.0 → 2.1.1

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 (250) hide show
  1. package/dist/{chunk-7W3NALIL.mjs → chunk-3FPS7XVB.mjs} +26 -27
  2. package/dist/{chunk-2OI6GWOT.mjs → chunk-3KAHJF7D.mjs} +12 -11
  3. package/dist/{chunk-IEAEB4TX.mjs → chunk-3OCHBGPF.mjs} +242 -51
  4. package/dist/{chunk-4HUYX5WW.mjs → chunk-4PQZMDBK.mjs} +29 -8
  5. package/dist/{chunk-DI6RRAGQ.mjs → chunk-562Z32GR.mjs} +3 -3
  6. package/dist/{chunk-OQVGB7X6.mjs → chunk-626VUZ2Q.mjs} +1 -1
  7. package/dist/{chunk-66OS5A4D.mjs → chunk-67VS6QHJ.mjs} +26 -12
  8. package/dist/{chunk-EHGFW5GX.mjs → chunk-6JAAXPBW.mjs} +4 -3
  9. package/dist/{chunk-JHMT5Q6P.mjs → chunk-6NYC7EY2.mjs} +29 -15
  10. package/dist/{chunk-6BDDX2R4.mjs → chunk-73Z7N7VG.mjs} +1 -4
  11. package/dist/{chunk-F3ZVVVYD.mjs → chunk-7C7SG3SS.mjs} +15 -3
  12. package/dist/{chunk-CHEXI7MO.mjs → chunk-7TJE7OYH.mjs} +4 -3
  13. package/dist/{chunk-AU6IC6K7.mjs → chunk-ABNS4B5V.mjs} +35 -15
  14. package/dist/{chunk-EGIMTTZA.mjs → chunk-BOHE5URZ.mjs} +18 -3
  15. package/dist/{chunk-5RIHHZF6.mjs → chunk-BQK7LH2L.mjs} +4 -1
  16. package/dist/{chunk-E6EZHSGY.mjs → chunk-BSOLH6R5.mjs} +0 -1
  17. package/dist/{chunk-RSM6FOWX.mjs → chunk-CCC3S6LK.mjs} +6 -3
  18. package/dist/{chunk-U75YXWSA.mjs → chunk-CLTRADS7.mjs} +17 -5
  19. package/dist/{chunk-BEIPGX74.mjs → chunk-DRLQCY7R.mjs} +162 -7
  20. package/dist/{chunk-KBJANUZZ.mjs → chunk-E523VGZP.mjs} +1 -1
  21. package/dist/{chunk-D3U2NJ32.mjs → chunk-FEQ7PZXI.mjs} +8 -2
  22. package/dist/{chunk-PE5OA4YG.mjs → chunk-FHUGOSEY.mjs} +8 -2
  23. package/dist/{chunk-OAPIT53X.mjs → chunk-FIEECAJV.mjs} +7 -10
  24. package/dist/{chunk-7SFB77JR.mjs → chunk-GBPMQJJJ.mjs} +8 -1
  25. package/dist/{chunk-6AMWX5K4.mjs → chunk-GQOPDD44.mjs} +1 -1
  26. package/dist/{chunk-5RXYJWNA.mjs → chunk-H4DEIGEG.mjs} +77 -25
  27. package/dist/{chunk-EZYOCPMM.mjs → chunk-IK2WHKDA.mjs} +29 -15
  28. package/dist/{chunk-HGXD57QM.mjs → chunk-JBS3AESR.mjs} +65 -23
  29. package/dist/{chunk-PYRKFQ6J.mjs → chunk-JIU5UEOU.mjs} +70 -26
  30. package/dist/{chunk-JALHMWKW.mjs → chunk-K5MHUMKR.mjs} +2 -2
  31. package/dist/{chunk-5E4LINDO.mjs → chunk-LH2V2JMZ.mjs} +26 -10
  32. package/dist/{chunk-PQBKN2NH.mjs → chunk-LRFKHJDU.mjs} +14 -5
  33. package/dist/{chunk-W5XFWVNV.mjs → chunk-M4FWWEMX.mjs} +15 -6
  34. package/dist/{chunk-VLW3UBIR.mjs → chunk-N2XV37BL.mjs} +37 -41
  35. package/dist/{chunk-2LIIMWBR.mjs → chunk-OYU47A57.mjs} +1 -2
  36. package/dist/{chunk-KU2Q5V3L.mjs → chunk-P62TYR3M.mjs} +18 -2
  37. package/dist/{chunk-P5FDKBXG.mjs → chunk-P7X46BAW.mjs} +70 -3
  38. package/dist/{chunk-KROVW4AW.mjs → chunk-PJQTRDIG.mjs} +13 -3
  39. package/dist/{chunk-26OI3TEA.mjs → chunk-PMQSXEMT.mjs} +42 -6
  40. package/dist/{chunk-XLNK3Z2P.mjs → chunk-POWDTOMF.mjs} +88 -79
  41. package/dist/{chunk-AXDBME5A.mjs → chunk-PSGVG4TN.mjs} +38 -21
  42. package/dist/{chunk-7DWWNFRP.mjs → chunk-PWWWACHC.mjs} +1 -1
  43. package/dist/{chunk-UUWTKCMY.mjs → chunk-QWLD5FMJ.mjs} +1 -1
  44. package/dist/{chunk-ALIUAGJO.mjs → chunk-QZLOF36M.mjs} +7 -13
  45. package/dist/{chunk-WLYQHKLZ.mjs → chunk-QZRSFGZZ.mjs} +50 -11
  46. package/dist/{chunk-37W7XTA6.mjs → chunk-RHQWQJ4I.mjs} +4 -3
  47. package/dist/{chunk-32X54QKW.mjs → chunk-RRLE7QRH.mjs} +43 -22
  48. package/dist/{chunk-RID7A5V7.mjs → chunk-RRNQL6MJ.mjs} +23 -6
  49. package/dist/{chunk-VJ6YM2EW.mjs → chunk-S4BKVFQ7.mjs} +1 -1
  50. package/dist/{chunk-LPZBXTJ6.mjs → chunk-SAC4PAG3.mjs} +4 -4
  51. package/dist/{chunk-W5RZPTFD.mjs → chunk-SNNT64HK.mjs} +13 -2
  52. package/dist/{chunk-N3C6YI7I.mjs → chunk-SWMYIORV.mjs} +22 -7
  53. package/dist/{chunk-U4B5QT72.mjs → chunk-SX3NAN4M.mjs} +1 -1
  54. package/dist/{chunk-JL3CN4UK.mjs → chunk-TDBMAKTJ.mjs} +10 -3
  55. package/dist/chunk-UEGNXN5B.mjs +28 -0
  56. package/dist/{chunk-NEEGXKJW.mjs → chunk-UGHLEKEZ.mjs} +22 -3
  57. package/dist/{chunk-HKYRRQS7.mjs → chunk-UNQO7EVG.mjs} +1 -1
  58. package/dist/{chunk-VN2TWPRC.mjs → chunk-UR5F74ZB.mjs} +112 -18
  59. package/dist/{chunk-VCCK4CDT.mjs → chunk-URPXBKK4.mjs} +23 -5
  60. package/dist/{chunk-7KCOF5US.mjs → chunk-VY6FVIOZ.mjs} +10 -8
  61. package/dist/{chunk-KICZSLOX.mjs → chunk-W2ICYZVU.mjs} +1 -1
  62. package/dist/{chunk-FIVVKBBF.mjs → chunk-W3QOMJKQ.mjs} +8 -6
  63. package/dist/{chunk-DCMRB3HR.mjs → chunk-WV25G4M3.mjs} +4 -3
  64. package/dist/{chunk-ZOYHZF4N.mjs → chunk-X5LJT76O.mjs} +49 -32
  65. package/dist/{chunk-BNYA5IUB.mjs → chunk-YNXP34KO.mjs} +39 -38
  66. package/dist/{chunk-2T2NEZRZ.mjs → chunk-YVDTXHQ6.mjs} +1 -1
  67. package/dist/{chunk-AUMTHL6N.mjs → chunk-ZOP7PEKY.mjs} +2 -1
  68. package/dist/components/ActivityFeed.d.mts +29 -11
  69. package/dist/components/ActivityFeed.mjs +2 -2
  70. package/dist/components/Affix.mjs +1 -1
  71. package/dist/components/Alert.d.mts +2 -2
  72. package/dist/components/Anchor.d.mts +1 -1
  73. package/dist/components/Anchor.mjs +1 -1
  74. package/dist/components/AreaChart.d.mts +3 -3
  75. package/dist/components/AreaChart.mjs +4 -3
  76. package/dist/components/AutoComplete.d.mts +5 -5
  77. package/dist/components/AutoComplete.mjs +1 -1
  78. package/dist/components/Avatar.d.mts +1 -1
  79. package/dist/components/AvatarGroup.d.mts +1 -1
  80. package/dist/components/BackTop.d.mts +2 -2
  81. package/dist/components/Badge.d.mts +4 -4
  82. package/dist/components/BarChart.d.mts +2 -2
  83. package/dist/components/BarChart.mjs +4 -3
  84. package/dist/components/Breadcrumb.d.mts +3 -3
  85. package/dist/components/Button.d.mts +3 -3
  86. package/dist/components/ButtonGroup.d.mts +1 -1
  87. package/dist/components/Calendar.d.mts +1 -1
  88. package/dist/components/Calendar.mjs +1 -1
  89. package/dist/components/Card.d.mts +2 -2
  90. package/dist/components/Cascader.d.mts +3 -3
  91. package/dist/components/Cascader.mjs +1 -1
  92. package/dist/components/ChartCanvas.d.mts +8 -4
  93. package/dist/components/ChartCanvas.mjs +1 -1
  94. package/dist/components/ChartGrid.d.mts +1 -1
  95. package/dist/components/ChartLegend.d.mts +1 -1
  96. package/dist/components/ChatWindow.d.mts +30 -12
  97. package/dist/components/ChatWindow.mjs +3 -3
  98. package/dist/components/Checkbox.d.mts +1 -1
  99. package/dist/components/Code.d.mts +33 -6
  100. package/dist/components/Code.mjs +3 -1
  101. package/dist/components/CodeEditor.d.mts +3 -3
  102. package/dist/components/Collapse.d.mts +1 -1
  103. package/dist/components/CollapsePanel.d.mts +1 -1
  104. package/dist/components/CollapsePanel.mjs +1 -1
  105. package/dist/components/ColorPicker.mjs +1 -1
  106. package/dist/components/ColorSwatch.d.mts +8 -2
  107. package/dist/components/ColorSwatch.mjs +1 -1
  108. package/dist/components/CommentThread.d.mts +62 -26
  109. package/dist/components/CommentThread.mjs +2 -2
  110. package/dist/components/Container.d.mts +1 -1
  111. package/dist/components/ContextMenu.d.mts +1 -1
  112. package/dist/components/Countdown.d.mts +2 -2
  113. package/dist/components/CronEditor.d.mts +3 -3
  114. package/dist/components/DataExport.mjs +2 -2
  115. package/dist/components/DataTableWithToolbar.d.mts +9 -9
  116. package/dist/components/DataTableWithToolbar.mjs +7 -7
  117. package/dist/components/DatePicker.d.mts +4 -4
  118. package/dist/components/Descriptions.d.mts +2 -2
  119. package/dist/components/DonutChart.d.mts +3 -3
  120. package/dist/components/DonutChart.mjs +4 -4
  121. package/dist/components/Drawer.d.mts +3 -3
  122. package/dist/components/Dropdown.d.mts +20 -1
  123. package/dist/components/Dropdown.mjs +1 -1
  124. package/dist/components/FileManager.d.mts +9 -3
  125. package/dist/components/FileManager.mjs +1 -1
  126. package/dist/components/FloatButton.d.mts +34 -4
  127. package/dist/components/FloatButton.mjs +1 -1
  128. package/dist/components/Form.d.mts +2 -2
  129. package/dist/components/FormWizard.d.mts +5 -5
  130. package/dist/components/FormWizard.mjs +1 -1
  131. package/dist/components/FunnelChart.d.mts +3 -3
  132. package/dist/components/FunnelChart.mjs +3 -3
  133. package/dist/components/Gantt.d.mts +5 -3
  134. package/dist/components/Gantt.mjs +2 -2
  135. package/dist/components/GaugeChart.d.mts +2 -2
  136. package/dist/components/GaugeChart.mjs +2 -2
  137. package/dist/components/HeatmapChart.d.mts +3 -3
  138. package/dist/components/HeatmapChart.mjs +3 -3
  139. package/dist/components/Icon.d.mts +2 -2
  140. package/dist/components/Image.d.mts +2 -2
  141. package/dist/components/Image.mjs +3 -3
  142. package/dist/components/ImageAnnotation.d.mts +5 -5
  143. package/dist/components/ImageCompare.d.mts +2 -2
  144. package/dist/components/ImageGroup.mjs +2 -2
  145. package/dist/components/ImagePreview.mjs +1 -1
  146. package/dist/components/InfiniteScroll.d.mts +3 -3
  147. package/dist/components/Input.d.mts +3 -3
  148. package/dist/components/Input.mjs +1 -1
  149. package/dist/components/InputGroup.d.mts +1 -1
  150. package/dist/components/InputNumber.d.mts +1 -1
  151. package/dist/components/InputNumber.mjs +1 -1
  152. package/dist/components/InputOTP.d.mts +5 -5
  153. package/dist/components/Kanban.mjs +2 -2
  154. package/dist/components/Kbd.d.mts +1 -1
  155. package/dist/components/LineChart.d.mts +2 -2
  156. package/dist/components/LineChart.mjs +4 -3
  157. package/dist/components/Link.d.mts +1 -1
  158. package/dist/components/List.d.mts +6 -6
  159. package/dist/components/List.mjs +2 -2
  160. package/dist/components/Loading.d.mts +6 -6
  161. package/dist/components/Loading.mjs +1 -1
  162. package/dist/components/LoadingBarContainer.d.mts +3 -3
  163. package/dist/components/MarkdownEditor.d.mts +3 -3
  164. package/dist/components/Marquee.d.mts +2 -2
  165. package/dist/components/MaskInput.d.mts +11 -5
  166. package/dist/components/MaskInput.mjs +1 -1
  167. package/dist/components/Mentions.d.mts +3 -3
  168. package/dist/components/Menu.d.mts +4 -4
  169. package/dist/components/Modal.d.mts +6 -6
  170. package/dist/components/NavigationMenu.d.mts +5 -5
  171. package/dist/components/NotificationCenter.d.mts +46 -28
  172. package/dist/components/NotificationCenter.mjs +4 -4
  173. package/dist/components/NumberKeyboard.d.mts +6 -6
  174. package/dist/components/OrgChart.d.mts +3 -3
  175. package/dist/components/OrgChart.mjs +2 -2
  176. package/dist/components/Pagination.d.mts +4 -4
  177. package/dist/components/Pagination.mjs +1 -1
  178. package/dist/components/PieChart.d.mts +3 -3
  179. package/dist/components/PieChart.mjs +3 -3
  180. package/dist/components/Popconfirm.d.mts +2 -2
  181. package/dist/components/Popconfirm.mjs +2 -2
  182. package/dist/components/Popover.d.mts +1 -1
  183. package/dist/components/Popover.mjs +2 -2
  184. package/dist/components/Progress.d.mts +3 -3
  185. package/dist/components/QRCode.d.mts +4 -13
  186. package/dist/components/QRCode.mjs +1 -1
  187. package/dist/components/RadarChart.d.mts +3 -3
  188. package/dist/components/RadarChart.mjs +3 -3
  189. package/dist/components/Radio.d.mts +1 -1
  190. package/dist/components/Radio.mjs +1 -1
  191. package/dist/components/Rate.d.mts +1 -1
  192. package/dist/components/Rate.mjs +1 -1
  193. package/dist/components/Result.d.mts +1 -1
  194. package/dist/components/RichTextEditor.d.mts +2 -2
  195. package/dist/components/Row.d.mts +1 -1
  196. package/dist/components/ScatterChart.d.mts +2 -2
  197. package/dist/components/ScatterChart.mjs +4 -3
  198. package/dist/components/ScrollArea.d.mts +2 -2
  199. package/dist/components/ScrollSpy.d.mts +3 -3
  200. package/dist/components/ScrollSpy.mjs +1 -1
  201. package/dist/components/Select.d.mts +3 -3
  202. package/dist/components/Signature.d.mts +4 -4
  203. package/dist/components/Signature.mjs +1 -1
  204. package/dist/components/Skeleton.d.mts +1 -1
  205. package/dist/components/Slider.d.mts +18 -0
  206. package/dist/components/Slider.mjs +1 -1
  207. package/dist/components/Space.d.mts +2 -2
  208. package/dist/components/SplitButton.d.mts +5 -5
  209. package/dist/components/SplitButton.mjs +2 -2
  210. package/dist/components/Splitter.d.mts +5 -5
  211. package/dist/components/Splitter.mjs +1 -1
  212. package/dist/components/Spotlight.d.mts +4 -4
  213. package/dist/components/Stepper.d.mts +7 -1
  214. package/dist/components/Stepper.mjs +1 -1
  215. package/dist/components/Steps.d.mts +3 -3
  216. package/dist/components/SunburstChart.d.mts +2 -2
  217. package/dist/components/SunburstChart.mjs +3 -3
  218. package/dist/components/Switch.d.mts +22 -6
  219. package/dist/components/Switch.mjs +1 -1
  220. package/dist/components/Table.d.mts +9 -9
  221. package/dist/components/Table.mjs +3 -3
  222. package/dist/components/Tabs.d.mts +3 -3
  223. package/dist/components/Tag.d.mts +2 -2
  224. package/dist/components/TagsInput.d.mts +5 -5
  225. package/dist/components/TaskBoard.mjs +1 -1
  226. package/dist/components/Text.d.mts +3 -3
  227. package/dist/components/Textarea.d.mts +3 -3
  228. package/dist/components/Textarea.mjs +1 -1
  229. package/dist/components/TimePicker.d.mts +4 -4
  230. package/dist/components/Timeline.d.mts +3 -3
  231. package/dist/components/Tooltip.d.mts +1 -1
  232. package/dist/components/Tooltip.mjs +2 -2
  233. package/dist/components/Tour.d.mts +2 -2
  234. package/dist/components/Tour.mjs +1 -1
  235. package/dist/components/Transfer.d.mts +5 -4
  236. package/dist/components/Transfer.mjs +1 -1
  237. package/dist/components/Tree.d.mts +4 -4
  238. package/dist/components/TreeMapChart.d.mts +2 -2
  239. package/dist/components/TreeMapChart.mjs +3 -3
  240. package/dist/components/TreeSelect.d.mts +3 -3
  241. package/dist/components/TreeSelect.mjs +1 -1
  242. package/dist/components/Upload.d.mts +2 -2
  243. package/dist/components/Upload.mjs +1 -1
  244. package/dist/components/VirtualTable.d.mts +3 -3
  245. package/dist/components/Watermark.d.mts +1 -1
  246. package/dist/composables/useChartInteraction.d.mts +5 -0
  247. package/dist/composables/useChartInteraction.mjs +1 -1
  248. package/dist/index.d.mts +1 -1
  249. package/dist/index.mjs +51 -0
  250. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
1
  // src/components/Switch.ts
2
- import { defineComponent, computed, h } from "vue";
2
+ import { defineComponent, computed, h, ref } from "vue";
3
3
  import {
4
4
  getSwitchClasses,
5
5
  getSwitchThumbClasses,
@@ -10,10 +10,17 @@ var Switch = defineComponent({
10
10
  inheritAttrs: false,
11
11
  props: {
12
12
  /**
13
- * Whether the switch is checked
14
- * @default false
13
+ * Whether the switch is checked (controlled mode)
15
14
  */
16
15
  modelValue: {
16
+ type: [Boolean, null],
17
+ default: null
18
+ },
19
+ /**
20
+ * Default checked state (uncontrolled mode)
21
+ * @default false
22
+ */
23
+ defaultValue: {
17
24
  type: Boolean,
18
25
  default: false
19
26
  },
@@ -51,13 +58,21 @@ var Switch = defineComponent({
51
58
  change: (value) => typeof value === "boolean"
52
59
  },
53
60
  setup(props, { emit, attrs }) {
61
+ const internalChecked = ref(props.defaultValue);
62
+ const isControlled = computed(() => props.modelValue !== null);
63
+ const checked = computed(
64
+ () => isControlled.value ? props.modelValue === true : internalChecked.value
65
+ );
54
66
  const switchClasses = computed(
55
- () => getSwitchClasses(props.size, props.modelValue, props.disabled, props.className, attrs.class)
67
+ () => getSwitchClasses(props.size, checked.value, props.disabled, props.className, attrs.class)
56
68
  );
57
- const thumbClasses = computed(() => getSwitchThumbClasses(props.size, props.modelValue));
69
+ const thumbClasses = computed(() => getSwitchThumbClasses(props.size, checked.value));
58
70
  const emitChange = () => {
59
71
  if (props.disabled) return;
60
- const newValue = !props.modelValue;
72
+ const newValue = !checked.value;
73
+ if (!isControlled.value) {
74
+ internalChecked.value = newValue;
75
+ }
61
76
  emit("update:modelValue", newValue);
62
77
  emit("change", newValue);
63
78
  };
@@ -74,7 +89,7 @@ var Switch = defineComponent({
74
89
  ...attrs,
75
90
  type: "button",
76
91
  role: "switch",
77
- "aria-checked": props.modelValue,
92
+ "aria-checked": checked.value,
78
93
  "aria-disabled": props.disabled ? "true" : void 0,
79
94
  class: switchClasses.value,
80
95
  style: mergeStyleValues(attrs.style, props.style),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PieChart
3
- } from "./chunk-CHEXI7MO.mjs";
3
+ } from "./chunk-7TJE7OYH.mjs";
4
4
 
5
5
  // src/components/DonutChart.ts
6
6
  import { defineComponent, computed, h, onMounted, ref } from "vue";
@@ -13,6 +13,7 @@ import {
13
13
  calendarWeekdayClasses,
14
14
  getCalendarDayClasses,
15
15
  getCalendarMonthClasses,
16
+ isCalendarMonthDisabled,
16
17
  isSameDay,
17
18
  getMonthDays,
18
19
  getShortDayNames,
@@ -79,8 +80,12 @@ var Calendar = defineComponent({
79
80
  emit("change", date);
80
81
  }
81
82
  function selectMonth(monthIdx) {
83
+ if (isCalendarMonthDisabled(viewYear.value, monthIdx, props.disabledDate)) return;
82
84
  viewMonth.value = monthIdx;
83
- emit("panel-change", new Date(viewYear.value, monthIdx, 1), props.mode);
85
+ const date = new Date(viewYear.value, monthIdx, 1);
86
+ emit("update:modelValue", date);
87
+ emit("change", date);
88
+ emit("panel-change", date, "month");
84
89
  }
85
90
  const dayGridEl = ref(null);
86
91
  const monthGridEl = ref(null);
@@ -261,6 +266,7 @@ var Calendar = defineComponent({
261
266
  { key: ri, class: "grid grid-cols-3 gap-2", role: "row" },
262
267
  row.map((m, ci) => {
263
268
  const i = ri * 3 + ci;
269
+ const isDisabled = isCalendarMonthDisabled(viewYear.value, i, props.disabledDate);
264
270
  return h(
265
271
  "button",
266
272
  {
@@ -268,8 +274,9 @@ var Calendar = defineComponent({
268
274
  type: "button",
269
275
  role: "gridcell",
270
276
  "aria-selected": viewMonth.value === i,
271
- tabindex: rovingMonthIdx === i ? 0 : -1,
272
- class: getCalendarMonthClasses(viewMonth.value === i),
277
+ disabled: isDisabled,
278
+ tabindex: rovingMonthIdx === i && !isDisabled ? 0 : -1,
279
+ class: getCalendarMonthClasses(viewMonth.value === i, isDisabled),
273
280
  onClick: () => selectMonth(i),
274
281
  onFocus: () => activeMonthIdx.value = i,
275
282
  onKeydown: (e) => handleMonthKeyDown(e, i)
@@ -0,0 +1,28 @@
1
+ // src/composables/useResponsiveChartSize.ts
2
+ import { computed, ref } from "vue";
3
+ import {
4
+ getChartInnerRect,
5
+ resolveResponsiveChartSize
6
+ } from "@expcat/tigercat-core";
7
+ function useResponsiveChartSize(width, height, padding, responsive) {
8
+ const observedSize = ref(null);
9
+ const plotSize = computed(
10
+ () => resolveResponsiveChartSize(
11
+ { width: width(), height: height() },
12
+ responsive() ? observedSize.value : null
13
+ )
14
+ );
15
+ const innerRect = computed(
16
+ () => getChartInnerRect(plotSize.value.width, plotSize.value.height, padding())
17
+ );
18
+ function onResolvedSizeChange(size) {
19
+ const prev = observedSize.value;
20
+ if (prev && prev.width === size.width && prev.height === size.height) return;
21
+ observedSize.value = size;
22
+ }
23
+ return { plotSize, innerRect, onResolvedSizeChange };
24
+ }
25
+
26
+ export {
27
+ useResponsiveChartSize
28
+ };
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-UOJOJBEU.mjs";
4
4
 
5
5
  // src/components/FileManager.ts
6
- import { defineComponent, h, ref, computed, nextTick } from "vue";
6
+ import { defineComponent, h, ref, computed, nextTick, watch } from "vue";
7
7
  import {
8
8
  classNames,
9
9
  coerceClassValue,
@@ -41,6 +41,9 @@ var FileManager = defineComponent({
41
41
  default: "list"
42
42
  },
43
43
  selectedKeys: {
44
+ type: Array
45
+ },
46
+ defaultSelectedKeys: {
44
47
  type: Array,
45
48
  default: () => []
46
49
  },
@@ -88,6 +91,19 @@ var FileManager = defineComponent({
88
91
  const focusedIndex = ref(0);
89
92
  const contentRef = ref(null);
90
93
  let dragFromIndex = null;
94
+ const innerSelectedKeys = ref([...props.defaultSelectedKeys ?? []]);
95
+ const isControlled = computed(() => props.selectedKeys !== void 0);
96
+ const resolvedKeys = computed(
97
+ () => isControlled.value ? props.selectedKeys ?? [] : innerSelectedKeys.value
98
+ );
99
+ watch(
100
+ () => props.selectedKeys,
101
+ (value) => {
102
+ if (value !== void 0) {
103
+ innerSelectedKeys.value = [...value];
104
+ }
105
+ }
106
+ );
91
107
  function handleDragStart(event, item, index) {
92
108
  if (!props.draggable || item.disabled) return;
93
109
  dragFromIndex = index;
@@ -122,7 +138,7 @@ var FileManager = defineComponent({
122
138
  () => deriveFileManagerModel({
123
139
  files: props.files,
124
140
  currentPath: props.currentPath,
125
- selectedKeys: props.selectedKeys,
141
+ selectedKeys: resolvedKeys.value,
126
142
  sortField: props.sortField,
127
143
  sortOrder: props.sortOrder,
128
144
  showHidden: props.showHidden,
@@ -135,7 +151,10 @@ var FileManager = defineComponent({
135
151
  function handleSelect(item) {
136
152
  if (item.disabled) return;
137
153
  emit("select", item);
138
- const keys = toggleFileSelection(props.selectedKeys, item.key, props.multiple);
154
+ const keys = toggleFileSelection(resolvedKeys.value, item.key, props.multiple);
155
+ if (!isControlled.value) {
156
+ innerSelectedKeys.value = keys;
157
+ }
139
158
  emit("update:selectedKeys", keys);
140
159
  }
141
160
  function handleOpen(item) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useFloatingPopup
3
- } from "./chunk-26OI3TEA.mjs";
3
+ } from "./chunk-PMQSXEMT.mjs";
4
4
  import {
5
5
  renderVueOverlayTeleport
6
6
  } from "./chunk-Q7Y22OFX.mjs";
@@ -31,6 +31,7 @@ import {
31
31
  getPickerOptionAria,
32
32
  getPickerTriggerKeyAction,
33
33
  getPickerNavigationIndex,
34
+ getPickerOptionId,
34
35
  findFirstEnabledIndex,
35
36
  coerceClassValue,
36
37
  classNames,
@@ -234,20 +235,19 @@ var TreeSelect = defineComponent({
234
235
  commitActiveIndex(-1);
235
236
  return;
236
237
  }
237
- if (!props.virtual) return;
238
238
  commitActiveIndex(resolveActiveIndex());
239
239
  nextTick(() => alignVirtualScroll(activeIndex.value));
240
240
  });
241
241
  watch(activeIndex, (idx) => {
242
- if (!props.virtual || !isOpen.value) return;
242
+ if (!isOpen.value) return;
243
243
  nextTick(() => alignVirtualScroll(idx));
244
244
  });
245
245
  watch(searchQuery, () => {
246
- if (!props.virtual || !isOpen.value) return;
246
+ if (!isOpen.value) return;
247
247
  commitActiveIndex(resolveActiveIndex());
248
248
  });
249
249
  watch([expandedKeys, () => props.treeData], () => {
250
- if (!props.virtual || !isOpen.value) return;
250
+ if (!isOpen.value) return;
251
251
  const remapped = getTreeSelectVisibleIndex(visibleNodes.value, lastActiveKey.value);
252
252
  if (remapped >= 0) activeIndex.value = remapped;
253
253
  });
@@ -316,7 +316,49 @@ var TreeSelect = defineComponent({
316
316
  emit("update:modelValue", val);
317
317
  emit("change", val);
318
318
  }
319
+ function handleOpenListKeyDown(e, fromSearchInput = false) {
320
+ const key = e.key;
321
+ if (fromSearchInput && key === " ") return false;
322
+ if (key === "ArrowDown" || key === "ArrowUp" || key === "Home" || key === "End") {
323
+ e.preventDefault();
324
+ e.stopPropagation();
325
+ commitActiveIndex(
326
+ getPickerNavigationIndex(visibleNodes.value, activeIndex.value, key, isNodeDisabled)
327
+ );
328
+ return true;
329
+ }
330
+ if (key === "Enter" || key === " ") {
331
+ e.preventDefault();
332
+ e.stopPropagation();
333
+ const item = visibleNodes.value[activeIndex.value];
334
+ if (item && !item.node.disabled) {
335
+ handleNodeSelect(item.node);
336
+ }
337
+ return true;
338
+ }
339
+ if (key === "ArrowRight") {
340
+ e.preventDefault();
341
+ e.stopPropagation();
342
+ const item = visibleNodes.value[activeIndex.value];
343
+ if (item?.hasChildren && !item.isExpanded) {
344
+ toggleExpand(item.node.key);
345
+ }
346
+ return true;
347
+ }
348
+ if (key === "ArrowLeft") {
349
+ e.preventDefault();
350
+ e.stopPropagation();
351
+ const item = visibleNodes.value[activeIndex.value];
352
+ if (item?.hasChildren && item.isExpanded) {
353
+ toggleExpand(item.node.key);
354
+ }
355
+ return true;
356
+ }
357
+ return false;
358
+ }
319
359
  function handleKeyDown(e) {
360
+ if (props.disabled) return;
361
+ if (isOpen.value && handleOpenListKeyDown(e)) return;
320
362
  const action = getPickerTriggerKeyAction(e.key, isOpen.value);
321
363
  if (action === "none") return;
322
364
  e.preventDefault();
@@ -329,16 +371,47 @@ var TreeSelect = defineComponent({
329
371
  closeDropdown();
330
372
  }
331
373
  }
332
- function renderFlatNode(flatNode) {
374
+ function handleDropdownKeyDown(e) {
375
+ if (e.target instanceof HTMLInputElement) return;
376
+ if (!isOpen.value) return;
377
+ handleOpenListKeyDown(e);
378
+ }
379
+ function handleSearchKeyDown(e) {
380
+ switch (e.key) {
381
+ case " ":
382
+ e.stopPropagation();
383
+ return;
384
+ case "ArrowDown":
385
+ case "ArrowUp":
386
+ case "Enter":
387
+ handleOpenListKeyDown(e, true);
388
+ return;
389
+ case "Escape":
390
+ e.preventDefault();
391
+ e.stopPropagation();
392
+ closeDropdown();
393
+ nextTick(() => {
394
+ ;
395
+ triggerRef.value?.focus();
396
+ });
397
+ return;
398
+ default:
399
+ return;
400
+ }
401
+ }
402
+ function renderFlatNode(flatNode, index) {
333
403
  const { node, level, hasChildren, isExpanded } = flatNode;
334
404
  const selected = isSelected(node.key);
405
+ const isActive = index === activeIndex.value;
335
406
  const indent = level * 20;
336
407
  return h(
337
408
  "div",
338
409
  {
339
410
  key: node.key,
411
+ id: getPickerOptionId(listboxId, index),
412
+ "data-active": isActive || void 0,
340
413
  ...getPickerOptionAria({ selected, disabled: !!node.disabled }),
341
- class: getTreeSelectNodeClasses(selected, !!node.disabled, props.size),
414
+ class: getTreeSelectNodeClasses(selected || isActive, !!node.disabled, props.size),
342
415
  style: { paddingLeft: `${indent + 8}px`, height: props.virtual ? "100%" : void 0 },
343
416
  onClick: (e) => {
344
417
  e.stopPropagation();
@@ -389,8 +462,15 @@ var TreeSelect = defineComponent({
389
462
  {
390
463
  ref: triggerRef,
391
464
  type: "button",
392
- class: getTreeSelectTriggerClasses(props.size, props.disabled, isOpen.value),
393
- ...getPickerComboboxAria({ expanded: isOpen.value, listboxId }),
465
+ class: classNames(
466
+ getTreeSelectTriggerClasses(props.size, props.disabled, isOpen.value),
467
+ showClearButton.value ? "pr-14" : void 0
468
+ ),
469
+ ...getPickerComboboxAria({
470
+ expanded: isOpen.value,
471
+ listboxId,
472
+ activeIndex: isOpen.value ? activeIndex.value : -1
473
+ }),
394
474
  disabled: props.disabled,
395
475
  onClick: toggleDropdown,
396
476
  onKeydown: handleKeyDown
@@ -405,12 +485,19 @@ var TreeSelect = defineComponent({
405
485
  )
406
486
  },
407
487
  displayLabel.value || props.placeholder
408
- ),
409
- // Clear or chevron
488
+ )
489
+ ]
490
+ ),
491
+ h(
492
+ "span",
493
+ { class: "pointer-events-none absolute inset-y-0 right-3 flex items-center gap-1" },
494
+ [
410
495
  showClearButton.value ? h(
411
- "span",
496
+ "button",
412
497
  {
413
- class: "absolute right-2 top-1/2 -translate-y-1/2 text-[var(--tiger-treeselect-clear,var(--tiger-text-muted,#9ca3af))] hover:text-[var(--tiger-treeselect-clear-hover,var(--tiger-text,#111827))]",
498
+ type: "button",
499
+ class: "pointer-events-auto inline-flex rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--tiger-treeselect-ring,var(--tiger-primary,#2563eb))] text-[var(--tiger-treeselect-clear,var(--tiger-text-muted,#9ca3af))] hover:text-[var(--tiger-treeselect-clear-hover,var(--tiger-text,#111827))]",
500
+ "data-tiger-treeselect-clear": "",
414
501
  "aria-label": resolveLocaleText(
415
502
  "Clear selection",
416
503
  mergedLocale.value?.common?.clearText
@@ -418,10 +505,15 @@ var TreeSelect = defineComponent({
418
505
  onClick: handleClear
419
506
  },
420
507
  [ClearIcon]
421
- ) : h(
508
+ ) : null,
509
+ h(
422
510
  "span",
423
511
  {
424
- class: "absolute right-2 top-1/2 -translate-y-1/2 text-[var(--tiger-text-muted,#9ca3af)] pointer-events-none"
512
+ class: classNames(
513
+ "inline-flex text-[var(--tiger-text-muted,#9ca3af)]",
514
+ isOpen.value && "rotate-180"
515
+ ),
516
+ "aria-hidden": "true"
425
517
  },
426
518
  [ChevronDownIcon]
427
519
  )
@@ -439,7 +531,8 @@ var TreeSelect = defineComponent({
439
531
  overlay.floatingClasses.value
440
532
  ),
441
533
  style: overlay.floatingStyles.value,
442
- "data-positioned": overlay.positioned.value
534
+ "data-positioned": overlay.positioned.value,
535
+ onKeydown: handleDropdownKeyDown
443
536
  },
444
537
  [
445
538
  // Search
@@ -455,7 +548,8 @@ var TreeSelect = defineComponent({
455
548
  "Search tree",
456
549
  mergedLocale.value?.common?.searchPlaceholder
457
550
  ),
458
- onInput: (e) => updateSearchValue(e.target.value)
551
+ onInput: (e) => updateSearchValue(e.target.value),
552
+ onKeydown: handleSearchKeyDown
459
553
  }) : null,
460
554
  // Tree nodes
461
555
  visibleNodes.value.length > 0 ? props.virtual ? h(
@@ -477,12 +571,12 @@ var TreeSelect = defineComponent({
477
571
  {
478
572
  default: ({ index }) => {
479
573
  const item = visibleNodes.value[index];
480
- return item ? renderFlatNode(item) : null;
574
+ return item ? renderFlatNode(item, index) : null;
481
575
  }
482
576
  }
483
577
  )
484
578
  ]
485
- ) : visibleNodes.value.map((flatNode) => renderFlatNode(flatNode)) : h(
579
+ ) : visibleNodes.value.map((flatNode, index) => renderFlatNode(flatNode, index)) : h(
486
580
  "div",
487
581
  { class: treeSelectEmptyClasses },
488
582
  resolveLocaleText(
@@ -21,6 +21,12 @@ var Slider = defineComponent({
21
21
  value: {
22
22
  type: [Number, Array]
23
23
  },
24
+ /**
25
+ * Slider value (for default v-model) - controlled mode
26
+ */
27
+ modelValue: {
28
+ type: [Number, Array]
29
+ },
24
30
  /**
25
31
  * Default slider value - uncontrolled mode
26
32
  */
@@ -111,14 +117,24 @@ var Slider = defineComponent({
111
117
  * Emitted when value changes (for v-model:value)
112
118
  */
113
119
  "update:value": (value) => typeof value === "number" || Array.isArray(value),
120
+ /**
121
+ * Emitted when value changes (for default v-model)
122
+ */
123
+ "update:modelValue": (value) => typeof value === "number" || Array.isArray(value),
114
124
  /**
115
125
  * Emitted when value changes
116
126
  */
117
127
  change: (value) => typeof value === "number" || Array.isArray(value)
118
128
  },
119
129
  setup(props, { emit, attrs }) {
120
- const getInitialValue = () => {
130
+ const resolveBoundValue = () => {
121
131
  if (props.value !== void 0) return props.value;
132
+ if (props.modelValue !== void 0) return props.modelValue;
133
+ return void 0;
134
+ };
135
+ const getInitialValue = () => {
136
+ const bound = resolveBoundValue();
137
+ if (bound !== void 0) return bound;
122
138
  if (props.defaultValue !== void 0) return props.defaultValue;
123
139
  return props.range ? [props.min, props.max] : props.min;
124
140
  };
@@ -128,10 +144,11 @@ var Slider = defineComponent({
128
144
  const showTooltip = ref(false);
129
145
  const trackElement = ref(null);
130
146
  watch(
131
- () => props.value,
132
- (newValue) => {
133
- if (newValue !== void 0) {
134
- internalValue.value = newValue;
147
+ () => [props.value, props.modelValue],
148
+ () => {
149
+ const bound = resolveBoundValue();
150
+ if (bound !== void 0) {
151
+ internalValue.value = bound;
135
152
  }
136
153
  }
137
154
  );
@@ -149,6 +166,7 @@ var Slider = defineComponent({
149
166
  const updateValue = (newValue) => {
150
167
  internalValue.value = newValue;
151
168
  emit("update:value", newValue);
169
+ emit("update:modelValue", newValue);
152
170
  emit("change", newValue);
153
171
  };
154
172
  const handleMove = (event, el) => {
@@ -17,6 +17,7 @@ import {
17
17
  getAutoCompleteInputClasses,
18
18
  getAutoCompleteOptionClasses,
19
19
  filterAutoCompleteOptions,
20
+ resolveAutoCompleteDisplayValue,
20
21
  getInitialPickerActiveIndex,
21
22
  getPickerComboboxAria,
22
23
  getPickerListboxAria,
@@ -109,7 +110,7 @@ var AutoComplete = defineComponent({
109
110
  const listboxId = `tiger-autocomplete-listbox-${instanceId}`;
110
111
  const isOpen = ref(false);
111
112
  const uncontrolledSearchValue = ref(
112
- String(props.searchValue ?? props.modelValue ?? props.defaultSearchValue ?? "")
113
+ props.searchValue ?? resolveAutoCompleteDisplayValue(props.modelValue, props.options, props.defaultSearchValue)
113
114
  );
114
115
  const inputValue = computed(() => props.searchValue ?? uncontrolledSearchValue.value);
115
116
  const activeIndex = ref(-1);
@@ -135,14 +136,15 @@ var AutoComplete = defineComponent({
135
136
  const showClearButton = computed(
136
137
  () => props.clearable && !props.disabled && inputValue.value !== ""
137
138
  );
138
- watch(
139
- () => props.modelValue,
140
- (val) => {
141
- if (props.searchValue === void 0) {
142
- uncontrolledSearchValue.value = String(val ?? props.defaultSearchValue ?? "");
143
- }
139
+ watch([() => props.modelValue, () => props.options], () => {
140
+ if (props.searchValue === void 0) {
141
+ uncontrolledSearchValue.value = resolveAutoCompleteDisplayValue(
142
+ props.modelValue,
143
+ props.options,
144
+ props.defaultSearchValue
145
+ );
144
146
  }
145
- );
147
+ });
146
148
  function openDropdown() {
147
149
  if (props.disabled) return;
148
150
  isOpen.value = true;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useFloatingPopup
3
- } from "./chunk-26OI3TEA.mjs";
3
+ } from "./chunk-PMQSXEMT.mjs";
4
4
  import {
5
5
  renderVueOverlayTeleport
6
6
  } from "./chunk-Q7Y22OFX.mjs";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  useChartInteraction
3
- } from "./chunk-PE5OA4YG.mjs";
3
+ } from "./chunk-FHUGOSEY.mjs";
4
4
  import {
5
5
  ChartTooltip
6
6
  } from "./chunk-SPFL55TF.mjs";
7
7
  import {
8
8
  ChartCanvas
9
- } from "./chunk-W5RZPTFD.mjs";
9
+ } from "./chunk-SNNT64HK.mjs";
10
10
 
11
11
  // src/components/HeatmapChart.ts
12
12
  import { defineComponent, computed, h, nextTick, ref, watchEffect } from "vue";
@@ -69,6 +69,7 @@ var HeatmapChart = defineComponent({
69
69
  wrapperClasses: _wrapperClasses
70
70
  } = useChartInteraction({
71
71
  hoverable: computed(() => props.hoverable),
72
+ showTooltip: computed(() => props.showTooltip),
72
73
  hoveredIndexProp: () => props.hoveredIndex,
73
74
  selectable: computed(() => props.selectable),
74
75
  selectedIndexProp: () => props.selectedIndex,
@@ -192,6 +193,7 @@ var HeatmapChart = defineComponent({
192
193
  };
193
194
  return () => {
194
195
  const interactive = props.hoverable || props.selectable;
196
+ const pointerInteractive = interactive || props.showTooltip;
195
197
  const rect = innerRect.value;
196
198
  const chart = h(
197
199
  ChartCanvas,
@@ -283,7 +285,7 @@ var HeatmapChart = defineComponent({
283
285
  }
284
286
  }
285
287
  );
286
- const tooltip = props.showTooltip && props.hoverable ? h(ChartTooltip, {
288
+ const tooltip = props.showTooltip ? h(ChartTooltip, {
287
289
  content: tooltipContent.value,
288
290
  open: resolvedHoveredIndex.value !== null && tooltipContent.value !== "",
289
291
  x: tooltipPosition.value.x,
@@ -300,12 +302,12 @@ var HeatmapChart = defineComponent({
300
302
  top: `${rect.y}px`,
301
303
  width: `${rect.width}px`,
302
304
  height: `${rect.height}px`,
303
- pointerEvents: interactive ? "auto" : "none"
305
+ pointerEvents: pointerInteractive ? "auto" : "none"
304
306
  },
305
307
  "data-heatmap-canvas": "true",
306
308
  "data-heatmap-render-mode": resolvedRenderMode.value,
307
- onMousemove: interactive ? handleCanvasMouseMove : void 0,
308
- onMouseleave: interactive ? handleMouseLeave : void 0,
309
+ onMousemove: pointerInteractive ? handleCanvasMouseMove : void 0,
310
+ onMouseleave: pointerInteractive ? handleMouseLeave : void 0,
309
311
  onClick: interactive ? handleCanvasClick : void 0
310
312
  }) : null;
311
313
  return h("div", { class: "inline-block relative" }, [chart, canvas, tooltip]);
@@ -7,6 +7,7 @@ import { defineComponent, h, ref, computed } from "vue";
7
7
  import {
8
8
  rateBaseClasses,
9
9
  getRateStarClasses,
10
+ rateHalfStarInnerClasses,
10
11
  rateActiveColor,
11
12
  rateInactiveColor,
12
13
  rateHoverColor,
@@ -126,7 +127,7 @@ var Rate = defineComponent({
126
127
  [h("path", { d: starPathD })]
127
128
  )
128
129
  ]),
129
- // Active half (clipped left 50%)
130
+ // Active half (clipped left 50%; inner glyph keeps full-star width)
130
131
  h(
131
132
  "span",
132
133
  {
@@ -137,12 +138,12 @@ var Rate = defineComponent({
137
138
  style: { width: "50%" }
138
139
  },
139
140
  [
140
- isChar ? h("span", null, props.character) : h(
141
+ isChar ? h("span", { class: rateHalfStarInnerClasses }, props.character) : h(
141
142
  "svg",
142
143
  {
143
144
  viewBox: starViewBox,
144
145
  fill: "currentColor",
145
- class: "w-full h-full"
146
+ class: rateHalfStarInnerClasses
146
147
  },
147
148
  [h("path", { d: starPathD })]
148
149
  )