@snowui-design-system/components 0.3.0-alpha.1 → 0.3.0-alpha.3

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 (280) hide show
  1. package/AGENTS.md +21 -0
  2. package/LICENSE +133 -89
  3. package/README.md +21 -7
  4. package/component-catalog.json +505 -84
  5. package/dist/client/blocks/Sidebar.js +75 -46
  6. package/dist/client/blocks/SidebarSection.js +3 -1
  7. package/dist/client/blocks/index.js +2 -0
  8. package/dist/client/compat.js +2 -0
  9. package/dist/client/components/BarChart.js +1 -1
  10. package/dist/client/components/Breadcrumb.js +17 -11
  11. package/dist/client/components/CircularChart.js +2 -2
  12. package/dist/client/components/CodeBlock.js +278 -225
  13. package/dist/client/components/CopyButton.js +5 -2
  14. package/dist/client/components/ExpandButton.js +10 -3
  15. package/dist/client/components/Frame.js +15 -9
  16. package/dist/client/components/GaugeChart.js +2 -2
  17. package/dist/client/components/ImageViewer.js +51 -27
  18. package/dist/client/components/Indicator.js +5 -3
  19. package/dist/client/components/Input.js +27 -17
  20. package/dist/client/components/LineChart.js +1 -1
  21. package/dist/client/components/Link.d.ts +1 -1
  22. package/dist/client/components/Link.js +43 -22
  23. package/dist/client/components/Listbox.js +26 -15
  24. package/dist/client/components/OverflowAction.d.ts +2 -0
  25. package/dist/client/components/OverflowAction.js +146 -65
  26. package/dist/client/components/OverflowActions.d.ts +2 -0
  27. package/dist/client/components/OverflowActions.js +67 -16
  28. package/dist/client/components/Pagination.js +71 -48
  29. package/dist/client/components/Select.js +29 -18
  30. package/dist/client/components/SidePanel.js +76 -50
  31. package/dist/client/components/Tab.js +30 -31
  32. package/dist/client/components/TableBody.js +10 -4
  33. package/dist/client/components/TableCell.js +57 -32
  34. package/dist/client/components/TableHead.js +69 -38
  35. package/dist/client/components/TableToolbar.js +112 -79
  36. package/dist/client/components/Text.js +103 -47
  37. package/dist/client/components/Textarea.js +7 -1
  38. package/dist/client/components/Toast.js +8 -1
  39. package/dist/client/components/Tooltip.js +200 -195
  40. package/dist/client/context.js +2 -0
  41. package/dist/client/dev.js +2 -0
  42. package/dist/client/i18n/messages.d.ts +2 -2
  43. package/dist/client/i18n/messages.js +117 -1
  44. package/dist/client/index.d.ts +1 -1
  45. package/dist/client/index.js +3 -1
  46. package/dist/client/internal/code-block/prettier-svelte.d.ts +2 -0
  47. package/dist/client/internal/component-icon/index.js +2 -0
  48. package/dist/client/internal/snow-ui-logo/emoji-metrics.js +2 -0
  49. package/dist/client/keys.js +2 -0
  50. package/dist/client/lib/adaptive-contrast-renderer.js +2 -0
  51. package/dist/client/lib/chart/appearance-timeline.js +2 -0
  52. package/dist/client/lib/chart/arc-path.js +2 -0
  53. package/dist/client/lib/chart/colors.js +2 -0
  54. package/dist/client/lib/chart/size.js +2 -0
  55. package/dist/client/lib/clipboard.js +2 -0
  56. package/dist/client/lib/color.js +2 -0
  57. package/dist/client/lib/date-format.js +2 -0
  58. package/dist/client/lib/edge-fade.js +2 -0
  59. package/dist/client/lib/number-format.js +8 -0
  60. package/dist/client/lib/overflow-actions-motion.js +2 -0
  61. package/dist/client/lib/overlay-trigger-timing.js +2 -0
  62. package/dist/client/lib/progressive-blur.d.ts +13 -0
  63. package/dist/client/lib/progressive-blur.js +54 -0
  64. package/dist/client/lib/responsive-exit.js +2 -0
  65. package/dist/client/lib/search-filter.js +2 -0
  66. package/dist/client/lib/side-panel.js +2 -0
  67. package/dist/client/lib/split-pane.js +2 -0
  68. package/dist/client/lib/table-column-motion.js +2 -0
  69. package/dist/client/lib/table-responsive.js +2 -0
  70. package/dist/client/lib/table-selection-fade.js +2 -0
  71. package/dist/client/lib/table-truncation.js +2 -0
  72. package/dist/client/lib/text-motion/animation.js +2 -0
  73. package/dist/client/lib/text-motion/character.js +2 -0
  74. package/dist/client/lib/text-motion/color.js +2 -0
  75. package/dist/client/lib/text-motion/layout.js +2 -0
  76. package/dist/client/lib/text-motion/preference.js +2 -0
  77. package/dist/client/lib/text-motion/sequence.js +2 -0
  78. package/dist/client/lib/text-motion/typography.js +2 -0
  79. package/dist/client/lib/tooltip-delay.js +2 -0
  80. package/dist/client/lib/tooltip-motion-dismiss.js +2 -0
  81. package/dist/client/lib/tooltip-pointer-speed.js +2 -0
  82. package/dist/client/lib/truncate.js +2 -0
  83. package/dist/client/logic/ComponentPartsBoundary.d.ts +7 -0
  84. package/dist/client/logic/ComponentPartsBoundary.js +15 -0
  85. package/dist/client/logic/frame-field-control.js +2 -0
  86. package/dist/client/logic/frame-motion-defaults.js +2 -0
  87. package/dist/client/logic/frame-prop-filter.js +2 -0
  88. package/dist/client/logic/geometry-cache.js +2 -0
  89. package/dist/client/logic/layout-flip.js +2 -0
  90. package/dist/client/logic/morph.js +2 -0
  91. package/dist/client/logic/motion-engine.js +2 -0
  92. package/dist/client/logic/motion-orchestration.js +2 -0
  93. package/dist/client/logic/motion-types.js +2 -0
  94. package/dist/client/logic/overflow-actions.d.ts +3 -2
  95. package/dist/client/logic/wc-adapter.js +2 -0
  96. package/dist/client/motion/bridge.js +2 -0
  97. package/dist/client/motion/content-crossfade.js +2 -0
  98. package/dist/client/motion/expand.js +2 -0
  99. package/dist/client/motion/fade-in.js +2 -0
  100. package/dist/client/motion/fade-out.js +2 -0
  101. package/dist/client/motion/morph.js +2 -0
  102. package/dist/client/motion/move.js +2 -0
  103. package/dist/client/motion/number.js +2 -0
  104. package/dist/client/motion/replace.js +2 -0
  105. package/dist/client/motion/rotate.css +2 -0
  106. package/dist/client/motion/rotate.js +2 -0
  107. package/dist/client/motion/scale-in.js +2 -0
  108. package/dist/client/motion/tokens.js +2 -0
  109. package/dist/client/motion/while-2xl.js +2 -0
  110. package/dist/client/motion/while-active.js +2 -0
  111. package/dist/client/motion/while-appear.js +2 -0
  112. package/dist/client/motion/while-click.js +2 -0
  113. package/dist/client/motion/while-collapsed.js +2 -0
  114. package/dist/client/motion/while-disabled.js +2 -0
  115. package/dist/client/motion/while-disappear.js +2 -0
  116. package/dist/client/motion/while-drag.js +2 -0
  117. package/dist/client/motion/while-editing.js +2 -0
  118. package/dist/client/motion/while-expanded.js +2 -0
  119. package/dist/client/motion/while-focus.js +2 -0
  120. package/dist/client/motion/while-hover.js +2 -0
  121. package/dist/client/motion/while-idle.js +2 -0
  122. package/dist/client/motion/while-key.js +2 -0
  123. package/dist/client/motion/while-lg.js +2 -0
  124. package/dist/client/motion/while-load.js +2 -0
  125. package/dist/client/motion/while-md.js +2 -0
  126. package/dist/client/motion/while-reload.js +2 -0
  127. package/dist/client/motion/while-scroll.js +2 -0
  128. package/dist/client/motion/while-sm.js +2 -0
  129. package/dist/client/motion/while-uploading.js +2 -0
  130. package/dist/client/motion/while-validating.js +2 -0
  131. package/dist/client/motion/while-xl.js +2 -0
  132. package/dist/client/motion/while-xs.js +2 -0
  133. package/dist/client/styles/auto-layout.css +3 -1
  134. package/dist/client/styles/backdrop.css +2 -0
  135. package/dist/client/styles/components.css +6 -4
  136. package/dist/client/styles/index.css +2 -0
  137. package/dist/client/styles/layout.css +20 -4
  138. package/dist/client/styles/scale.css +2 -0
  139. package/dist/client/styles/scrollbar.css +3 -1
  140. package/dist/client/styles/tokens.css +2 -0
  141. package/dist/client/vite-env.d.ts +2 -0
  142. package/dist/server/blocks/Sidebar.js +41 -21
  143. package/dist/server/blocks/SidebarSection.js +3 -1
  144. package/dist/server/blocks/index.js +2 -0
  145. package/dist/server/compat.js +2 -0
  146. package/dist/server/components/BarChart.js +1 -1
  147. package/dist/server/components/Breadcrumb.js +9 -2
  148. package/dist/server/components/CircularChart.js +2 -2
  149. package/dist/server/components/CodeBlock.js +25 -13
  150. package/dist/server/components/CopyButton.js +6 -2
  151. package/dist/server/components/ExpandButton.js +7 -3
  152. package/dist/server/components/Frame.js +10 -3
  153. package/dist/server/components/GaugeChart.js +2 -2
  154. package/dist/server/components/ImageViewer.js +6 -3
  155. package/dist/server/components/Indicator.js +5 -3
  156. package/dist/server/components/Input.js +14 -17
  157. package/dist/server/components/LineChart.js +1 -1
  158. package/dist/server/components/Link.d.ts +1 -1
  159. package/dist/server/components/Link.js +20 -3
  160. package/dist/server/components/Listbox.js +17 -4
  161. package/dist/server/components/OverflowAction.d.ts +2 -0
  162. package/dist/server/components/OverflowAction.js +70 -26
  163. package/dist/server/components/OverflowActions.d.ts +2 -0
  164. package/dist/server/components/OverflowActions.js +49 -14
  165. package/dist/server/components/Pagination.js +21 -10
  166. package/dist/server/components/Select.js +23 -11
  167. package/dist/server/components/SidePanel.js +28 -8
  168. package/dist/server/components/Tab.js +61 -52
  169. package/dist/server/components/TableBody.js +9 -2
  170. package/dist/server/components/TableCell.js +28 -7
  171. package/dist/server/components/TableHead.js +31 -7
  172. package/dist/server/components/TableToolbar.js +57 -30
  173. package/dist/server/components/Text.js +52 -12
  174. package/dist/server/components/Textarea.js +4 -1
  175. package/dist/server/components/Toast.js +4 -1
  176. package/dist/server/components/Tooltip.js +10 -10
  177. package/dist/server/context.js +2 -0
  178. package/dist/server/dev.js +2 -0
  179. package/dist/server/i18n/messages.d.ts +2 -2
  180. package/dist/server/i18n/messages.js +117 -1
  181. package/dist/server/index.d.ts +1 -1
  182. package/dist/server/index.js +3 -1
  183. package/dist/server/internal/code-block/prettier-svelte.d.ts +2 -0
  184. package/dist/server/internal/component-icon/index.js +2 -0
  185. package/dist/server/internal/snow-ui-logo/emoji-metrics.js +2 -0
  186. package/dist/server/keys.js +2 -0
  187. package/dist/server/lib/adaptive-contrast-renderer.js +2 -0
  188. package/dist/server/lib/chart/appearance-timeline.js +2 -0
  189. package/dist/server/lib/chart/arc-path.js +2 -0
  190. package/dist/server/lib/chart/colors.js +2 -0
  191. package/dist/server/lib/chart/size.js +2 -0
  192. package/dist/server/lib/clipboard.js +2 -0
  193. package/dist/server/lib/color.js +2 -0
  194. package/dist/server/lib/date-format.js +2 -0
  195. package/dist/server/lib/edge-fade.js +2 -0
  196. package/dist/server/lib/number-format.js +8 -0
  197. package/dist/server/lib/overflow-actions-motion.js +2 -0
  198. package/dist/server/lib/overlay-trigger-timing.js +2 -0
  199. package/dist/server/lib/progressive-blur.d.ts +13 -0
  200. package/dist/server/lib/progressive-blur.js +54 -0
  201. package/dist/server/lib/responsive-exit.js +2 -0
  202. package/dist/server/lib/search-filter.js +2 -0
  203. package/dist/server/lib/side-panel.js +2 -0
  204. package/dist/server/lib/split-pane.js +2 -0
  205. package/dist/server/lib/table-column-motion.js +2 -0
  206. package/dist/server/lib/table-responsive.js +2 -0
  207. package/dist/server/lib/table-selection-fade.js +2 -0
  208. package/dist/server/lib/table-truncation.js +2 -0
  209. package/dist/server/lib/text-motion/animation.js +2 -0
  210. package/dist/server/lib/text-motion/character.js +2 -0
  211. package/dist/server/lib/text-motion/color.js +2 -0
  212. package/dist/server/lib/text-motion/layout.js +2 -0
  213. package/dist/server/lib/text-motion/preference.js +2 -0
  214. package/dist/server/lib/text-motion/sequence.js +2 -0
  215. package/dist/server/lib/text-motion/typography.js +2 -0
  216. package/dist/server/lib/tooltip-delay.js +2 -0
  217. package/dist/server/lib/tooltip-motion-dismiss.js +2 -0
  218. package/dist/server/lib/tooltip-pointer-speed.js +2 -0
  219. package/dist/server/lib/truncate.js +2 -0
  220. package/dist/server/logic/ComponentPartsBoundary.d.ts +7 -0
  221. package/dist/server/logic/ComponentPartsBoundary.js +12 -0
  222. package/dist/server/logic/frame-field-control.js +2 -0
  223. package/dist/server/logic/frame-motion-defaults.js +2 -0
  224. package/dist/server/logic/frame-prop-filter.js +2 -0
  225. package/dist/server/logic/geometry-cache.js +2 -0
  226. package/dist/server/logic/layout-flip.js +2 -0
  227. package/dist/server/logic/morph.js +2 -0
  228. package/dist/server/logic/motion-engine.js +2 -0
  229. package/dist/server/logic/motion-orchestration.js +2 -0
  230. package/dist/server/logic/motion-types.js +2 -0
  231. package/dist/server/logic/overflow-actions.d.ts +3 -2
  232. package/dist/server/logic/wc-adapter.js +2 -0
  233. package/dist/server/motion/bridge.js +2 -0
  234. package/dist/server/motion/content-crossfade.js +2 -0
  235. package/dist/server/motion/expand.js +2 -0
  236. package/dist/server/motion/fade-in.js +2 -0
  237. package/dist/server/motion/fade-out.js +2 -0
  238. package/dist/server/motion/morph.js +2 -0
  239. package/dist/server/motion/move.js +2 -0
  240. package/dist/server/motion/number.js +2 -0
  241. package/dist/server/motion/replace.js +2 -0
  242. package/dist/server/motion/rotate.css +2 -0
  243. package/dist/server/motion/rotate.js +2 -0
  244. package/dist/server/motion/scale-in.js +2 -0
  245. package/dist/server/motion/tokens.js +2 -0
  246. package/dist/server/motion/while-2xl.js +2 -0
  247. package/dist/server/motion/while-active.js +2 -0
  248. package/dist/server/motion/while-appear.js +2 -0
  249. package/dist/server/motion/while-click.js +2 -0
  250. package/dist/server/motion/while-collapsed.js +2 -0
  251. package/dist/server/motion/while-disabled.js +2 -0
  252. package/dist/server/motion/while-disappear.js +2 -0
  253. package/dist/server/motion/while-drag.js +2 -0
  254. package/dist/server/motion/while-editing.js +2 -0
  255. package/dist/server/motion/while-expanded.js +2 -0
  256. package/dist/server/motion/while-focus.js +2 -0
  257. package/dist/server/motion/while-hover.js +2 -0
  258. package/dist/server/motion/while-idle.js +2 -0
  259. package/dist/server/motion/while-key.js +2 -0
  260. package/dist/server/motion/while-lg.js +2 -0
  261. package/dist/server/motion/while-load.js +2 -0
  262. package/dist/server/motion/while-md.js +2 -0
  263. package/dist/server/motion/while-reload.js +2 -0
  264. package/dist/server/motion/while-scroll.js +2 -0
  265. package/dist/server/motion/while-sm.js +2 -0
  266. package/dist/server/motion/while-uploading.js +2 -0
  267. package/dist/server/motion/while-validating.js +2 -0
  268. package/dist/server/motion/while-xl.js +2 -0
  269. package/dist/server/motion/while-xs.js +2 -0
  270. package/dist/server/styles/auto-layout.css +3 -1
  271. package/dist/server/styles/backdrop.css +2 -0
  272. package/dist/server/styles/components.css +6 -4
  273. package/dist/server/styles/index.css +2 -0
  274. package/dist/server/styles/layout.css +20 -4
  275. package/dist/server/styles/scale.css +2 -0
  276. package/dist/server/styles/scrollbar.css +3 -1
  277. package/dist/server/styles/tokens.css +2 -0
  278. package/dist/server/vite-env.d.ts +2 -0
  279. package/llms.txt +5 -0
  280. package/package.json +14 -6
