@bitrise/bitkit-v2 0.3.458 → 0.3.460-beta.2893
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/components/BitkitMultiselectMenu/BitkitMultiselectMenu.d.ts +3 -3
- package/dist/components/BitkitMultiselectMenu/BitkitMultiselectMenu.js.map +1 -1
- package/dist/components/BitkitSelectMenu/BitkitSelectMenu.d.ts +7 -2
- package/dist/components/BitkitSelectMenu/BitkitSelectMenu.js.map +1 -1
- package/dist/components/BitkitSelectMenu/SelectMenuShell.d.ts +3 -3
- package/dist/components/BitkitSelectMenu/SelectMenuShell.js +23 -4
- package/dist/components/BitkitSelectMenu/SelectMenuShell.js.map +1 -1
- package/dist/components/BitkitUISideNav/BitkitUISideNav.d.ts +37 -0
- package/dist/components/BitkitUISideNav/BitkitUISideNav.js +126 -0
- package/dist/components/BitkitUISideNav/BitkitUISideNav.js.map +1 -0
- package/dist/components/BitkitUISideNav/UISideNavBody.d.ts +7 -0
- package/dist/components/BitkitUISideNav/UISideNavBody.js +20 -0
- package/dist/components/BitkitUISideNav/UISideNavBody.js.map +1 -0
- package/dist/components/BitkitUISideNav/UISideNavContext.d.ts +32 -0
- package/dist/components/BitkitUISideNav/UISideNavContext.js +28 -0
- package/dist/components/BitkitUISideNav/UISideNavContext.js.map +1 -0
- package/dist/components/BitkitUISideNav/UISideNavFooter.d.ts +16 -0
- package/dist/components/BitkitUISideNav/UISideNavFooter.js +28 -0
- package/dist/components/BitkitUISideNav/UISideNavFooter.js.map +1 -0
- package/dist/components/BitkitUISideNav/UISideNavFooterHeading.d.ts +12 -0
- package/dist/components/BitkitUISideNav/UISideNavFooterHeading.js +26 -0
- package/dist/components/BitkitUISideNav/UISideNavFooterHeading.js.map +1 -0
- package/dist/components/BitkitUISideNav/UISideNavItem.d.ts +26 -0
- package/dist/components/BitkitUISideNav/UISideNavItem.js +33 -0
- package/dist/components/BitkitUISideNav/UISideNavItem.js.map +1 -0
- package/dist/components/BitkitUISideNav/UISideNavLink.d.ts +30 -0
- package/dist/components/BitkitUISideNav/UISideNavLink.js +60 -0
- package/dist/components/BitkitUISideNav/UISideNavLink.js.map +1 -0
- package/dist/components/BitkitUISideNav/UISideNavWorkspaceSelector.d.ts +45 -0
- package/dist/components/BitkitUISideNav/UISideNavWorkspaceSelector.js +105 -0
- package/dist/components/BitkitUISideNav/UISideNavWorkspaceSelector.js.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/icons/IconFile.d.ts +8 -0
- package/dist/icons/IconFile.js +31 -0
- package/dist/icons/IconFile.js.map +1 -0
- package/dist/icons/IconPin.d.ts +8 -0
- package/dist/icons/IconPin.js +31 -0
- package/dist/icons/IconPin.js.map +1 -0
- package/dist/icons/IconUnpin.d.ts +8 -0
- package/dist/icons/IconUnpin.js +31 -0
- package/dist/icons/IconUnpin.js.map +1 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/main.js +7 -1
- package/dist/svgs/16x16/icon-file-16.js +23 -0
- package/dist/svgs/16x16/icon-file-16.js.map +1 -0
- package/dist/svgs/16x16/icon-pin-16.js +23 -0
- package/dist/svgs/16x16/icon-pin-16.js.map +1 -0
- package/dist/svgs/16x16/icon-unpin-16.js +25 -0
- package/dist/svgs/16x16/icon-unpin-16.js.map +1 -0
- package/dist/svgs/24x24/icon-file-24.js +23 -0
- package/dist/svgs/24x24/icon-file-24.js.map +1 -0
- package/dist/svgs/24x24/icon-pin-24.js +23 -0
- package/dist/svgs/24x24/icon-pin-24.js.map +1 -0
- package/dist/svgs/24x24/icon-unpin-24.js +25 -0
- package/dist/svgs/24x24/icon-unpin-24.js.map +1 -0
- package/dist/theme/semantic-tokens/index.d.ts +17 -2
- package/dist/theme/semantic-tokens/semanticColors.d.ts +17 -2
- package/dist/theme/semantic-tokens/semanticColors.js +5 -2
- package/dist/theme/semantic-tokens/semanticColors.js.map +1 -1
- package/dist/theme/slot-recipes/DatePickerSelect.recipe.d.ts +12 -0
- package/dist/theme/slot-recipes/Select.recipe.d.ts +19 -1
- package/dist/theme/slot-recipes/Select.recipe.js +36 -1
- package/dist/theme/slot-recipes/Select.recipe.js.map +1 -1
- package/dist/theme/slot-recipes/UISideNav.recipe.d.ts +117 -0
- package/dist/theme/slot-recipes/UISideNav.recipe.js +448 -0
- package/dist/theme/slot-recipes/UISideNav.recipe.js.map +1 -0
- package/dist/theme/slot-recipes/index.d.ts +141 -1
- package/dist/theme/slot-recipes/index.js +3 -1
- package/dist/theme/slot-recipes/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The footprint the rail keeps in the page. The expanded rail overlays the content rather than
|
|
3
|
+
* pushing it, so this is the gutter a layout reserves beside the navigation — exported so a
|
|
4
|
+
* consumer does not have to hardcode the number and drift from it.
|
|
5
|
+
*/
|
|
6
|
+
export declare const uiSideNavRailWidth: `${number}rem`;
|
|
7
|
+
declare const uiSideNavSlotRecipe: import('@chakra-ui/react').SlotRecipeDefinition<"link" | "content" | "body" | "footer" | "closeButton" | "root" | "item" | "itemIndicator" | "positioner" | "itemLabel" | "itemIcon" | "backdrop" | "footerSeparator" | "footerHeading" | "linkIconBlock" | "linkTextBlock" | "linkIcon" | "linkStatusDot" | "linkLabel" | "linkSecondaryText" | "workspaceRoot" | "workspaceControl" | "workspace" | "workspaceTextBlock" | "workspaceChevron" | "workspaceMenu" | "workspaceLabel" | "workspaceValue", {
|
|
8
|
+
layout: {
|
|
9
|
+
rail: {
|
|
10
|
+
root: {
|
|
11
|
+
paddingBlockEnd: "12";
|
|
12
|
+
transition: "width 100ms ease-out";
|
|
13
|
+
transitionDelay: "50ms";
|
|
14
|
+
width: `${number}rem`;
|
|
15
|
+
_motionReduce: {
|
|
16
|
+
transition: "none";
|
|
17
|
+
};
|
|
18
|
+
'&[data-expanded]': {
|
|
19
|
+
transitionDelay: "100ms";
|
|
20
|
+
width: `${number}rem`;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
workspace: {
|
|
24
|
+
paddingInline: "16";
|
|
25
|
+
minWidth: `${number}rem`;
|
|
26
|
+
};
|
|
27
|
+
workspaceControl: {
|
|
28
|
+
minWidth: `${number}rem`;
|
|
29
|
+
};
|
|
30
|
+
workspaceMenu: {
|
|
31
|
+
width: `${number}rem`;
|
|
32
|
+
};
|
|
33
|
+
item: {
|
|
34
|
+
gap: "24";
|
|
35
|
+
paddingBlock: "12";
|
|
36
|
+
minWidth: `${number}rem`;
|
|
37
|
+
};
|
|
38
|
+
link: {
|
|
39
|
+
gap: "24";
|
|
40
|
+
minWidth: `${number}rem`;
|
|
41
|
+
};
|
|
42
|
+
footerSeparator: {
|
|
43
|
+
'[data-expanded] &': {
|
|
44
|
+
paddingInline: "16";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
footerHeading: {
|
|
48
|
+
minWidth: `${number}rem`;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
drawer: {
|
|
52
|
+
root: {
|
|
53
|
+
overflowX: "hidden";
|
|
54
|
+
overflowY: "auto";
|
|
55
|
+
width: "full";
|
|
56
|
+
};
|
|
57
|
+
workspaceRoot: {
|
|
58
|
+
background: "sys/ui/sidenav/bg";
|
|
59
|
+
insetBlockStart: number;
|
|
60
|
+
position: "sticky";
|
|
61
|
+
zIndex: number;
|
|
62
|
+
};
|
|
63
|
+
workspace: {
|
|
64
|
+
paddingBlock: "16";
|
|
65
|
+
paddingInlineEnd: "24";
|
|
66
|
+
paddingInlineStart: "16";
|
|
67
|
+
};
|
|
68
|
+
item: {
|
|
69
|
+
gap: "12";
|
|
70
|
+
paddingBlock: "16";
|
|
71
|
+
};
|
|
72
|
+
link: {
|
|
73
|
+
gap: "12";
|
|
74
|
+
};
|
|
75
|
+
footer: {
|
|
76
|
+
paddingBlockEnd: "16";
|
|
77
|
+
paddingBlockStart: "12";
|
|
78
|
+
position: "relative";
|
|
79
|
+
};
|
|
80
|
+
footerHeading: {
|
|
81
|
+
paddingBlockStart: "12";
|
|
82
|
+
'&[data-section]': {
|
|
83
|
+
marginBlockStart: "12";
|
|
84
|
+
paddingBlockStart: "24";
|
|
85
|
+
position: "relative";
|
|
86
|
+
_before: {
|
|
87
|
+
background: "border/inverse";
|
|
88
|
+
content: "\"\"";
|
|
89
|
+
height: "1";
|
|
90
|
+
insetBlockStart: number;
|
|
91
|
+
insetInline: number;
|
|
92
|
+
opacity: number;
|
|
93
|
+
position: "absolute";
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
footerSeparator: {
|
|
98
|
+
insetBlockStart: number;
|
|
99
|
+
insetInline: number;
|
|
100
|
+
paddingBlock: number;
|
|
101
|
+
paddingInline: number;
|
|
102
|
+
position: "absolute";
|
|
103
|
+
};
|
|
104
|
+
workspaceMenu: {
|
|
105
|
+
maxHeight: "var(--available-height)";
|
|
106
|
+
'& [data-slot="item-list"]': {
|
|
107
|
+
maxHeight: "none";
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
body: {
|
|
111
|
+
flex: "1 0 auto";
|
|
112
|
+
paddingBlock: "8";
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
}>;
|
|
117
|
+
export default uiSideNavSlotRecipe;
|
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
import { rem } from "../themeUtils.js";
|
|
2
|
+
import { defineSlotRecipe } from "@chakra-ui/react/styled-system";
|
|
3
|
+
//#region lib/theme/slot-recipes/UISideNav.recipe.ts
|
|
4
|
+
/**
|
|
5
|
+
* The rail's two widths. The collapsed rail is exactly wide enough for the 24px icon at its
|
|
6
|
+
* 24px inline-start padding, which centres the icon and puts the label's first pixel on the
|
|
7
|
+
* rail's trailing edge — so the expanded row and the collapsed row are the same row, clipped.
|
|
8
|
+
*/
|
|
9
|
+
var RAIL_WIDTH_COLLAPSED = rem(72);
|
|
10
|
+
/**
|
|
11
|
+
* The footprint the rail keeps in the page. The expanded rail overlays the content rather than
|
|
12
|
+
* pushing it, so this is the gutter a layout reserves beside the navigation — exported so a
|
|
13
|
+
* consumer does not have to hardcode the number and drift from it.
|
|
14
|
+
*/
|
|
15
|
+
var uiSideNavRailWidth = RAIL_WIDTH_COLLAPSED;
|
|
16
|
+
var RAIL_WIDTH_EXPANDED = rem(256);
|
|
17
|
+
var DRAWER_WIDTH = rem(320);
|
|
18
|
+
/**
|
|
19
|
+
* The workspace menu is wider than the rail it hangs off, so a long workspace name has somewhere
|
|
20
|
+
* to go. The drawer leaves it alone and lets the menu take the panel's width instead.
|
|
21
|
+
*/
|
|
22
|
+
var WORKSPACE_MENU_WIDTH = rem(360);
|
|
23
|
+
/**
|
|
24
|
+
* Every row is laid out at the expanded width and clipped by the root, rather than reflowing
|
|
25
|
+
* between the two states. Without it the label would be handed a 72px row, ellipsis itself, and
|
|
26
|
+
* re-wrap on every hover.
|
|
27
|
+
*/
|
|
28
|
+
var railRow = { minWidth: RAIL_WIDTH_EXPANDED };
|
|
29
|
+
var uiSideNavSlotRecipe = defineSlotRecipe({
|
|
30
|
+
className: "ui-side-nav",
|
|
31
|
+
slots: [
|
|
32
|
+
"backdrop",
|
|
33
|
+
"body",
|
|
34
|
+
"closeButton",
|
|
35
|
+
"content",
|
|
36
|
+
"footer",
|
|
37
|
+
"footerHeading",
|
|
38
|
+
"footerSeparator",
|
|
39
|
+
"item",
|
|
40
|
+
"itemIcon",
|
|
41
|
+
"itemIndicator",
|
|
42
|
+
"itemLabel",
|
|
43
|
+
"link",
|
|
44
|
+
"linkIcon",
|
|
45
|
+
"linkIconBlock",
|
|
46
|
+
"linkLabel",
|
|
47
|
+
"linkSecondaryText",
|
|
48
|
+
"linkStatusDot",
|
|
49
|
+
"linkTextBlock",
|
|
50
|
+
"positioner",
|
|
51
|
+
"root",
|
|
52
|
+
"workspace",
|
|
53
|
+
"workspaceChevron",
|
|
54
|
+
"workspaceControl",
|
|
55
|
+
"workspaceLabel",
|
|
56
|
+
"workspaceMenu",
|
|
57
|
+
"workspaceRoot",
|
|
58
|
+
"workspaceTextBlock",
|
|
59
|
+
"workspaceValue"
|
|
60
|
+
],
|
|
61
|
+
base: {
|
|
62
|
+
root: {
|
|
63
|
+
background: "sys/ui/sidenav/bg",
|
|
64
|
+
display: "flex",
|
|
65
|
+
flexDirection: "column",
|
|
66
|
+
height: "full",
|
|
67
|
+
overflow: "hidden",
|
|
68
|
+
whiteSpace: "nowrap"
|
|
69
|
+
},
|
|
70
|
+
workspace: {
|
|
71
|
+
alignItems: "center",
|
|
72
|
+
background: "sys/ui/sidenav/item/bg",
|
|
73
|
+
borderRadius: 0,
|
|
74
|
+
borderWidth: 0,
|
|
75
|
+
color: "text/on-color",
|
|
76
|
+
cursor: "pointer",
|
|
77
|
+
display: "flex",
|
|
78
|
+
flexShrink: 0,
|
|
79
|
+
gap: "16",
|
|
80
|
+
height: rem(72),
|
|
81
|
+
minHeight: rem(72),
|
|
82
|
+
position: "relative",
|
|
83
|
+
textAlign: "start",
|
|
84
|
+
width: "full",
|
|
85
|
+
_after: {
|
|
86
|
+
background: "border/inverse",
|
|
87
|
+
content: "\"\"",
|
|
88
|
+
height: "1",
|
|
89
|
+
insetBlockEnd: 0,
|
|
90
|
+
insetInline: 0,
|
|
91
|
+
opacity: .2,
|
|
92
|
+
position: "absolute"
|
|
93
|
+
},
|
|
94
|
+
_hover: {
|
|
95
|
+
background: "sys/ui/sidenav/item/bg-hover",
|
|
96
|
+
_active: { background: "sys/ui/sidenav/item/bg-active" }
|
|
97
|
+
},
|
|
98
|
+
_active: { background: "sys/ui/sidenav/item/bg-active" }
|
|
99
|
+
},
|
|
100
|
+
/**
|
|
101
|
+
* The Select's own wrapper. It sizes to its content by default, which would leave the
|
|
102
|
+
* workspace cell narrower than the panel in the drawer, where no minimum width props it out.
|
|
103
|
+
*/
|
|
104
|
+
workspaceControl: { width: "full" },
|
|
105
|
+
/** The element the Select mounts on, which is what the drawer's header sticks to. */
|
|
106
|
+
workspaceRoot: {
|
|
107
|
+
flexShrink: 0,
|
|
108
|
+
width: "full"
|
|
109
|
+
},
|
|
110
|
+
workspaceTextBlock: {
|
|
111
|
+
display: "flex",
|
|
112
|
+
flex: 1,
|
|
113
|
+
flexDirection: "column",
|
|
114
|
+
minWidth: 0
|
|
115
|
+
},
|
|
116
|
+
workspaceLabel: {
|
|
117
|
+
opacity: .6,
|
|
118
|
+
textStyle: "heading/h6",
|
|
119
|
+
textTransform: "uppercase"
|
|
120
|
+
},
|
|
121
|
+
workspaceValue: {
|
|
122
|
+
opacity: .8,
|
|
123
|
+
overflow: "hidden",
|
|
124
|
+
textOverflow: "ellipsis",
|
|
125
|
+
textStyle: "body/lg/regular"
|
|
126
|
+
},
|
|
127
|
+
workspaceChevron: {
|
|
128
|
+
flexShrink: 0,
|
|
129
|
+
transition: "rotate 150ms ease-out",
|
|
130
|
+
"&[data-state=\"open\"]": { rotate: "180deg" },
|
|
131
|
+
_motionReduce: { transition: "none" }
|
|
132
|
+
},
|
|
133
|
+
body: {
|
|
134
|
+
display: "flex",
|
|
135
|
+
flex: 1,
|
|
136
|
+
flexDirection: "column",
|
|
137
|
+
minHeight: 0
|
|
138
|
+
},
|
|
139
|
+
item: {
|
|
140
|
+
alignItems: "center",
|
|
141
|
+
background: "sys/ui/sidenav/item/bg",
|
|
142
|
+
color: "sys/ui/sidenav/item/fg",
|
|
143
|
+
cursor: "pointer",
|
|
144
|
+
display: "flex",
|
|
145
|
+
flexShrink: 0,
|
|
146
|
+
overflow: "hidden",
|
|
147
|
+
paddingInlineEnd: "8",
|
|
148
|
+
paddingInlineStart: "24",
|
|
149
|
+
position: "relative",
|
|
150
|
+
textDecoration: "none",
|
|
151
|
+
width: "full",
|
|
152
|
+
_hover: {
|
|
153
|
+
background: "sys/ui/sidenav/item/bg-hover",
|
|
154
|
+
color: "sys/ui/sidenav/item/fg-hover",
|
|
155
|
+
_active: { background: "sys/ui/sidenav/item/bg-active" }
|
|
156
|
+
},
|
|
157
|
+
_active: {
|
|
158
|
+
background: "sys/ui/sidenav/item/bg-active",
|
|
159
|
+
color: "sys/ui/sidenav/item/fg-active"
|
|
160
|
+
},
|
|
161
|
+
"&[data-selected]": {
|
|
162
|
+
background: "sys/ui/sidenav/item/bg-selected",
|
|
163
|
+
color: "sys/ui/sidenav/item/fg-active",
|
|
164
|
+
_hover: {
|
|
165
|
+
background: "sys/ui/sidenav/item/bg-hover",
|
|
166
|
+
_active: { background: "sys/ui/sidenav/item/bg-active" }
|
|
167
|
+
},
|
|
168
|
+
_active: { background: "sys/ui/sidenav/item/bg-active" }
|
|
169
|
+
},
|
|
170
|
+
_focusVisible: { outlineOffset: "calc(var(--focus-ring-width) * -1)" }
|
|
171
|
+
},
|
|
172
|
+
itemIcon: { flexShrink: 0 },
|
|
173
|
+
itemLabel: {
|
|
174
|
+
flex: 1,
|
|
175
|
+
minWidth: 0,
|
|
176
|
+
overflow: "hidden",
|
|
177
|
+
textOverflow: "ellipsis",
|
|
178
|
+
textStyle: "body/lg/semibold"
|
|
179
|
+
},
|
|
180
|
+
itemIndicator: {
|
|
181
|
+
background: "sys/ui/sidenav/item/indicator",
|
|
182
|
+
insetBlock: 0,
|
|
183
|
+
insetInlineStart: 0,
|
|
184
|
+
position: "absolute",
|
|
185
|
+
width: "4"
|
|
186
|
+
},
|
|
187
|
+
footer: {
|
|
188
|
+
display: "flex",
|
|
189
|
+
flexDirection: "column",
|
|
190
|
+
flexShrink: 0,
|
|
191
|
+
marginBlockStart: "auto"
|
|
192
|
+
},
|
|
193
|
+
/**
|
|
194
|
+
* The rule above the footer, drawn as its own band rather than a border on the footer: the
|
|
195
|
+
* design insets the line from both edges and gives it breathing room, which a border cannot do.
|
|
196
|
+
*/
|
|
197
|
+
footerSeparator: {
|
|
198
|
+
flexShrink: 0,
|
|
199
|
+
paddingBlock: "8",
|
|
200
|
+
paddingInline: "12",
|
|
201
|
+
_before: {
|
|
202
|
+
background: "border/inverse",
|
|
203
|
+
content: "\"\"",
|
|
204
|
+
display: "block",
|
|
205
|
+
height: "1",
|
|
206
|
+
opacity: .2,
|
|
207
|
+
width: "full"
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
footerHeading: {
|
|
211
|
+
color: "text/on-color",
|
|
212
|
+
opacity: .6,
|
|
213
|
+
paddingBlockEnd: "12",
|
|
214
|
+
paddingInline: "24",
|
|
215
|
+
textStyle: "heading/h6",
|
|
216
|
+
textTransform: "uppercase"
|
|
217
|
+
},
|
|
218
|
+
/** Shared by both of the footer row's elements: an anchor for a destination, a button for a
|
|
219
|
+
* row that opens something in place. The reset keeps the two indistinguishable. */
|
|
220
|
+
link: {
|
|
221
|
+
alignItems: "center",
|
|
222
|
+
background: "sys/ui/sidenav/item/bg",
|
|
223
|
+
borderWidth: 0,
|
|
224
|
+
color: "sys/ui/sidenav/item/fg",
|
|
225
|
+
cursor: "pointer",
|
|
226
|
+
display: "flex",
|
|
227
|
+
flexShrink: 0,
|
|
228
|
+
overflow: "hidden",
|
|
229
|
+
paddingBlock: "12",
|
|
230
|
+
paddingInline: "24",
|
|
231
|
+
textAlign: "start",
|
|
232
|
+
textDecoration: "none",
|
|
233
|
+
width: "full",
|
|
234
|
+
_hover: {
|
|
235
|
+
background: "sys/ui/sidenav/item/bg-hover",
|
|
236
|
+
color: "sys/ui/sidenav/item/fg-hover",
|
|
237
|
+
_active: { background: "sys/ui/sidenav/item/bg-active" }
|
|
238
|
+
},
|
|
239
|
+
_active: {
|
|
240
|
+
background: "sys/ui/sidenav/item/bg-active",
|
|
241
|
+
color: "sys/ui/sidenav/item/fg-active"
|
|
242
|
+
},
|
|
243
|
+
_focusVisible: { outlineOffset: "calc(var(--focus-ring-width) * -1)" },
|
|
244
|
+
"&[data-with-secondary]": {
|
|
245
|
+
height: rem(56),
|
|
246
|
+
paddingBlock: 0
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
linkTextBlock: {
|
|
250
|
+
display: "flex",
|
|
251
|
+
flex: 1,
|
|
252
|
+
flexDirection: "column",
|
|
253
|
+
justifyContent: "center",
|
|
254
|
+
minWidth: 0
|
|
255
|
+
},
|
|
256
|
+
linkLabel: {
|
|
257
|
+
flex: 1,
|
|
258
|
+
minWidth: 0,
|
|
259
|
+
overflow: "hidden",
|
|
260
|
+
textOverflow: "ellipsis",
|
|
261
|
+
textStyle: "body/lg/regular",
|
|
262
|
+
"[data-with-secondary] &": {
|
|
263
|
+
flex: "none",
|
|
264
|
+
textStyle: "body/md/semibold"
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
linkSecondaryText: {
|
|
268
|
+
overflow: "hidden",
|
|
269
|
+
textOverflow: "ellipsis",
|
|
270
|
+
textStyle: "body/sm/regular"
|
|
271
|
+
},
|
|
272
|
+
linkIcon: { flexShrink: 0 },
|
|
273
|
+
/** Wraps the icon so the status dot can hang off its trailing bottom corner. */
|
|
274
|
+
linkIconBlock: {
|
|
275
|
+
display: "flex",
|
|
276
|
+
flexShrink: 0,
|
|
277
|
+
position: "relative"
|
|
278
|
+
},
|
|
279
|
+
linkStatusDot: {
|
|
280
|
+
borderRadius: "full",
|
|
281
|
+
height: "8",
|
|
282
|
+
insetBlockEnd: "-2px",
|
|
283
|
+
insetInlineEnd: "-4px",
|
|
284
|
+
position: "absolute",
|
|
285
|
+
width: "8",
|
|
286
|
+
"&[data-status=\"neutral\"]": { background: "sys/ui/sidenav/badge/neutral" },
|
|
287
|
+
"&[data-status=\"success\"]": { background: "sys/ui/sidenav/badge/green" },
|
|
288
|
+
"&[data-status=\"critical\"]": { background: "sys/ui/sidenav/badge/red" }
|
|
289
|
+
},
|
|
290
|
+
backdrop: {
|
|
291
|
+
background: "utilities/overlay",
|
|
292
|
+
inset: 0,
|
|
293
|
+
position: "fixed",
|
|
294
|
+
zIndex: "calc({zIndex.dialogOverlay} + var(--layer-index, 0))",
|
|
295
|
+
_open: {
|
|
296
|
+
animationDuration: "slow",
|
|
297
|
+
animationName: "fade-in"
|
|
298
|
+
},
|
|
299
|
+
_closed: {
|
|
300
|
+
animationDuration: "moderate",
|
|
301
|
+
animationName: "fade-out"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
positioner: {
|
|
305
|
+
alignItems: "stretch",
|
|
306
|
+
display: "flex",
|
|
307
|
+
inset: 0,
|
|
308
|
+
justifyContent: "flex-start",
|
|
309
|
+
overscrollBehaviorY: "none",
|
|
310
|
+
position: "fixed",
|
|
311
|
+
zIndex: "calc({zIndex.dialog} + var(--layer-index, 0))"
|
|
312
|
+
},
|
|
313
|
+
content: {
|
|
314
|
+
background: "sys/ui/sidenav/bg",
|
|
315
|
+
boxShadow: "elevation/lg",
|
|
316
|
+
display: "flex",
|
|
317
|
+
flexDirection: "column",
|
|
318
|
+
maxHeight: "100dvh",
|
|
319
|
+
overflow: "visible",
|
|
320
|
+
outline: "none",
|
|
321
|
+
position: "relative",
|
|
322
|
+
width: DRAWER_WIDTH,
|
|
323
|
+
maxWidth: "calc(100vw - 55px)",
|
|
324
|
+
_open: {
|
|
325
|
+
animationDuration: "slowest",
|
|
326
|
+
animationName: {
|
|
327
|
+
base: "slide-from-left-full, fade-in",
|
|
328
|
+
_rtl: "slide-from-right-full, fade-in"
|
|
329
|
+
},
|
|
330
|
+
animationTimingFunction: "ease-in-smooth"
|
|
331
|
+
},
|
|
332
|
+
_closed: {
|
|
333
|
+
animationDuration: "slower",
|
|
334
|
+
animationName: {
|
|
335
|
+
base: "slide-to-left-full, fade-out",
|
|
336
|
+
_rtl: "slide-to-right-full, fade-out"
|
|
337
|
+
},
|
|
338
|
+
animationTimingFunction: "ease-in-smooth"
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
closeButton: {
|
|
342
|
+
alignItems: "center",
|
|
343
|
+
display: "flex",
|
|
344
|
+
height: rem(72),
|
|
345
|
+
insetBlockStart: 0,
|
|
346
|
+
insetInlineStart: "100%",
|
|
347
|
+
paddingInlineStart: "8",
|
|
348
|
+
position: "absolute"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
variants: { layout: {
|
|
352
|
+
rail: {
|
|
353
|
+
root: {
|
|
354
|
+
paddingBlockEnd: "12",
|
|
355
|
+
transition: "width 100ms ease-out",
|
|
356
|
+
transitionDelay: "50ms",
|
|
357
|
+
width: RAIL_WIDTH_COLLAPSED,
|
|
358
|
+
_motionReduce: { transition: "none" },
|
|
359
|
+
"&[data-expanded]": {
|
|
360
|
+
transitionDelay: "100ms",
|
|
361
|
+
width: RAIL_WIDTH_EXPANDED
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
workspace: {
|
|
365
|
+
...railRow,
|
|
366
|
+
paddingInline: "16"
|
|
367
|
+
},
|
|
368
|
+
workspaceControl: railRow,
|
|
369
|
+
workspaceMenu: { width: WORKSPACE_MENU_WIDTH },
|
|
370
|
+
item: {
|
|
371
|
+
...railRow,
|
|
372
|
+
gap: "24",
|
|
373
|
+
paddingBlock: "12"
|
|
374
|
+
},
|
|
375
|
+
link: {
|
|
376
|
+
...railRow,
|
|
377
|
+
gap: "24"
|
|
378
|
+
},
|
|
379
|
+
footerSeparator: { "[data-expanded] &": { paddingInline: "16" } },
|
|
380
|
+
footerHeading: railRow
|
|
381
|
+
},
|
|
382
|
+
drawer: {
|
|
383
|
+
root: {
|
|
384
|
+
overflowX: "hidden",
|
|
385
|
+
overflowY: "auto",
|
|
386
|
+
width: "full"
|
|
387
|
+
},
|
|
388
|
+
workspaceRoot: {
|
|
389
|
+
background: "sys/ui/sidenav/bg",
|
|
390
|
+
insetBlockStart: 0,
|
|
391
|
+
position: "sticky",
|
|
392
|
+
zIndex: 1
|
|
393
|
+
},
|
|
394
|
+
workspace: {
|
|
395
|
+
paddingBlock: "16",
|
|
396
|
+
paddingInlineEnd: "24",
|
|
397
|
+
paddingInlineStart: "16"
|
|
398
|
+
},
|
|
399
|
+
item: {
|
|
400
|
+
gap: "12",
|
|
401
|
+
paddingBlock: "16"
|
|
402
|
+
},
|
|
403
|
+
link: { gap: "12" },
|
|
404
|
+
footer: {
|
|
405
|
+
paddingBlockEnd: "16",
|
|
406
|
+
paddingBlockStart: "12",
|
|
407
|
+
position: "relative"
|
|
408
|
+
},
|
|
409
|
+
footerHeading: {
|
|
410
|
+
paddingBlockStart: "12",
|
|
411
|
+
"&[data-section]": {
|
|
412
|
+
marginBlockStart: "12",
|
|
413
|
+
paddingBlockStart: "24",
|
|
414
|
+
position: "relative",
|
|
415
|
+
_before: {
|
|
416
|
+
background: "border/inverse",
|
|
417
|
+
content: "\"\"",
|
|
418
|
+
height: "1",
|
|
419
|
+
insetBlockStart: 0,
|
|
420
|
+
insetInline: 0,
|
|
421
|
+
opacity: .2,
|
|
422
|
+
position: "absolute"
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
footerSeparator: {
|
|
427
|
+
insetBlockStart: 0,
|
|
428
|
+
insetInline: 0,
|
|
429
|
+
paddingBlock: 0,
|
|
430
|
+
paddingInline: 0,
|
|
431
|
+
position: "absolute"
|
|
432
|
+
},
|
|
433
|
+
workspaceMenu: {
|
|
434
|
+
maxHeight: "var(--available-height)",
|
|
435
|
+
"& [data-slot=\"item-list\"]": { maxHeight: "none" }
|
|
436
|
+
},
|
|
437
|
+
body: {
|
|
438
|
+
flex: "1 0 auto",
|
|
439
|
+
paddingBlock: "8"
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
} },
|
|
443
|
+
defaultVariants: { layout: "rail" }
|
|
444
|
+
});
|
|
445
|
+
//#endregion
|
|
446
|
+
export { uiSideNavSlotRecipe as default, uiSideNavRailWidth };
|
|
447
|
+
|
|
448
|
+
//# sourceMappingURL=UISideNav.recipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UISideNav.recipe.js","names":[],"sources":["../../../lib/theme/slot-recipes/UISideNav.recipe.ts"],"sourcesContent":["import { defineSlotRecipe } from '@chakra-ui/react/styled-system';\n\nimport { rem } from '../themeUtils';\n\n/**\n * The rail's two widths. The collapsed rail is exactly wide enough for the 24px icon at its\n * 24px inline-start padding, which centres the icon and puts the label's first pixel on the\n * rail's trailing edge — so the expanded row and the collapsed row are the same row, clipped.\n */\nconst RAIL_WIDTH_COLLAPSED = rem(72);\n\n/**\n * The footprint the rail keeps in the page. The expanded rail overlays the content rather than\n * pushing it, so this is the gutter a layout reserves beside the navigation — exported so a\n * consumer does not have to hardcode the number and drift from it.\n */\nexport const uiSideNavRailWidth = RAIL_WIDTH_COLLAPSED;\nconst RAIL_WIDTH_EXPANDED = rem(256);\nconst DRAWER_WIDTH = rem(320);\n\n/**\n * The workspace menu is wider than the rail it hangs off, so a long workspace name has somewhere\n * to go. The drawer leaves it alone and lets the menu take the panel's width instead.\n */\nconst WORKSPACE_MENU_WIDTH = rem(360);\n\n/**\n * Every row is laid out at the expanded width and clipped by the root, rather than reflowing\n * between the two states. Without it the label would be handed a 72px row, ellipsis itself, and\n * re-wrap on every hover.\n */\nconst railRow = { minWidth: RAIL_WIDTH_EXPANDED };\n\nconst uiSideNavSlotRecipe = defineSlotRecipe({\n className: 'ui-side-nav',\n slots: [\n 'backdrop',\n 'body',\n 'closeButton',\n 'content',\n 'footer',\n 'footerHeading',\n 'footerSeparator',\n 'item',\n 'itemIcon',\n 'itemIndicator',\n 'itemLabel',\n 'link',\n 'linkIcon',\n 'linkIconBlock',\n 'linkLabel',\n 'linkSecondaryText',\n 'linkStatusDot',\n 'linkTextBlock',\n 'positioner',\n 'root',\n 'workspace',\n 'workspaceChevron',\n 'workspaceControl',\n 'workspaceLabel',\n 'workspaceMenu',\n 'workspaceRoot',\n 'workspaceTextBlock',\n 'workspaceValue',\n ],\n base: {\n root: {\n background: 'sys/ui/sidenav/bg',\n display: 'flex',\n flexDirection: 'column',\n // The consumer owns the positioning: the website fixes it below a 48px header and feeds it\n // a dynamic margin for the Intercom banner. Filling the height given is all this does.\n height: 'full',\n // What makes the rail a rail. Every row is laid out at the expanded width, so this is the\n // only thing hiding the labels.\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n },\n workspace: {\n alignItems: 'center',\n background: 'sys/ui/sidenav/item/bg',\n // The Select recipe styles the trigger as a form control. This slot has to undo that\n // before it can be a navigation cell.\n borderRadius: 0,\n borderWidth: 0,\n color: 'text/on-color',\n cursor: 'pointer',\n display: 'flex',\n flexShrink: 0,\n gap: '16',\n height: rem(72),\n minHeight: rem(72),\n position: 'relative',\n textAlign: 'start',\n width: 'full',\n // The 1px rule under the cell. A pseudo-element rather than a border so it cannot add to\n // the 72px height the avatar and its padding already fill exactly.\n _after: {\n background: 'border/inverse',\n content: '\"\"',\n height: '1',\n insetBlockEnd: 0,\n insetInline: 0,\n opacity: 0.2,\n position: 'absolute',\n },\n _hover: {\n background: 'sys/ui/sidenav/item/bg-hover',\n _active: {\n background: 'sys/ui/sidenav/item/bg-active',\n },\n },\n _active: {\n background: 'sys/ui/sidenav/item/bg-active',\n },\n },\n /**\n * The Select's own wrapper. It sizes to its content by default, which would leave the\n * workspace cell narrower than the panel in the drawer, where no minimum width props it out.\n */\n workspaceControl: {\n width: 'full',\n },\n /** The element the Select mounts on, which is what the drawer's header sticks to. */\n workspaceRoot: {\n flexShrink: 0,\n width: 'full',\n },\n workspaceTextBlock: {\n display: 'flex',\n flex: 1,\n flexDirection: 'column',\n minWidth: 0,\n },\n workspaceLabel: {\n // The design draws this at 60% of the on-colour white. There is no sidenav token for it,\n // so it is the opacity Figma itself applies, not an invented colour.\n opacity: 0.6,\n textStyle: 'heading/h6',\n textTransform: 'uppercase',\n },\n workspaceValue: {\n opacity: 0.8,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n textStyle: 'body/lg/regular',\n },\n workspaceChevron: {\n flexShrink: 0,\n transition: 'rotate 150ms ease-out',\n // The design draws a chevron-up when the menu is open. It is the same glyph turned over,\n // so it is a rotation rather than a second icon.\n '&[data-state=\"open\"]': {\n rotate: '180deg',\n },\n _motionReduce: {\n transition: 'none',\n },\n },\n body: {\n display: 'flex',\n flex: 1,\n flexDirection: 'column',\n minHeight: 0,\n },\n item: {\n alignItems: 'center',\n background: 'sys/ui/sidenav/item/bg',\n // Both the icon and the label take their colour from the row, which is how one token pair\n // drives the whole 80%-to-100% shift the design asks for.\n color: 'sys/ui/sidenav/item/fg',\n cursor: 'pointer',\n display: 'flex',\n flexShrink: 0,\n overflow: 'hidden',\n paddingInlineEnd: '8',\n paddingInlineStart: '24',\n position: 'relative',\n textDecoration: 'none',\n width: 'full',\n _hover: {\n background: 'sys/ui/sidenav/item/bg-hover',\n color: 'sys/ui/sidenav/item/fg-hover',\n _active: {\n background: 'sys/ui/sidenav/item/bg-active',\n },\n },\n _active: {\n background: 'sys/ui/sidenav/item/bg-active',\n color: 'sys/ui/sidenav/item/fg-active',\n },\n // The selected row is dimmer on hover than at rest. That reads backwards, but it is what\n // the component set draws: bg-selected at rest, bg-hover under the pointer.\n '&[data-selected]': {\n background: 'sys/ui/sidenav/item/bg-selected',\n color: 'sys/ui/sidenav/item/fg-active',\n _hover: {\n background: 'sys/ui/sidenav/item/bg-hover',\n _active: {\n background: 'sys/ui/sidenav/item/bg-active',\n },\n },\n _active: {\n background: 'sys/ui/sidenav/item/bg-active',\n },\n },\n // `focusVisibleRing: 'inside'` still resolves to a zero offset, which draws the ring on the\n // border box. The row is full-bleed, so that would be clipped by the rail — pull it in.\n _focusVisible: {\n outlineOffset: 'calc(var(--focus-ring-width) * -1)',\n },\n },\n itemIcon: {\n flexShrink: 0,\n },\n itemLabel: {\n flex: 1,\n minWidth: 0,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n textStyle: 'body/lg/semibold',\n },\n itemIndicator: {\n background: 'sys/ui/sidenav/item/indicator',\n insetBlock: 0,\n insetInlineStart: 0,\n position: 'absolute',\n width: '4',\n },\n footer: {\n display: 'flex',\n flexDirection: 'column',\n flexShrink: 0,\n // Holds the footer at the bottom however short the navigation is.\n marginBlockStart: 'auto',\n },\n /**\n * The rule above the footer, drawn as its own band rather than a border on the footer: the\n * design insets the line from both edges and gives it breathing room, which a border cannot do.\n */\n footerSeparator: {\n flexShrink: 0,\n paddingBlock: '8',\n // The collapsed inset. Unlike the rows, the rule follows the rail's own width rather than\n // being laid out at 256 and clipped, so it needs a narrower inset while the rail is narrow.\n paddingInline: '12',\n _before: {\n background: 'border/inverse',\n content: '\"\"',\n display: 'block',\n height: '1',\n opacity: 0.2,\n width: 'full',\n },\n },\n footerHeading: {\n color: 'text/on-color',\n opacity: 0.6,\n paddingBlockEnd: '12',\n paddingInline: '24',\n textStyle: 'heading/h6',\n textTransform: 'uppercase',\n },\n /** Shared by both of the footer row's elements: an anchor for a destination, a button for a\n * row that opens something in place. The reset keeps the two indistinguishable. */\n link: {\n alignItems: 'center',\n background: 'sys/ui/sidenav/item/bg',\n borderWidth: 0,\n color: 'sys/ui/sidenav/item/fg',\n cursor: 'pointer',\n display: 'flex',\n flexShrink: 0,\n overflow: 'hidden',\n paddingBlock: '12',\n paddingInline: '24',\n textAlign: 'start',\n textDecoration: 'none',\n width: 'full',\n _hover: {\n background: 'sys/ui/sidenav/item/bg-hover',\n color: 'sys/ui/sidenav/item/fg-hover',\n _active: {\n background: 'sys/ui/sidenav/item/bg-active',\n },\n },\n _active: {\n background: 'sys/ui/sidenav/item/bg-active',\n color: 'sys/ui/sidenav/item/fg-active',\n },\n _focusVisible: {\n outlineOffset: 'calc(var(--focus-ring-width) * -1)',\n },\n // A row carrying a second line is the status row, which the design draws one step taller and\n // on a tighter type scale. Its own height rather than padding, because 12 above and below a\n // 36px text block would overshoot the 56 the design fixes it at.\n '&[data-with-secondary]': {\n height: rem(56),\n paddingBlock: 0,\n },\n },\n linkTextBlock: {\n display: 'flex',\n flex: 1,\n flexDirection: 'column',\n justifyContent: 'center',\n minWidth: 0,\n },\n linkLabel: {\n flex: 1,\n minWidth: 0,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n textStyle: 'body/lg/regular',\n '[data-with-secondary] &': {\n flex: 'none',\n textStyle: 'body/md/semibold',\n },\n },\n linkSecondaryText: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n textStyle: 'body/sm/regular',\n },\n linkIcon: {\n flexShrink: 0,\n },\n /** Wraps the icon so the status dot can hang off its trailing bottom corner. */\n linkIconBlock: {\n display: 'flex',\n flexShrink: 0,\n position: 'relative',\n },\n linkStatusDot: {\n borderRadius: 'full',\n height: '8',\n // Clear of the icon's corner by the 4 and 2 the design offsets it.\n insetBlockEnd: '-2px',\n insetInlineEnd: '-4px',\n position: 'absolute',\n width: '8',\n '&[data-status=\"neutral\"]': {\n background: 'sys/ui/sidenav/badge/neutral',\n },\n '&[data-status=\"success\"]': {\n background: 'sys/ui/sidenav/badge/green',\n },\n '&[data-status=\"critical\"]': {\n background: 'sys/ui/sidenav/badge/red',\n },\n },\n backdrop: {\n background: 'utilities/overlay',\n inset: 0,\n position: 'fixed',\n zIndex: 'calc({zIndex.dialogOverlay} + var(--layer-index, 0))',\n _open: {\n animationDuration: 'slow',\n animationName: 'fade-in',\n },\n _closed: {\n animationDuration: 'moderate',\n animationName: 'fade-out',\n },\n },\n positioner: {\n alignItems: 'stretch',\n display: 'flex',\n inset: 0,\n // The drawer comes in from the leading edge, unlike every other drawer in the library.\n justifyContent: 'flex-start',\n overscrollBehaviorY: 'none',\n position: 'fixed',\n zIndex: 'calc({zIndex.dialog} + var(--layer-index, 0))',\n },\n content: {\n background: 'sys/ui/sidenav/bg',\n boxShadow: 'elevation/lg',\n display: 'flex',\n flexDirection: 'column',\n maxHeight: '100dvh',\n // The close button hangs off the trailing edge, so this must not clip.\n overflow: 'visible',\n outline: 'none',\n position: 'relative',\n width: DRAWER_WIDTH,\n // 320 for the panel plus the 55 the close button column occupies, which is the 375 the\n // design frame is drawn at. Narrower phones give the panel up, not the button.\n maxWidth: 'calc(100vw - 55px)',\n _open: {\n animationDuration: 'slowest',\n animationName: {\n base: 'slide-from-left-full, fade-in',\n _rtl: 'slide-from-right-full, fade-in',\n },\n animationTimingFunction: 'ease-in-smooth',\n },\n _closed: {\n animationDuration: 'slower',\n animationName: {\n base: 'slide-to-left-full, fade-out',\n _rtl: 'slide-to-right-full, fade-out',\n },\n animationTimingFunction: 'ease-in-smooth',\n },\n },\n closeButton: {\n alignItems: 'center',\n display: 'flex',\n height: rem(72),\n insetBlockStart: 0,\n // Sits outside the panel but stays a child of the drawer content, so the dialog's focus\n // trap still reaches it.\n insetInlineStart: '100%',\n paddingInlineStart: '8',\n position: 'absolute',\n },\n },\n\n variants: {\n layout: {\n rail: {\n root: {\n paddingBlockEnd: '12',\n // Opening is slower to reach than closing, so a pointer crossing the rail on its way\n // somewhere else does not drag it open.\n transition: 'width 100ms ease-out',\n transitionDelay: '50ms',\n width: RAIL_WIDTH_COLLAPSED,\n _motionReduce: {\n transition: 'none',\n },\n '&[data-expanded]': {\n transitionDelay: '100ms',\n width: RAIL_WIDTH_EXPANDED,\n },\n },\n workspace: { ...railRow, paddingInline: '16' },\n workspaceControl: railRow,\n workspaceMenu: { width: WORKSPACE_MENU_WIDTH },\n item: { ...railRow, gap: '24', paddingBlock: '12' },\n link: { ...railRow, gap: '24' },\n footerSeparator: {\n '[data-expanded] &': {\n paddingInline: '16',\n },\n },\n footerHeading: railRow,\n },\n drawer: {\n root: {\n // Everything below the workspace cell scrolls together rather than the navigation\n // scrolling inside a footer that stays put — the panel is one column, not two panes.\n overflowX: 'hidden',\n overflowY: 'auto',\n width: 'full',\n },\n workspaceRoot: {\n // Opaque, because the rows pass underneath it rather than beside it.\n background: 'sys/ui/sidenav/bg',\n insetBlockStart: 0,\n position: 'sticky',\n zIndex: 1,\n },\n workspace: {\n paddingBlock: '16',\n paddingInlineEnd: '24',\n paddingInlineStart: '16',\n },\n item: { gap: '12', paddingBlock: '16' },\n link: { gap: '12' },\n footer: {\n paddingBlockEnd: '16',\n paddingBlockStart: '12',\n position: 'relative',\n },\n // A heading starts a new section inside the footer, so it carries the same rule the\n // footer draws at its own top — laid over the gap above it rather than taking a row.\n footerHeading: {\n // A `label` sits right under the footer's own rule, so it only needs the rest of the\n // 24 the design leaves above a heading.\n paddingBlockStart: '12',\n // A section heading opens a block of its own further down, so it carries the same rule\n // — laid over the gap above it rather than taking a row of its own.\n '&[data-section]': {\n marginBlockStart: '12',\n paddingBlockStart: '24',\n position: 'relative',\n _before: {\n background: 'border/inverse',\n content: '\"\"',\n height: '1',\n insetBlockStart: 0,\n insetInline: 0,\n opacity: 0.2,\n position: 'absolute',\n },\n },\n },\n // Full bleed, and laid over the block's leading edge rather than in the flow: in the flow\n // the rule's own pixel would push every block below it down by one.\n footerSeparator: {\n insetBlockStart: 0,\n insetInline: 0,\n paddingBlock: 0,\n paddingInline: 0,\n position: 'absolute',\n },\n workspaceMenu: {\n // The panel is the whole screen, so the menu takes the height it can get rather than\n // the desktop cap — which would leave a short list floating in a tall drawer.\n maxHeight: 'var(--available-height)',\n '& [data-slot=\"item-list\"]': { maxHeight: 'none' },\n },\n // The panel no longer clips, so a list too long for a short phone has to scroll inside\n // its own box rather than spilling over the footer below it.\n // Grows into the free space when the list is short, and keeps its full height when it is\n // not — the panel scrolls instead of the rows being squeezed.\n body: { flex: '1 0 auto', paddingBlock: '8' },\n },\n },\n },\n\n defaultVariants: {\n layout: 'rail',\n },\n});\n\nexport default uiSideNavSlotRecipe;\n"],"mappings":";;;;;;;;AASA,IAAM,uBAAuB,IAAI,EAAE;;;;;;AAOnC,IAAa,qBAAqB;AAClC,IAAM,sBAAsB,IAAI,GAAG;AACnC,IAAM,eAAe,IAAI,GAAG;;;;;AAM5B,IAAM,uBAAuB,IAAI,GAAG;;;;;;AAOpC,IAAM,UAAU,EAAE,UAAU,oBAAoB;AAEhD,IAAM,sBAAsB,iBAAiB;CAC3C,WAAW;CACX,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,MAAM;EACJ,MAAM;GACJ,YAAY;GACZ,SAAS;GACT,eAAe;GAGf,QAAQ;GAGR,UAAU;G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