@dxos/react-ui 0.7.5-labs.e27f9b9 → 0.7.5-labs.ea4b4c2
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/dist/lib/browser/index.mjs +9 -9
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +9 -9
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +9 -9
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/Clipboard/CopyButton.d.ts +5 -1
- package/dist/types/src/components/Clipboard/CopyButton.d.ts.map +1 -1
- package/dist/types/src/components/Clipboard/index.d.ts +6 -1
- package/dist/types/src/components/Clipboard/index.d.ts.map +1 -1
- package/dist/types/src/components/Dialogs/AlertDialog.d.ts +1 -1
- package/dist/types/src/components/Dialogs/AlertDialog.d.ts.map +1 -1
- package/dist/types/src/components/Dialogs/Dialog.d.ts +4 -2
- package/dist/types/src/components/Dialogs/Dialog.d.ts.map +1 -1
- package/dist/types/src/components/Lists/ListDropIndicator.d.ts +3 -1
- package/dist/types/src/components/Lists/ListDropIndicator.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/components/Clipboard/CopyButton.tsx +6 -2
- package/src/components/Dialogs/AlertDialog.tsx +3 -1
- package/src/components/Dialogs/Dialog.tsx +9 -4
- package/src/components/Lists/ListDropIndicator.tsx +15 -7
|
@@ -887,7 +887,7 @@ var CopyButtonIconOnly = ({ value, classNames, iconProps, variant, ...props }) =
|
|
|
887
887
|
const { t } = useTranslation("os");
|
|
888
888
|
const { textValue, setTextValue } = useClipboard();
|
|
889
889
|
const isCopied = textValue === value;
|
|
890
|
-
const label = isCopied ? t("copy success label") : t("copy label");
|
|
890
|
+
const label = isCopied ? t("copy success label") : props.label ?? t("copy label");
|
|
891
891
|
const [open, setOpen] = useState6(false);
|
|
892
892
|
return /* @__PURE__ */ React17.createElement(Tooltip.Root, {
|
|
893
893
|
delayDuration: 1500,
|
|
@@ -969,13 +969,13 @@ var DialogOverlay = /* @__PURE__ */ forwardRef12(({ classNames, children, blockA
|
|
|
969
969
|
}, children));
|
|
970
970
|
});
|
|
971
971
|
DialogOverlay.displayName = DIALOG_OVERLAY_NAME;
|
|
972
|
-
var DialogContent = /* @__PURE__ */ forwardRef12(({ classNames, children, ...props }, forwardedRef) => {
|
|
972
|
+
var DialogContent = /* @__PURE__ */ forwardRef12(({ classNames, children, inOverlayLayout: propsInOverlayLayout, ...props }, forwardedRef) => {
|
|
973
973
|
const { tx } = useThemeContext();
|
|
974
974
|
const { inOverlayLayout } = useOverlayLayoutContext(DIALOG_CONTENT_NAME);
|
|
975
975
|
return /* @__PURE__ */ React18.createElement(DialogContentPrimitive, {
|
|
976
976
|
...props,
|
|
977
977
|
className: tx("dialog.content", "dialog", {
|
|
978
|
-
inOverlayLayout
|
|
978
|
+
inOverlayLayout: propsInOverlayLayout || inOverlayLayout
|
|
979
979
|
}, classNames),
|
|
980
980
|
ref: forwardedRef
|
|
981
981
|
}, children);
|
|
@@ -1712,8 +1712,8 @@ var edgeToOrientationMap = {
|
|
|
1712
1712
|
right: "vertical"
|
|
1713
1713
|
};
|
|
1714
1714
|
var orientationStyles = {
|
|
1715
|
-
horizontal: "h-[--line-thickness] left-[--terminal-radius] right-
|
|
1716
|
-
vertical: "w-[--line-thickness] top-[--terminal-radius] bottom-
|
|
1715
|
+
horizontal: "h-[--line-thickness] left-[calc(var(--line-inset)+var(--terminal-radius))] right-[--line-inset] before:left-[--terminal-inset]",
|
|
1716
|
+
vertical: "w-[--line-thickness] top-[calc(var(--line-inset)+var(--terminal-radius))] bottom-[--line-inset] before:top-[--terminal-inset]"
|
|
1717
1717
|
};
|
|
1718
1718
|
var edgeStyles = {
|
|
1719
1719
|
top: "top-[--line-offset] before:top-[--offset-terminal]",
|
|
@@ -1724,17 +1724,17 @@ var edgeStyles = {
|
|
|
1724
1724
|
var strokeSize = 2;
|
|
1725
1725
|
var terminalSize = 8;
|
|
1726
1726
|
var offsetToAlignTerminalWithLine = (strokeSize - terminalSize) / 2;
|
|
1727
|
-
var ListDropIndicator = ({ edge, gap = 0 }) => {
|
|
1728
|
-
const lineOffset = `calc(-0.5 * (${gap}px + ${strokeSize}px))`;
|
|
1727
|
+
var ListDropIndicator = ({ edge, gap = 0, lineInset = 0, terminalInset = lineInset - terminalSize }) => {
|
|
1729
1728
|
const orientation = edgeToOrientationMap[edge];
|
|
1730
1729
|
return /* @__PURE__ */ React23.createElement("div", {
|
|
1731
1730
|
role: "none",
|
|
1732
1731
|
style: {
|
|
1733
1732
|
"--line-thickness": `${strokeSize}px`,
|
|
1734
|
-
"--line-offset":
|
|
1733
|
+
"--line-offset": `calc(-0.5 * (${gap}px + ${strokeSize}px))`,
|
|
1734
|
+
"--line-inset": `${lineInset}px`,
|
|
1735
1735
|
"--terminal-size": `${terminalSize}px`,
|
|
1736
1736
|
"--terminal-radius": `${terminalSize / 2}px`,
|
|
1737
|
-
"--
|
|
1737
|
+
"--terminal-inset": `${terminalInset}px`,
|
|
1738
1738
|
"--offset-terminal": `${offsetToAlignTerminalWithLine}px`
|
|
1739
1739
|
},
|
|
1740
1740
|
className: `absolute z-10 pointer-events-none bg-accentSurface before:content-[''] before:w-[--terminal-size] before:h-[--terminal-size] box-border before:absolute before:border-[length:--line-thickness] before:border-solid before:border-accentSurface before:rounded-full ${orientationStyles[orientation]} ${edgeStyles[edge]}`
|