@@ -8,6 +8,8 @@ import Listbox from "./Listbox.js";
8
8
  import MenuItem from "./MenuItem.js";
9
9
  import { BUTTON_COLLECTION_CONTEXT_KEY, LISTBOX_OWNER_CONTEXT_KEY } from "../keys.js";
10
10
  import { resizeManager } from "../logic/observer.js";
11
+ import ComponentPartsBoundary from "../logic/ComponentPartsBoundary.js";
12
+ import { useLocale } from "../i18n/locale.js";
11
13
 
12
14
  var rest_excludes = new Set([
13
15
  '$$slots',
@@ -64,7 +66,7 @@ export default function Pagination($$anchor, $$props) {
64
66
  pageSize = $.prop($$props, 'pageSize', 15, 20),
65
67
  pageSizeOptions = $.prop($$props, 'pageSizeOptions', 19, () => []),
66
68
  pageSizeGap = $.prop($$props, 'pageSizeGap', 3, 16),
67
- pageSizeAriaLabel = $.prop($$props, 'pageSizeAriaLabel', 3, "每页条数"),
69
+ pageSizeAriaLabel = $.prop($$props, 'pageSizeAriaLabel', 3, undefined),
68
70
  onPageChange = $.prop($$props, 'onPageChange', 3, undefined),
69
71
  onPageSizeChange = $.prop($$props, 'onPageSizeChange', 3, undefined),
70
72
  parts = $.prop($$props, 'parts', 3, undefined),
@@ -76,6 +78,9 @@ export default function Pagination($$anchor, $$props) {
76
78
  userRenderHints = $.prop($$props, 'renderHints', 3, undefined),
77
79
  rest = $.rest_props($$props, rest_excludes);
78
80
 
81
+ const localeContext = useLocale();
82
+ const resolvedPageSizeAriaLabel = $.derived(() => pageSizeAriaLabel() ?? localeContext.t("pagination.pageSize"));
83
+
79
84
  setContext(BUTTON_COLLECTION_CONTEXT_KEY, { scaleOnHover: false });
80
85
 
81
86
  let templatesEl = $.state(undefined);
@@ -321,7 +326,7 @@ export default function Pagination($$anchor, $$props) {
321
326
  ].join(" ");
322
327
 
323
328
  if (role === "prev" || role === "next") {
324
- button.setAttribute("aria-label", role === "prev" ? "上一页" : "下一页");
329
+ button.setAttribute("aria-label", localeContext.t(role === "prev" ? "pagination.previous" : "pagination.next"));
325
330
 
326
331
  const iconTemplate = role === "prev"
327
332
  ? $.get(previousIconTemplateEl)?.firstElementChild
@@ -365,7 +370,7 @@ export default function Pagination($$anchor, $$props) {
365
370
  if (disabled()) markUnavailable(button);
366
371
  } else {
367
372
  button.classList.add("snowui-pagination-page");
368
- button.setAttribute("aria-label", `第 ${token} 页`);
373
+ button.setAttribute("aria-label", localeContext.t("pagination.page", { page: token }));
369
374
 
370
375
  if (disabled() || $.get(disabledPageSet).has(token)) markUnavailable(button); else bindClick(button, token);
371
376
  }
@@ -387,12 +392,12 @@ export default function Pagination($$anchor, $$props) {
387
392
  function createControl(role) {
388
393
  const target = findAvailableControlTarget(role);
389
394
  const isUnavailable = disabled() || target === undefined;
390
- const control = cloneTemplate(role) ?? createDefaultButton(role, role === "prev" ? "上一页" : "下一页");
395
+ const control = cloneTemplate(role) ?? createDefaultButton(role, localeContext.t(role === "prev" ? "pagination.previous" : "pagination.next"));
391
396
 
392
397
  control.dataset.as = role;
393
398
  control.classList.add("snowui-pagination-item", "snowui-rounded-rectangle");
394
399
  control.classList.add(`snowui-pagination-${role}`);
395
- control.setAttribute("aria-label", role === "prev" ? "上一页" : "下一页");
400
+ control.setAttribute("aria-label", localeContext.t(role === "prev" ? "pagination.previous" : "pagination.next"));
396
401
  appendDefaultControlIcon(control, role);
397
402
 
398
403
  if (isUnavailable) {
@@ -443,7 +448,7 @@ export default function Pagination($$anchor, $$props) {
443
448
  template.classList.add("snowui-pagination-page-size-template");
444
449
  template.id = pageSizeTriggerId;
445
450
  template.setAttribute("role", "combobox");
446
- template.setAttribute("aria-label", pageSizeAriaLabel());
451
+ template.setAttribute("aria-label", $.get(resolvedPageSizeAriaLabel));
447
452
  template.setAttribute("aria-haspopup", "listbox");
448
453
  template.setAttribute("aria-expanded", String($.get(pageSizeOpen)));
449
454
  template.setAttribute("aria-controls", pageSizeListboxId);
@@ -952,7 +957,8 @@ export default function Pagination($$anchor, $$props) {
952
957
  onPageChange();
953
958
  $.get(resolvedPageSize);
954
959
  $.get(resolvedPageSizeOptions);
955
- pageSizeAriaLabel();
960
+ $.get(resolvedPageSizeAriaLabel);
961
+ localeContext.locale;
956
962
  onPageSizeChange();
957
963
  $.get(showPageSize);
958
964
  $.get(resolvedGap);
@@ -1096,11 +1102,16 @@ export default function Pagination($$anchor, $$props) {
1096
1102
 
1097
1103
  {
1098
1104
  var consequent = ($$anchor) => {
1099
- var fragment_3 = $.comment();
1100
- var node_2 = $.first_child(fragment_3);
1105
+ ComponentPartsBoundary($$anchor, {
1106
+ children: ($$anchor, $$slotProps) => {
1107
+ var fragment_4 = $.comment();
1108
+ var node_2 = $.first_child(fragment_4);
1101
1109
 
1102
- $.snippet(node_2, () => $$props.children);
1103
- $.append($$anchor, fragment_3);
1110
+ $.snippet(node_2, () => $$props.children);
1111
+ $.append($$anchor, fragment_4);
1112
+ },
1113
+ $$slots: { default: true }
1114
+ });
1104
1115
  };
1105
1116
 
1106
1117
  var alternate = ($$anchor) => {
@@ -1134,43 +1145,55 @@ export default function Pagination($$anchor, $$props) {
1134
1145
 
1135
1146
  var node_5 = $.sibling(node_4, 2);
1136
1147
 
1137
- Button(node_5, {
1138
- as: 'prev',
1139
- get variant() {
1140
- return variant();
1141
- },
1142
- iconOnly: true,
1143
- 'aria-label': '上一页',
1144
- 'data-pagination-variant-fallback': 'true',
1145
- children: ($$anchor, $$slotProps) => {
1146
- ComponentIcon($$anchor, {
1147
- name: 'arrow-line-left',
1148
- size: 'var(--size-4)',
1149
- 'aria-hidden': 'true'
1150
- });
1151
- },
1152
- $$slots: { default: true }
1153
- });
1148
+ {
1149
+ let $0 = $.derived(() => localeContext.t("pagination.previous"));
1150
+
1151
+ Button(node_5, {
1152
+ as: 'prev',
1153
+ get variant() {
1154
+ return variant();
1155
+ },
1156
+ iconOnly: true,
1157
+ get 'aria-label'() {
1158
+ return $.get($0);
1159
+ },
1160
+ 'data-pagination-variant-fallback': 'true',
1161
+ children: ($$anchor, $$slotProps) => {
1162
+ ComponentIcon($$anchor, {
1163
+ name: 'arrow-line-left',
1164
+ size: 'var(--size-4)',
1165
+ 'aria-hidden': 'true'
1166
+ });
1167
+ },
1168
+ $$slots: { default: true }
1169
+ });
1170
+ }
1154
1171
 
1155
1172
  var node_6 = $.sibling(node_5, 2);
1156
1173
 
1157
- Button(node_6, {
1158
- as: 'next',
1159
- get variant() {
1160
- return variant();
1161
- },
1162
- iconOnly: true,
1163
- 'aria-label': '下一页',
1164
- 'data-pagination-variant-fallback': 'true',
1165
- children: ($$anchor, $$slotProps) => {
1166
- ComponentIcon($$anchor, {
1167
- name: 'arrow-line-right',
1168
- size: 'var(--size-4)',
1169
- 'aria-hidden': 'true'
1170
- });
1171
- },
1172
- $$slots: { default: true }
1173
- });
1174
+ {
1175
+ let $0 = $.derived(() => localeContext.t("pagination.next"));
1176
+
1177
+ Button(node_6, {
1178
+ as: 'next',
1179
+ get variant() {
1180
+ return variant();
1181
+ },
1182
+ iconOnly: true,
1183
+ get 'aria-label'() {
1184
+ return $.get($0);
1185
+ },
1186
+ 'data-pagination-variant-fallback': 'true',
1187
+ children: ($$anchor, $$slotProps) => {
1188
+ ComponentIcon($$anchor, {
1189
+ name: 'arrow-line-right',
1190
+ size: 'var(--size-4)',
1191
+ 'aria-hidden': 'true'
1192
+ });
1193
+ },
1194
+ $$slots: { default: true }
1195
+ });
1196
+ }
1174
1197
 
1175
1198
  var span = $.sibling(node_6, 2);
1176
1199
  var node_7 = $.child(span);
@@ -1223,8 +1246,8 @@ export default function Pagination($$anchor, $$props) {
1223
1246
  Listbox($$anchor, {
1224
1247
  matchTriggerWidth: false,
1225
1248
  children: ($$anchor, $$slotProps) => {
1226
- var fragment_8 = $.comment();
1227
- var node_11 = $.first_child(fragment_8);
1249
+ var fragment_9 = $.comment();
1250
+ var node_11 = $.first_child(fragment_9);
1228
1251
 
1229
1252
  $.each(node_11, 16, () => $.get(resolvedPageSizeOptions), (option) => option, ($$anchor, option) => {
1230
1253
  {
@@ -1240,7 +1263,7 @@ export default function Pagination($$anchor, $$props) {
1240
1263
  }
1241
1264
  });
1242
1265
 
1243
- $.append($$anchor, fragment_8);
1266
+ $.append($$anchor, fragment_9);
1244
1267
  },
1245
1268
  $$slots: { default: true }
1246
1269
  });
@@ -13,6 +13,7 @@ import { resolveFrameFieldInvalid, resolveFrameFieldValue } from "../logic/frame
13
13
  import { splitFrameHostProps } from "../logic/frame-prop-filter.js";
14
14
  import { matchesSearch } from "../lib/search-filter.js";
15
15
  import { mergeComponentPartProps, useComponentPart } from "../logic/component-parts.js";
16
+ import ComponentPartsBoundary from "../logic/ComponentPartsBoundary.js";
16
17
 
17
18
  var rest_excludes = new Set(['$$slots', '$$events', '$$legacy', 'value']);
18
19
  var root = $.from_html(`<input type="hidden"/>`);
@@ -588,19 +589,24 @@ export default function Select($$anchor, $$props) {
588
589
 
589
590
  {
590
591
  var consequent_1 = ($$anchor) => {
591
- var fragment_4 = $.comment();
592
- var node_3 = $.first_child(fragment_4);
593
-
594
- $.snippet(node_3, () => $.get(triggerContent), () => ({
595
- value: $.get(resolvedValue),
596
- option: $.get(selectedOption),
597
- label: $.get(selectedLabel),
598
- placeholder: $.get(placeholder),
599
- open: $.get(open),
600
- disabled: $.get(disabled)
601
- }));
602
-
603
- $.append($$anchor, fragment_4);
592
+ ComponentPartsBoundary($$anchor, {
593
+ children: ($$anchor, $$slotProps) => {
594
+ var fragment_5 = $.comment();
595
+ var node_3 = $.first_child(fragment_5);
596
+
597
+ $.snippet(node_3, () => $.get(triggerContent), () => ({
598
+ value: $.get(resolvedValue),
599
+ option: $.get(selectedOption),
600
+ label: $.get(selectedLabel),
601
+ placeholder: $.get(placeholder),
602
+ open: $.get(open),
603
+ disabled: $.get(disabled)
604
+ }));
605
+
606
+ $.append($$anchor, fragment_5);
607
+ },
608
+ $$slots: { default: true }
609
+ });
604
610
  };
605
611
 
606
612
  var alternate = ($$anchor) => {
@@ -693,11 +699,16 @@ export default function Select($$anchor, $$props) {
693
699
 
694
700
  {
695
701
  var consequent_4 = ($$anchor) => {
696
- var fragment_7 = $.comment();
697
- var node_6 = $.first_child(fragment_7);
698
-
699
- $.snippet(node_6, () => $.get(children));
700
- $.append($$anchor, fragment_7);
702
+ ComponentPartsBoundary($$anchor, {
703
+ children: ($$anchor, $$slotProps) => {
704
+ var fragment_9 = $.comment();
705
+ var node_6 = $.first_child(fragment_9);
706
+
707
+ $.snippet(node_6, () => $.get(children));
708
+ $.append($$anchor, fragment_9);
709
+ },
710
+ $$slots: { default: true }
711
+ });
701
712
  };
702
713
 
703
714
  var alternate_2 = ($$anchor) => {
@@ -9,6 +9,7 @@ import { SIDE_PANEL_APPEAR_MOTION, SIDE_PANEL_DISAPPEAR_MOTION } from "../motion
9
9
  import { DIALOG_BACKDROP_MOTION_STYLE } from "../motion/presets/dialog.js";
10
10
  import { getMotionTotalDurationMs } from "../motion/presets/utils.js";
11
11
  import { provideComponentParts } from "../logic/component-parts.js";
12
+ import ComponentPartsBoundary from "../logic/ComponentPartsBoundary.js";
12
13
  import { ComponentIcon } from "../internal/component-icon/index.js";
13
14
  import Frame from "./Frame.js";
14
15
 
@@ -317,6 +318,10 @@ export default function SidePanel($$anchor, $$props) {
317
318
 
318
319
  get enableScaleObserver() {
319
320
  return enableScaleObserver();
321
+ },
322
+
323
+ get componentParts() {
324
+ return parts();
320
325
  }
321
326
  },
322
327
  () => rest,
@@ -422,11 +427,16 @@ export default function SidePanel($$anchor, $$props) {
422
427
 
423
428
  {
424
429
  var consequent_6 = ($$anchor) => {
425
- var fragment_12 = $.comment();
426
- var node_11 = $.first_child(fragment_12);
430
+ ComponentPartsBoundary($$anchor, {
431
+ children: ($$anchor, $$slotProps) => {
432
+ var fragment_13 = $.comment();
433
+ var node_11 = $.first_child(fragment_13);
427
434
 
428
- $.snippet(node_11, () => $$props.children);
429
- $.append($$anchor, fragment_12);
435
+ $.snippet(node_11, () => $$props.children);
436
+ $.append($$anchor, fragment_13);
437
+ },
438
+ $$slots: { default: true }
439
+ });
430
440
  };
431
441
 
432
442
  $.if(node_10, ($$render) => {
@@ -448,22 +458,27 @@ export default function SidePanel($$anchor, $$props) {
448
458
 
449
459
  {
450
460
  var consequent_7 = ($$anchor) => {
451
- var fragment_13 = $.comment();
452
- var node_14 = $.first_child(fragment_13);
453
-
454
- $.snippet(node_14, bottomLeading);
455
- $.append($$anchor, fragment_13);
461
+ ComponentPartsBoundary($$anchor, {
462
+ children: ($$anchor, $$slotProps) => {
463
+ var fragment_15 = $.comment();
464
+ var node_14 = $.first_child(fragment_15);
465
+
466
+ $.snippet(node_14, bottomLeading);
467
+ $.append($$anchor, fragment_15);
468
+ },
469
+ $$slots: { default: true }
470
+ });
456
471
  };
457
472
 
458
473
  var alternate = ($$anchor) => {
459
- var fragment_14 = $.comment();
460
- var node_15 = $.first_child(fragment_14);
474
+ var fragment_16 = $.comment();
475
+ var node_15 = $.first_child(fragment_16);
461
476
 
462
477
  $.each(node_15, 19, () => $.get(resolvedBottomLeadingActions), (action, index) => action.id ?? `${action.role ?? "bottom-leading"}-${index}`, ($$anchor, action) => {
463
478
  actionButton($$anchor, () => $.get(action));
464
479
  });
465
480
 
466
- $.append($$anchor, fragment_14);
481
+ $.append($$anchor, fragment_16);
467
482
  };
468
483
 
469
484
  $.if(node_13, ($$render) => {
@@ -478,22 +493,27 @@ export default function SidePanel($$anchor, $$props) {
478
493
 
479
494
  {
480
495
  var consequent_8 = ($$anchor) => {
481
- var fragment_16 = $.comment();
482
- var node_17 = $.first_child(fragment_16);
483
-
484
- $.snippet(node_17, bottomTrailing);
485
- $.append($$anchor, fragment_16);
496
+ ComponentPartsBoundary($$anchor, {
497
+ children: ($$anchor, $$slotProps) => {
498
+ var fragment_19 = $.comment();
499
+ var node_17 = $.first_child(fragment_19);
500
+
501
+ $.snippet(node_17, bottomTrailing);
502
+ $.append($$anchor, fragment_19);
503
+ },
504
+ $$slots: { default: true }
505
+ });
486
506
  };
487
507
 
488
508
  var alternate_1 = ($$anchor) => {
489
- var fragment_17 = $.comment();
490
- var node_18 = $.first_child(fragment_17);
509
+ var fragment_20 = $.comment();
510
+ var node_18 = $.first_child(fragment_20);
491
511
 
492
512
  $.each(node_18, 19, () => $.get(resolvedBottomTrailingActions), (action, index) => action.id ?? `${action.role ?? "bottom-trailing"}-${index}`, ($$anchor, action) => {
493
513
  actionButton($$anchor, () => $.get(action));
494
514
  });
495
515
 
496
- $.append($$anchor, fragment_17);
516
+ $.append($$anchor, fragment_20);
497
517
  };
498
518
 
499
519
  $.if(node_16, ($$render) => {
@@ -519,33 +539,39 @@ export default function SidePanel($$anchor, $$props) {
519
539
 
520
540
  var node_19 = $.sibling(div_8, 2);
521
541
 
522
- Indicator(node_19, {
523
- get target() {
524
- return $.get(panelEl);
525
- },
526
-
527
- get revealTarget() {
528
- return $.get(panelEl);
529
- },
530
- axis: 'width',
531
- edge: 'start',
532
- pinOffset: 'var(--padding-1)',
533
- class: 'snowui-side-panel-resize-indicator',
534
- get value() {
535
- return $.get(resolvedWidth);
536
- },
537
-
538
- get minSize() {
539
- return minWidth();
540
- },
541
-
542
- get maxSize() {
543
- return maxWidth();
544
- },
545
- applySize: false,
546
- ariaLabel: '调整弹出窗宽度',
547
- onSizeChange: handleWidthChange
548
- });
542
+ {
543
+ let $0 = $.derived(() => locale.t("sidePanel.resize"));
544
+
545
+ Indicator(node_19, {
546
+ get target() {
547
+ return $.get(panelEl);
548
+ },
549
+
550
+ get revealTarget() {
551
+ return $.get(panelEl);
552
+ },
553
+ axis: 'width',
554
+ edge: 'start',
555
+ pinOffset: 'var(--padding-1)',
556
+ class: 'snowui-side-panel-resize-indicator',
557
+ get value() {
558
+ return $.get(resolvedWidth);
559
+ },
560
+
561
+ get minSize() {
562
+ return minWidth();
563
+ },
564
+
565
+ get maxSize() {
566
+ return maxWidth();
567
+ },
568
+ applySize: false,
569
+ get ariaLabel() {
570
+ return $.get($0);
571
+ },
572
+ onSizeChange: handleWidthChange
573
+ });
574
+ }
549
575
 
550
576
  $.template_effect(
551
577
  ($0) => {
@@ -908,8 +934,8 @@ export default function SidePanel($$anchor, $$props) {
908
934
  width(Math.round(next));
909
935
  }
910
936
 
911
- var fragment_19 = $.comment();
912
- var node_20 = $.first_child(fragment_19);
937
+ var fragment_22 = $.comment();
938
+ var node_20 = $.first_child(fragment_22);
913
939
 
914
940
  {
915
941
  var consequent_11 = ($$anchor) => {
@@ -956,6 +982,6 @@ export default function SidePanel($$anchor, $$props) {
956
982
  });
957
983
  }
958
984
 
959
- $.append($$anchor, fragment_19);
985
+ $.append($$anchor, fragment_22);
960
986
  $.pop();
961
987
  }
@@ -4,12 +4,8 @@ import { setContext } from "svelte";
4
4
  import { Button, Frame, Icon, Text, resizeManager } from "../index.js";
5
5
  import { BUTTON_SIZE_CONTEXT_KEY } from "../keys.js";
6
6
  import { TAB_INDICATOR_MOTION_STYLE } from "../motion/presets/tab.js";
7
-
8
- import {
9
- mergeComponentPartProps,
10
- provideComponentParts,
11
- useComponentPart
12
- } from "../logic/component-parts.js";
7
+ import { mergeComponentPartProps, useComponentPart } from "../logic/component-parts.js";
8
+ import ComponentPartsBoundary from "../logic/ComponentPartsBoundary.js";
13
9
 
14
10
  var rest_excludes = new Set(['$$slots', '$$events', '$$legacy', 'value']);
15
11
  var root_1 = $.from_html(`<!><!>`, 1);
@@ -82,8 +78,6 @@ export default function Tab($$anchor, $$props) {
82
78
  'style'
83
79
  ]));
84
80
 
85
- provideComponentParts(() => $.get(parts));
86
-
87
81
  let rootEl = $.state(void 0);
88
82
  let indicatorEl = $.state(null);
89
83
  let initialized = $.state(false);
@@ -382,19 +376,24 @@ export default function Tab($$anchor, $$props) {
382
376
 
383
377
  {
384
378
  var consequent = ($$anchor) => {
385
- var fragment_2 = $.comment();
386
- var node_1 = $.first_child(fragment_2);
387
-
388
- $.snippet(node_1, () => $.get(children));
389
- $.append($$anchor, fragment_2);
379
+ ComponentPartsBoundary($$anchor, {
380
+ children: ($$anchor, $$slotProps) => {
381
+ var fragment_3 = $.comment();
382
+ var node_1 = $.first_child(fragment_3);
383
+
384
+ $.snippet(node_1, () => $.get(children));
385
+ $.append($$anchor, fragment_3);
386
+ },
387
+ $$slots: { default: true }
388
+ });
390
389
  };
391
390
 
392
391
  var alternate_1 = ($$anchor) => {
393
- var fragment_3 = $.comment();
394
- var node_2 = $.first_child(fragment_3);
392
+ var fragment_4 = $.comment();
393
+ var node_2 = $.first_child(fragment_4);
395
394
 
396
395
  $.each(node_2, 17, () => $.get(items), (item) => item.value, ($$anchor, item) => {
397
- Button($$anchor, {
396
+ Button($$anchor, $.spread_props(() => $.get(parts)?.Button, {
398
397
  as: 'item',
399
398
  get value() {
400
399
  return $.get(item).value;
@@ -405,32 +404,32 @@ export default function Tab($$anchor, $$props) {
405
404
  },
406
405
 
407
406
  children: ($$anchor, $$slotProps) => {
408
- var fragment_5 = $.comment();
409
- var node_3 = $.first_child(fragment_5);
407
+ var fragment_6 = $.comment();
408
+ var node_3 = $.first_child(fragment_6);
410
409
 
411
410
  {
412
411
  var consequent_1 = ($$anchor) => {
413
412
  const ItemIcon = $.derived(() => $.get(item).icon);
414
- var fragment_6 = root_1();
415
- var node_4 = $.first_child(fragment_6);
413
+ var fragment_7 = root_1();
414
+ var node_4 = $.first_child(fragment_7);
416
415
 
417
- Icon(node_4, {
416
+ Icon(node_4, $.spread_props(() => $.get(parts)?.Icon, {
418
417
  children: ($$anchor, $$slotProps) => {
419
- var fragment_7 = $.comment();
420
- var node_5 = $.first_child(fragment_7);
418
+ var fragment_8 = $.comment();
419
+ var node_5 = $.first_child(fragment_8);
421
420
 
422
421
  $.component(node_5, () => $.get(ItemIcon), ($$anchor, ItemIcon_1) => {
423
422
  ItemIcon_1($$anchor, {});
424
423
  });
425
424
 
426
- $.append($$anchor, fragment_7);
425
+ $.append($$anchor, fragment_8);
427
426
  },
428
427
  $$slots: { default: true }
429
- });
428
+ }));
430
429
 
431
430
  var node_6 = $.sibling(node_4);
432
431
 
433
- Text(node_6, {
432
+ Text(node_6, $.spread_props(() => $.get(parts)?.Text, {
434
433
  children: ($$anchor, $$slotProps) => {
435
434
  $.next();
436
435
 
@@ -440,9 +439,9 @@ export default function Tab($$anchor, $$props) {
440
439
  $.append($$anchor, text);
441
440
  },
442
441
  $$slots: { default: true }
443
- });
442
+ }));
444
443
 
445
- $.append($$anchor, fragment_6);
444
+ $.append($$anchor, fragment_7);
446
445
  };
447
446
 
448
447
  var alternate = ($$anchor) => {
@@ -457,13 +456,13 @@ export default function Tab($$anchor, $$props) {
457
456
  });
458
457
  }
459
458
 
460
- $.append($$anchor, fragment_5);
459
+ $.append($$anchor, fragment_6);
461
460
  },
462
461
  $$slots: { default: true }
463
- });
462
+ }));
464
463
  });
465
464
 
466
- $.append($$anchor, fragment_3);
465
+ $.append($$anchor, fragment_4);
467
466
  };
468
467
 
469
468
  $.if(node, ($$render) => {
@@ -7,6 +7,7 @@ import TableCell from "./TableCell.js";
7
7
  import Spinner from "./Spinner.js";
8
8
  import { resizeManager } from "../logic/observer.js";
9
9
  import { getTableContext } from "../lib/table-context.js";
10
+ import ComponentPartsBoundary from "../logic/ComponentPartsBoundary.js";
10
11
  import { ContinuousHoverController } from "../logic/continuous-hover.js";
11
12
  import { CONTINUOUS_HOVER_MOTION_STYLE } from "../motion/presets/continuous-hover.js";
12
13
 
@@ -236,11 +237,16 @@ export default function TableBody($$anchor, $$props) {
236
237
 
237
238
  {
238
239
  var consequent_1 = ($$anchor) => {
239
- var fragment_7 = $.comment();
240
- var node_4 = $.first_child(fragment_7);
240
+ ComponentPartsBoundary($$anchor, {
241
+ children: ($$anchor, $$slotProps) => {
242
+ var fragment_8 = $.comment();
243
+ var node_4 = $.first_child(fragment_8);
241
244
 
242
- $.snippet(node_4, () => $$props.children);
243
- $.append($$anchor, fragment_7);
245
+ $.snippet(node_4, () => $$props.children);
246
+ $.append($$anchor, fragment_8);
247
+ },
248
+ $$slots: { default: true }
249
+ });
244
250
  };
245
251
 
246
252
  $.if(node_3, ($$render) => {