@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.
- package/AGENTS.md +21 -0
- package/LICENSE +133 -89
- package/README.md +21 -7
- package/component-catalog.json +505 -84
- package/dist/client/blocks/Sidebar.js +75 -46
- package/dist/client/blocks/SidebarSection.js +3 -1
- package/dist/client/blocks/index.js +2 -0
- package/dist/client/compat.js +2 -0
- package/dist/client/components/BarChart.js +1 -1
- package/dist/client/components/Breadcrumb.js +17 -11
- package/dist/client/components/CircularChart.js +2 -2
- package/dist/client/components/CodeBlock.js +278 -225
- package/dist/client/components/CopyButton.js +5 -2
- package/dist/client/components/ExpandButton.js +10 -3
- package/dist/client/components/Frame.js +15 -9
- package/dist/client/components/GaugeChart.js +2 -2
- package/dist/client/components/ImageViewer.js +51 -27
- package/dist/client/components/Indicator.js +5 -3
- package/dist/client/components/Input.js +27 -17
- package/dist/client/components/LineChart.js +1 -1
- package/dist/client/components/Link.d.ts +1 -1
- package/dist/client/components/Link.js +43 -22
- package/dist/client/components/Listbox.js +26 -15
- package/dist/client/components/OverflowAction.d.ts +2 -0
- package/dist/client/components/OverflowAction.js +146 -65
- package/dist/client/components/OverflowActions.d.ts +2 -0
- package/dist/client/components/OverflowActions.js +67 -16
- package/dist/client/components/Pagination.js +71 -48
- package/dist/client/components/Select.js +29 -18
- package/dist/client/components/SidePanel.js +76 -50
- package/dist/client/components/Tab.js +30 -31
- package/dist/client/components/TableBody.js +10 -4
- package/dist/client/components/TableCell.js +57 -32
- package/dist/client/components/TableHead.js +69 -38
- package/dist/client/components/TableToolbar.js +112 -79
- package/dist/client/components/Text.js +103 -47
- package/dist/client/components/Textarea.js +7 -1
- package/dist/client/components/Toast.js +8 -1
- package/dist/client/components/Tooltip.js +200 -195
- package/dist/client/context.js +2 -0
- package/dist/client/dev.js +2 -0
- package/dist/client/i18n/messages.d.ts +2 -2
- package/dist/client/i18n/messages.js +117 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +3 -1
- package/dist/client/internal/code-block/prettier-svelte.d.ts +2 -0
- package/dist/client/internal/component-icon/index.js +2 -0
- package/dist/client/internal/snow-ui-logo/emoji-metrics.js +2 -0
- package/dist/client/keys.js +2 -0
- package/dist/client/lib/adaptive-contrast-renderer.js +2 -0
- package/dist/client/lib/chart/appearance-timeline.js +2 -0
- package/dist/client/lib/chart/arc-path.js +2 -0
- package/dist/client/lib/chart/colors.js +2 -0
- package/dist/client/lib/chart/size.js +2 -0
- package/dist/client/lib/clipboard.js +2 -0
- package/dist/client/lib/color.js +2 -0
- package/dist/client/lib/date-format.js +2 -0
- package/dist/client/lib/edge-fade.js +2 -0
- package/dist/client/lib/number-format.js +8 -0
- package/dist/client/lib/overflow-actions-motion.js +2 -0
- package/dist/client/lib/overlay-trigger-timing.js +2 -0
- package/dist/client/lib/progressive-blur.d.ts +13 -0
- package/dist/client/lib/progressive-blur.js +54 -0
- package/dist/client/lib/responsive-exit.js +2 -0
- package/dist/client/lib/search-filter.js +2 -0
- package/dist/client/lib/side-panel.js +2 -0
- package/dist/client/lib/split-pane.js +2 -0
- package/dist/client/lib/table-column-motion.js +2 -0
- package/dist/client/lib/table-responsive.js +2 -0
- package/dist/client/lib/table-selection-fade.js +2 -0
- package/dist/client/lib/table-truncation.js +2 -0
- package/dist/client/lib/text-motion/animation.js +2 -0
- package/dist/client/lib/text-motion/character.js +2 -0
- package/dist/client/lib/text-motion/color.js +2 -0
- package/dist/client/lib/text-motion/layout.js +2 -0
- package/dist/client/lib/text-motion/preference.js +2 -0
- package/dist/client/lib/text-motion/sequence.js +2 -0
- package/dist/client/lib/text-motion/typography.js +2 -0
- package/dist/client/lib/tooltip-delay.js +2 -0
- package/dist/client/lib/tooltip-motion-dismiss.js +2 -0
- package/dist/client/lib/tooltip-pointer-speed.js +2 -0
- package/dist/client/lib/truncate.js +2 -0
- package/dist/client/logic/ComponentPartsBoundary.d.ts +7 -0
- package/dist/client/logic/ComponentPartsBoundary.js +15 -0
- package/dist/client/logic/frame-field-control.js +2 -0
- package/dist/client/logic/frame-motion-defaults.js +2 -0
- package/dist/client/logic/frame-prop-filter.js +2 -0
- package/dist/client/logic/geometry-cache.js +2 -0
- package/dist/client/logic/layout-flip.js +2 -0
- package/dist/client/logic/morph.js +2 -0
- package/dist/client/logic/motion-engine.js +2 -0
- package/dist/client/logic/motion-orchestration.js +2 -0
- package/dist/client/logic/motion-types.js +2 -0
- package/dist/client/logic/overflow-actions.d.ts +3 -2
- package/dist/client/logic/wc-adapter.js +2 -0
- package/dist/client/motion/bridge.js +2 -0
- package/dist/client/motion/content-crossfade.js +2 -0
- package/dist/client/motion/expand.js +2 -0
- package/dist/client/motion/fade-in.js +2 -0
- package/dist/client/motion/fade-out.js +2 -0
- package/dist/client/motion/morph.js +2 -0
- package/dist/client/motion/move.js +2 -0
- package/dist/client/motion/number.js +2 -0
- package/dist/client/motion/replace.js +2 -0
- package/dist/client/motion/rotate.css +2 -0
- package/dist/client/motion/rotate.js +2 -0
- package/dist/client/motion/scale-in.js +2 -0
- package/dist/client/motion/tokens.js +2 -0
- package/dist/client/motion/while-2xl.js +2 -0
- package/dist/client/motion/while-active.js +2 -0
- package/dist/client/motion/while-appear.js +2 -0
- package/dist/client/motion/while-click.js +2 -0
- package/dist/client/motion/while-collapsed.js +2 -0
- package/dist/client/motion/while-disabled.js +2 -0
- package/dist/client/motion/while-disappear.js +2 -0
- package/dist/client/motion/while-drag.js +2 -0
- package/dist/client/motion/while-editing.js +2 -0
- package/dist/client/motion/while-expanded.js +2 -0
- package/dist/client/motion/while-focus.js +2 -0
- package/dist/client/motion/while-hover.js +2 -0
- package/dist/client/motion/while-idle.js +2 -0
- package/dist/client/motion/while-key.js +2 -0
- package/dist/client/motion/while-lg.js +2 -0
- package/dist/client/motion/while-load.js +2 -0
- package/dist/client/motion/while-md.js +2 -0
- package/dist/client/motion/while-reload.js +2 -0
- package/dist/client/motion/while-scroll.js +2 -0
- package/dist/client/motion/while-sm.js +2 -0
- package/dist/client/motion/while-uploading.js +2 -0
- package/dist/client/motion/while-validating.js +2 -0
- package/dist/client/motion/while-xl.js +2 -0
- package/dist/client/motion/while-xs.js +2 -0
- package/dist/client/styles/auto-layout.css +3 -1
- package/dist/client/styles/backdrop.css +2 -0
- package/dist/client/styles/components.css +6 -4
- package/dist/client/styles/index.css +2 -0
- package/dist/client/styles/layout.css +20 -4
- package/dist/client/styles/scale.css +2 -0
- package/dist/client/styles/scrollbar.css +3 -1
- package/dist/client/styles/tokens.css +2 -0
- package/dist/client/vite-env.d.ts +2 -0
- package/dist/server/blocks/Sidebar.js +41 -21
- package/dist/server/blocks/SidebarSection.js +3 -1
- package/dist/server/blocks/index.js +2 -0
- package/dist/server/compat.js +2 -0
- package/dist/server/components/BarChart.js +1 -1
- package/dist/server/components/Breadcrumb.js +9 -2
- package/dist/server/components/CircularChart.js +2 -2
- package/dist/server/components/CodeBlock.js +25 -13
- package/dist/server/components/CopyButton.js +6 -2
- package/dist/server/components/ExpandButton.js +7 -3
- package/dist/server/components/Frame.js +10 -3
- package/dist/server/components/GaugeChart.js +2 -2
- package/dist/server/components/ImageViewer.js +6 -3
- package/dist/server/components/Indicator.js +5 -3
- package/dist/server/components/Input.js +14 -17
- package/dist/server/components/LineChart.js +1 -1
- package/dist/server/components/Link.d.ts +1 -1
- package/dist/server/components/Link.js +20 -3
- package/dist/server/components/Listbox.js +17 -4
- package/dist/server/components/OverflowAction.d.ts +2 -0
- package/dist/server/components/OverflowAction.js +70 -26
- package/dist/server/components/OverflowActions.d.ts +2 -0
- package/dist/server/components/OverflowActions.js +49 -14
- package/dist/server/components/Pagination.js +21 -10
- package/dist/server/components/Select.js +23 -11
- package/dist/server/components/SidePanel.js +28 -8
- package/dist/server/components/Tab.js +61 -52
- package/dist/server/components/TableBody.js +9 -2
- package/dist/server/components/TableCell.js +28 -7
- package/dist/server/components/TableHead.js +31 -7
- package/dist/server/components/TableToolbar.js +57 -30
- package/dist/server/components/Text.js +52 -12
- package/dist/server/components/Textarea.js +4 -1
- package/dist/server/components/Toast.js +4 -1
- package/dist/server/components/Tooltip.js +10 -10
- package/dist/server/context.js +2 -0
- package/dist/server/dev.js +2 -0
- package/dist/server/i18n/messages.d.ts +2 -2
- package/dist/server/i18n/messages.js +117 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +3 -1
- package/dist/server/internal/code-block/prettier-svelte.d.ts +2 -0
- package/dist/server/internal/component-icon/index.js +2 -0
- package/dist/server/internal/snow-ui-logo/emoji-metrics.js +2 -0
- package/dist/server/keys.js +2 -0
- package/dist/server/lib/adaptive-contrast-renderer.js +2 -0
- package/dist/server/lib/chart/appearance-timeline.js +2 -0
- package/dist/server/lib/chart/arc-path.js +2 -0
- package/dist/server/lib/chart/colors.js +2 -0
- package/dist/server/lib/chart/size.js +2 -0
- package/dist/server/lib/clipboard.js +2 -0
- package/dist/server/lib/color.js +2 -0
- package/dist/server/lib/date-format.js +2 -0
- package/dist/server/lib/edge-fade.js +2 -0
- package/dist/server/lib/number-format.js +8 -0
- package/dist/server/lib/overflow-actions-motion.js +2 -0
- package/dist/server/lib/overlay-trigger-timing.js +2 -0
- package/dist/server/lib/progressive-blur.d.ts +13 -0
- package/dist/server/lib/progressive-blur.js +54 -0
- package/dist/server/lib/responsive-exit.js +2 -0
- package/dist/server/lib/search-filter.js +2 -0
- package/dist/server/lib/side-panel.js +2 -0
- package/dist/server/lib/split-pane.js +2 -0
- package/dist/server/lib/table-column-motion.js +2 -0
- package/dist/server/lib/table-responsive.js +2 -0
- package/dist/server/lib/table-selection-fade.js +2 -0
- package/dist/server/lib/table-truncation.js +2 -0
- package/dist/server/lib/text-motion/animation.js +2 -0
- package/dist/server/lib/text-motion/character.js +2 -0
- package/dist/server/lib/text-motion/color.js +2 -0
- package/dist/server/lib/text-motion/layout.js +2 -0
- package/dist/server/lib/text-motion/preference.js +2 -0
- package/dist/server/lib/text-motion/sequence.js +2 -0
- package/dist/server/lib/text-motion/typography.js +2 -0
- package/dist/server/lib/tooltip-delay.js +2 -0
- package/dist/server/lib/tooltip-motion-dismiss.js +2 -0
- package/dist/server/lib/tooltip-pointer-speed.js +2 -0
- package/dist/server/lib/truncate.js +2 -0
- package/dist/server/logic/ComponentPartsBoundary.d.ts +7 -0
- package/dist/server/logic/ComponentPartsBoundary.js +12 -0
- package/dist/server/logic/frame-field-control.js +2 -0
- package/dist/server/logic/frame-motion-defaults.js +2 -0
- package/dist/server/logic/frame-prop-filter.js +2 -0
- package/dist/server/logic/geometry-cache.js +2 -0
- package/dist/server/logic/layout-flip.js +2 -0
- package/dist/server/logic/morph.js +2 -0
- package/dist/server/logic/motion-engine.js +2 -0
- package/dist/server/logic/motion-orchestration.js +2 -0
- package/dist/server/logic/motion-types.js +2 -0
- package/dist/server/logic/overflow-actions.d.ts +3 -2
- package/dist/server/logic/wc-adapter.js +2 -0
- package/dist/server/motion/bridge.js +2 -0
- package/dist/server/motion/content-crossfade.js +2 -0
- package/dist/server/motion/expand.js +2 -0
- package/dist/server/motion/fade-in.js +2 -0
- package/dist/server/motion/fade-out.js +2 -0
- package/dist/server/motion/morph.js +2 -0
- package/dist/server/motion/move.js +2 -0
- package/dist/server/motion/number.js +2 -0
- package/dist/server/motion/replace.js +2 -0
- package/dist/server/motion/rotate.css +2 -0
- package/dist/server/motion/rotate.js +2 -0
- package/dist/server/motion/scale-in.js +2 -0
- package/dist/server/motion/tokens.js +2 -0
- package/dist/server/motion/while-2xl.js +2 -0
- package/dist/server/motion/while-active.js +2 -0
- package/dist/server/motion/while-appear.js +2 -0
- package/dist/server/motion/while-click.js +2 -0
- package/dist/server/motion/while-collapsed.js +2 -0
- package/dist/server/motion/while-disabled.js +2 -0
- package/dist/server/motion/while-disappear.js +2 -0
- package/dist/server/motion/while-drag.js +2 -0
- package/dist/server/motion/while-editing.js +2 -0
- package/dist/server/motion/while-expanded.js +2 -0
- package/dist/server/motion/while-focus.js +2 -0
- package/dist/server/motion/while-hover.js +2 -0
- package/dist/server/motion/while-idle.js +2 -0
- package/dist/server/motion/while-key.js +2 -0
- package/dist/server/motion/while-lg.js +2 -0
- package/dist/server/motion/while-load.js +2 -0
- package/dist/server/motion/while-md.js +2 -0
- package/dist/server/motion/while-reload.js +2 -0
- package/dist/server/motion/while-scroll.js +2 -0
- package/dist/server/motion/while-sm.js +2 -0
- package/dist/server/motion/while-uploading.js +2 -0
- package/dist/server/motion/while-validating.js +2 -0
- package/dist/server/motion/while-xl.js +2 -0
- package/dist/server/motion/while-xs.js +2 -0
- package/dist/server/styles/auto-layout.css +3 -1
- package/dist/server/styles/backdrop.css +2 -0
- package/dist/server/styles/components.css +6 -4
- package/dist/server/styles/index.css +2 -0
- package/dist/server/styles/layout.css +20 -4
- package/dist/server/styles/scale.css +2 -0
- package/dist/server/styles/scrollbar.css +3 -1
- package/dist/server/styles/tokens.css +2 -0
- package/dist/server/vite-env.d.ts +2 -0
- package/llms.txt +5 -0
- 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",
|
|
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",
|
|
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
|
-
|
|
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
|
-
|
|
1100
|
-
|
|
1105
|
+
ComponentPartsBoundary($$anchor, {
|
|
1106
|
+
children: ($$anchor, $$slotProps) => {
|
|
1107
|
+
var fragment_4 = $.comment();
|
|
1108
|
+
var node_2 = $.first_child(fragment_4);
|
|
1101
1109
|
|
|
1102
|
-
|
|
1103
|
-
|
|
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
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
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
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
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
|
|
1227
|
-
var node_11 = $.first_child(
|
|
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,
|
|
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
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
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
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
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
|
-
|
|
426
|
-
|
|
430
|
+
ComponentPartsBoundary($$anchor, {
|
|
431
|
+
children: ($$anchor, $$slotProps) => {
|
|
432
|
+
var fragment_13 = $.comment();
|
|
433
|
+
var node_11 = $.first_child(fragment_13);
|
|
427
434
|
|
|
428
|
-
|
|
429
|
-
|
|
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
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
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
|
|
460
|
-
var node_15 = $.first_child(
|
|
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,
|
|
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
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
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
|
|
490
|
-
var node_18 = $.first_child(
|
|
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,
|
|
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
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
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
|
|
912
|
-
var node_20 = $.first_child(
|
|
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,
|
|
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
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
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
|
|
394
|
-
var node_2 = $.first_child(
|
|
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
|
|
409
|
-
var node_3 = $.first_child(
|
|
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
|
|
415
|
-
var node_4 = $.first_child(
|
|
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
|
|
420
|
-
var node_5 = $.first_child(
|
|
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,
|
|
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,
|
|
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,
|
|
459
|
+
$.append($$anchor, fragment_6);
|
|
461
460
|
},
|
|
462
461
|
$$slots: { default: true }
|
|
463
|
-
});
|
|
462
|
+
}));
|
|
464
463
|
});
|
|
465
464
|
|
|
466
|
-
$.append($$anchor,
|
|
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
|
-
|
|
240
|
-
|
|
240
|
+
ComponentPartsBoundary($$anchor, {
|
|
241
|
+
children: ($$anchor, $$slotProps) => {
|
|
242
|
+
var fragment_8 = $.comment();
|
|
243
|
+
var node_4 = $.first_child(fragment_8);
|
|
241
244
|
|
|
242
|
-
|
|
243
|
-
|
|
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) => {
|