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