@expcat/tigercat-vue 2.1.0 → 2.1.2

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 (198) 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-OHR7IUBQ.mjs → chunk-5OILGUNU.mjs} +2 -2
  5. package/dist/{chunk-OQVGB7X6.mjs → chunk-626VUZ2Q.mjs} +1 -1
  6. package/dist/{chunk-66OS5A4D.mjs → chunk-67VS6QHJ.mjs} +26 -12
  7. package/dist/{chunk-EHGFW5GX.mjs → chunk-6JAAXPBW.mjs} +4 -3
  8. package/dist/{chunk-JHMT5Q6P.mjs → chunk-6NYC7EY2.mjs} +29 -15
  9. package/dist/{chunk-6BDDX2R4.mjs → chunk-73Z7N7VG.mjs} +1 -4
  10. package/dist/{chunk-F3ZVVVYD.mjs → chunk-7C7SG3SS.mjs} +15 -3
  11. package/dist/{chunk-CHEXI7MO.mjs → chunk-7TJE7OYH.mjs} +4 -3
  12. package/dist/{chunk-EGIMTTZA.mjs → chunk-BOHE5URZ.mjs} +18 -3
  13. package/dist/{chunk-5RIHHZF6.mjs → chunk-BQK7LH2L.mjs} +4 -1
  14. package/dist/{chunk-E6EZHSGY.mjs → chunk-BSOLH6R5.mjs} +0 -1
  15. package/dist/{chunk-RSM6FOWX.mjs → chunk-CCC3S6LK.mjs} +6 -3
  16. package/dist/{chunk-U75YXWSA.mjs → chunk-CLTRADS7.mjs} +17 -5
  17. package/dist/{chunk-BEIPGX74.mjs → chunk-DRLQCY7R.mjs} +162 -7
  18. package/dist/{chunk-KBJANUZZ.mjs → chunk-E523VGZP.mjs} +1 -1
  19. package/dist/{chunk-4HUYX5WW.mjs → chunk-EC62TY2Y.mjs} +80 -19
  20. package/dist/{chunk-D3U2NJ32.mjs → chunk-FEQ7PZXI.mjs} +8 -2
  21. package/dist/{chunk-PE5OA4YG.mjs → chunk-FHUGOSEY.mjs} +8 -2
  22. package/dist/{chunk-OAPIT53X.mjs → chunk-FIEECAJV.mjs} +7 -10
  23. package/dist/{chunk-7SFB77JR.mjs → chunk-GBPMQJJJ.mjs} +8 -1
  24. package/dist/{chunk-6AMWX5K4.mjs → chunk-GQOPDD44.mjs} +1 -1
  25. package/dist/{chunk-5RXYJWNA.mjs → chunk-H4DEIGEG.mjs} +77 -25
  26. package/dist/{chunk-AU6IC6K7.mjs → chunk-IFASMNTU.mjs} +36 -16
  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-BZ6MVFV7.mjs → chunk-K5RYFPOQ.mjs} +17 -19
  32. package/dist/{chunk-DI6RRAGQ.mjs → chunk-KIUGJNQO.mjs} +4 -4
  33. package/dist/{chunk-5E4LINDO.mjs → chunk-LH2V2JMZ.mjs} +26 -10
  34. package/dist/{chunk-PQBKN2NH.mjs → chunk-LRFKHJDU.mjs} +14 -5
  35. package/dist/{chunk-W5XFWVNV.mjs → chunk-M4FWWEMX.mjs} +15 -6
  36. package/dist/{chunk-VLW3UBIR.mjs → chunk-N2XV37BL.mjs} +37 -41
  37. package/dist/{chunk-2LIIMWBR.mjs → chunk-OYU47A57.mjs} +1 -2
  38. package/dist/{chunk-KU2Q5V3L.mjs → chunk-P62TYR3M.mjs} +18 -2
  39. package/dist/{chunk-P5FDKBXG.mjs → chunk-P7X46BAW.mjs} +70 -3
  40. package/dist/{chunk-KROVW4AW.mjs → chunk-PJQTRDIG.mjs} +13 -3
  41. package/dist/{chunk-26OI3TEA.mjs → chunk-PMQSXEMT.mjs} +42 -6
  42. package/dist/{chunk-XLNK3Z2P.mjs → chunk-POWDTOMF.mjs} +88 -79
  43. package/dist/{chunk-AXDBME5A.mjs → chunk-PSGVG4TN.mjs} +38 -21
  44. package/dist/{chunk-7DWWNFRP.mjs → chunk-PWWWACHC.mjs} +1 -1
  45. package/dist/{chunk-UUWTKCMY.mjs → chunk-QWLD5FMJ.mjs} +1 -1
  46. package/dist/{chunk-ALIUAGJO.mjs → chunk-QZLOF36M.mjs} +7 -13
  47. package/dist/{chunk-WLYQHKLZ.mjs → chunk-QZRSFGZZ.mjs} +50 -11
  48. package/dist/{chunk-37W7XTA6.mjs → chunk-RHQWQJ4I.mjs} +4 -3
  49. package/dist/{chunk-32X54QKW.mjs → chunk-RRLE7QRH.mjs} +43 -22
  50. package/dist/{chunk-RID7A5V7.mjs → chunk-RRNQL6MJ.mjs} +23 -6
  51. package/dist/{chunk-VJ6YM2EW.mjs → chunk-S4BKVFQ7.mjs} +1 -1
  52. package/dist/{chunk-LPZBXTJ6.mjs → chunk-SAC4PAG3.mjs} +4 -4
  53. package/dist/{chunk-W5RZPTFD.mjs → chunk-SNNT64HK.mjs} +13 -2
  54. package/dist/{chunk-N3C6YI7I.mjs → chunk-SWMYIORV.mjs} +22 -7
  55. package/dist/{chunk-U4B5QT72.mjs → chunk-SX3NAN4M.mjs} +1 -1
  56. package/dist/{chunk-JL3CN4UK.mjs → chunk-TDBMAKTJ.mjs} +10 -3
  57. package/dist/chunk-UEGNXN5B.mjs +28 -0
  58. package/dist/{chunk-NEEGXKJW.mjs → chunk-UGHLEKEZ.mjs} +22 -3
  59. package/dist/{chunk-HKYRRQS7.mjs → chunk-UNQO7EVG.mjs} +1 -1
  60. package/dist/{chunk-VN2TWPRC.mjs → chunk-UR5F74ZB.mjs} +112 -18
  61. package/dist/{chunk-VCCK4CDT.mjs → chunk-URPXBKK4.mjs} +23 -5
  62. package/dist/{chunk-7KCOF5US.mjs → chunk-VY6FVIOZ.mjs} +10 -8
  63. package/dist/{chunk-KICZSLOX.mjs → chunk-W2ICYZVU.mjs} +1 -1
  64. package/dist/{chunk-FIVVKBBF.mjs → chunk-W3QOMJKQ.mjs} +8 -6
  65. package/dist/{chunk-DCMRB3HR.mjs → chunk-WV25G4M3.mjs} +4 -3
  66. package/dist/{chunk-ZOYHZF4N.mjs → chunk-X5LJT76O.mjs} +49 -32
  67. package/dist/{chunk-FSJRNEZK.mjs → chunk-YLO73TDM.mjs} +4 -4
  68. package/dist/{chunk-BNYA5IUB.mjs → chunk-YNXP34KO.mjs} +39 -38
  69. package/dist/{chunk-2T2NEZRZ.mjs → chunk-YVDTXHQ6.mjs} +1 -1
  70. package/dist/{chunk-AUMTHL6N.mjs → chunk-ZOP7PEKY.mjs} +2 -1
  71. package/dist/components/ActivityFeed.d.mts +23 -5
  72. package/dist/components/ActivityFeed.mjs +2 -2
  73. package/dist/components/Affix.mjs +1 -1
  74. package/dist/components/Alert.d.mts +1 -1
  75. package/dist/components/Anchor.d.mts +1 -1
  76. package/dist/components/Anchor.mjs +1 -1
  77. package/dist/components/AreaChart.mjs +4 -3
  78. package/dist/components/AutoComplete.mjs +1 -1
  79. package/dist/components/BarChart.mjs +4 -3
  80. package/dist/components/Calendar.mjs +1 -1
  81. package/dist/components/Cascader.mjs +1 -1
  82. package/dist/components/ChartCanvas.d.mts +7 -3
  83. package/dist/components/ChartCanvas.mjs +1 -1
  84. package/dist/components/ChatWindow.d.mts +26 -8
  85. package/dist/components/ChatWindow.mjs +3 -3
  86. package/dist/components/Checkbox.d.mts +1 -1
  87. package/dist/components/Code.d.mts +34 -7
  88. package/dist/components/Code.mjs +3 -1
  89. package/dist/components/CodeEditor.d.mts +1 -1
  90. package/dist/components/CollapsePanel.mjs +1 -1
  91. package/dist/components/ColorPicker.d.mts +19 -1
  92. package/dist/components/ColorPicker.mjs +3 -1
  93. package/dist/components/ColorSwatch.d.mts +6 -0
  94. package/dist/components/ColorSwatch.mjs +1 -1
  95. package/dist/components/CommentThread.d.mts +63 -27
  96. package/dist/components/CommentThread.mjs +2 -2
  97. package/dist/components/ContextMenu.d.mts +2 -2
  98. package/dist/components/Countdown.d.mts +2 -2
  99. package/dist/components/CronEditor.d.mts +1 -1
  100. package/dist/components/DataExport.mjs +2 -2
  101. package/dist/components/DataTableWithToolbar.mjs +8 -8
  102. package/dist/components/DatePicker.d.mts +1 -1
  103. package/dist/components/Descriptions.d.mts +1 -1
  104. package/dist/components/DonutChart.mjs +4 -4
  105. package/dist/components/Drawer.d.mts +1 -1
  106. package/dist/components/Dropdown.d.mts +21 -2
  107. package/dist/components/Dropdown.mjs +1 -1
  108. package/dist/components/FileManager.d.mts +7 -1
  109. package/dist/components/FileManager.mjs +1 -1
  110. package/dist/components/FloatButton.d.mts +31 -1
  111. package/dist/components/FloatButton.mjs +1 -1
  112. package/dist/components/FormWizard.mjs +1 -1
  113. package/dist/components/FunnelChart.mjs +3 -3
  114. package/dist/components/Gantt.d.mts +3 -1
  115. package/dist/components/Gantt.mjs +2 -2
  116. package/dist/components/GaugeChart.mjs +2 -2
  117. package/dist/components/HeatmapChart.mjs +3 -3
  118. package/dist/components/Icon.d.mts +1 -1
  119. package/dist/components/Image.d.mts +1 -1
  120. package/dist/components/Image.mjs +3 -3
  121. package/dist/components/ImageAnnotation.d.mts +1 -1
  122. package/dist/components/ImageGroup.mjs +2 -2
  123. package/dist/components/ImagePreview.mjs +1 -1
  124. package/dist/components/Input.mjs +1 -1
  125. package/dist/components/InputNumber.mjs +1 -1
  126. package/dist/components/InputOTP.d.mts +1 -1
  127. package/dist/components/Kanban.mjs +2 -2
  128. package/dist/components/LineChart.mjs +4 -3
  129. package/dist/components/Link.d.mts +1 -1
  130. package/dist/components/List.mjs +2 -2
  131. package/dist/components/Loading.mjs +1 -1
  132. package/dist/components/MarkdownEditor.d.mts +1 -1
  133. package/dist/components/MarkdownEditor.mjs +1 -1
  134. package/dist/components/MaskInput.d.mts +9 -3
  135. package/dist/components/MaskInput.mjs +1 -1
  136. package/dist/components/Menu.d.mts +2 -2
  137. package/dist/components/Modal.d.mts +1 -1
  138. package/dist/components/NavigationMenu.d.mts +3 -3
  139. package/dist/components/NotificationCenter.d.mts +44 -26
  140. package/dist/components/NotificationCenter.mjs +4 -4
  141. package/dist/components/NumberKeyboard.d.mts +1 -1
  142. package/dist/components/OrgChart.mjs +2 -2
  143. package/dist/components/PageHeader.d.mts +1 -1
  144. package/dist/components/Pagination.mjs +1 -1
  145. package/dist/components/PieChart.mjs +3 -3
  146. package/dist/components/Popconfirm.d.mts +1 -1
  147. package/dist/components/Popconfirm.mjs +2 -2
  148. package/dist/components/Popover.d.mts +2 -2
  149. package/dist/components/Popover.mjs +2 -2
  150. package/dist/components/QRCode.d.mts +2 -11
  151. package/dist/components/QRCode.mjs +1 -1
  152. package/dist/components/RadarChart.mjs +3 -3
  153. package/dist/components/Radio.d.mts +1 -1
  154. package/dist/components/Radio.mjs +1 -1
  155. package/dist/components/Rate.mjs +1 -1
  156. package/dist/components/Result.d.mts +1 -1
  157. package/dist/components/RichTextEditor.d.mts +1 -1
  158. package/dist/components/RichTextEditor.mjs +1 -1
  159. package/dist/components/ScatterChart.mjs +4 -3
  160. package/dist/components/ScrollSpy.mjs +1 -1
  161. package/dist/components/Select.d.mts +4 -6
  162. package/dist/components/Select.mjs +1 -1
  163. package/dist/components/Signature.mjs +1 -1
  164. package/dist/components/Slider.d.mts +18 -0
  165. package/dist/components/Slider.mjs +1 -1
  166. package/dist/components/SplitButton.d.mts +1 -1
  167. package/dist/components/SplitButton.mjs +2 -2
  168. package/dist/components/Splitter.d.mts +4 -4
  169. package/dist/components/Splitter.mjs +1 -1
  170. package/dist/components/Spotlight.d.mts +1 -1
  171. package/dist/components/Statistic.d.mts +2 -2
  172. package/dist/components/Stepper.d.mts +7 -1
  173. package/dist/components/Stepper.mjs +1 -1
  174. package/dist/components/SunburstChart.mjs +3 -3
  175. package/dist/components/Switch.d.mts +22 -6
  176. package/dist/components/Switch.mjs +1 -1
  177. package/dist/components/Table.d.mts +4 -4
  178. package/dist/components/Table.mjs +4 -4
  179. package/dist/components/TagsInput.d.mts +1 -1
  180. package/dist/components/TaskBoard.mjs +1 -1
  181. package/dist/components/Text.d.mts +2 -2
  182. package/dist/components/Textarea.mjs +1 -1
  183. package/dist/components/TimePicker.d.mts +1 -1
  184. package/dist/components/Tooltip.d.mts +1 -1
  185. package/dist/components/Tooltip.mjs +2 -2
  186. package/dist/components/Tour.mjs +1 -1
  187. package/dist/components/Transfer.d.mts +2 -1
  188. package/dist/components/Transfer.mjs +1 -1
  189. package/dist/components/TreeMapChart.mjs +3 -3
  190. package/dist/components/TreeSelect.mjs +1 -1
  191. package/dist/components/Upload.d.mts +1 -1
  192. package/dist/components/Upload.mjs +1 -1
  193. package/dist/components/Watermark.d.mts +1 -1
  194. package/dist/composables/useChartInteraction.d.mts +5 -0
  195. package/dist/composables/useChartInteraction.mjs +1 -1
  196. package/dist/index.d.mts +1 -1
  197. package/dist/index.mjs +57 -0
  198. package/package.json +2 -2
