@dxos/react-ui 0.7.5-labs.35b4b42 → 0.7.5-labs.8a82073
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 +10 -9
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +10 -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 +10 -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/Lists/ListDropIndicator.d.ts +3 -1
- package/dist/types/src/components/Lists/ListDropIndicator.d.ts.map +1 -1
- package/dist/types/src/components/Tag/Tag.d.ts.map +1 -1
- package/dist/types/src/components/Tag/Tag.stories.d.ts +12 -5
- package/dist/types/src/components/Tag/Tag.stories.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/components/Clipboard/CopyButton.tsx +6 -2
- package/src/components/Lists/ListDropIndicator.tsx +15 -7
- package/src/components/Tag/Tag.stories.tsx +20 -31
- package/src/components/Tag/Tag.tsx +15 -6
|
@@ -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,
|
|
@@ -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]}`
|
|
@@ -2977,14 +2977,15 @@ var Separator4 = /* @__PURE__ */ forwardRef26(({ classNames, orientation = "hori
|
|
|
2977
2977
|
import { Primitive as Primitive12 } from "@radix-ui/react-primitive";
|
|
2978
2978
|
import { Slot as Slot13 } from "@radix-ui/react-slot";
|
|
2979
2979
|
import React35, { forwardRef as forwardRef27 } from "react";
|
|
2980
|
-
var Tag = /* @__PURE__ */ forwardRef27(({ asChild, palette, classNames, ...props }, forwardedRef) => {
|
|
2980
|
+
var Tag = /* @__PURE__ */ forwardRef27(({ asChild, palette = "neutral", classNames, ...props }, forwardedRef) => {
|
|
2981
2981
|
const { tx } = useThemeContext();
|
|
2982
2982
|
const Root5 = asChild ? Slot13 : Primitive12.span;
|
|
2983
2983
|
return /* @__PURE__ */ React35.createElement(Root5, {
|
|
2984
2984
|
...props,
|
|
2985
|
-
className: tx("tag.root", "tag", {
|
|
2985
|
+
className: tx("tag.root", "dx-tag", {
|
|
2986
2986
|
palette
|
|
2987
2987
|
}, classNames),
|
|
2988
|
+
"data-hue": palette,
|
|
2988
2989
|
ref: forwardedRef
|
|
2989
2990
|
});
|
|
2990
2991
|
});
|