@stenajs-webui/panels 15.5.1 → 15.5.4
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/CHANGELOG.md +25 -0
- package/dist/components/nav-bar/NavBar.d.ts +3 -3
- package/dist/components/nav-bar/NavBar.stories.d.ts +4 -3
- package/dist/components/nav-bar/NavBarSideMenuButton.d.ts +0 -2
- package/dist/components/nav-bar/NavbarHeightStyleUtil.d.ts +2 -0
- package/dist/components/page-header/PageHeader.d.ts +0 -2
- package/dist/components/page-header/PageHeader.stories.d.ts +2 -0
- package/dist/components/page-header/PageHeaderRow.d.ts +5 -0
- package/dist/components/page-header/PageHeading.d.ts +1 -1
- package/dist/components/sidebar-menu/SidebarMenu.d.ts +4 -0
- package/dist/components/sidebar-menu/SidebarMenuCloseButton.d.ts +0 -2
- package/dist/components/sidebar-menu/SidebarMenuLink.d.ts +10 -2
- package/dist/components/sidebar-menu/rail/SidebarRailMenu.d.ts +7 -0
- package/dist/components/sidebar-menu/rail/renderer/RailRenderer.d.ts +8 -0
- package/dist/components/sidebar-menu/rail/renderer/types.d.ts +19 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.es.js +151 -94
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +152 -91
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/dist/components/nav-bar/NavBarVariantContext.d.ts +0 -4
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useRef, useMemo,
|
|
2
|
+
import { useRef, useMemo, forwardRef, useState } from 'react';
|
|
3
3
|
import { ActionMenu, ActionMenuContext, PrimaryButton, SecondaryButton, FlatButton, Icon, stenaSearch, Banner, Spinner, ButtonContent } from '@stenajs-webui/elements';
|
|
4
|
-
import { useBoolean, Column, Box, Row, Indent, Heading, Clickable, Text, Space, SeparatorLine,
|
|
4
|
+
import { useBoolean, Column, Box, Row, Indent, Heading, Clickable, Text, Space, SeparatorLine, exhaustSwitchCaseElseThrow } from '@stenajs-webui/core';
|
|
5
5
|
import { Popover } from '@stenajs-webui/tooltip';
|
|
6
6
|
import { faAngleDown, faChevronDown } from '@fortawesome/free-solid-svg-icons';
|
|
7
7
|
import { faAngleDown as faAngleDown$1 } from '@fortawesome/free-solid-svg-icons/faAngleDown';
|
|
@@ -153,12 +153,12 @@ function styleInject(css, ref) {
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
var css_248z$9 = ".NavBar-module_navBar__HOrS3 {\n /* Theme vars */\n --swui-navbar-background-color: var(--lhds-color-blue-500);\n --swui-navbar-item-background-color-hover: var(--lhds-color-blue-700);\n --swui-navbar-item-background-color-selected: var(--lhds-color-blue-600);\n --swui-navbar-item-background-color-selected-hover: var(\n --lhds-color-blue-700\n );\n\n
|
|
157
|
-
var styles$8 = {"navBar":"NavBar-module_navBar__HOrS3"
|
|
156
|
+
var css_248z$9 = ".NavBar-module_navBar__HOrS3 {\n /* Theme vars */\n --swui-navbar-background-color: var(--lhds-color-blue-500);\n --swui-navbar-item-background-color-hover: var(--lhds-color-blue-700);\n --swui-navbar-item-background-color-selected: var(--lhds-color-blue-600);\n --swui-navbar-item-background-color-selected-hover: var(\n --lhds-color-blue-700\n );\n\n /* Styling */\n background-color: var(--swui-navbar-background-color);\n}\n";
|
|
157
|
+
var styles$8 = {"navBar":"NavBar-module_navBar__HOrS3"};
|
|
158
158
|
styleInject(css_248z$9);
|
|
159
159
|
|
|
160
|
-
var css_248z$8 = ".NavBarSideMenuButton-module_sidebarMenuButton__SlbsU {\n /* Theme vars */\n --swui-nav-bar-side-menu-button-text-color: var(--lhds-color-ui-50);\n --swui-nav-bar-side-menu-button-background-color: var(--lhds-color-blue-500);\n --swui-nav-bar-side-menu-button-background-color-hover: var(\n --lhds-color-blue-600\n );\n --swui-nav-bar-side-menu-button-background-color-focus: var(\n --lhds-color-blue-600\n );\n --swui-nav-bar-side-menu-button-background-color-active: var(\n --lhds-color-blue-700\n );\n
|
|
161
|
-
var styles$7 = {"sidebarMenuButton":"NavBarSideMenuButton-module_sidebarMenuButton__SlbsU","
|
|
160
|
+
var css_248z$8 = ".NavBarSideMenuButton-module_sidebarMenuButton__SlbsU {\n /* Theme vars */\n --swui-nav-bar-side-menu-button-text-color: var(--lhds-color-ui-50);\n --swui-nav-bar-side-menu-button-background-color: var(--lhds-color-blue-500);\n --swui-nav-bar-side-menu-button-background-color-hover: var(\n --lhds-color-blue-600\n );\n --swui-nav-bar-side-menu-button-background-color-focus: var(\n --lhds-color-blue-600\n );\n --swui-nav-bar-side-menu-button-background-color-active: var(\n --lhds-color-blue-700\n );\n\n /* State vars */\n --current-background-color: var(\n --swui-nav-bar-side-menu-button-background-color\n );\n\n /* Styling */\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 10px;\n background-color: var(--current-background-color);\n color: var(--swui-nav-bar-side-menu-button-text-color);\n cursor: pointer;\n height: var(--swui-nav-bar-height);\n width: var(--swui-nav-bar-height);\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n border-radius: 0;\n outline: none;\n border: none;\n}\n\n .NavBarSideMenuButton-module_sidebarMenuButton__SlbsU:hover {\n --current-background-color: var(\n --swui-nav-bar-side-menu-button-background-color-hover\n );\n }\n\n .NavBarSideMenuButton-module_sidebarMenuButton__SlbsU:focus-visible {\n --current-background-color: var(\n --swui-nav-bar-side-menu-button-background-color-focus\n );\n }\n\n .NavBarSideMenuButton-module_sidebarMenuButton__SlbsU:active {\n --current-background-color: var(\n --swui-nav-bar-side-menu-button-background-color-active\n );\n }\n\n .NavBarSideMenuButton-module_sidebarMenuButton__SlbsU .NavBarSideMenuButton-module_icon__Art-L {\n color: var(--swui-nav-bar-side-menu-button-text-color);\n }\n";
|
|
161
|
+
var styles$7 = {"sidebarMenuButton":"NavBarSideMenuButton-module_sidebarMenuButton__SlbsU","icon":"NavBarSideMenuButton-module_icon__Art-L"};
|
|
162
162
|
styleInject(css_248z$8);
|
|
163
163
|
|
|
164
164
|
function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
@@ -172,50 +172,57 @@ var _ref$1 = /*#__PURE__*/React.createElement("path", {
|
|
|
172
172
|
function SvgBars(props) {
|
|
173
173
|
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
|
174
174
|
xmlns: "http://www.w3.org/2000/svg",
|
|
175
|
-
width:
|
|
176
|
-
height:
|
|
175
|
+
width: 16,
|
|
176
|
+
height: 16,
|
|
177
|
+
viewBox: "0 0 24 24"
|
|
177
178
|
}, props), _ref$1);
|
|
178
179
|
}
|
|
179
180
|
|
|
180
181
|
var NavBarSideMenuButton = function (_a) {
|
|
181
|
-
var
|
|
182
|
-
return (React.createElement("button", { onClick: onClick, className: cx(styles$7.sidebarMenuButton,
|
|
182
|
+
var className = _a.className, onClick = _a.onClick;
|
|
183
|
+
return (React.createElement("button", { onClick: onClick, className: cx(styles$7.sidebarMenuButton, className) },
|
|
183
184
|
React.createElement(SvgBars, { className: styles$7.icon })));
|
|
184
185
|
};
|
|
185
186
|
|
|
186
|
-
var
|
|
187
|
-
|
|
187
|
+
var variantToHeight = {
|
|
188
|
+
compact: 40,
|
|
189
|
+
standard: 48,
|
|
190
|
+
relaxed: 64,
|
|
191
|
+
};
|
|
192
|
+
var getNavbarHeight = function (variant) {
|
|
193
|
+
return variantToHeight[variant] + "px";
|
|
194
|
+
};
|
|
188
195
|
|
|
189
196
|
var NavBar = function (_a) {
|
|
190
|
-
var _b
|
|
197
|
+
var _b;
|
|
198
|
+
var left = _a.left, className = _a.className, _c = _a.showMenuButton, showMenuButton = _c === void 0 ? false : _c, _d = _a.menuButtonVisibility, menuButtonVisibility = _d === void 0 ? "visible" : _d, children = _a.children, right = _a.right, center = _a.center, _e = _a.variant, variant = _e === void 0 ? "standard" : _e, onClickMenuButton = _a.onClickMenuButton;
|
|
191
199
|
var currentFlex = center ? 1 : undefined;
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
var css_248z$7 = ".NavBarButton-module_navBarButton__3XKjB {\n /* Theme vars */\n --swui-nav-bar-button-text-color: var(--lhds-color-ui-50);\n --swui-nav-bar-button-background-color: transparent;\n
|
|
212
|
-
var styles$6 = {"navBarButton":"NavBarButton-module_navBarButton__3XKjB","
|
|
200
|
+
var height = getNavbarHeight(variant);
|
|
201
|
+
return (React.createElement(Row, { height: height, minHeight: height, justifyContent: "space-between", style: (_b = {}, _b["--swui-nav-bar-height"] = height, _b), className: cx(styles$8.navBar, className) },
|
|
202
|
+
React.createElement(Row, { flex: currentFlex, justifyContent: "flex-start", alignItems: "center" },
|
|
203
|
+
showMenuButton ? (React.createElement(React.Fragment, null,
|
|
204
|
+
menuButtonVisibility === "hidden" ? (React.createElement(Box, { width: "var(--swui-nav-bar-height)" })) : (React.createElement(NavBarSideMenuButton, { onClick: onClickMenuButton })),
|
|
205
|
+
React.createElement(Indent, null))) : (React.createElement(Indent, { num: 2 })),
|
|
206
|
+
left ? (React.createElement(React.Fragment, null,
|
|
207
|
+
left,
|
|
208
|
+
React.createElement(Indent, { num: 2 }))) : (React.createElement(Indent, { num: 2 })),
|
|
209
|
+
children && (React.createElement(React.Fragment, null,
|
|
210
|
+
React.createElement(Row, { justifyContent: "center", alignItems: "center" }, React.Children.map(children, function (child, index) { return (React.createElement(React.Fragment, null,
|
|
211
|
+
index > 0 && React.createElement(Indent, null),
|
|
212
|
+
child)); }))))),
|
|
213
|
+
center && (React.createElement(Row, { justifyContent: "center", alignItems: "center" }, center)),
|
|
214
|
+
React.createElement(Row, { justifyContent: "flex-end", alignItems: "center", flex: currentFlex },
|
|
215
|
+
right,
|
|
216
|
+
React.createElement(Indent, { num: 2 }))));
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
var css_248z$7 = ".NavBarButton-module_navBarButton__3XKjB {\n /* Theme vars */\n --swui-nav-bar-button-text-color: var(--lhds-color-ui-50);\n --swui-nav-bar-button-background-color: transparent;\n --swui-nav-bar-button-background-color-hover: var(--lhds-color-blue-900);\n --swui-nav-bar-button-background-color-focus: var(--lhds-color-blue-700);\n --swui-nav-bar-button-background-color-active: var(--lhds-color-blue-800);\n --swui-nav-bar-button-background-color-selected: var(--lhds-color-blue-600);\n --swui-nav-bar-button-background-color-selected-hover: var(\n --lhds-color-blue-700\n );\n --swui-nav-bar-button-background-color-selected-focus: var(\n --lhds-color-blue-700\n );\n --swui-nav-bar-button-background-color-selected-active: var(\n --lhds-color-blue-800\n );\n\n /* Flatbutton overrrides */\n --swui-flat-button-text-color: var(--swui-nav-bar-button-text-color);\n --swui-flat-button-icon-color: var(--swui-nav-bar-button-text-color);\n --swui-flat-button-text-color-active: var(--swui-nav-bar-button-text-color);\n --swui-flat-button-background-color: var(\n --swui-nav-bar-button-background-color\n );\n --swui-flat-button-background-color-hover: var(\n --swui-nav-bar-button-background-color-hover\n );\n --swui-flat-button-background-color-focus: var(\n --swui-nav-bar-button-background-color-focus\n );\n --swui-flat-button-background-color-active: var(\n --swui-nav-bar-button-background-color-active\n );\n}\n\n .NavBarButton-module_navBarButton__3XKjB.NavBarButton-module_selected__1ReDE {\n --swui-flat-button-background-color: var(\n --swui-nav-bar-button-background-color-selected\n );\n --swui-flat-button-background-color-hover: var(\n --swui-nav-bar-button-background-color-selected-hover\n );\n --swui-flat-button-background-color-focus: var(\n --swui-nav-bar-button-background-color-selected-focus\n );\n --swui-flat-button-background-color-active: var(\n --swui-nav-bar-button-background-color-selected-active\n );\n }\n";
|
|
220
|
+
var styles$6 = {"navBarButton":"NavBarButton-module_navBarButton__3XKjB","selected":"NavBarButton-module_selected__1ReDE"};
|
|
213
221
|
styleInject(css_248z$7);
|
|
214
222
|
|
|
215
223
|
var NavBarButton = function (_a) {
|
|
216
224
|
var selected = _a.selected, className = _a.className, buttonProps = __rest(_a, ["selected", "className"]);
|
|
217
|
-
|
|
218
|
-
return (React.createElement(FlatButton, __assign({}, buttonProps, { className: cx(styles$6.navBarButton, styles$6[variant], selected && styles$6.selected, className) })));
|
|
225
|
+
return (React.createElement(FlatButton, __assign({}, buttonProps, { className: cx(styles$6.navBarButton, selected && styles$6.selected, className) })));
|
|
219
226
|
};
|
|
220
227
|
|
|
221
228
|
var NavBarHeading = function (headingProps) {
|
|
@@ -231,14 +238,13 @@ var NavBarPopoverButton = function (_a) {
|
|
|
231
238
|
React.createElement(NavBarButton, __assign({}, navBarButtonProps, { onClick: open }))));
|
|
232
239
|
};
|
|
233
240
|
|
|
234
|
-
var css_248z$6 = ".NavBarSearchField-module_navBarSearchFieldInput__2kThv {\n --swui-textinput-line-height: 27px;\n --swui-textinput-text-color: var(--lhds-color-ui-50);\n}\n\n .NavBarSearchField-module_navBarSearchFieldInput__2kThv:focus {\n --swui-textinput-text-color: var(--lhds-color-ui-800);\n }\n\n.NavBarSearchField-module_navBarSearchField__kIe66 {\n --swui-textinput-animation-time: var(--swui-animation-time-fast);\n
|
|
235
|
-
var styles$5 = {"navBarSearchFieldInput":"NavBarSearchField-module_navBarSearchFieldInput__2kThv","navBarSearchField":"NavBarSearchField-module_navBarSearchField__kIe66"
|
|
241
|
+
var css_248z$6 = ".NavBarSearchField-module_navBarSearchFieldInput__2kThv {\n --swui-textinput-line-height: 27px;\n --swui-textinput-text-color: var(--lhds-color-ui-50);\n}\n\n .NavBarSearchField-module_navBarSearchFieldInput__2kThv:focus {\n --swui-textinput-text-color: var(--lhds-color-ui-800);\n }\n\n.NavBarSearchField-module_navBarSearchField__kIe66 {\n --swui-textinput-animation-time: var(--swui-animation-time-fast);\n\n --swui-textinput-placeholder-color: var(--lhds-color-ui-500);\n --swui-textinput-bg-color: var(--lhds-color-blue-600);\n --swui-textinput-border-color: transparent;\n --swui-textinput-border-color-hover: transparent;\n}\n\n.NavBarSearchField-module_navBarSearchField__kIe66:focus-within {\n --swui-textinput-text-color: var(--lhds-color-ui-800);\n --swui-field-text-color: var(--swui-field-text-color);\n --swui-textinput-icon-color: var(--lhds-color-ui-500);\n --swui-textinput-bg-color: var(--lhds-color-ui-50);\n }\n";
|
|
242
|
+
var styles$5 = {"navBarSearchFieldInput":"NavBarSearchField-module_navBarSearchFieldInput__2kThv","navBarSearchField":"NavBarSearchField-module_navBarSearchField__kIe66"};
|
|
236
243
|
styleInject(css_248z$6);
|
|
237
244
|
|
|
238
245
|
var NavBarSearchField = function (_a) {
|
|
239
246
|
var _b = _a.placeholder, placeholder = _b === void 0 ? "Search..." : _b, className = _a.className, wrapperClassName = _a.wrapperClassName, textInputProps = __rest(_a, ["placeholder", "className", "wrapperClassName"]);
|
|
240
|
-
|
|
241
|
-
return (React.createElement(TextInput, __assign({ wrapperClassName: cx(styles$5.navBarSearchField, styles$5[variant], wrapperClassName), className: cx(styles$5.navBarSearchFieldInput, className), placeholder: placeholder, contentRight: React.createElement(Clickable, null,
|
|
247
|
+
return (React.createElement(TextInput, __assign({ wrapperClassName: cx(styles$5.navBarSearchField, wrapperClassName), className: cx(styles$5.navBarSearchFieldInput, className), placeholder: placeholder, contentRight: React.createElement(Clickable, null,
|
|
242
248
|
React.createElement(Icon, { icon: stenaSearch })) }, textInputProps)));
|
|
243
249
|
};
|
|
244
250
|
|
|
@@ -277,7 +283,7 @@ var Notification = function (_a) {
|
|
|
277
283
|
React.createElement(Text, { size: "small", color: cssColor("--swui-text-disabled-color") }, agoLabel))))));
|
|
278
284
|
};
|
|
279
285
|
|
|
280
|
-
var css_248z$5 = ".Collapsible-module_collapsible__2Nn8K {\n --swui-collapsible-animation-time: var(--swui-animation-time-fast);\n\n --swui-collapsible-expanded-line-background-color: var(\n --swui-primary-action-color\n );\n\n /*\n * Header\n */\n --swui-collapsible-header-text-color: var(--lhds-color-ui-900);\n --swui-collapsible-header-background-color: var(--swui-white);\n --swui-collapsible-header-background-color-hover: var(--lhds-color-blue-100);\n --swui-collapsible-header-background-color-active: var(--lhds-color-blue-100);\n --swui-collapsible-header-border-color: var(--lhds-color-ui-300);\n --swui-collapsible-header-border-color-focus: var(\n --swui-primary-action-color\n );\n --swui-collapsible-header-focus-shadow: var(--swui-field-focus-shadow);\n --swui-collapsible-header-content-margin: calc(\n var(--swui-metrics-indent) * 2\n );\n --swui-collapsible-header-font-weight: var(--swui-font-weight-text-bold);\n --swui-collapsible-header-indicator-color: var(--swui-primary-action-color);\n --swui-collapsible-header-indicator-color-collapsed: var(--lhds-color-ui-500);\n --swui-collapsible-header-indicator-color-hover: var(\n --swui-primary-action-color\n );\n --swui-collapsible-header-padding: 0 calc(var(--swui-metrics-indent) * 2) 0;\n\n /*\n * Content\n */\n --swui-collapsible-content-background-color: var(--lhds-color-ui-100);\n --swui-collapsible-content-border-color: var(--lhds-color-ui-300);\n --swui-collapsible-content-padding: var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 2);\n\n --swui-collapsible-groupheading-font-size: var(--swui-font-size-smaller);\n --swui-collapsible-groupheading-text-color: var(--lhds-color-ui-600);\n\n --swui-collapsible-min-height: 40px;\n}\n\n /* Header */\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_header__IZx0y {\n background-color: var(--swui-collapsible-header-background-color);\n width: 100%;\n text-align: left;\n\n min-height: var(--swui-collapsible-min-height);\n box-sizing: border-box;\n display: -webkit-flex;\n display: flex;\n -webkit-justify-content: space-between;\n justify-content: space-between;\n -webkit-align-items: center;\n align-items: center;\n border-bottom: 1px solid var(--swui-collapsible-header-border-color);\n padding: var(--swui-collapsible-header-padding);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_header__IZx0y .Collapsible-module_indicator__3YBhK {\n transition: all var(--swui-collapsible-animation-time) ease-in-out;\n margin-left: var(--swui-collapsible-header-content-margin);\n color: var(--swui-collapsible-header-indicator-color);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_header__IZx0y:not(:disabled):hover:not(:active) {\n background-color: var(--swui-collapsible-header-background-color-hover);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_header__IZx0y:not(:disabled):hover:not(:active) .Collapsible-module_indicator__3YBhK {\n color: var(--swui-collapsible-header-indicator-color-hover);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_header__IZx0y:focus-visible {\n outline: 1px solid var(--swui-collapsible-header-border-color-focus);\n outline-offset: -1px;\n box-shadow: var(--swui-collapsible-header-focus-shadow);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_header__IZx0y:active {\n background: var(--swui-collapsible-header-background-color-active);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_header__IZx0y:disabled {\n cursor: not-allowed;\n }\n\n .Collapsible-module_collapsible__2Nn8K {\n\n position: relative;\n}\n\n .Collapsible-module_collapsible__2Nn8K::before {\n content: \"\";\n position: absolute;\n width: 2px;\n background: var(--swui-collapsible-expanded-line-background-color);\n top: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_headerText__2qjzx {\n font-weight: var(--swui-collapsible-header-font-weight);\n }\n\n .Collapsible-module_collapsible__2Nn8K[aria-expanded=\"false\"] {\n --swui-collapsible-expanded-line-background-color: transparent;\n }\n\n .Collapsible-module_collapsible__2Nn8K[aria-expanded=\"false\"] .Collapsible-module_indicator__3YBhK {\n color: var(--swui-collapsible-header-indicator-color-collapsed);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_label__Hpp-R {\n margin-right: auto;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_label__Hpp-R span {\n --current-line-height: 1;\n font-weight: var(--swui-collapsible-header-font-weight);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentLeft__2gPpu,\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentRight__bTr59 {\n display: -webkit-flex;\n display: flex;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentLeft__2gPpu button, .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentRight__bTr59 button {\n cursor: pointer;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentLeft__2gPpu {\n margin-right: var(--swui-collapsible-header-content-margin);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentRight__bTr59 {\n margin-left: auto;\n }\n\n /* Content */\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_content__1e1C8 {\n display: -webkit-flex;\n display: flex;\n -webkit-align-items: center;\n align-items: center;\n -webkit-justify-content: stretch;\n justify-content: stretch;\n background: var(--swui-collapsible-content-background-color);\n padding: var(--swui-collapsible-content-padding);\n min-height: var(--swui-collapsible-min-height);\n box-sizing: border-box;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_content__1e1C8:last-child {\n border-bottom: 1px solid var(--swui-collapsible-content-border-color);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_content__1e1C8.Collapsible-module_groupHeading__3BK-5 {\n border: none;\n font-size: var(--swui-collapsible-groupheading-font-size);\n font-family: var(--swui-font-primary);\n color: var(--swui-collapsible-groupheading-text-color);\n text-transform: uppercase;\n font-weight: var(--swui-font-weight-text-bold);\n letter-spacing: 1px;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_content__1e1C8 [data-hidden=\"true\"] {\n display: none;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_content__1e1C8:hover [data-hidden=\"true\"] {\n display: inherit;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_content__1e1C8:hover [data-hover=\"true\"] {\n color: var(--swui-collapsible-header-indicator-color-hover);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentEnter__GWHoW {\n opacity: 0;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentEnterActive__1YdNi {\n opacity: 1;\n transition: opacity var(--swui-collapsible-animation-time) ease-in-out;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentExitDone__35Iht {\n display: none;\n }\n\n /** Clickable content */\n\n .Collapsible-module_collapsible__2Nn8K button.Collapsible-module_content__1e1C8 {\n font-family: var(--swui-font-primary);\n font-size: inherit;\n width: 100%;\n text-align: left;\n }\n\n .Collapsible-module_collapsible__2Nn8K button.Collapsible-module_content__1e1C8:focus-visible {\n outline: 1px solid var(--swui-collapsible-header-border-color-focus);\n outline-offset: -1px;\n box-shadow: var(--swui-collapsible-header-focus-shadow);\n }\n\n .Collapsible-module_collapsible__2Nn8K button.Collapsible-module_content__1e1C8:not(:disabled):hover {\n background-color: var(--swui-collapsible-header-background-color-hover);\n }\n\n .Collapsible-module_collapsible__2Nn8K button.Collapsible-module_content__1e1C8:disabled {\n cursor: not-allowed;\n }\n\n .Collapsible-module_collapsible__2Nn8K button.Collapsible-module_content__1e1C8:focus-within [data-hidden=\"true\"] {\n display: inherit;\n }\n\n /* Remove header background color if not at the highest level */\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K {\n --swui-collapsible-header-background-color: var(\n --swui-collapsible-content-background-color\n );\n --swui-collapsible-header-font-weight: normal;\n }\n\n /* Increase padding with depth */\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K {\n --swui-collapsible-content-padding: var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 2) var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 4);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K {\n --swui-collapsible-header-padding: 0 calc(var(--swui-metrics-indent) * 2) 0\n calc(var(--swui-metrics-indent) * 4);\n --swui-collapsible-content-padding: var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 2) var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 6);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K {\n --swui-collapsible-header-padding: 0 calc(var(--swui-metrics-indent) * 2) 0\n calc(var(--swui-metrics-indent) * 6);\n --swui-collapsible-content-padding: var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 2) var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 8);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K {\n --swui-collapsible-header-padding: 0 calc(var(--swui-metrics-indent) * 2) 0\n calc(var(--swui-metrics-indent) * 8);\n --swui-collapsible-content-padding: var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 2) var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 10);\n }\n";
|
|
286
|
+
var css_248z$5 = ".Collapsible-module_collapsible__2Nn8K {\n --swui-collapsible-animation-time: var(--swui-animation-time-fast);\n\n --swui-collapsible-expanded-line-background-color: var(\n --swui-primary-action-color\n );\n\n /*\n * Header\n */\n --swui-collapsible-header-text-color: var(--lhds-color-ui-900);\n --swui-collapsible-header-background-color: var(--swui-white);\n --swui-collapsible-header-background-color-hover: var(--lhds-color-blue-100);\n --swui-collapsible-header-background-color-active: var(--lhds-color-blue-100);\n --swui-collapsible-header-border-color: var(--lhds-color-ui-300);\n --swui-collapsible-header-border-color-focus: var(\n --swui-primary-action-color\n );\n --swui-collapsible-header-focus-shadow: var(--swui-field-focus-shadow);\n --swui-collapsible-header-content-margin: calc(\n var(--swui-metrics-indent) * 2\n );\n --swui-collapsible-header-font-weight: var(--swui-font-weight-text-bold);\n --swui-collapsible-header-indicator-color: var(--swui-primary-action-color);\n --swui-collapsible-header-indicator-color-collapsed: var(--lhds-color-ui-500);\n --swui-collapsible-header-indicator-color-hover: var(\n --swui-primary-action-color\n );\n --swui-collapsible-header-padding: 0 calc(var(--swui-metrics-indent) * 2) 0;\n\n /*\n * Content\n */\n --swui-collapsible-content-background-color: var(--lhds-color-ui-100);\n --swui-collapsible-content-border-color: var(--lhds-color-ui-300);\n --swui-collapsible-content-padding: var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 2);\n\n --swui-collapsible-groupheading-font-size: var(--swui-font-size-smaller);\n --swui-collapsible-groupheading-text-color: var(--lhds-color-ui-600);\n\n --swui-collapsible-min-height: 40px;\n}\n\n /* Header */\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_header__IZx0y {\n background-color: var(--swui-collapsible-header-background-color);\n width: 100%;\n text-align: left;\n\n min-height: var(--swui-collapsible-min-height);\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--swui-collapsible-header-border-color);\n padding: var(--swui-collapsible-header-padding);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_header__IZx0y .Collapsible-module_indicator__3YBhK {\n transition: all var(--swui-collapsible-animation-time) ease-in-out;\n margin-left: var(--swui-collapsible-header-content-margin);\n color: var(--swui-collapsible-header-indicator-color);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_header__IZx0y:not(:disabled):hover:not(:active) {\n background-color: var(--swui-collapsible-header-background-color-hover);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_header__IZx0y:not(:disabled):hover:not(:active) .Collapsible-module_indicator__3YBhK {\n color: var(--swui-collapsible-header-indicator-color-hover);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_header__IZx0y:focus-visible {\n outline: 1px solid var(--swui-collapsible-header-border-color-focus);\n outline-offset: -1px;\n box-shadow: var(--swui-collapsible-header-focus-shadow);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_header__IZx0y:active {\n background: var(--swui-collapsible-header-background-color-active);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_header__IZx0y:disabled {\n cursor: not-allowed;\n }\n\n .Collapsible-module_collapsible__2Nn8K {\n\n position: relative;\n}\n\n .Collapsible-module_collapsible__2Nn8K::before {\n content: \"\";\n position: absolute;\n width: 2px;\n background: var(--swui-collapsible-expanded-line-background-color);\n top: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_headerText__2qjzx {\n font-weight: var(--swui-collapsible-header-font-weight);\n }\n\n .Collapsible-module_collapsible__2Nn8K[aria-expanded=\"false\"] {\n --swui-collapsible-expanded-line-background-color: transparent;\n }\n\n .Collapsible-module_collapsible__2Nn8K[aria-expanded=\"false\"] .Collapsible-module_indicator__3YBhK {\n color: var(--swui-collapsible-header-indicator-color-collapsed);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_label__Hpp-R {\n margin-right: auto;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_label__Hpp-R span {\n --current-line-height: 1;\n font-weight: var(--swui-collapsible-header-font-weight);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentLeft__2gPpu,\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentRight__bTr59 {\n display: flex;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentLeft__2gPpu button, .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentRight__bTr59 button {\n cursor: pointer;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentLeft__2gPpu {\n margin-right: var(--swui-collapsible-header-content-margin);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentRight__bTr59 {\n margin-left: auto;\n }\n\n /* Content */\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_content__1e1C8 {\n display: flex;\n align-items: center;\n justify-content: stretch;\n background: var(--swui-collapsible-content-background-color);\n padding: var(--swui-collapsible-content-padding);\n min-height: var(--swui-collapsible-min-height);\n box-sizing: border-box;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_content__1e1C8:last-child {\n border-bottom: 1px solid var(--swui-collapsible-content-border-color);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_content__1e1C8.Collapsible-module_groupHeading__3BK-5 {\n border: none;\n font-size: var(--swui-collapsible-groupheading-font-size);\n font-family: var(--swui-font-primary);\n color: var(--swui-collapsible-groupheading-text-color);\n text-transform: uppercase;\n font-weight: var(--swui-font-weight-text-bold);\n letter-spacing: 1px;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_content__1e1C8 [data-hidden=\"true\"] {\n display: none;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_content__1e1C8:hover [data-hidden=\"true\"] {\n display: inherit;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_content__1e1C8:hover [data-hover=\"true\"] {\n color: var(--swui-collapsible-header-indicator-color-hover);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentEnter__GWHoW {\n opacity: 0;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentEnterActive__1YdNi {\n opacity: 1;\n transition: opacity var(--swui-collapsible-animation-time) ease-in-out;\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_contentExitDone__35Iht {\n display: none;\n }\n\n /** Clickable content */\n\n .Collapsible-module_collapsible__2Nn8K button.Collapsible-module_content__1e1C8 {\n font-family: var(--swui-font-primary);\n font-size: inherit;\n width: 100%;\n text-align: left;\n }\n\n .Collapsible-module_collapsible__2Nn8K button.Collapsible-module_content__1e1C8:focus-visible {\n outline: 1px solid var(--swui-collapsible-header-border-color-focus);\n outline-offset: -1px;\n box-shadow: var(--swui-collapsible-header-focus-shadow);\n }\n\n .Collapsible-module_collapsible__2Nn8K button.Collapsible-module_content__1e1C8:not(:disabled):hover {\n background-color: var(--swui-collapsible-header-background-color-hover);\n }\n\n .Collapsible-module_collapsible__2Nn8K button.Collapsible-module_content__1e1C8:disabled {\n cursor: not-allowed;\n }\n\n .Collapsible-module_collapsible__2Nn8K button.Collapsible-module_content__1e1C8:focus-within [data-hidden=\"true\"] {\n display: inherit;\n }\n\n /* Remove header background color if not at the highest level */\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K {\n --swui-collapsible-header-background-color: var(\n --swui-collapsible-content-background-color\n );\n --swui-collapsible-header-font-weight: normal;\n }\n\n /* Increase padding with depth */\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K {\n --swui-collapsible-content-padding: var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 2) var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 4);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K {\n --swui-collapsible-header-padding: 0 calc(var(--swui-metrics-indent) * 2) 0\n calc(var(--swui-metrics-indent) * 4);\n --swui-collapsible-content-padding: var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 2) var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 6);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K {\n --swui-collapsible-header-padding: 0 calc(var(--swui-metrics-indent) * 2) 0\n calc(var(--swui-metrics-indent) * 6);\n --swui-collapsible-content-padding: var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 2) var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 8);\n }\n\n .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K .Collapsible-module_collapsible__2Nn8K {\n --swui-collapsible-header-padding: 0 calc(var(--swui-metrics-indent) * 2) 0\n calc(var(--swui-metrics-indent) * 8);\n --swui-collapsible-content-padding: var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 2) var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 10);\n }\n";
|
|
281
287
|
var styles$4 = {"collapsible":"Collapsible-module_collapsible__2Nn8K","header":"Collapsible-module_header__IZx0y","indicator":"Collapsible-module_indicator__3YBhK","headerText":"Collapsible-module_headerText__2qjzx","label":"Collapsible-module_label__Hpp-R","contentLeft":"Collapsible-module_contentLeft__2gPpu","contentRight":"Collapsible-module_contentRight__bTr59","content":"Collapsible-module_content__1e1C8","groupHeading":"Collapsible-module_groupHeading__3BK-5","contentEnter":"Collapsible-module_contentEnter__GWHoW","contentEnterActive":"Collapsible-module_contentEnterActive__1YdNi","contentExitDone":"Collapsible-module_contentExitDone__35Iht"};
|
|
282
288
|
styleInject(css_248z$5);
|
|
283
289
|
|
|
@@ -374,7 +380,6 @@ var LoadingScreen = function (props) {
|
|
|
374
380
|
React.createElement(LoadingPanel, __assign({}, props))));
|
|
375
381
|
};
|
|
376
382
|
|
|
377
|
-
var PageHeaderRow = function (props) { return (React.createElement(Row, __assign({ indent: 3, spacing: true }, props))); };
|
|
378
383
|
var PageHeader = function (_a) {
|
|
379
384
|
var renderBreadCrumbs = _a.renderBreadCrumbs, renderPageHeading = _a.renderPageHeading, renderTabs = _a.renderTabs, children = _a.children;
|
|
380
385
|
return (React.createElement(Box, { shadow: "box" },
|
|
@@ -383,73 +388,102 @@ var PageHeader = function (_a) {
|
|
|
383
388
|
renderPageHeading(), renderTabs === null || renderTabs === void 0 ? void 0 :
|
|
384
389
|
renderTabs()),
|
|
385
390
|
children && (React.createElement(React.Fragment, null,
|
|
391
|
+
!renderTabs && React.createElement(Space, null),
|
|
386
392
|
React.createElement(SeparatorLine, null),
|
|
387
393
|
children))));
|
|
388
394
|
};
|
|
389
395
|
|
|
396
|
+
var PageHeaderRow = function (props) { return (React.createElement(Row, __assign({ indent: 3, spacing: true }, props))); };
|
|
397
|
+
|
|
390
398
|
var variantToSpacing = {
|
|
391
399
|
compact: 1,
|
|
392
|
-
|
|
400
|
+
standard: 1.5,
|
|
393
401
|
relaxed: 2,
|
|
394
402
|
};
|
|
395
403
|
var PageHeading = function (_a) {
|
|
396
|
-
var heading = _a.heading, _b = _a.variant, variant = _b === void 0 ? "
|
|
404
|
+
var heading = _a.heading, _b = _a.variant, variant = _b === void 0 ? "standard" : _b, contentLeft = _a.contentLeft, contentRight = _a.contentRight;
|
|
397
405
|
return (React.createElement(Row, { spacing: variantToSpacing[variant], alignItems: "center", gap: 2 },
|
|
398
406
|
React.createElement(Heading, { variant: "h3" }, heading),
|
|
399
407
|
React.createElement(Row, { alignItems: "center" }, contentLeft),
|
|
400
408
|
React.createElement(Row, { style: { marginLeft: "auto" }, alignItems: "center" }, contentRight)));
|
|
401
409
|
};
|
|
402
410
|
|
|
403
|
-
var css_248z$4 = ".SidebarMenu-module_sidebarMenu__3IOkS {\n /* Theme vars */\n --swui-sidebar-menu-separator-color: var(--lhds-color-blue-700);\n --swui-sidebar-menu-text-color: var(--swui-white);\n --swui-sidebar-menu-icon-color: var(--swui-white);\n --swui-sidebar-menu-background-color: var(--lhds-color-blue-
|
|
411
|
+
var css_248z$4 = ".SidebarMenu-module_sidebarMenu__3IOkS {\n /* Theme vars */\n --swui-sidebar-menu-separator-color: var(--lhds-color-blue-700);\n --swui-sidebar-menu-text-color: var(--swui-white);\n --swui-sidebar-menu-icon-color: var(--swui-white);\n --swui-sidebar-menu-background-color: var(--lhds-color-blue-500);\n --swui-sidebar-menu-background-color-hover: var(--lhds-color-blue-700);\n --swui-sidebar-menu-background-color-focus: var(--lhds-color-blue-700);\n --swui-sidebar-menu-background-color-active: var(--lhds-color-blue-600);\n --swui-sidebar-menu-item-selected: var(--lhds-color-blue-800);\n --swui-sidebar-menu-content-padding: var(--swui-metrics-indent)\n var(--swui-metrics-indent) var(--swui-metrics-indent) 0;\n\n /* State vars */\n --current-separator-color: var(--swui-sidebar-menu-separator-color);\n --current-text-color: var(--swui-sidebar-menu-text-color);\n --current-icon-color: var(--swui-sidebar-menu-icon-color);\n --current-background-color: var(--swui-sidebar-menu-background-color);\n --current-background-color-hover: var(\n --swui-sidebar-menu-background-color-hover\n );\n --current-background-color-focus: var(\n --swui-sidebar-menu-background-color-focus\n );\n --current-background-color-active: var(\n --swui-sidebar-menu-background-color-active\n );\n --current-item-selected: var(--swui-sidebar-menu-item-selected);\n --current-content-padding: var(--swui-sidebar-menu-content-padding);\n\n /* Styling */\n\n background-color: var(--current-background-color);\n height: 100vh;\n}\n\n .SidebarMenu-module_sidebarMenu__3IOkS[data-collapsed] {\n width: var(--swui-sidebar-menu-item-height);\n }\n\n .SidebarMenu-module_sidebarMenu__3IOkS button {\n --swui-button-text-color: var(--swui-white);\n --swui-button-background-color-hover: var(\n --swui-sidebar-menu-background-color-hover\n );\n }\n";
|
|
404
412
|
var styles$3 = {"sidebarMenu":"SidebarMenu-module_sidebarMenu__3IOkS"};
|
|
405
413
|
styleInject(css_248z$4);
|
|
406
414
|
|
|
407
|
-
var css_248z$3 = ".SidebarMenuCloseButton-module_sidebarMenuCloseButton__1h_pt {\n /* Theme vars */\n --swui-sidebar-menu-close-button-text-color: var(--lhds-color-ui-50);\n --swui-sidebar-menu-close-button-background-color: var(--lhds-color-blue-500);\n --swui-sidebar-menu-close-button-background-color-hover: var(\n --lhds-color-blue-600\n );\n --swui-sidebar-menu-close-button-background-color-focus: var(\n --lhds-color-blue-600\n );\n --swui-sidebar-menu-close-button-background-color-active: var(\n --lhds-color-blue-500\n );\n
|
|
408
|
-
var styles$2 = {"sidebarMenuCloseButton":"SidebarMenuCloseButton-module_sidebarMenuCloseButton__1h_pt","
|
|
415
|
+
var css_248z$3 = ".SidebarMenuCloseButton-module_sidebarMenuCloseButton__1h_pt {\n /* Theme vars */\n --swui-sidebar-menu-close-button-text-color: var(--lhds-color-ui-50);\n --swui-sidebar-menu-close-button-background-color: var(--lhds-color-blue-500);\n --swui-sidebar-menu-close-button-background-color-hover: var(\n --lhds-color-blue-600\n );\n --swui-sidebar-menu-close-button-background-color-focus: var(\n --lhds-color-blue-600\n );\n --swui-sidebar-menu-close-button-background-color-active: var(\n --lhds-color-blue-500\n );\n\n /* Current */\n --current-background-color: var(\n --swui-sidebar-menu-close-button-background-color\n );\n\n /* Styling */\n\n display: flex;\n align-items: center;\n justify-content: flex-start;\n line-height: 10px;\n background-color: var(--current-background-color);\n color: var(--swui-sidebar-menu-close-button-text-color);\n cursor: pointer;\n height: var(--swui-sidebar-menu-item-height);\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n border-radius: 0;\n outline: none;\n border: none;\n}\n\n .SidebarMenuCloseButton-module_sidebarMenuCloseButton__1h_pt:hover {\n --current-background-color: var(\n --swui-sidebar-menu-close-button-background-color-hover\n );\n }\n\n .SidebarMenuCloseButton-module_sidebarMenuCloseButton__1h_pt:focus {\n --current-background-color: var(\n --swui-sidebar-menu-close-button-background-color-focus\n );\n }\n\n .SidebarMenuCloseButton-module_sidebarMenuCloseButton__1h_pt:active {\n --current-background-color: var(\n --swui-sidebar-menu-close-button-background-color-active\n );\n }\n\n .SidebarMenuCloseButton-module_sidebarMenuCloseButton__1h_pt .SidebarMenuCloseButton-module_iconWrapper__2nLkY {\n justify-content: center;\n align-items: center;\n width: var(--swui-sidebar-menu-item-height);\n height: var(--swui-sidebar-menu-item-height);\n }\n\n .SidebarMenuCloseButton-module_sidebarMenuCloseButton__1h_pt .SidebarMenuCloseButton-module_icon__1lPJE {\n color: var(--swui-sidebar-menu-close-button-text-color);\n }\n";
|
|
416
|
+
var styles$2 = {"sidebarMenuCloseButton":"SidebarMenuCloseButton-module_sidebarMenuCloseButton__1h_pt","iconWrapper":"SidebarMenuCloseButton-module_iconWrapper__2nLkY","icon":"SidebarMenuCloseButton-module_icon__1lPJE"};
|
|
409
417
|
styleInject(css_248z$3);
|
|
410
418
|
|
|
411
419
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
412
420
|
|
|
413
|
-
var _ref = /*#__PURE__*/React.createElement("
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
}
|
|
417
|
-
d: "M18.364 19.778L4.222 5.636c.085.085.105-.105 0 0l1.414-1.414c-.105.105.085.085 0 0l14.142 14.142c-.085-.085-.105.105 0 0l-1.414 1.414c.105-.105-.085-.085 0 0z"
|
|
418
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
419
|
-
d: "M19.778 5.636L5.636 19.778c.085-.085-.105-.105 0 0l-1.414-1.414c.105.105.085-.085 0 0L18.364 4.222c-.085.085.105.105 0 0l1.414 1.414c-.105-.105-.085.085 0 0z"
|
|
420
|
-
}));
|
|
421
|
+
var _ref = /*#__PURE__*/React.createElement("path", {
|
|
422
|
+
d: "M.929.929a1 1 0 011.414 0L8 6.585 13.657.929a1 1 0 011.414 1.414L9.415 8l5.656 5.657a1 1 0 01.083 1.32l-.083.094a1 1 0 01-1.414 0L8 9.415l-5.657 5.656A1 1 0 11.93 13.657L6.585 8 .929 2.343a1 1 0 01-.083-1.32z",
|
|
423
|
+
fill: "#FFF"
|
|
424
|
+
});
|
|
421
425
|
|
|
422
426
|
function SvgClose(props) {
|
|
423
427
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
428
|
+
width: 16,
|
|
429
|
+
height: 16,
|
|
430
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
427
431
|
}, props), _ref);
|
|
428
432
|
}
|
|
429
433
|
|
|
430
434
|
var SidebarMenuCloseButton = function (_a) {
|
|
431
|
-
var className = _a.className, onClick = _a.onClick
|
|
432
|
-
return (React.createElement("button", { onClick: onClick, className: cx(styles$2.sidebarMenuCloseButton, className
|
|
433
|
-
React.createElement(
|
|
435
|
+
var className = _a.className, onClick = _a.onClick;
|
|
436
|
+
return (React.createElement("button", { onClick: onClick, className: cx(styles$2.sidebarMenuCloseButton, className) },
|
|
437
|
+
React.createElement(Box, { className: styles$2.iconWrapper },
|
|
438
|
+
React.createElement(SvgClose, { className: styles$2.icon }))));
|
|
434
439
|
};
|
|
435
440
|
|
|
436
|
-
|
|
441
|
+
var SidebarMenuSeparator = function (separatorLineProps) { return (React.createElement(SeparatorLine, __assign({ color: cssColor("--lhds-color-blue-600") }, separatorLineProps))); };
|
|
442
|
+
|
|
437
443
|
var SidebarMenu = function (_a) {
|
|
438
|
-
var
|
|
439
|
-
|
|
444
|
+
var _b;
|
|
445
|
+
var className = _a.className, children = _a.children, onCloseClick = _a.onCloseClick, _c = _a.collapsed, collapsed = _c === void 0 ? false : _c, _d = _a.hideCloseButton, hideCloseButton = _d === void 0 ? false : _d, _e = _a.variant, variant = _e === void 0 ? "standard" : _e, boxProps = __rest(_a, ["className", "children", "onCloseClick", "collapsed", "hideCloseButton", "variant"]);
|
|
446
|
+
var height = getNavbarHeight(variant);
|
|
447
|
+
return (React.createElement(Box, __assign({ className: cx(styles$3.sidebarMenu, collapsed ? styles$3.collapsed : null, className), style: (_b = {},
|
|
448
|
+
_b["--swui-sidebar-menu-item-height"] = height,
|
|
449
|
+
_b["--swui-nav-bar-height"] = height,
|
|
450
|
+
_b), "data-collapsed": collapsed || undefined }, boxProps),
|
|
440
451
|
!hideCloseButton && (React.createElement(React.Fragment, null,
|
|
441
|
-
React.createElement(
|
|
442
|
-
|
|
443
|
-
React.createElement(SeparatorLine, { color: cssColor("--lhds-color-blue-700") }),
|
|
452
|
+
React.createElement(SidebarMenuCloseButton, { onClick: onCloseClick }),
|
|
453
|
+
React.createElement(SidebarMenuSeparator, null),
|
|
444
454
|
React.createElement(Space, null))),
|
|
445
|
-
React.createElement(Box, { className: styles$3.sidebarMenuContent, background: "var(--
|
|
446
|
-
React.createElement(Column, {
|
|
455
|
+
React.createElement(Box, { className: styles$3.sidebarMenuContent, height: "100%", background: "var(--current-background-color)" },
|
|
456
|
+
React.createElement(Column, { flex: 1 }, children))));
|
|
447
457
|
};
|
|
448
458
|
|
|
449
|
-
var
|
|
450
|
-
var
|
|
459
|
+
var SidebarRailMenu = function (_a) {
|
|
460
|
+
var variant = _a.variant, children = _a.children;
|
|
461
|
+
return (React.createElement(SidebarMenu, { collapsed: true, position: "fixed", left: 0, top: 0, hideCloseButton: true, variant: variant }, children));
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
var css_248z$2 = ".SidebarMenuContent-module_label__3NyDU {\n font-size: var(--current-text-size, var(--swui-font-size-medium));\n line-height: var(--current-line-height, var(--swui-line-height-medium));\n font-weight: var(--swui-button-font-weight);\n font-family: var(--swui-font-buttons);\n color: var(--current-text-color);\n}\n\n.SidebarMenuContent-module_icon__1kQOa {\n color: var(--current-text-color);\n font-size: 16px;\n}\n\n.SidebarMenuContent-module_spinner__K0lsy {\n color: var(--current-text-color);\n}\n\n.SidebarMenuContent-module_leftWrapper__2sA9a.SidebarMenuContent-module_leftWrapper__2sA9a.SidebarMenuContent-module_leftWrapper__2sA9a.SidebarMenuContent-module_leftWrapper__2sA9a {\n width: var(--swui-sidebar-menu-item-height);\n margin-right: 0;\n}\n\n.SidebarMenuContent-module_button__3x5IE {\n border: 0;\n padding: 0;\n background: var(--current-background-color);\n}\n\n[data-collapsed] [aria-expanded=\"true\"] .SidebarMenuContent-module_button__3x5IE,\n .SidebarMenuContent-module_button__3x5IE:hover {\n background: var(--current-background-color-hover);\n }\n\n.SidebarMenuContent-module_button__3x5IE:focus {\n outline: none;\n }\n\n.SidebarMenuContent-module_button__3x5IE:focus-visible {\n background: var(--current-background-color-active);\n }\n\n.SidebarMenuContent-module_button__3x5IE:active {\n background: var(--current-background-color-active);\n }\n\n.SidebarMenuContent-module_button__3x5IE.SidebarMenuContent-module_selected__aeI_K {\n background: var(--current-item-selected);\n }\n";
|
|
465
|
+
var contentStyles = {"label":"SidebarMenuContent-module_label__3NyDU","icon":"SidebarMenuContent-module_icon__1kQOa","spinner":"SidebarMenuContent-module_spinner__K0lsy","leftWrapper":"SidebarMenuContent-module_leftWrapper__2sA9a","button":"SidebarMenuContent-module_button__3x5IE","selected":"SidebarMenuContent-module_selected__aeI_K"};
|
|
451
466
|
styleInject(css_248z$2);
|
|
452
467
|
|
|
468
|
+
var defaultRenderLink = function (props) {
|
|
469
|
+
return React.createElement("button", __assign({}, props));
|
|
470
|
+
};
|
|
471
|
+
var SidebarMenuLink = function (_a) {
|
|
472
|
+
var className = _a.className; _a.children; var selected = _a.selected, indent = _a.indent, label = _a.label, loading = _a.loading, left = _a.left, leftIcon = _a.leftIcon, right = _a.right, rightIcon = _a.rightIcon, success = _a.success, width = _a.width, _b = _a.renderLink, renderLink = _b === void 0 ? defaultRenderLink : _b, style = _a.style, buttonProps = __rest(_a, ["className", "children", "selected", "indent", "label", "loading", "left", "leftIcon", "right", "rightIcon", "success", "width", "renderLink", "style"]);
|
|
473
|
+
var hasContentLeft = left || leftIcon || loading || success;
|
|
474
|
+
var innerClassName = cx(contentStyles.button, selected ? contentStyles.selected : undefined, className);
|
|
475
|
+
var innerStyle = __assign(__assign({}, style), { width: width, height: "var(--swui-sidebar-menu-item-height)" });
|
|
476
|
+
var innerChildren = (React.createElement(Row, { spacing: 1, flex: 1, alignItems: "center" },
|
|
477
|
+
!hasContentLeft && React.createElement(Indent, null),
|
|
478
|
+
indent && React.createElement(Indent, { num: 3.5 }),
|
|
479
|
+
React.createElement(ButtonContent, { label: label, loading: loading, left: left, leftIcon: leftIcon, right: right, rightIcon: rightIcon, success: success, labelClassName: contentStyles.label, spinnerClassName: contentStyles.spinner, iconClassName: cx(contentStyles.icon), leftWrapperClassName: contentStyles.leftWrapper })));
|
|
480
|
+
return (React.createElement(React.Fragment, null, renderLink(__assign(__assign({}, buttonProps), { activeClassName: contentStyles.selected, className: innerClassName, children: innerChildren, style: innerStyle }))));
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
var css_248z$1 = ".SidebarMenuHeading-module_sidebarMenuHeading__2Z8R_ {\n --swui-sidebar-menu-heading-text-color: var(--lhds-color-ui-300);\n\n /* Styling */\n\n text-transform: uppercase;\n}\n";
|
|
484
|
+
var styles$1 = {"sidebarMenuHeading":"SidebarMenuHeading-module_sidebarMenuHeading__2Z8R_"};
|
|
485
|
+
styleInject(css_248z$1);
|
|
486
|
+
|
|
453
487
|
var SidebarMenuHeading = function (_a) {
|
|
454
488
|
_a.className; var label = _a.label, contentLeft = _a.contentLeft, contentRight = _a.contentRight, textProps = __rest(_a, ["className", "label", "contentLeft", "contentRight"]);
|
|
455
489
|
return (React.createElement(Box, { spacing: 2, indent: 2 },
|
|
@@ -457,38 +491,61 @@ var SidebarMenuHeading = function (_a) {
|
|
|
457
491
|
React.createElement(Text, __assign({ variant: "overline", color: "var(--swui-sidebar-menu-heading-text-color)" }, textProps), label))));
|
|
458
492
|
};
|
|
459
493
|
|
|
460
|
-
var css_248z
|
|
461
|
-
var contentStyles = {"label":"SidebarMenuContent-module_label__3NyDU","icon":"SidebarMenuContent-module_icon__1kQOa","spinner":"SidebarMenuContent-module_spinner__K0lsy","leftWrapper":"SidebarMenuContent-module_leftWrapper__2sA9a"};
|
|
462
|
-
styleInject(css_248z$1);
|
|
463
|
-
|
|
464
|
-
var selectedBorder = "4px solid var(--swui-sidebar-menu-item-selected)";
|
|
465
|
-
var SidebarMenuLink = function (_a) {
|
|
466
|
-
_a.className; _a.children; var selected = _a.selected, indent = _a.indent, label = _a.label, loading = _a.loading, left = _a.left, leftIcon = _a.leftIcon, right = _a.right, rightIcon = _a.rightIcon, success = _a.success, clickableProps = __rest(_a, ["className", "children", "selected", "indent", "label", "loading", "left", "leftIcon", "right", "rightIcon", "success"]);
|
|
467
|
-
var hasContentLeft = left || leftIcon || loading || success;
|
|
468
|
-
return (React.createElement(Clickable, __assign({ background: "var(--swui-sidebar-menu-background-color)", hoverBackground: "var(--swui-sidebar-menu-background-color-hover)", style: { borderRight: selected ? selectedBorder : undefined } }, clickableProps),
|
|
469
|
-
React.createElement(Row, { spacing: 1, flex: 1, alignItems: "center", height: "40px" },
|
|
470
|
-
!hasContentLeft && React.createElement(Indent, null),
|
|
471
|
-
indent && React.createElement(Indent, { num: 3.5 }),
|
|
472
|
-
React.createElement(ButtonContent, { label: label, loading: loading, left: left, leftIcon: leftIcon, right: right, rightIcon: rightIcon, success: success, labelClassName: contentStyles.label, spinnerClassName: contentStyles.spinner, iconClassName: contentStyles.icon, leftWrapperClassName: contentStyles.leftWrapper }))));
|
|
473
|
-
};
|
|
474
|
-
|
|
475
|
-
var css_248z = ".SidebarMenuCollapsible-module_sidebarMenuCollapsible__3g5N3 {\n --swui-collapsible-header-text-color: var(--swui-sidebar-menu-text-color);\n --swui-collapsible-header-background-color: var(\n --swui-sidebar-menu-background-color\n );\n --swui-collapsible-header-background-color-hover: var(\n --swui-sidebar-menu-background-color-hover\n );\n --swui-collapsible-header-background-color-active: var(\n --swui-sidebar-menu-background-color-active\n );\n --swui-collapsible-header-indicator-color: var(\n --swui-sidebar-menu-text-color\n );\n --swui-collapsible-header-indicator-color-collapsed: var(\n --swui-sidebar-menu-text-color\n );\n --swui-collapsible-header-indicator-color-hover: var(\n --swui-sidebar-menu-text-color\n );\n --swui-collapsible-header-padding: 0 calc(var(--swui-metrics-indent) * 2) 0 0;\n --swui-collapsible-header-content-margin: 0;\n --swui-collapsible-collapsible-link-padding: var(--swui-metrics-indent)\n var(--swui-metrics-indent) var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 4);\n --swui-collapsible-header-border-color: transparent;\n}\n";
|
|
494
|
+
var css_248z = ".SidebarMenuCollapsible-module_sidebarMenuCollapsible__3g5N3 {\n --swui-collapsible-header-text-color: var(--current-text-color);\n --swui-collapsible-header-background-color: var(--current-background-color);\n --swui-collapsible-header-background-color-hover: var(\n --current-background-color-hover\n );\n --swui-collapsible-header-background-color-active: var(\n --current-background-color-active\n );\n --swui-collapsible-header-indicator-color: var(--current-text-color);\n --swui-collapsible-header-indicator-color-collapsed: var(\n --current-text-color\n );\n --swui-collapsible-header-indicator-color-hover: var(--current-text-color);\n --swui-collapsible-header-padding: 0 calc(var(--swui-metrics-indent) * 2) 0 0;\n --swui-collapsible-header-content-margin: 0;\n --swui-collapsible-collapsible-link-padding: var(--swui-metrics-indent)\n var(--swui-metrics-indent) var(--swui-metrics-indent)\n calc(var(--swui-metrics-indent) * 4);\n --swui-collapsible-header-border-color: transparent;\n\n --swui-collapsible-min-height: var(--swui-sidebar-menu-item-height);\n}\n";
|
|
476
495
|
var styles = {"sidebarMenuCollapsible":"SidebarMenuCollapsible-module_sidebarMenuCollapsible__3g5N3"};
|
|
477
496
|
styleInject(css_248z);
|
|
478
497
|
|
|
479
498
|
var SidebarMenuCollapsible = function (_a) {
|
|
480
499
|
var children = _a.children, label = _a.label, leftIcon = _a.leftIcon;
|
|
481
500
|
var _b = useState(false), collapsed = _b[0], setCollapsed = _b[1];
|
|
482
|
-
return (React.createElement(Box, { background: "var(--
|
|
483
|
-
React.createElement(Collapsible, { className: styles.sidebarMenuCollapsible, label: label, collapsed: collapsed, onClick: function () { return setCollapsed(!collapsed); }, contentLeft: leftIcon ? (React.createElement(Box, { width: "
|
|
484
|
-
React.createElement(Icon, { icon: leftIcon, size:
|
|
501
|
+
return (React.createElement(Box, { background: "var(--current-background-color)" },
|
|
502
|
+
React.createElement(Collapsible, { className: styles.sidebarMenuCollapsible, label: label, collapsed: collapsed, onClick: function () { return setCollapsed(!collapsed); }, contentLeft: leftIcon ? (React.createElement(Box, { width: "var(--swui-sidebar-menu-item-height)", alignItems: "center", justifyContent: "center" },
|
|
503
|
+
React.createElement(Icon, { icon: leftIcon, size: 16, color: "var(--current-text-color)", "data-hover": true }))) : (React.createElement(Indent, { num: 1 })) },
|
|
485
504
|
React.createElement(Column, { flex: 1 }, children))));
|
|
486
505
|
};
|
|
487
506
|
|
|
488
|
-
var
|
|
489
|
-
|
|
490
|
-
|
|
507
|
+
var renderItemsExpanded = function (items, indent) {
|
|
508
|
+
if (indent === void 0) { indent = false; }
|
|
509
|
+
return items.map(function (item) {
|
|
510
|
+
switch (item.type) {
|
|
511
|
+
case "heading":
|
|
512
|
+
return React.createElement(SidebarMenuHeading, { label: item.label });
|
|
513
|
+
case "separator":
|
|
514
|
+
return React.createElement(SidebarMenuSeparator, null);
|
|
515
|
+
case "link": {
|
|
516
|
+
item.type; var linkProps = __rest(item, ["type"]);
|
|
517
|
+
return React.createElement(SidebarMenuLink, __assign({ indent: indent }, linkProps));
|
|
518
|
+
}
|
|
519
|
+
case "grouped":
|
|
520
|
+
return (React.createElement(SidebarMenuCollapsible, { leftIcon: item.leftIcon, label: item.label }, renderItemsExpanded(item.items, true)));
|
|
521
|
+
default:
|
|
522
|
+
return exhaustSwitchCaseElseThrow(item);
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
};
|
|
526
|
+
var renderItemsInRail = function (items, _a) {
|
|
527
|
+
var popupMinWidth = _a.popupMinWidth;
|
|
528
|
+
return items.map(function (item) {
|
|
529
|
+
switch (item.type) {
|
|
530
|
+
case "heading":
|
|
531
|
+
return null;
|
|
532
|
+
case "separator":
|
|
533
|
+
return React.createElement(SidebarMenuSeparator, null);
|
|
534
|
+
case "link": {
|
|
535
|
+
item.type; var label = item.label, linkProps = __rest(item, ["type", "label"]);
|
|
536
|
+
return (React.createElement(SidebarMenuLink, __assign({ title: label, width: "var(--swui-sidebar-menu-item-height)" }, linkProps)));
|
|
537
|
+
}
|
|
538
|
+
case "grouped":
|
|
539
|
+
return (React.createElement("div", null,
|
|
540
|
+
React.createElement(Popover, { appendTo: "parent", arrow: false, offset: [0, 0], placement: "right-start", trigger: "focusin mouseenter click", disablePadding: true, lazy: true, content: React.createElement(Box, { minWidth: popupMinWidth, background: "var(--lhds-color-blue-500)" },
|
|
541
|
+
React.createElement(SidebarMenuHeading, { label: item.label }),
|
|
542
|
+
renderItemsExpanded(item.items)) },
|
|
543
|
+
React.createElement(SidebarMenuLink, { title: item.label, width: "var(--swui-sidebar-menu-item-height)", leftIcon: item.leftIcon }))));
|
|
544
|
+
default:
|
|
545
|
+
return exhaustSwitchCaseElseThrow(item);
|
|
546
|
+
}
|
|
547
|
+
});
|
|
491
548
|
};
|
|
492
549
|
|
|
493
|
-
export { ActionMenuFlatButton, ActionMenuPrimaryButton, ActionMenuSecondaryButton, CheckboxMenu, Collapsible, CollapsibleClickableContent, CollapsibleContent, CollapsibleEmptyContent, CollapsibleGroupHeading, CollapsibleWithCheckbox, ErrorPanel, ErrorScreen, LoadingPanel, LoadingScreen, NavBar, NavBarButton, NavBarHeading, NavBarPopoverButton, NavBarSearchField, Notification, PageHeader, PageHeaderRow, PageHeading, SidebarMenu, SidebarMenuCollapsible, SidebarMenuHeading, SidebarMenuLink, SidebarMenuSeparator, defaultNotificationTheme, mapCSSTime };
|
|
550
|
+
export { ActionMenuFlatButton, ActionMenuPrimaryButton, ActionMenuSecondaryButton, CheckboxMenu, Collapsible, CollapsibleClickableContent, CollapsibleContent, CollapsibleEmptyContent, CollapsibleGroupHeading, CollapsibleWithCheckbox, ErrorPanel, ErrorScreen, LoadingPanel, LoadingScreen, NavBar, NavBarButton, NavBarHeading, NavBarPopoverButton, NavBarSearchField, Notification, PageHeader, PageHeaderRow, PageHeading, SidebarMenu, SidebarMenuCollapsible, SidebarMenuHeading, SidebarMenuLink, SidebarMenuSeparator, SidebarRailMenu, defaultNotificationTheme, defaultRenderLink, mapCSSTime, renderItemsExpanded, renderItemsInRail };
|
|
494
551
|
//# sourceMappingURL=index.es.js.map
|