@@ -114,46 +114,45 @@ var Affix = defineComponent({
114
114
  return () => {
115
115
  const attrsRecord = attrs;
116
116
  const children = slots.default?.();
117
+ const useBottom = props.offsetBottom !== void 0;
117
118
  const sentinel = h("div", {
118
119
  ref: sentinelRef,
119
120
  "aria-hidden": "true",
120
121
  style: { display: "block", width: "0", height: "0", pointerEvents: "none" }
121
122
  });
122
123
  if (state.value.affixed) {
123
- return h("div", [
124
- sentinel,
125
- // placeholder reserves layout space
126
- h("div", {
127
- style: {
128
- width: `${originalRect.value?.width ?? 0}px`,
129
- height: `${originalRect.value?.height ?? 0}px`
130
- }
131
- }),
132
- h(
133
- "div",
134
- {
135
- ref: wrapperRef,
136
- ...attrs,
137
- class: classNames(props.className, coerceClassValue(attrsRecord.class)),
138
- style: mergeStyleValues(state.value.style, props.style)
139
- },
140
- children
141
- )
142
- ]);
143
- }
144
- return h("div", [
145
- sentinel,
146
- h(
124
+ const placeholder = h("div", {
125
+ style: {
126
+ width: `${originalRect.value?.width ?? 0}px`,
127
+ height: `${originalRect.value?.height ?? 0}px`
128
+ }
129
+ });
130
+ const content2 = h(
147
131
  "div",
148
132
  {
149
133
  ref: wrapperRef,
150
134
  ...attrs,
151
135
  class: classNames(props.className, coerceClassValue(attrsRecord.class)),
152
- style: mergeStyleValues(attrsRecord.style, props.style)
136
+ style: mergeStyleValues(state.value.style, props.style)
153
137
  },
154
138
  children
155
- )
156
- ]);
139
+ );
140
+ return h(
141
+ "div",
142
+ useBottom ? [placeholder, content2, sentinel] : [sentinel, placeholder, content2]
143
+ );
144
+ }
145
+ const content = h(
146
+ "div",
147
+ {
148
+ ref: wrapperRef,
149
+ ...attrs,
150
+ class: classNames(props.className, coerceClassValue(attrsRecord.class)),
151
+ style: mergeStyleValues(attrsRecord.style, props.style)
152
+ },
153
+ children
154
+ );
155
+ return h("div", useBottom ? [content, sentinel] : [sentinel, content]);
157
156
  };
158
157
  }
