@dxos/react-ui 0.7.5-labs.35b4b42 → 0.7.5-labs.401163d
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 +15 -18
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +15 -18
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +15 -18
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/Avatars/Avatar.d.ts.map +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/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/Avatars/Avatar.tsx +2 -7
- package/src/components/Clipboard/CopyButton.tsx +6 -2
- package/src/components/Dialogs/AlertDialog.tsx +3 -1
- package/src/components/Dialogs/Dialog.stories.tsx +1 -1
- package/src/components/Dialogs/Dialog.tsx +9 -4
- package/src/components/Lists/ListDropIndicator.tsx +15 -7
- package/src/components/Tag/Tag.stories.tsx +17 -31
- package/src/components/Tag/Tag.tsx +15 -6
|
@@ -253,16 +253,12 @@ var AvatarFrame = /* @__PURE__ */ forwardRef3(({ classNames, children, ...props
|
|
|
253
253
|
y: ringGap + ringWidth,
|
|
254
254
|
rx
|
|
255
255
|
}))), variant === "circle" ? /* @__PURE__ */ React4.createElement("circle", {
|
|
256
|
-
className: hue ? tx("hue.fill", "avatar__frame__circle", {
|
|
257
|
-
hue
|
|
258
|
-
}) : "fill-[var(--surface-bg)]",
|
|
259
256
|
cx: "50%",
|
|
260
257
|
cy: "50%",
|
|
261
|
-
r
|
|
258
|
+
r,
|
|
259
|
+
fill: hue ? `var(--dx-${hue}Fill)` : "var(--surface-bg)"
|
|
262
260
|
}) : /* @__PURE__ */ React4.createElement("rect", {
|
|
263
|
-
|
|
264
|
-
hue
|
|
265
|
-
}) : "fill-[var(--surface-bg)]",
|
|
261
|
+
fill: hue ? `var(--dx-${hue}Fill)` : "var(--surface-bg)",
|
|
266
262
|
x: ringGap + ringWidth,
|
|
267
263
|
y: ringGap + ringWidth,
|
|
268
264
|
width: 2 * r,
|
|
@@ -887,7 +883,7 @@ var CopyButtonIconOnly = ({ value, classNames, iconProps, variant, ...props }) =
|
|
|
887
883
|
const { t } = useTranslation("os");
|
|
888
884
|
const { textValue, setTextValue } = useClipboard();
|
|
889
885
|
const isCopied = textValue === value;
|
|
890
|
-
const label = isCopied ? t("copy success label") : t("copy label");
|
|
886
|
+
const label = isCopied ? t("copy success label") : props.label ?? t("copy label");
|
|
891
887
|
const [open, setOpen] = useState6(false);
|
|
892
888
|
return /* @__PURE__ */ React17.createElement(Tooltip.Root, {
|
|
893
889
|
delayDuration: 1500,
|
|
@@ -969,13 +965,13 @@ var DialogOverlay = /* @__PURE__ */ forwardRef12(({ classNames, children, blockA
|
|
|
969
965
|
}, children));
|
|
970
966
|
});
|
|
971
967
|
DialogOverlay.displayName = DIALOG_OVERLAY_NAME;
|
|
972
|
-
var DialogContent = /* @__PURE__ */ forwardRef12(({ classNames, children, ...props }, forwardedRef) => {
|
|
968
|
+
var DialogContent = /* @__PURE__ */ forwardRef12(({ classNames, children, inOverlayLayout: propsInOverlayLayout, ...props }, forwardedRef) => {
|
|
973
969
|
const { tx } = useThemeContext();
|
|
974
970
|
const { inOverlayLayout } = useOverlayLayoutContext(DIALOG_CONTENT_NAME);
|
|
975
971
|
return /* @__PURE__ */ React18.createElement(DialogContentPrimitive, {
|
|
976
972
|
...props,
|
|
977
973
|
className: tx("dialog.content", "dialog", {
|
|
978
|
-
inOverlayLayout
|
|
974
|
+
inOverlayLayout: propsInOverlayLayout || inOverlayLayout
|
|
979
975
|
}, classNames),
|
|
980
976
|
ref: forwardedRef
|
|
981
977
|
}, children);
|
|
@@ -1712,8 +1708,8 @@ var edgeToOrientationMap = {
|
|
|
1712
1708
|
right: "vertical"
|
|
1713
1709
|
};
|
|
1714
1710
|
var orientationStyles = {
|
|
1715
|
-
horizontal: "h-[--line-thickness] left-[--terminal-radius] right-
|
|
1716
|
-
vertical: "w-[--line-thickness] top-[--terminal-radius] bottom-
|
|
1711
|
+
horizontal: "h-[--line-thickness] left-[calc(var(--line-inset)+var(--terminal-radius))] right-[--line-inset] before:left-[--terminal-inset]",
|
|
1712
|
+
vertical: "w-[--line-thickness] top-[calc(var(--line-inset)+var(--terminal-radius))] bottom-[--line-inset] before:top-[--terminal-inset]"
|
|
1717
1713
|
};
|
|
1718
1714
|
var edgeStyles = {
|
|
1719
1715
|
top: "top-[--line-offset] before:top-[--offset-terminal]",
|
|
@@ -1724,17 +1720,17 @@ var edgeStyles = {
|
|
|
1724
1720
|
var strokeSize = 2;
|
|
1725
1721
|
var terminalSize = 8;
|
|
1726
1722
|
var offsetToAlignTerminalWithLine = (strokeSize - terminalSize) / 2;
|
|
1727
|
-
var ListDropIndicator = ({ edge, gap = 0 }) => {
|
|
1728
|
-
const lineOffset = `calc(-0.5 * (${gap}px + ${strokeSize}px))`;
|
|
1723
|
+
var ListDropIndicator = ({ edge, gap = 0, lineInset = 0, terminalInset = lineInset - terminalSize }) => {
|
|
1729
1724
|
const orientation = edgeToOrientationMap[edge];
|
|
1730
1725
|
return /* @__PURE__ */ React23.createElement("div", {
|
|
1731
1726
|
role: "none",
|
|
1732
1727
|
style: {
|
|
1733
1728
|
"--line-thickness": `${strokeSize}px`,
|
|
1734
|
-
"--line-offset":
|
|
1729
|
+
"--line-offset": `calc(-0.5 * (${gap}px + ${strokeSize}px))`,
|
|
1730
|
+
"--line-inset": `${lineInset}px`,
|
|
1735
1731
|
"--terminal-size": `${terminalSize}px`,
|
|
1736
1732
|
"--terminal-radius": `${terminalSize / 2}px`,
|
|
1737
|
-
"--
|
|
1733
|
+
"--terminal-inset": `${terminalInset}px`,
|
|
1738
1734
|
"--offset-terminal": `${offsetToAlignTerminalWithLine}px`
|
|
1739
1735
|
},
|
|
1740
1736
|
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 +2973,15 @@ var Separator4 = /* @__PURE__ */ forwardRef26(({ classNames, orientation = "hori
|
|
|
2977
2973
|
import { Primitive as Primitive12 } from "@radix-ui/react-primitive";
|
|
2978
2974
|
import { Slot as Slot13 } from "@radix-ui/react-slot";
|
|
2979
2975
|
import React35, { forwardRef as forwardRef27 } from "react";
|
|
2980
|
-
var Tag = /* @__PURE__ */ forwardRef27(({ asChild, palette, classNames, ...props }, forwardedRef) => {
|
|
2976
|
+
var Tag = /* @__PURE__ */ forwardRef27(({ asChild, palette = "neutral", classNames, ...props }, forwardedRef) => {
|
|
2981
2977
|
const { tx } = useThemeContext();
|
|
2982
2978
|
const Root5 = asChild ? Slot13 : Primitive12.span;
|
|
2983
2979
|
return /* @__PURE__ */ React35.createElement(Root5, {
|
|
2984
2980
|
...props,
|
|
2985
|
-
className: tx("tag.root", "tag", {
|
|
2981
|
+
className: tx("tag.root", "dx-tag", {
|
|
2986
2982
|
palette
|
|
2987
2983
|
}, classNames),
|
|
2984
|
+
"data-hue": palette,
|
|
2988
2985
|
ref: forwardedRef
|
|
2989
2986
|
});
|
|
2990
2987
|
});
|