@dxos/react-ui 0.7.5-labs.a279d8c → 0.7.5-labs.d453967
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 +81 -86
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +82 -86
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +81 -86
- 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 +5 -9
- package/dist/types/src/components/Avatars/Avatar.d.ts.map +1 -1
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts +1 -2
- package/dist/types/src/components/Avatars/Avatar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Buttons/IconButton.d.ts +2 -0
- package/dist/types/src/components/Buttons/IconButton.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/Main/Main.d.ts +35 -22
- package/dist/types/src/components/Main/Main.d.ts.map +1 -1
- package/dist/types/src/components/Main/Main.stories.d.ts +1 -1
- package/dist/types/src/components/Menus/DropdownMenu.d.ts +2 -6
- package/dist/types/src/components/Menus/DropdownMenu.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/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +42 -42
- package/src/components/Avatars/Avatar.tsx +5 -13
- package/src/components/Buttons/IconButton.tsx +4 -3
- 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/Input/Input.tsx +1 -1
- package/src/components/Lists/ListDropIndicator.tsx +15 -7
- package/src/components/Main/Main.stories.tsx +1 -1
- package/src/components/Main/Main.tsx +78 -72
- 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,
|
|
@@ -655,12 +651,15 @@ var Tooltip = {
|
|
|
655
651
|
};
|
|
656
652
|
|
|
657
653
|
// packages/ui/react-ui/src/components/Buttons/IconButton.tsx
|
|
658
|
-
var IconOnlyButton = /* @__PURE__ */ forwardRef9(({ tooltipPortal = true, tooltipZIndex: zIndex, suppressNextTooltip, ...props }, forwardedRef) => {
|
|
654
|
+
var IconOnlyButton = /* @__PURE__ */ forwardRef9(({ tooltipPortal = true, tooltipZIndex: zIndex, tooltipSide, suppressNextTooltip, ...props }, forwardedRef) => {
|
|
659
655
|
const [triggerTooltipOpen, setTriggerTooltipOpen] = useState4(false);
|
|
660
|
-
const content = /* @__PURE__ */ React10.createElement(Tooltip.Content,
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
656
|
+
const content = /* @__PURE__ */ React10.createElement(Tooltip.Content, {
|
|
657
|
+
...zIndex && {
|
|
658
|
+
style: {
|
|
659
|
+
zIndex
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
|
+
side: tooltipSide
|
|
664
663
|
}, props.label, /* @__PURE__ */ React10.createElement(Tooltip.Arrow, null));
|
|
665
664
|
return /* @__PURE__ */ React10.createElement(Tooltip.Root, {
|
|
666
665
|
open: triggerTooltipOpen,
|
|
@@ -884,7 +883,7 @@ var CopyButtonIconOnly = ({ value, classNames, iconProps, variant, ...props }) =
|
|
|
884
883
|
const { t } = useTranslation("os");
|
|
885
884
|
const { textValue, setTextValue } = useClipboard();
|
|
886
885
|
const isCopied = textValue === value;
|
|
887
|
-
const label = isCopied ? t("copy success label") : t("copy label");
|
|
886
|
+
const label = isCopied ? t("copy success label") : props.label ?? t("copy label");
|
|
888
887
|
const [open, setOpen] = useState6(false);
|
|
889
888
|
return /* @__PURE__ */ React17.createElement(Tooltip.Root, {
|
|
890
889
|
delayDuration: 1500,
|
|
@@ -966,13 +965,13 @@ var DialogOverlay = /* @__PURE__ */ forwardRef12(({ classNames, children, blockA
|
|
|
966
965
|
}, children));
|
|
967
966
|
});
|
|
968
967
|
DialogOverlay.displayName = DIALOG_OVERLAY_NAME;
|
|
969
|
-
var DialogContent = /* @__PURE__ */ forwardRef12(({ classNames, children, ...props }, forwardedRef) => {
|
|
968
|
+
var DialogContent = /* @__PURE__ */ forwardRef12(({ classNames, children, inOverlayLayout: propsInOverlayLayout, ...props }, forwardedRef) => {
|
|
970
969
|
const { tx } = useThemeContext();
|
|
971
970
|
const { inOverlayLayout } = useOverlayLayoutContext(DIALOG_CONTENT_NAME);
|
|
972
971
|
return /* @__PURE__ */ React18.createElement(DialogContentPrimitive, {
|
|
973
972
|
...props,
|
|
974
973
|
className: tx("dialog.content", "dialog", {
|
|
975
|
-
inOverlayLayout
|
|
974
|
+
inOverlayLayout: propsInOverlayLayout || inOverlayLayout
|
|
976
975
|
}, classNames),
|
|
977
976
|
ref: forwardedRef
|
|
978
977
|
}, children);
|
|
@@ -1666,7 +1665,7 @@ var Switch = /* @__PURE__ */ forwardRef16(({ __inputScope, checked: propsChecked
|
|
|
1666
1665
|
const { id, validationValence, descriptionId, errorMessageId } = useInputContext(INPUT_NAME, __inputScope);
|
|
1667
1666
|
return /* @__PURE__ */ React22.createElement("input", {
|
|
1668
1667
|
type: "checkbox",
|
|
1669
|
-
className: "
|
|
1668
|
+
className: "dx-checkbox--switch dx-focus-ring",
|
|
1670
1669
|
checked,
|
|
1671
1670
|
onChange: (event) => {
|
|
1672
1671
|
onCheckedChange(event.target.checked);
|
|
@@ -1709,8 +1708,8 @@ var edgeToOrientationMap = {
|
|
|
1709
1708
|
right: "vertical"
|
|
1710
1709
|
};
|
|
1711
1710
|
var orientationStyles = {
|
|
1712
|
-
horizontal: "h-[--line-thickness] left-[--terminal-radius] right-
|
|
1713
|
-
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]"
|
|
1714
1713
|
};
|
|
1715
1714
|
var edgeStyles = {
|
|
1716
1715
|
top: "top-[--line-offset] before:top-[--offset-terminal]",
|
|
@@ -1721,17 +1720,17 @@ var edgeStyles = {
|
|
|
1721
1720
|
var strokeSize = 2;
|
|
1722
1721
|
var terminalSize = 8;
|
|
1723
1722
|
var offsetToAlignTerminalWithLine = (strokeSize - terminalSize) / 2;
|
|
1724
|
-
var ListDropIndicator = ({ edge, gap = 0 }) => {
|
|
1725
|
-
const lineOffset = `calc(-0.5 * (${gap}px + ${strokeSize}px))`;
|
|
1723
|
+
var ListDropIndicator = ({ edge, gap = 0, lineInset = 0, terminalInset = lineInset - terminalSize }) => {
|
|
1726
1724
|
const orientation = edgeToOrientationMap[edge];
|
|
1727
1725
|
return /* @__PURE__ */ React23.createElement("div", {
|
|
1728
1726
|
role: "none",
|
|
1729
1727
|
style: {
|
|
1730
1728
|
"--line-thickness": `${strokeSize}px`,
|
|
1731
|
-
"--line-offset":
|
|
1729
|
+
"--line-offset": `calc(-0.5 * (${gap}px + ${strokeSize}px))`,
|
|
1730
|
+
"--line-inset": `${lineInset}px`,
|
|
1732
1731
|
"--terminal-size": `${terminalSize}px`,
|
|
1733
1732
|
"--terminal-radius": `${terminalSize / 2}px`,
|
|
1734
|
-
"--
|
|
1733
|
+
"--terminal-inset": `${terminalInset}px`,
|
|
1735
1734
|
"--offset-terminal": `${offsetToAlignTerminalWithLine}px`
|
|
1736
1735
|
},
|
|
1737
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]}`
|
|
@@ -2155,68 +2154,62 @@ var useLandmarkMover = (propsOnKeyDown, landmark) => {
|
|
|
2155
2154
|
};
|
|
2156
2155
|
var [MainProvider, useMainContext] = createContext10(MAIN_NAME, {
|
|
2157
2156
|
resizing: false,
|
|
2158
|
-
|
|
2159
|
-
|
|
2157
|
+
navigationSidebarState: "closed",
|
|
2158
|
+
setNavigationSidebarState: (nextState) => {
|
|
2160
2159
|
log.warn("Attempt to set sidebar state without initializing `MainRoot`", void 0, {
|
|
2161
2160
|
F: __dxlog_file,
|
|
2162
|
-
L:
|
|
2161
|
+
L: 81,
|
|
2163
2162
|
S: void 0,
|
|
2164
2163
|
C: (f, a) => f(...a)
|
|
2165
2164
|
});
|
|
2166
2165
|
},
|
|
2167
|
-
|
|
2168
|
-
|
|
2166
|
+
complementarySidebarState: "closed",
|
|
2167
|
+
setComplementarySidebarState: (nextState) => {
|
|
2169
2168
|
log.warn("Attempt to set sidebar state without initializing `MainRoot`", void 0, {
|
|
2170
2169
|
F: __dxlog_file,
|
|
2171
|
-
L:
|
|
2170
|
+
L: 86,
|
|
2172
2171
|
S: void 0,
|
|
2173
2172
|
C: (f, a) => f(...a)
|
|
2174
2173
|
});
|
|
2175
2174
|
}
|
|
2176
2175
|
});
|
|
2177
2176
|
var useSidebars = (consumerName = GENERIC_CONSUMER_NAME) => {
|
|
2178
|
-
const {
|
|
2177
|
+
const { setNavigationSidebarState, navigationSidebarState, setComplementarySidebarState, complementarySidebarState } = useMainContext(consumerName);
|
|
2179
2178
|
return {
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
toggleNavigationSidebar: useCallback7(() =>
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
]),
|
|
2186
|
-
openNavigationSidebar: useCallback7(() => setNavigationSidebarOpen(true), [
|
|
2187
|
-
setNavigationSidebarOpen
|
|
2179
|
+
navigationSidebarState,
|
|
2180
|
+
setNavigationSidebarState,
|
|
2181
|
+
toggleNavigationSidebar: useCallback7(() => setNavigationSidebarState(navigationSidebarState === "expanded" ? "closed" : "expanded"), [
|
|
2182
|
+
navigationSidebarState,
|
|
2183
|
+
setNavigationSidebarState
|
|
2188
2184
|
]),
|
|
2189
|
-
|
|
2190
|
-
|
|
2185
|
+
openNavigationSidebar: useCallback7(() => setNavigationSidebarState("expanded"), []),
|
|
2186
|
+
collapseNavigationSidebar: useCallback7(() => setNavigationSidebarState("collapsed"), []),
|
|
2187
|
+
closeNavigationSidebar: useCallback7(() => setNavigationSidebarState("closed"), []),
|
|
2188
|
+
complementarySidebarState,
|
|
2189
|
+
setComplementarySidebarState,
|
|
2190
|
+
toggleComplementarySidebar: useCallback7(() => setComplementarySidebarState(complementarySidebarState === "expanded" ? "closed" : "expanded"), [
|
|
2191
|
+
complementarySidebarState,
|
|
2192
|
+
setComplementarySidebarState
|
|
2191
2193
|
]),
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
complementarySidebarOpen,
|
|
2196
|
-
setComplementarySidebarOpen
|
|
2197
|
-
]),
|
|
2198
|
-
openComplementarySidebar: useCallback7(() => setComplementarySidebarOpen(true), [
|
|
2199
|
-
setComplementarySidebarOpen
|
|
2200
|
-
]),
|
|
2201
|
-
closeComplementarySidebar: useCallback7(() => setComplementarySidebarOpen(false), [
|
|
2202
|
-
setComplementarySidebarOpen
|
|
2203
|
-
])
|
|
2194
|
+
openComplementarySidebar: useCallback7(() => setComplementarySidebarState("expanded"), []),
|
|
2195
|
+
collapseComplementarySidebar: useCallback7(() => setComplementarySidebarState("collapsed"), []),
|
|
2196
|
+
closeComplementarySidebar: useCallback7(() => setComplementarySidebarState("closed"), [])
|
|
2204
2197
|
};
|
|
2205
2198
|
};
|
|
2206
2199
|
var resizeDebounce = 3e3;
|
|
2207
|
-
var MainRoot = ({
|
|
2200
|
+
var MainRoot = ({ navigationSidebarState: propsNavigationSidebarState, defaultNavigationSidebarState, onNavigationSidebarStateChange, complementarySidebarState: propsComplementarySidebarState, defaultComplementarySidebarState, onComplementarySidebarStateChange, children, ...props }) => {
|
|
2208
2201
|
const [isLg] = useMediaQuery("lg", {
|
|
2209
2202
|
ssr: false
|
|
2210
2203
|
});
|
|
2211
|
-
const [
|
|
2212
|
-
prop:
|
|
2213
|
-
defaultProp:
|
|
2214
|
-
onChange:
|
|
2204
|
+
const [navigationSidebarState = isLg ? "expanded" : "collapsed", setNavigationSidebarState] = useControllableState4({
|
|
2205
|
+
prop: propsNavigationSidebarState,
|
|
2206
|
+
defaultProp: defaultNavigationSidebarState,
|
|
2207
|
+
onChange: onNavigationSidebarStateChange
|
|
2215
2208
|
});
|
|
2216
|
-
const [
|
|
2217
|
-
prop:
|
|
2218
|
-
defaultProp:
|
|
2219
|
-
onChange:
|
|
2209
|
+
const [complementarySidebarState = isLg ? "expanded" : "collapsed", setComplementarySidebarState] = useControllableState4({
|
|
2210
|
+
prop: propsComplementarySidebarState,
|
|
2211
|
+
defaultProp: defaultComplementarySidebarState,
|
|
2212
|
+
onChange: onComplementarySidebarStateChange
|
|
2220
2213
|
});
|
|
2221
2214
|
const [resizing, setResizing] = useState8(false);
|
|
2222
2215
|
const resizeInterval = useRef2(null);
|
|
@@ -2238,10 +2231,10 @@ var MainRoot = ({ navigationSidebarOpen: propsNavigationSidebarOpen, defaultNavi
|
|
|
2238
2231
|
]);
|
|
2239
2232
|
return /* @__PURE__ */ React28.createElement(MainProvider, {
|
|
2240
2233
|
...props,
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2234
|
+
navigationSidebarState,
|
|
2235
|
+
setNavigationSidebarState,
|
|
2236
|
+
complementarySidebarState,
|
|
2237
|
+
setComplementarySidebarState,
|
|
2245
2238
|
resizing
|
|
2246
2239
|
}, children);
|
|
2247
2240
|
};
|
|
@@ -2249,7 +2242,7 @@ MainRoot.displayName = MAIN_ROOT_NAME;
|
|
|
2249
2242
|
var handleOpenAutoFocus = (event) => {
|
|
2250
2243
|
!document.body.hasAttribute("data-is-keyboard") && event.preventDefault();
|
|
2251
2244
|
};
|
|
2252
|
-
var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToDismiss, onOpenAutoFocus,
|
|
2245
|
+
var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToDismiss, onOpenAutoFocus, state, resizing, onStateChange, side, ...props }, forwardedRef) => {
|
|
2253
2246
|
const [isLg] = useMediaQuery("lg", {
|
|
2254
2247
|
ssr: false
|
|
2255
2248
|
});
|
|
@@ -2257,7 +2250,7 @@ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToD
|
|
|
2257
2250
|
const ref = useForwardedRef(forwardedRef);
|
|
2258
2251
|
const noopRef = useRef2(null);
|
|
2259
2252
|
useSwipeToDismiss(swipeToDismiss ? ref : noopRef, {
|
|
2260
|
-
onDismiss: () =>
|
|
2253
|
+
onDismiss: () => onStateChange?.("closed")
|
|
2261
2254
|
});
|
|
2262
2255
|
const handleKeyDown = useCallback7((event) => {
|
|
2263
2256
|
if (event.key === "Escape") {
|
|
@@ -2269,7 +2262,7 @@ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToD
|
|
|
2269
2262
|
]);
|
|
2270
2263
|
const Root5 = isLg ? Primitive9.div : DialogContent2;
|
|
2271
2264
|
return /* @__PURE__ */ React28.createElement(DialogRoot2, {
|
|
2272
|
-
open,
|
|
2265
|
+
open: state !== "closed",
|
|
2273
2266
|
modal: false
|
|
2274
2267
|
}, /* @__PURE__ */ React28.createElement(Root5, {
|
|
2275
2268
|
...!isLg && {
|
|
@@ -2279,24 +2272,24 @@ var MainSidebar = /* @__PURE__ */ forwardRef20(({ classNames, children, swipeToD
|
|
|
2279
2272
|
},
|
|
2280
2273
|
...props,
|
|
2281
2274
|
"data-side": side === "inline-end" ? "ie" : "is",
|
|
2282
|
-
"data-state":
|
|
2275
|
+
"data-state": state,
|
|
2283
2276
|
"data-resizing": resizing ? "true" : "false",
|
|
2284
2277
|
className: tx("main.sidebar", "main__sidebar", {}, classNames),
|
|
2285
2278
|
onKeyDown: handleKeyDown,
|
|
2286
|
-
|
|
2279
|
+
...state === "closed" && {
|
|
2287
2280
|
inert: "true"
|
|
2288
2281
|
},
|
|
2289
2282
|
ref
|
|
2290
2283
|
}, children));
|
|
2291
2284
|
});
|
|
2292
2285
|
var MainNavigationSidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
|
|
2293
|
-
const {
|
|
2286
|
+
const { navigationSidebarState, setNavigationSidebarState, resizing } = useMainContext(NAVIGATION_SIDEBAR_NAME);
|
|
2294
2287
|
const mover = useLandmarkMover(props.onKeyDown, "0");
|
|
2295
2288
|
return /* @__PURE__ */ React28.createElement(MainSidebar, {
|
|
2296
2289
|
...mover,
|
|
2297
2290
|
...props,
|
|
2298
|
-
|
|
2299
|
-
|
|
2291
|
+
state: navigationSidebarState,
|
|
2292
|
+
onStateChange: setNavigationSidebarState,
|
|
2300
2293
|
resizing,
|
|
2301
2294
|
side: "inline-start",
|
|
2302
2295
|
ref: forwardedRef
|
|
@@ -2304,13 +2297,13 @@ var MainNavigationSidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) =
|
|
|
2304
2297
|
});
|
|
2305
2298
|
MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
2306
2299
|
var MainComplementarySidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef) => {
|
|
2307
|
-
const {
|
|
2300
|
+
const { complementarySidebarState, setComplementarySidebarState, resizing } = useMainContext(COMPLEMENTARY_SIDEBAR_NAME);
|
|
2308
2301
|
const mover = useLandmarkMover(props.onKeyDown, "2");
|
|
2309
2302
|
return /* @__PURE__ */ React28.createElement(MainSidebar, {
|
|
2310
2303
|
...mover,
|
|
2311
2304
|
...props,
|
|
2312
|
-
|
|
2313
|
-
|
|
2305
|
+
state: complementarySidebarState,
|
|
2306
|
+
onStateChange: setComplementarySidebarState,
|
|
2314
2307
|
resizing,
|
|
2315
2308
|
side: "inline-end",
|
|
2316
2309
|
ref: forwardedRef
|
|
@@ -2318,7 +2311,7 @@ var MainComplementarySidebar = /* @__PURE__ */ forwardRef20((props, forwardedRef
|
|
|
2318
2311
|
});
|
|
2319
2312
|
MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
2320
2313
|
var MainContent = /* @__PURE__ */ forwardRef20(({ asChild, classNames, bounce, handlesFocus, children, role, ...props }, forwardedRef) => {
|
|
2321
|
-
const {
|
|
2314
|
+
const { navigationSidebarState, complementarySidebarState } = useMainContext(MAIN_NAME);
|
|
2322
2315
|
const { tx } = useThemeContext();
|
|
2323
2316
|
const Root5 = asChild ? Slot10 : role ? "div" : "main";
|
|
2324
2317
|
const mover = useLandmarkMover(props.onKeyDown, "1");
|
|
@@ -2328,8 +2321,8 @@ var MainContent = /* @__PURE__ */ forwardRef20(({ asChild, classNames, bounce, h
|
|
|
2328
2321
|
...mover
|
|
2329
2322
|
},
|
|
2330
2323
|
...props,
|
|
2331
|
-
"data-sidebar-inline-start-state":
|
|
2332
|
-
"data-sidebar-inline-end-state":
|
|
2324
|
+
"data-sidebar-inline-start-state": navigationSidebarState,
|
|
2325
|
+
"data-sidebar-inline-end-state": complementarySidebarState,
|
|
2333
2326
|
className: tx("main.content", "main", {
|
|
2334
2327
|
bounce,
|
|
2335
2328
|
handlesFocus
|
|
@@ -2342,20 +2335,20 @@ var MainOverlay = /* @__PURE__ */ forwardRef20(({ classNames, ...props }, forwar
|
|
|
2342
2335
|
const [isLg] = useMediaQuery("lg", {
|
|
2343
2336
|
ssr: false
|
|
2344
2337
|
});
|
|
2345
|
-
const {
|
|
2338
|
+
const { navigationSidebarState, setNavigationSidebarState, complementarySidebarState, setComplementarySidebarState } = useMainContext(MAIN_NAME);
|
|
2346
2339
|
const { tx } = useThemeContext();
|
|
2347
2340
|
return /* @__PURE__ */ React28.createElement("div", {
|
|
2348
2341
|
onClick: () => {
|
|
2349
|
-
|
|
2350
|
-
|
|
2342
|
+
setNavigationSidebarState("collapsed");
|
|
2343
|
+
setComplementarySidebarState("collapsed");
|
|
2351
2344
|
},
|
|
2352
2345
|
...props,
|
|
2353
2346
|
className: tx("main.overlay", "main__overlay", {
|
|
2354
2347
|
isLg,
|
|
2355
|
-
inlineStartSidebarOpen:
|
|
2356
|
-
inlineEndSidebarOpen:
|
|
2348
|
+
inlineStartSidebarOpen: navigationSidebarState,
|
|
2349
|
+
inlineEndSidebarOpen: complementarySidebarState
|
|
2357
2350
|
}, classNames),
|
|
2358
|
-
"data-state":
|
|
2351
|
+
"data-state": navigationSidebarState === "expanded" || complementarySidebarState === "expanded" ? "open" : "closed",
|
|
2359
2352
|
"aria-hidden": "true",
|
|
2360
2353
|
ref: forwardedRef
|
|
2361
2354
|
});
|
|
@@ -2980,14 +2973,15 @@ var Separator4 = /* @__PURE__ */ forwardRef26(({ classNames, orientation = "hori
|
|
|
2980
2973
|
import { Primitive as Primitive12 } from "@radix-ui/react-primitive";
|
|
2981
2974
|
import { Slot as Slot13 } from "@radix-ui/react-slot";
|
|
2982
2975
|
import React35, { forwardRef as forwardRef27 } from "react";
|
|
2983
|
-
var Tag = /* @__PURE__ */ forwardRef27(({ asChild, palette, classNames, ...props }, forwardedRef) => {
|
|
2976
|
+
var Tag = /* @__PURE__ */ forwardRef27(({ asChild, palette = "neutral", classNames, ...props }, forwardedRef) => {
|
|
2984
2977
|
const { tx } = useThemeContext();
|
|
2985
2978
|
const Root5 = asChild ? Slot13 : Primitive12.span;
|
|
2986
2979
|
return /* @__PURE__ */ React35.createElement(Root5, {
|
|
2987
2980
|
...props,
|
|
2988
|
-
className: tx("tag.root", "tag", {
|
|
2981
|
+
className: tx("tag.root", "dx-tag", {
|
|
2989
2982
|
palette
|
|
2990
2983
|
}, classNames),
|
|
2984
|
+
"data-hue": palette,
|
|
2991
2985
|
ref: forwardedRef
|
|
2992
2986
|
});
|
|
2993
2987
|
});
|
|
@@ -3228,6 +3222,7 @@ export {
|
|
|
3228
3222
|
useDropdownMenuContext,
|
|
3229
3223
|
useDropdownMenuMenuScope,
|
|
3230
3224
|
useElevationContext,
|
|
3225
|
+
useLandmarkMover,
|
|
3231
3226
|
useListContext,
|
|
3232
3227
|
useListItemContext,
|
|
3233
3228
|
useMainContext,
|