159
158
  });
@@ -243,18 +243,19 @@ var Textarea = defineComponent({
243
243
  onBlur: handleBlur
244
244
  })
245
245
  ];
246
- if (props.showCount) {
247
- const countText = props.maxLength ? `${currentLength.value}/${props.maxLength}` : `${currentLength.value}`;
248
- children.push(
249
- h(
250
- "div",
251
- {
252
- class: "mt-1 text-sm text-gray-500 text-right"
253
- },
254
- countText
255
- )
256
- );
246
+ if (!props.showCount) {
247
+ return children[0];
257
248
  }
249
+ const countText = props.maxLength ? `${currentLength.value}/${props.maxLength}` : `${currentLength.value}`;
250
+ children.push(
251
+ h(
252
+ "div",
253
+ {
254
+ class: "mt-1 text-sm text-gray-500 text-right"
255
+ },
256
+ countText
257
+ )
258
+ );
258
259
  return h("div", { class: "w-full" }, children);
259
260
  };
260
261
  }
@@ -32,6 +32,8 @@ import {
32
32
  getPickerOptionAria,
33
33
  getPickerTriggerKeyAction,
34
34
  getPickerNavigationIndex,
35
+ getPickerOptionId,
36
+ findFirstEnabledIndex,
35
37
  icon20ViewBox,
36
38
  chevronDownSolidIcon20PathD,
37
39
  closeSolidIcon20PathD,
@@ -137,6 +139,7 @@ var Cascader = defineComponent({
137
139
  emits: ["update:modelValue", "update:searchValue", "change", "search-change"],
138
140
  setup(props, { emit, attrs }) {
139
141
  const instanceId = ++cascaderInstanceId;
142
+ const listboxId = `tiger-cascader-listbox-${instanceId}`;
140
143
  const config = useTigerConfig();
141
144
  const mergedLocale = computed(() => mergeTigerLocale(config.value.locale, props.locale));
142
145
  const isOpen = ref(false);
@@ -165,6 +168,7 @@ var Cascader = defineComponent({
165
168
  const searchScrollTop = ref(0);
166
169
  const searchScrollEl = ref(null);
167
170
  const searchActiveIndex = ref(-1);
171
+ const focusedColumnIndex = ref(0);
168
172
  const displayLabel = computed(() => {
169
173
  if (!props.modelValue || props.modelValue.length === 0) return "";
170
174
  return getCascaderDisplayLabel(props.options, props.modelValue, props.separator);
@@ -207,20 +211,28 @@ var Cascader = defineComponent({
207
211
  columnActiveIndices.value = [];
208
212
  searchScrollTop.value = 0;
209
213
  searchActiveIndex.value = -1;
214
+ focusedColumnIndex.value = 0;
210
215
  activePath.value = props.modelValue ? [...props.modelValue] : [];
211
216
  updateSearchValue("");
212
217
  }
213
218
  });
214
219
  watch(
215
- columns,
216
- (cols) => {
217
- if (!props.virtual || !isOpen.value) return;
218
- const itemH = getCascaderVirtualItemHeight(props.size);
220
+ [isOpen, columns],
221
+ () => {
222
+ if (!isOpen.value) return;
223
+ const cols = columns.value;
219
224
  columnActiveIndices.value = cols.map((col, i) => {
220
225
  const prev = columnActiveIndices.value[i];
221
- if (prev !== void 0 && prev >= 0 && prev < col.options.length) return prev;
226
+ if (prev !== void 0 && prev >= 0 && prev < col.options.length && !col.options[prev]?.disabled) {
227
+ return prev;
228
+ }
222
229
  return selectedIndexInColumn(col.options, col.selectedValue);
223
230
  });
231
+ if (focusedColumnIndex.value > cols.length - 1) {
232
+ focusedColumnIndex.value = Math.max(0, cols.length - 1);
233
+ }
234
+ if (!props.virtual) return;
235
+ const itemH = getCascaderVirtualItemHeight(props.size);
224
236
  columnScrollTops.value = cols.map((col, i) => {
225
237
  const stored = columnScrollTops.value[i];
226
238
  if (stored !== void 0) return stored;
@@ -274,11 +286,39 @@ var Cascader = defineComponent({
274
286
  function closeDropdown() {
275
287
  isOpen.value = false;
276
288
  }
289
+ function isOptionDisabled(option) {
290
+ return !!option.disabled;
291
+ }
292
+ function getColumnOptionDomId(colIndex, optionIndex) {
293
+ return `${listboxId}-col${colIndex}-opt${optionIndex}`;
294
+ }
295
+ function getCurrentColumnIndex() {
296
+ const last = columns.value.length - 1;
297
+ if (last < 0) return 0;
298
+ const focused = focusedColumnIndex.value;
299
+ if (focused >= 0 && focused <= last) return focused;
300
+ return last;
301
+ }
277
302
  function setColumnActiveIndex(colIndex, index) {
278
303
  const next = columnActiveIndices.value.slice();
279
304
  next[colIndex] = index;
280
305
  columnActiveIndices.value = next;
281
306
  }
307
+ function activateColumnOption(colIndex, index) {
308
+ setColumnActiveIndex(colIndex, index);
309
+ focusedColumnIndex.value = colIndex;
310
+ }
311
+ function resolveColumnActiveIndex(colIndex) {
312
+ const col = columns.value[colIndex];
313
+ if (!col) return -1;
314
+ const current = columnActiveIndices.value[colIndex];
315
+ if (current !== void 0 && current >= 0 && current < col.options.length && !col.options[current].disabled) {
316
+ return current;
317
+ }
318
+ const selected = selectedIndexInColumn(col.options, col.selectedValue);
319
+ if (selected >= 0 && !col.options[selected]?.disabled) return selected;
320
+ return findFirstEnabledIndex(col.options, isOptionDisabled);
321
+ }
282
322
  function handleOptionClick(option, level) {
283
323
  if (option.disabled) return;
284
324
  const optionIndex = columns.value[level]?.options.findIndex(
@@ -288,7 +328,7 @@ var Cascader = defineComponent({
288
328
  newPath.push(option.value);
289
329
  activePath.value = newPath;
290
330
  if (optionIndex !== void 0 && optionIndex >= 0) {
291
- setColumnActiveIndex(level, optionIndex);
331
+ activateColumnOption(level, optionIndex);
292
332
  }
293
333
  const hasChildren = isCascaderOptionExpandable(option);
294
334
  if (!hasChildren) {
@@ -305,7 +345,7 @@ var Cascader = defineComponent({
305
345
  (item) => item.value === option.value
306
346
  );
307
347
  if (optionIndex !== void 0 && optionIndex >= 0 && !option.disabled) {
308
- setColumnActiveIndex(level, optionIndex);
348
+ activateColumnOption(level, optionIndex);
309
349
  }
310
350
  if (props.expandTrigger !== "hover" || option.disabled) return;
311
351
  const newPath = activePath.value.slice(0, level);
@@ -373,7 +413,98 @@ var Cascader = defineComponent({
373
413
  ]
374
414
  );
375
415
  }
416
+ function commitActiveOption() {
417
+ if (isSearchMode.value) {
418
+ const item = searchResults.value[searchActiveIndex.value];
419
+ if (!item || item.disabled) return;
420
+ handleSearchResultClick(item.valuePath, item.disabled);
421
+ return;
422
+ }
423
+ const colIndex = getCurrentColumnIndex();
424
+ const col = columns.value[colIndex];
425
+ const idx = columnActiveIndices.value[colIndex] ?? -1;
426
+ const option = col?.options[idx];
427
+ if (!option || option.disabled) return;
428
+ handleOptionClick(option, colIndex);
429
+ if (isCascaderOptionExpandable(option)) {
430
+ nextTick(() => {
431
+ const nextCol = colIndex + 1;
432
+ if (!columns.value[nextCol]) return;
433
+ activateColumnOption(nextCol, resolveColumnActiveIndex(nextCol));
434
+ });
435
+ }
436
+ }
437
+ function handleOpenListKeyDown(e, fromSearchInput = false) {
438
+ const key = e.key;
439
+ if (fromSearchInput && key === " ") return false;
440
+ if (isSearchMode.value) {
441
+ if (key === "ArrowDown" || key === "ArrowUp" || key === "Home" || key === "End") {
442
+ e.preventDefault();
443
+ e.stopPropagation();
444
+ searchActiveIndex.value = getPickerNavigationIndex(
445
+ searchResults.value,
446
+ searchActiveIndex.value,
447
+ key,
448
+ (item) => !!item.disabled
449
+ );
450
+ return true;
451
+ }
452
+ if (key === "Enter" || key === " ") {
453
+ e.preventDefault();
454
+ e.stopPropagation();
455
+ commitActiveOption();
456
+ return true;
457
+ }
458
+ return false;
459
+ }
460
+ const colIndex = getCurrentColumnIndex();
461
+ const col = columns.value[colIndex];
462
+ if (!col) return false;
463
+ if (key === "ArrowDown" || key === "ArrowUp" || key === "Home" || key === "End") {
464
+ e.preventDefault();
465
+ e.stopPropagation();
466
+ const current = columnActiveIndices.value[colIndex] ?? -1;
467
+ const next = getPickerNavigationIndex(col.options, current, key, isOptionDisabled);
468
+ activateColumnOption(colIndex, next);
469
+ return true;
470
+ }
471
+ if (key === "ArrowRight") {
472
+ e.preventDefault();
473
+ e.stopPropagation();
474
+ const idx = columnActiveIndices.value[colIndex] ?? -1;
475
+ const option = col.options[idx];
476
+ if (option && !option.disabled && isCascaderOptionExpandable(option)) {
477
+ handleOptionClick(option, colIndex);
478
+ nextTick(() => {
479
+ const nextCol = colIndex + 1;
480
+ if (!columns.value[nextCol]) return;
481
+ activateColumnOption(nextCol, resolveColumnActiveIndex(nextCol));
482
+ });
483
+ }
484
+ return true;
485
+ }
486
+ if (key === "ArrowLeft") {
487
+ e.preventDefault();
488
+ e.stopPropagation();
489
+ if (activePath.value.length > 0) {
490
+ activePath.value = activePath.value.slice(0, -1);
491
+ nextTick(() => {
492
+ focusedColumnIndex.value = Math.max(0, Math.min(colIndex - 1, columns.value.length - 1));
493
+ });
494
+ }
495
+ return true;
496
+ }
497
+ if (key === "Enter" || key === " ") {
498
+ e.preventDefault();
499
+ e.stopPropagation();
500
+ commitActiveOption();
501
+ return true;
502
+ }
503
+ return false;
504
+ }
376
505
  function handleTriggerKeyDown(e) {
506
+ if (props.disabled) return;
507
+ if (isOpen.value && handleOpenListKeyDown(e)) return;
377
508
  const action = getPickerTriggerKeyAction(e.key, isOpen.value);
378
509
  if (action === "none") return;
379
510
  e.preventDefault();
@@ -385,34 +516,71 @@ var Cascader = defineComponent({
385
516
  closeDropdown();
386
517
  }
387
518
  }
519
+ function handleDropdownKeyDown(e) {
520
+ if (e.target instanceof HTMLInputElement) return;
521
+ if (!isOpen.value) return;
522
+ handleOpenListKeyDown(e);
523
+ }
524
+ function handleSearchKeyDown(e) {
525
+ switch (e.key) {
526
+ case " ":
527
+ e.stopPropagation();
528
+ return;
529
+ case "ArrowDown":
530
+ case "ArrowUp":
531
+ case "Enter":
532
+ handleOpenListKeyDown(e, true);
533
+ return;
534
+ case "Escape":
535
+ e.preventDefault();
536
+ e.stopPropagation();
537
+ closeDropdown();
538
+ nextTick(() => {
539
+ ;
540
+ triggerRef.value?.focus();
541
+ });
542
+ return;
543
+ default:
544
+ return;
545
+ }
546
+ }
388
547
  return () => {
389
548
  const hasValue = props.modelValue && props.modelValue.length > 0;
390
549
  const showClear = props.clearable && hasValue && !props.disabled;
391
- const listboxId = `tiger-cascader-listbox-${instanceId}`;
550
+ const currentCol = getCurrentColumnIndex();
551
+ const currentOpt = columnActiveIndices.value[currentCol] ?? -1;
552
+ const activeOptionId = !isOpen.value ? void 0 : isSearchMode.value ? searchActiveIndex.value >= 0 ? getPickerOptionId(listboxId, searchActiveIndex.value) : void 0 : currentOpt >= 0 ? getColumnOptionDomId(currentCol, currentOpt) : void 0;
392
553
  const chevronIcon = h(
393
- "svg",
554
+ "span",
394
555
  {
395
- class: classNames(
396
- "w-5 h-5 text-[var(--tiger-cascader-icon,var(--tiger-text-muted,#9ca3af))] transition-transform",
397
- isOpen.value && "rotate-180"
398
- ),
399
- xmlns: "http://www.w3.org/2000/svg",
400
- viewBox: icon20ViewBox,
401
- fill: "currentColor"
556
+ class: classNames("inline-flex", isOpen.value && "rotate-180"),
557
+ "aria-hidden": "true"
402
558
  },
403
559
  [
404
- h("path", {
405
- "fill-rule": "evenodd",
406
- d: chevronDownSolidIcon20PathD,
407
- "clip-rule": "evenodd"
408
- })
560
+ h(
561
+ "svg",
562
+ {
563
+ class: "w-5 h-5 text-[var(--tiger-cascader-icon,var(--tiger-text-muted,#9ca3af))] transition-transform",
564
+ xmlns: "http://www.w3.org/2000/svg",
565
+ viewBox: icon20ViewBox,
566
+ fill: "currentColor"
567
+ },
568
+ [
569
+ h("path", {
570
+ "fill-rule": "evenodd",
571
+ d: chevronDownSolidIcon20PathD,
572
+ "clip-rule": "evenodd"
573
+ })
574
+ ]
575
+ )
409
576
  ]
410
577
  );
411
- const clearIcon = showClear ? h(
412
- "span",
578
+ const clearButton = showClear ? h(
579
+ "button",
413
580
  {
414
- class: "flex items-center",
415
- role: "button",
581
+ type: "button",
582
+ class: "pointer-events-auto inline-flex rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--tiger-cascader-ring,var(--tiger-primary,#2563eb))]",
583
+ "data-tiger-cascader-clear": "",
416
584
  "aria-label": resolveLocaleText(
417
585
  "Clear selection",
418
586
  mergedLocale.value?.common?.clearText
@@ -443,9 +611,13 @@ var Cascader = defineComponent({
443
611
  {
444
612
  ref: triggerRef,
445
613
  type: "button",
446
- class: triggerClasses.value,
614
+ class: classNames(triggerClasses.value, showClear ? "pr-14" : "pr-9"),
447
615
  disabled: props.disabled,
448
- ...getPickerComboboxAria({ expanded: isOpen.value, listboxId }),
616
+ ...getPickerComboboxAria({
617
+ expanded: isOpen.value,
618
+ listboxId,
619
+ activeOptionId
620
+ }),
449
621
  onClick: toggleOpen,
450
622
  onKeydown: handleTriggerKeyDown
451
623
  },
@@ -459,10 +631,14 @@ var Cascader = defineComponent({
459
631
  )
460
632
  },
461
633
  hasValue ? displayLabel.value : props.placeholder
462
- ),
463
- h("span", { class: "flex items-center gap-1" }, [clearIcon, chevronIcon])
634
+ )
464
635
  ]
465
636
  );
637
+ const iconRow = h(
638
+ "span",
639
+ { class: "pointer-events-none absolute inset-y-0 right-3 flex items-center gap-1" },
640
+ [clearButton, chevronIcon]
641
+ );
466
642
  let dropdownContent = null;
467
643
  if (isOpen.value) {
468
644
  const children = [];
@@ -478,6 +654,7 @@ var Cascader = defineComponent({
478
654
  ),
479
655
  value: searchQuery.value,
480
656
  onInput: handleSearchInput,
657
+ onKeydown: handleSearchKeyDown,
481
658
  "aria-label": resolveLocaleText(
482
659
  "Search options",
483
660
  mergedLocale.value?.common?.searchPlaceholder
@@ -499,26 +676,32 @@ var Cascader = defineComponent({
499
676
  )
500
677
  );
501
678
  } else {
502
- const renderSearchItem = (item, index) => h(
503
- "div",
504
- {
505
- key: item.valuePath.join(","),
506
- "data-option-index": index,
507
- class: classNames(
508
- cascaderSearchResultClasses,
509
- item.disabled && "opacity-50 cursor-not-allowed"
510
- ),
511
- ...getPickerOptionAria({
512
- selected: props.modelValue?.join(",") === item.valuePath.join(","),
513
- disabled: item.disabled
514
- }),
515
- onMouseenter: () => {
516
- if (!item.disabled) searchActiveIndex.value = index;
679
+ const renderSearchItem = (item, index) => {
680
+ const isActive = searchActiveIndex.value === index;
681
+ return h(
682
+ "div",
683
+ {
684
+ key: item.valuePath.join(","),
685
+ id: getPickerOptionId(listboxId, index),
686
+ "data-option-index": index,
687
+ "data-active": isActive || void 0,
688
+ class: classNames(
689
+ cascaderSearchResultClasses,
690
+ isActive && "bg-[var(--tiger-cascader-option-bg-selected,var(--tiger-outline-bg-hover,#eff6ff))]",
691
+ item.disabled && "opacity-50 cursor-not-allowed"
692
+ ),
693
+ ...getPickerOptionAria({
694
+ selected: props.modelValue?.join(",") === item.valuePath.join(","),
695
+ disabled: item.disabled
696
+ }),
697
+ onMouseenter: () => {
698
+ if (!item.disabled) searchActiveIndex.value = index;
699
+ },
700
+ onClick: () => handleSearchResultClick(item.valuePath, item.disabled)
517
701
  },
518
- onClick: () => handleSearchResultClick(item.valuePath, item.disabled)
519
- },
520
- typeof props.searchable === "object" && props.searchable.render ? props.searchable.render(searchQuery.value, item.path) : item.label
521
- );
702
+ typeof props.searchable === "object" && props.searchable.render ? props.searchable.render(searchQuery.value, item.path) : item.label
703
+ );
704
+ };
522
705
  const searchList = props.virtual ? renderVirtualWindow(
523
706
  searchResults.value.length,
524
707
  searchScrollTop.value,
@@ -550,13 +733,20 @@ var Cascader = defineComponent({
550
733
  } else {
551
734
  const renderColumnOption = (option, col, colIndex, optionIndex) => {
552
735
  const isSelected = col.selectedValue === option.value;
736
+ const isActive = (columnActiveIndices.value[colIndex] ?? -1) === optionIndex;
553
737
  const hasChildren = isCascaderOptionExpandable(option);
554
738
  return h(
555
739
  "div",
556
740
  {
557
741
  key: option.value,
742
+ id: getColumnOptionDomId(colIndex, optionIndex),
558
743
  "data-option-index": optionIndex,
559
- class: getCascaderOptionClasses(isSelected, !!option.disabled, props.size),
744
+ "data-active": isActive || void 0,
745
+ class: getCascaderOptionClasses(
746
+ isSelected || isActive,
747
+ !!option.disabled,
748
+ props.size
749
+ ),
560
750
  ...getPickerOptionAria({ selected: isSelected, disabled: !!option.disabled }),
561
751
  onClick: () => handleOptionClick(option, colIndex),
562
752
  onMouseenter: () => handleOptionHover(option, colIndex)
@@ -620,7 +810,8 @@ var Cascader = defineComponent({
620
810
  overlay.floatingClasses.value
621
811
  ),
622
812
  style: overlay.floatingStyles.value,
623
- "data-positioned": overlay.positioned.value
813
+ "data-positioned": overlay.positioned.value,
814
+ onKeydown: handleDropdownKeyDown
624
815
  },
625
816
  children
626
817
  );
@@ -631,7 +822,7 @@ var Cascader = defineComponent({
631
822
  class: cascaderBaseClasses,
632
823
  "data-testid": "cascader"
633
824
  },
634
- [trigger, renderVueOverlayTeleport(dropdownContent, overlay.target.value)]
825
+ [trigger, iconRow, renderVueOverlayTeleport(dropdownContent, overlay.target.value)]
635
826
  );
636
827
  };
637
828
  }
@@ -13,7 +13,7 @@ import {
13
13
  richTextToolbarClasses,
14
14
  richTextToolbarSeparatorClasses,
15
15
  richTextPlaceholderClasses,
16
- defaultToolbar,
16
+ createDefaultRichTextToolbar,
17
17
  isInlineFormat,
18
18
  findHotkeyMatch,
19
19
  isContentEmpty,
@@ -62,10 +62,10 @@ var RichTextEditor = defineComponent({
62
62
  const currentContent = computed(
63
63
  () => props.value !== void 0 ? props.value : internalValue.value
64
64
  );
65
- const toolbarItems = computed(() => props.toolbar ?? defaultToolbar);
66
65
  const isEmpty = computed(() => isContentEmpty(currentContent.value));
67
66
  const mergedLocale = computed(() => mergeTigerLocale(config.value.locale, props.locale));
68
67
  const labels = computed(() => getRichTextEditorLabels(mergedLocale.value, props.labels));
68
+ const toolbarItems = computed(() => props.toolbar ?? createDefaultRichTextToolbar(labels.value));
69
69
  watch(
70
70
  () => props.value,
71
71
  (newVal) => {
@@ -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,6 +1,9 @@
1
+ import {
2
+ useResponsiveChartSize
3
+ } from "./chunk-UEGNXN5B.mjs";
1
4
  import {
2
5
  useChartInteraction
3
- } from "./chunk-PE5OA4YG.mjs";
6
+ } from "./chunk-FHUGOSEY.mjs";
4
7
  import {
5
8
  ChartSeries
6
9
  } from "./chunk-2ZUEXCVJ.mjs";
@@ -12,7 +15,7 @@ import {
12
15
  } from "./chunk-ZWVA7HT3.mjs";
13
16
  import {
14
17
  ChartCanvas
15
- } from "./chunk-W5RZPTFD.mjs";
18
+ } from "./chunk-SNNT64HK.mjs";
16
19
  import {
17
20
  ChartGrid
18
21
  } from "./chunk-MI6TL3CQ.mjs";
@@ -29,7 +32,6 @@ import {
29
32
  classNames,
30
33
  createLinearScale,
31
34
  getChartElementOpacity,
32
- getChartInnerRect,
33
35
  getNumberExtent,
34
36
  getStableChartGradientPrefix,
35
37
  getScatterHoverShadow,
@@ -158,6 +160,7 @@ var ScatterChart = defineComponent({
158
160
  wrapperClasses
159
161
  } = useChartInteraction({
160
162
  hoverable: computed(() => props.hoverable),
163
+ showTooltip: computed(() => props.showTooltip),
161
164
  hoveredIndexProp: () => props.hoveredIndex,
162
165
  selectable: computed(() => props.selectable),
163
166
  selectedIndexProp: () => props.selectedIndex,
@@ -168,7 +171,12 @@ var ScatterChart = defineComponent({
168
171
  getData: (index) => props.data[index],
169
172
  eventNames: { hover: "point-hover", click: "point-click" }
170
173
  });
171
- const innerRect = computed(() => getChartInnerRect(props.width, props.height, props.padding));
174
+ const { innerRect, onResolvedSizeChange } = useResponsiveChartSize(
175
+ () => props.width,
176
+ () => props.height,
177
+ () => props.padding,
178
+ () => props.responsive
179
+ );
172
180
  const xValues = computed(() => props.data.map((item) => item.x));
173
181
  const yValues = computed(() => props.data.map((item) => item.y));
174
182
  const resolvedXScale = computed(() => {
@@ -252,7 +260,8 @@ var ScatterChart = defineComponent({
252
260
  responsive: props.responsive,
253
261
  title: props.title,
254
262
  desc: props.desc,
255
- className: classNames(props.className)
263
+ className: classNames(props.className),
264
+ onResolvedSizeChange
256
265
  },
257
266
  {
258
267
  default: () => [
@@ -330,19 +339,24 @@ var ScatterChart = defineComponent({
330
339
  ...shared
331
340
  });
332
341
  }
333
- return h("path", {
334
- key: `point-${index}`,
335
- d: getScatterPointPath(props.pointStyle, point.r),
336
- transform: `translate(${point.cx},${point.cy})`,
337
- ...shared
338
- });
342
+ return h(
343
+ "g",
344
+ {
345
+ key: `point-${index}`,
346
+ transform: `translate(${point.cx},${point.cy})`
347
+ },
348
+ h("path", {
349
+ d: getScatterPointPath(props.pointStyle, point.r),
350
+ ...shared
351
+ })
352
+ );
339
353
  })
340
354
  }
341
355
  )
342
356
  ].filter(Boolean)
343
357
  }
344
358
  );
345
- const tooltip = props.showTooltip && props.hoverable ? h(ChartTooltip, {
359
+ const tooltip = props.showTooltip ? h(ChartTooltip, {
346
360
  content: tooltipContent.value,
347
361
  open: resolvedHoveredIndex.value !== null && tooltipContent.value !== "",
348
362
  x: tooltipPosition.value.x,