@dxos/react-ui 0.7.5-main.9d2a38b → 0.7.5-main.ff8607b
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 +75 -76
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node/index.cjs +76 -76
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +75 -76
- 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/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/package.json +42 -42
- package/src/components/Avatars/Avatar.tsx +3 -6
- package/src/components/Buttons/IconButton.tsx +4 -3
- 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 +20 -31
- package/src/components/Tag/Tag.tsx +15 -6
package/dist/lib/node/index.cjs
CHANGED
|
@@ -87,6 +87,7 @@ __export(node_exports, {
|
|
|
87
87
|
useDropdownMenuContext: () => useDropdownMenuContext,
|
|
88
88
|
useDropdownMenuMenuScope: () => useDropdownMenuMenuScope,
|
|
89
89
|
useElevationContext: () => useElevationContext,
|
|
90
|
+
useLandmarkMover: () => useLandmarkMover,
|
|
90
91
|
useListContext: () => import_react_list.useListContext,
|
|
91
92
|
useListItemContext: () => import_react_list.useListItemContext,
|
|
92
93
|
useMainContext: () => useMainContext,
|
|
@@ -805,12 +806,15 @@ var Tooltip = {
|
|
|
805
806
|
Arrow: TooltipArrow,
|
|
806
807
|
Content: TooltipContent
|
|
807
808
|
};
|
|
808
|
-
var IconOnlyButton = /* @__PURE__ */ (0, import_react16.forwardRef)(({ tooltipPortal = true, tooltipZIndex: zIndex, suppressNextTooltip, ...props }, forwardedRef) => {
|
|
809
|
+
var IconOnlyButton = /* @__PURE__ */ (0, import_react16.forwardRef)(({ tooltipPortal = true, tooltipZIndex: zIndex, tooltipSide, suppressNextTooltip, ...props }, forwardedRef) => {
|
|
809
810
|
const [triggerTooltipOpen, setTriggerTooltipOpen] = (0, import_react16.useState)(false);
|
|
810
|
-
const content = /* @__PURE__ */ import_react16.default.createElement(Tooltip.Content,
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
811
|
+
const content = /* @__PURE__ */ import_react16.default.createElement(Tooltip.Content, {
|
|
812
|
+
...zIndex && {
|
|
813
|
+
style: {
|
|
814
|
+
zIndex
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
side: tooltipSide
|
|
814
818
|
}, props.label, /* @__PURE__ */ import_react16.default.createElement(Tooltip.Arrow, null));
|
|
815
819
|
return /* @__PURE__ */ import_react16.default.createElement(Tooltip.Root, {
|
|
816
820
|
open: triggerTooltipOpen,
|
|
@@ -1749,7 +1753,7 @@ var Switch = /* @__PURE__ */ (0, import_react30.forwardRef)(({ __inputScope, che
|
|
|
1749
1753
|
const { id, validationValence, descriptionId, errorMessageId } = (0, import_react_input.useInputContext)(import_react_input.INPUT_NAME, __inputScope);
|
|
1750
1754
|
return /* @__PURE__ */ import_react30.default.createElement("input", {
|
|
1751
1755
|
type: "checkbox",
|
|
1752
|
-
className: "
|
|
1756
|
+
className: "dx-checkbox--switch dx-focus-ring",
|
|
1753
1757
|
checked,
|
|
1754
1758
|
onChange: (event) => {
|
|
1755
1759
|
onCheckedChange(event.target.checked);
|
|
@@ -1783,8 +1787,8 @@ var edgeToOrientationMap = {
|
|
|
1783
1787
|
right: "vertical"
|
|
1784
1788
|
};
|
|
1785
1789
|
var orientationStyles = {
|
|
1786
|
-
horizontal: "h-[--line-thickness] left-[--terminal-radius] right-
|
|
1787
|
-
vertical: "w-[--line-thickness] top-[--terminal-radius] bottom-
|
|
1790
|
+
horizontal: "h-[--line-thickness] left-[calc(var(--line-inset)+var(--terminal-radius))] right-[--line-inset] before:left-[--terminal-inset]",
|
|
1791
|
+
vertical: "w-[--line-thickness] top-[calc(var(--line-inset)+var(--terminal-radius))] bottom-[--line-inset] before:top-[--terminal-inset]"
|
|
1788
1792
|
};
|
|
1789
1793
|
var edgeStyles = {
|
|
1790
1794
|
top: "top-[--line-offset] before:top-[--offset-terminal]",
|
|
@@ -1795,17 +1799,17 @@ var edgeStyles = {
|
|
|
1795
1799
|
var strokeSize = 2;
|
|
1796
1800
|
var terminalSize = 8;
|
|
1797
1801
|
var offsetToAlignTerminalWithLine = (strokeSize - terminalSize) / 2;
|
|
1798
|
-
var ListDropIndicator = ({ edge, gap = 0 }) => {
|
|
1799
|
-
const lineOffset = `calc(-0.5 * (${gap}px + ${strokeSize}px))`;
|
|
1802
|
+
var ListDropIndicator = ({ edge, gap = 0, lineInset = 0, terminalInset = lineInset - terminalSize }) => {
|
|
1800
1803
|
const orientation = edgeToOrientationMap[edge];
|
|
1801
1804
|
return /* @__PURE__ */ import_react33.default.createElement("div", {
|
|
1802
1805
|
role: "none",
|
|
1803
1806
|
style: {
|
|
1804
1807
|
"--line-thickness": `${strokeSize}px`,
|
|
1805
|
-
"--line-offset":
|
|
1808
|
+
"--line-offset": `calc(-0.5 * (${gap}px + ${strokeSize}px))`,
|
|
1809
|
+
"--line-inset": `${lineInset}px`,
|
|
1806
1810
|
"--terminal-size": `${terminalSize}px`,
|
|
1807
1811
|
"--terminal-radius": `${terminalSize / 2}px`,
|
|
1808
|
-
"--
|
|
1812
|
+
"--terminal-inset": `${terminalInset}px`,
|
|
1809
1813
|
"--offset-terminal": `${offsetToAlignTerminalWithLine}px`
|
|
1810
1814
|
},
|
|
1811
1815
|
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]}`
|
|
@@ -2195,68 +2199,62 @@ var useLandmarkMover = (propsOnKeyDown, landmark) => {
|
|
|
2195
2199
|
};
|
|
2196
2200
|
var [MainProvider, useMainContext] = (0, import_react_context7.createContext)(MAIN_NAME, {
|
|
2197
2201
|
resizing: false,
|
|
2198
|
-
|
|
2199
|
-
|
|
2202
|
+
navigationSidebarState: "closed",
|
|
2203
|
+
setNavigationSidebarState: (nextState) => {
|
|
2200
2204
|
import_log.log.warn("Attempt to set sidebar state without initializing `MainRoot`", void 0, {
|
|
2201
2205
|
F: __dxlog_file,
|
|
2202
|
-
L:
|
|
2206
|
+
L: 81,
|
|
2203
2207
|
S: void 0,
|
|
2204
2208
|
C: (f, a) => f(...a)
|
|
2205
2209
|
});
|
|
2206
2210
|
},
|
|
2207
|
-
|
|
2208
|
-
|
|
2211
|
+
complementarySidebarState: "closed",
|
|
2212
|
+
setComplementarySidebarState: (nextState) => {
|
|
2209
2213
|
import_log.log.warn("Attempt to set sidebar state without initializing `MainRoot`", void 0, {
|
|
2210
2214
|
F: __dxlog_file,
|
|
2211
|
-
L:
|
|
2215
|
+
L: 86,
|
|
2212
2216
|
S: void 0,
|
|
2213
2217
|
C: (f, a) => f(...a)
|
|
2214
2218
|
});
|
|
2215
2219
|
}
|
|
2216
2220
|
});
|
|
2217
2221
|
var useSidebars = (consumerName = GENERIC_CONSUMER_NAME) => {
|
|
2218
|
-
const {
|
|
2222
|
+
const { setNavigationSidebarState, navigationSidebarState, setComplementarySidebarState, complementarySidebarState } = useMainContext(consumerName);
|
|
2219
2223
|
return {
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
toggleNavigationSidebar: (0, import_react37.useCallback)(() =>
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
]),
|
|
2226
|
-
openNavigationSidebar: (0, import_react37.useCallback)(() => setNavigationSidebarOpen(true), [
|
|
2227
|
-
setNavigationSidebarOpen
|
|
2228
|
-
]),
|
|
2229
|
-
closeNavigationSidebar: (0, import_react37.useCallback)(() => setNavigationSidebarOpen(false), [
|
|
2230
|
-
setNavigationSidebarOpen
|
|
2224
|
+
navigationSidebarState,
|
|
2225
|
+
setNavigationSidebarState,
|
|
2226
|
+
toggleNavigationSidebar: (0, import_react37.useCallback)(() => setNavigationSidebarState(navigationSidebarState === "expanded" ? "closed" : "expanded"), [
|
|
2227
|
+
navigationSidebarState,
|
|
2228
|
+
setNavigationSidebarState
|
|
2231
2229
|
]),
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2230
|
+
openNavigationSidebar: (0, import_react37.useCallback)(() => setNavigationSidebarState("expanded"), []),
|
|
2231
|
+
collapseNavigationSidebar: (0, import_react37.useCallback)(() => setNavigationSidebarState("collapsed"), []),
|
|
2232
|
+
closeNavigationSidebar: (0, import_react37.useCallback)(() => setNavigationSidebarState("closed"), []),
|
|
2233
|
+
complementarySidebarState,
|
|
2234
|
+
setComplementarySidebarState,
|
|
2235
|
+
toggleComplementarySidebar: (0, import_react37.useCallback)(() => setComplementarySidebarState(complementarySidebarState === "expanded" ? "closed" : "expanded"), [
|
|
2236
|
+
complementarySidebarState,
|
|
2237
|
+
setComplementarySidebarState
|
|
2237
2238
|
]),
|
|
2238
|
-
openComplementarySidebar: (0, import_react37.useCallback)(() =>
|
|
2239
|
-
|
|
2240
|
-
])
|
|
2241
|
-
closeComplementarySidebar: (0, import_react37.useCallback)(() => setComplementarySidebarOpen(false), [
|
|
2242
|
-
setComplementarySidebarOpen
|
|
2243
|
-
])
|
|
2239
|
+
openComplementarySidebar: (0, import_react37.useCallback)(() => setComplementarySidebarState("expanded"), []),
|
|
2240
|
+
collapseComplementarySidebar: (0, import_react37.useCallback)(() => setComplementarySidebarState("collapsed"), []),
|
|
2241
|
+
closeComplementarySidebar: (0, import_react37.useCallback)(() => setComplementarySidebarState("closed"), [])
|
|
2244
2242
|
};
|
|
2245
2243
|
};
|
|
2246
2244
|
var resizeDebounce = 3e3;
|
|
2247
|
-
var MainRoot = ({
|
|
2245
|
+
var MainRoot = ({ navigationSidebarState: propsNavigationSidebarState, defaultNavigationSidebarState, onNavigationSidebarStateChange, complementarySidebarState: propsComplementarySidebarState, defaultComplementarySidebarState, onComplementarySidebarStateChange, children, ...props }) => {
|
|
2248
2246
|
const [isLg] = (0, import_react_hooks5.useMediaQuery)("lg", {
|
|
2249
2247
|
ssr: false
|
|
2250
2248
|
});
|
|
2251
|
-
const [
|
|
2252
|
-
prop:
|
|
2253
|
-
defaultProp:
|
|
2254
|
-
onChange:
|
|
2249
|
+
const [navigationSidebarState = isLg ? "expanded" : "collapsed", setNavigationSidebarState] = (0, import_react_use_controllable_state4.useControllableState)({
|
|
2250
|
+
prop: propsNavigationSidebarState,
|
|
2251
|
+
defaultProp: defaultNavigationSidebarState,
|
|
2252
|
+
onChange: onNavigationSidebarStateChange
|
|
2255
2253
|
});
|
|
2256
|
-
const [
|
|
2257
|
-
prop:
|
|
2258
|
-
defaultProp:
|
|
2259
|
-
onChange:
|
|
2254
|
+
const [complementarySidebarState = isLg ? "expanded" : "collapsed", setComplementarySidebarState] = (0, import_react_use_controllable_state4.useControllableState)({
|
|
2255
|
+
prop: propsComplementarySidebarState,
|
|
2256
|
+
defaultProp: defaultComplementarySidebarState,
|
|
2257
|
+
onChange: onComplementarySidebarStateChange
|
|
2260
2258
|
});
|
|
2261
2259
|
const [resizing, setResizing] = (0, import_react37.useState)(false);
|
|
2262
2260
|
const resizeInterval = (0, import_react37.useRef)(null);
|
|
@@ -2278,10 +2276,10 @@ var MainRoot = ({ navigationSidebarOpen: propsNavigationSidebarOpen, defaultNavi
|
|
|
2278
2276
|
]);
|
|
2279
2277
|
return /* @__PURE__ */ import_react37.default.createElement(MainProvider, {
|
|
2280
2278
|
...props,
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2279
|
+
navigationSidebarState,
|
|
2280
|
+
setNavigationSidebarState,
|
|
2281
|
+
complementarySidebarState,
|
|
2282
|
+
setComplementarySidebarState,
|
|
2285
2283
|
resizing
|
|
2286
2284
|
}, children);
|
|
2287
2285
|
};
|
|
@@ -2289,7 +2287,7 @@ MainRoot.displayName = MAIN_ROOT_NAME;
|
|
|
2289
2287
|
var handleOpenAutoFocus = (event) => {
|
|
2290
2288
|
!document.body.hasAttribute("data-is-keyboard") && event.preventDefault();
|
|
2291
2289
|
};
|
|
2292
|
-
var MainSidebar = /* @__PURE__ */ (0, import_react37.forwardRef)(({ classNames, children, swipeToDismiss, onOpenAutoFocus,
|
|
2290
|
+
var MainSidebar = /* @__PURE__ */ (0, import_react37.forwardRef)(({ classNames, children, swipeToDismiss, onOpenAutoFocus, state, resizing, onStateChange, side, ...props }, forwardedRef) => {
|
|
2293
2291
|
const [isLg] = (0, import_react_hooks5.useMediaQuery)("lg", {
|
|
2294
2292
|
ssr: false
|
|
2295
2293
|
});
|
|
@@ -2297,7 +2295,7 @@ var MainSidebar = /* @__PURE__ */ (0, import_react37.forwardRef)(({ classNames,
|
|
|
2297
2295
|
const ref = (0, import_react_hooks5.useForwardedRef)(forwardedRef);
|
|
2298
2296
|
const noopRef = (0, import_react37.useRef)(null);
|
|
2299
2297
|
useSwipeToDismiss(swipeToDismiss ? ref : noopRef, {
|
|
2300
|
-
onDismiss: () =>
|
|
2298
|
+
onDismiss: () => onStateChange?.("closed")
|
|
2301
2299
|
});
|
|
2302
2300
|
const handleKeyDown = (0, import_react37.useCallback)((event) => {
|
|
2303
2301
|
if (event.key === "Escape") {
|
|
@@ -2309,7 +2307,7 @@ var MainSidebar = /* @__PURE__ */ (0, import_react37.forwardRef)(({ classNames,
|
|
|
2309
2307
|
]);
|
|
2310
2308
|
const Root5 = isLg ? import_react_primitive9.Primitive.div : import_react_dialog2.DialogContent;
|
|
2311
2309
|
return /* @__PURE__ */ import_react37.default.createElement(import_react_dialog2.Root, {
|
|
2312
|
-
open,
|
|
2310
|
+
open: state !== "closed",
|
|
2313
2311
|
modal: false
|
|
2314
2312
|
}, /* @__PURE__ */ import_react37.default.createElement(Root5, {
|
|
2315
2313
|
...!isLg && {
|
|
@@ -2319,24 +2317,24 @@ var MainSidebar = /* @__PURE__ */ (0, import_react37.forwardRef)(({ classNames,
|
|
|
2319
2317
|
},
|
|
2320
2318
|
...props,
|
|
2321
2319
|
"data-side": side === "inline-end" ? "ie" : "is",
|
|
2322
|
-
"data-state":
|
|
2320
|
+
"data-state": state,
|
|
2323
2321
|
"data-resizing": resizing ? "true" : "false",
|
|
2324
2322
|
className: tx("main.sidebar", "main__sidebar", {}, classNames),
|
|
2325
2323
|
onKeyDown: handleKeyDown,
|
|
2326
|
-
|
|
2324
|
+
...state === "closed" && {
|
|
2327
2325
|
inert: "true"
|
|
2328
2326
|
},
|
|
2329
2327
|
ref
|
|
2330
2328
|
}, children));
|
|
2331
2329
|
});
|
|
2332
2330
|
var MainNavigationSidebar = /* @__PURE__ */ (0, import_react37.forwardRef)((props, forwardedRef) => {
|
|
2333
|
-
const {
|
|
2331
|
+
const { navigationSidebarState, setNavigationSidebarState, resizing } = useMainContext(NAVIGATION_SIDEBAR_NAME);
|
|
2334
2332
|
const mover = useLandmarkMover(props.onKeyDown, "0");
|
|
2335
2333
|
return /* @__PURE__ */ import_react37.default.createElement(MainSidebar, {
|
|
2336
2334
|
...mover,
|
|
2337
2335
|
...props,
|
|
2338
|
-
|
|
2339
|
-
|
|
2336
|
+
state: navigationSidebarState,
|
|
2337
|
+
onStateChange: setNavigationSidebarState,
|
|
2340
2338
|
resizing,
|
|
2341
2339
|
side: "inline-start",
|
|
2342
2340
|
ref: forwardedRef
|
|
@@ -2344,13 +2342,13 @@ var MainNavigationSidebar = /* @__PURE__ */ (0, import_react37.forwardRef)((prop
|
|
|
2344
2342
|
});
|
|
2345
2343
|
MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
2346
2344
|
var MainComplementarySidebar = /* @__PURE__ */ (0, import_react37.forwardRef)((props, forwardedRef) => {
|
|
2347
|
-
const {
|
|
2345
|
+
const { complementarySidebarState, setComplementarySidebarState, resizing } = useMainContext(COMPLEMENTARY_SIDEBAR_NAME);
|
|
2348
2346
|
const mover = useLandmarkMover(props.onKeyDown, "2");
|
|
2349
2347
|
return /* @__PURE__ */ import_react37.default.createElement(MainSidebar, {
|
|
2350
2348
|
...mover,
|
|
2351
2349
|
...props,
|
|
2352
|
-
|
|
2353
|
-
|
|
2350
|
+
state: complementarySidebarState,
|
|
2351
|
+
onStateChange: setComplementarySidebarState,
|
|
2354
2352
|
resizing,
|
|
2355
2353
|
side: "inline-end",
|
|
2356
2354
|
ref: forwardedRef
|
|
@@ -2358,7 +2356,7 @@ var MainComplementarySidebar = /* @__PURE__ */ (0, import_react37.forwardRef)((p
|
|
|
2358
2356
|
});
|
|
2359
2357
|
MainNavigationSidebar.displayName = NAVIGATION_SIDEBAR_NAME;
|
|
2360
2358
|
var MainContent = /* @__PURE__ */ (0, import_react37.forwardRef)(({ asChild, classNames, bounce, handlesFocus, children, role, ...props }, forwardedRef) => {
|
|
2361
|
-
const {
|
|
2359
|
+
const { navigationSidebarState, complementarySidebarState } = useMainContext(MAIN_NAME);
|
|
2362
2360
|
const { tx } = useThemeContext();
|
|
2363
2361
|
const Root5 = asChild ? import_react_slot10.Slot : role ? "div" : "main";
|
|
2364
2362
|
const mover = useLandmarkMover(props.onKeyDown, "1");
|
|
@@ -2368,8 +2366,8 @@ var MainContent = /* @__PURE__ */ (0, import_react37.forwardRef)(({ asChild, cla
|
|
|
2368
2366
|
...mover
|
|
2369
2367
|
},
|
|
2370
2368
|
...props,
|
|
2371
|
-
"data-sidebar-inline-start-state":
|
|
2372
|
-
"data-sidebar-inline-end-state":
|
|
2369
|
+
"data-sidebar-inline-start-state": navigationSidebarState,
|
|
2370
|
+
"data-sidebar-inline-end-state": complementarySidebarState,
|
|
2373
2371
|
className: tx("main.content", "main", {
|
|
2374
2372
|
bounce,
|
|
2375
2373
|
handlesFocus
|
|
@@ -2382,20 +2380,20 @@ var MainOverlay = /* @__PURE__ */ (0, import_react37.forwardRef)(({ classNames,
|
|
|
2382
2380
|
const [isLg] = (0, import_react_hooks5.useMediaQuery)("lg", {
|
|
2383
2381
|
ssr: false
|
|
2384
2382
|
});
|
|
2385
|
-
const {
|
|
2383
|
+
const { navigationSidebarState, setNavigationSidebarState, complementarySidebarState, setComplementarySidebarState } = useMainContext(MAIN_NAME);
|
|
2386
2384
|
const { tx } = useThemeContext();
|
|
2387
2385
|
return /* @__PURE__ */ import_react37.default.createElement("div", {
|
|
2388
2386
|
onClick: () => {
|
|
2389
|
-
|
|
2390
|
-
|
|
2387
|
+
setNavigationSidebarState("collapsed");
|
|
2388
|
+
setComplementarySidebarState("collapsed");
|
|
2391
2389
|
},
|
|
2392
2390
|
...props,
|
|
2393
2391
|
className: tx("main.overlay", "main__overlay", {
|
|
2394
2392
|
isLg,
|
|
2395
|
-
inlineStartSidebarOpen:
|
|
2396
|
-
inlineEndSidebarOpen:
|
|
2393
|
+
inlineStartSidebarOpen: navigationSidebarState,
|
|
2394
|
+
inlineEndSidebarOpen: complementarySidebarState
|
|
2397
2395
|
}, classNames),
|
|
2398
|
-
"data-state":
|
|
2396
|
+
"data-state": navigationSidebarState === "expanded" || complementarySidebarState === "expanded" ? "open" : "closed",
|
|
2399
2397
|
"aria-hidden": "true",
|
|
2400
2398
|
ref: forwardedRef
|
|
2401
2399
|
});
|
|
@@ -2973,14 +2971,15 @@ var Separator4 = /* @__PURE__ */ (0, import_react45.forwardRef)(({ classNames, o
|
|
|
2973
2971
|
ref: forwardedRef
|
|
2974
2972
|
});
|
|
2975
2973
|
});
|
|
2976
|
-
var Tag = /* @__PURE__ */ (0, import_react46.forwardRef)(({ asChild, palette, classNames, ...props }, forwardedRef) => {
|
|
2974
|
+
var Tag = /* @__PURE__ */ (0, import_react46.forwardRef)(({ asChild, palette = "neutral", classNames, ...props }, forwardedRef) => {
|
|
2977
2975
|
const { tx } = useThemeContext();
|
|
2978
2976
|
const Root5 = asChild ? import_react_slot13.Slot : import_react_primitive12.Primitive.span;
|
|
2979
2977
|
return /* @__PURE__ */ import_react46.default.createElement(Root5, {
|
|
2980
2978
|
...props,
|
|
2981
|
-
className: tx("tag.root", "tag", {
|
|
2979
|
+
className: tx("tag.root", "dx-tag", {
|
|
2982
2980
|
palette
|
|
2983
2981
|
}, classNames),
|
|
2982
|
+
"data-hue": palette,
|
|
2984
2983
|
ref: forwardedRef
|
|
2985
2984
|
});
|
|
2986
2985
|
});
|
|
@@ -3212,6 +3211,7 @@ var Toolbar = {
|
|
|
3212
3211
|
useDropdownMenuContext,
|
|
3213
3212
|
useDropdownMenuMenuScope,
|
|
3214
3213
|
useElevationContext,
|
|
3214
|
+
useLandmarkMover,
|
|
3215
3215
|
useListContext,
|
|
3216
3216
|
useListItemContext,
|
|
3217
3217
|
useMainContext,
|