prime-ui-kit 0.20.1 → 0.21.0
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/README.md +1 -1
- package/dist/chunks/{chunk-4KONMO7Z.js → chunk-6L7VWEY6.js} +1 -1
- package/dist/chunks/{chunk-3PY52JP3.js → chunk-S27VR4ON.js} +5828 -5596
- package/dist/chunks/{chunk-4374EBWV.js → chunk-S4H2ZKWJ.js} +1049 -644
- package/dist/color-picker.js +2 -2
- package/dist/components/badge/Badge.d.ts +19 -2
- package/dist/components/card/Card.d.ts +10 -3
- package/dist/components/composer/Composer.d.ts +49 -1
- package/dist/components/crossfade/Crossfade.d.ts +6 -4
- package/dist/components/data-table/DataTable.d.ts +10 -2
- package/dist/components/data-table/Row.d.ts +12 -1
- package/dist/components/data-table/SelectionMenu.d.ts +20 -0
- package/dist/components/data-table/useRowSelection.d.ts +2 -0
- package/dist/components/empty-page/EmptyPage.d.ts +5 -2
- package/dist/components/hint/Hint.d.ts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/input/Input.d.ts +15 -3
- package/dist/components/message/Message.d.ts +6 -3
- package/dist/components/segmented-control/SegmentedControl.d.ts +5 -1
- package/dist/components/smart-filter/SmartFilter.d.ts +4 -0
- package/dist/components/spinner/Spinner.d.ts +3 -2
- package/dist/components/tabs/Tabs.d.ts +10 -1
- package/dist/hooks/useModalLayer.d.ts +15 -8
- package/dist/index.css +1 -1
- package/dist/index.js +2 -2
- package/dist/internal/RegionSwap.d.ts +18 -10
- package/dist/internal/RollingNumber.d.ts +7 -5
- package/dist/internal/ToolRow.d.ts +6 -0
- package/dist/internal/mediaSlot.d.ts +29 -0
- package/dist/internal/overlay/DialogParts.d.ts +30 -6
- package/dist/internal/overlay/focus.d.ts +18 -3
- package/dist/internal/partPresence.d.ts +19 -2
- package/dist/layout/sidebar/Sidebar.d.ts +3 -2
- package/dist/skill/anti-slop.md +35 -37
- package/dist/skill/api-contract.md +50 -2
- package/dist/skill/cheatsheet.md +15 -10
- package/dist/skill/checklist.md +19 -6
- package/dist/skill/choosing.md +79 -6
- package/dist/skill/components.md +1 -1
- package/dist/skill/composition.md +211 -51
- package/dist/skill/foundations.md +17 -6
- package/dist/skill/layouts.md +64 -14
- package/dist/skill/motion.md +9 -3
- package/dist/skill/reference/components/avatar/COMPONENT.md +1 -0
- package/dist/skill/reference/components/badge/COMPONENT.md +29 -5
- package/dist/skill/reference/components/badge/examples/examples.module.css +14 -0
- package/dist/skill/reference/components/badge/examples/overflow-count.tsx +32 -0
- package/dist/skill/reference/components/banner/COMPONENT.md +1 -1
- package/dist/skill/reference/components/card/COMPONENT.md +8 -4
- package/dist/skill/reference/components/card/examples/person-header.tsx +38 -0
- package/dist/skill/reference/components/composer/COMPONENT.md +35 -5
- package/dist/skill/reference/components/composer/examples/bot-keyboard.tsx +43 -0
- package/dist/skill/reference/components/confirm-dialog/COMPONENT.md +1 -1
- package/dist/skill/reference/components/crossfade/COMPONENT.md +18 -10
- package/dist/skill/reference/components/data-table/COMPONENT.md +17 -11
- package/dist/skill/reference/components/data-table/examples/screen.tsx +6 -9
- package/dist/skill/reference/components/data-table/examples/selection.tsx +60 -18
- package/dist/skill/reference/components/drawer/COMPONENT.md +41 -19
- package/dist/skill/reference/components/drawer/examples/footer-actions.tsx +54 -0
- package/dist/skill/reference/components/drawer/examples/header-actions.tsx +46 -25
- package/dist/skill/reference/components/drawer/examples/link-loading.tsx +57 -0
- package/dist/skill/reference/components/drawer/examples/screen.tsx +3 -5
- package/dist/skill/reference/components/empty-page/COMPONENT.md +2 -2
- package/dist/skill/reference/components/field-list/COMPONENT.md +4 -4
- package/dist/skill/reference/components/field-list/examples/row-menu.tsx +1 -1
- package/dist/skill/reference/components/hint/COMPONENT.md +1 -1
- package/dist/skill/reference/components/input/COMPONENT.md +16 -3
- package/dist/skill/reference/components/input/examples/password-policy.tsx +65 -0
- package/dist/skill/reference/components/list/COMPONENT.md +1 -1
- package/dist/skill/reference/components/login-form/COMPONENT.md +13 -11
- package/dist/skill/reference/components/login-form/examples/overview.tsx +5 -5
- package/dist/skill/reference/components/login-form/examples/states.tsx +7 -6
- package/dist/skill/reference/components/message/COMPONENT.md +5 -5
- package/dist/skill/reference/components/message/examples/bot-actions.tsx +47 -28
- package/dist/skill/reference/components/modal/COMPONENT.md +31 -12
- package/dist/skill/reference/components/modal/examples/structure.tsx +2 -4
- package/dist/skill/reference/components/segmented-control/COMPONENT.md +11 -6
- package/dist/skill/reference/components/segmented-control/examples/router.tsx +22 -0
- package/dist/skill/reference/components/select/COMPONENT.md +4 -1
- package/dist/skill/reference/components/sheet/COMPONENT.md +31 -12
- package/dist/skill/reference/components/sheet/examples/header-actions.tsx +5 -3
- package/dist/skill/reference/components/skeleton/COMPONENT.md +3 -2
- package/dist/skill/reference/components/smart-filter/COMPONENT.md +2 -1
- package/dist/skill/reference/components/smart-filter/examples/ranges.tsx +8 -2
- package/dist/skill/reference/components/spinner/COMPONENT.md +1 -1
- package/dist/skill/reference/components/tabs/COMPONENT.md +7 -4
- package/dist/skill/reference/components/tabs/examples/in-drawer.tsx +18 -2
- package/dist/skill/reference/components/thumbnail/COMPONENT.md +1 -0
- package/dist/skill/reference/components/tooltip/COMPONENT.md +3 -3
- package/dist/skill/reference/foundation.md +15 -9
- package/dist/skill/reference/layout/page/COMPONENT.md +1 -0
- package/dist/skill/reference/layout/sidebar/COMPONENT.md +4 -2
- package/dist/skill/reference/layout/sidebar/examples/account-profile.tsx +66 -0
- package/dist/skill/responsive.md +28 -6
- package/dist/skill/ux.md +97 -2
- package/dist/tokens/semantic.d.ts +2 -1
- package/dist/tokens/themes/dark.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/avatar/COMPONENT.md +1 -0
- package/src/components/badge/COMPONENT.md +29 -5
- package/src/components/badge/examples/examples.module.css +14 -0
- package/src/components/badge/examples/overflow-count.tsx +32 -0
- package/src/components/banner/COMPONENT.md +1 -1
- package/src/components/card/COMPONENT.md +8 -4
- package/src/components/card/examples/person-header.tsx +38 -0
- package/src/components/composer/COMPONENT.md +35 -5
- package/src/components/composer/examples/bot-keyboard.tsx +43 -0
- package/src/components/confirm-dialog/COMPONENT.md +1 -1
- package/src/components/crossfade/COMPONENT.md +18 -10
- package/src/components/data-table/COMPONENT.md +17 -11
- package/src/components/data-table/examples/screen.tsx +6 -9
- package/src/components/data-table/examples/selection.tsx +60 -18
- package/src/components/drawer/COMPONENT.md +41 -19
- package/src/components/drawer/examples/footer-actions.tsx +54 -0
- package/src/components/drawer/examples/header-actions.tsx +46 -25
- package/src/components/drawer/examples/link-loading.tsx +57 -0
- package/src/components/drawer/examples/screen.tsx +3 -5
- package/src/components/empty-page/COMPONENT.md +2 -2
- package/src/components/field-list/COMPONENT.md +4 -4
- package/src/components/field-list/examples/row-menu.tsx +1 -1
- package/src/components/hint/COMPONENT.md +1 -1
- package/src/components/input/COMPONENT.md +16 -3
- package/src/components/input/examples/password-policy.tsx +65 -0
- package/src/components/list/COMPONENT.md +1 -1
- package/src/components/login-form/COMPONENT.md +13 -11
- package/src/components/login-form/examples/overview.tsx +5 -5
- package/src/components/login-form/examples/states.tsx +7 -6
- package/src/components/message/COMPONENT.md +5 -5
- package/src/components/message/examples/bot-actions.tsx +47 -28
- package/src/components/modal/COMPONENT.md +31 -12
- package/src/components/modal/examples/structure.tsx +2 -4
- package/src/components/segmented-control/COMPONENT.md +11 -6
- package/src/components/segmented-control/examples/router.tsx +22 -0
- package/src/components/select/COMPONENT.md +4 -1
- package/src/components/sheet/COMPONENT.md +31 -12
- package/src/components/sheet/examples/header-actions.tsx +5 -3
- package/src/components/skeleton/COMPONENT.md +3 -2
- package/src/components/smart-filter/COMPONENT.md +2 -1
- package/src/components/smart-filter/examples/ranges.tsx +8 -2
- package/src/components/spinner/COMPONENT.md +1 -1
- package/src/components/tabs/COMPONENT.md +7 -4
- package/src/components/tabs/examples/in-drawer.tsx +18 -2
- package/src/components/thumbnail/COMPONENT.md +1 -0
- package/src/components/tooltip/COMPONENT.md +3 -3
- package/src/layout/page/COMPONENT.md +1 -0
- package/src/layout/sidebar/COMPONENT.md +4 -2
- package/src/layout/sidebar/examples/account-profile.tsx +66 -0
- package/src/styles/theme-dark.css +1 -0
- package/src/styles/theme-light.css +1 -0
|
@@ -144,6 +144,7 @@ import {
|
|
|
144
144
|
useCreateStore,
|
|
145
145
|
useEdgeOverflow,
|
|
146
146
|
useElementSize,
|
|
147
|
+
useEnterOnAppear,
|
|
147
148
|
useFieldCell,
|
|
148
149
|
useFieldCommit,
|
|
149
150
|
useFieldFrame,
|
|
@@ -159,6 +160,7 @@ import {
|
|
|
159
160
|
useLoadMore,
|
|
160
161
|
useMediaQuery,
|
|
161
162
|
useMediaSession,
|
|
163
|
+
useMediaSlotHost,
|
|
162
164
|
useMergedRefs,
|
|
163
165
|
useNestedSurfaceDepth,
|
|
164
166
|
useOpenState,
|
|
@@ -181,7 +183,7 @@ import {
|
|
|
181
183
|
useTextParts,
|
|
182
184
|
visuallyHiddenClass,
|
|
183
185
|
zonedParts
|
|
184
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-S27VR4ON.js";
|
|
185
187
|
import {
|
|
186
188
|
COMPACT_QUERY,
|
|
187
189
|
ControlSizeProvider,
|
|
@@ -1263,7 +1265,8 @@ function BannerRoot({
|
|
|
1263
1265
|
...rest
|
|
1264
1266
|
}) {
|
|
1265
1267
|
const rootRef = React6.useRef(null);
|
|
1266
|
-
const
|
|
1268
|
+
const appear = useEnterOnAppear();
|
|
1269
|
+
const mergedRef = useMergedRefs(rootRef, appear.ref, ref);
|
|
1267
1270
|
const tier = useHostTier(sizeProp);
|
|
1268
1271
|
const size = tier.size;
|
|
1269
1272
|
React6.useLayoutEffect(() => {
|
|
@@ -1286,7 +1289,7 @@ function BannerRoot({
|
|
|
1286
1289
|
{
|
|
1287
1290
|
...rest,
|
|
1288
1291
|
ref: mergedRef,
|
|
1289
|
-
className: cx(fieldTierClass, Banner_default.root, enterMotion_default.enter, className),
|
|
1292
|
+
className: cx(fieldTierClass, Banner_default.root, appear.entering && enterMotion_default.enter, className),
|
|
1290
1293
|
"data-depth": depth,
|
|
1291
1294
|
...toDataAttributes({ variant, tone, size, placement }),
|
|
1292
1295
|
children: /* @__PURE__ */ jsx8(SurfaceDepthProvider, { value: depth, children: /* @__PURE__ */ jsx8(BannerContext.Provider, { value: context, children: tier.provide(
|
|
@@ -1402,7 +1405,8 @@ function useModalLayer({
|
|
|
1402
1405
|
open,
|
|
1403
1406
|
closeOnEscape,
|
|
1404
1407
|
closeOnOutsideClick,
|
|
1405
|
-
onDismiss
|
|
1408
|
+
onDismiss,
|
|
1409
|
+
focusStart = "tabStop"
|
|
1406
1410
|
}) {
|
|
1407
1411
|
const ref = React8.useRef(null);
|
|
1408
1412
|
const openerRef = React8.useRef({ element: null, target: null, byPointer: false });
|
|
@@ -1411,11 +1415,13 @@ function useModalLayer({
|
|
|
1411
1415
|
wasOpenRef.current = open;
|
|
1412
1416
|
if (open) openerRef.current = captureOpener();
|
|
1413
1417
|
}
|
|
1418
|
+
const focusStartRef = React8.useRef(focusStart);
|
|
1419
|
+
focusStartRef.current = focusStart;
|
|
1414
1420
|
useInertSiblings(open, ref);
|
|
1415
1421
|
React8.useEffect(() => {
|
|
1416
1422
|
const node = ref.current;
|
|
1417
1423
|
if (!open || !node) return;
|
|
1418
|
-
focusInto(node);
|
|
1424
|
+
focusInto(node, void 0, openerRef.current.byPointer, focusStartRef.current);
|
|
1419
1425
|
return () => {
|
|
1420
1426
|
const { element: opener, byPointer } = openerRef.current;
|
|
1421
1427
|
if (opener?.closest("[inert]")) queueMicrotask(() => focusBack(opener, byPointer));
|
|
@@ -1452,6 +1458,7 @@ var DialogParts_default = {
|
|
|
1452
1458
|
close: "DialogParts_close",
|
|
1453
1459
|
title: "DialogParts_title",
|
|
1454
1460
|
description: "DialogParts_description",
|
|
1461
|
+
titleSkeleton: "DialogParts_titleSkeleton",
|
|
1455
1462
|
descriptionSkeleton: "DialogParts_descriptionSkeleton",
|
|
1456
1463
|
body: "DialogParts_body",
|
|
1457
1464
|
section: "DialogParts_section",
|
|
@@ -1461,6 +1468,7 @@ var DialogParts_default = {
|
|
|
1461
1468
|
sectionDescription: "DialogParts_sectionDescription",
|
|
1462
1469
|
footer: "DialogParts_footer",
|
|
1463
1470
|
meta: "DialogParts_meta",
|
|
1471
|
+
footerStart: "DialogParts_footerStart",
|
|
1464
1472
|
footerActions: "DialogParts_footerActions"
|
|
1465
1473
|
};
|
|
1466
1474
|
|
|
@@ -1561,6 +1569,7 @@ function DialogPanelBody({
|
|
|
1561
1569
|
overlayClassName,
|
|
1562
1570
|
enterConfirm = false,
|
|
1563
1571
|
controlSize,
|
|
1572
|
+
focusStart,
|
|
1564
1573
|
className,
|
|
1565
1574
|
children,
|
|
1566
1575
|
"aria-label": ariaLabel,
|
|
@@ -1579,7 +1588,8 @@ function DialogPanelBody({
|
|
|
1579
1588
|
open: root.open,
|
|
1580
1589
|
closeOnEscape: root.closeOnEscape,
|
|
1581
1590
|
closeOnOutsideClick: root.closeOnOutsideClick,
|
|
1582
|
-
onDismiss: root.requestClose
|
|
1591
|
+
onDismiss: root.requestClose,
|
|
1592
|
+
focusStart
|
|
1583
1593
|
});
|
|
1584
1594
|
const panelRef = useMergedRefs(layerRef, ref);
|
|
1585
1595
|
const compact = useMediaQuery(COMPACT_QUERY, swipePolicy === "compact");
|
|
@@ -1606,7 +1616,7 @@ function DialogPanelBody({
|
|
|
1606
1616
|
onEnterConfirm: root.onEnterConfirm,
|
|
1607
1617
|
confirmRef
|
|
1608
1618
|
});
|
|
1609
|
-
const content = /* @__PURE__ */ jsx9(DialogShellProvider, { value: shell.value, children: /* @__PURE__ */ jsx9(LayerProvider, { value: layer, children: /* @__PURE__ */ jsx9(SurfaceDepthProvider, { value: "floating", children }) }) });
|
|
1619
|
+
const content = /* @__PURE__ */ jsx9(DialogShellProvider, { value: shell.value, children: /* @__PURE__ */ jsx9(LayerProvider, { value: layer, children: /* @__PURE__ */ jsx9(DialogFooterContext.Provider, { value: false, children: /* @__PURE__ */ jsx9(SurfaceDepthProvider, { value: "floating", children }) }) }) });
|
|
1610
1620
|
return /* @__PURE__ */ jsxs6("div", { className: DialogParts_default.root, children: [
|
|
1611
1621
|
/* @__PURE__ */ jsx9(
|
|
1612
1622
|
"div",
|
|
@@ -1704,15 +1714,8 @@ function DialogShellProvider({
|
|
|
1704
1714
|
}) {
|
|
1705
1715
|
return /* @__PURE__ */ jsx9(DialogShellContext.Provider, { value, children });
|
|
1706
1716
|
}
|
|
1707
|
-
function mediaOf(children) {
|
|
1708
|
-
if (!React9.isValidElement(children)) return null;
|
|
1709
|
-
if (children.type === Avatar.Root) {
|
|
1710
|
-
return React9.cloneElement(children, { size: "l" });
|
|
1711
|
-
}
|
|
1712
|
-
return children.type === Thumbnail.Root ? children : null;
|
|
1713
|
-
}
|
|
1714
1717
|
function DialogIcon({ tone = "neutral", children, className, ...rest }) {
|
|
1715
|
-
const media =
|
|
1718
|
+
const { media, provide } = useMediaSlotHost();
|
|
1716
1719
|
return /* @__PURE__ */ jsx9(
|
|
1717
1720
|
"span",
|
|
1718
1721
|
{
|
|
@@ -1721,18 +1724,29 @@ function DialogIcon({ tone = "neutral", children, className, ...rest }) {
|
|
|
1721
1724
|
"data-tone": media ? void 0 : tone,
|
|
1722
1725
|
"data-media": media ? true : void 0,
|
|
1723
1726
|
"aria-hidden": "true",
|
|
1724
|
-
children:
|
|
1727
|
+
children: provide(children)
|
|
1725
1728
|
}
|
|
1726
1729
|
);
|
|
1727
1730
|
}
|
|
1728
1731
|
DialogIcon.displayName = "Dialog.Icon";
|
|
1729
|
-
function DialogTitle({ className, ...rest }) {
|
|
1732
|
+
function DialogTitle({ loading = false, className, children, ...rest }) {
|
|
1730
1733
|
const { titleId, registerTitle } = useDialogShell("Title");
|
|
1734
|
+
const swap = useSwapIn(loading ? "loading" : "data");
|
|
1731
1735
|
React9.useLayoutEffect(() => {
|
|
1732
1736
|
registerTitle(true);
|
|
1733
1737
|
return () => registerTitle(false);
|
|
1734
1738
|
}, [registerTitle]);
|
|
1735
|
-
return /* @__PURE__ */
|
|
1739
|
+
return /* @__PURE__ */ createElement(
|
|
1740
|
+
"h2",
|
|
1741
|
+
{
|
|
1742
|
+
...rest,
|
|
1743
|
+
key: swap.key,
|
|
1744
|
+
id: titleId,
|
|
1745
|
+
"aria-busy": loading || void 0,
|
|
1746
|
+
className: cx(textRole_default.titleM, DialogParts_default.title, swap.className, className)
|
|
1747
|
+
},
|
|
1748
|
+
loading ? /* @__PURE__ */ jsx9(Skeleton, { size: "l", className: DialogParts_default.titleSkeleton }) : children
|
|
1749
|
+
);
|
|
1736
1750
|
}
|
|
1737
1751
|
DialogTitle.displayName = "Dialog.Title";
|
|
1738
1752
|
function DialogDescription({
|
|
@@ -1756,7 +1770,7 @@ function DialogDescription({
|
|
|
1756
1770
|
"aria-busy": loading || void 0,
|
|
1757
1771
|
className: cx(textRole_default.bodyS, DialogParts_default.description, swap.className, className)
|
|
1758
1772
|
},
|
|
1759
|
-
loading ? /* @__PURE__ */ jsx9(Skeleton, { size: "xs", className: DialogParts_default.descriptionSkeleton }) : children
|
|
1773
|
+
loading ? /* @__PURE__ */ jsx9(Skeleton, { size: "xs", className: DialogParts_default.descriptionSkeleton }) : /* @__PURE__ */ jsx9(ControlSizeProvider, { value: "m", children })
|
|
1760
1774
|
);
|
|
1761
1775
|
}
|
|
1762
1776
|
DialogDescription.displayName = "Dialog.Description";
|
|
@@ -1808,8 +1822,13 @@ function DialogHeader({
|
|
|
1808
1822
|
);
|
|
1809
1823
|
}
|
|
1810
1824
|
DialogHeader.displayName = "Dialog.Header";
|
|
1825
|
+
var DialogFooterContext = React9.createContext(false);
|
|
1811
1826
|
function DialogActions({ className, children, ...rest }) {
|
|
1812
1827
|
useDialogShell("Actions");
|
|
1828
|
+
const inFooter = React9.useContext(DialogFooterContext);
|
|
1829
|
+
if (inFooter) {
|
|
1830
|
+
return /* @__PURE__ */ jsx9("div", { className: cx(DialogParts_default.footerStart, className), ...rest, children });
|
|
1831
|
+
}
|
|
1813
1832
|
return /* @__PURE__ */ jsx9("div", { className: cx(fieldTierClass, DialogParts_default.actions, className), "data-size": "s", ...rest, children: /* @__PURE__ */ jsx9(ControlSizeProvider, { value: "s", children }) });
|
|
1814
1833
|
}
|
|
1815
1834
|
DialogActions.displayName = "Dialog.Actions";
|
|
@@ -1862,17 +1881,19 @@ function DialogSection({
|
|
|
1862
1881
|
DialogSection.displayName = "Dialog.Section";
|
|
1863
1882
|
function DialogFooter({ layout, className, children, ...rest }) {
|
|
1864
1883
|
const { footerLayout } = useDialogShell("Footer");
|
|
1865
|
-
const { parts:
|
|
1884
|
+
const { parts: start, rest: other } = splitParts(children, DialogActions);
|
|
1885
|
+
const { parts: meta, rest: actions } = splitParts(other, DialogMeta);
|
|
1866
1886
|
return /* @__PURE__ */ jsx9(
|
|
1867
1887
|
"footer",
|
|
1868
1888
|
{
|
|
1869
1889
|
className: cx(hairline_default.top, DialogParts_default.footer, className),
|
|
1870
1890
|
"data-layout": layout ?? footerLayout,
|
|
1871
1891
|
...rest,
|
|
1872
|
-
children: meta.length > 0 ? /* @__PURE__ */ jsxs6(Fragment4, { children: [
|
|
1892
|
+
children: /* @__PURE__ */ jsx9(DialogFooterContext.Provider, { value: true, children: start.length + meta.length > 0 ? /* @__PURE__ */ jsxs6(Fragment4, { children: [
|
|
1893
|
+
start,
|
|
1873
1894
|
meta,
|
|
1874
1895
|
/* @__PURE__ */ jsx9("div", { className: DialogParts_default.footerActions, children: actions })
|
|
1875
|
-
] }) : children
|
|
1896
|
+
] }) : children })
|
|
1876
1897
|
}
|
|
1877
1898
|
);
|
|
1878
1899
|
}
|
|
@@ -2021,10 +2042,15 @@ var ConfirmDialog = {
|
|
|
2021
2042
|
Trigger: ConfirmDialogTrigger
|
|
2022
2043
|
};
|
|
2023
2044
|
|
|
2045
|
+
// src/components/crossfade/Crossfade.module.css
|
|
2046
|
+
var Crossfade_default = {
|
|
2047
|
+
root: "Crossfade_root"
|
|
2048
|
+
};
|
|
2049
|
+
|
|
2024
2050
|
// src/components/crossfade/Crossfade.tsx
|
|
2025
2051
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
2026
|
-
function Crossfade(props) {
|
|
2027
|
-
return /* @__PURE__ */ jsx12(RegionSwap, { ...props });
|
|
2052
|
+
function Crossfade({ className, ...props }) {
|
|
2053
|
+
return /* @__PURE__ */ jsx12(RegionSwap, { ...props, className: cx(Crossfade_default.root, className) });
|
|
2028
2054
|
}
|
|
2029
2055
|
|
|
2030
2056
|
// src/internal/barPlan.ts
|
|
@@ -3107,8 +3133,9 @@ var SegmentedControl_default = {
|
|
|
3107
3133
|
import { Fragment as Fragment6, jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3108
3134
|
var [SegmentedControlProvider, useSegmentedControlContext] = createComponentContext("SegmentedControl");
|
|
3109
3135
|
var CollapseContext = React13.createContext("full");
|
|
3136
|
+
var ITEM = `.${SegmentedControl_default.item}`;
|
|
3110
3137
|
var ENABLED_ITEM2 = '[role="radio"]:not([data-disabled="true"])';
|
|
3111
|
-
var CHECKED_ITEM =
|
|
3138
|
+
var CHECKED_ITEM = `${ITEM}[data-state="checked"]`;
|
|
3112
3139
|
function syncThumbColor(thumb, active) {
|
|
3113
3140
|
const color = active?.dataset.color;
|
|
3114
3141
|
if (color === thumb.dataset.color) return;
|
|
@@ -3118,11 +3145,11 @@ function syncThumbColor(thumb, active) {
|
|
|
3118
3145
|
function fitCollapse(viewport2, list) {
|
|
3119
3146
|
const fits = (level2) => {
|
|
3120
3147
|
list.dataset.collapse = level2;
|
|
3121
|
-
return
|
|
3148
|
+
return viewport2.scrollWidth <= viewport2.clientWidth + 1;
|
|
3122
3149
|
};
|
|
3123
3150
|
if (fits("full") || fits("compact")) return list.dataset.collapse;
|
|
3124
|
-
const items = list.querySelectorAll(
|
|
3125
|
-
const icons = list.querySelectorAll(
|
|
3151
|
+
const items = list.querySelectorAll(ITEM);
|
|
3152
|
+
const icons = list.querySelectorAll(`${ITEM} > .${SegmentedControl_default.icon}`);
|
|
3126
3153
|
const level = items.length > 0 && icons.length === items.length ? "icon" : "compact";
|
|
3127
3154
|
list.dataset.collapse = level;
|
|
3128
3155
|
return level;
|
|
@@ -3172,6 +3199,7 @@ function SegmentedControlRoot({
|
|
|
3172
3199
|
const size = tier.size;
|
|
3173
3200
|
const disabled = useInheritedDisabled(disabledProp);
|
|
3174
3201
|
const ids = useFieldFrame(id, { label, hint, error, invalid }, ariaDescribedBy);
|
|
3202
|
+
const links = hasLinkItems(children);
|
|
3175
3203
|
const [selectedValue, setSelectedValue] = useControllableState({
|
|
3176
3204
|
value,
|
|
3177
3205
|
defaultValue,
|
|
@@ -3233,6 +3261,7 @@ function SegmentedControlRoot({
|
|
|
3233
3261
|
);
|
|
3234
3262
|
function handleKeyDown(event) {
|
|
3235
3263
|
onKeyDown?.(event);
|
|
3264
|
+
if (links) return;
|
|
3236
3265
|
const items = Array.from(event.currentTarget.querySelectorAll(ENABLED_ITEM2));
|
|
3237
3266
|
const index = items.indexOf(document.activeElement);
|
|
3238
3267
|
const next = rovingIndex(event.key, index, items.length, "both");
|
|
@@ -3273,13 +3302,13 @@ function SegmentedControlRoot({
|
|
|
3273
3302
|
"div",
|
|
3274
3303
|
{
|
|
3275
3304
|
id: ids.controlId,
|
|
3276
|
-
role: "radiogroup",
|
|
3305
|
+
role: links ? "navigation" : "radiogroup",
|
|
3277
3306
|
"aria-label": ariaLabel,
|
|
3278
3307
|
"aria-labelledby": ariaLabelledBy ?? ids.labelledBy,
|
|
3279
3308
|
"aria-describedby": ids.describedBy,
|
|
3280
|
-
"aria-invalid": ids.invalid || void 0,
|
|
3281
|
-
"aria-required": required || void 0,
|
|
3282
|
-
"aria-disabled": disabled || void 0,
|
|
3309
|
+
"aria-invalid": !links && ids.invalid || void 0,
|
|
3310
|
+
"aria-required": !links && required || void 0,
|
|
3311
|
+
"aria-disabled": !links && disabled || void 0,
|
|
3283
3312
|
className: cx(fieldTierClass, SegmentedControl_default.root),
|
|
3284
3313
|
onKeyDown: handleKeyDown,
|
|
3285
3314
|
...toDataAttributes({
|
|
@@ -3330,6 +3359,11 @@ function SegmentedControlRoot({
|
|
|
3330
3359
|
) });
|
|
3331
3360
|
}
|
|
3332
3361
|
SegmentedControlRoot.displayName = "SegmentedControl.Root";
|
|
3362
|
+
function hasLinkItems(children) {
|
|
3363
|
+
return React13.Children.toArray(children).some(
|
|
3364
|
+
(child) => React13.isValidElement(child) && child.type === SegmentedControlItem && child.props.asChild === true
|
|
3365
|
+
);
|
|
3366
|
+
}
|
|
3333
3367
|
function isIconOnly(children) {
|
|
3334
3368
|
const nodes = React13.Children.toArray(children);
|
|
3335
3369
|
return nodes.length > 0 && nodes.every((node) => React13.isValidElement(node) && node.type === SegmentedControlIcon);
|
|
@@ -3352,6 +3386,7 @@ function SegmentedControlItem({
|
|
|
3352
3386
|
value,
|
|
3353
3387
|
disabled = false,
|
|
3354
3388
|
color,
|
|
3389
|
+
asChild = false,
|
|
3355
3390
|
children,
|
|
3356
3391
|
className,
|
|
3357
3392
|
onClick,
|
|
@@ -3361,43 +3396,63 @@ function SegmentedControlItem({
|
|
|
3361
3396
|
const ctx = useSegmentedControlContext();
|
|
3362
3397
|
const collapse = React13.useContext(CollapseContext);
|
|
3363
3398
|
const [tooltipOpen, setTooltipOpen] = React13.useState(false);
|
|
3399
|
+
const child = asChild ? slotChild(children, "SegmentedControl.Item") : null;
|
|
3400
|
+
const content = child ? child.props.children : children;
|
|
3364
3401
|
const isChecked = ctx.value === value;
|
|
3365
3402
|
const isDisabled = ctx.rootDisabled || disabled;
|
|
3366
3403
|
const isTabStop = !isDisabled && ctx.focusValue === value;
|
|
3367
|
-
const twoLine = hasChildOfType(
|
|
3404
|
+
const twoLine = hasChildOfType(content, SegmentedControlDescription);
|
|
3368
3405
|
const parts = useTextParts();
|
|
3369
|
-
const label = labelOf(
|
|
3370
|
-
const
|
|
3406
|
+
const label = labelOf(content);
|
|
3407
|
+
const shared = {
|
|
3408
|
+
"aria-labelledby": parts.labelledBy,
|
|
3409
|
+
"aria-describedby": parts.describedBy,
|
|
3410
|
+
...toDataAttributes({
|
|
3411
|
+
state: isChecked ? "checked" : "unchecked",
|
|
3412
|
+
disabled: isDisabled || void 0,
|
|
3413
|
+
"icon-only": isIconOnly(content) || void 0,
|
|
3414
|
+
"two-line": twoLine || void 0,
|
|
3415
|
+
value,
|
|
3416
|
+
color
|
|
3417
|
+
}),
|
|
3418
|
+
className: cx(palette_default.hue, SegmentedControl_default.item, touchTargetBlockClass, className),
|
|
3419
|
+
onClick: (event) => {
|
|
3420
|
+
onClick?.(event);
|
|
3421
|
+
if (!isDisabled && !event.defaultPrevented) ctx.onSelect(value);
|
|
3422
|
+
}
|
|
3423
|
+
};
|
|
3424
|
+
const inner2 = /* @__PURE__ */ jsxs10(Fragment6, { children: [
|
|
3425
|
+
color ? /* @__PURE__ */ jsx15(Badge.Dot, { className: SegmentedControl_default.dot }) : null,
|
|
3426
|
+
parts.provide(labelPlainText(content, SegmentedControlLabel))
|
|
3427
|
+
] });
|
|
3428
|
+
const segment = child ? (
|
|
3429
|
+
// A link segment: in the Tab order like any link, the current one `aria-current="page"`.
|
|
3430
|
+
/* @__PURE__ */ jsx15(
|
|
3431
|
+
InteractiveElement,
|
|
3432
|
+
{
|
|
3433
|
+
...rest,
|
|
3434
|
+
...shared,
|
|
3435
|
+
ref,
|
|
3436
|
+
element: "slot",
|
|
3437
|
+
disabled: isDisabled,
|
|
3438
|
+
"aria-current": isChecked ? "page" : void 0,
|
|
3439
|
+
children: React13.cloneElement(child, void 0, inner2)
|
|
3440
|
+
}
|
|
3441
|
+
)
|
|
3442
|
+
) : (
|
|
3371
3443
|
// biome-ignore lint/a11y/useSemanticElements: radiogroup of buttons with roving tabindex (WAI-ARIA APG)
|
|
3372
|
-
/* @__PURE__ */
|
|
3444
|
+
/* @__PURE__ */ jsx15(
|
|
3373
3445
|
"button",
|
|
3374
3446
|
{
|
|
3375
3447
|
...rest,
|
|
3448
|
+
...shared,
|
|
3376
3449
|
ref,
|
|
3377
3450
|
role: "radio",
|
|
3378
3451
|
type: "button",
|
|
3379
3452
|
"aria-checked": isChecked,
|
|
3380
|
-
"aria-labelledby": parts.labelledBy,
|
|
3381
|
-
"aria-describedby": parts.describedBy,
|
|
3382
|
-
...toDataAttributes({
|
|
3383
|
-
state: isChecked ? "checked" : "unchecked",
|
|
3384
|
-
disabled: isDisabled || void 0,
|
|
3385
|
-
"icon-only": isIconOnly(children) || void 0,
|
|
3386
|
-
"two-line": twoLine || void 0,
|
|
3387
|
-
value,
|
|
3388
|
-
color
|
|
3389
|
-
}),
|
|
3390
3453
|
tabIndex: isTabStop ? 0 : -1,
|
|
3391
3454
|
disabled: isDisabled,
|
|
3392
|
-
|
|
3393
|
-
onClick: (event) => {
|
|
3394
|
-
onClick?.(event);
|
|
3395
|
-
if (!isDisabled && !event.defaultPrevented) ctx.onSelect(value);
|
|
3396
|
-
},
|
|
3397
|
-
children: [
|
|
3398
|
-
color ? /* @__PURE__ */ jsx15(Badge.Dot, { className: SegmentedControl_default.dot }) : null,
|
|
3399
|
-
parts.provide(labelPlainText(children, SegmentedControlLabel))
|
|
3400
|
-
]
|
|
3455
|
+
children: inner2
|
|
3401
3456
|
}
|
|
3402
3457
|
)
|
|
3403
3458
|
);
|
|
@@ -3643,6 +3698,7 @@ var NUMBER = new Intl.NumberFormat("ru-RU");
|
|
|
3643
3698
|
function rangeText(field, range, labels) {
|
|
3644
3699
|
if (field.kind === "date-range") {
|
|
3645
3700
|
return formatDatepickerValue({
|
|
3701
|
+
...field.calendar,
|
|
3646
3702
|
mode: "range",
|
|
3647
3703
|
value: {
|
|
3648
3704
|
from: range.from instanceof Date ? range.from : null,
|
|
@@ -3867,6 +3923,7 @@ function Panel({ searchable }) {
|
|
|
3867
3923
|
) : /* @__PURE__ */ jsx17(
|
|
3868
3924
|
Datepicker.Root,
|
|
3869
3925
|
{
|
|
3926
|
+
...field.calendar,
|
|
3870
3927
|
mode: "range",
|
|
3871
3928
|
size,
|
|
3872
3929
|
fullWidth: true,
|
|
@@ -4156,6 +4213,9 @@ import { jsx as jsx18 } from "react/jsx-runtime";
|
|
|
4156
4213
|
function ToolGroup({ className, ...rest }) {
|
|
4157
4214
|
return /* @__PURE__ */ jsx18("div", { ...rest, className: cx(ToolRow_default.group, className) });
|
|
4158
4215
|
}
|
|
4216
|
+
function ToolCell({ className, ...rest }) {
|
|
4217
|
+
return /* @__PURE__ */ jsx18("div", { ...rest, className: cx(ToolRow_default.cell, className), "data-kind": "fixed" });
|
|
4218
|
+
}
|
|
4159
4219
|
function kindOf(node) {
|
|
4160
4220
|
if (isPart(node, SmartFilter.Toolbar) || isPart(node, Input.Root) || isPart(node, Typography) || isPart(node, ToolGroup)) {
|
|
4161
4221
|
return "grow";
|
|
@@ -4171,7 +4231,9 @@ function filled(node) {
|
|
|
4171
4231
|
}
|
|
4172
4232
|
var keyOf = (node, index) => React15.isValidElement(node) && node.key != null ? String(node.key) : `#${index}`;
|
|
4173
4233
|
function ToolRow({ fill = true, className, children, ...rest }) {
|
|
4174
|
-
return /* @__PURE__ */ jsx18("div", { ...rest, className: cx(ToolRow_default.row, className), "data-fill": fill ? "true" : void 0, children: flattenChildren(children).map(
|
|
4234
|
+
return /* @__PURE__ */ jsx18("div", { ...rest, className: cx(ToolRow_default.row, className), "data-fill": fill ? "true" : void 0, children: flattenChildren(children).map(
|
|
4235
|
+
(item, index) => isPart(item, ToolCell) ? React15.cloneElement(item, { key: keyOf(item, index) }) : /* @__PURE__ */ jsx18("div", { className: ToolRow_default.cell, "data-kind": kindOf(item), children: filled(item) }, keyOf(item, index))
|
|
4236
|
+
) });
|
|
4175
4237
|
}
|
|
4176
4238
|
function ToolChips({ className, ...rest }) {
|
|
4177
4239
|
return /* @__PURE__ */ jsx18("div", { ...rest, className: cx(ToolRow_default.chips, className) });
|
|
@@ -6092,6 +6154,8 @@ function SidebarBrand({
|
|
|
6092
6154
|
SidebarBrand.displayName = "Sidebar.Brand";
|
|
6093
6155
|
function SidebarAccount({ description, className, children, type, ...rest }) {
|
|
6094
6156
|
const { size } = useSidebar();
|
|
6157
|
+
const popup = rest["aria-haspopup"];
|
|
6158
|
+
const opensMenu = popup === "menu" || popup === true || popup === "true";
|
|
6095
6159
|
const nodes = React19.Children.toArray(children);
|
|
6096
6160
|
const avatar = nodes.find((node) => isElementOf(node, Avatar.Root));
|
|
6097
6161
|
const name = nodes.filter((node) => node !== avatar);
|
|
@@ -6107,7 +6171,7 @@ function SidebarAccount({ description, className, children, type, ...rest }) {
|
|
|
6107
6171
|
/* @__PURE__ */ jsx22("span", { className: Sidebar_default.accountName, children: name }),
|
|
6108
6172
|
description == null ? null : /* @__PURE__ */ jsx22("span", { className: Sidebar_default.accountDescription, children: description })
|
|
6109
6173
|
] }),
|
|
6110
|
-
/* @__PURE__ */ jsx22(Icon, { name: "nav.chevronsUpDown", className: Sidebar_default.accountChevron })
|
|
6174
|
+
opensMenu ? /* @__PURE__ */ jsx22(Icon, { name: "nav.chevronsUpDown", className: Sidebar_default.accountChevron }) : null
|
|
6111
6175
|
]
|
|
6112
6176
|
}
|
|
6113
6177
|
) });
|
|
@@ -6508,8 +6572,8 @@ var Card_default = {
|
|
|
6508
6572
|
description: "Card_description",
|
|
6509
6573
|
label: "Card_label",
|
|
6510
6574
|
value: "Card_value",
|
|
6511
|
-
body: "Card_body",
|
|
6512
6575
|
icon: "Card_icon",
|
|
6576
|
+
body: "Card_body",
|
|
6513
6577
|
delta: "Card_delta",
|
|
6514
6578
|
meta: "Card_meta",
|
|
6515
6579
|
valueSkeleton: "Card_valueSkeleton",
|
|
@@ -6599,13 +6663,17 @@ function CardFooter({ className, ...rest }) {
|
|
|
6599
6663
|
return /* @__PURE__ */ jsx25("div", { className: cx(Card_default.footer, ruled && hairline_default.top, className), ...rest });
|
|
6600
6664
|
}
|
|
6601
6665
|
CardFooter.displayName = "Card.Footer";
|
|
6602
|
-
function CardIcon({ className, ...rest }) {
|
|
6666
|
+
function CardIcon({ className, children, ...rest }) {
|
|
6667
|
+
const { media, provide } = useMediaSlotHost();
|
|
6603
6668
|
return /* @__PURE__ */ jsx25(
|
|
6604
6669
|
"div",
|
|
6605
6670
|
{
|
|
6671
|
+
"aria-hidden": media ? true : void 0,
|
|
6606
6672
|
...rest,
|
|
6607
|
-
className: cx(iconBox_default.tile, iconSlotClass, Card_default.icon, className),
|
|
6608
|
-
"data-tone": "accent"
|
|
6673
|
+
className: cx(!media && iconBox_default.tile, !media && iconSlotClass, Card_default.icon, className),
|
|
6674
|
+
"data-tone": media ? void 0 : "accent",
|
|
6675
|
+
"data-media": media ? "true" : void 0,
|
|
6676
|
+
children: provide(children)
|
|
6609
6677
|
}
|
|
6610
6678
|
);
|
|
6611
6679
|
}
|
|
@@ -8183,6 +8251,7 @@ var Message_default = {
|
|
|
8183
8251
|
status: "Message_status",
|
|
8184
8252
|
tick: "Message_tick",
|
|
8185
8253
|
actions: "Message_actions",
|
|
8254
|
+
linkMark: "Message_linkMark",
|
|
8186
8255
|
reactionsSlot: "Message_reactionsSlot",
|
|
8187
8256
|
reactions: "Message_reactions",
|
|
8188
8257
|
chipSlot: "Message_chipSlot",
|
|
@@ -13199,7 +13268,7 @@ MessageTyping.displayName = "Message.Typing";
|
|
|
13199
13268
|
defineRowKind(MessageTyping, { tail: true });
|
|
13200
13269
|
|
|
13201
13270
|
// src/components/message/Message.tsx
|
|
13202
|
-
import { jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
13271
|
+
import { Fragment as Fragment22, jsx as jsx43, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
13203
13272
|
var STATUS_ICONS = [
|
|
13204
13273
|
["sending", "status.pending"],
|
|
13205
13274
|
["sent", "status.sent"],
|
|
@@ -13365,8 +13434,37 @@ function estimateOf(body, specs, shell, reactions, author, actionRows) {
|
|
|
13365
13434
|
return Math.round(size + (reactions ? 36 : 0) + actionRows * ACTIONS_ESTIMATE + 8);
|
|
13366
13435
|
}
|
|
13367
13436
|
var NO_REACTIONS = [];
|
|
13368
|
-
function
|
|
13369
|
-
|
|
13437
|
+
function isLinkKey(props) {
|
|
13438
|
+
const child = props.children;
|
|
13439
|
+
return props.asChild === true && React43.isValidElement(child) && child.type === "a" && child.props.href !== void 0;
|
|
13440
|
+
}
|
|
13441
|
+
function MessageActions({ className, children, ...rest }) {
|
|
13442
|
+
const { pending, track: track2 } = usePendingKeys();
|
|
13443
|
+
return /* @__PURE__ */ jsx43("div", { className: cx(Message_default.actions, className), ...rest, children: React43.Children.map(children, (child, index) => {
|
|
13444
|
+
if (!React43.isValidElement(child) || child.type !== Button.Root) {
|
|
13445
|
+
return child;
|
|
13446
|
+
}
|
|
13447
|
+
const { props } = child;
|
|
13448
|
+
const link = isLinkKey(props) ? React43.cloneElement(props.children, {
|
|
13449
|
+
children: /* @__PURE__ */ jsxs32(Fragment22, { children: [
|
|
13450
|
+
props.children.props.children,
|
|
13451
|
+
/* @__PURE__ */ jsx43(Icon, { name: "action.externalLink", size: "xs", className: Message_default.linkMark })
|
|
13452
|
+
] })
|
|
13453
|
+
}) : void 0;
|
|
13454
|
+
return React43.cloneElement(child, {
|
|
13455
|
+
variant: props.variant ?? "soft",
|
|
13456
|
+
tone: props.tone ?? "neutral",
|
|
13457
|
+
fullWidth: true,
|
|
13458
|
+
loading: props.loading || pending.has(index),
|
|
13459
|
+
onClick: (event) => {
|
|
13460
|
+
track2(
|
|
13461
|
+
index,
|
|
13462
|
+
props.onClick?.(event)
|
|
13463
|
+
);
|
|
13464
|
+
},
|
|
13465
|
+
...link ? { children: link } : null
|
|
13466
|
+
});
|
|
13467
|
+
}) });
|
|
13370
13468
|
}
|
|
13371
13469
|
MessageActions.displayName = "Message.Actions";
|
|
13372
13470
|
var ACTIONS_ESTIMATE = 40;
|
|
@@ -13434,6 +13532,7 @@ function MessageRoot({
|
|
|
13434
13532
|
const neutralDepth = useNestedSurfaceDepth();
|
|
13435
13533
|
const depth = direction === "outgoing" ? "tinted" : neutralDepth;
|
|
13436
13534
|
const { selecting, selected } = useMessageSelection(value);
|
|
13535
|
+
const selectMark = useEnterOnAppear(selecting);
|
|
13437
13536
|
const toggleSelected = (event) => {
|
|
13438
13537
|
const article2 = rootRef.current;
|
|
13439
13538
|
if (article2) list.range.onClick(list.indexOf(article2), event);
|
|
@@ -13660,9 +13759,19 @@ function MessageRoot({
|
|
|
13660
13759
|
tail ? /* @__PURE__ */ jsx43("span", { className: Message_default.bubbleTail, "data-depth": depth, "aria-hidden": "true" }) : null
|
|
13661
13760
|
] }),
|
|
13662
13761
|
shell === "bubble" ? null : reactionsPart,
|
|
13663
|
-
|
|
13664
|
-
(row2) =>
|
|
13665
|
-
|
|
13762
|
+
actions.map(
|
|
13763
|
+
(row2, index) => (
|
|
13764
|
+
// The last row ends the message: its outer corners take the bubble's radius.
|
|
13765
|
+
React43.cloneElement(
|
|
13766
|
+
row2,
|
|
13767
|
+
{
|
|
13768
|
+
key: row2.key ?? index,
|
|
13769
|
+
inert: preview || void 0,
|
|
13770
|
+
"data-end": index === actions.length - 1 ? "" : void 0
|
|
13771
|
+
}
|
|
13772
|
+
)
|
|
13773
|
+
)
|
|
13774
|
+
),
|
|
13666
13775
|
/* @__PURE__ */ jsx43(BubbleHug, { bubble: bubbleRef }),
|
|
13667
13776
|
/* @__PURE__ */ jsx43(MorphSnapshot, { morph })
|
|
13668
13777
|
]
|
|
@@ -13762,7 +13871,15 @@ function MessageRoot({
|
|
|
13762
13871
|
quickReact();
|
|
13763
13872
|
},
|
|
13764
13873
|
children: [
|
|
13765
|
-
selecting ? /* @__PURE__ */ jsx43(
|
|
13874
|
+
selecting ? /* @__PURE__ */ jsx43(
|
|
13875
|
+
"span",
|
|
13876
|
+
{
|
|
13877
|
+
ref: selectMark.ref,
|
|
13878
|
+
className: cx(Message_default.select, selectMark.entering && enterMotion_default.enter),
|
|
13879
|
+
"aria-hidden": "true",
|
|
13880
|
+
children: /* @__PURE__ */ jsx43(Checkbox.Indicator, { shape: "circle", checked: selected })
|
|
13881
|
+
}
|
|
13882
|
+
) : null,
|
|
13766
13883
|
gutter ? /* @__PURE__ */ jsx43("div", { className: cx(Message_default.gutter, statusLoop_default.blink), children: showAvatar ? avatar : null }) : null,
|
|
13767
13884
|
status === "failed" && onRetry && !preview ? /* @__PURE__ */ jsx43("span", { className: cx(Message_default.retry, statusLoop_default.blink), "data-morph-item": "", children: /* @__PURE__ */ jsx43(
|
|
13768
13885
|
Button.Root,
|
|
@@ -13934,6 +14051,7 @@ function ChatPinned({
|
|
|
13934
14051
|
if (next !== void 0) onValueChange?.(next);
|
|
13935
14052
|
}
|
|
13936
14053
|
});
|
|
14054
|
+
const excerpt = useEnterOnAppear();
|
|
13937
14055
|
if (items.length === 0) return null;
|
|
13938
14056
|
const found = items.findIndex((item) => item.value === value);
|
|
13939
14057
|
const index = found === -1 ? items.length - 1 : found;
|
|
@@ -13968,7 +14086,15 @@ function ChatPinned({
|
|
|
13968
14086
|
/* @__PURE__ */ jsx44("span", { className: ChatPinned_default.icon, "aria-hidden": "true", children: /* @__PURE__ */ jsx44(Icon, { name: "action.pin" }) }),
|
|
13969
14087
|
/* @__PURE__ */ jsxs33("span", { className: ChatPinned_default.text, children: [
|
|
13970
14088
|
/* @__PURE__ */ jsx44("span", { className: ChatPinned_default.title, children: title }),
|
|
13971
|
-
/* @__PURE__ */ jsx44(
|
|
14089
|
+
/* @__PURE__ */ jsx44(
|
|
14090
|
+
"span",
|
|
14091
|
+
{
|
|
14092
|
+
ref: excerpt.ref,
|
|
14093
|
+
className: cx(ChatPinned_default.excerpt, excerpt.entering && enterMotion_default.enter),
|
|
14094
|
+
children: current.text
|
|
14095
|
+
},
|
|
14096
|
+
current.value
|
|
14097
|
+
)
|
|
13972
14098
|
] })
|
|
13973
14099
|
]
|
|
13974
14100
|
}
|
|
@@ -15328,7 +15454,8 @@ function ChatSelectionBar({ className, children, ref, ...rest }) {
|
|
|
15328
15454
|
const { container, labels } = React46.useContext(ChromeContext);
|
|
15329
15455
|
const selected = useListSelection();
|
|
15330
15456
|
const barRef = React46.useRef(null);
|
|
15331
|
-
const
|
|
15457
|
+
const appear = useEnterOnAppear();
|
|
15458
|
+
const mergedRef = useMergedRefs(barRef, appear.ref, ref);
|
|
15332
15459
|
useBottomBar(barRef, container, selected !== null);
|
|
15333
15460
|
if (selected === null) return null;
|
|
15334
15461
|
const count = formatLabel(labels.selectedCount, { count: selected.length });
|
|
@@ -15338,7 +15465,7 @@ function ChatSelectionBar({ className, children, ref, ...rest }) {
|
|
|
15338
15465
|
ref: mergedRef,
|
|
15339
15466
|
role: "toolbar",
|
|
15340
15467
|
"aria-label": count,
|
|
15341
|
-
className: cx(Chat_default.selectionBar, enterMotion_default.enter, className),
|
|
15468
|
+
className: cx(Chat_default.selectionBar, appear.entering && enterMotion_default.enter, className),
|
|
15342
15469
|
"data-depth": "floating",
|
|
15343
15470
|
...rest,
|
|
15344
15471
|
children: /* @__PURE__ */ jsxs34(SurfaceDepthProvider, { value: "floating", children: [
|
|
@@ -15364,7 +15491,7 @@ ChatSelectionBar.displayName = "Chat.SelectionBar";
|
|
|
15364
15491
|
defineRowKind(ChatSelectionBar, { tail: true });
|
|
15365
15492
|
|
|
15366
15493
|
// src/components/chat/Chat.tsx
|
|
15367
|
-
import { Fragment as
|
|
15494
|
+
import { Fragment as Fragment25, jsx as jsx47, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
15368
15495
|
var CHAT_LABELS = {
|
|
15369
15496
|
...MESSAGE_LIST_LABELS,
|
|
15370
15497
|
typing: "\u043F\u0435\u0447\u0430\u0442\u0430\u0435\u0442\u2026",
|
|
@@ -15714,7 +15841,7 @@ function ChatMessages({
|
|
|
15714
15841
|
);
|
|
15715
15842
|
const name = ariaLabel ?? (ariaLabelledBy || chat.hasTitle ? void 0 : chat.labels.messages);
|
|
15716
15843
|
const selection = chat.selected === void 0 ? {} : { selected: chat.selected, onSelectedChange: chat.setSelected };
|
|
15717
|
-
return /* @__PURE__ */ jsxs35(
|
|
15844
|
+
return /* @__PURE__ */ jsxs35(Fragment25, { children: [
|
|
15718
15845
|
/* @__PURE__ */ jsx47(
|
|
15719
15846
|
Crossfade,
|
|
15720
15847
|
{
|
|
@@ -16814,7 +16941,7 @@ function DragOverlay({ controller }) {
|
|
|
16814
16941
|
|
|
16815
16942
|
// src/components/dnd/inPlaceRow.tsx
|
|
16816
16943
|
import * as React52 from "react";
|
|
16817
|
-
var
|
|
16944
|
+
var ITEM2 = "[data-dnd-item]";
|
|
16818
16945
|
function drawnX(node) {
|
|
16819
16946
|
const transform = getComputedStyle(node).transform;
|
|
16820
16947
|
if (!transform || transform === "none") return 0;
|
|
@@ -16879,7 +17006,7 @@ function useInPlaceShift(row, order, draggingId, gapBefore) {
|
|
|
16879
17006
|
}
|
|
16880
17007
|
startOrder.current ??= orderKey;
|
|
16881
17008
|
const cells = new Map(
|
|
16882
|
-
ownNodes(row,
|
|
17009
|
+
ownNodes(row, ITEM2).map((node) => [node.dataset.dndItem ?? "", node])
|
|
16883
17010
|
);
|
|
16884
17011
|
const widthOf2 = (id) => cells.get(id)?.offsetWidth ?? 0;
|
|
16885
17012
|
const startOf = (list) => {
|
|
@@ -17956,7 +18083,7 @@ var List_default = {
|
|
|
17956
18083
|
};
|
|
17957
18084
|
|
|
17958
18085
|
// src/components/list/List.tsx
|
|
17959
|
-
import { Fragment as
|
|
18086
|
+
import { Fragment as Fragment27, jsx as jsx50, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
17960
18087
|
var LIST_LABELS = {
|
|
17961
18088
|
reorderItem: "\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C {label}"
|
|
17962
18089
|
};
|
|
@@ -18111,10 +18238,10 @@ function splitItemChildren3(children) {
|
|
|
18111
18238
|
}
|
|
18112
18239
|
}
|
|
18113
18240
|
flushLoose();
|
|
18114
|
-
return /* @__PURE__ */ jsxs37(
|
|
18241
|
+
return /* @__PURE__ */ jsxs37(Fragment27, { children: [
|
|
18115
18242
|
leading,
|
|
18116
18243
|
/* @__PURE__ */ jsx50("span", { className: List_default.body, children: spaced(body) }),
|
|
18117
|
-
trail.length > 0 ? /* @__PURE__ */ jsxs37(
|
|
18244
|
+
trail.length > 0 ? /* @__PURE__ */ jsxs37(Fragment27, { children: [
|
|
18118
18245
|
" ",
|
|
18119
18246
|
/* @__PURE__ */ jsx50("span", { className: cx(List_default.trail, twoLines && List_default.trailStacked), children: spaced(trail) })
|
|
18120
18247
|
] }) : null
|
|
@@ -18263,7 +18390,7 @@ function formatChatTime(date, now, timeZone) {
|
|
|
18263
18390
|
}
|
|
18264
18391
|
|
|
18265
18392
|
// src/components/chat-list/ChatList.tsx
|
|
18266
|
-
import { Fragment as
|
|
18393
|
+
import { Fragment as Fragment29, jsx as jsx51, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
18267
18394
|
var CHAT_LIST_LABELS = {
|
|
18268
18395
|
list: "\u0414\u0438\u0430\u043B\u043E\u0433\u0438",
|
|
18269
18396
|
search: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0434\u0438\u0430\u043B\u043E\u0433\u0430\u043C",
|
|
@@ -18793,7 +18920,7 @@ function ChatListRoot({
|
|
|
18793
18920
|
if (virtualized) {
|
|
18794
18921
|
const laid = rowGaps(virtual);
|
|
18795
18922
|
const spacer = (height) => height > 0 ? /* @__PURE__ */ jsx51("li", { className: ChatList_default.spacer, style: { height }, "aria-hidden": "true" }) : null;
|
|
18796
|
-
rows2 = /* @__PURE__ */ jsxs38(
|
|
18923
|
+
rows2 = /* @__PURE__ */ jsxs38(Fragment29, { children: [
|
|
18797
18924
|
laid.rows.map(({ index, gap }) => /* @__PURE__ */ jsxs38(React59.Fragment, { children: [
|
|
18798
18925
|
spacer(gap),
|
|
18799
18926
|
row(index, virtual.measure(index))
|
|
@@ -18825,7 +18952,7 @@ function ChatListRoot({
|
|
|
18825
18952
|
/* @__PURE__ */ jsx51(EmptyPage.Title, { children: labels.empty })
|
|
18826
18953
|
] });
|
|
18827
18954
|
} else {
|
|
18828
|
-
body = /* @__PURE__ */ jsxs38(
|
|
18955
|
+
body = /* @__PURE__ */ jsxs38(Fragment29, { children: [
|
|
18829
18956
|
/* @__PURE__ */ jsx51(List.Root, { ref: setListEl, size, "aria-label": labels.list, className: ChatList_default.list, children: rows2 }),
|
|
18830
18957
|
hasMore ? placeholders(1) : null
|
|
18831
18958
|
] });
|
|
@@ -19401,7 +19528,7 @@ var CommandMenu_default = {
|
|
|
19401
19528
|
};
|
|
19402
19529
|
|
|
19403
19530
|
// src/components/command-menu/CommandMenu.tsx
|
|
19404
|
-
import { Fragment as
|
|
19531
|
+
import { Fragment as Fragment30, jsx as jsx55, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
19405
19532
|
var COMMAND_MENU_LABELS = {
|
|
19406
19533
|
search: "\u041F\u043E\u0438\u0441\u043A",
|
|
19407
19534
|
empty: "\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E",
|
|
@@ -19673,7 +19800,7 @@ function CommandMenuList({ className, children, ref, ...rest }) {
|
|
|
19673
19800
|
if (inside && !regionRef.current?.contains(document.activeElement)) return;
|
|
19674
19801
|
dialog.querySelector("[data-autofocus]")?.focus({ preventScroll: true });
|
|
19675
19802
|
};
|
|
19676
|
-
return /* @__PURE__ */ jsxs40(
|
|
19803
|
+
return /* @__PURE__ */ jsxs40(Fragment30, { children: [
|
|
19677
19804
|
/* @__PURE__ */ jsx55(RegionSwap, { ref: regionRef, state: region, fill: true, onSwap: returnToSearch, children: region === "error" ? /* @__PURE__ */ jsxs40(EmptyPage.Root, { layout: "compact", size, role: "alert", children: [
|
|
19678
19805
|
/* @__PURE__ */ jsx55(EmptyPage.Title, { as: "p", children: loadError }),
|
|
19679
19806
|
onRetry ? /* @__PURE__ */ jsx55(EmptyPage.Actions, { children: /* @__PURE__ */ jsxs40(Button.Root, { variant: "soft", tone: "neutral", loading: retrying, onClick: onRetry, children: [
|
|
@@ -20080,7 +20207,7 @@ var FileUpload_default = {
|
|
|
20080
20207
|
};
|
|
20081
20208
|
|
|
20082
20209
|
// src/components/file-upload/FileUpload.tsx
|
|
20083
|
-
import { Fragment as
|
|
20210
|
+
import { Fragment as Fragment31, jsx as jsx57, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
20084
20211
|
var FILE_UPLOAD_LABELS = {
|
|
20085
20212
|
title: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u0438\u043B\u0438 \u043F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435 \u0435\u0433\u043E \u0441\u044E\u0434\u0430",
|
|
20086
20213
|
description: "JPEG, PNG, PDF, MP4 \u0434\u043E 50 \u041C\u0411",
|
|
@@ -20454,6 +20581,10 @@ function FileSetView({
|
|
|
20454
20581
|
listRef
|
|
20455
20582
|
}) {
|
|
20456
20583
|
const { files, uploads, busy, canReorder, announcer } = set;
|
|
20584
|
+
const coverId = cover ? files[0]?.id : void 0;
|
|
20585
|
+
const [stillCover, setStillCover] = React64.useState(coverId);
|
|
20586
|
+
if (stillCover !== void 0 && coverId !== stillCover) setStillCover(void 0);
|
|
20587
|
+
const coverEnter = stillCover === void 0 ? enterMotion_default.enter : void 0;
|
|
20457
20588
|
const ownRef = React64.useRef(null);
|
|
20458
20589
|
const setListRef = useMergedRefs(ownRef, listRef);
|
|
20459
20590
|
const kindId = `file-upload-${React64.useId()}`;
|
|
@@ -20489,7 +20620,7 @@ function FileSetView({
|
|
|
20489
20620
|
};
|
|
20490
20621
|
const region = announcer.own ? /* @__PURE__ */ jsx57(VisuallyHidden, { live: "polite", children: announcer.message }) : null;
|
|
20491
20622
|
if (layout === "list") {
|
|
20492
|
-
return /* @__PURE__ */ jsxs42(
|
|
20623
|
+
return /* @__PURE__ */ jsxs42(Fragment31, { children: [
|
|
20493
20624
|
files.length > 0 || addTile ? /* @__PURE__ */ jsxs42(
|
|
20494
20625
|
"ul",
|
|
20495
20626
|
{
|
|
@@ -20553,7 +20684,7 @@ function FileSetView({
|
|
|
20553
20684
|
openLabel: formatLabel(labels.open, { name: file.name }),
|
|
20554
20685
|
badge: cover && index === 0 ? (
|
|
20555
20686
|
// A new cover: the word comes in where the format stood.
|
|
20556
|
-
kind === "file" ? /* @__PURE__ */ jsx57(Badge.Root, { className:
|
|
20687
|
+
kind === "file" ? /* @__PURE__ */ jsx57(Badge.Root, { className: coverEnter, children: labels.cover }, "cover") : /* @__PURE__ */ jsx57("span", { className: coverEnter, children: labels.cover }, "cover")
|
|
20557
20688
|
) : kind === "file" ? (
|
|
20558
20689
|
// Decorative: the tile's name carries the extension.
|
|
20559
20690
|
/* @__PURE__ */ jsx57(Badge.Root, { color: formatColor(format5), "aria-hidden": "true", children: (format5 || "\u2014").slice(0, 8).toUpperCase() })
|
|
@@ -20577,7 +20708,7 @@ function FileSetView({
|
|
|
20577
20708
|
children: addTile
|
|
20578
20709
|
}
|
|
20579
20710
|
);
|
|
20580
|
-
return /* @__PURE__ */ jsxs42(
|
|
20711
|
+
return /* @__PURE__ */ jsxs42(Fragment31, { children: [
|
|
20581
20712
|
files.length > 0 || addTile ? /* @__PURE__ */ jsx57("div", { className: FileUpload_default.tiles, ...toDataAttributes({ layout, cover: cover || void 0 }), children: /* @__PURE__ */ jsx57(ControlSizeProvider, { value: "xs", children: strip ? /* @__PURE__ */ jsx57(AttachmentStripScroller, { children: list }) : list }) }) : null,
|
|
20582
20713
|
region
|
|
20583
20714
|
] });
|
|
@@ -20599,6 +20730,8 @@ function FileRow({
|
|
|
20599
20730
|
onRemove
|
|
20600
20731
|
}) {
|
|
20601
20732
|
const rowRef = React64.useRef(null);
|
|
20733
|
+
const appear = useEnterOnAppear();
|
|
20734
|
+
const setRowRef = useMergedRefs(rowRef, appear.ref);
|
|
20602
20735
|
const { id } = file;
|
|
20603
20736
|
React64.useLayoutEffect(() => {
|
|
20604
20737
|
const node = rowRef.current;
|
|
@@ -20617,8 +20750,8 @@ function FileRow({
|
|
|
20617
20750
|
return /* @__PURE__ */ jsx57(
|
|
20618
20751
|
"li",
|
|
20619
20752
|
{
|
|
20620
|
-
ref:
|
|
20621
|
-
className: cx(FileUpload_default.queueRow, enterMotion_default.enter),
|
|
20753
|
+
ref: setRowRef,
|
|
20754
|
+
className: cx(FileUpload_default.queueRow, appear.entering && enterMotion_default.enter),
|
|
20622
20755
|
"aria-busy": pending || void 0,
|
|
20623
20756
|
"data-pending": pending || void 0,
|
|
20624
20757
|
children: /* @__PURE__ */ jsxs42(FileUploadItem, { invalid: status === "failed", "data-status": status, children: [
|
|
@@ -20758,6 +20891,7 @@ function FileUploadField({
|
|
|
20758
20891
|
const pickAccept = React64.useRef(accept);
|
|
20759
20892
|
const requestedAccept = React64.useRef(null);
|
|
20760
20893
|
const count = set.files.length;
|
|
20894
|
+
const emptyHint = useEnterOnAppear(count === 0 && max === void 0);
|
|
20761
20895
|
const room = max === void 0 ? Number.POSITIVE_INFINITY : Math.max(0, max - count);
|
|
20762
20896
|
const full = room === 0;
|
|
20763
20897
|
const hasSet = trigger === "tile" || value !== void 0 || defaultValue !== void 0 || queue !== void 0;
|
|
@@ -20824,7 +20958,7 @@ function FileUploadField({
|
|
|
20824
20958
|
if (none) {
|
|
20825
20959
|
control = input;
|
|
20826
20960
|
} else if (button) {
|
|
20827
|
-
const content = children ?? /* @__PURE__ */ jsxs42(
|
|
20961
|
+
const content = children ?? /* @__PURE__ */ jsxs42(Fragment31, { children: [
|
|
20828
20962
|
/* @__PURE__ */ jsx57(Button.Icon, { children: /* @__PURE__ */ jsx57(Icon, { name: "action.attach" }) }),
|
|
20829
20963
|
labels.browse
|
|
20830
20964
|
] });
|
|
@@ -20882,7 +21016,18 @@ function FileUploadField({
|
|
|
20882
21016
|
input,
|
|
20883
21017
|
/* @__PURE__ */ jsx57("span", { className: cx(fieldTierClass, FileUpload_default.addIcon), "data-size": "xs", "aria-hidden": "true", children: /* @__PURE__ */ jsx57(Icon, { name: "action.add" }) }),
|
|
20884
21018
|
/* @__PURE__ */ jsx57("span", { className: cx(textRole_default.caption, FileUpload_default.addText), children: /* @__PURE__ */ jsx57(MorphText, { children: full ? labels.full : empty ? labels.empty : labels.add }) }),
|
|
20885
|
-
countText !== null ? /* @__PURE__ */ jsx57("span", { className: cx(textRole_default.caption, FileUpload_default.addHint), children: /* @__PURE__ */ jsx57(RollingNumber, { children: countText }) }) : empty ? /* @__PURE__ */ jsx57(
|
|
21019
|
+
countText !== null ? /* @__PURE__ */ jsx57("span", { className: cx(textRole_default.caption, FileUpload_default.addHint), children: /* @__PURE__ */ jsx57(RollingNumber, { children: countText }) }) : empty ? /* @__PURE__ */ jsx57(
|
|
21020
|
+
"span",
|
|
21021
|
+
{
|
|
21022
|
+
ref: emptyHint.ref,
|
|
21023
|
+
className: cx(
|
|
21024
|
+
textRole_default.caption,
|
|
21025
|
+
FileUpload_default.addHint,
|
|
21026
|
+
emptyHint.entering && enterMotion_default.enter
|
|
21027
|
+
),
|
|
21028
|
+
children: labels.emptyHint
|
|
21029
|
+
}
|
|
21030
|
+
) : null
|
|
20886
21031
|
] }) }) : null;
|
|
20887
21032
|
const drops = !hiddenInput && !disabled;
|
|
20888
21033
|
const dropHandlers = hiddenInput ? {} : {
|
|
@@ -21293,7 +21438,7 @@ var Textarea_default = {
|
|
|
21293
21438
|
};
|
|
21294
21439
|
|
|
21295
21440
|
// src/components/textarea/Textarea.tsx
|
|
21296
|
-
import { Fragment as
|
|
21441
|
+
import { Fragment as Fragment32, jsx as jsx59, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
21297
21442
|
var TEXTAREA_LABELS = {
|
|
21298
21443
|
optional: "\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E",
|
|
21299
21444
|
counter: "{current} \u0438\u0437 {max} \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432",
|
|
@@ -21458,7 +21603,7 @@ function TextareaRoot({
|
|
|
21458
21603
|
"focus-ring": focusRing,
|
|
21459
21604
|
capped: autoResize && maxRows !== void 0 || void 0
|
|
21460
21605
|
}),
|
|
21461
|
-
children: hasEdge ? /* @__PURE__ */ jsxs44(
|
|
21606
|
+
children: hasEdge ? /* @__PURE__ */ jsxs44(Fragment32, { children: [
|
|
21462
21607
|
/* @__PURE__ */ jsx59("div", { className: Textarea_default.body, children: body }),
|
|
21463
21608
|
/* @__PURE__ */ jsxs44("div", { className: Textarea_default.edge, children: [
|
|
21464
21609
|
hasCommit ? /* @__PURE__ */ jsx59(FieldCommitStatus, { state: commit.state, labels }) : null,
|
|
@@ -21556,7 +21701,11 @@ var Composer_default = {
|
|
|
21556
21701
|
contextIcon: "Composer_contextIcon",
|
|
21557
21702
|
contextText: "Composer_contextText",
|
|
21558
21703
|
title: "Composer_title",
|
|
21559
|
-
description: "Composer_description"
|
|
21704
|
+
description: "Composer_description",
|
|
21705
|
+
keyboardToggle: "Composer_keyboardToggle",
|
|
21706
|
+
keyboardSlot: "Composer_keyboardSlot",
|
|
21707
|
+
keyboardKeys: "Composer_keyboardKeys",
|
|
21708
|
+
keyboardRow: "Composer_keyboardRow"
|
|
21560
21709
|
};
|
|
21561
21710
|
|
|
21562
21711
|
// src/components/composer/liveWave.ts
|
|
@@ -21843,7 +21992,7 @@ function useRecorder(onRecorded) {
|
|
|
21843
21992
|
}
|
|
21844
21993
|
|
|
21845
21994
|
// src/components/composer/Composer.tsx
|
|
21846
|
-
import { jsx as jsx60, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
21995
|
+
import { Fragment as Fragment33, jsx as jsx60, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
21847
21996
|
var COMPOSER_LABELS = {
|
|
21848
21997
|
region: "\u041D\u043E\u0432\u043E\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435",
|
|
21849
21998
|
placeholder: "\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435",
|
|
@@ -21874,7 +22023,8 @@ var COMPOSER_LABELS = {
|
|
|
21874
22023
|
sendAsFiles: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u0430\u043A \u0444\u0430\u0439\u043B\u044B, \u0431\u0435\u0437 \u0441\u0436\u0430\u0442\u0438\u044F",
|
|
21875
22024
|
...TEXT_FORMATTING_LABELS,
|
|
21876
22025
|
cancelReply: "\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043E\u0442\u0432\u0435\u0442",
|
|
21877
|
-
cancelEdit: "\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435"
|
|
22026
|
+
cancelEdit: "\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435",
|
|
22027
|
+
keyboard: "\u041A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430 \u0431\u043E\u0442\u0430"
|
|
21878
22028
|
};
|
|
21879
22029
|
var [ComposerProvider, useComposerContext] = createComponentContext("Composer");
|
|
21880
22030
|
var HOLD_MS = 200;
|
|
@@ -22400,9 +22550,43 @@ function ComposerRoot({
|
|
|
22400
22550
|
}
|
|
22401
22551
|
};
|
|
22402
22552
|
const [attachSlot, setAttachSlot] = React68.useState(null);
|
|
22553
|
+
const [keyboardSlot, setKeyboardSlot] = React68.useState(null);
|
|
22554
|
+
const [keyboardToggleSlot, setKeyboardToggleSlot] = React68.useState(null);
|
|
22555
|
+
const [keyboardPlaceholder, setKeyboardPlaceholder] = React68.useState(null);
|
|
22556
|
+
const sendRef = React68.useRef(onSend);
|
|
22557
|
+
sendRef.current = onSend;
|
|
22558
|
+
const sendText = React68.useCallback(
|
|
22559
|
+
(keyText) => sendRef.current?.({ text: keyText, albums: [], files: [] }),
|
|
22560
|
+
[]
|
|
22561
|
+
);
|
|
22403
22562
|
const contextValue = React68.useMemo(
|
|
22404
|
-
() => ({
|
|
22405
|
-
|
|
22563
|
+
() => ({
|
|
22564
|
+
size,
|
|
22565
|
+
labels,
|
|
22566
|
+
disabled,
|
|
22567
|
+
addFiles,
|
|
22568
|
+
registerBar,
|
|
22569
|
+
focusFieldIfLive,
|
|
22570
|
+
attachSlot,
|
|
22571
|
+
keyboardSlot,
|
|
22572
|
+
keyboardToggleSlot,
|
|
22573
|
+
setKeyboardPlaceholder,
|
|
22574
|
+
sendText,
|
|
22575
|
+
recording
|
|
22576
|
+
}),
|
|
22577
|
+
[
|
|
22578
|
+
size,
|
|
22579
|
+
labels,
|
|
22580
|
+
disabled,
|
|
22581
|
+
addFiles,
|
|
22582
|
+
registerBar,
|
|
22583
|
+
focusFieldIfLive,
|
|
22584
|
+
attachSlot,
|
|
22585
|
+
keyboardSlot,
|
|
22586
|
+
keyboardToggleSlot,
|
|
22587
|
+
sendText,
|
|
22588
|
+
recording
|
|
22589
|
+
]
|
|
22406
22590
|
);
|
|
22407
22591
|
const actionKind = recording ? "send" : editing ? "save" : showRecord ? recordMode : "send";
|
|
22408
22592
|
const pauseIcon = recorder.paused ? "action.play" : "action.pause";
|
|
@@ -22543,7 +22727,7 @@ function ComposerRoot({
|
|
|
22543
22727
|
maxRows: MAX_ROWS,
|
|
22544
22728
|
focusRing: false,
|
|
22545
22729
|
value,
|
|
22546
|
-
placeholder: labels.placeholder,
|
|
22730
|
+
placeholder: keyboardPlaceholder ?? labels.placeholder,
|
|
22547
22731
|
"aria-label": labels.placeholder,
|
|
22548
22732
|
"aria-describedby": [contextIds, recorder.error ? errorId : void 0].filter(Boolean).join(" ") || void 0,
|
|
22549
22733
|
disabled,
|
|
@@ -22619,6 +22803,14 @@ function ComposerRoot({
|
|
|
22619
22803
|
}
|
|
22620
22804
|
) : null,
|
|
22621
22805
|
/* @__PURE__ */ jsxs45("div", { className: Composer_default.end, children: [
|
|
22806
|
+
/* @__PURE__ */ jsx60(
|
|
22807
|
+
"div",
|
|
22808
|
+
{
|
|
22809
|
+
ref: setKeyboardToggleSlot,
|
|
22810
|
+
className: Composer_default.keyboardToggle,
|
|
22811
|
+
inert: recording
|
|
22812
|
+
}
|
|
22813
|
+
),
|
|
22622
22814
|
lockPill.mounted ? /* @__PURE__ */ jsxs45(
|
|
22623
22815
|
"span",
|
|
22624
22816
|
{
|
|
@@ -22657,6 +22849,7 @@ function ComposerRoot({
|
|
|
22657
22849
|
/* @__PURE__ */ jsx60(VisuallyHidden, { id: hintId, children: videoAvailable && voiceAvailable ? labels.recordSwitchHint : labels.recordHint })
|
|
22658
22850
|
] })
|
|
22659
22851
|
] }),
|
|
22852
|
+
/* @__PURE__ */ jsx60("div", { ref: setKeyboardSlot, className: Composer_default.keyboardSlot }),
|
|
22660
22853
|
/* @__PURE__ */ jsx60(VisuallyHidden, { live: "polite", children: announcement })
|
|
22661
22854
|
]
|
|
22662
22855
|
}
|
|
@@ -22715,9 +22908,12 @@ function ComposerContext({
|
|
|
22715
22908
|
id: idProp,
|
|
22716
22909
|
className,
|
|
22717
22910
|
children,
|
|
22911
|
+
ref,
|
|
22718
22912
|
...rest
|
|
22719
22913
|
}) {
|
|
22720
22914
|
const { size, labels, registerBar, focusFieldIfLive } = useComposerContext();
|
|
22915
|
+
const appear = useEnterOnAppear();
|
|
22916
|
+
const mergedRef = useMergedRefs(appear.ref, ref);
|
|
22721
22917
|
const ownId = React68.useId();
|
|
22722
22918
|
const id = idProp ?? ownId;
|
|
22723
22919
|
const dismissRef = React68.useRef(onDismiss);
|
|
@@ -22742,8 +22938,9 @@ function ComposerContext({
|
|
|
22742
22938
|
"div",
|
|
22743
22939
|
{
|
|
22744
22940
|
...rest,
|
|
22941
|
+
ref: mergedRef,
|
|
22745
22942
|
id,
|
|
22746
|
-
className: cx(Composer_default.context, enterMotion_default.enter, className),
|
|
22943
|
+
className: cx(Composer_default.context, appear.entering && enterMotion_default.enter, className),
|
|
22747
22944
|
"data-mode": mode,
|
|
22748
22945
|
children: [
|
|
22749
22946
|
/* @__PURE__ */ jsx60("span", { className: Composer_default.contextIcon, "aria-hidden": "true", children: /* @__PURE__ */ jsx60(GlyphSwap, { children: /* @__PURE__ */ jsx60(Icon, { name: CONTEXT_ICON[mode] }) }) }),
|
|
@@ -22846,6 +23043,119 @@ function ComposerItemIcon(props) {
|
|
|
22846
23043
|
return /* @__PURE__ */ jsx60(Dropdown.ItemIcon, { ...props });
|
|
22847
23044
|
}
|
|
22848
23045
|
ComposerItemIcon.displayName = "Composer.ItemIcon";
|
|
23046
|
+
var keyLabel = (key) => typeof key === "string" ? key : key.label;
|
|
23047
|
+
function ComposerKeyboard({
|
|
23048
|
+
rows: rows2,
|
|
23049
|
+
placeholder,
|
|
23050
|
+
oneTime = false,
|
|
23051
|
+
open: openProp,
|
|
23052
|
+
defaultOpen = true,
|
|
23053
|
+
onOpenChange,
|
|
23054
|
+
id: idProp,
|
|
23055
|
+
className,
|
|
23056
|
+
"aria-label": ariaLabel,
|
|
23057
|
+
ref,
|
|
23058
|
+
...rest
|
|
23059
|
+
}) {
|
|
23060
|
+
const {
|
|
23061
|
+
labels,
|
|
23062
|
+
disabled,
|
|
23063
|
+
keyboardSlot,
|
|
23064
|
+
keyboardToggleSlot,
|
|
23065
|
+
setKeyboardPlaceholder,
|
|
23066
|
+
sendText,
|
|
23067
|
+
focusFieldIfLive,
|
|
23068
|
+
recording
|
|
23069
|
+
} = useComposerContext();
|
|
23070
|
+
const [open, setOpen] = useControllableState({
|
|
23071
|
+
value: openProp,
|
|
23072
|
+
defaultValue: defaultOpen,
|
|
23073
|
+
onChange: onOpenChange
|
|
23074
|
+
});
|
|
23075
|
+
const { pending, track: track2 } = usePendingKeys();
|
|
23076
|
+
const autoId = React68.useId();
|
|
23077
|
+
const id = idProp ?? autoId;
|
|
23078
|
+
React68.useEffect(() => {
|
|
23079
|
+
if (!open || placeholder === void 0) return;
|
|
23080
|
+
setKeyboardPlaceholder(placeholder);
|
|
23081
|
+
return () => setKeyboardPlaceholder(null);
|
|
23082
|
+
}, [open, placeholder, setKeyboardPlaceholder]);
|
|
23083
|
+
const press = (key, position) => {
|
|
23084
|
+
const outcome = track2(position, sendText(keyLabel(key)));
|
|
23085
|
+
if (!oneTime) return;
|
|
23086
|
+
const hide = () => {
|
|
23087
|
+
setOpen(false);
|
|
23088
|
+
focusFieldIfLive();
|
|
23089
|
+
};
|
|
23090
|
+
if (isPromiseLike(outcome)) outcome.then(hide, () => {
|
|
23091
|
+
});
|
|
23092
|
+
else hide();
|
|
23093
|
+
};
|
|
23094
|
+
if (!keyboardSlot || !keyboardToggleSlot) return null;
|
|
23095
|
+
const toggleIcon = open ? "nav.chevronDown" : "nav.layoutGrid";
|
|
23096
|
+
return /* @__PURE__ */ jsxs45(Fragment33, { children: [
|
|
23097
|
+
createPortal2(
|
|
23098
|
+
/* @__PURE__ */ jsx60(
|
|
23099
|
+
Button.Root,
|
|
23100
|
+
{
|
|
23101
|
+
variant: "ghost",
|
|
23102
|
+
tone: "neutral",
|
|
23103
|
+
"aria-label": ariaLabel ?? labels.keyboard,
|
|
23104
|
+
"aria-expanded": open,
|
|
23105
|
+
"aria-controls": id,
|
|
23106
|
+
disabled,
|
|
23107
|
+
onClick: () => setOpen(!open),
|
|
23108
|
+
children: /* @__PURE__ */ jsx60(Button.Icon, { children: /* @__PURE__ */ jsx60(Icon, { name: toggleIcon }) })
|
|
23109
|
+
}
|
|
23110
|
+
),
|
|
23111
|
+
keyboardToggleSlot
|
|
23112
|
+
),
|
|
23113
|
+
createPortal2(
|
|
23114
|
+
/* @__PURE__ */ jsx60(
|
|
23115
|
+
Disclosure,
|
|
23116
|
+
{
|
|
23117
|
+
...rest,
|
|
23118
|
+
ref,
|
|
23119
|
+
id,
|
|
23120
|
+
role: "group",
|
|
23121
|
+
"aria-label": ariaLabel ?? labels.keyboard,
|
|
23122
|
+
open,
|
|
23123
|
+
inert: recording || void 0,
|
|
23124
|
+
className,
|
|
23125
|
+
children: /* @__PURE__ */ jsx60("div", { className: Composer_default.keyboardKeys, children: rows2.map((row, rowIndex) => /* @__PURE__ */ jsx60(
|
|
23126
|
+
"div",
|
|
23127
|
+
{
|
|
23128
|
+
className: Composer_default.keyboardRow,
|
|
23129
|
+
children: row.map((key, keyIndex) => {
|
|
23130
|
+
const position = `${rowIndex}:${keyIndex}`;
|
|
23131
|
+
const custom = typeof key === "string" ? void 0 : key;
|
|
23132
|
+
return /* @__PURE__ */ jsxs45(
|
|
23133
|
+
Button.Root,
|
|
23134
|
+
{
|
|
23135
|
+
variant: "soft",
|
|
23136
|
+
tone: custom?.tone ?? "neutral",
|
|
23137
|
+
fullWidth: true,
|
|
23138
|
+
disabled,
|
|
23139
|
+
loading: pending.has(position),
|
|
23140
|
+
onClick: () => press(key, position),
|
|
23141
|
+
children: [
|
|
23142
|
+
custom?.icon ? /* @__PURE__ */ jsx60(Button.Icon, { children: custom.icon }) : null,
|
|
23143
|
+
keyLabel(key)
|
|
23144
|
+
]
|
|
23145
|
+
},
|
|
23146
|
+
position
|
|
23147
|
+
);
|
|
23148
|
+
})
|
|
23149
|
+
},
|
|
23150
|
+
rowIndex
|
|
23151
|
+
)) })
|
|
23152
|
+
}
|
|
23153
|
+
),
|
|
23154
|
+
keyboardSlot
|
|
23155
|
+
)
|
|
23156
|
+
] });
|
|
23157
|
+
}
|
|
23158
|
+
ComposerKeyboard.displayName = "Composer.Keyboard";
|
|
22849
23159
|
var Composer = {
|
|
22850
23160
|
Root: ComposerRoot,
|
|
22851
23161
|
Context: ComposerContext,
|
|
@@ -22853,7 +23163,8 @@ var Composer = {
|
|
|
22853
23163
|
Description: ComposerDescription,
|
|
22854
23164
|
Attach: ComposerAttach,
|
|
22855
23165
|
Item: ComposerItem,
|
|
22856
|
-
ItemIcon: ComposerItemIcon
|
|
23166
|
+
ItemIcon: ComposerItemIcon,
|
|
23167
|
+
Keyboard: ComposerKeyboard
|
|
22857
23168
|
};
|
|
22858
23169
|
|
|
22859
23170
|
// src/components/data-table/DataTable.tsx
|
|
@@ -23544,14 +23855,16 @@ function flatten(data, options) {
|
|
|
23544
23855
|
}
|
|
23545
23856
|
|
|
23546
23857
|
// src/components/data-table/Row.tsx
|
|
23547
|
-
import { Fragment as
|
|
23858
|
+
import { Fragment as Fragment34, jsx as jsx65, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
23548
23859
|
function columnAlign(column) {
|
|
23549
23860
|
return column.align ?? (column.numeric ? "end" : "start");
|
|
23550
23861
|
}
|
|
23551
|
-
function
|
|
23552
|
-
const { width, minWidth, maxWidth, grow } = column;
|
|
23553
|
-
|
|
23554
|
-
|
|
23862
|
+
function columnSizeProps(column) {
|
|
23863
|
+
const { width, minWidth = width, maxWidth, grow } = column;
|
|
23864
|
+
return {
|
|
23865
|
+
style: width || minWidth || maxWidth ? { width, minWidth, maxWidth } : void 0,
|
|
23866
|
+
"data-grow": grow ? "true" : void 0
|
|
23867
|
+
};
|
|
23555
23868
|
}
|
|
23556
23869
|
function renderCell(row, column, withTitle) {
|
|
23557
23870
|
const value = column.cell ? void 0 : columnValue(row, column);
|
|
@@ -23605,7 +23918,7 @@ function DataTableRowImpl({
|
|
|
23605
23918
|
const enter = animate && !foldable && enterMotion_default.enterBase;
|
|
23606
23919
|
const lead = cx(DataTable_default.cell, enter, shared.stickyFirstColumn && DataTable_default.stickyLead);
|
|
23607
23920
|
const folded = (node) => foldable ? /* @__PURE__ */ jsx65(Disclosure, { open: !folding, appear: animate, children: /* @__PURE__ */ jsx65("div", { className: DataTable_default.foldPad, children: node }) }) : node;
|
|
23608
|
-
return /* @__PURE__ */ jsxs50(
|
|
23921
|
+
return /* @__PURE__ */ jsxs50(Fragment34, { children: [
|
|
23609
23922
|
/* @__PURE__ */ jsxs50(
|
|
23610
23923
|
RowElement,
|
|
23611
23924
|
{
|
|
@@ -23701,7 +24014,7 @@ function DataTableRowImpl({
|
|
|
23701
24014
|
shared.stickyLastColumn && isLastColumn && DataTable_default.lastColumnSticky,
|
|
23702
24015
|
enter
|
|
23703
24016
|
),
|
|
23704
|
-
|
|
24017
|
+
...columnSizeProps(column),
|
|
23705
24018
|
"data-align": columnAlign(column),
|
|
23706
24019
|
"data-numeric": column.numeric ? "true" : void 0,
|
|
23707
24020
|
"data-first-column": isFirstColumn ? "true" : void 0,
|
|
@@ -23712,7 +24025,7 @@ function DataTableRowImpl({
|
|
|
23712
24025
|
folded(
|
|
23713
24026
|
/* @__PURE__ */ jsx65("a", { href, className: DataTable_default.rowLink, "data-row-link": "", children: renderCell(row, column, true) })
|
|
23714
24027
|
)
|
|
23715
|
-
) : /* @__PURE__ */ jsxs50(
|
|
24028
|
+
) : /* @__PURE__ */ jsxs50(Fragment34, { children: [
|
|
23716
24029
|
/* @__PURE__ */ jsx65(
|
|
23717
24030
|
"a",
|
|
23718
24031
|
{
|
|
@@ -23839,7 +24152,7 @@ function MeasureBody({
|
|
|
23839
24152
|
"td",
|
|
23840
24153
|
{
|
|
23841
24154
|
className: DataTable_default.cell,
|
|
23842
|
-
|
|
24155
|
+
...columnSizeProps(column),
|
|
23843
24156
|
"data-align": columnAlign(column),
|
|
23844
24157
|
"data-numeric": column.numeric ? "true" : void 0,
|
|
23845
24158
|
"data-first-column": columnIndex === 0 ? "true" : void 0,
|
|
@@ -23855,7 +24168,7 @@ function MeasureBody({
|
|
|
23855
24168
|
}
|
|
23856
24169
|
|
|
23857
24170
|
// src/components/data-table/Head.tsx
|
|
23858
|
-
import { Fragment as
|
|
24171
|
+
import { Fragment as Fragment35, jsx as jsx66, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
23859
24172
|
var ARIA_SORT = { asc: "ascending", desc: "descending" };
|
|
23860
24173
|
var SORT_ICON = { asc: "sort.ascending", desc: "sort.descending" };
|
|
23861
24174
|
var columnLabel2 = (column) => nodeText(column.header) || column.id;
|
|
@@ -23883,7 +24196,7 @@ function Head({
|
|
|
23883
24196
|
stickyHeader && (pinned ? DataTable_default.cornerCellSticky : DataTable_default.headSticky)
|
|
23884
24197
|
);
|
|
23885
24198
|
const lead = cx(headCell(stickyFirstColumn), stickyFirstColumn && DataTable_default.stickyLead);
|
|
23886
|
-
const leading = /* @__PURE__ */ jsxs51(
|
|
24199
|
+
const leading = /* @__PURE__ */ jsxs51(Fragment35, { children: [
|
|
23887
24200
|
gripStart ? /* @__PURE__ */ jsx66("td", { className: cx(lead, DataTable_default.handleCell) }) : null,
|
|
23888
24201
|
selectAll ? /* @__PURE__ */ jsx66("th", { scope: "col", className: cx(lead, DataTable_default.selectCell), children: /* @__PURE__ */ jsx66(
|
|
23889
24202
|
Checkbox.Root,
|
|
@@ -23946,7 +24259,7 @@ function Head({
|
|
|
23946
24259
|
)
|
|
23947
24260
|
]
|
|
23948
24261
|
}
|
|
23949
|
-
) }) : column.hideHeader ? /* @__PURE__ */ jsxs51(
|
|
24262
|
+
) }) : column.hideHeader ? /* @__PURE__ */ jsxs51(Fragment35, { children: [
|
|
23950
24263
|
/* @__PURE__ */ jsx66(VisuallyHidden, { id: labelId, children: column.header }),
|
|
23951
24264
|
menuHere ? /* @__PURE__ */ jsx66("span", { className: DataTable_default.headMenu, children: columnsMenu }) : null
|
|
23952
24265
|
] }) : /* @__PURE__ */ jsxs51("span", { className: DataTable_default.headTitle, children: [
|
|
@@ -23962,7 +24275,7 @@ function Head({
|
|
|
23962
24275
|
stickyFirstColumn && isFirstColumn && DataTable_default.firstColumnSticky,
|
|
23963
24276
|
stickyLastColumn && isLastColumn && DataTable_default.lastColumnSticky
|
|
23964
24277
|
),
|
|
23965
|
-
|
|
24278
|
+
...columnSizeProps(column),
|
|
23966
24279
|
"data-align": column.headerAlign ?? "start",
|
|
23967
24280
|
"data-sorted": order ? "true" : void 0,
|
|
23968
24281
|
"aria-sort": column.sortable ? order ? ARIA_SORT[order] : "none" : void 0,
|
|
@@ -23972,7 +24285,7 @@ function Head({
|
|
|
23972
24285
|
"aria-describedby": described ? descriptionId : void 0,
|
|
23973
24286
|
onClick: column.sortable ? () => onSort(column.id) : void 0
|
|
23974
24287
|
},
|
|
23975
|
-
content: /* @__PURE__ */ jsxs51(
|
|
24288
|
+
content: /* @__PURE__ */ jsxs51(Fragment35, { children: [
|
|
23976
24289
|
label,
|
|
23977
24290
|
described ? /* @__PURE__ */ jsx66("span", { id: descriptionId, hidden: true, children: column.description }) : null
|
|
23978
24291
|
] })
|
|
@@ -24027,8 +24340,29 @@ function WithDescription({
|
|
|
24027
24340
|
] });
|
|
24028
24341
|
}
|
|
24029
24342
|
|
|
24030
|
-
// src/components/data-table/
|
|
24343
|
+
// src/components/data-table/SelectionMenu.tsx
|
|
24031
24344
|
import { jsx as jsx67, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
24345
|
+
function SelectionMenu({ selected, actions, onClear, labels, size }) {
|
|
24346
|
+
const name = labels.selectionActions;
|
|
24347
|
+
return /* @__PURE__ */ jsxs52(Dropdown.Root, { children: [
|
|
24348
|
+
/* @__PURE__ */ jsx67(Dropdown.Trigger, { children: /* @__PURE__ */ jsxs52(Button.Root, { "aria-label": `${name} ${selected.length}`, variant: "soft", tone: "neutral", children: [
|
|
24349
|
+
name,
|
|
24350
|
+
/* @__PURE__ */ jsx67(Badge.Root, { children: selected.length }),
|
|
24351
|
+
/* @__PURE__ */ jsx67(Button.Icon, { children: /* @__PURE__ */ jsx67(Icon, { name: "nav.chevronDown" }) })
|
|
24352
|
+
] }) }),
|
|
24353
|
+
/* @__PURE__ */ jsxs52(Dropdown.Content, { side: "bottom", align: "end", size, children: [
|
|
24354
|
+
/* @__PURE__ */ jsxs52(Dropdown.Item, { onSelect: onClear, children: [
|
|
24355
|
+
/* @__PURE__ */ jsx67(Dropdown.ItemIcon, { children: /* @__PURE__ */ jsx67(Icon, { name: "action.close" }) }),
|
|
24356
|
+
labels.clearSelection
|
|
24357
|
+
] }),
|
|
24358
|
+
/* @__PURE__ */ jsx67(Dropdown.Separator, {}),
|
|
24359
|
+
actions
|
|
24360
|
+
] })
|
|
24361
|
+
] });
|
|
24362
|
+
}
|
|
24363
|
+
|
|
24364
|
+
// src/components/data-table/StateRows.tsx
|
|
24365
|
+
import { jsx as jsx68, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
24032
24366
|
function StateRows({
|
|
24033
24367
|
state,
|
|
24034
24368
|
columns,
|
|
@@ -24044,28 +24378,28 @@ function StateRows({
|
|
|
24044
24378
|
skeletonRows
|
|
24045
24379
|
}) {
|
|
24046
24380
|
if (state === "error") {
|
|
24047
|
-
return /* @__PURE__ */
|
|
24381
|
+
return /* @__PURE__ */ jsx68("tr", { children: /* @__PURE__ */ jsx68("td", { colSpan: totalColumns, className: cx(DataTable_default.stateCell, DataTable_default.stateError), children: /* @__PURE__ */ jsx68("div", { className: DataTable_default.stateBox, children: /* @__PURE__ */ jsx68("div", { className: DataTable_default.stateContent, role: "alert", children: loadError }) }) }) });
|
|
24048
24382
|
}
|
|
24049
24383
|
if (state === "empty") {
|
|
24050
|
-
return /* @__PURE__ */
|
|
24384
|
+
return /* @__PURE__ */ jsx68("tr", { children: /* @__PURE__ */ jsx68("td", { colSpan: totalColumns, className: DataTable_default.stateCell, children: /* @__PURE__ */ jsx68("div", { className: DataTable_default.stateBox, children: empty == null || typeof empty === "string" ? /* @__PURE__ */ jsx68(EmptyPage.Root, { layout: "compact", size, role: "status", children: /* @__PURE__ */ jsx68(EmptyPage.Description, { children: empty ?? emptyLabel }) }) : /* @__PURE__ */ jsx68("div", { className: DataTable_default.stateContent, children: empty }) }) }) });
|
|
24051
24385
|
}
|
|
24052
24386
|
return Array.from({ length: skeletonRows }, (_, rowIndex) => (
|
|
24053
24387
|
// biome-ignore lint/suspicious/noArrayIndexKey: static placeholder rows
|
|
24054
|
-
/* @__PURE__ */
|
|
24055
|
-
gripStart ? /* @__PURE__ */
|
|
24056
|
-
selectable ? /* @__PURE__ */
|
|
24057
|
-
expandEnabled ? /* @__PURE__ */
|
|
24058
|
-
columns.map((column) => /* @__PURE__ */
|
|
24388
|
+
/* @__PURE__ */ jsxs53("tr", { className: cx(DataTable_default.row, DataTable_default.skeletonRow), "data-skeleton": "true", children: [
|
|
24389
|
+
gripStart ? /* @__PURE__ */ jsx68("td", { className: cx(DataTable_default.cell, DataTable_default.handleCell) }) : null,
|
|
24390
|
+
selectable ? /* @__PURE__ */ jsx68("td", { className: cx(DataTable_default.cell, DataTable_default.selectCell), children: /* @__PURE__ */ jsx68(Skeleton, { shape: "block", className: DataTable_default.skeletonChoice }) }) : null,
|
|
24391
|
+
expandEnabled ? /* @__PURE__ */ jsx68("td", { className: cx(DataTable_default.cell, DataTable_default.toggleCell) }) : null,
|
|
24392
|
+
columns.map((column) => /* @__PURE__ */ jsx68(
|
|
24059
24393
|
"td",
|
|
24060
24394
|
{
|
|
24061
24395
|
className: DataTable_default.cell,
|
|
24062
|
-
|
|
24396
|
+
...columnSizeProps(column),
|
|
24063
24397
|
"data-align": columnAlign(column),
|
|
24064
|
-
children: /* @__PURE__ */
|
|
24398
|
+
children: /* @__PURE__ */ jsx68(Skeleton, { className: DataTable_default.skeleton })
|
|
24065
24399
|
},
|
|
24066
24400
|
column.id
|
|
24067
24401
|
)),
|
|
24068
|
-
endCell ? /* @__PURE__ */
|
|
24402
|
+
endCell ? /* @__PURE__ */ jsx68("td", { className: cx(DataTable_default.cell, DataTable_default.endCell) }) : null
|
|
24069
24403
|
] }, rowIndex)
|
|
24070
24404
|
));
|
|
24071
24405
|
}
|
|
@@ -24122,8 +24456,15 @@ function unfreeze(table, frozen) {
|
|
|
24122
24456
|
}
|
|
24123
24457
|
function release(table) {
|
|
24124
24458
|
table.style.tableLayout = "";
|
|
24459
|
+
table.style.minWidth = "";
|
|
24460
|
+
table.dataset.measuring = "true";
|
|
24125
24461
|
for (const col of colsOf(table)) col.style.width = "";
|
|
24126
24462
|
}
|
|
24463
|
+
function measureReleased(table) {
|
|
24464
|
+
const result = measure2(table);
|
|
24465
|
+
delete table.dataset.measuring;
|
|
24466
|
+
return result;
|
|
24467
|
+
}
|
|
24127
24468
|
function measure2(table) {
|
|
24128
24469
|
const cols = colsOf(table);
|
|
24129
24470
|
const lead = table.tHead?.rows[0] ?? [...table.querySelectorAll(":scope > tbody > tr")].find(
|
|
@@ -24137,7 +24478,7 @@ function measure2(table) {
|
|
|
24137
24478
|
}
|
|
24138
24479
|
function freeze(table, frozen) {
|
|
24139
24480
|
release(table);
|
|
24140
|
-
const result =
|
|
24481
|
+
const result = measureReleased(table);
|
|
24141
24482
|
if (result) apply(table, frozen, result);
|
|
24142
24483
|
}
|
|
24143
24484
|
var refreeze = /* @__PURE__ */ new Map();
|
|
@@ -24154,7 +24495,7 @@ function scheduleRefreeze(table, frozen) {
|
|
|
24154
24495
|
node.style.minWidth = "";
|
|
24155
24496
|
release(node);
|
|
24156
24497
|
}
|
|
24157
|
-
const measured = tables.map(([node]) =>
|
|
24498
|
+
const measured = tables.map(([node]) => measureReleased(node));
|
|
24158
24499
|
tables.forEach(([node, state], index) => {
|
|
24159
24500
|
const result = measured[index];
|
|
24160
24501
|
if (result) apply(node, state, result);
|
|
@@ -24170,7 +24511,7 @@ function apply(table, frozen, { cols, measured, minimums }) {
|
|
|
24170
24511
|
cols.forEach((col, index) => {
|
|
24171
24512
|
const grows = col.dataset.grow === "true";
|
|
24172
24513
|
if (!grows) col.style.width = `${next[index]}px`;
|
|
24173
|
-
floor += grows ? minimums[index] ?? 0 : next[index] ?? 0;
|
|
24514
|
+
floor += grows ? Math.max(measured[index] ?? 0, minimums[index] ?? 0) : next[index] ?? 0;
|
|
24174
24515
|
});
|
|
24175
24516
|
table.style.tableLayout = "fixed";
|
|
24176
24517
|
table.style.minWidth = `${floor}px`;
|
|
@@ -24365,18 +24706,20 @@ function useRowSelection({
|
|
|
24365
24706
|
commit(next);
|
|
24366
24707
|
};
|
|
24367
24708
|
return {
|
|
24709
|
+
selectedKeys,
|
|
24368
24710
|
selectedSet,
|
|
24369
24711
|
allSelected,
|
|
24370
24712
|
someSelected: selectedInData > 0 && !allSelected,
|
|
24371
24713
|
announcement,
|
|
24372
24714
|
dragging: range.dragging,
|
|
24373
24715
|
toggleAll,
|
|
24716
|
+
clear: () => commit(/* @__PURE__ */ new Set()),
|
|
24374
24717
|
handlers
|
|
24375
24718
|
};
|
|
24376
24719
|
}
|
|
24377
24720
|
|
|
24378
24721
|
// src/components/data-table/DataTable.tsx
|
|
24379
|
-
import { jsx as
|
|
24722
|
+
import { jsx as jsx69, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
24380
24723
|
var DATA_TABLE_LABELS = {
|
|
24381
24724
|
loading: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445\u2026",
|
|
24382
24725
|
empty: "\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445 \u0434\u043B\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F.",
|
|
@@ -24386,6 +24729,8 @@ var DATA_TABLE_LABELS = {
|
|
|
24386
24729
|
selectAll: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435 \u0441\u0442\u0440\u043E\u043A\u0438",
|
|
24387
24730
|
selectRow: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 {label}",
|
|
24388
24731
|
selectedCount: "\u0412\u044B\u0431\u0440\u0430\u043D\u043E: {count}",
|
|
24732
|
+
selectionActions: "\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F",
|
|
24733
|
+
clearSelection: "\u0421\u043D\u044F\u0442\u044C \u0432\u044B\u0431\u043E\u0440",
|
|
24389
24734
|
expand: "\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 {label}",
|
|
24390
24735
|
collapse: "\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 {label}",
|
|
24391
24736
|
columns: "\u041A\u043E\u043B\u043E\u043D\u043A\u0438",
|
|
@@ -24493,6 +24838,7 @@ function DataTable({
|
|
|
24493
24838
|
loadingRows,
|
|
24494
24839
|
toolbar,
|
|
24495
24840
|
toolbarChips,
|
|
24841
|
+
renderSelectionActions,
|
|
24496
24842
|
getRowGroup,
|
|
24497
24843
|
renderGroupHeader,
|
|
24498
24844
|
stickyGroupHeaders = false,
|
|
@@ -24791,11 +25137,21 @@ function DataTable({
|
|
|
24791
25137
|
tableRef,
|
|
24792
25138
|
announce: (count) => formatLabel(labels.selectedCount, { count })
|
|
24793
25139
|
});
|
|
25140
|
+
const selectedKeys = selection.selectedKeys ?? EMPTY_KEYS;
|
|
25141
|
+
const showSelectionActions = renderSelectionActions != null && selectedKeys.length > 0;
|
|
25142
|
+
const selectionActions = usePartPresence({
|
|
25143
|
+
present: showSelectionActions,
|
|
25144
|
+
axis: "inline"
|
|
25145
|
+
});
|
|
25146
|
+
const hasToolbar = toolbar != null || toolbarChips != null || showSelectionActions;
|
|
25147
|
+
const toolbarPresence = usePartPresence({ present: hasToolbar, axis: "block" });
|
|
24794
25148
|
const hasError = loadError != null && loadError !== false;
|
|
24795
25149
|
const showSkeleton = !hasError && loading && displayedCount === 0;
|
|
24796
25150
|
const showEmpty = !hasError && !loading && displayedCount === 0;
|
|
24797
25151
|
const bodyState = hasError ? "error" : showSkeleton ? "loading" : showEmpty ? "empty" : "rows";
|
|
24798
|
-
const { key: bodyKey, className: swapClass } = useSwapIn(
|
|
25152
|
+
const { key: bodyKey, className: swapClass } = useSwapIn(
|
|
25153
|
+
bodyState === "loading" ? bodyState : `${bodyState}-${rowArrival.batch}`
|
|
25154
|
+
);
|
|
24799
25155
|
const rowHandle = reorder.enabled ? reorderHandle : null;
|
|
24800
25156
|
const gripStart = rowHandle === "start";
|
|
24801
25157
|
const gripEnd = rowHandle === "end";
|
|
@@ -24966,7 +25322,7 @@ function DataTable({
|
|
|
24966
25322
|
onReorder: (id, beforeId) => setOrderState(moveBefore(orderIds, id, beforeId, (each) => each)),
|
|
24967
25323
|
reset: orderIds.join("\0") === defaultOrder ? null : () => setOrderState(allColumns.map((column) => column.id))
|
|
24968
25324
|
} : null;
|
|
24969
|
-
const columnsMenuTrigger = menuInHead ? /* @__PURE__ */
|
|
25325
|
+
const columnsMenuTrigger = menuInHead ? /* @__PURE__ */ jsx69(
|
|
24970
25326
|
ColumnsMenu,
|
|
24971
25327
|
{
|
|
24972
25328
|
columns: orderedColumns,
|
|
@@ -24981,7 +25337,7 @@ function DataTable({
|
|
|
24981
25337
|
const rowOpens = Boolean(getRowHref || onRowClick);
|
|
24982
25338
|
const renderRow = (item, index, inWindow = false) => {
|
|
24983
25339
|
const opens = rowOpens && (isRowClickable?.(item.row) ?? true);
|
|
24984
|
-
return /* @__PURE__ */
|
|
25340
|
+
return /* @__PURE__ */ jsx69(
|
|
24985
25341
|
DataTableRow,
|
|
24986
25342
|
{
|
|
24987
25343
|
shared,
|
|
@@ -25008,7 +25364,7 @@ function DataTable({
|
|
|
25008
25364
|
};
|
|
25009
25365
|
const spacerRow = (key, height) => height > 0 ? (
|
|
25010
25366
|
// biome-ignore lint/a11y/noAriaHiddenOnFocusable: a spacer `<tr>` holds nothing focusable
|
|
25011
|
-
/* @__PURE__ */
|
|
25367
|
+
/* @__PURE__ */ jsx69("tr", { className: DataTable_default.spacerRow, "aria-hidden": "true", children: /* @__PURE__ */ jsx69("td", { colSpan: totalColumns, className: DataTable_default.spacerCell, style: { height } }) }, key)
|
|
25012
25368
|
) : null;
|
|
25013
25369
|
const renderWindow = () => {
|
|
25014
25370
|
const laid = rowGaps(virtual);
|
|
@@ -25028,7 +25384,7 @@ function DataTable({
|
|
|
25028
25384
|
const { key } = segment;
|
|
25029
25385
|
const group = groups.get(key);
|
|
25030
25386
|
const collapsed = collapsedSet.has(key);
|
|
25031
|
-
return /* @__PURE__ */
|
|
25387
|
+
return /* @__PURE__ */ jsx69(
|
|
25032
25388
|
GroupRow,
|
|
25033
25389
|
{
|
|
25034
25390
|
totalColumns,
|
|
@@ -25047,8 +25403,8 @@ function DataTable({
|
|
|
25047
25403
|
}
|
|
25048
25404
|
);
|
|
25049
25405
|
};
|
|
25050
|
-
return /* @__PURE__ */
|
|
25051
|
-
/* @__PURE__ */
|
|
25406
|
+
return /* @__PURE__ */ jsx69(ReorderRoot, { enabled: reorder.enabled || reorderColumns && showHeader, children: /* @__PURE__ */ jsx69(SurfaceDepthProvider, { value: depth, children: tier.provide(
|
|
25407
|
+
/* @__PURE__ */ jsxs54(
|
|
25052
25408
|
"div",
|
|
25053
25409
|
{
|
|
25054
25410
|
...rest,
|
|
@@ -25077,11 +25433,38 @@ function DataTable({
|
|
|
25077
25433
|
"scroll-height": fillHeight ? "fill" : void 0
|
|
25078
25434
|
}),
|
|
25079
25435
|
children: [
|
|
25080
|
-
|
|
25081
|
-
|
|
25082
|
-
|
|
25083
|
-
|
|
25084
|
-
|
|
25436
|
+
hasToolbar ? /* @__PURE__ */ jsxs54(
|
|
25437
|
+
"div",
|
|
25438
|
+
{
|
|
25439
|
+
ref: toolbarPresence.ref,
|
|
25440
|
+
className: cx(DataTable_default.toolbar, toolbarPresence.className),
|
|
25441
|
+
children: [
|
|
25442
|
+
toolbar != null || showSelectionActions ? /* @__PURE__ */ jsxs54(ToolRow, { children: [
|
|
25443
|
+
toolbar,
|
|
25444
|
+
showSelectionActions ? /* @__PURE__ */ jsx69(
|
|
25445
|
+
ToolCell,
|
|
25446
|
+
{
|
|
25447
|
+
ref: selectionActions.ref,
|
|
25448
|
+
className: selectionActions.className,
|
|
25449
|
+
children: /* @__PURE__ */ jsx69(
|
|
25450
|
+
SelectionMenu,
|
|
25451
|
+
{
|
|
25452
|
+
selected: selectedKeys,
|
|
25453
|
+
actions: renderSelectionActions(selectedKeys),
|
|
25454
|
+
onClear: selection.clear,
|
|
25455
|
+
labels,
|
|
25456
|
+
size
|
|
25457
|
+
}
|
|
25458
|
+
)
|
|
25459
|
+
},
|
|
25460
|
+
"\\u0000selection"
|
|
25461
|
+
) : null
|
|
25462
|
+
] }) : null,
|
|
25463
|
+
toolbarChips != null ? /* @__PURE__ */ jsx69(ToolChips, { children: toolbarChips }) : null
|
|
25464
|
+
]
|
|
25465
|
+
}
|
|
25466
|
+
) : null,
|
|
25467
|
+
/* @__PURE__ */ jsx69("div", { className: cx(fieldTierClass, DataTable_default.frame), "data-size": compactTier(size), children: /* @__PURE__ */ jsxs54(
|
|
25085
25468
|
ScrollContainer,
|
|
25086
25469
|
{
|
|
25087
25470
|
ref: scrollRef,
|
|
@@ -25092,7 +25475,7 @@ function DataTable({
|
|
|
25092
25475
|
"data-size": "xs",
|
|
25093
25476
|
style: { maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight },
|
|
25094
25477
|
children: [
|
|
25095
|
-
/* @__PURE__ */
|
|
25478
|
+
/* @__PURE__ */ jsxs54(
|
|
25096
25479
|
"table",
|
|
25097
25480
|
{
|
|
25098
25481
|
ref: mergedTableRef,
|
|
@@ -25102,14 +25485,14 @@ function DataTable({
|
|
|
25102
25485
|
"aria-rowcount": virtualized ? flatRows.length + headRows : void 0,
|
|
25103
25486
|
...columnHover,
|
|
25104
25487
|
children: [
|
|
25105
|
-
/* @__PURE__ */
|
|
25106
|
-
gripStart ? /* @__PURE__ */
|
|
25107
|
-
selectable ? /* @__PURE__ */
|
|
25108
|
-
expandEnabled ? /* @__PURE__ */
|
|
25109
|
-
columns.map((column) => /* @__PURE__ */
|
|
25110
|
-
endCell ? /* @__PURE__ */
|
|
25488
|
+
/* @__PURE__ */ jsxs54("colgroup", { children: [
|
|
25489
|
+
gripStart ? /* @__PURE__ */ jsx69("col", {}) : null,
|
|
25490
|
+
selectable ? /* @__PURE__ */ jsx69("col", {}) : null,
|
|
25491
|
+
expandEnabled ? /* @__PURE__ */ jsx69("col", {}) : null,
|
|
25492
|
+
columns.map((column) => /* @__PURE__ */ jsx69("col", { "data-grow": column.grow ? "true" : void 0 }, column.id)),
|
|
25493
|
+
endCell ? /* @__PURE__ */ jsx69("col", {}) : null
|
|
25111
25494
|
] }),
|
|
25112
|
-
showHeader ? /* @__PURE__ */
|
|
25495
|
+
showHeader ? /* @__PURE__ */ jsx69(
|
|
25113
25496
|
Head,
|
|
25114
25497
|
{
|
|
25115
25498
|
columns,
|
|
@@ -25134,7 +25517,7 @@ function DataTable({
|
|
|
25134
25517
|
} : void 0
|
|
25135
25518
|
}
|
|
25136
25519
|
) : null,
|
|
25137
|
-
reorder.enabled && bodyState === "rows" ? /* @__PURE__ */
|
|
25520
|
+
reorder.enabled && bodyState === "rows" ? /* @__PURE__ */ jsx69(React77.Fragment, { children: segments.map((segment) => /* @__PURE__ */ jsx69(
|
|
25138
25521
|
ReorderBody,
|
|
25139
25522
|
{
|
|
25140
25523
|
entries: segment.rows,
|
|
@@ -25148,10 +25531,10 @@ function DataTable({
|
|
|
25148
25531
|
className: swapClass
|
|
25149
25532
|
},
|
|
25150
25533
|
`group-${String(segment.key)}`
|
|
25151
|
-
)) }, bodyKey) : groups && bodyState === "rows" ? /* @__PURE__ */
|
|
25534
|
+
)) }, bodyKey) : groups && bodyState === "rows" ? /* @__PURE__ */ jsx69(React77.Fragment, { children: segments.map((segment) => /* @__PURE__ */ jsxs54("tbody", { className: swapClass, children: [
|
|
25152
25535
|
groupHeader(segment),
|
|
25153
25536
|
segment.rows.map(({ item, index }) => renderRow(item, index))
|
|
25154
|
-
] }, `group-${String(segment.key)}`)) }, bodyKey) : /* @__PURE__ */
|
|
25537
|
+
] }, `group-${String(segment.key)}`)) }, bodyKey) : /* @__PURE__ */ jsx69("tbody", { className: swapClass, ...trackFocus, children: bodyState === "rows" ? virtualized ? renderWindow() : flat.rows.map((item, index) => renderRow(item, index)) : /* @__PURE__ */ jsx69(
|
|
25155
25538
|
StateRows,
|
|
25156
25539
|
{
|
|
25157
25540
|
state: bodyState,
|
|
@@ -25171,7 +25554,7 @@ function DataTable({
|
|
|
25171
25554
|
)
|
|
25172
25555
|
}
|
|
25173
25556
|
) }, bodyKey),
|
|
25174
|
-
flat.measure.length > 0 && !hasError ? /* @__PURE__ */
|
|
25557
|
+
flat.measure.length > 0 && !hasError ? /* @__PURE__ */ jsx69(
|
|
25175
25558
|
MeasureBody,
|
|
25176
25559
|
{
|
|
25177
25560
|
rows: flat.measure,
|
|
@@ -25185,7 +25568,7 @@ function DataTable({
|
|
|
25185
25568
|
]
|
|
25186
25569
|
}
|
|
25187
25570
|
),
|
|
25188
|
-
infinite ? /* @__PURE__ */
|
|
25571
|
+
infinite ? /* @__PURE__ */ jsx69(
|
|
25189
25572
|
"div",
|
|
25190
25573
|
{
|
|
25191
25574
|
ref: infiniteRows.sentinelRef,
|
|
@@ -25196,9 +25579,9 @@ function DataTable({
|
|
|
25196
25579
|
]
|
|
25197
25580
|
}
|
|
25198
25581
|
) }),
|
|
25199
|
-
showSkeleton ? /* @__PURE__ */
|
|
25200
|
-
selectable ? /* @__PURE__ */
|
|
25201
|
-
/* @__PURE__ */
|
|
25582
|
+
showSkeleton ? /* @__PURE__ */ jsx69(VisuallyHidden, { live: "polite", children: labels.loading }) : null,
|
|
25583
|
+
selectable ? /* @__PURE__ */ jsx69(VisuallyHidden, { live: "polite", children: selection.announcement }) : null,
|
|
25584
|
+
/* @__PURE__ */ jsx69(
|
|
25202
25585
|
Footer,
|
|
25203
25586
|
{
|
|
25204
25587
|
range: showRange ? formatLabel(labels.range, {
|
|
@@ -25218,7 +25601,7 @@ function DataTable({
|
|
|
25218
25601
|
|
|
25219
25602
|
// src/components/data-table/DataTableColumnsMenu.tsx
|
|
25220
25603
|
import * as React78 from "react";
|
|
25221
|
-
import { jsx as
|
|
25604
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
25222
25605
|
var CHOOSER_LABELS = {
|
|
25223
25606
|
columns: DATA_TABLE_LABELS.columns,
|
|
25224
25607
|
showColumns: DATA_TABLE_LABELS.showColumns,
|
|
@@ -25251,7 +25634,7 @@ function DataTableColumnsMenu({
|
|
|
25251
25634
|
onReorder: (id, beforeId) => onColumnOrderChange(moveBefore(ids, id, beforeId, idOf3)),
|
|
25252
25635
|
reset: ids.join("\0") === defaultOrder.join("\0") ? null : () => onColumnOrderChange(defaultOrder)
|
|
25253
25636
|
} : null;
|
|
25254
|
-
return /* @__PURE__ */
|
|
25637
|
+
return /* @__PURE__ */ jsx70(
|
|
25255
25638
|
ColumnsMenu,
|
|
25256
25639
|
{
|
|
25257
25640
|
columns: ordered,
|
|
@@ -25281,7 +25664,7 @@ var DescriptionList_default = {
|
|
|
25281
25664
|
};
|
|
25282
25665
|
|
|
25283
25666
|
// src/components/description-list/DescriptionList.tsx
|
|
25284
|
-
import { Fragment as
|
|
25667
|
+
import { Fragment as Fragment37, jsx as jsx71, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
25285
25668
|
var DESCRIPTION_LIST_LABELS = {
|
|
25286
25669
|
empty: "\u2014",
|
|
25287
25670
|
emptyText: "\u041D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u043E"
|
|
@@ -25301,13 +25684,13 @@ function DescriptionListRoot({
|
|
|
25301
25684
|
}) {
|
|
25302
25685
|
const { size, provide } = useHostTier(sizeProp);
|
|
25303
25686
|
const mergedLabels = useLabels(DESCRIPTION_LIST_LABELS, labels);
|
|
25304
|
-
return /* @__PURE__ */
|
|
25687
|
+
return /* @__PURE__ */ jsx71(
|
|
25305
25688
|
"dl",
|
|
25306
25689
|
{
|
|
25307
25690
|
...rest,
|
|
25308
25691
|
className: cx(fieldTierClass, DescriptionList_default.root, className),
|
|
25309
25692
|
...toDataAttributes({ size, orientation, align: align === "end" ? align : void 0 }),
|
|
25310
|
-
children: /* @__PURE__ */
|
|
25693
|
+
children: /* @__PURE__ */ jsx71(DescriptionListContext.Provider, { value: { size, labels: mergedLabels }, children: provide(children) })
|
|
25311
25694
|
}
|
|
25312
25695
|
);
|
|
25313
25696
|
}
|
|
@@ -25321,21 +25704,21 @@ function DescriptionListItem({ label, children, className, ...rest }) {
|
|
|
25321
25704
|
);
|
|
25322
25705
|
const value = parts.filter((child) => child !== action);
|
|
25323
25706
|
const empty = value.length === 0 || value.every(isEmptyValue);
|
|
25324
|
-
return /* @__PURE__ */
|
|
25325
|
-
/* @__PURE__ */
|
|
25326
|
-
/* @__PURE__ */
|
|
25327
|
-
/* @__PURE__ */
|
|
25328
|
-
/* @__PURE__ */
|
|
25329
|
-
/* @__PURE__ */
|
|
25707
|
+
return /* @__PURE__ */ jsxs55("div", { ...rest, className: cx(DescriptionList_default.item, className), children: [
|
|
25708
|
+
/* @__PURE__ */ jsx71("dt", { className: DescriptionList_default.label, children: label }),
|
|
25709
|
+
/* @__PURE__ */ jsxs55("dd", { className: DescriptionList_default.value, "data-empty": empty || void 0, children: [
|
|
25710
|
+
/* @__PURE__ */ jsx71("span", { className: DescriptionList_default.text, children: empty ? /* @__PURE__ */ jsxs55(Fragment37, { children: [
|
|
25711
|
+
/* @__PURE__ */ jsx71("span", { "aria-hidden": "true", children: labels.empty }),
|
|
25712
|
+
/* @__PURE__ */ jsx71(VisuallyHidden, { children: labels.emptyText })
|
|
25330
25713
|
] }) : value }),
|
|
25331
|
-
action ? /* @__PURE__ */
|
|
25714
|
+
action ? /* @__PURE__ */ jsx71("span", { className: DescriptionList_default.action, children: action }) : null
|
|
25332
25715
|
] })
|
|
25333
25716
|
] });
|
|
25334
25717
|
}
|
|
25335
25718
|
DescriptionListItem.displayName = "DescriptionList.Item";
|
|
25336
25719
|
function DescriptionListItemAction({ label, children, ...rest }) {
|
|
25337
25720
|
const { size } = React79.useContext(DescriptionListContext);
|
|
25338
|
-
return /* @__PURE__ */
|
|
25721
|
+
return /* @__PURE__ */ jsx71(RowAction, { ...rest, label, size, children });
|
|
25339
25722
|
}
|
|
25340
25723
|
DescriptionListItemAction.displayName = "DescriptionList.ItemAction";
|
|
25341
25724
|
var DescriptionList = {
|
|
@@ -25356,7 +25739,7 @@ var DigitInput_default = {
|
|
|
25356
25739
|
};
|
|
25357
25740
|
|
|
25358
25741
|
// src/components/digit-input/DigitInput.tsx
|
|
25359
|
-
import { jsx as
|
|
25742
|
+
import { jsx as jsx72, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
25360
25743
|
var DIGIT_INPUT_LABELS = {
|
|
25361
25744
|
group: "\u041A\u043E\u0434",
|
|
25362
25745
|
cell: "\u0426\u0438\u0444\u0440\u0430 {index} \u0438\u0437 {length}",
|
|
@@ -25441,6 +25824,13 @@ function DigitInput({
|
|
|
25441
25824
|
if (next.length === length && !wasComplete) check(next);
|
|
25442
25825
|
};
|
|
25443
25826
|
const cells = Array.from({ length }, (_, index) => value[index] ?? "");
|
|
25827
|
+
const [mountCells] = React80.useState(cells);
|
|
25828
|
+
const [touched2, setTouched] = React80.useState(() => /* @__PURE__ */ new Set());
|
|
25829
|
+
const changed = cells.flatMap(
|
|
25830
|
+
(cell, index) => cell !== mountCells[index] && !touched2.has(index) ? [index] : []
|
|
25831
|
+
);
|
|
25832
|
+
if (changed.length > 0) setTouched(/* @__PURE__ */ new Set([...touched2, ...changed]));
|
|
25833
|
+
const inks = (index) => cells[index] !== "" && (touched2.has(index) || cells[index] !== mountCells[index]);
|
|
25444
25834
|
const inputRefs = React80.useRef([]);
|
|
25445
25835
|
const pendingFocusRef = React80.useRef(null);
|
|
25446
25836
|
React80.useLayoutEffect(() => {
|
|
@@ -25501,7 +25891,7 @@ function DigitInput({
|
|
|
25501
25891
|
commit(nextCells.join(""));
|
|
25502
25892
|
};
|
|
25503
25893
|
return tier.provide(
|
|
25504
|
-
/* @__PURE__ */
|
|
25894
|
+
/* @__PURE__ */ jsx72(
|
|
25505
25895
|
FieldFrame,
|
|
25506
25896
|
{
|
|
25507
25897
|
...rest,
|
|
@@ -25517,7 +25907,7 @@ function DigitInput({
|
|
|
25517
25907
|
optionalLabel: labels.optional,
|
|
25518
25908
|
className: cx(DigitInput_default.frame, className),
|
|
25519
25909
|
"data-full-width": fullWidth || void 0,
|
|
25520
|
-
children: /* @__PURE__ */
|
|
25910
|
+
children: /* @__PURE__ */ jsxs56(
|
|
25521
25911
|
"fieldset",
|
|
25522
25912
|
{
|
|
25523
25913
|
"aria-label": ids.labelledBy ? void 0 : labels.group,
|
|
@@ -25544,7 +25934,7 @@ function DigitInput({
|
|
|
25544
25934
|
if (!event.currentTarget.contains(event.relatedTarget)) setFocusIndex(null);
|
|
25545
25935
|
},
|
|
25546
25936
|
children: [
|
|
25547
|
-
/* @__PURE__ */
|
|
25937
|
+
/* @__PURE__ */ jsx72(
|
|
25548
25938
|
"span",
|
|
25549
25939
|
{
|
|
25550
25940
|
ref: ringRef,
|
|
@@ -25553,8 +25943,8 @@ function DigitInput({
|
|
|
25553
25943
|
"data-visible": focusIndex !== null || void 0
|
|
25554
25944
|
}
|
|
25555
25945
|
),
|
|
25556
|
-
name ? /* @__PURE__ */
|
|
25557
|
-
cells.map((cell, index) => /* @__PURE__ */
|
|
25946
|
+
name ? /* @__PURE__ */ jsx72("input", { type: "hidden", name, value }) : null,
|
|
25947
|
+
cells.map((cell, index) => /* @__PURE__ */ jsx72(
|
|
25558
25948
|
"input",
|
|
25559
25949
|
{
|
|
25560
25950
|
ref: (el) => {
|
|
@@ -25575,7 +25965,7 @@ function DigitInput({
|
|
|
25575
25965
|
fieldSurfaceClass,
|
|
25576
25966
|
fieldCodeCellClass,
|
|
25577
25967
|
DigitInput_default.cell,
|
|
25578
|
-
|
|
25968
|
+
inks(index) ? enterMotion_default.enterInk : void 0
|
|
25579
25969
|
),
|
|
25580
25970
|
"data-focus-ring": "false",
|
|
25581
25971
|
style: { "--digit-i": index },
|
|
@@ -25615,7 +26005,7 @@ function DigitInput({
|
|
|
25615
26005
|
},
|
|
25616
26006
|
index
|
|
25617
26007
|
)),
|
|
25618
|
-
/* @__PURE__ */
|
|
26008
|
+
/* @__PURE__ */ jsx72(VisuallyHidden, { live: "polite", children: verification?.state === "refused" ? verification.reason : "" })
|
|
25619
26009
|
]
|
|
25620
26010
|
}
|
|
25621
26011
|
)
|
|
@@ -25630,10 +26020,10 @@ var Drawer_default = {
|
|
|
25630
26020
|
};
|
|
25631
26021
|
|
|
25632
26022
|
// src/components/drawer/Drawer.tsx
|
|
25633
|
-
import { jsx as
|
|
26023
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
25634
26024
|
function DrawerRoot({ children, ...options }) {
|
|
25635
26025
|
const state = useDialogRoot(options);
|
|
25636
|
-
return /* @__PURE__ */
|
|
26026
|
+
return /* @__PURE__ */ jsx73(DialogRootProvider, { value: state, children });
|
|
25637
26027
|
}
|
|
25638
26028
|
DrawerRoot.displayName = "Drawer.Root";
|
|
25639
26029
|
function DrawerContent({
|
|
@@ -25641,7 +26031,7 @@ function DrawerContent({
|
|
|
25641
26031
|
size = OVERLAY_CONTENT_SIZE,
|
|
25642
26032
|
...props
|
|
25643
26033
|
}) {
|
|
25644
|
-
return /* @__PURE__ */
|
|
26034
|
+
return /* @__PURE__ */ jsx73(
|
|
25645
26035
|
DialogPanel,
|
|
25646
26036
|
{
|
|
25647
26037
|
...props,
|
|
@@ -25649,6 +26039,7 @@ function DrawerContent({
|
|
|
25649
26039
|
panelClassName: Drawer_default.panel,
|
|
25650
26040
|
swipe: "never",
|
|
25651
26041
|
footerLayout: "end",
|
|
26042
|
+
focusStart: "container",
|
|
25652
26043
|
"data-side": side,
|
|
25653
26044
|
"data-size": size
|
|
25654
26045
|
}
|
|
@@ -25702,7 +26093,7 @@ var ExampleFrame_default = {
|
|
|
25702
26093
|
};
|
|
25703
26094
|
|
|
25704
26095
|
// src/components/example-frame/ExampleFrame.tsx
|
|
25705
|
-
import { jsx as
|
|
26096
|
+
import { jsx as jsx74, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
25706
26097
|
var VIEWPORTS = ["desktop", "tablet", "mobile"];
|
|
25707
26098
|
var EXAMPLE_FRAME_LABELS = {
|
|
25708
26099
|
paneSwitch: "\u0412\u0438\u0434 \u043F\u0440\u0438\u043C\u0435\u0440\u0430",
|
|
@@ -25839,8 +26230,8 @@ function ExampleFrame({
|
|
|
25839
26230
|
previousScheme.current = colorScheme;
|
|
25840
26231
|
if (rootRef.current) suspendTransitions(rootRef.current);
|
|
25841
26232
|
}, [colorScheme]);
|
|
25842
|
-
return /* @__PURE__ */
|
|
25843
|
-
/* @__PURE__ */
|
|
26233
|
+
return /* @__PURE__ */ jsxs57("div", { ...rest, ref: mergedRef, className: cx(ExampleFrame_default.root, className), "data-depth": depth, children: [
|
|
26234
|
+
/* @__PURE__ */ jsx74(
|
|
25844
26235
|
ExampleFrameToolbar,
|
|
25845
26236
|
{
|
|
25846
26237
|
code,
|
|
@@ -25854,7 +26245,7 @@ function ExampleFrame({
|
|
|
25854
26245
|
onCopy
|
|
25855
26246
|
}
|
|
25856
26247
|
),
|
|
25857
|
-
/* @__PURE__ */
|
|
26248
|
+
/* @__PURE__ */ jsx74(RegionSwap, { state: pane, children: pane === "preview" ? /* @__PURE__ */ jsx74("div", { className: ExampleFrame_default.previewViewport, "data-viewport": viewport2, children: /* @__PURE__ */ jsx74(
|
|
25858
26249
|
ScrollContainer,
|
|
25859
26250
|
{
|
|
25860
26251
|
ref: stageRef,
|
|
@@ -25864,12 +26255,12 @@ function ExampleFrame({
|
|
|
25864
26255
|
"data-preview-layout": previewLayout,
|
|
25865
26256
|
"data-theme": colorScheme,
|
|
25866
26257
|
"data-depth": stageDepth,
|
|
25867
|
-
children: /* @__PURE__ */
|
|
26258
|
+
children: /* @__PURE__ */ jsx74(SurfaceDepthProvider, { value: stageDepth, children: /* @__PURE__ */ jsx74(AppShellBoundary, { children }) })
|
|
25868
26259
|
}
|
|
25869
26260
|
) }) : (
|
|
25870
26261
|
// Plain CodeBlock is not focusable itself; the scrolling pane takes keyboard focus
|
|
25871
26262
|
// instead. The pane carries the theme, so the block inherits it (and trims the source).
|
|
25872
|
-
/* @__PURE__ */
|
|
26263
|
+
/* @__PURE__ */ jsx74(
|
|
25873
26264
|
ScrollContainer,
|
|
25874
26265
|
{
|
|
25875
26266
|
as: "section",
|
|
@@ -25879,7 +26270,7 @@ function ExampleFrame({
|
|
|
25879
26270
|
"data-theme": colorScheme,
|
|
25880
26271
|
tabIndex: 0,
|
|
25881
26272
|
"aria-label": labels.codeRegion,
|
|
25882
|
-
children: /* @__PURE__ */
|
|
26273
|
+
children: /* @__PURE__ */ jsx74(CodeBlock, { variant: "ghost", code })
|
|
25883
26274
|
}
|
|
25884
26275
|
)
|
|
25885
26276
|
) })
|
|
@@ -25918,9 +26309,9 @@ function ExampleFrameToolbar({
|
|
|
25918
26309
|
const copyLabel = copyState === "copied" ? labels.copied : copyState === "error" ? labels.copyError : labels.copy;
|
|
25919
26310
|
const themeGlyph = colorScheme === "light" ? "theme.dark" : "theme.light";
|
|
25920
26311
|
const copyGlyph = copyState === "copied" ? "action.check" : "action.copy";
|
|
25921
|
-
return /* @__PURE__ */
|
|
25922
|
-
/* @__PURE__ */
|
|
25923
|
-
/* @__PURE__ */
|
|
26312
|
+
return /* @__PURE__ */ jsxs57("div", { ref: toolbarRef, className: ExampleFrame_default.toolbar, "data-narrow": narrow || void 0, children: [
|
|
26313
|
+
/* @__PURE__ */ jsxs57("div", { className: ExampleFrame_default.toolbarLine1, children: [
|
|
26314
|
+
/* @__PURE__ */ jsxs57(
|
|
25924
26315
|
SegmentedControl.Root,
|
|
25925
26316
|
{
|
|
25926
26317
|
className: ExampleFrame_default.toolbarPaneSegment,
|
|
@@ -25930,19 +26321,19 @@ function ExampleFrameToolbar({
|
|
|
25930
26321
|
size: "s",
|
|
25931
26322
|
"aria-label": labels.paneSwitch,
|
|
25932
26323
|
children: [
|
|
25933
|
-
/* @__PURE__ */
|
|
25934
|
-
/* @__PURE__ */
|
|
26324
|
+
/* @__PURE__ */ jsxs57(SegmentedControl.Item, { value: "preview", children: [
|
|
26325
|
+
/* @__PURE__ */ jsx74(SegmentedControl.Icon, { children: /* @__PURE__ */ jsx74(Icon, { name: "view.preview" }) }),
|
|
25935
26326
|
labels.preview
|
|
25936
26327
|
] }),
|
|
25937
|
-
/* @__PURE__ */
|
|
25938
|
-
/* @__PURE__ */
|
|
26328
|
+
/* @__PURE__ */ jsxs57(SegmentedControl.Item, { value: "code", children: [
|
|
26329
|
+
/* @__PURE__ */ jsx74(SegmentedControl.Icon, { children: /* @__PURE__ */ jsx74(Icon, { name: "view.code" }) }),
|
|
25939
26330
|
labels.code
|
|
25940
26331
|
] })
|
|
25941
26332
|
]
|
|
25942
26333
|
}
|
|
25943
26334
|
),
|
|
25944
|
-
/* @__PURE__ */
|
|
25945
|
-
onColorSchemeChange ? /* @__PURE__ */
|
|
26335
|
+
/* @__PURE__ */ jsxs57("div", { className: ExampleFrame_default.toolbarLine1End, children: [
|
|
26336
|
+
onColorSchemeChange ? /* @__PURE__ */ jsx74(
|
|
25946
26337
|
Button.Root,
|
|
25947
26338
|
{
|
|
25948
26339
|
variant: "soft",
|
|
@@ -25951,10 +26342,10 @@ function ExampleFrameToolbar({
|
|
|
25951
26342
|
size: "s",
|
|
25952
26343
|
onClick: () => onColorSchemeChange(colorScheme === "light" ? "dark" : "light"),
|
|
25953
26344
|
"aria-label": colorScheme === "light" ? labels.themeDark : labels.themeLight,
|
|
25954
|
-
children: /* @__PURE__ */
|
|
26345
|
+
children: /* @__PURE__ */ jsx74(Button.Icon, { children: /* @__PURE__ */ jsx74(Icon, { name: themeGlyph, size: "s", tone: "secondary" }) })
|
|
25955
26346
|
}
|
|
25956
26347
|
) : null,
|
|
25957
|
-
/* @__PURE__ */
|
|
26348
|
+
/* @__PURE__ */ jsx74(
|
|
25958
26349
|
Button.Root,
|
|
25959
26350
|
{
|
|
25960
26351
|
variant: "soft",
|
|
@@ -25963,12 +26354,12 @@ function ExampleFrameToolbar({
|
|
|
25963
26354
|
size: "s",
|
|
25964
26355
|
onClick: handleCopy,
|
|
25965
26356
|
"aria-label": copyLabel,
|
|
25966
|
-
children: /* @__PURE__ */
|
|
26357
|
+
children: /* @__PURE__ */ jsx74(Button.Icon, { "data-copy-state": copyState, children: /* @__PURE__ */ jsx74(Icon, { name: copyGlyph, size: "s", tone: "secondary" }) })
|
|
25967
26358
|
}
|
|
25968
26359
|
)
|
|
25969
26360
|
] })
|
|
25970
26361
|
] }),
|
|
25971
|
-
pane === "preview" ? /* @__PURE__ */
|
|
26362
|
+
pane === "preview" ? /* @__PURE__ */ jsx74(
|
|
25972
26363
|
SegmentedControl.Root,
|
|
25973
26364
|
{
|
|
25974
26365
|
className: ExampleFrame_default.toolbarViewportSegment,
|
|
@@ -25977,8 +26368,8 @@ function ExampleFrameToolbar({
|
|
|
25977
26368
|
onValueChange: (v) => onViewportChange(v),
|
|
25978
26369
|
size: "s",
|
|
25979
26370
|
"aria-label": labels.viewportSwitch,
|
|
25980
|
-
children: VIEWPORTS.map((option) => /* @__PURE__ */
|
|
25981
|
-
/* @__PURE__ */
|
|
26371
|
+
children: VIEWPORTS.map((option) => /* @__PURE__ */ jsxs57(SegmentedControl.Item, { value: option, children: [
|
|
26372
|
+
/* @__PURE__ */ jsx74(SegmentedControl.Icon, { children: /* @__PURE__ */ jsx74(Icon, { name: `viewport.${option}` }) }),
|
|
25982
26373
|
labels[option]
|
|
25983
26374
|
] }, option))
|
|
25984
26375
|
}
|
|
@@ -26016,7 +26407,7 @@ var FieldList_default = {
|
|
|
26016
26407
|
};
|
|
26017
26408
|
|
|
26018
26409
|
// src/components/field-list/FieldList.tsx
|
|
26019
|
-
import { Fragment as
|
|
26410
|
+
import { Fragment as Fragment39, jsx as jsx75, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
26020
26411
|
var FIELD_LIST_LABELS = {
|
|
26021
26412
|
remove: "\u0423\u0434\u0430\u043B\u0438\u0442\u044C: {row}",
|
|
26022
26413
|
reorder: "\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C: {row}",
|
|
@@ -26069,7 +26460,7 @@ var flipRows2 = (list) => list.querySelectorAll(":scope > li[data-fl-row]:not([d
|
|
|
26069
26460
|
var flipRowKey2 = (row) => row.dataset.flRow;
|
|
26070
26461
|
var GRIP_TIER = "xs";
|
|
26071
26462
|
function GripBox({ children }) {
|
|
26072
|
-
return /* @__PURE__ */
|
|
26463
|
+
return /* @__PURE__ */ jsx75("span", { className: cx(fieldTierClass, FieldList_default.grip), "data-size": GRIP_TIER, children });
|
|
26073
26464
|
}
|
|
26074
26465
|
function placesOf(columns) {
|
|
26075
26466
|
const main = columns.findIndex((column) => column.width !== "compact");
|
|
@@ -26311,8 +26702,8 @@ function FieldList({
|
|
|
26311
26702
|
if (menu) {
|
|
26312
26703
|
const canUp = canMove(index, -1);
|
|
26313
26704
|
const canDown = canMove(index, 1);
|
|
26314
|
-
action = /* @__PURE__ */
|
|
26315
|
-
/* @__PURE__ */
|
|
26705
|
+
action = /* @__PURE__ */ jsxs58(Dropdown.Root, { children: [
|
|
26706
|
+
/* @__PURE__ */ jsx75(Dropdown.Trigger, { children: /* @__PURE__ */ jsx75(
|
|
26316
26707
|
Button.Root,
|
|
26317
26708
|
{
|
|
26318
26709
|
variant: "ghost",
|
|
@@ -26327,32 +26718,32 @@ function FieldList({
|
|
|
26327
26718
|
event.preventDefault();
|
|
26328
26719
|
move(id, event.key === "ArrowUp" ? -1 : 1);
|
|
26329
26720
|
},
|
|
26330
|
-
children: /* @__PURE__ */
|
|
26721
|
+
children: /* @__PURE__ */ jsx75(Button.Icon, { children: /* @__PURE__ */ jsx75(Icon, { name: "action.more" }) })
|
|
26331
26722
|
}
|
|
26332
26723
|
) }),
|
|
26333
|
-
/* @__PURE__ */
|
|
26334
|
-
reorderable ? /* @__PURE__ */
|
|
26335
|
-
/* @__PURE__ */
|
|
26336
|
-
/* @__PURE__ */
|
|
26724
|
+
/* @__PURE__ */ jsxs58(Dropdown.Content, { align: "end", children: [
|
|
26725
|
+
reorderable ? /* @__PURE__ */ jsxs58(Fragment39, { children: [
|
|
26726
|
+
/* @__PURE__ */ jsxs58(Dropdown.Item, { disabled: !canUp, onSelect: () => move(id, -1), children: [
|
|
26727
|
+
/* @__PURE__ */ jsx75(Dropdown.ItemIcon, { children: /* @__PURE__ */ jsx75(Icon, { name: "nav.chevronUp" }) }),
|
|
26337
26728
|
labels.moveUp,
|
|
26338
|
-
/* @__PURE__ */
|
|
26729
|
+
/* @__PURE__ */ jsx75(Dropdown.ItemShortcut, { children: "Alt \u2191" })
|
|
26339
26730
|
] }),
|
|
26340
|
-
/* @__PURE__ */
|
|
26341
|
-
/* @__PURE__ */
|
|
26731
|
+
/* @__PURE__ */ jsxs58(Dropdown.Item, { disabled: !canDown, onSelect: () => move(id, 1), children: [
|
|
26732
|
+
/* @__PURE__ */ jsx75(Dropdown.ItemIcon, { children: /* @__PURE__ */ jsx75(Icon, { name: "nav.chevronDown" }) }),
|
|
26342
26733
|
labels.moveDown,
|
|
26343
|
-
/* @__PURE__ */
|
|
26734
|
+
/* @__PURE__ */ jsx75(Dropdown.ItemShortcut, { children: "Alt \u2193" })
|
|
26344
26735
|
] }),
|
|
26345
|
-
/* @__PURE__ */
|
|
26736
|
+
/* @__PURE__ */ jsx75(Dropdown.Separator, {})
|
|
26346
26737
|
] }) : null,
|
|
26347
|
-
/* @__PURE__ */
|
|
26348
|
-
/* @__PURE__ */
|
|
26738
|
+
/* @__PURE__ */ jsxs58(Dropdown.Item, { tone: "danger", disabled: removeOff, onSelect: () => remove(id), children: [
|
|
26739
|
+
/* @__PURE__ */ jsx75(Dropdown.ItemIcon, { children: /* @__PURE__ */ jsx75(Icon, { name: "action.delete" }) }),
|
|
26349
26740
|
labels.removeItem,
|
|
26350
|
-
reason ? /* @__PURE__ */
|
|
26741
|
+
reason ? /* @__PURE__ */ jsx75(Dropdown.ItemDescription, { children: reason }) : null
|
|
26351
26742
|
] })
|
|
26352
26743
|
] })
|
|
26353
26744
|
] });
|
|
26354
26745
|
} else {
|
|
26355
|
-
const removeButton = /* @__PURE__ */
|
|
26746
|
+
const removeButton = /* @__PURE__ */ jsx75(
|
|
26356
26747
|
Button.Root,
|
|
26357
26748
|
{
|
|
26358
26749
|
variant: "ghost",
|
|
@@ -26361,22 +26752,22 @@ function FieldList({
|
|
|
26361
26752
|
disabled: removeOff,
|
|
26362
26753
|
onClick: () => remove(id),
|
|
26363
26754
|
"data-fl-action": "",
|
|
26364
|
-
children: /* @__PURE__ */
|
|
26755
|
+
children: /* @__PURE__ */ jsx75(Button.Icon, { children: /* @__PURE__ */ jsx75(Icon, { name: "action.close" }) })
|
|
26365
26756
|
}
|
|
26366
26757
|
);
|
|
26367
|
-
action = reason ? /* @__PURE__ */
|
|
26368
|
-
/* @__PURE__ */
|
|
26369
|
-
/* @__PURE__ */
|
|
26758
|
+
action = reason ? /* @__PURE__ */ jsxs58(Tooltip.Root, { children: [
|
|
26759
|
+
/* @__PURE__ */ jsx75(Tooltip.Trigger, { children: removeButton }),
|
|
26760
|
+
/* @__PURE__ */ jsx75(Tooltip.Content, { children: reason })
|
|
26370
26761
|
] }) : removeButton;
|
|
26371
26762
|
}
|
|
26372
|
-
const content = /* @__PURE__ */
|
|
26373
|
-
/* @__PURE__ */
|
|
26763
|
+
const content = /* @__PURE__ */ jsxs58(Fragment39, { children: [
|
|
26764
|
+
/* @__PURE__ */ jsx75("div", { className: FieldList_default.cells, "data-fl-cells": "", children: cells.map((cell, column) => {
|
|
26374
26765
|
const heading = columns[column];
|
|
26375
|
-
return /* @__PURE__ */
|
|
26766
|
+
return /* @__PURE__ */ jsx75(
|
|
26376
26767
|
FieldCellContext,
|
|
26377
26768
|
{
|
|
26378
26769
|
value: cellValue(heading?.label ?? "", single, Boolean(heading?.required)),
|
|
26379
|
-
children: /* @__PURE__ */
|
|
26770
|
+
children: /* @__PURE__ */ jsx75(
|
|
26380
26771
|
"div",
|
|
26381
26772
|
{
|
|
26382
26773
|
className: FieldList_default.cell,
|
|
@@ -26389,8 +26780,8 @@ function FieldList({
|
|
|
26389
26780
|
column
|
|
26390
26781
|
);
|
|
26391
26782
|
}) }),
|
|
26392
|
-
/* @__PURE__ */
|
|
26393
|
-
grip ? /* @__PURE__ */
|
|
26783
|
+
/* @__PURE__ */ jsx75("span", { className: FieldList_default.end, children: action }),
|
|
26784
|
+
grip ? /* @__PURE__ */ jsx75(GripBox, { children: /* @__PURE__ */ jsx75(
|
|
26394
26785
|
Dnd.Handle,
|
|
26395
26786
|
{
|
|
26396
26787
|
"aria-label": formatLabel(labels.reorder, { row: name }),
|
|
@@ -26425,9 +26816,9 @@ function FieldList({
|
|
|
26425
26816
|
"data-locked": locked || void 0,
|
|
26426
26817
|
"data-single": single || void 0
|
|
26427
26818
|
};
|
|
26428
|
-
return grip ? /* @__PURE__ */
|
|
26819
|
+
return grip ? /* @__PURE__ */ jsx75(Dnd.SortableItem, { id, locked, ...rowProps, children: content }, id) : /* @__PURE__ */ jsx75("li", { ...rowProps, children: content }, id);
|
|
26429
26820
|
};
|
|
26430
|
-
const sheet = /* @__PURE__ */
|
|
26821
|
+
const sheet = /* @__PURE__ */ jsxs58(
|
|
26431
26822
|
"div",
|
|
26432
26823
|
{
|
|
26433
26824
|
className: FieldList_default.sheet,
|
|
@@ -26435,7 +26826,7 @@ function FieldList({
|
|
|
26435
26826
|
"data-depth": surface ? depth : void 0,
|
|
26436
26827
|
"data-empty": items.length === 0 || void 0,
|
|
26437
26828
|
children: [
|
|
26438
|
-
hasHead ? /* @__PURE__ */
|
|
26829
|
+
hasHead ? /* @__PURE__ */ jsxs58(
|
|
26439
26830
|
"div",
|
|
26440
26831
|
{
|
|
26441
26832
|
ref: head.ref,
|
|
@@ -26444,7 +26835,7 @@ function FieldList({
|
|
|
26444
26835
|
"data-size": size,
|
|
26445
26836
|
"aria-hidden": "true",
|
|
26446
26837
|
children: [
|
|
26447
|
-
/* @__PURE__ */
|
|
26838
|
+
/* @__PURE__ */ jsx75("div", { className: FieldList_default.cells, children: columns.map((column, index) => /* @__PURE__ */ jsx75(
|
|
26448
26839
|
Label.Root,
|
|
26449
26840
|
{
|
|
26450
26841
|
size,
|
|
@@ -26457,12 +26848,12 @@ function FieldList({
|
|
|
26457
26848
|
},
|
|
26458
26849
|
index
|
|
26459
26850
|
)) }),
|
|
26460
|
-
/* @__PURE__ */
|
|
26461
|
-
grip ? /* @__PURE__ */
|
|
26851
|
+
/* @__PURE__ */ jsx75("span", {}),
|
|
26852
|
+
grip ? /* @__PURE__ */ jsx75(GripBox, {}) : null
|
|
26462
26853
|
]
|
|
26463
26854
|
}
|
|
26464
26855
|
) : null,
|
|
26465
|
-
grip ? /* @__PURE__ */
|
|
26856
|
+
grip ? /* @__PURE__ */ jsx75(Dnd.Root, { children: /* @__PURE__ */ jsx75(
|
|
26466
26857
|
Dnd.Sortable,
|
|
26467
26858
|
{
|
|
26468
26859
|
role: "list",
|
|
@@ -26477,7 +26868,7 @@ function FieldList({
|
|
|
26477
26868
|
onReorder: (id, beforeId) => setItems((current) => moveBefore(current, id, beforeId, getId)),
|
|
26478
26869
|
renderItem: renderRow
|
|
26479
26870
|
}
|
|
26480
|
-
) }) : /* @__PURE__ */
|
|
26871
|
+
) }) : /* @__PURE__ */ jsx75(
|
|
26481
26872
|
"ol",
|
|
26482
26873
|
{
|
|
26483
26874
|
ref: setListElement,
|
|
@@ -26489,7 +26880,7 @@ function FieldList({
|
|
|
26489
26880
|
),
|
|
26490
26881
|
totalCells ? (
|
|
26491
26882
|
// biome-ignore lint/a11y/useSemanticElements: a row of figures, not a form fieldset
|
|
26492
|
-
/* @__PURE__ */
|
|
26883
|
+
/* @__PURE__ */ jsxs58(
|
|
26493
26884
|
"div",
|
|
26494
26885
|
{
|
|
26495
26886
|
ref: totals.ref,
|
|
@@ -26499,29 +26890,29 @@ function FieldList({
|
|
|
26499
26890
|
style: trackStyle,
|
|
26500
26891
|
"data-size": size,
|
|
26501
26892
|
children: [
|
|
26502
|
-
/* @__PURE__ */
|
|
26893
|
+
/* @__PURE__ */ jsx75("div", { className: FieldList_default.cells, children: totalCells.map((total, column) => {
|
|
26503
26894
|
const heading = columns[column];
|
|
26504
26895
|
const shown = hasContent(total);
|
|
26505
|
-
return /* @__PURE__ */
|
|
26896
|
+
return /* @__PURE__ */ jsx75(
|
|
26506
26897
|
"div",
|
|
26507
26898
|
{
|
|
26508
26899
|
className: cx(FieldList_default.cell, FieldList_default.total),
|
|
26509
26900
|
"data-width": heading?.width ?? "fill",
|
|
26510
26901
|
"data-empty": !shown && column > 0 || void 0,
|
|
26511
26902
|
"data-align": endColumns[column] === "1" ? "end" : void 0,
|
|
26512
|
-
children: shown ? /* @__PURE__ */
|
|
26513
|
-
/* @__PURE__ */
|
|
26514
|
-
/* @__PURE__ */
|
|
26903
|
+
children: shown ? /* @__PURE__ */ jsxs58(Fragment39, { children: [
|
|
26904
|
+
/* @__PURE__ */ jsx75("span", { className: cx(visuallyHiddenClass, FieldList_default.totalName), children: heading?.label }),
|
|
26905
|
+
/* @__PURE__ */ jsx75("span", { className: FieldList_default.totalValue, children: total })
|
|
26515
26906
|
] }) : column === 0 ? (
|
|
26516
26907
|
// The group's name says it to screen readers.
|
|
26517
|
-
/* @__PURE__ */
|
|
26908
|
+
/* @__PURE__ */ jsx75("span", { className: FieldList_default.totalsLabel, "aria-hidden": "true", children: labels.totals })
|
|
26518
26909
|
) : null
|
|
26519
26910
|
},
|
|
26520
26911
|
column
|
|
26521
26912
|
);
|
|
26522
26913
|
}) }),
|
|
26523
|
-
/* @__PURE__ */
|
|
26524
|
-
grip ? /* @__PURE__ */
|
|
26914
|
+
/* @__PURE__ */ jsx75("span", { className: cx(FieldList_default.end, FieldList_default.totalsEnd) }),
|
|
26915
|
+
grip ? /* @__PURE__ */ jsx75(GripBox, {}) : null
|
|
26525
26916
|
]
|
|
26526
26917
|
}
|
|
26527
26918
|
)
|
|
@@ -26530,7 +26921,7 @@ function FieldList({
|
|
|
26530
26921
|
}
|
|
26531
26922
|
);
|
|
26532
26923
|
return tier.provide(
|
|
26533
|
-
/* @__PURE__ */
|
|
26924
|
+
/* @__PURE__ */ jsx75(DisabledProvider, { disabled, children: /* @__PURE__ */ jsx75(
|
|
26534
26925
|
FieldFrame,
|
|
26535
26926
|
{
|
|
26536
26927
|
...rest,
|
|
@@ -26546,10 +26937,10 @@ function FieldList({
|
|
|
26546
26937
|
group: true,
|
|
26547
26938
|
className: cx(FieldList_default.root, className),
|
|
26548
26939
|
...toDataAttributes({ disabled: disabled || void 0 }),
|
|
26549
|
-
children: /* @__PURE__ */
|
|
26550
|
-
surface ? /* @__PURE__ */
|
|
26551
|
-
createItem ? /* @__PURE__ */
|
|
26552
|
-
/* @__PURE__ */
|
|
26940
|
+
children: /* @__PURE__ */ jsxs58("div", { ref: bodyRef, className: FieldList_default.body, children: [
|
|
26941
|
+
surface ? /* @__PURE__ */ jsx75(SurfaceDepthProvider, { value: depth, children: sheet }) : sheet,
|
|
26942
|
+
createItem ? /* @__PURE__ */ jsxs58("div", { className: FieldList_default.add, children: [
|
|
26943
|
+
/* @__PURE__ */ jsxs58(
|
|
26553
26944
|
Button.Root,
|
|
26554
26945
|
{
|
|
26555
26946
|
ref: addRef,
|
|
@@ -26558,14 +26949,14 @@ function FieldList({
|
|
|
26558
26949
|
disabled: disabled || atMax,
|
|
26559
26950
|
onClick: add,
|
|
26560
26951
|
children: [
|
|
26561
|
-
/* @__PURE__ */
|
|
26952
|
+
/* @__PURE__ */ jsx75(Button.Icon, { children: /* @__PURE__ */ jsx75(Icon, { name: "action.add" }) }),
|
|
26562
26953
|
addLabel
|
|
26563
26954
|
]
|
|
26564
26955
|
}
|
|
26565
26956
|
),
|
|
26566
|
-
atMax && max !== void 0 ? /* @__PURE__ */
|
|
26957
|
+
atMax && max !== void 0 ? /* @__PURE__ */ jsx75("span", { className: cx(textRole_default.caption, FieldList_default.limit), children: formatLabel(labels.maxReached, { max }) }) : null
|
|
26567
26958
|
] }) : null,
|
|
26568
|
-
menu && reorderable ? /* @__PURE__ */
|
|
26959
|
+
menu && reorderable ? /* @__PURE__ */ jsx75(VisuallyHidden, { live: "polite", children: announcement }) : null
|
|
26569
26960
|
] })
|
|
26570
26961
|
}
|
|
26571
26962
|
) })
|
|
@@ -26596,7 +26987,7 @@ var Fieldset_default = {
|
|
|
26596
26987
|
};
|
|
26597
26988
|
|
|
26598
26989
|
// src/components/fieldset/Fieldset.tsx
|
|
26599
|
-
import { jsx as
|
|
26990
|
+
import { jsx as jsx76, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
26600
26991
|
function Fieldset({
|
|
26601
26992
|
label,
|
|
26602
26993
|
description,
|
|
@@ -26610,7 +27001,7 @@ function Fieldset({
|
|
|
26610
27001
|
const descriptionId = React83.useId();
|
|
26611
27002
|
const hasDescription = hasContent(description);
|
|
26612
27003
|
const describedBy = [ariaDescribedBy, hasDescription ? descriptionId : void 0].filter(Boolean).join(" ") || void 0;
|
|
26613
|
-
return /* @__PURE__ */
|
|
27004
|
+
return /* @__PURE__ */ jsxs59(
|
|
26614
27005
|
"fieldset",
|
|
26615
27006
|
{
|
|
26616
27007
|
...rest,
|
|
@@ -26619,10 +27010,10 @@ function Fieldset({
|
|
|
26619
27010
|
"aria-describedby": describedBy,
|
|
26620
27011
|
...toDataAttributes({ disabled: disabled || void 0 }),
|
|
26621
27012
|
children: [
|
|
26622
|
-
hasContent(label) ? /* @__PURE__ */
|
|
26623
|
-
/* @__PURE__ */
|
|
26624
|
-
hasDescription ? /* @__PURE__ */
|
|
26625
|
-
/* @__PURE__ */
|
|
27013
|
+
hasContent(label) ? /* @__PURE__ */ jsx76("legend", { className: cx(textRole_default.titleS, Fieldset_default.legend), children: label }) : null,
|
|
27014
|
+
/* @__PURE__ */ jsxs59("div", { className: Fieldset_default.body, children: [
|
|
27015
|
+
hasDescription ? /* @__PURE__ */ jsx76("p", { id: descriptionId, className: cx(textRole_default.bodyS, Fieldset_default.description), children: description }) : null,
|
|
27016
|
+
/* @__PURE__ */ jsx76("div", { className: Fieldset_default.fields, children: /* @__PURE__ */ jsx76(DisabledProvider, { disabled, children }) })
|
|
26626
27017
|
] })
|
|
26627
27018
|
]
|
|
26628
27019
|
}
|
|
@@ -26915,7 +27306,7 @@ function visibleSegment(rect, viewport2) {
|
|
|
26915
27306
|
}
|
|
26916
27307
|
|
|
26917
27308
|
// src/components/gantt/GanttBar.tsx
|
|
26918
|
-
import { Fragment as
|
|
27309
|
+
import { Fragment as Fragment40, jsx as jsx77, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
26919
27310
|
var EDIT_SHORTCUTS = [
|
|
26920
27311
|
"Shift+ArrowLeft",
|
|
26921
27312
|
"Shift+ArrowRight",
|
|
@@ -27081,8 +27472,8 @@ function GanttBarView({
|
|
|
27081
27472
|
},
|
|
27082
27473
|
[barRef]
|
|
27083
27474
|
);
|
|
27084
|
-
return /* @__PURE__ */
|
|
27085
|
-
guide !== null ? /* @__PURE__ */
|
|
27475
|
+
return /* @__PURE__ */ jsxs60(Fragment40, { children: [
|
|
27476
|
+
guide !== null ? /* @__PURE__ */ jsx77(
|
|
27086
27477
|
"span",
|
|
27087
27478
|
{
|
|
27088
27479
|
className: Gantt_default.dayGuide,
|
|
@@ -27090,13 +27481,13 @@ function GanttBarView({
|
|
|
27090
27481
|
"aria-hidden": "true"
|
|
27091
27482
|
}
|
|
27092
27483
|
) : null,
|
|
27093
|
-
/* @__PURE__ */
|
|
27484
|
+
/* @__PURE__ */ jsxs60(
|
|
27094
27485
|
Tooltip.Root,
|
|
27095
27486
|
{
|
|
27096
27487
|
open: tipOpen || drag !== null,
|
|
27097
27488
|
onOpenChange: (open) => setTipOpen(open && canShowTip(bar.id)),
|
|
27098
27489
|
children: [
|
|
27099
|
-
/* @__PURE__ */
|
|
27490
|
+
/* @__PURE__ */ jsx77(Tooltip.Trigger, { children: /* @__PURE__ */ jsxs60(
|
|
27100
27491
|
"button",
|
|
27101
27492
|
{
|
|
27102
27493
|
ref: setNode,
|
|
@@ -27153,24 +27544,24 @@ function GanttBarView({
|
|
|
27153
27544
|
onActivate();
|
|
27154
27545
|
},
|
|
27155
27546
|
children: [
|
|
27156
|
-
milestone ? /* @__PURE__ */
|
|
27157
|
-
pending ? /* @__PURE__ */
|
|
27158
|
-
/* @__PURE__ */
|
|
27159
|
-
editable && !milestone ? /* @__PURE__ */
|
|
27160
|
-
/* @__PURE__ */
|
|
27161
|
-
/* @__PURE__ */
|
|
27547
|
+
milestone ? /* @__PURE__ */ jsx77("span", { className: Gantt_default.diamond, "aria-hidden": "true" }) : null,
|
|
27548
|
+
pending ? /* @__PURE__ */ jsx77(Spinner, { size: "xs", className: Gantt_default.spinner, "aria-hidden": "true" }) : null,
|
|
27549
|
+
/* @__PURE__ */ jsx77("span", { className: Gantt_default.label, "data-gantt-label": "", "aria-hidden": "true", children: bar.label }),
|
|
27550
|
+
editable && !milestone ? /* @__PURE__ */ jsxs60(Fragment40, { children: [
|
|
27551
|
+
/* @__PURE__ */ jsx77("span", { className: Gantt_default.handle, "data-handle": "start", "aria-hidden": "true" }),
|
|
27552
|
+
/* @__PURE__ */ jsx77("span", { className: Gantt_default.handle, "data-handle": "end", "aria-hidden": "true" })
|
|
27162
27553
|
] }) : null
|
|
27163
27554
|
]
|
|
27164
27555
|
}
|
|
27165
27556
|
) }),
|
|
27166
|
-
tipMounted ? /* @__PURE__ */
|
|
27167
|
-
/* @__PURE__ */
|
|
27168
|
-
/* @__PURE__ */
|
|
27557
|
+
tipMounted ? /* @__PURE__ */ jsxs60(Tooltip.Content, { children: [
|
|
27558
|
+
/* @__PURE__ */ jsx77("span", { className: Gantt_default.tipTitle, children: bar.label }),
|
|
27559
|
+
/* @__PURE__ */ jsxs60("span", { className: Gantt_default.tipMeta, children: [
|
|
27169
27560
|
formatSpan(shown, locale),
|
|
27170
27561
|
milestone ? null : ` \xB7 ${formatDuration(daysBetween2(shown.start, shown.end))}`,
|
|
27171
27562
|
progress === void 0 ? null : ` \xB7 ${progress}%`
|
|
27172
27563
|
] }),
|
|
27173
|
-
renderTip ? /* @__PURE__ */
|
|
27564
|
+
renderTip ? /* @__PURE__ */ jsx77("div", { className: Gantt_default.tipExtra, children: renderTip() }) : null
|
|
27174
27565
|
] }) : null
|
|
27175
27566
|
]
|
|
27176
27567
|
}
|
|
@@ -27179,7 +27570,7 @@ function GanttBarView({
|
|
|
27179
27570
|
}
|
|
27180
27571
|
|
|
27181
27572
|
// src/components/gantt/GanttRow.tsx
|
|
27182
|
-
import { Fragment as
|
|
27573
|
+
import { Fragment as Fragment41, jsx as jsx78, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
27183
27574
|
function GanttRowView({
|
|
27184
27575
|
ctx,
|
|
27185
27576
|
index,
|
|
@@ -27217,9 +27608,9 @@ function GanttRowView({
|
|
|
27217
27608
|
const start = new Date(rangeStart);
|
|
27218
27609
|
const windowed = windowFrom <= windowTo;
|
|
27219
27610
|
const on = (event) => (native) => ctx.track(event, index, native);
|
|
27220
|
-
const content = /* @__PURE__ */
|
|
27221
|
-
renderRowAvatar ? /* @__PURE__ */
|
|
27222
|
-
/* @__PURE__ */
|
|
27611
|
+
const content = /* @__PURE__ */ jsxs61(Fragment41, { children: [
|
|
27612
|
+
renderRowAvatar ? /* @__PURE__ */ jsx78("span", { className: Gantt_default.rowAvatar, children: renderRowAvatar(row) }) : null,
|
|
27613
|
+
/* @__PURE__ */ jsx78("span", { className: Gantt_default.rowLabel, children: renderRow ? renderRow(row) : label })
|
|
27223
27614
|
] });
|
|
27224
27615
|
const stopProps = {
|
|
27225
27616
|
// With an avatar a narrow chart shows only the picture: the row label names the stop.
|
|
@@ -27228,7 +27619,7 @@ function GanttRowView({
|
|
|
27228
27619
|
"aria-keyshortcuts": creatable ? "N" : void 0,
|
|
27229
27620
|
onFocus: () => ctx.focus(navId)
|
|
27230
27621
|
};
|
|
27231
|
-
return /* @__PURE__ */
|
|
27622
|
+
return /* @__PURE__ */ jsxs61(
|
|
27232
27623
|
"div",
|
|
27233
27624
|
{
|
|
27234
27625
|
ref: measureRef,
|
|
@@ -27237,7 +27628,7 @@ function GanttRowView({
|
|
|
27237
27628
|
className: Gantt_default.row,
|
|
27238
27629
|
style: { "--lanes": laneCount, "--row-top": `${top}px` },
|
|
27239
27630
|
children: [
|
|
27240
|
-
href === void 0 ? /* @__PURE__ */
|
|
27631
|
+
href === void 0 ? /* @__PURE__ */ jsx78(
|
|
27241
27632
|
"div",
|
|
27242
27633
|
{
|
|
27243
27634
|
ref: ctx.register(navId),
|
|
@@ -27258,7 +27649,7 @@ function GanttRowView({
|
|
|
27258
27649
|
} : void 0,
|
|
27259
27650
|
children: content
|
|
27260
27651
|
}
|
|
27261
|
-
) : /* @__PURE__ */
|
|
27652
|
+
) : /* @__PURE__ */ jsx78("div", { role: "rowheader", className: Gantt_default.rowHeader, "data-clickable": "", children: /* @__PURE__ */ jsx78(
|
|
27262
27653
|
"a",
|
|
27263
27654
|
{
|
|
27264
27655
|
ref: ctx.register(navId),
|
|
@@ -27278,7 +27669,7 @@ function GanttRowView({
|
|
|
27278
27669
|
children: content
|
|
27279
27670
|
}
|
|
27280
27671
|
) }),
|
|
27281
|
-
/* @__PURE__ */
|
|
27672
|
+
/* @__PURE__ */ jsxs61(
|
|
27282
27673
|
"div",
|
|
27283
27674
|
{
|
|
27284
27675
|
role: "gridcell",
|
|
@@ -27294,13 +27685,13 @@ function GanttRowView({
|
|
|
27294
27685
|
onContextMenu: creatable ? on("contextMenu") : void 0,
|
|
27295
27686
|
onDoubleClick: creatable ? on("doubleClick") : void 0,
|
|
27296
27687
|
children: [
|
|
27297
|
-
hover && !ghost ? /* @__PURE__ */
|
|
27688
|
+
hover && !ghost ? /* @__PURE__ */ jsx78(
|
|
27298
27689
|
"span",
|
|
27299
27690
|
{
|
|
27300
27691
|
className: cx(Gantt_default.createCell, enterMotion_default.enterFade),
|
|
27301
27692
|
style: { "--x": hover.x, "--span": hover.span },
|
|
27302
27693
|
"aria-hidden": "true",
|
|
27303
|
-
children: /* @__PURE__ */
|
|
27694
|
+
children: /* @__PURE__ */ jsx78(Icon, { name: "action.add", animated: false })
|
|
27304
27695
|
}
|
|
27305
27696
|
) : null,
|
|
27306
27697
|
bars.map((bar) => {
|
|
@@ -27309,7 +27700,7 @@ function GanttRowView({
|
|
|
27309
27700
|
const span = Math.max(daysBetween2(dates.start, dates.end), 1);
|
|
27310
27701
|
const pinned = pending.has(bar.id) || dragging.has(bar.id) || tabStop === bar.id;
|
|
27311
27702
|
if (windowed && !pinned && (x + span < windowFrom || x > windowTo)) return null;
|
|
27312
|
-
return /* @__PURE__ */
|
|
27703
|
+
return /* @__PURE__ */ jsx78(
|
|
27313
27704
|
GanttBarView,
|
|
27314
27705
|
{
|
|
27315
27706
|
bar,
|
|
@@ -27340,8 +27731,8 @@ function GanttRowView({
|
|
|
27340
27731
|
bar.id
|
|
27341
27732
|
);
|
|
27342
27733
|
}),
|
|
27343
|
-
ghost ? /* @__PURE__ */
|
|
27344
|
-
/* @__PURE__ */
|
|
27734
|
+
ghost ? /* @__PURE__ */ jsxs61(Tooltip.Root, { open: ghost.status === "drawing", children: [
|
|
27735
|
+
/* @__PURE__ */ jsx78(Tooltip.Trigger, { children: /* @__PURE__ */ jsxs61(
|
|
27345
27736
|
"span",
|
|
27346
27737
|
{
|
|
27347
27738
|
tabIndex: -1,
|
|
@@ -27354,14 +27745,14 @@ function GanttRowView({
|
|
|
27354
27745
|
"--lane": ghostLane
|
|
27355
27746
|
},
|
|
27356
27747
|
children: [
|
|
27357
|
-
ghost.status === "pending" ? /* @__PURE__ */
|
|
27358
|
-
/* @__PURE__ */
|
|
27748
|
+
ghost.status === "pending" ? /* @__PURE__ */ jsx78(Skeleton, { shape: "block", className: Gantt_default.ghostBusy }) : null,
|
|
27749
|
+
/* @__PURE__ */ jsx78("span", { className: Gantt_default.ghostLabel, children: newBarLabel })
|
|
27359
27750
|
]
|
|
27360
27751
|
}
|
|
27361
27752
|
) }),
|
|
27362
|
-
/* @__PURE__ */
|
|
27363
|
-
/* @__PURE__ */
|
|
27364
|
-
/* @__PURE__ */
|
|
27753
|
+
/* @__PURE__ */ jsxs61(Tooltip.Content, { children: [
|
|
27754
|
+
/* @__PURE__ */ jsx78("span", { className: Gantt_default.tipTitle, children: newBarLabel }),
|
|
27755
|
+
/* @__PURE__ */ jsxs61("span", { className: Gantt_default.tipMeta, children: [
|
|
27365
27756
|
formatSpan(ghost.dates, locale),
|
|
27366
27757
|
" \xB7",
|
|
27367
27758
|
" ",
|
|
@@ -27379,7 +27770,7 @@ function GanttRowView({
|
|
|
27379
27770
|
var GanttRow = React85.memo(GanttRowView);
|
|
27380
27771
|
|
|
27381
27772
|
// src/components/gantt/Gantt.tsx
|
|
27382
|
-
import { Fragment as
|
|
27773
|
+
import { Fragment as Fragment42, jsx as jsx79, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
27383
27774
|
var GANTT_LABELS = {
|
|
27384
27775
|
rowsHeader: "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",
|
|
27385
27776
|
timeline: "\u0428\u043A\u0430\u043B\u0430 \u0432\u0440\u0435\u043C\u0435\u043D\u0438",
|
|
@@ -28227,10 +28618,10 @@ function Gantt({
|
|
|
28227
28618
|
const lineCells = tiers.bottom.filter(
|
|
28228
28619
|
(cell) => (scale === "month" || cell.boundary) && inWindow(cell.x, 0)
|
|
28229
28620
|
);
|
|
28230
|
-
const backdrop = /* @__PURE__ */
|
|
28231
|
-
/* @__PURE__ */
|
|
28232
|
-
/* @__PURE__ */
|
|
28233
|
-
lineCells.map((cell) => /* @__PURE__ */
|
|
28621
|
+
const backdrop = /* @__PURE__ */ jsxs62(Fragment42, { children: [
|
|
28622
|
+
/* @__PURE__ */ jsx79("div", { className: Gantt_default.backdropWash, "aria-hidden": "true" }),
|
|
28623
|
+
/* @__PURE__ */ jsxs62("div", { className: Gantt_default.backdropLines, "aria-hidden": "true", children: [
|
|
28624
|
+
lineCells.map((cell) => /* @__PURE__ */ jsx79(
|
|
28234
28625
|
"span",
|
|
28235
28626
|
{
|
|
28236
28627
|
className: Gantt_default.gridLine,
|
|
@@ -28239,7 +28630,7 @@ function Gantt({
|
|
|
28239
28630
|
},
|
|
28240
28631
|
`line-${cell.key}`
|
|
28241
28632
|
)),
|
|
28242
|
-
todayInRange ? /* @__PURE__ */
|
|
28633
|
+
todayInRange ? /* @__PURE__ */ jsx79(
|
|
28243
28634
|
"span",
|
|
28244
28635
|
{
|
|
28245
28636
|
className: Gantt_default.todayLine,
|
|
@@ -28351,12 +28742,12 @@ function Gantt({
|
|
|
28351
28742
|
const origin = todayInRange ? todayX : 0;
|
|
28352
28743
|
body = SKELETON_ROWS3.map((bars, index) => (
|
|
28353
28744
|
// biome-ignore lint/suspicious/noArrayIndexKey: static placeholder rows
|
|
28354
|
-
/* @__PURE__ */
|
|
28355
|
-
/* @__PURE__ */
|
|
28356
|
-
hasAvatar ? /* @__PURE__ */
|
|
28357
|
-
/* @__PURE__ */
|
|
28745
|
+
/* @__PURE__ */ jsxs62("div", { className: Gantt_default.row, style: { "--lanes": 1 }, children: [
|
|
28746
|
+
/* @__PURE__ */ jsxs62("div", { className: Gantt_default.rowHeader, children: [
|
|
28747
|
+
hasAvatar ? /* @__PURE__ */ jsx79("span", { className: Gantt_default.rowAvatar, children: /* @__PURE__ */ jsx79(Skeleton, { shape: "circle" }) }) : null,
|
|
28748
|
+
/* @__PURE__ */ jsx79("span", { className: Gantt_default.rowLabel, children: /* @__PURE__ */ jsx79(Skeleton, { className: Gantt_default.skeletonLabel }) })
|
|
28358
28749
|
] }),
|
|
28359
|
-
/* @__PURE__ */
|
|
28750
|
+
/* @__PURE__ */ jsx79("div", { className: Gantt_default.track, children: bars.map(([offset, length]) => /* @__PURE__ */ jsx79(
|
|
28360
28751
|
Skeleton,
|
|
28361
28752
|
{
|
|
28362
28753
|
shape: "block",
|
|
@@ -28371,13 +28762,13 @@ function Gantt({
|
|
|
28371
28762
|
] }, index)
|
|
28372
28763
|
));
|
|
28373
28764
|
} else if (bodyState === "empty") {
|
|
28374
|
-
body = /* @__PURE__ */
|
|
28765
|
+
body = /* @__PURE__ */ jsx79("div", { role: "row", className: Gantt_default.emptyRow, children: /* @__PURE__ */ jsx79("div", { role: "gridcell", "aria-colspan": 2, className: Gantt_default.emptyCell, children: empty == null || typeof empty === "string" ? /* @__PURE__ */ jsx79(EmptyPage.Root, { layout: "compact", size, role: "status", children: /* @__PURE__ */ jsx79(EmptyPage.Description, { children: empty ?? labels.empty }) }) : empty }) });
|
|
28375
28766
|
} else {
|
|
28376
28767
|
body = virtual.rows.map(({ index, start }) => {
|
|
28377
28768
|
const item = model[index];
|
|
28378
28769
|
const { lanes, count, ghostLane } = lanesOf(item);
|
|
28379
28770
|
const hover = hoverCell?.row === item.key ? hoverCell : null;
|
|
28380
|
-
return /* @__PURE__ */
|
|
28771
|
+
return /* @__PURE__ */ jsx79(
|
|
28381
28772
|
GanttRow,
|
|
28382
28773
|
{
|
|
28383
28774
|
ctx: rowContext,
|
|
@@ -28419,8 +28810,8 @@ function Gantt({
|
|
|
28419
28810
|
}
|
|
28420
28811
|
const topCells = tiers.top.filter((cell) => inWindow(cell.x, cell.span));
|
|
28421
28812
|
const bottomCells = tiers.bottom.filter((cell) => inWindow(cell.x, cell.span));
|
|
28422
|
-
return /* @__PURE__ */
|
|
28423
|
-
/* @__PURE__ */
|
|
28813
|
+
return /* @__PURE__ */ jsx79(SurfaceDepthProvider, { value: depth, children: tier.provide(
|
|
28814
|
+
/* @__PURE__ */ jsxs62(
|
|
28424
28815
|
"div",
|
|
28425
28816
|
{
|
|
28426
28817
|
...rest,
|
|
@@ -28439,7 +28830,7 @@ function Gantt({
|
|
|
28439
28830
|
"scroll-height": fillHeight ? "fill" : void 0
|
|
28440
28831
|
}),
|
|
28441
28832
|
children: [
|
|
28442
|
-
/* @__PURE__ */
|
|
28833
|
+
/* @__PURE__ */ jsx79(
|
|
28443
28834
|
GanttToolbar,
|
|
28444
28835
|
{
|
|
28445
28836
|
toolbar,
|
|
@@ -28450,7 +28841,7 @@ function Gantt({
|
|
|
28450
28841
|
onScale: toolbarActions.scale
|
|
28451
28842
|
}
|
|
28452
28843
|
),
|
|
28453
|
-
/* @__PURE__ */
|
|
28844
|
+
/* @__PURE__ */ jsx79("div", { className: Gantt_default.frame, children: /* @__PURE__ */ jsx79(
|
|
28454
28845
|
ScrollContainer,
|
|
28455
28846
|
{
|
|
28456
28847
|
ref: scrollRef,
|
|
@@ -28468,7 +28859,7 @@ function Gantt({
|
|
|
28468
28859
|
},
|
|
28469
28860
|
onWheel: () => closeTips(false),
|
|
28470
28861
|
onTouchMove: () => closeTips(false),
|
|
28471
|
-
children: /* @__PURE__ */
|
|
28862
|
+
children: /* @__PURE__ */ jsx79(AnchorRectProvider, { value: anchorToVisible, children: /* @__PURE__ */ jsx79(FloatingBoundaryProvider, { value: timelineBoundary, children: /* @__PURE__ */ jsx79(Tooltip.Provider, { children: /* @__PURE__ */ jsxs62(
|
|
28472
28863
|
"div",
|
|
28473
28864
|
{
|
|
28474
28865
|
role: "grid",
|
|
@@ -28480,7 +28871,7 @@ function Gantt({
|
|
|
28480
28871
|
style: gridStyle,
|
|
28481
28872
|
onKeyDown: onGridKeyDown,
|
|
28482
28873
|
children: [
|
|
28483
|
-
/* @__PURE__ */
|
|
28874
|
+
/* @__PURE__ */ jsxs62(
|
|
28484
28875
|
"div",
|
|
28485
28876
|
{
|
|
28486
28877
|
ref: headRef,
|
|
@@ -28488,17 +28879,17 @@ function Gantt({
|
|
|
28488
28879
|
"aria-rowindex": 1,
|
|
28489
28880
|
className: cx(Gantt_default.head, stickySurfaceClass),
|
|
28490
28881
|
children: [
|
|
28491
|
-
/* @__PURE__ */
|
|
28882
|
+
/* @__PURE__ */ jsx79(
|
|
28492
28883
|
"div",
|
|
28493
28884
|
{
|
|
28494
28885
|
ref: cornerRef,
|
|
28495
28886
|
role: "columnheader",
|
|
28496
28887
|
"aria-label": hasAvatar ? labels.rowsHeader : void 0,
|
|
28497
28888
|
className: Gantt_default.corner,
|
|
28498
|
-
children: /* @__PURE__ */
|
|
28889
|
+
children: /* @__PURE__ */ jsx79("span", { className: Gantt_default.cornerText, children: labels.rowsHeader })
|
|
28499
28890
|
}
|
|
28500
28891
|
),
|
|
28501
|
-
/* @__PURE__ */
|
|
28892
|
+
/* @__PURE__ */ jsxs62(
|
|
28502
28893
|
"div",
|
|
28503
28894
|
{
|
|
28504
28895
|
ref: axisRef,
|
|
@@ -28506,16 +28897,16 @@ function Gantt({
|
|
|
28506
28897
|
"aria-label": labels.timeline,
|
|
28507
28898
|
className: Gantt_default.axis,
|
|
28508
28899
|
children: [
|
|
28509
|
-
/* @__PURE__ */
|
|
28900
|
+
/* @__PURE__ */ jsx79("div", { className: Gantt_default.tier, "aria-hidden": "true", children: topCells.map((cell) => /* @__PURE__ */ jsx79(
|
|
28510
28901
|
"span",
|
|
28511
28902
|
{
|
|
28512
28903
|
className: Gantt_default.tierCell,
|
|
28513
28904
|
style: { "--x": cell.x, "--span": cell.span },
|
|
28514
|
-
children: /* @__PURE__ */
|
|
28905
|
+
children: /* @__PURE__ */ jsx79("span", { className: Gantt_default.tierText, children: cell.text })
|
|
28515
28906
|
},
|
|
28516
28907
|
cell.key
|
|
28517
28908
|
)) }),
|
|
28518
|
-
/* @__PURE__ */
|
|
28909
|
+
/* @__PURE__ */ jsx79("div", { className: Gantt_default.tier, "data-tier": "bottom", "aria-hidden": "true", children: bottomCells.map((cell) => /* @__PURE__ */ jsx79(
|
|
28519
28910
|
"span",
|
|
28520
28911
|
{
|
|
28521
28912
|
className: Gantt_default.tierCell,
|
|
@@ -28525,17 +28916,17 @@ function Gantt({
|
|
|
28525
28916
|
today: cell.today,
|
|
28526
28917
|
boundary: cell.boundary
|
|
28527
28918
|
}),
|
|
28528
|
-
children: /* @__PURE__ */
|
|
28919
|
+
children: /* @__PURE__ */ jsx79("span", { className: Gantt_default.tierText, children: cell.text })
|
|
28529
28920
|
},
|
|
28530
28921
|
cell.key
|
|
28531
28922
|
)) }),
|
|
28532
|
-
todayInRange ? /* @__PURE__ */
|
|
28923
|
+
todayInRange ? /* @__PURE__ */ jsx79(
|
|
28533
28924
|
"span",
|
|
28534
28925
|
{
|
|
28535
28926
|
className: Gantt_default.todayMark,
|
|
28536
28927
|
style: { "--x": todayX + 0.5 },
|
|
28537
28928
|
"aria-hidden": "true",
|
|
28538
|
-
children: /* @__PURE__ */
|
|
28929
|
+
children: /* @__PURE__ */ jsx79("span", { className: Gantt_default.todayChip, children: labels.today })
|
|
28539
28930
|
}
|
|
28540
28931
|
) : null
|
|
28541
28932
|
]
|
|
@@ -28544,7 +28935,7 @@ function Gantt({
|
|
|
28544
28935
|
]
|
|
28545
28936
|
}
|
|
28546
28937
|
),
|
|
28547
|
-
/* @__PURE__ */
|
|
28938
|
+
/* @__PURE__ */ jsx79(RegionSwap, { state: bodyState, children: /* @__PURE__ */ jsxs62(
|
|
28548
28939
|
"div",
|
|
28549
28940
|
{
|
|
28550
28941
|
role: "rowgroup",
|
|
@@ -28566,10 +28957,10 @@ function Gantt({
|
|
|
28566
28957
|
) }) }) })
|
|
28567
28958
|
}
|
|
28568
28959
|
) }),
|
|
28569
|
-
editableAtAll ? /* @__PURE__ */
|
|
28570
|
-
creatable ? /* @__PURE__ */
|
|
28571
|
-
bodyState === "loading" ? /* @__PURE__ */
|
|
28572
|
-
/* @__PURE__ */
|
|
28960
|
+
editableAtAll ? /* @__PURE__ */ jsx79(VisuallyHidden, { id: hintId, children: labels.editHint }) : null,
|
|
28961
|
+
creatable ? /* @__PURE__ */ jsx79(VisuallyHidden, { id: createHintId, children: labels.createHint }) : null,
|
|
28962
|
+
bodyState === "loading" ? /* @__PURE__ */ jsx79(VisuallyHidden, { live: "polite", children: labels.loading }) : null,
|
|
28963
|
+
/* @__PURE__ */ jsx79(VisuallyHidden, { live: "polite", children: announcement })
|
|
28573
28964
|
]
|
|
28574
28965
|
}
|
|
28575
28966
|
)
|
|
@@ -28583,10 +28974,10 @@ var GanttToolbar = React86.memo(function GanttToolbar2({
|
|
|
28583
28974
|
onToday,
|
|
28584
28975
|
onScale
|
|
28585
28976
|
}) {
|
|
28586
|
-
return /* @__PURE__ */
|
|
28587
|
-
toolbar != null && toolbar !== false ? /* @__PURE__ */
|
|
28588
|
-
/* @__PURE__ */
|
|
28589
|
-
/* @__PURE__ */
|
|
28977
|
+
return /* @__PURE__ */ jsxs62(ToolRow, { className: Gantt_default.toolbar, children: [
|
|
28978
|
+
toolbar != null && toolbar !== false ? /* @__PURE__ */ jsx79(ToolGroup, { children: toolbar }) : null,
|
|
28979
|
+
/* @__PURE__ */ jsx79(Button.Root, { variant: "ghost", tone: "neutral", disabled: !todayInRange, onClick: onToday, children: labels.today }),
|
|
28980
|
+
/* @__PURE__ */ jsx79(SegmentedControl.Root, { "aria-label": labels.scale, value: scale, onValueChange: onScale, children: SCALES.map((value) => /* @__PURE__ */ jsx79(SegmentedControl.Item, { value, children: labels[value] }, value)) })
|
|
28590
28981
|
] });
|
|
28591
28982
|
});
|
|
28592
28983
|
|
|
@@ -28625,7 +29016,7 @@ var Kanban_default = {
|
|
|
28625
29016
|
};
|
|
28626
29017
|
|
|
28627
29018
|
// src/components/kanban/Kanban.tsx
|
|
28628
|
-
import { Fragment as
|
|
29019
|
+
import { Fragment as Fragment43, jsx as jsx80, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
28629
29020
|
var KANBAN_LABELS = {
|
|
28630
29021
|
count: "\u041A\u0430\u0440\u0442\u043E\u0447\u0435\u043A: {count}",
|
|
28631
29022
|
countLimit: "\u041A\u0430\u0440\u0442\u043E\u0447\u0435\u043A: {count} \u0438\u0437 {limit}",
|
|
@@ -28643,7 +29034,7 @@ var ItemIdContext = React87.createContext(null);
|
|
|
28643
29034
|
var NARROW_REM = 40;
|
|
28644
29035
|
var rootFontSize = () => typeof document === "undefined" ? 16 : Number.parseFloat(getComputedStyle(document.documentElement).fontSize) || 16;
|
|
28645
29036
|
function KanbanRoot(props) {
|
|
28646
|
-
return /* @__PURE__ */
|
|
29037
|
+
return /* @__PURE__ */ jsx80(Dnd.Root, { children: /* @__PURE__ */ jsx80(KanbanBoard, { ...props }) });
|
|
28647
29038
|
}
|
|
28648
29039
|
KanbanRoot.displayName = "Kanban.Root";
|
|
28649
29040
|
var EMPTY_VALUE2 = {};
|
|
@@ -28819,7 +29210,7 @@ function KanbanBoard({
|
|
|
28819
29210
|
}),
|
|
28820
29211
|
[locked, links, opens, cardDepth]
|
|
28821
29212
|
);
|
|
28822
|
-
return /* @__PURE__ */
|
|
29213
|
+
return /* @__PURE__ */ jsx80(BoardContext, { value: context, children: /* @__PURE__ */ jsx80(
|
|
28823
29214
|
"div",
|
|
28824
29215
|
{
|
|
28825
29216
|
ref: rootRef,
|
|
@@ -28830,7 +29221,7 @@ function KanbanBoard({
|
|
|
28830
29221
|
"data-variant": variant,
|
|
28831
29222
|
"data-loading": loading || void 0,
|
|
28832
29223
|
"data-disabled": disabled || void 0,
|
|
28833
|
-
children: /* @__PURE__ */
|
|
29224
|
+
children: /* @__PURE__ */ jsx80(
|
|
28834
29225
|
ScrollContainer,
|
|
28835
29226
|
{
|
|
28836
29227
|
axis: "horizontal",
|
|
@@ -28839,11 +29230,11 @@ function KanbanBoard({
|
|
|
28839
29230
|
"data-full-width": "true",
|
|
28840
29231
|
children: placeholders ? (
|
|
28841
29232
|
// Before the columns arrive: placeholder columns in the column geometry.
|
|
28842
|
-
/* @__PURE__ */
|
|
29233
|
+
/* @__PURE__ */ jsx80("div", { className: Kanban_default.placeholders, "aria-hidden": "true", children: Array.from({ length: loadingColumns }, (_, columnIndex) => (
|
|
28843
29234
|
// biome-ignore lint/suspicious/noArrayIndexKey: identical placeholder columns
|
|
28844
|
-
/* @__PURE__ */
|
|
28845
|
-
/* @__PURE__ */
|
|
28846
|
-
/* @__PURE__ */
|
|
29235
|
+
/* @__PURE__ */ jsxs63("div", { className: Kanban_default.column, children: [
|
|
29236
|
+
/* @__PURE__ */ jsx80("div", { className: cx(Kanban_default.header, hairline_default.bottom), children: /* @__PURE__ */ jsx80(Skeleton, { shape: "block", className: Kanban_default.skeletonTitle }) }),
|
|
29237
|
+
/* @__PURE__ */ jsx80("div", { className: Kanban_default.body, children: /* @__PURE__ */ jsx80(
|
|
28847
29238
|
SkeletonCards,
|
|
28848
29239
|
{
|
|
28849
29240
|
count: SKELETON_CARDS[columnIndex % SKELETON_CARDS.length] ?? 1,
|
|
@@ -28852,7 +29243,7 @@ function KanbanBoard({
|
|
|
28852
29243
|
) })
|
|
28853
29244
|
] }, columnIndex)
|
|
28854
29245
|
)) })
|
|
28855
|
-
) : /* @__PURE__ */
|
|
29246
|
+
) : /* @__PURE__ */ jsx80(
|
|
28856
29247
|
Dnd.Sortable,
|
|
28857
29248
|
{
|
|
28858
29249
|
as: "ul",
|
|
@@ -28864,7 +29255,7 @@ function KanbanBoard({
|
|
|
28864
29255
|
getLabel: (column) => formatLabel(labels.column, { column: column.title }),
|
|
28865
29256
|
disabled: !reorderableColumns || locked,
|
|
28866
29257
|
onReorder: (id, beforeId) => moveColumn(id, beforeId),
|
|
28867
|
-
renderItem: (column, columnIndex) => /* @__PURE__ */
|
|
29258
|
+
renderItem: (column, columnIndex) => /* @__PURE__ */ jsx80(
|
|
28868
29259
|
KanbanColumnView,
|
|
28869
29260
|
{
|
|
28870
29261
|
column,
|
|
@@ -28900,7 +29291,7 @@ function SkeletonCards({
|
|
|
28900
29291
|
count,
|
|
28901
29292
|
cardDepth
|
|
28902
29293
|
}) {
|
|
28903
|
-
return /* @__PURE__ */
|
|
29294
|
+
return /* @__PURE__ */ jsx80("div", { className: Kanban_default.list, children: Array.from({ length: count }, (_, index) => /* @__PURE__ */ jsxs63(
|
|
28904
29295
|
"div",
|
|
28905
29296
|
{
|
|
28906
29297
|
className: cx(Kanban_default.item, Kanban_default.skeleton),
|
|
@@ -28908,10 +29299,10 @@ function SkeletonCards({
|
|
|
28908
29299
|
"data-surface": cardDepth !== void 0 || void 0,
|
|
28909
29300
|
"aria-hidden": "true",
|
|
28910
29301
|
children: [
|
|
28911
|
-
/* @__PURE__ */
|
|
28912
|
-
/* @__PURE__ */
|
|
28913
|
-
/* @__PURE__ */
|
|
28914
|
-
/* @__PURE__ */
|
|
29302
|
+
/* @__PURE__ */ jsx80(Skeleton, { lines: 2 }),
|
|
29303
|
+
/* @__PURE__ */ jsxs63("div", { className: Kanban_default.footer, children: [
|
|
29304
|
+
/* @__PURE__ */ jsx80(Skeleton, { shape: "block", className: Kanban_default.skeletonBadge }),
|
|
29305
|
+
/* @__PURE__ */ jsx80(Skeleton, { shape: "circle", size: "s" })
|
|
28915
29306
|
] })
|
|
28916
29307
|
]
|
|
28917
29308
|
},
|
|
@@ -28948,7 +29339,7 @@ function KanbanColumnView({
|
|
|
28948
29339
|
);
|
|
28949
29340
|
const showMeta = metaLines.length > 0;
|
|
28950
29341
|
const describedBy = [column.description ? descriptionId : null, showMeta ? metaId : null].filter(Boolean).join(" ") || void 0;
|
|
28951
|
-
return /* @__PURE__ */
|
|
29342
|
+
return /* @__PURE__ */ jsxs63(
|
|
28952
29343
|
Dnd.SortableItem,
|
|
28953
29344
|
{
|
|
28954
29345
|
id: column.id,
|
|
@@ -28957,19 +29348,19 @@ function KanbanColumnView({
|
|
|
28957
29348
|
"data-kanban-column": column.id,
|
|
28958
29349
|
"data-full": full || void 0,
|
|
28959
29350
|
children: [
|
|
28960
|
-
/* @__PURE__ */
|
|
29351
|
+
/* @__PURE__ */ jsx80(ControlSizeProvider, { value: "s", children: /* @__PURE__ */ jsxs63(
|
|
28961
29352
|
"div",
|
|
28962
29353
|
{
|
|
28963
29354
|
className: cx(Kanban_default.header, hairline_default.bottom),
|
|
28964
29355
|
"data-reorderable": reorderable || void 0,
|
|
28965
29356
|
children: [
|
|
28966
|
-
/* @__PURE__ */
|
|
28967
|
-
loading ? null : /* @__PURE__ */
|
|
28968
|
-
/* @__PURE__ */
|
|
28969
|
-
/* @__PURE__ */
|
|
29357
|
+
/* @__PURE__ */ jsx80(Title, { id: headingId, className: cx(textRole_default.titleM, Kanban_default.title), children: column.title }),
|
|
29358
|
+
loading ? null : /* @__PURE__ */ jsxs63(Fragment43, { children: [
|
|
29359
|
+
/* @__PURE__ */ jsx80(Badge.Root, { color: full ? "orange" : column.color ?? "gray", "aria-hidden": "true", children: column.limit === void 0 ? count : `${count} / ${column.limit}` }),
|
|
29360
|
+
/* @__PURE__ */ jsx80(VisuallyHidden, { children: countText })
|
|
28970
29361
|
] }),
|
|
28971
|
-
actions ? /* @__PURE__ */
|
|
28972
|
-
reorderable ? /* @__PURE__ */
|
|
29362
|
+
actions ? /* @__PURE__ */ jsx80("div", { className: cx(fieldTierClass, Kanban_default.actions), "data-size": "s", children: actions }) : null,
|
|
29363
|
+
reorderable ? /* @__PURE__ */ jsx80(
|
|
28973
29364
|
Dnd.Handle,
|
|
28974
29365
|
{
|
|
28975
29366
|
className: Kanban_default.grip,
|
|
@@ -28977,15 +29368,15 @@ function KanbanColumnView({
|
|
|
28977
29368
|
"aria-label": formatLabel(labels.moveColumn, { column: column.title })
|
|
28978
29369
|
}
|
|
28979
29370
|
) : null,
|
|
28980
|
-
column.description ? /* @__PURE__ */
|
|
28981
|
-
showMeta ? /* @__PURE__ */
|
|
29371
|
+
column.description ? /* @__PURE__ */ jsx80("p", { id: descriptionId, className: cx(textRole_default.caption, Kanban_default.description), children: column.description }) : null,
|
|
29372
|
+
showMeta ? /* @__PURE__ */ jsx80("div", { id: metaId, className: cx(textRole_default.caption, Kanban_default.meta), children: metaLines.map((line, index) => (
|
|
28982
29373
|
// biome-ignore lint/suspicious/noArrayIndexKey: a line is its place
|
|
28983
|
-
/* @__PURE__ */
|
|
29374
|
+
/* @__PURE__ */ jsx80("span", { className: Kanban_default.metaLine, children: line }, index)
|
|
28984
29375
|
)) }) : null
|
|
28985
29376
|
]
|
|
28986
29377
|
}
|
|
28987
29378
|
) }),
|
|
28988
|
-
/* @__PURE__ */
|
|
29379
|
+
/* @__PURE__ */ jsx80(ScrollContainer, { className: Kanban_default.body, children: /* @__PURE__ */ jsx80(Crossfade, { state: loading ? "loading" : "ready", className: Kanban_default.swap, children: loading ? /* @__PURE__ */ jsx80(SkeletonCards, { count: skeletons, cardDepth }) : /* @__PURE__ */ jsx80("div", { className: Kanban_default.drop, children: /* @__PURE__ */ jsx80(
|
|
28989
29380
|
Dnd.Sortable,
|
|
28990
29381
|
{
|
|
28991
29382
|
as: "ul",
|
|
@@ -28999,11 +29390,11 @@ function KanbanColumnView({
|
|
|
28999
29390
|
canDrop: accepts,
|
|
29000
29391
|
disabled,
|
|
29001
29392
|
onReorder,
|
|
29002
|
-
empty: /* @__PURE__ */
|
|
29003
|
-
/* @__PURE__ */
|
|
29004
|
-
disabled ? null : /* @__PURE__ */
|
|
29393
|
+
empty: /* @__PURE__ */ jsxs63(EmptyPage.Root, { layout: "compact", children: [
|
|
29394
|
+
/* @__PURE__ */ jsx80(EmptyPage.Title, { as: "p", children: labels.empty }),
|
|
29395
|
+
disabled ? null : /* @__PURE__ */ jsx80(EmptyPage.Description, { children: labels.emptyHint })
|
|
29005
29396
|
] }),
|
|
29006
|
-
renderItem: (item) => /* @__PURE__ */
|
|
29397
|
+
renderItem: (item) => /* @__PURE__ */ jsx80(ItemIdContext, { value: getId(item), children: renderItem(item) })
|
|
29007
29398
|
}
|
|
29008
29399
|
) }) }) })
|
|
29009
29400
|
]
|
|
@@ -29027,7 +29418,7 @@ function KanbanItem({
|
|
|
29027
29418
|
const href = board.hrefOf(id);
|
|
29028
29419
|
const { openItem } = board;
|
|
29029
29420
|
const focus = href !== void 0 ? { tabIndex: -1 } : openItem ? { tabIndex: 0 } : null;
|
|
29030
|
-
return /* @__PURE__ */
|
|
29421
|
+
return /* @__PURE__ */ jsxs63(
|
|
29031
29422
|
Dnd.SortableItem,
|
|
29032
29423
|
{
|
|
29033
29424
|
id,
|
|
@@ -29062,7 +29453,7 @@ function KanbanItem({
|
|
|
29062
29453
|
href !== void 0 ? (
|
|
29063
29454
|
// A press on the link drags the card like a press anywhere on it (`data-dnd-handle`).
|
|
29064
29455
|
// biome-ignore lint/a11y/useAnchorContent: named by `aria-label` (the card's `getLabel`); the card's content stays readable beside it
|
|
29065
|
-
/* @__PURE__ */
|
|
29456
|
+
/* @__PURE__ */ jsx80(
|
|
29066
29457
|
"a",
|
|
29067
29458
|
{
|
|
29068
29459
|
ref: linkRef,
|
|
@@ -29083,8 +29474,8 @@ function KanbanItem({
|
|
|
29083
29474
|
}
|
|
29084
29475
|
)
|
|
29085
29476
|
) : null,
|
|
29086
|
-
/* @__PURE__ */
|
|
29087
|
-
/* @__PURE__ */
|
|
29477
|
+
/* @__PURE__ */ jsx80(ControlSizeProvider, { value: "m", children }),
|
|
29478
|
+
/* @__PURE__ */ jsx80(KanbanItemSpinner, {})
|
|
29088
29479
|
]
|
|
29089
29480
|
}
|
|
29090
29481
|
);
|
|
@@ -29092,10 +29483,10 @@ function KanbanItem({
|
|
|
29092
29483
|
KanbanItem.displayName = "Kanban.Item";
|
|
29093
29484
|
function KanbanItemSpinner() {
|
|
29094
29485
|
const busy = useSortableItemBusy();
|
|
29095
|
-
return busy ? /* @__PURE__ */
|
|
29486
|
+
return busy ? /* @__PURE__ */ jsx80(Spinner, { size: "s", "aria-hidden": "true", className: Kanban_default.itemSpinner }) : null;
|
|
29096
29487
|
}
|
|
29097
29488
|
function KanbanItemHeader({ className, ...rest }) {
|
|
29098
|
-
return /* @__PURE__ */
|
|
29489
|
+
return /* @__PURE__ */ jsx80(
|
|
29099
29490
|
"div",
|
|
29100
29491
|
{
|
|
29101
29492
|
className: cx(
|
|
@@ -29112,23 +29503,23 @@ function KanbanItemHeader({ className, ...rest }) {
|
|
|
29112
29503
|
}
|
|
29113
29504
|
KanbanItemHeader.displayName = "Kanban.ItemHeader";
|
|
29114
29505
|
function KanbanItemTitle({ className, ...rest }) {
|
|
29115
|
-
return /* @__PURE__ */
|
|
29506
|
+
return /* @__PURE__ */ jsx80("span", { className: cx(textRole_default.bodyM, Kanban_default.itemTitle, className), ...rest });
|
|
29116
29507
|
}
|
|
29117
29508
|
KanbanItemTitle.displayName = "Kanban.ItemTitle";
|
|
29118
29509
|
function KanbanItemDescription({ className, ...rest }) {
|
|
29119
|
-
return /* @__PURE__ */
|
|
29510
|
+
return /* @__PURE__ */ jsx80("span", { className: cx(textRole_default.caption, Kanban_default.itemDescription, className), ...rest });
|
|
29120
29511
|
}
|
|
29121
29512
|
KanbanItemDescription.displayName = "Kanban.ItemDescription";
|
|
29122
29513
|
function KanbanItemBadges(props) {
|
|
29123
|
-
return /* @__PURE__ */
|
|
29514
|
+
return /* @__PURE__ */ jsx80(Badge.Group, { ...props });
|
|
29124
29515
|
}
|
|
29125
29516
|
KanbanItemBadges.displayName = "Kanban.ItemBadges";
|
|
29126
29517
|
function KanbanItemFooter({ className, ...rest }) {
|
|
29127
|
-
return /* @__PURE__ */
|
|
29518
|
+
return /* @__PURE__ */ jsx80("div", { className: cx(fieldTierClass, Kanban_default.footer, className), "data-size": "xs", ...rest });
|
|
29128
29519
|
}
|
|
29129
29520
|
KanbanItemFooter.displayName = "Kanban.ItemFooter";
|
|
29130
29521
|
function KanbanItemCount({ className, ...rest }) {
|
|
29131
|
-
return /* @__PURE__ */
|
|
29522
|
+
return /* @__PURE__ */ jsx80("span", { className: cx(Kanban_default.count, className), ...rest });
|
|
29132
29523
|
}
|
|
29133
29524
|
KanbanItemCount.displayName = "Kanban.ItemCount";
|
|
29134
29525
|
var Kanban = {
|
|
@@ -29160,7 +29551,7 @@ var LoginForm_default = {
|
|
|
29160
29551
|
};
|
|
29161
29552
|
|
|
29162
29553
|
// src/components/login-form/LoginForm.tsx
|
|
29163
|
-
import { jsx as
|
|
29554
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
29164
29555
|
var TITLE_ROLE = {
|
|
29165
29556
|
xs: "title-s",
|
|
29166
29557
|
s: "title-m",
|
|
@@ -29194,25 +29585,25 @@ function LoginFormRoot({
|
|
|
29194
29585
|
...rest
|
|
29195
29586
|
}) {
|
|
29196
29587
|
const { size, provide } = useHostTier(sizeProp);
|
|
29197
|
-
return /* @__PURE__ */
|
|
29588
|
+
return /* @__PURE__ */ jsx81(
|
|
29198
29589
|
"div",
|
|
29199
29590
|
{
|
|
29200
29591
|
ref,
|
|
29201
29592
|
...rest,
|
|
29202
29593
|
className: cx(LoginForm_default.root, className),
|
|
29203
29594
|
...toDataAttributes({ size, align, flat }),
|
|
29204
|
-
children: /* @__PURE__ */
|
|
29595
|
+
children: /* @__PURE__ */ jsx81(Card.Root, { flat, children: /* @__PURE__ */ jsx81("div", { className: LoginForm_default.content, children: /* @__PURE__ */ jsx81(AlignContext, { value: align, children: provide(children) }) }) })
|
|
29205
29596
|
}
|
|
29206
29597
|
);
|
|
29207
29598
|
}
|
|
29208
29599
|
LoginFormRoot.displayName = "LoginForm.Root";
|
|
29209
29600
|
function LoginFormHeader({ className, children, ...rest }) {
|
|
29210
|
-
return /* @__PURE__ */
|
|
29601
|
+
return /* @__PURE__ */ jsx81("header", { className: cx(LoginForm_default.header, className), ...rest, children });
|
|
29211
29602
|
}
|
|
29212
29603
|
LoginFormHeader.displayName = "LoginForm.Header";
|
|
29213
29604
|
function LoginFormLogo({ className, children, ...rest }) {
|
|
29214
29605
|
const align = React88.useContext(AlignContext);
|
|
29215
|
-
return /* @__PURE__ */
|
|
29606
|
+
return /* @__PURE__ */ jsx81(
|
|
29216
29607
|
"div",
|
|
29217
29608
|
{
|
|
29218
29609
|
role: rest["aria-label"] ? "img" : void 0,
|
|
@@ -29226,7 +29617,7 @@ function LoginFormLogo({ className, children, ...rest }) {
|
|
|
29226
29617
|
LoginFormLogo.displayName = "LoginForm.Logo";
|
|
29227
29618
|
function LoginFormTitle({ as = "h1", className, children, ...rest }) {
|
|
29228
29619
|
const size = useLoginFormSize();
|
|
29229
|
-
return /* @__PURE__ */
|
|
29620
|
+
return /* @__PURE__ */ jsx81(
|
|
29230
29621
|
Typography,
|
|
29231
29622
|
{
|
|
29232
29623
|
as,
|
|
@@ -29240,7 +29631,7 @@ function LoginFormTitle({ as = "h1", className, children, ...rest }) {
|
|
|
29240
29631
|
LoginFormTitle.displayName = "LoginForm.Title";
|
|
29241
29632
|
function LoginFormDescription({ className, children, ...rest }) {
|
|
29242
29633
|
const size = useLoginFormSize();
|
|
29243
|
-
return /* @__PURE__ */
|
|
29634
|
+
return /* @__PURE__ */ jsx81(
|
|
29244
29635
|
Typography,
|
|
29245
29636
|
{
|
|
29246
29637
|
as: "p",
|
|
@@ -29254,20 +29645,20 @@ function LoginFormDescription({ className, children, ...rest }) {
|
|
|
29254
29645
|
}
|
|
29255
29646
|
LoginFormDescription.displayName = "LoginForm.Description";
|
|
29256
29647
|
function LoginFormBody({ className, children, ...rest }) {
|
|
29257
|
-
return /* @__PURE__ */
|
|
29648
|
+
return /* @__PURE__ */ jsx81("div", { className: cx(LoginForm_default.body, className), ...rest, children });
|
|
29258
29649
|
}
|
|
29259
29650
|
LoginFormBody.displayName = "LoginForm.Body";
|
|
29260
29651
|
function LoginFormForm({ className, children, ref, ...rest }) {
|
|
29261
|
-
return /* @__PURE__ */
|
|
29652
|
+
return /* @__PURE__ */ jsx81("form", { ref, className: cx(LoginForm_default.form, className), ...rest, children });
|
|
29262
29653
|
}
|
|
29263
29654
|
LoginFormForm.displayName = "LoginForm.Form";
|
|
29264
29655
|
function LoginFormActions({ className, children, ...rest }) {
|
|
29265
|
-
return /* @__PURE__ */
|
|
29656
|
+
return /* @__PURE__ */ jsx81("div", { className: cx(LoginForm_default.actions, className), ...rest, children });
|
|
29266
29657
|
}
|
|
29267
29658
|
LoginFormActions.displayName = "LoginForm.Actions";
|
|
29268
29659
|
function LoginFormFooter({ className, children, ...rest }) {
|
|
29269
29660
|
const size = useLoginFormSize();
|
|
29270
|
-
return /* @__PURE__ */
|
|
29661
|
+
return /* @__PURE__ */ jsx81(
|
|
29271
29662
|
Typography,
|
|
29272
29663
|
{
|
|
29273
29664
|
as: "p",
|
|
@@ -29301,7 +29692,7 @@ var NativeSelect_default = {
|
|
|
29301
29692
|
};
|
|
29302
29693
|
|
|
29303
29694
|
// src/components/native-select/NativeSelect.tsx
|
|
29304
|
-
import { jsx as
|
|
29695
|
+
import { jsx as jsx82, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
29305
29696
|
var NATIVE_SELECT_LABELS = { optional: "\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E" };
|
|
29306
29697
|
function NativeSelect({
|
|
29307
29698
|
size: sizeProp,
|
|
@@ -29333,7 +29724,7 @@ function NativeSelect({
|
|
|
29333
29724
|
const ids = useFieldFrame(id, { label, hint, error, invalid, required }, ariaDescribedBy);
|
|
29334
29725
|
const initial = defaultValue ?? (value === void 0 && placeholder ? "" : void 0);
|
|
29335
29726
|
return tier.provide(
|
|
29336
|
-
/* @__PURE__ */
|
|
29727
|
+
/* @__PURE__ */ jsx82(
|
|
29337
29728
|
FieldFrame,
|
|
29338
29729
|
{
|
|
29339
29730
|
size,
|
|
@@ -29347,8 +29738,8 @@ function NativeSelect({
|
|
|
29347
29738
|
disabled,
|
|
29348
29739
|
optionalLabel: labels.optional,
|
|
29349
29740
|
className,
|
|
29350
|
-
children: /* @__PURE__ */
|
|
29351
|
-
/* @__PURE__ */
|
|
29741
|
+
children: /* @__PURE__ */ jsxs64("span", { className: cx(fieldTierClass, NativeSelect_default.root), ...toDataAttributes({ size }), children: [
|
|
29742
|
+
/* @__PURE__ */ jsxs64(
|
|
29352
29743
|
"select",
|
|
29353
29744
|
{
|
|
29354
29745
|
...rest,
|
|
@@ -29370,12 +29761,12 @@ function NativeSelect({
|
|
|
29370
29761
|
"focus-ring": focusRing
|
|
29371
29762
|
}),
|
|
29372
29763
|
children: [
|
|
29373
|
-
placeholder ? /* @__PURE__ */
|
|
29764
|
+
placeholder ? /* @__PURE__ */ jsx82("option", { value: "", className: NativeSelect_default.placeholder, children: placeholder }) : null,
|
|
29374
29765
|
children
|
|
29375
29766
|
]
|
|
29376
29767
|
}
|
|
29377
29768
|
),
|
|
29378
|
-
/* @__PURE__ */
|
|
29769
|
+
/* @__PURE__ */ jsx82("span", { className: NativeSelect_default.chevron, "aria-hidden": "true", children: /* @__PURE__ */ jsx82(Icon, { name: "nav.chevronDown" }) })
|
|
29379
29770
|
] })
|
|
29380
29771
|
}
|
|
29381
29772
|
)
|
|
@@ -29411,7 +29802,7 @@ var Notification_default = {
|
|
|
29411
29802
|
};
|
|
29412
29803
|
|
|
29413
29804
|
// src/components/notification/Notification.tsx
|
|
29414
|
-
import { jsx as
|
|
29805
|
+
import { jsx as jsx83, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
29415
29806
|
var NOTIFICATION_LABELS = {
|
|
29416
29807
|
close: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435",
|
|
29417
29808
|
regionTopLeft: "\u0423\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F \u0441\u0432\u0435\u0440\u0445\u0443 \u0441\u043B\u0435\u0432\u0430",
|
|
@@ -29457,7 +29848,7 @@ function CardView({
|
|
|
29457
29848
|
const size = tier.size;
|
|
29458
29849
|
const liveRole = tone === "danger" || tone === "warning" ? "alert" : "status";
|
|
29459
29850
|
return tier.provide(
|
|
29460
|
-
/* @__PURE__ */
|
|
29851
|
+
/* @__PURE__ */ jsxs65(
|
|
29461
29852
|
"article",
|
|
29462
29853
|
{
|
|
29463
29854
|
...rest,
|
|
@@ -29473,14 +29864,14 @@ function CardView({
|
|
|
29473
29864
|
"stack-expanded": stackExpanded
|
|
29474
29865
|
}),
|
|
29475
29866
|
children: [
|
|
29476
|
-
/* @__PURE__ */
|
|
29477
|
-
/* @__PURE__ */
|
|
29478
|
-
/* @__PURE__ */
|
|
29479
|
-
/* @__PURE__ */
|
|
29480
|
-
badge !== void 0 ? /* @__PURE__ */
|
|
29867
|
+
/* @__PURE__ */ jsx83("div", { className: cx(Notification_default.iconWrap, iconSlotClass), "aria-hidden": "true", children: icon ?? /* @__PURE__ */ jsx83(Icon, { name: TONE_ICON[tone] }) }),
|
|
29868
|
+
/* @__PURE__ */ jsxs65("div", { className: Notification_default.content, children: [
|
|
29869
|
+
/* @__PURE__ */ jsxs65("header", { className: Notification_default.header, children: [
|
|
29870
|
+
/* @__PURE__ */ jsx83("p", { className: Notification_default.title, children: title }),
|
|
29871
|
+
badge !== void 0 ? /* @__PURE__ */ jsx83(Badge.Root, { size: "xs", tone, children: badge }) : null
|
|
29481
29872
|
] }),
|
|
29482
|
-
description ? /* @__PURE__ */
|
|
29483
|
-
action ? /* @__PURE__ */
|
|
29873
|
+
description ? /* @__PURE__ */ jsx83("p", { className: Notification_default.description, children: description }) : null,
|
|
29874
|
+
action ? /* @__PURE__ */ jsx83("div", { className: Notification_default.actionRow, children: /* @__PURE__ */ jsx83(
|
|
29484
29875
|
Button.Root,
|
|
29485
29876
|
{
|
|
29486
29877
|
variant: "soft",
|
|
@@ -29494,7 +29885,7 @@ function CardView({
|
|
|
29494
29885
|
}
|
|
29495
29886
|
) }) : null
|
|
29496
29887
|
] }),
|
|
29497
|
-
onClose ? /* @__PURE__ */
|
|
29888
|
+
onClose ? /* @__PURE__ */ jsx83("div", { className: Notification_default.closeWrap, children: /* @__PURE__ */ jsx83(
|
|
29498
29889
|
Button.Root,
|
|
29499
29890
|
{
|
|
29500
29891
|
variant: "ghost",
|
|
@@ -29502,10 +29893,10 @@ function CardView({
|
|
|
29502
29893
|
size: compactTier(size),
|
|
29503
29894
|
"aria-label": labels.close,
|
|
29504
29895
|
onClick: onClose,
|
|
29505
|
-
children: /* @__PURE__ */
|
|
29896
|
+
children: /* @__PURE__ */ jsx83(Button.Icon, { children: /* @__PURE__ */ jsx83(Icon, { name: "action.close" }) })
|
|
29506
29897
|
}
|
|
29507
29898
|
) }) : null,
|
|
29508
|
-
countdown ? /* @__PURE__ */
|
|
29899
|
+
countdown ? /* @__PURE__ */ jsx83("div", { className: Notification_default.progressTrack, "aria-hidden": "true", children: /* @__PURE__ */ jsx83(CountdownLine, { ...countdown }) }) : null
|
|
29509
29900
|
]
|
|
29510
29901
|
}
|
|
29511
29902
|
)
|
|
@@ -29540,10 +29931,10 @@ function CountdownLine({ duration, paused, onEnd }) {
|
|
|
29540
29931
|
if (paused) clock.pause();
|
|
29541
29932
|
else clock.play();
|
|
29542
29933
|
}, [paused]);
|
|
29543
|
-
return /* @__PURE__ */
|
|
29934
|
+
return /* @__PURE__ */ jsx83("span", { ref: lineRef, className: Notification_default.progressValue });
|
|
29544
29935
|
}
|
|
29545
29936
|
function NotificationCard({ onDismiss, ...props }) {
|
|
29546
|
-
return /* @__PURE__ */
|
|
29937
|
+
return /* @__PURE__ */ jsx83(CardView, { ...props, onClose: onDismiss });
|
|
29547
29938
|
}
|
|
29548
29939
|
function subscribeVisibility(listener) {
|
|
29549
29940
|
document.addEventListener("visibilitychange", listener);
|
|
@@ -29559,7 +29950,7 @@ function useDocumentHidden() {
|
|
|
29559
29950
|
function ToastCard({ item, paused, onDismiss, stackDepth, stackExpanded }) {
|
|
29560
29951
|
const hidden = useDocumentHidden();
|
|
29561
29952
|
const timed = !item.persistent && item.duration > 0;
|
|
29562
|
-
return /* @__PURE__ */
|
|
29953
|
+
return /* @__PURE__ */ jsx83(
|
|
29563
29954
|
CardView,
|
|
29564
29955
|
{
|
|
29565
29956
|
tone: item.tone,
|
|
@@ -29584,7 +29975,7 @@ function ToastCard({ item, paused, onDismiss, stackDepth, stackExpanded }) {
|
|
|
29584
29975
|
|
|
29585
29976
|
// src/components/notification/NotificationStore.tsx
|
|
29586
29977
|
import * as React90 from "react";
|
|
29587
|
-
import { jsx as
|
|
29978
|
+
import { jsx as jsx84, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
29588
29979
|
var DEFAULT_DURATION = 5e3;
|
|
29589
29980
|
var PEEK_VISIBLE = 3;
|
|
29590
29981
|
var SCALE_STEP = 0.05;
|
|
@@ -29715,7 +30106,7 @@ function NotificationStack({
|
|
|
29715
30106
|
if (!ids.has(id)) lastLayoutRef.current.delete(id);
|
|
29716
30107
|
}
|
|
29717
30108
|
});
|
|
29718
|
-
return /* @__PURE__ */
|
|
30109
|
+
return /* @__PURE__ */ jsx84(
|
|
29719
30110
|
"ol",
|
|
29720
30111
|
{
|
|
29721
30112
|
ref: listRef,
|
|
@@ -29742,7 +30133,7 @@ function NotificationStack({
|
|
|
29742
30133
|
children: items.map((item) => {
|
|
29743
30134
|
const closing = item.dismissing === true;
|
|
29744
30135
|
const layout = layouts.get(item.id) ?? lastLayoutRef.current.get(item.id) ?? RESTING_LAYOUT;
|
|
29745
|
-
return /* @__PURE__ */
|
|
30136
|
+
return /* @__PURE__ */ jsx84(
|
|
29746
30137
|
NotificationStackItem,
|
|
29747
30138
|
{
|
|
29748
30139
|
item,
|
|
@@ -29857,7 +30248,7 @@ var NotificationStackItem = React90.memo(function NotificationStackItem2({
|
|
|
29857
30248
|
if (amount === 0 || prefersReducedMotion()) delete el.dataset.swipe;
|
|
29858
30249
|
else el.dataset.swipe = "return";
|
|
29859
30250
|
};
|
|
29860
|
-
return /* @__PURE__ */
|
|
30251
|
+
return /* @__PURE__ */ jsx84(
|
|
29861
30252
|
"li",
|
|
29862
30253
|
{
|
|
29863
30254
|
ref,
|
|
@@ -29871,7 +30262,7 @@ var NotificationStackItem = React90.memo(function NotificationStackItem2({
|
|
|
29871
30262
|
"--ntf-opacity": opacity,
|
|
29872
30263
|
zIndex: Z_FRONT - index
|
|
29873
30264
|
},
|
|
29874
|
-
children: /* @__PURE__ */
|
|
30265
|
+
children: /* @__PURE__ */ jsx84(
|
|
29875
30266
|
"div",
|
|
29876
30267
|
{
|
|
29877
30268
|
className: Notification_default.motion,
|
|
@@ -29888,7 +30279,7 @@ var NotificationStackItem = React90.memo(function NotificationStackItem2({
|
|
|
29888
30279
|
delete event.currentTarget.dataset.swipe;
|
|
29889
30280
|
}
|
|
29890
30281
|
},
|
|
29891
|
-
children: /* @__PURE__ */
|
|
30282
|
+
children: /* @__PURE__ */ jsx84(
|
|
29892
30283
|
ToastCard,
|
|
29893
30284
|
{
|
|
29894
30285
|
item,
|
|
@@ -29924,18 +30315,18 @@ function NotificationToaster({
|
|
|
29924
30315
|
}
|
|
29925
30316
|
return map;
|
|
29926
30317
|
}, [entries]);
|
|
29927
|
-
return /* @__PURE__ */
|
|
30318
|
+
return /* @__PURE__ */ jsx84(Portal, { children: /* @__PURE__ */ jsx84("div", { className: Notification_default.viewport, ...{ [LIVE_REGION_ATTR]: "" }, children: POSITIONS.map((pos) => {
|
|
29928
30319
|
const byTone = grouped.get(pos);
|
|
29929
30320
|
if (!byTone?.size) return null;
|
|
29930
30321
|
const [vertical, horizontal] = pos.split("-");
|
|
29931
30322
|
const stacks = TONES.map((tone) => ({ tone, items: byTone.get(tone) ?? [] })).filter(
|
|
29932
30323
|
(s) => s.items.length > 0
|
|
29933
30324
|
);
|
|
29934
|
-
return /* @__PURE__ */
|
|
30325
|
+
return /* @__PURE__ */ jsx84(
|
|
29935
30326
|
"section",
|
|
29936
30327
|
{
|
|
29937
30328
|
className: `${Notification_default.zone} ${Notification_default[vertical]} ${Notification_default[horizontal]}`,
|
|
29938
|
-
children: stacks.map((s) => /* @__PURE__ */
|
|
30329
|
+
children: stacks.map((s) => /* @__PURE__ */ jsx84(
|
|
29939
30330
|
NotificationStack,
|
|
29940
30331
|
{
|
|
29941
30332
|
position: pos,
|
|
@@ -30056,9 +30447,9 @@ function NotificationProvider({
|
|
|
30056
30447
|
() => ({ items: publicItems, notify, dismiss, dismissAll }),
|
|
30057
30448
|
[publicItems, notify, dismiss, dismissAll]
|
|
30058
30449
|
);
|
|
30059
|
-
return /* @__PURE__ */
|
|
30450
|
+
return /* @__PURE__ */ jsx84(StoreProvider, { value, children: /* @__PURE__ */ jsxs66(NotificationLabelsContext.Provider, { value: labels, children: [
|
|
30060
30451
|
children,
|
|
30061
|
-
/* @__PURE__ */
|
|
30452
|
+
/* @__PURE__ */ jsx84(NotificationToaster, { entries, onDismiss: leave, onExited: exited })
|
|
30062
30453
|
] }) });
|
|
30063
30454
|
}
|
|
30064
30455
|
function useNotifications() {
|
|
@@ -30084,7 +30475,7 @@ var ProgressCircle_default = {
|
|
|
30084
30475
|
};
|
|
30085
30476
|
|
|
30086
30477
|
// src/components/progress-circle/ProgressCircle.tsx
|
|
30087
|
-
import { Fragment as
|
|
30478
|
+
import { Fragment as Fragment44, jsx as jsx85, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
30088
30479
|
var HAIRLINE_GAP = RING_DATA_STROKE * 0.75;
|
|
30089
30480
|
var LOADING_ROWS3 = 3;
|
|
30090
30481
|
function arcStyle(start, length) {
|
|
@@ -30106,9 +30497,9 @@ function SegmentArcs({
|
|
|
30106
30497
|
}) {
|
|
30107
30498
|
if (gap === "hairline" && arcs.length > 1) {
|
|
30108
30499
|
const inset = (RING_DATA_STROKE + HAIRLINE_GAP) / 2;
|
|
30109
|
-
return /* @__PURE__ */
|
|
30500
|
+
return /* @__PURE__ */ jsx85(Fragment44, { children: arcs.map((a, i) => {
|
|
30110
30501
|
const own = a.rest ? { className: void 0 } : fillProps(a.fill);
|
|
30111
|
-
return /* @__PURE__ */
|
|
30502
|
+
return /* @__PURE__ */ jsx85(
|
|
30112
30503
|
RingCircle,
|
|
30113
30504
|
{
|
|
30114
30505
|
...own,
|
|
@@ -30122,10 +30513,10 @@ function SegmentArcs({
|
|
|
30122
30513
|
const parts = arcs.filter((a) => !a.rest);
|
|
30123
30514
|
const first = parts[0];
|
|
30124
30515
|
const last = parts[parts.length - 1];
|
|
30125
|
-
return /* @__PURE__ */
|
|
30516
|
+
return /* @__PURE__ */ jsxs67(Fragment44, { children: [
|
|
30126
30517
|
parts.map((a, i) => {
|
|
30127
30518
|
const own = fillProps(a.fill);
|
|
30128
|
-
return /* @__PURE__ */
|
|
30519
|
+
return /* @__PURE__ */ jsx85(
|
|
30129
30520
|
RingCircle,
|
|
30130
30521
|
{
|
|
30131
30522
|
...own,
|
|
@@ -30135,15 +30526,15 @@ function SegmentArcs({
|
|
|
30135
30526
|
i
|
|
30136
30527
|
);
|
|
30137
30528
|
}),
|
|
30138
|
-
first && last && !closed ? /* @__PURE__ */
|
|
30139
|
-
/* @__PURE__ */
|
|
30140
|
-
/* @__PURE__ */
|
|
30529
|
+
first && last && !closed ? /* @__PURE__ */ jsxs67(Fragment44, { children: [
|
|
30530
|
+
/* @__PURE__ */ jsx85(Cap, { position: first.start, fill: first.fill }),
|
|
30531
|
+
/* @__PURE__ */ jsx85(Cap, { position: last.start + last.length, fill: last.fill })
|
|
30141
30532
|
] }) : null
|
|
30142
30533
|
] });
|
|
30143
30534
|
}
|
|
30144
30535
|
function Cap({ position, fill }) {
|
|
30145
30536
|
const own = fillProps(fill);
|
|
30146
|
-
return /* @__PURE__ */
|
|
30537
|
+
return /* @__PURE__ */ jsx85(RingCap, { position, ...own, className: cx(own.className, ProgressCircle_default.cap) });
|
|
30147
30538
|
}
|
|
30148
30539
|
function ProgressCircle(props) {
|
|
30149
30540
|
const {
|
|
@@ -30192,10 +30583,10 @@ function ProgressCircle(props) {
|
|
|
30192
30583
|
"aria-describedby": descriptionId
|
|
30193
30584
|
} : { "aria-label": text };
|
|
30194
30585
|
if (label && !showLegend) {
|
|
30195
|
-
description = /* @__PURE__ */
|
|
30586
|
+
description = /* @__PURE__ */ jsx85(VisuallyHidden, { id: descriptionId, children: text });
|
|
30196
30587
|
}
|
|
30197
30588
|
if (legend) {
|
|
30198
|
-
legendNode = loading ? /* @__PURE__ */
|
|
30589
|
+
legendNode = loading ? /* @__PURE__ */ jsx85(ProgressLegendSkeleton, { rows: segmentsProp.length || LOADING_ROWS3, size }) : showLegend ? /* @__PURE__ */ jsx85(
|
|
30199
30590
|
ProgressLegend,
|
|
30200
30591
|
{
|
|
30201
30592
|
id: label ? descriptionId : void 0,
|
|
@@ -30206,7 +30597,7 @@ function ProgressCircle(props) {
|
|
|
30206
30597
|
}
|
|
30207
30598
|
) : null;
|
|
30208
30599
|
}
|
|
30209
|
-
ring = /* @__PURE__ */
|
|
30600
|
+
ring = /* @__PURE__ */ jsx85(
|
|
30210
30601
|
Ring,
|
|
30211
30602
|
{
|
|
30212
30603
|
value: 0,
|
|
@@ -30216,14 +30607,14 @@ function ProgressCircle(props) {
|
|
|
30216
30607
|
role: "group",
|
|
30217
30608
|
...a11y,
|
|
30218
30609
|
...toDataAttributes({ "segment-gap": gap }),
|
|
30219
|
-
children: total > 0 ? /* @__PURE__ */
|
|
30610
|
+
children: total > 0 ? /* @__PURE__ */ jsx85(SegmentArcs, { arcs, gap, closed: free === 0 }) : null
|
|
30220
30611
|
}
|
|
30221
30612
|
);
|
|
30222
30613
|
} else {
|
|
30223
30614
|
const unknown = valueProp === null || valueProp === void 0;
|
|
30224
30615
|
const { value, max, ratio } = resolveValue(valueProp ?? 0, maxProp);
|
|
30225
30616
|
tone = toneProp ?? "accent";
|
|
30226
|
-
ring = /* @__PURE__ */
|
|
30617
|
+
ring = /* @__PURE__ */ jsx85(
|
|
30227
30618
|
Ring,
|
|
30228
30619
|
{
|
|
30229
30620
|
value: unknown ? null : ratio,
|
|
@@ -30240,15 +30631,15 @@ function ProgressCircle(props) {
|
|
|
30240
30631
|
}
|
|
30241
30632
|
);
|
|
30242
30633
|
}
|
|
30243
|
-
const body = /* @__PURE__ */
|
|
30244
|
-
/* @__PURE__ */
|
|
30634
|
+
const body = /* @__PURE__ */ jsxs67(Fragment44, { children: [
|
|
30635
|
+
/* @__PURE__ */ jsx85(RegionSwap, { state: loading ? "loading" : "data", fill: true, children: loading ? /* @__PURE__ */ jsx85(Skeleton, { shape: "block", className: ProgressCircle_default.ringSkeleton }) : ring }),
|
|
30245
30636
|
loading ? null : description,
|
|
30246
|
-
showInner ? /* @__PURE__ */
|
|
30637
|
+
showInner ? /* @__PURE__ */ jsx85(
|
|
30247
30638
|
"div",
|
|
30248
30639
|
{
|
|
30249
30640
|
className: cx(ProgressCircle_default.inner, tone !== "inherit" && ProgressCircle_default.ink),
|
|
30250
30641
|
"aria-hidden": valueText !== void 0 ? true : void 0,
|
|
30251
|
-
children: /* @__PURE__ */
|
|
30642
|
+
children: /* @__PURE__ */ jsx85(GlyphSwap, { children })
|
|
30252
30643
|
}
|
|
30253
30644
|
) : null
|
|
30254
30645
|
] });
|
|
@@ -30259,14 +30650,14 @@ function ProgressCircle(props) {
|
|
|
30259
30650
|
};
|
|
30260
30651
|
if (legend) {
|
|
30261
30652
|
return provide(
|
|
30262
|
-
/* @__PURE__ */
|
|
30263
|
-
/* @__PURE__ */
|
|
30264
|
-
/* @__PURE__ */
|
|
30653
|
+
/* @__PURE__ */ jsxs67("div", { className: cx(ProgressCircle_default.root, className), ...rootProps, children: [
|
|
30654
|
+
/* @__PURE__ */ jsx85("div", { className: ProgressCircle_default.ring, children: body }),
|
|
30655
|
+
/* @__PURE__ */ jsx85(RegionSwap, { state: loading ? "loading" : "data", className: ProgressCircle_default.legend, children: legendNode })
|
|
30265
30656
|
] })
|
|
30266
30657
|
);
|
|
30267
30658
|
}
|
|
30268
30659
|
return provide(
|
|
30269
|
-
/* @__PURE__ */
|
|
30660
|
+
/* @__PURE__ */ jsx85("div", { className: cx(ProgressCircle_default.root, className), ...rootProps, children: body })
|
|
30270
30661
|
);
|
|
30271
30662
|
}
|
|
30272
30663
|
|
|
@@ -30282,7 +30673,7 @@ var Radio_default = {
|
|
|
30282
30673
|
};
|
|
30283
30674
|
|
|
30284
30675
|
// src/components/radio/Radio.tsx
|
|
30285
|
-
import { Fragment as
|
|
30676
|
+
import { Fragment as Fragment45, jsx as jsx86, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
30286
30677
|
var RADIO_GROUP_LABELS = { optional: "\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E" };
|
|
30287
30678
|
var [RadioGroupProvider, useRadioGroupContext] = createComponentContext("Radio.Group");
|
|
30288
30679
|
function RadioGroup({
|
|
@@ -30330,8 +30721,8 @@ function RadioGroup({
|
|
|
30330
30721
|
() => ({ name, value, setValue, size, disabled, invalid: ids.invalid, required }),
|
|
30331
30722
|
[name, value, setValue, size, disabled, ids.invalid, required]
|
|
30332
30723
|
);
|
|
30333
|
-
return /* @__PURE__ */
|
|
30334
|
-
/* @__PURE__ */
|
|
30724
|
+
return /* @__PURE__ */ jsx86(RadioGroupProvider, { value: ctxValue, children: tier.provide(
|
|
30725
|
+
/* @__PURE__ */ jsx86(
|
|
30335
30726
|
FieldFrame,
|
|
30336
30727
|
{
|
|
30337
30728
|
...rest,
|
|
@@ -30347,7 +30738,7 @@ function RadioGroup({
|
|
|
30347
30738
|
optionalLabel: labels.optional,
|
|
30348
30739
|
group: true,
|
|
30349
30740
|
className,
|
|
30350
|
-
children: /* @__PURE__ */
|
|
30741
|
+
children: /* @__PURE__ */ jsx86(
|
|
30351
30742
|
"div",
|
|
30352
30743
|
{
|
|
30353
30744
|
id: ids.controlId,
|
|
@@ -30384,7 +30775,7 @@ function RadioRoot({
|
|
|
30384
30775
|
const ids = useFieldFrame(id, { hint, invalid: group.invalid }, ariaDescribedBy);
|
|
30385
30776
|
const disabled = group.disabled || disabledProp;
|
|
30386
30777
|
const checked = group.value === value;
|
|
30387
|
-
return /* @__PURE__ */
|
|
30778
|
+
return /* @__PURE__ */ jsx86(
|
|
30388
30779
|
ChoiceField,
|
|
30389
30780
|
{
|
|
30390
30781
|
ids,
|
|
@@ -30395,8 +30786,8 @@ function RadioRoot({
|
|
|
30395
30786
|
hint,
|
|
30396
30787
|
hintTone,
|
|
30397
30788
|
className: cx(Radio_default.root, className),
|
|
30398
|
-
control: /* @__PURE__ */
|
|
30399
|
-
/* @__PURE__ */
|
|
30789
|
+
control: /* @__PURE__ */ jsxs68(Fragment45, { children: [
|
|
30790
|
+
/* @__PURE__ */ jsx86(
|
|
30400
30791
|
"input",
|
|
30401
30792
|
{
|
|
30402
30793
|
...inputRest,
|
|
@@ -30414,12 +30805,12 @@ function RadioRoot({
|
|
|
30414
30805
|
"aria-describedby": ids.describedBy
|
|
30415
30806
|
}
|
|
30416
30807
|
),
|
|
30417
|
-
/* @__PURE__ */
|
|
30808
|
+
/* @__PURE__ */ jsx86(
|
|
30418
30809
|
"span",
|
|
30419
30810
|
{
|
|
30420
30811
|
className: cx(choiceVisualClass, choiceBoxClass, Radio_default.control),
|
|
30421
30812
|
"aria-hidden": "true",
|
|
30422
|
-
children: /* @__PURE__ */
|
|
30813
|
+
children: /* @__PURE__ */ jsx86("span", { className: Radio_default.dot })
|
|
30423
30814
|
}
|
|
30424
30815
|
)
|
|
30425
30816
|
] }),
|
|
@@ -30429,7 +30820,7 @@ function RadioRoot({
|
|
|
30429
30820
|
}
|
|
30430
30821
|
RadioRoot.displayName = "Radio.Root";
|
|
30431
30822
|
function RadioLabel(props) {
|
|
30432
|
-
return /* @__PURE__ */
|
|
30823
|
+
return /* @__PURE__ */ jsx86(ChoiceLabel, { ...props });
|
|
30433
30824
|
}
|
|
30434
30825
|
RadioLabel.displayName = "Radio.Label";
|
|
30435
30826
|
var Radio = {
|
|
@@ -30444,13 +30835,13 @@ var RichText_default = {
|
|
|
30444
30835
|
};
|
|
30445
30836
|
|
|
30446
30837
|
// src/components/rich-text/RichText.tsx
|
|
30447
|
-
import { jsx as
|
|
30838
|
+
import { jsx as jsx87 } from "react/jsx-runtime";
|
|
30448
30839
|
var RICH_TEXT_LABELS = {
|
|
30449
30840
|
spoiler: "\u0421\u043A\u0440\u044B\u0442\u044B\u0439 \u0442\u0435\u043A\u0441\u0442"
|
|
30450
30841
|
};
|
|
30451
30842
|
function RichText2({ children, labels: labelsProp, className, ...rest }) {
|
|
30452
30843
|
const labels = useLabels(RICH_TEXT_LABELS, labelsProp);
|
|
30453
|
-
return /* @__PURE__ */
|
|
30844
|
+
return /* @__PURE__ */ jsx87("div", { className: cx(RichText_default.root, className), ...rest, children: /* @__PURE__ */ jsx87(RichText, { source: children, labels }) });
|
|
30454
30845
|
}
|
|
30455
30846
|
|
|
30456
30847
|
// src/components/sheet/Sheet.module.css
|
|
@@ -30459,14 +30850,14 @@ var Sheet_default = {
|
|
|
30459
30850
|
};
|
|
30460
30851
|
|
|
30461
30852
|
// src/components/sheet/Sheet.tsx
|
|
30462
|
-
import { jsx as
|
|
30853
|
+
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
30463
30854
|
function SheetRoot({ children, ...options }) {
|
|
30464
30855
|
const state = useDialogRoot(options);
|
|
30465
|
-
return /* @__PURE__ */
|
|
30856
|
+
return /* @__PURE__ */ jsx88(DialogRootProvider, { value: state, children });
|
|
30466
30857
|
}
|
|
30467
30858
|
SheetRoot.displayName = "Sheet.Root";
|
|
30468
30859
|
function SheetContent(props) {
|
|
30469
|
-
return /* @__PURE__ */
|
|
30860
|
+
return /* @__PURE__ */ jsx88(
|
|
30470
30861
|
DialogPanel,
|
|
30471
30862
|
{
|
|
30472
30863
|
...props,
|
|
@@ -30613,7 +31004,7 @@ var Sparkline_default = {
|
|
|
30613
31004
|
};
|
|
30614
31005
|
|
|
30615
31006
|
// src/components/sparkline/Sparkline.tsx
|
|
30616
|
-
import { Fragment as
|
|
31007
|
+
import { Fragment as Fragment46, jsx as jsx89, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
30617
31008
|
var SPARKLINE_LABELS = {
|
|
30618
31009
|
point: "{label}: {value}",
|
|
30619
31010
|
period: "{first} \u2013 {last}",
|
|
@@ -30699,8 +31090,8 @@ function Sparkline({
|
|
|
30699
31090
|
const drawing = React93.useMemo(() => {
|
|
30700
31091
|
const { paths } = geometry;
|
|
30701
31092
|
if (!paths) return null;
|
|
30702
|
-
return /* @__PURE__ */
|
|
30703
|
-
/* @__PURE__ */
|
|
31093
|
+
return /* @__PURE__ */ jsxs69("div", { className: Sparkline_default.drawing, "aria-hidden": "true", children: [
|
|
31094
|
+
/* @__PURE__ */ jsxs69(
|
|
30704
31095
|
"svg",
|
|
30705
31096
|
{
|
|
30706
31097
|
className: Sparkline_default.svg,
|
|
@@ -30708,18 +31099,18 @@ function Sparkline({
|
|
|
30708
31099
|
preserveAspectRatio: "none",
|
|
30709
31100
|
"aria-hidden": "true",
|
|
30710
31101
|
children: [
|
|
30711
|
-
variant === "area" && paths.area ? /* @__PURE__ */
|
|
30712
|
-
/* @__PURE__ */
|
|
30713
|
-
/* @__PURE__ */
|
|
30714
|
-
/* @__PURE__ */
|
|
31102
|
+
variant === "area" && paths.area ? /* @__PURE__ */ jsxs69(Fragment46, { children: [
|
|
31103
|
+
/* @__PURE__ */ jsx89("defs", { children: /* @__PURE__ */ jsxs69("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
31104
|
+
/* @__PURE__ */ jsx89("stop", { offset: "0", className: Sparkline_default.fadeTop }),
|
|
31105
|
+
/* @__PURE__ */ jsx89("stop", { offset: "1", className: Sparkline_default.fadeBottom })
|
|
30715
31106
|
] }) }),
|
|
30716
|
-
/* @__PURE__ */
|
|
31107
|
+
/* @__PURE__ */ jsx89("path", { className: Sparkline_default.area, d: paths.area, fill: `url(#${gradientId})` })
|
|
30717
31108
|
] }) : null,
|
|
30718
|
-
paths.line ? /* @__PURE__ */
|
|
31109
|
+
paths.line ? /* @__PURE__ */ jsx89("path", { className: Sparkline_default.line, d: paths.line }) : null
|
|
30719
31110
|
]
|
|
30720
31111
|
}
|
|
30721
31112
|
),
|
|
30722
|
-
paths.lone.map((i) => /* @__PURE__ */
|
|
31113
|
+
paths.lone.map((i) => /* @__PURE__ */ jsx89(
|
|
30723
31114
|
"span",
|
|
30724
31115
|
{
|
|
30725
31116
|
className: Sparkline_default.lone,
|
|
@@ -30750,7 +31141,7 @@ function Sparkline({
|
|
|
30750
31141
|
const layoutAttr = compact ? layout : void 0;
|
|
30751
31142
|
const plotNode = plotRef.current;
|
|
30752
31143
|
const tooltipPoint = active === null || !point ? null : pointer ?? (plotNode ? { x: x(index) * plotNode.offsetWidth, y: plotNode.offsetHeight / 2 } : null);
|
|
30753
|
-
return /* @__PURE__ */
|
|
31144
|
+
return /* @__PURE__ */ jsxs69(
|
|
30754
31145
|
"div",
|
|
30755
31146
|
{
|
|
30756
31147
|
...rest,
|
|
@@ -30762,20 +31153,20 @@ function Sparkline({
|
|
|
30762
31153
|
"data-size": compact ? "xs" : void 0,
|
|
30763
31154
|
"aria-busy": loading || void 0,
|
|
30764
31155
|
children: [
|
|
30765
|
-
compact ? null : /* @__PURE__ */
|
|
30766
|
-
/* @__PURE__ */
|
|
30767
|
-
/* @__PURE__ */
|
|
30768
|
-
/* @__PURE__ */
|
|
31156
|
+
compact ? null : /* @__PURE__ */ jsxs69(Fragment46, { children: [
|
|
31157
|
+
/* @__PURE__ */ jsxs69("div", { className: Sparkline_default.head, children: [
|
|
31158
|
+
/* @__PURE__ */ jsx89("span", { className: Sparkline_default.label, children: label }),
|
|
31159
|
+
/* @__PURE__ */ jsx89(RegionSwap, { state: stateKey, className: Sparkline_default.date, children: loading ? /* @__PURE__ */ jsx89(Skeleton, { shape: "text", size: "s", className: Sparkline_default.dateSkeleton }) : headDate })
|
|
30769
31160
|
] }),
|
|
30770
|
-
/* @__PURE__ */
|
|
30771
|
-
/* @__PURE__ */
|
|
30772
|
-
delta !== null ? /* @__PURE__ */
|
|
30773
|
-
/* @__PURE__ */
|
|
31161
|
+
/* @__PURE__ */ jsx89(RegionSwap, { state: stateKey, children: loading ? /* @__PURE__ */ jsx89(Skeleton, { shape: "block", className: Sparkline_default.valueSkeleton }) : /* @__PURE__ */ jsxs69("div", { className: Sparkline_default.valueRow, children: [
|
|
31162
|
+
/* @__PURE__ */ jsx89("span", { className: Sparkline_default.value, "data-empty": restValue === null || void 0, children: atRest ? /* @__PURE__ */ jsx89(RollingNumber, { children: headValue }) : headValue }),
|
|
31163
|
+
delta !== null ? /* @__PURE__ */ jsxs69(Badge.Root, { tone: delta < 0 ? "danger" : "success", className: Sparkline_default.change, children: [
|
|
31164
|
+
/* @__PURE__ */ jsx89(Badge.Icon, { className: Sparkline_default.trend, "data-down": delta < 0 || void 0, children: /* @__PURE__ */ jsx89(Icon, { name: "status.trendUp" }) }),
|
|
30774
31165
|
`${delta > 0 ? "+" : delta < 0 ? "\u2212" : ""}${PERCENT.format(Math.abs(delta))}%`
|
|
30775
31166
|
] }) : null
|
|
30776
31167
|
] }) })
|
|
30777
31168
|
] }),
|
|
30778
|
-
/* @__PURE__ */
|
|
31169
|
+
/* @__PURE__ */ jsx89(RegionSwap, { state: stateKey, children: loading ? /* @__PURE__ */ jsx89(Skeleton, { shape: "block", className: Sparkline_default.plotSkeleton }) : /* @__PURE__ */ jsxs69(
|
|
30779
31170
|
"div",
|
|
30780
31171
|
{
|
|
30781
31172
|
ref: plotRef,
|
|
@@ -30812,7 +31203,7 @@ function Sparkline({
|
|
|
30812
31203
|
},
|
|
30813
31204
|
onBlur: () => setActive(null),
|
|
30814
31205
|
children: [
|
|
30815
|
-
geometry.reference !== null ? /* @__PURE__ */
|
|
31206
|
+
geometry.reference !== null ? /* @__PURE__ */ jsx89(
|
|
30816
31207
|
"span",
|
|
30817
31208
|
{
|
|
30818
31209
|
className: Sparkline_default.reference,
|
|
@@ -30820,15 +31211,15 @@ function Sparkline({
|
|
|
30820
31211
|
"aria-hidden": "true"
|
|
30821
31212
|
}
|
|
30822
31213
|
) : null,
|
|
30823
|
-
/* @__PURE__ */
|
|
30824
|
-
/* @__PURE__ */
|
|
31214
|
+
/* @__PURE__ */ jsx89(RegionSwap, { state: version, fill: true, children: bars ? /* @__PURE__ */ jsxs69("div", { className: Sparkline_default.bars, "aria-hidden": "true", children: [
|
|
31215
|
+
/* @__PURE__ */ jsx89(
|
|
30825
31216
|
"span",
|
|
30826
31217
|
{
|
|
30827
31218
|
className: Sparkline_default.baseline,
|
|
30828
31219
|
style: { "--sparkline-zero": geometry.zero }
|
|
30829
31220
|
}
|
|
30830
31221
|
),
|
|
30831
|
-
data.map((p, i) => /* @__PURE__ */
|
|
31222
|
+
data.map((p, i) => /* @__PURE__ */ jsx89(
|
|
30832
31223
|
"span",
|
|
30833
31224
|
{
|
|
30834
31225
|
className: Sparkline_default.slot,
|
|
@@ -30836,7 +31227,7 @@ function Sparkline({
|
|
|
30836
31227
|
current: i === index || void 0,
|
|
30837
31228
|
quiet: (active !== null || highlight !== void 0) && i !== index ? true : void 0
|
|
30838
31229
|
}),
|
|
30839
|
-
children: p.value === null ? null : /* @__PURE__ */
|
|
31230
|
+
children: p.value === null ? null : /* @__PURE__ */ jsx89(
|
|
30840
31231
|
"span",
|
|
30841
31232
|
{
|
|
30842
31233
|
className: Sparkline_default.bar,
|
|
@@ -30851,7 +31242,7 @@ function Sparkline({
|
|
|
30851
31242
|
i
|
|
30852
31243
|
))
|
|
30853
31244
|
] }) : drawing }),
|
|
30854
|
-
point && !bars ? /* @__PURE__ */
|
|
31245
|
+
point && !bars ? /* @__PURE__ */ jsxs69(
|
|
30855
31246
|
"span",
|
|
30856
31247
|
{
|
|
30857
31248
|
className: Sparkline_default.cursor,
|
|
@@ -30862,8 +31253,8 @@ function Sparkline({
|
|
|
30862
31253
|
"--sparkline-y": shownValue === null ? 0.5 : y(shownValue)
|
|
30863
31254
|
},
|
|
30864
31255
|
children: [
|
|
30865
|
-
/* @__PURE__ */
|
|
30866
|
-
/* @__PURE__ */
|
|
31256
|
+
/* @__PURE__ */ jsx89("span", { className: Sparkline_default.guide }),
|
|
31257
|
+
/* @__PURE__ */ jsx89("span", { className: Sparkline_default.dot, "data-empty": shownValue === null || void 0 })
|
|
30867
31258
|
]
|
|
30868
31259
|
}
|
|
30869
31260
|
) : null
|
|
@@ -30872,16 +31263,16 @@ function Sparkline({
|
|
|
30872
31263
|
) }),
|
|
30873
31264
|
reference !== void 0 ? (
|
|
30874
31265
|
// Hidden text still feeds `aria-describedby` and is not read twice in the page flow.
|
|
30875
|
-
/* @__PURE__ */
|
|
31266
|
+
/* @__PURE__ */ jsx89("span", { id: referenceId, hidden: true, children: formatLabel(labels.reference, { value: formatValue(reference) }) })
|
|
30876
31267
|
) : null,
|
|
30877
|
-
/* @__PURE__ */
|
|
31268
|
+
/* @__PURE__ */ jsx89(
|
|
30878
31269
|
ChartTooltip,
|
|
30879
31270
|
{
|
|
30880
31271
|
anchorRef: plotRef,
|
|
30881
31272
|
point: tooltipPoint,
|
|
30882
31273
|
label: point?.label,
|
|
30883
31274
|
onDismiss: () => setActive(null),
|
|
30884
|
-
children: /* @__PURE__ */
|
|
31275
|
+
children: /* @__PURE__ */ jsx89("span", { className: Sparkline_default.tooltipValue, children: valueText })
|
|
30885
31276
|
}
|
|
30886
31277
|
)
|
|
30887
31278
|
]
|
|
@@ -30906,7 +31297,7 @@ var Stepper_default = {
|
|
|
30906
31297
|
};
|
|
30907
31298
|
|
|
30908
31299
|
// src/components/stepper/Stepper.tsx
|
|
30909
|
-
import { jsx as
|
|
31300
|
+
import { jsx as jsx90, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
30910
31301
|
var STEPPER_LABELS = {
|
|
30911
31302
|
completed: "\u043F\u0440\u043E\u0439\u0434\u0435\u043D",
|
|
30912
31303
|
danger: "\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u044F"
|
|
@@ -30952,11 +31343,11 @@ function StepperRoot({
|
|
|
30952
31343
|
const index = nextIndex;
|
|
30953
31344
|
nextIndex += 1;
|
|
30954
31345
|
items.push(
|
|
30955
|
-
/* @__PURE__ */
|
|
31346
|
+
/* @__PURE__ */ jsx90(StepperIndexContext.Provider, { value: index, children: child }, child.key)
|
|
30956
31347
|
);
|
|
30957
31348
|
}
|
|
30958
|
-
return /* @__PURE__ */
|
|
30959
|
-
/* @__PURE__ */
|
|
31349
|
+
return /* @__PURE__ */ jsx90(StepperRootProvider, { value: contextValue, children: tier.provide(
|
|
31350
|
+
/* @__PURE__ */ jsx90(
|
|
30960
31351
|
"ol",
|
|
30961
31352
|
{
|
|
30962
31353
|
role: "list",
|
|
@@ -30985,9 +31376,9 @@ function StepperItem({
|
|
|
30985
31376
|
const status = statusProp ?? deriveStatus(index, value);
|
|
30986
31377
|
const itemContext = React94.useMemo(() => ({ index, status }), [index, status]);
|
|
30987
31378
|
const spokenStatus = status === "completed" ? labels.completed : status === "danger" ? labels.danger : null;
|
|
30988
|
-
return /* @__PURE__ */
|
|
30989
|
-
/* @__PURE__ */
|
|
30990
|
-
/* @__PURE__ */
|
|
31379
|
+
return /* @__PURE__ */ jsx90(StepperItemProvider, { value: itemContext, children: /* @__PURE__ */ jsxs70("li", { className: Stepper_default.item, children: [
|
|
31380
|
+
/* @__PURE__ */ jsx90("span", { className: Stepper_default.separator, "aria-hidden": "true", children: /* @__PURE__ */ jsx90(Icon, { name: "nav.chevronRight", strokeWidth: 2 }) }),
|
|
31381
|
+
/* @__PURE__ */ jsxs70(
|
|
30991
31382
|
"button",
|
|
30992
31383
|
{
|
|
30993
31384
|
...rest,
|
|
@@ -31007,8 +31398,8 @@ function StepperItem({
|
|
|
31007
31398
|
},
|
|
31008
31399
|
children: [
|
|
31009
31400
|
children,
|
|
31010
|
-
spokenStatus === null ? null : /* @__PURE__ */
|
|
31011
|
-
arrows && orientation === "vertical" ? /* @__PURE__ */
|
|
31401
|
+
spokenStatus === null ? null : /* @__PURE__ */ jsx90(VisuallyHidden, { children: `, ${spokenStatus}` }),
|
|
31402
|
+
arrows && orientation === "vertical" ? /* @__PURE__ */ jsx90("span", { className: Stepper_default.arrow, "aria-hidden": "true", children: /* @__PURE__ */ jsx90(Icon, { name: "nav.chevronRight", strokeWidth: 2 }) }) : null
|
|
31012
31403
|
]
|
|
31013
31404
|
}
|
|
31014
31405
|
)
|
|
@@ -31016,34 +31407,34 @@ function StepperItem({
|
|
|
31016
31407
|
}
|
|
31017
31408
|
StepperItem.displayName = "Stepper.Item";
|
|
31018
31409
|
function statusGlyph(status, index) {
|
|
31019
|
-
if (status === "completed") return /* @__PURE__ */
|
|
31020
|
-
if (status === "danger") return /* @__PURE__ */
|
|
31410
|
+
if (status === "completed") return /* @__PURE__ */ jsx90(Icon, { name: "action.check", strokeWidth: 2 });
|
|
31411
|
+
if (status === "danger") return /* @__PURE__ */ jsx90(Icon, { name: "status.danger" });
|
|
31021
31412
|
return index + 1;
|
|
31022
31413
|
}
|
|
31023
31414
|
function StepperIndicator({ children, className, ...rest }) {
|
|
31024
31415
|
const { status, index } = useStepperItemContext();
|
|
31025
|
-
return /* @__PURE__ */
|
|
31416
|
+
return /* @__PURE__ */ jsx90(
|
|
31026
31417
|
"span",
|
|
31027
31418
|
{
|
|
31028
31419
|
...rest,
|
|
31029
31420
|
className: cx(Stepper_default.indicator, className),
|
|
31030
31421
|
"data-status": status,
|
|
31031
31422
|
"aria-hidden": "true",
|
|
31032
|
-
children: /* @__PURE__ */
|
|
31423
|
+
children: /* @__PURE__ */ jsx90(GlyphSwap, { children: children ?? statusGlyph(status, index) })
|
|
31033
31424
|
}
|
|
31034
31425
|
);
|
|
31035
31426
|
}
|
|
31036
31427
|
StepperIndicator.displayName = "Stepper.Indicator";
|
|
31037
31428
|
function StepperContent({ className, ...rest }) {
|
|
31038
|
-
return /* @__PURE__ */
|
|
31429
|
+
return /* @__PURE__ */ jsx90("span", { ...rest, className: cx(Stepper_default.content, className) });
|
|
31039
31430
|
}
|
|
31040
31431
|
StepperContent.displayName = "Stepper.Content";
|
|
31041
31432
|
function StepperTitle({ className, ...rest }) {
|
|
31042
|
-
return /* @__PURE__ */
|
|
31433
|
+
return /* @__PURE__ */ jsx90("span", { ...rest, className: cx(Stepper_default.title, className) });
|
|
31043
31434
|
}
|
|
31044
31435
|
StepperTitle.displayName = "Stepper.Title";
|
|
31045
31436
|
function StepperDescription({ className, ...rest }) {
|
|
31046
|
-
return /* @__PURE__ */
|
|
31437
|
+
return /* @__PURE__ */ jsx90("span", { ...rest, className: cx(Stepper_default.description, className) });
|
|
31047
31438
|
}
|
|
31048
31439
|
StepperDescription.displayName = "Stepper.Description";
|
|
31049
31440
|
var Stepper = {
|
|
@@ -31063,7 +31454,7 @@ var Switch_default = {
|
|
|
31063
31454
|
};
|
|
31064
31455
|
|
|
31065
31456
|
// src/components/switch/Switch.tsx
|
|
31066
|
-
import { Fragment as
|
|
31457
|
+
import { Fragment as Fragment47, jsx as jsx91, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
31067
31458
|
var SWITCH_LABELS = { optional: "\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E" };
|
|
31068
31459
|
function SwitchRoot({
|
|
31069
31460
|
id,
|
|
@@ -31105,7 +31496,7 @@ function SwitchRoot({
|
|
|
31105
31496
|
}
|
|
31106
31497
|
changes.track(next, outcome, { onResolve: () => setStored(next) });
|
|
31107
31498
|
};
|
|
31108
|
-
return /* @__PURE__ */
|
|
31499
|
+
return /* @__PURE__ */ jsx91(
|
|
31109
31500
|
ChoiceField,
|
|
31110
31501
|
{
|
|
31111
31502
|
ids,
|
|
@@ -31121,8 +31512,8 @@ function SwitchRoot({
|
|
|
31121
31512
|
hintTone,
|
|
31122
31513
|
error,
|
|
31123
31514
|
className: cx(Switch_default.root, className),
|
|
31124
|
-
control: /* @__PURE__ */
|
|
31125
|
-
/* @__PURE__ */
|
|
31515
|
+
control: /* @__PURE__ */ jsxs71(Fragment47, { children: [
|
|
31516
|
+
/* @__PURE__ */ jsx91(
|
|
31126
31517
|
"input",
|
|
31127
31518
|
{
|
|
31128
31519
|
...inputRest,
|
|
@@ -31142,13 +31533,13 @@ function SwitchRoot({
|
|
|
31142
31533
|
}
|
|
31143
31534
|
}
|
|
31144
31535
|
),
|
|
31145
|
-
/* @__PURE__ */
|
|
31536
|
+
/* @__PURE__ */ jsx91(
|
|
31146
31537
|
"span",
|
|
31147
31538
|
{
|
|
31148
31539
|
className: cx(choiceVisualClass, choiceTrackClass, Switch_default.track),
|
|
31149
31540
|
"data-loading": busy || void 0,
|
|
31150
31541
|
"aria-hidden": "true",
|
|
31151
|
-
children: /* @__PURE__ */
|
|
31542
|
+
children: /* @__PURE__ */ jsx91("span", { className: Switch_default.thumb, children: busy ? /* @__PURE__ */ jsx91(Spinner, { "aria-hidden": "true" }) : null })
|
|
31152
31543
|
}
|
|
31153
31544
|
)
|
|
31154
31545
|
] }),
|
|
@@ -31159,7 +31550,7 @@ function SwitchRoot({
|
|
|
31159
31550
|
SwitchRoot.displayName = "Switch.Root";
|
|
31160
31551
|
var takeNext2 = (_current, next) => next;
|
|
31161
31552
|
function SwitchLabel(props) {
|
|
31162
|
-
return /* @__PURE__ */
|
|
31553
|
+
return /* @__PURE__ */ jsx91(ChoiceLabel, { ...props });
|
|
31163
31554
|
}
|
|
31164
31555
|
SwitchLabel.displayName = "Switch.Label";
|
|
31165
31556
|
var Switch = {
|
|
@@ -31192,7 +31583,7 @@ var Tabs_default = {
|
|
|
31192
31583
|
};
|
|
31193
31584
|
|
|
31194
31585
|
// src/components/tabs/Tabs.tsx
|
|
31195
|
-
import { Fragment as
|
|
31586
|
+
import { Fragment as Fragment48, jsx as jsx92, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
31196
31587
|
var TABS_LABELS = {
|
|
31197
31588
|
remove: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0432\u043A\u043B\u0430\u0434\u043A\u0443 \xAB{label}\xBB"
|
|
31198
31589
|
};
|
|
@@ -31263,14 +31654,14 @@ function TabsRoot({
|
|
|
31263
31654
|
...minItemWidth !== void 0 && { "--tabs-item-min": cssLength(minItemWidth) },
|
|
31264
31655
|
...maxItemWidth !== void 0 && { "--tabs-item-max": cssLength(maxItemWidth) }
|
|
31265
31656
|
};
|
|
31266
|
-
return /* @__PURE__ */
|
|
31657
|
+
return /* @__PURE__ */ jsx92(TabsProvider, { value: context, children: /* @__PURE__ */ jsx92(
|
|
31267
31658
|
"div",
|
|
31268
31659
|
{
|
|
31269
31660
|
...rest,
|
|
31270
31661
|
className: cx(fieldTierClass, Tabs_default.root, className),
|
|
31271
31662
|
style: { ...style, ...widths },
|
|
31272
31663
|
...toDataAttributes({ orientation, size, tone, "full-width": fullWidth }),
|
|
31273
|
-
children: tier.provide(/* @__PURE__ */
|
|
31664
|
+
children: tier.provide(/* @__PURE__ */ jsx92("div", { className: Tabs_default.layout, children }))
|
|
31274
31665
|
}
|
|
31275
31666
|
) });
|
|
31276
31667
|
}
|
|
@@ -31427,7 +31818,7 @@ function TabsList({ children, className, ref, ...rest }) {
|
|
|
31427
31818
|
// The strip paints the band; the list inside scrolls and fades over it, the band never fades.
|
|
31428
31819
|
// A column never scrolls sideways: no edge fade, or it would dim the folder where it joins
|
|
31429
31820
|
// the panel.
|
|
31430
|
-
/* @__PURE__ */
|
|
31821
|
+
/* @__PURE__ */ jsx92("div", { className: Tabs_default.strip, children: /* @__PURE__ */ jsxs72(
|
|
31431
31822
|
SwitcherScroller,
|
|
31432
31823
|
{
|
|
31433
31824
|
...rest,
|
|
@@ -31439,7 +31830,7 @@ function TabsList({ children, className, ref, ...rest }) {
|
|
|
31439
31830
|
"data-collapse": collapse,
|
|
31440
31831
|
onKeyDown: handleKeyDown,
|
|
31441
31832
|
children: [
|
|
31442
|
-
/* @__PURE__ */
|
|
31833
|
+
/* @__PURE__ */ jsx92(
|
|
31443
31834
|
"div",
|
|
31444
31835
|
{
|
|
31445
31836
|
ref: folderRef,
|
|
@@ -31449,7 +31840,7 @@ function TabsList({ children, className, ref, ...rest }) {
|
|
|
31449
31840
|
onTransitionEnd: endIndicatorGlide
|
|
31450
31841
|
}
|
|
31451
31842
|
),
|
|
31452
|
-
/* @__PURE__ */
|
|
31843
|
+
/* @__PURE__ */ jsx92(CollapseContext2.Provider, { value: collapse, children })
|
|
31453
31844
|
]
|
|
31454
31845
|
}
|
|
31455
31846
|
) })
|
|
@@ -31529,7 +31920,7 @@ function TabsItem({
|
|
|
31529
31920
|
() => setRemoving(false)
|
|
31530
31921
|
);
|
|
31531
31922
|
}
|
|
31532
|
-
return /* @__PURE__ */
|
|
31923
|
+
return /* @__PURE__ */ jsxs72(
|
|
31533
31924
|
"div",
|
|
31534
31925
|
{
|
|
31535
31926
|
className: Tabs_default.item,
|
|
@@ -31540,8 +31931,8 @@ function TabsItem({
|
|
|
31540
31931
|
removable: removable || void 0
|
|
31541
31932
|
}),
|
|
31542
31933
|
children: [
|
|
31543
|
-
/* @__PURE__ */
|
|
31544
|
-
/* @__PURE__ */
|
|
31934
|
+
/* @__PURE__ */ jsxs72(Tooltip.Root, { open: iconOnly && tooltipOpen, onOpenChange: setTooltipOpen, children: [
|
|
31935
|
+
/* @__PURE__ */ jsx92(Tooltip.Trigger, { children: /* @__PURE__ */ jsx92(
|
|
31545
31936
|
"button",
|
|
31546
31937
|
{
|
|
31547
31938
|
...rest,
|
|
@@ -31582,14 +31973,14 @@ function TabsItem({
|
|
|
31582
31973
|
event.preventDefault();
|
|
31583
31974
|
remove();
|
|
31584
31975
|
},
|
|
31585
|
-
children: /* @__PURE__ */
|
|
31976
|
+
children: /* @__PURE__ */ jsx92("span", { className: cx(Tabs_default.content, press_default.pressPartCompact), children: parts.provide(labelPlainText(children, TabsLabel)) })
|
|
31586
31977
|
}
|
|
31587
31978
|
) }),
|
|
31588
|
-
iconOnly ? /* @__PURE__ */
|
|
31979
|
+
iconOnly ? /* @__PURE__ */ jsx92(Tooltip.Content, { children: label }) : null
|
|
31589
31980
|
] }),
|
|
31590
31981
|
removable ? (
|
|
31591
31982
|
// Out of the tab order: the focused tab closes with Delete; the button is for the pointer.
|
|
31592
|
-
/* @__PURE__ */
|
|
31983
|
+
/* @__PURE__ */ jsx92("span", { className: Tabs_default.remove, children: /* @__PURE__ */ jsx92(
|
|
31593
31984
|
Button.Root,
|
|
31594
31985
|
{
|
|
31595
31986
|
variant: "ghost",
|
|
@@ -31599,7 +31990,7 @@ function TabsItem({
|
|
|
31599
31990
|
loading: removing,
|
|
31600
31991
|
"aria-label": formatLabel(labels.remove, { label: labelText }),
|
|
31601
31992
|
onClick: remove,
|
|
31602
|
-
children: /* @__PURE__ */
|
|
31993
|
+
children: /* @__PURE__ */ jsx92(Button.Icon, { children: /* @__PURE__ */ jsx92(Icon, { name: "action.close" }) })
|
|
31603
31994
|
}
|
|
31604
31995
|
) })
|
|
31605
31996
|
) : null
|
|
@@ -31609,15 +32000,15 @@ function TabsItem({
|
|
|
31609
32000
|
}
|
|
31610
32001
|
TabsItem.displayName = "Tabs.Item";
|
|
31611
32002
|
function TabsIcon({ children, className, ...rest }) {
|
|
31612
|
-
return /* @__PURE__ */
|
|
32003
|
+
return /* @__PURE__ */ jsx92("span", { className: cx(iconSlotClass, Tabs_default.icon, className), "aria-hidden": "true", ...rest, children });
|
|
31613
32004
|
}
|
|
31614
32005
|
TabsIcon.displayName = "Tabs.Icon";
|
|
31615
32006
|
function TabsLabel({ children, className, ...rest }) {
|
|
31616
32007
|
const id = useTextPartId("label");
|
|
31617
32008
|
const iconOnly = React95.useContext(CollapseContext2) === "icon";
|
|
31618
32009
|
const text = typeof children === "string" || typeof children === "number" ? String(children) : "";
|
|
31619
|
-
return /* @__PURE__ */
|
|
31620
|
-
/* @__PURE__ */
|
|
32010
|
+
return /* @__PURE__ */ jsxs72(Fragment48, { children: [
|
|
32011
|
+
/* @__PURE__ */ jsx92(
|
|
31621
32012
|
"span",
|
|
31622
32013
|
{
|
|
31623
32014
|
id,
|
|
@@ -31625,26 +32016,26 @@ function TabsLabel({ children, className, ...rest }) {
|
|
|
31625
32016
|
"data-text": text || void 0,
|
|
31626
32017
|
"aria-hidden": iconOnly || void 0,
|
|
31627
32018
|
...rest,
|
|
31628
|
-
children: /* @__PURE__ */
|
|
32019
|
+
children: /* @__PURE__ */ jsx92("span", { className: Tabs_default.labelText, children })
|
|
31629
32020
|
}
|
|
31630
32021
|
),
|
|
31631
|
-
iconOnly ? /* @__PURE__ */
|
|
32022
|
+
iconOnly ? /* @__PURE__ */ jsx92(VisuallyHidden, { children }) : null
|
|
31632
32023
|
] });
|
|
31633
32024
|
}
|
|
31634
32025
|
TabsLabel.displayName = "Tabs.Label";
|
|
31635
32026
|
function TabsCount({ color = "gray", children, className, ...rest }) {
|
|
31636
32027
|
const id = useTextPartId("count");
|
|
31637
|
-
return /* @__PURE__ */
|
|
32028
|
+
return /* @__PURE__ */ jsx92(Badge.Root, { ...rest, id, color, className: cx(Tabs_default.count, className), children });
|
|
31638
32029
|
}
|
|
31639
32030
|
TabsCount.displayName = "Tabs.Count";
|
|
31640
32031
|
function TabsDescription({ children, className, ...rest }) {
|
|
31641
32032
|
const id = useTextPartId("description");
|
|
31642
|
-
return /* @__PURE__ */
|
|
32033
|
+
return /* @__PURE__ */ jsx92("span", { id, className: cx(Tabs_default.description, className), ...rest, children });
|
|
31643
32034
|
}
|
|
31644
32035
|
TabsDescription.displayName = "Tabs.Description";
|
|
31645
32036
|
function TabsSeparator({ className, ...rest }) {
|
|
31646
32037
|
const { orientation } = useTabsContext();
|
|
31647
|
-
return /* @__PURE__ */
|
|
32038
|
+
return /* @__PURE__ */ jsx92(
|
|
31648
32039
|
Divider,
|
|
31649
32040
|
{
|
|
31650
32041
|
...rest,
|
|
@@ -31656,25 +32047,39 @@ function TabsSeparator({ className, ...rest }) {
|
|
|
31656
32047
|
);
|
|
31657
32048
|
}
|
|
31658
32049
|
TabsSeparator.displayName = "Tabs.Separator";
|
|
31659
|
-
function TabsPanel({ value, ...rest }) {
|
|
32050
|
+
function TabsPanel({ value, keepMounted = false, ...rest }) {
|
|
31660
32051
|
const { activeValue } = useTabsContext();
|
|
31661
|
-
|
|
31662
|
-
|
|
32052
|
+
const active = activeValue === value;
|
|
32053
|
+
const [opened, setOpened] = React95.useState(active);
|
|
32054
|
+
if (active && !opened) setOpened(true);
|
|
32055
|
+
if (!active && !(keepMounted && opened)) return null;
|
|
32056
|
+
return /* @__PURE__ */ jsx92(TabsPanelContent, { value, active, ...rest });
|
|
31663
32057
|
}
|
|
31664
32058
|
TabsPanel.displayName = "Tabs.Panel";
|
|
31665
|
-
function TabsPanelContent({
|
|
32059
|
+
function TabsPanelContent({
|
|
32060
|
+
value,
|
|
32061
|
+
active,
|
|
32062
|
+
children,
|
|
32063
|
+
className,
|
|
32064
|
+
ref,
|
|
32065
|
+
...rest
|
|
32066
|
+
}) {
|
|
31666
32067
|
const { rootId, registerPanel } = useTabsContext();
|
|
31667
32068
|
React95.useLayoutEffect(() => registerPanel(value), [registerPanel, value]);
|
|
31668
|
-
|
|
32069
|
+
const appear = useEnterOnAppear(active);
|
|
32070
|
+
const mergedRef = useMergedRefs(appear.ref, ref);
|
|
32071
|
+
return /* @__PURE__ */ jsx92(
|
|
31669
32072
|
"div",
|
|
31670
32073
|
{
|
|
31671
32074
|
...rest,
|
|
32075
|
+
ref: mergedRef,
|
|
31672
32076
|
role: "tabpanel",
|
|
31673
32077
|
id: panelId(rootId, value),
|
|
31674
32078
|
"aria-labelledby": tabId(rootId, value),
|
|
32079
|
+
hidden: !active || void 0,
|
|
31675
32080
|
tabIndex: 0,
|
|
31676
32081
|
className: cx(Tabs_default.panel, className),
|
|
31677
|
-
children: /* @__PURE__ */
|
|
32082
|
+
children: /* @__PURE__ */ jsx92("div", { className: cx(Tabs_default.panelContent, appear.entering && enterMotion_default.enterBase), children })
|
|
31678
32083
|
}
|
|
31679
32084
|
);
|
|
31680
32085
|
}
|
|
@@ -31725,7 +32130,7 @@ var TagSelect_default = {
|
|
|
31725
32130
|
};
|
|
31726
32131
|
|
|
31727
32132
|
// src/components/tag-select/TagOptionMenu.tsx
|
|
31728
|
-
import { Fragment as
|
|
32133
|
+
import { Fragment as Fragment49, jsx as jsx93, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
31729
32134
|
var TAG_COLORS = [
|
|
31730
32135
|
"gray",
|
|
31731
32136
|
"red",
|
|
@@ -31760,8 +32165,8 @@ function TagOptionMenu({
|
|
|
31760
32165
|
if (next && next !== label) onUpdate?.(value, { label: next });
|
|
31761
32166
|
if (!next) setDraft(label);
|
|
31762
32167
|
};
|
|
31763
|
-
return /* @__PURE__ */
|
|
31764
|
-
/* @__PURE__ */
|
|
32168
|
+
return /* @__PURE__ */ jsxs73(Popover.Root, { open, onOpenChange, children: [
|
|
32169
|
+
/* @__PURE__ */ jsx93(Popover.Trigger, { children: /* @__PURE__ */ jsx93(
|
|
31765
32170
|
Button.Root,
|
|
31766
32171
|
{
|
|
31767
32172
|
variant: "ghost",
|
|
@@ -31772,11 +32177,11 @@ function TagOptionMenu({
|
|
|
31772
32177
|
loading: pending || saving,
|
|
31773
32178
|
className: TagSelect_default.menuTrigger,
|
|
31774
32179
|
onMouseDown: (event) => event.preventDefault(),
|
|
31775
|
-
children: /* @__PURE__ */
|
|
32180
|
+
children: /* @__PURE__ */ jsx93(Button.Icon, { children: /* @__PURE__ */ jsx93(Icon, { name: "action.more" }) })
|
|
31776
32181
|
}
|
|
31777
32182
|
) }),
|
|
31778
|
-
/* @__PURE__ */
|
|
31779
|
-
onUpdate ? /* @__PURE__ */
|
|
32183
|
+
/* @__PURE__ */ jsx93(Popover.Content, { size: "s", flush: true, className: TagSelect_default.menuPanel, children: /* @__PURE__ */ jsxs73("div", { className: TagSelect_default.menuBody, children: [
|
|
32184
|
+
onUpdate ? /* @__PURE__ */ jsx93(Input.Root, { size: "s", children: /* @__PURE__ */ jsx93(Input.Wrapper, { children: /* @__PURE__ */ jsx93(
|
|
31780
32185
|
Input.Field,
|
|
31781
32186
|
{
|
|
31782
32187
|
autoFocus: true,
|
|
@@ -31792,7 +32197,7 @@ function TagOptionMenu({
|
|
|
31792
32197
|
}
|
|
31793
32198
|
}
|
|
31794
32199
|
) }) }) : null,
|
|
31795
|
-
onDelete ? /* @__PURE__ */
|
|
32200
|
+
onDelete ? /* @__PURE__ */ jsxs73(
|
|
31796
32201
|
Button.Root,
|
|
31797
32202
|
{
|
|
31798
32203
|
variant: "ghost",
|
|
@@ -31804,15 +32209,15 @@ function TagOptionMenu({
|
|
|
31804
32209
|
onDelete(value);
|
|
31805
32210
|
},
|
|
31806
32211
|
children: [
|
|
31807
|
-
/* @__PURE__ */
|
|
32212
|
+
/* @__PURE__ */ jsx93(Button.Icon, { children: /* @__PURE__ */ jsx93(Icon, { name: "action.delete" }) }),
|
|
31808
32213
|
labels.delete
|
|
31809
32214
|
]
|
|
31810
32215
|
}
|
|
31811
32216
|
) : null,
|
|
31812
|
-
onUpdate ? /* @__PURE__ */
|
|
31813
|
-
/* @__PURE__ */
|
|
31814
|
-
/* @__PURE__ */
|
|
31815
|
-
/* @__PURE__ */
|
|
32217
|
+
onUpdate ? /* @__PURE__ */ jsxs73(Fragment49, { children: [
|
|
32218
|
+
/* @__PURE__ */ jsx93(Divider, { className: menu_default.separator }),
|
|
32219
|
+
/* @__PURE__ */ jsx93("div", { className: cx(textRole_default.caption, menu_default.groupLabel), children: labels.colors }),
|
|
32220
|
+
/* @__PURE__ */ jsx93("div", { className: cx(fieldTierClass, menu_default.tier), "data-size": "s", children: TAG_COLORS.map((hue) => /* @__PURE__ */ jsxs73(
|
|
31816
32221
|
"button",
|
|
31817
32222
|
{
|
|
31818
32223
|
type: "button",
|
|
@@ -31820,8 +32225,8 @@ function TagOptionMenu({
|
|
|
31820
32225
|
className: cx(menu_default.item, TagSelect_default.colorRow),
|
|
31821
32226
|
onClick: () => onUpdate(value, { color: hue }),
|
|
31822
32227
|
children: [
|
|
31823
|
-
/* @__PURE__ */
|
|
31824
|
-
/* @__PURE__ */
|
|
32228
|
+
/* @__PURE__ */ jsx93(Badge.Root, { color: hue, children: labels.colorNames[hue] }),
|
|
32229
|
+
/* @__PURE__ */ jsx93("span", { className: cx(menu_default.check, TagSelect_default.colorCheck), "aria-hidden": "true", children: /* @__PURE__ */ jsx93(Icon, { name: "action.check" }) })
|
|
31825
32230
|
]
|
|
31826
32231
|
},
|
|
31827
32232
|
hue
|
|
@@ -31879,7 +32284,7 @@ function useChipOverflow({
|
|
|
31879
32284
|
|
|
31880
32285
|
// src/components/tag-select/VirtualOptions.tsx
|
|
31881
32286
|
import * as React98 from "react";
|
|
31882
|
-
import { Fragment as
|
|
32287
|
+
import { Fragment as Fragment51, jsx as jsx94, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
31883
32288
|
var ONE_GROUP3 = () => 0;
|
|
31884
32289
|
function VirtualOptions({
|
|
31885
32290
|
count,
|
|
@@ -31929,10 +32334,10 @@ function VirtualOptions({
|
|
|
31929
32334
|
[scrollRef, offset, startOf]
|
|
31930
32335
|
);
|
|
31931
32336
|
const laid = rowGaps(virtual);
|
|
31932
|
-
const spacer = (key, height) => height > 0 ? /* @__PURE__ */
|
|
31933
|
-
return /* @__PURE__ */
|
|
31934
|
-
/* @__PURE__ */
|
|
31935
|
-
laid.rows.map(({ index, gap }) => /* @__PURE__ */
|
|
32337
|
+
const spacer = (key, height) => height > 0 ? /* @__PURE__ */ jsx94("div", { className: TagSelect_default.spacer, style: { height }, "aria-hidden": "true" }, key) : null;
|
|
32338
|
+
return /* @__PURE__ */ jsxs74(Fragment51, { children: [
|
|
32339
|
+
/* @__PURE__ */ jsx94("div", { ref: startRef, "aria-hidden": "true" }),
|
|
32340
|
+
laid.rows.map(({ index, gap }) => /* @__PURE__ */ jsxs74(React98.Fragment, { children: [
|
|
31936
32341
|
spacer("gap", gap),
|
|
31937
32342
|
renderOption(index, virtual.measure(index))
|
|
31938
32343
|
] }, getKey(index))),
|
|
@@ -31941,7 +32346,7 @@ function VirtualOptions({
|
|
|
31941
32346
|
}
|
|
31942
32347
|
|
|
31943
32348
|
// src/components/tag-select/TagSelect.tsx
|
|
31944
|
-
import { Fragment as
|
|
32349
|
+
import { Fragment as Fragment52, jsx as jsx95, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
31945
32350
|
var TAG_SELECT_LABELS = {
|
|
31946
32351
|
panelHint: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 \u0438\u043B\u0438 \u0441\u043E\u0437\u0434\u0430\u0439\u0442\u0435 \u043D\u043E\u0432\u044B\u0439",
|
|
31947
32352
|
create: "\u0421\u043E\u0437\u0434\u0430\u0442\u044C",
|
|
@@ -32313,19 +32718,19 @@ function TagSelect({
|
|
|
32313
32718
|
const pickOption = () => {
|
|
32314
32719
|
if (!option.disabled) pick(option.value);
|
|
32315
32720
|
};
|
|
32316
|
-
const content = /* @__PURE__ */
|
|
32317
|
-
/* @__PURE__ */
|
|
32318
|
-
/* @__PURE__ */
|
|
32721
|
+
const content = /* @__PURE__ */ jsxs75(Fragment52, { children: [
|
|
32722
|
+
/* @__PURE__ */ jsx95(Checkbox.Indicator, { checked: isSelected, disabled: option.disabled, size: stepDown(size) }),
|
|
32723
|
+
/* @__PURE__ */ jsx95(
|
|
32319
32724
|
Badge.Root,
|
|
32320
32725
|
{
|
|
32321
32726
|
color: option.color ?? fallbackColor,
|
|
32322
32727
|
disabled: option.disabled,
|
|
32323
32728
|
className: TagSelect_default.chip,
|
|
32324
|
-
children: /* @__PURE__ */
|
|
32729
|
+
children: /* @__PURE__ */ jsx95("span", { className: TagSelect_default.chipLabel, children: option.label })
|
|
32325
32730
|
}
|
|
32326
32731
|
)
|
|
32327
32732
|
] });
|
|
32328
|
-
return /* @__PURE__ */
|
|
32733
|
+
return /* @__PURE__ */ jsx95(
|
|
32329
32734
|
OptionRow,
|
|
32330
32735
|
{
|
|
32331
32736
|
id: optionDomId(listboxId, option.value),
|
|
@@ -32341,8 +32746,8 @@ function TagSelect({
|
|
|
32341
32746
|
ref: windowed?.measure,
|
|
32342
32747
|
posInSet: windowed ? windowed.index + 1 + (showCreate ? 1 : 0) : void 0,
|
|
32343
32748
|
setSize: windowed ? setSize : void 0,
|
|
32344
|
-
children: manageable ? /* @__PURE__ */
|
|
32345
|
-
/* @__PURE__ */
|
|
32749
|
+
children: manageable ? /* @__PURE__ */ jsxs75(Fragment52, { children: [
|
|
32750
|
+
/* @__PURE__ */ jsx95(
|
|
32346
32751
|
"button",
|
|
32347
32752
|
{
|
|
32348
32753
|
type: "button",
|
|
@@ -32356,7 +32761,7 @@ function TagSelect({
|
|
|
32356
32761
|
children: content
|
|
32357
32762
|
}
|
|
32358
32763
|
),
|
|
32359
|
-
option.disabled ? null : /* @__PURE__ */
|
|
32764
|
+
option.disabled ? null : /* @__PURE__ */ jsx95(
|
|
32360
32765
|
TagOptionMenu,
|
|
32361
32766
|
{
|
|
32362
32767
|
value: option.value,
|
|
@@ -32378,7 +32783,7 @@ function TagSelect({
|
|
|
32378
32783
|
);
|
|
32379
32784
|
};
|
|
32380
32785
|
return tier.provide(
|
|
32381
|
-
/* @__PURE__ */
|
|
32786
|
+
/* @__PURE__ */ jsxs75(
|
|
32382
32787
|
FieldFrame,
|
|
32383
32788
|
{
|
|
32384
32789
|
...rest,
|
|
@@ -32394,7 +32799,7 @@ function TagSelect({
|
|
|
32394
32799
|
optionalLabel: labels.optional,
|
|
32395
32800
|
className,
|
|
32396
32801
|
children: [
|
|
32397
|
-
/* @__PURE__ */
|
|
32802
|
+
/* @__PURE__ */ jsxs75(
|
|
32398
32803
|
"div",
|
|
32399
32804
|
{
|
|
32400
32805
|
ref: triggerRef,
|
|
@@ -32423,7 +32828,7 @@ function TagSelect({
|
|
|
32423
32828
|
"focus-ring": focusRing
|
|
32424
32829
|
}),
|
|
32425
32830
|
children: [
|
|
32426
|
-
/* @__PURE__ */
|
|
32831
|
+
/* @__PURE__ */ jsxs75(
|
|
32427
32832
|
ScrollContainer,
|
|
32428
32833
|
{
|
|
32429
32834
|
ref: chipsRef,
|
|
@@ -32431,7 +32836,7 @@ function TagSelect({
|
|
|
32431
32836
|
lock: !expanded,
|
|
32432
32837
|
className: TagSelect_default.chips,
|
|
32433
32838
|
children: [
|
|
32434
|
-
visibleChips.map((chip, index) => /* @__PURE__ */
|
|
32839
|
+
visibleChips.map((chip, index) => /* @__PURE__ */ jsx95(
|
|
32435
32840
|
Badge.Root,
|
|
32436
32841
|
{
|
|
32437
32842
|
color: chip.color,
|
|
@@ -32446,14 +32851,14 @@ function TagSelect({
|
|
|
32446
32851
|
onMouseDown: (event) => {
|
|
32447
32852
|
if (event.target.closest("button")) event.preventDefault();
|
|
32448
32853
|
},
|
|
32449
|
-
children: /* @__PURE__ */
|
|
32854
|
+
children: /* @__PURE__ */ jsx95("span", { className: TagSelect_default.chipLabel, children: chip.label })
|
|
32450
32855
|
},
|
|
32451
32856
|
chip.value
|
|
32452
32857
|
)),
|
|
32453
32858
|
hiddenChips.length > 0 ? (
|
|
32454
32859
|
// A real button around the chip; the click bubbles to the field, which expands and
|
|
32455
32860
|
// opens the list.
|
|
32456
|
-
/* @__PURE__ */
|
|
32861
|
+
/* @__PURE__ */ jsx95(
|
|
32457
32862
|
"button",
|
|
32458
32863
|
{
|
|
32459
32864
|
type: "button",
|
|
@@ -32461,17 +32866,17 @@ function TagSelect({
|
|
|
32461
32866
|
disabled,
|
|
32462
32867
|
title: hiddenChips.map((chip) => chip.label).join(", "),
|
|
32463
32868
|
onClick: () => inputRef.current?.focus(),
|
|
32464
|
-
children: /* @__PURE__ */
|
|
32465
|
-
/* @__PURE__ */
|
|
32869
|
+
children: /* @__PURE__ */ jsxs75(Badge.Root, { color: "gray", disabled, className: TagSelect_default.chipMore, children: [
|
|
32870
|
+
/* @__PURE__ */ jsxs75("span", { "aria-hidden": "true", children: [
|
|
32466
32871
|
"+",
|
|
32467
32872
|
hiddenChips.length
|
|
32468
32873
|
] }),
|
|
32469
|
-
/* @__PURE__ */
|
|
32874
|
+
/* @__PURE__ */ jsx95(VisuallyHidden, { children: formatLabel(labels.more, { count: hiddenChips.length }) })
|
|
32470
32875
|
] })
|
|
32471
32876
|
}
|
|
32472
32877
|
)
|
|
32473
32878
|
) : null,
|
|
32474
|
-
/* @__PURE__ */
|
|
32879
|
+
/* @__PURE__ */ jsx95(
|
|
32475
32880
|
"input",
|
|
32476
32881
|
{
|
|
32477
32882
|
ref: inputRef,
|
|
@@ -32509,9 +32914,9 @@ function TagSelect({
|
|
|
32509
32914
|
]
|
|
32510
32915
|
}
|
|
32511
32916
|
),
|
|
32512
|
-
name ? selected.map((item) => /* @__PURE__ */
|
|
32513
|
-
/* @__PURE__ */
|
|
32514
|
-
/* @__PURE__ */
|
|
32917
|
+
name ? selected.map((item) => /* @__PURE__ */ jsx95("input", { type: "hidden", name, value: item, disabled }, item)) : null,
|
|
32918
|
+
/* @__PURE__ */ jsx95(VisuallyHidden, { live: "polite", children: announcement }),
|
|
32919
|
+
/* @__PURE__ */ jsx95(
|
|
32515
32920
|
MeasureRow,
|
|
32516
32921
|
{
|
|
32517
32922
|
ref: measureRef,
|
|
@@ -32520,11 +32925,11 @@ function TagSelect({
|
|
|
32520
32925
|
removeLabel: labels.remove
|
|
32521
32926
|
}
|
|
32522
32927
|
),
|
|
32523
|
-
/* @__PURE__ */
|
|
32928
|
+
/* @__PURE__ */ jsx95("span", { className: TagSelect_default.chevron, "aria-hidden": "true", children: /* @__PURE__ */ jsx95(Icon, { name: "nav.chevronDown" }) })
|
|
32524
32929
|
]
|
|
32525
32930
|
}
|
|
32526
32931
|
),
|
|
32527
|
-
/* @__PURE__ */
|
|
32932
|
+
/* @__PURE__ */ jsxs75(
|
|
32528
32933
|
FloatingPanel,
|
|
32529
32934
|
{
|
|
32530
32935
|
floating,
|
|
@@ -32539,8 +32944,8 @@ function TagSelect({
|
|
|
32539
32944
|
ref: scrollerRef,
|
|
32540
32945
|
className: cx(fieldTierClass, menu_default.tier, menu_default.menu, TagSelect_default.panel),
|
|
32541
32946
|
children: [
|
|
32542
|
-
labels.panelHint ? /* @__PURE__ */
|
|
32543
|
-
showCreate ? /* @__PURE__ */
|
|
32947
|
+
labels.panelHint ? /* @__PURE__ */ jsx95("div", { className: cx(textRole_default.caption, TagSelect_default.panelHint), children: labels.panelHint }) : null,
|
|
32948
|
+
showCreate ? /* @__PURE__ */ jsxs75(
|
|
32544
32949
|
OptionRow,
|
|
32545
32950
|
{
|
|
32546
32951
|
id: optionDomId(listboxId, CREATE_VALUE),
|
|
@@ -32553,13 +32958,13 @@ function TagSelect({
|
|
|
32553
32958
|
managed: false,
|
|
32554
32959
|
onPick: () => pick(CREATE_VALUE),
|
|
32555
32960
|
children: [
|
|
32556
|
-
/* @__PURE__ */
|
|
32557
|
-
/* @__PURE__ */
|
|
32558
|
-
/* @__PURE__ */
|
|
32961
|
+
/* @__PURE__ */ jsx95("span", { className: TagSelect_default.createIcon, "aria-hidden": "true", children: /* @__PURE__ */ jsx95(Icon, { name: "action.add" }) }),
|
|
32962
|
+
/* @__PURE__ */ jsx95("span", { className: TagSelect_default.createLabel, children: labels.create }),
|
|
32963
|
+
/* @__PURE__ */ jsx95(Badge.Root, { color: fallbackColor, className: TagSelect_default.chip, children: /* @__PURE__ */ jsx95("span", { className: TagSelect_default.chipLabel, children: inputTrim }) })
|
|
32559
32964
|
]
|
|
32560
32965
|
}
|
|
32561
32966
|
) : null,
|
|
32562
|
-
virtualized ? /* @__PURE__ */
|
|
32967
|
+
virtualized ? /* @__PURE__ */ jsx95(
|
|
32563
32968
|
VirtualOptions,
|
|
32564
32969
|
{
|
|
32565
32970
|
ref: virtualRef,
|
|
@@ -32632,7 +33037,7 @@ function OptionRow({
|
|
|
32632
33037
|
...toDataAttributes({ value, highlighted, selected, disabled, pending })
|
|
32633
33038
|
};
|
|
32634
33039
|
if (managed) {
|
|
32635
|
-
return /* @__PURE__ */
|
|
33040
|
+
return /* @__PURE__ */ jsx95(
|
|
32636
33041
|
"div",
|
|
32637
33042
|
{
|
|
32638
33043
|
...props,
|
|
@@ -32642,7 +33047,7 @@ function OptionRow({
|
|
|
32642
33047
|
}
|
|
32643
33048
|
);
|
|
32644
33049
|
}
|
|
32645
|
-
return /* @__PURE__ */
|
|
33050
|
+
return /* @__PURE__ */ jsx95(
|
|
32646
33051
|
"button",
|
|
32647
33052
|
{
|
|
32648
33053
|
type: "button",
|
|
@@ -32666,8 +33071,8 @@ var MeasureRow = React99.memo(function MeasureRow2({
|
|
|
32666
33071
|
return (
|
|
32667
33072
|
// The clip keeps the row (wider than the field with many tags) out of the scroll width of
|
|
32668
33073
|
// every scroller around the field; the row itself keeps its full width to measure.
|
|
32669
|
-
/* @__PURE__ */
|
|
32670
|
-
chips.map((chip) => /* @__PURE__ */
|
|
33074
|
+
/* @__PURE__ */ jsx95("div", { className: TagSelect_default.measureClip, "aria-hidden": true, inert: true, children: /* @__PURE__ */ jsxs75("div", { ref, className: TagSelect_default.measure, children: [
|
|
33075
|
+
chips.map((chip) => /* @__PURE__ */ jsx95(
|
|
32671
33076
|
Badge.Root,
|
|
32672
33077
|
{
|
|
32673
33078
|
color: chip.color,
|
|
@@ -32675,11 +33080,11 @@ var MeasureRow = React99.memo(function MeasureRow2({
|
|
|
32675
33080
|
className: TagSelect_default.chip,
|
|
32676
33081
|
labels: { remove: formatLabel(removeLabel, { label: chip.label }) },
|
|
32677
33082
|
onRemove: noop,
|
|
32678
|
-
children: /* @__PURE__ */
|
|
33083
|
+
children: /* @__PURE__ */ jsx95("span", { className: TagSelect_default.chipLabel, children: chip.label })
|
|
32679
33084
|
},
|
|
32680
33085
|
chip.value
|
|
32681
33086
|
)),
|
|
32682
|
-
/* @__PURE__ */
|
|
33087
|
+
/* @__PURE__ */ jsxs75(Badge.Root, { color: "gray", className: TagSelect_default.chipMore, children: [
|
|
32683
33088
|
"+",
|
|
32684
33089
|
Math.max(chips.length, 9)
|
|
32685
33090
|
] })
|
|
@@ -32714,11 +33119,11 @@ var Timeline_default = {
|
|
|
32714
33119
|
};
|
|
32715
33120
|
|
|
32716
33121
|
// src/components/timeline/Timeline.tsx
|
|
32717
|
-
import { Fragment as
|
|
33122
|
+
import { Fragment as Fragment53, jsx as jsx96, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
32718
33123
|
function TimelineRoot({ size: sizeProp, children, className, ...rest }) {
|
|
32719
33124
|
const tier = useHostTier(sizeProp);
|
|
32720
33125
|
return tier.provide(
|
|
32721
|
-
/* @__PURE__ */
|
|
33126
|
+
/* @__PURE__ */ jsx96(
|
|
32722
33127
|
"div",
|
|
32723
33128
|
{
|
|
32724
33129
|
...rest,
|
|
@@ -32744,7 +33149,7 @@ function TimelineGroup({ label, children, className, ...rest }) {
|
|
|
32744
33149
|
const labelId = React100.useId();
|
|
32745
33150
|
const hasLabel = hasContent(label);
|
|
32746
33151
|
const events = React100.Children.toArray(children);
|
|
32747
|
-
const items = events.map((child, index) => /* @__PURE__ */
|
|
33152
|
+
const items = events.map((child, index) => /* @__PURE__ */ jsx96(
|
|
32748
33153
|
EdgeContext.Provider,
|
|
32749
33154
|
{
|
|
32750
33155
|
value: {
|
|
@@ -32757,9 +33162,9 @@ function TimelineGroup({ label, children, className, ...rest }) {
|
|
|
32757
33162
|
},
|
|
32758
33163
|
React100.isValidElement(child) ? child.key : index
|
|
32759
33164
|
));
|
|
32760
|
-
return /* @__PURE__ */
|
|
32761
|
-
hasLabel ? /* @__PURE__ */
|
|
32762
|
-
/* @__PURE__ */
|
|
33165
|
+
return /* @__PURE__ */ jsxs76("div", { className: Timeline_default.group, children: [
|
|
33166
|
+
hasLabel ? /* @__PURE__ */ jsx96("div", { id: labelId, className: cx(GROUP_LABEL_ROLE[size], Timeline_default.groupLabel), children: label }) : null,
|
|
33167
|
+
/* @__PURE__ */ jsx96(
|
|
32763
33168
|
"ol",
|
|
32764
33169
|
{
|
|
32765
33170
|
role: "list",
|
|
@@ -32811,21 +33216,21 @@ function TimelineItem({
|
|
|
32811
33216
|
interactive: interactive || void 0
|
|
32812
33217
|
})
|
|
32813
33218
|
};
|
|
32814
|
-
const dot = /* @__PURE__ */
|
|
33219
|
+
const dot = /* @__PURE__ */ jsx96("span", { className: Timeline_default.dot, "aria-hidden": "true" });
|
|
32815
33220
|
const content = (parts) => {
|
|
32816
33221
|
const { parts: value, rest: text } = splitParts(parts, TimelineItemValue);
|
|
32817
|
-
return /* @__PURE__ */
|
|
33222
|
+
return /* @__PURE__ */ jsxs76(Fragment53, { children: [
|
|
32818
33223
|
dot,
|
|
32819
|
-
/* @__PURE__ */
|
|
33224
|
+
/* @__PURE__ */ jsx96("span", { className: Timeline_default.text, children: text }),
|
|
32820
33225
|
value
|
|
32821
33226
|
] });
|
|
32822
33227
|
};
|
|
32823
33228
|
let row;
|
|
32824
33229
|
if (asChild) {
|
|
32825
33230
|
const child = slotChild(children, "Timeline.Item");
|
|
32826
|
-
row = /* @__PURE__ */
|
|
33231
|
+
row = /* @__PURE__ */ jsx96(InteractiveElement, { ...rowProps, element: "slot", onClick, children: React100.cloneElement(child, void 0, content(child.props.children)) });
|
|
32827
33232
|
} else if (href) {
|
|
32828
|
-
row = /* @__PURE__ */
|
|
33233
|
+
row = /* @__PURE__ */ jsx96(
|
|
32829
33234
|
InteractiveElement,
|
|
32830
33235
|
{
|
|
32831
33236
|
...rowProps,
|
|
@@ -32839,21 +33244,21 @@ function TimelineItem({
|
|
|
32839
33244
|
}
|
|
32840
33245
|
);
|
|
32841
33246
|
} else if (onClick) {
|
|
32842
|
-
row = /* @__PURE__ */
|
|
33247
|
+
row = /* @__PURE__ */ jsx96(InteractiveElement, { ...rowProps, element: "button", onClick, children: content(children) });
|
|
32843
33248
|
} else {
|
|
32844
|
-
row = /* @__PURE__ */
|
|
33249
|
+
row = /* @__PURE__ */ jsx96(InteractiveElement, { ...rowProps, element: "static", children: content(children) });
|
|
32845
33250
|
}
|
|
32846
|
-
return /* @__PURE__ */
|
|
33251
|
+
return /* @__PURE__ */ jsx96("li", { className: Timeline_default.item, ...toDataAttributes(edgeAttributes(edge)), children: row });
|
|
32847
33252
|
}
|
|
32848
33253
|
TimelineItem.displayName = "Timeline.Item";
|
|
32849
33254
|
function TimelineItemTitle({ children, className, ...rest }) {
|
|
32850
|
-
return /* @__PURE__ */
|
|
33255
|
+
return /* @__PURE__ */ jsx96("span", { ...rest, className: cx(Timeline_default.title, className), children });
|
|
32851
33256
|
}
|
|
32852
33257
|
TimelineItemTitle.displayName = "Timeline.ItemTitle";
|
|
32853
33258
|
var ValueContext = React100.createContext(false);
|
|
32854
33259
|
function TimelineItemMeta({ children, className, ...rest }) {
|
|
32855
33260
|
const inValue = React100.useContext(ValueContext);
|
|
32856
|
-
return /* @__PURE__ */
|
|
33261
|
+
return /* @__PURE__ */ jsx96("span", { ...rest, className: cx(inValue ? Timeline_default.valueMeta : Timeline_default.meta, className), children });
|
|
32857
33262
|
}
|
|
32858
33263
|
TimelineItemMeta.displayName = "Timeline.ItemMeta";
|
|
32859
33264
|
function TimelineItemValue({
|
|
@@ -32862,19 +33267,19 @@ function TimelineItemValue({
|
|
|
32862
33267
|
className,
|
|
32863
33268
|
...rest
|
|
32864
33269
|
}) {
|
|
32865
|
-
return /* @__PURE__ */
|
|
33270
|
+
return /* @__PURE__ */ jsx96(
|
|
32866
33271
|
"span",
|
|
32867
33272
|
{
|
|
32868
33273
|
...rest,
|
|
32869
33274
|
className: cx(Timeline_default.value, textTone_default.tone, className),
|
|
32870
33275
|
...toDataAttributes({ tone }),
|
|
32871
|
-
children: /* @__PURE__ */
|
|
33276
|
+
children: /* @__PURE__ */ jsx96(ValueContext.Provider, { value: true, children })
|
|
32872
33277
|
}
|
|
32873
33278
|
);
|
|
32874
33279
|
}
|
|
32875
33280
|
TimelineItemValue.displayName = "Timeline.ItemValue";
|
|
32876
33281
|
function TimelineDescription({ className, ...rest }) {
|
|
32877
|
-
return /* @__PURE__ */
|
|
33282
|
+
return /* @__PURE__ */ jsx96("span", { className: cx(Timeline_default.gapTrailing, className), ...rest });
|
|
32878
33283
|
}
|
|
32879
33284
|
TimelineDescription.displayName = "Timeline.Description";
|
|
32880
33285
|
function TimelineGap({ tone = "neutral", children, className, ...rest }) {
|
|
@@ -32883,9 +33288,9 @@ function TimelineGap({ tone = "neutral", children, className, ...rest }) {
|
|
|
32883
33288
|
const caption = parts.filter((child) => !isDescription(child));
|
|
32884
33289
|
const description = parts.filter(isDescription);
|
|
32885
33290
|
const edge = React100.useContext(EdgeContext);
|
|
32886
|
-
return /* @__PURE__ */
|
|
32887
|
-
/* @__PURE__ */
|
|
32888
|
-
/* @__PURE__ */
|
|
33291
|
+
return /* @__PURE__ */ jsx96("li", { className: cx(Timeline_default.item, Timeline_default.gapItem), ...toDataAttributes(edgeAttributes(edge)), children: /* @__PURE__ */ jsxs76("div", { ...rest, className: cx(Timeline_default.gapRow, className), ...toDataAttributes({ tone }), children: [
|
|
33292
|
+
/* @__PURE__ */ jsx96("span", { className: Timeline_default.gapDot, "aria-hidden": "true" }),
|
|
33293
|
+
/* @__PURE__ */ jsx96("span", { className: Timeline_default.gapCaption, children: caption }),
|
|
32889
33294
|
description
|
|
32890
33295
|
] }) });
|
|
32891
33296
|
}
|
|
@@ -32920,7 +33325,7 @@ var VideoNote_default = {
|
|
|
32920
33325
|
};
|
|
32921
33326
|
|
|
32922
33327
|
// src/components/video-note/VideoNote.tsx
|
|
32923
|
-
import { jsx as
|
|
33328
|
+
import { jsx as jsx97, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
32924
33329
|
var VIDEO_NOTE_LABELS = {
|
|
32925
33330
|
player: "\u0412\u0438\u0434\u0435\u043E\u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435",
|
|
32926
33331
|
play: "\u0412\u043E\u0441\u043F\u0440\u043E\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0432\u0438\u0434\u0435\u043E\u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435",
|
|
@@ -32953,7 +33358,7 @@ function VideoNoteInner(props) {
|
|
|
32953
33358
|
}),
|
|
32954
33359
|
unplayed ? labels.unplayed : null
|
|
32955
33360
|
].filter(Boolean).join(", ");
|
|
32956
|
-
return /* @__PURE__ */
|
|
33361
|
+
return /* @__PURE__ */ jsxs77(
|
|
32957
33362
|
MediaPlayerRoot,
|
|
32958
33363
|
{
|
|
32959
33364
|
label: labels.player,
|
|
@@ -32961,7 +33366,7 @@ function VideoNoteInner(props) {
|
|
|
32961
33366
|
...rest,
|
|
32962
33367
|
className: cx(VideoNote_default.root, className),
|
|
32963
33368
|
children: [
|
|
32964
|
-
/* @__PURE__ */
|
|
33369
|
+
/* @__PURE__ */ jsxs77(
|
|
32965
33370
|
"div",
|
|
32966
33371
|
{
|
|
32967
33372
|
className: cx(press_default.press, VideoNote_default.circle),
|
|
@@ -32971,9 +33376,9 @@ function VideoNoteInner(props) {
|
|
|
32971
33376
|
"data-covered": covered || void 0,
|
|
32972
33377
|
"data-disabled": inactive || void 0,
|
|
32973
33378
|
children: [
|
|
32974
|
-
/* @__PURE__ */
|
|
32975
|
-
placeholder.mounted ? /* @__PURE__ */
|
|
32976
|
-
/* @__PURE__ */
|
|
33379
|
+
/* @__PURE__ */ jsxs77("span", { className: VideoNote_default.media, "aria-hidden": "true", children: [
|
|
33380
|
+
placeholder.mounted ? /* @__PURE__ */ jsx97(Skeleton, { shape: "block", className: VideoNote_default.fill }) : null,
|
|
33381
|
+
/* @__PURE__ */ jsx97(
|
|
32977
33382
|
"video",
|
|
32978
33383
|
{
|
|
32979
33384
|
ref: videoRef,
|
|
@@ -32989,8 +33394,8 @@ function VideoNoteInner(props) {
|
|
|
32989
33394
|
}
|
|
32990
33395
|
)
|
|
32991
33396
|
] }),
|
|
32992
|
-
/* @__PURE__ */
|
|
32993
|
-
/* @__PURE__ */
|
|
33397
|
+
/* @__PURE__ */ jsx97(Ring, { ref: ringRef, value: 0, live: true, track: "none", weight: "band", className: VideoNote_default.ring }),
|
|
33398
|
+
/* @__PURE__ */ jsx97(
|
|
32994
33399
|
"span",
|
|
32995
33400
|
{
|
|
32996
33401
|
className: VideoNote_default.hit,
|
|
@@ -32999,7 +33404,7 @@ function VideoNoteInner(props) {
|
|
|
32999
33404
|
onClick: inactive ? void 0 : player.toggle
|
|
33000
33405
|
}
|
|
33001
33406
|
),
|
|
33002
|
-
/* @__PURE__ */
|
|
33407
|
+
/* @__PURE__ */ jsx97("span", { className: VideoNote_default.play, "data-badge": "play", "data-shown": state !== "playing", children: /* @__PURE__ */ jsx97(
|
|
33003
33408
|
PlayDisk,
|
|
33004
33409
|
{
|
|
33005
33410
|
look: "shade",
|
|
@@ -33013,8 +33418,8 @@ function VideoNoteInner(props) {
|
|
|
33013
33418
|
describedBy: description ? descriptionId : void 0
|
|
33014
33419
|
}
|
|
33015
33420
|
) }),
|
|
33016
|
-
description ? /* @__PURE__ */
|
|
33017
|
-
shown !== null ? /* @__PURE__ */
|
|
33421
|
+
description ? /* @__PURE__ */ jsx97(VisuallyHidden, { id: descriptionId, children: description }) : null,
|
|
33422
|
+
shown !== null ? /* @__PURE__ */ jsxs77(
|
|
33018
33423
|
"span",
|
|
33019
33424
|
{
|
|
33020
33425
|
className: cx(textRole_default.caption, mediaPill_default.pill, VideoNote_default.duration),
|
|
@@ -33022,11 +33427,11 @@ function VideoNoteInner(props) {
|
|
|
33022
33427
|
"aria-hidden": "true",
|
|
33023
33428
|
children: [
|
|
33024
33429
|
formatClock(shown),
|
|
33025
|
-
/* @__PURE__ */
|
|
33430
|
+
/* @__PURE__ */ jsx97(UnplayedDot, { shown: unplayed })
|
|
33026
33431
|
]
|
|
33027
33432
|
}
|
|
33028
33433
|
) : null,
|
|
33029
|
-
transcript ? /* @__PURE__ */
|
|
33434
|
+
transcript ? /* @__PURE__ */ jsx97(
|
|
33030
33435
|
TranscriptButton,
|
|
33031
33436
|
{
|
|
33032
33437
|
transcript,
|
|
@@ -33044,7 +33449,7 @@ function VideoNoteInner(props) {
|
|
|
33044
33449
|
);
|
|
33045
33450
|
}
|
|
33046
33451
|
function VideoNote(props) {
|
|
33047
|
-
return /* @__PURE__ */
|
|
33452
|
+
return /* @__PURE__ */ jsx97(VideoNoteInner, { ...props }, props.src);
|
|
33048
33453
|
}
|
|
33049
33454
|
defineMessagePart(VideoNote, {
|
|
33050
33455
|
shell: "round",
|
|
@@ -33115,7 +33520,7 @@ async function getWaveform(source, bars = WAVEFORM_BARS) {
|
|
|
33115
33520
|
}
|
|
33116
33521
|
|
|
33117
33522
|
// src/components/voice-player/VoicePlayer.tsx
|
|
33118
|
-
import { jsx as
|
|
33523
|
+
import { jsx as jsx98, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
33119
33524
|
var RATES = [1, 1.5, 2];
|
|
33120
33525
|
var VOICE_PLAYER_LABELS = {
|
|
33121
33526
|
player: "\u0413\u043E\u043B\u043E\u0441\u043E\u0432\u043E\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435",
|
|
@@ -33153,7 +33558,7 @@ function Bars({
|
|
|
33153
33558
|
className,
|
|
33154
33559
|
ref
|
|
33155
33560
|
}) {
|
|
33156
|
-
return /* @__PURE__ */
|
|
33561
|
+
return /* @__PURE__ */ jsx98("span", { ref, className: cx(VoicePlayer_default.bars, className), "aria-hidden": "true", children: levels.map((level, i) => /* @__PURE__ */ jsx98(
|
|
33157
33562
|
"span",
|
|
33158
33563
|
{
|
|
33159
33564
|
className: VoicePlayer_default.bar,
|
|
@@ -33221,7 +33626,7 @@ function VoicePlayer(props) {
|
|
|
33221
33626
|
const shownTime = showElapsed ? position : total;
|
|
33222
33627
|
const rateText = formatRate(rate);
|
|
33223
33628
|
const open = transcript?.expanded ?? false;
|
|
33224
|
-
return /* @__PURE__ */
|
|
33629
|
+
return /* @__PURE__ */ jsxs78(
|
|
33225
33630
|
MediaPlayerRoot,
|
|
33226
33631
|
{
|
|
33227
33632
|
label: labels.player,
|
|
@@ -33229,7 +33634,7 @@ function VoicePlayer(props) {
|
|
|
33229
33634
|
...rest,
|
|
33230
33635
|
className: cx(VoicePlayer_default.root, className),
|
|
33231
33636
|
children: [
|
|
33232
|
-
/* @__PURE__ */
|
|
33637
|
+
/* @__PURE__ */ jsx98(
|
|
33233
33638
|
"audio",
|
|
33234
33639
|
{
|
|
33235
33640
|
ref: audioRef,
|
|
@@ -33239,8 +33644,8 @@ function VoicePlayer(props) {
|
|
|
33239
33644
|
...player.mediaEvents
|
|
33240
33645
|
}
|
|
33241
33646
|
),
|
|
33242
|
-
/* @__PURE__ */
|
|
33243
|
-
/* @__PURE__ */
|
|
33647
|
+
/* @__PURE__ */ jsxs78("div", { className: VoicePlayer_default.row, children: [
|
|
33648
|
+
/* @__PURE__ */ jsx98(
|
|
33244
33649
|
PlayDisk,
|
|
33245
33650
|
{
|
|
33246
33651
|
look: "solid",
|
|
@@ -33252,9 +33657,9 @@ function VoicePlayer(props) {
|
|
|
33252
33657
|
onToggle: player.toggle
|
|
33253
33658
|
}
|
|
33254
33659
|
),
|
|
33255
|
-
/* @__PURE__ */
|
|
33256
|
-
/* @__PURE__ */
|
|
33257
|
-
/* @__PURE__ */
|
|
33660
|
+
/* @__PURE__ */ jsxs78("div", { className: VoicePlayer_default.body, children: [
|
|
33661
|
+
/* @__PURE__ */ jsxs78("div", { className: VoicePlayer_default.waveLine, children: [
|
|
33662
|
+
/* @__PURE__ */ jsxs78(
|
|
33258
33663
|
"div",
|
|
33259
33664
|
{
|
|
33260
33665
|
ref: waveRef,
|
|
@@ -33277,12 +33682,12 @@ function VoicePlayer(props) {
|
|
|
33277
33682
|
onLostPointerCapture: endDrag,
|
|
33278
33683
|
onKeyDown: player.seekWithKey,
|
|
33279
33684
|
children: [
|
|
33280
|
-
/* @__PURE__ */
|
|
33281
|
-
/* @__PURE__ */
|
|
33685
|
+
/* @__PURE__ */ jsx98(Bars, { levels: bars }),
|
|
33686
|
+
/* @__PURE__ */ jsx98(Bars, { ref: playedRef, levels: bars, className: VoicePlayer_default.played })
|
|
33282
33687
|
]
|
|
33283
33688
|
}
|
|
33284
33689
|
),
|
|
33285
|
-
transcript ? /* @__PURE__ */
|
|
33690
|
+
transcript ? /* @__PURE__ */ jsx98(
|
|
33286
33691
|
TranscriptButton,
|
|
33287
33692
|
{
|
|
33288
33693
|
transcript,
|
|
@@ -33291,11 +33696,11 @@ function VoicePlayer(props) {
|
|
|
33291
33696
|
}
|
|
33292
33697
|
) : null
|
|
33293
33698
|
] }),
|
|
33294
|
-
/* @__PURE__ */
|
|
33295
|
-
/* @__PURE__ */
|
|
33296
|
-
/* @__PURE__ */
|
|
33297
|
-
unplayed ? /* @__PURE__ */
|
|
33298
|
-
/* @__PURE__ */
|
|
33699
|
+
/* @__PURE__ */ jsxs78("div", { className: cx(textRole_default.caption, VoicePlayer_default.meta), children: [
|
|
33700
|
+
/* @__PURE__ */ jsx98("span", { className: VoicePlayer_default.time, "aria-hidden": "true", children: formatClock(shownTime) }),
|
|
33701
|
+
/* @__PURE__ */ jsx98(UnplayedDot, { shown: unplayed }),
|
|
33702
|
+
unplayed ? /* @__PURE__ */ jsx98(VisuallyHidden, { children: labels.unplayed }) : null,
|
|
33703
|
+
/* @__PURE__ */ jsx98(
|
|
33299
33704
|
Button.Root,
|
|
33300
33705
|
{
|
|
33301
33706
|
variant: "soft",
|