@stenajs-webui/panels 21.44.0 → 21.44.1
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.
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { ButtonElementProps } from "@stenajs-webui/core";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
export type CollapsibleProps = CollapsibleLabelProps | CollapsibleRenderLabelProps;
|
|
5
|
+
export interface CollapsibleCommonProps extends Omit<ButtonElementProps, "value"> {
|
|
6
|
+
contentLeft?: ReactNode;
|
|
7
|
+
contentRight?: ReactNode;
|
|
7
8
|
collapsed?: boolean;
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
}
|
|
10
|
+
export interface CollapsibleLabelProps extends CollapsibleCommonProps {
|
|
11
|
+
label: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CollapsibleRenderLabelProps extends CollapsibleCommonProps {
|
|
14
|
+
renderLabel: () => ReactNode;
|
|
10
15
|
}
|
|
11
16
|
export declare const Collapsible: React.ForwardRefExoticComponent<CollapsibleProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { CheckboxProps } from "@stenajs-webui/forms";
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
import { ReactNode } from "react";
|
|
3
4
|
import { CollapsibleProps } from "./Collapsible";
|
|
4
|
-
export
|
|
5
|
+
export type CollapsibleWithCheckboxProps = CollapsibleWithCheckboxLabelProps | CollapsibleWithCheckboxRenderLabelProps;
|
|
6
|
+
export interface CollapsibleWithCheckboxCommonProps extends Omit<CollapsibleProps, "contentLeft" | "onChange">, Pick<CheckboxProps, "value" | "onValueChange" | "onChange" | "indeterminate"> {
|
|
5
7
|
checkboxDisabled?: CheckboxProps["disabled"];
|
|
6
8
|
}
|
|
9
|
+
export interface CollapsibleWithCheckboxLabelProps extends CollapsibleWithCheckboxCommonProps {
|
|
10
|
+
label: string;
|
|
11
|
+
}
|
|
12
|
+
export interface CollapsibleWithCheckboxRenderLabelProps extends CollapsibleWithCheckboxCommonProps {
|
|
13
|
+
renderLabel: () => ReactNode;
|
|
14
|
+
}
|
|
7
15
|
export declare const CollapsibleWithCheckbox: React.FC<CollapsibleWithCheckboxProps>;
|
package/dist/index.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode("._navBar_kzibd_1{--swui-navbar-background-color: var(--lhds-color-ui-50);--swui-navbar-item-background-color-hover: var(--lhds-color-blue-700);--swui-navbar-item-background-color-selected: var(--lhds-color-blue-600);--swui-navbar-item-background-color-selected-hover: var( --lhds-color-blue-700 );--swui-nav-bar-height: 48px;background-color:var(--swui-navbar-background-color);height:var(--swui-nav-bar-height);min-height:var(--swui-nav-bar-height)}._navBarButton_b3x3w_1:hover{background:var(--lhds-color-ui-100)}._navBarButton_b3x3w_1:focus-visible{background:var(--lhds-color-ui-200)}._navBarButton_b3x3w_1:active{background:var(--lhds-color-ui-200)}._navBarButton_b3x3w_1._selected_b3x3w_14{background:var(--lhds-color-blue-200)}._navBarButton_b3x3w_1._selected_b3x3w_14:hover{background:var(--lhds-color-blue-100)}._navBarButton_b3x3w_1._selected_b3x3w_14:focus-visible{background:var(--lhds-color-blue-300)}._navBarButton_b3x3w_1._selected_b3x3w_14:active{background:var(--lhds-color-blue-200)}._navBarNotificationButton_1wt3y_1{--current-background-color: var(--lhds-color-ui-400);--current-outline-color: var(--modern-blue);background-color:var(--current-background-color);border-color:transparent;color:var(--lhds-color-ui-50);--swui-nav-bar-notification-shake-count: 3;transition:.5s width}._navBarNotificationButton_1wt3y_1:hover{--current-background-color: var(--lhds-color-red-500);--current-outline-color: var(--lhds-color-red-500)}._navBarNotificationButton_1wt3y_1:active{--current-background-color: var(--lhds-color-red-600);--current-outline-color: var(--lhds-color-red-600)}._navBarNotificationButton_1wt3y_1._unread_1wt3y_23 ._icon_1wt3y_23{transform-origin:top center;animation:_shake_1wt3y_1 1.5s ease-in-out var(--swui-nav-bar-notification-shake-count)}._navBarNotificationButton_1wt3y_1._unread_1wt3y_23{--current-background-color: var(--lhds-color-red-500);--current-outline-color: var(--lhds-color-red-500)}._navBarNotificationButton_1wt3y_1._unread_1wt3y_23:hover{--current-background-color: var(--lhds-color-red-600);--current-outline-color: var(--lhds-color-red-600)}._navBarNotificationButton_1wt3y_1._unread_1wt3y_23:active{--current-background-color: var(--lhds-color-red-700);--current-outline-color: var(--lhds-color-red-700)}._navBarNotificationButton_1wt3y_1:focus-visible{outline:var(--swui-focus-outline);outline-color:var(--current-outline-color);outline-offset:var(--swui-focus-outline-width)}@keyframes _shake_1wt3y_1{0%{transform:rotate(0)}7%{transform:rotate(20deg)}15%{transform:rotate(-20deg)}22%{transform:rotate(16deg)}30%{transform:rotate(-16deg)}38%{transform:rotate(6deg)}42%{transform:rotate(-6deg)}46%{transform:rotate(2deg)}to{transform:rotate(0)}}._navBarSearchFieldInput_1rp8g_1._navBarSearchFieldInput_1rp8g_1{line-height:2.7rem;color:var(--lhds-color-ui-800)}._navBarSearchFieldInput_1rp8g_1._navBarSearchFieldInput_1rp8g_1::placeholder{color:var(--lhds-color-blue-600)}._navBarSearchFieldInput_1rp8g_1._navBarSearchFieldInput_1rp8g_1{padding:0 var(--swui-metrics-indent)}._navBarSearchFieldWrapper_1rp8g_12._navBarSearchFieldWrapper_1rp8g_12{background:var(--lhds-color-ui-200);border-color:transparent}._navBarSearchFieldWrapper_1rp8g_12._navBarSearchFieldWrapper_1rp8g_12:hover{border-color:transparent}._navBarSearchFieldWrapper_1rp8g_12._navBarSearchFieldWrapper_1rp8g_12{padding:0 var(--swui-metrics-indent);border-radius:var(--swui-max-border-radius)}._navBarSearchFieldWrapper_1rp8g_12._navBarSearchFieldWrapper_1rp8g_12._withButton_1rp8g_24{padding-right:1px}._navBarSearchFieldWrapper_1rp8g_12._navBarSearchFieldWrapper_1rp8g_12:focus-within{color:var(--lhds-color-ui-800);background:var(--lhds-color-ui-50)}._navBarSearchFieldWrapper_1rp8g_12._navBarSearchFieldWrapper_1rp8g_12 ._clearButton_1rp8g_33{border-radius:var(--swui-max-border-radius)}._navBarUserButton_10f9z_1:hover{background:var(--lhds-color-ui-100)}._navBarUserButton_10f9z_1:focus-visible{background:var(--lhds-color-ui-200)}._navBarUserButton_10f9z_1:active{background:var(--lhds-color-ui-200)}._unreadDot_l8bni_1{position:relative}._unreadDot_l8bni_1 ._dot_l8bni_4{top:1px;right:1px;position:absolute;width:8px;height:8px;border-radius:var(--swui-max-border-radius);background:var(--lhds-color-blue-500)}._notification_1hao0_1{display:flex;flex-direction:column;width:100%;background:var(--lhds-color-ui-50)}._notification_1hao0_1 ._body_1hao0_7{padding-left:64px;padding-right:24px;padding-bottom:16px}._notification_1hao0_1._standard_1hao0_13._unread_1hao0_14{background:var(--lhds-color-blue-50)}._notification_1hao0_1._danger_1hao0_19{background:var(--lhds-color-red-100)}._notificationList_1rkvu_1{display:flex;flex-direction:column;gap:2px;background:var(--lhds-color-ui-200)}._clickable_1ijxc_1{--swui-toast-border-color: transparent;--swui-toast-item-border-color-hover: var(--lhds-color-blue-500);--current-border-color: var(--swui-toast-border-color);border-width:1px;border-style:solid;border-color:var(--current-border-color);position:absolute;top:0;left:0;right:0;bottom:0;border-radius:8px;background-color:transparent;width:100%;cursor:pointer}._clickable_1ijxc_1:hover{--current-border-color: var(--swui-toast-item-border-color-hover)}._nonClickable_1ijxc_27{position:relative;z-index:1;pointer-events:none}._nonClickable_1ijxc_27 a,._nonClickable_1ijxc_27 button{pointer-events:auto}._sidebarMenuCollapsibleGroupBox_ikek9_1{background:var(--lhds-color-ui-200);border-radius:var(--swui-border-radius);gap:var(--swui-metrics-space);display:flex;flex-direction:column;padding:var(--swui-metrics-space);--current-text-size: var(--swui-font-size-small)}._sidebarMenu_1bx5w_1{--swui-sidebar-menu-separator-color: var(--swui-white);--swui-sidebar-menu-text-color: var(--lhds-color-ui-900);--swui-sidebar-menu-icon-color: var(--lhds-color-ui-900);--swui-sidebar-menu-background-color: transparent;--swui-sidebar-menu-background-color-hover: var(--lhds-color-ui-400);--swui-sidebar-menu-background-color-focus: var(--lhds-color-ui-400);--swui-sidebar-menu-background-color-active: var(--lhds-color-ui-300);--swui-sidebar-menu-background-selected: var(--lhds-color-blue-100);--swui-sidebar-menu-background-selected-hover: var(--lhds-color-blue-200);--swui-sidebar-menu-background-selected-focus: var(--lhds-color-blue-200);--swui-sidebar-menu-background-selected-active: var(--lhds-color-blue-100);--current-background-color: var(--swui-sidebar-menu-background-color);--current-background-color-hover: var( --swui-sidebar-menu-background-color-hover );--current-background-color-focus: var( --swui-sidebar-menu-background-color-focus );--current-background-color-active: var( --swui-sidebar-menu-background-color-active );--current-background-selected: var(--swui-sidebar-menu-background-selected);--current-background-selected-hover: var( --swui-sidebar-menu-background-selected-hover );--current-background-selected-focus: var( --swui-sidebar-menu-background-selected-focus );--current-background-selected-active: var( --swui-sidebar-menu-background-selected-active )}._sidebarMenu_1bx5w_1 ._sidebarItems_1bx5w_38{--current-separator-color: var(--swui-sidebar-menu-separator-color);--current-text-color: var(--swui-sidebar-menu-text-color);--current-icon-color: var(--swui-sidebar-menu-icon-color)}._sidebarMenu_1bx5w_1{background-color:var(--current-background-color);height:100dvh}._sidebarMenu_1bx5w_1 ._scrollContainer_1bx5w_48{background:var(--current-background-color);height:100%;overflow:auto}._stenaFlag_108h7_1{height:32px}")),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
import { jsx as n, Fragment as
|
|
2
|
+
import { jsx as n, Fragment as _, jsxs as o } from "react/jsx-runtime";
|
|
3
3
|
import { ActionMenu as G, ActionMenuContext as an, stenaAngleDown as W, PrimaryButton as ln, SecondaryButton as cn, FlatButton as k, stenaHamburger as E, BaseButton as sn, stenaBellFilled as dn, TextInputButton as un, stenaTimes as hn, stenaUserCircle as pn, CircledIcon as j, CloseButton as q, MenuButton as L, Icon as gn, stenaMail as mn, Card as bn, CardBody as fn, stenaTripFerryXl as Bn, Spinner as _n, StenaFlag as vn, stenaAngleLeftDouble as O, stenaPin as Cn, IconMenuButton as P, IconMenuButtonLink as xn, MenuButtonLink as yn } from "@stenajs-webui/elements";
|
|
4
4
|
import * as In from "react";
|
|
5
5
|
import { useRef as wn, useMemo as Nn, forwardRef as A, createContext as kn, useContext as Mn, useState as Sn } from "react";
|
|
6
|
-
import { useBoolean as X, Row as
|
|
6
|
+
import { useBoolean as X, Row as c, Indent as x, Column as h, Heading as M, Box as d, Text as b, Space as m, SeparatorLine as Rn } from "@stenajs-webui/core";
|
|
7
7
|
import { ControlledPopover as J, Popover as K, Tooltip as Q } from "@stenajs-webui/tooltip";
|
|
8
8
|
import { Checkbox as V, TextInput as Fn } from "@stenajs-webui/forms";
|
|
9
|
-
import
|
|
9
|
+
import p from "classnames";
|
|
10
10
|
import { cssColor as f } from "@stenajs-webui/theme";
|
|
11
11
|
const $ = ({
|
|
12
12
|
renderItems: e,
|
|
@@ -15,23 +15,23 @@ const $ = ({
|
|
|
15
15
|
rightIcon: i = W,
|
|
16
16
|
menuWidth: a,
|
|
17
17
|
menuTop: l,
|
|
18
|
-
onClick:
|
|
19
|
-
disableArrow:
|
|
20
|
-
buttonRef:
|
|
18
|
+
onClick: s,
|
|
19
|
+
disableArrow: u = !1,
|
|
20
|
+
buttonRef: g,
|
|
21
21
|
appendTo: B,
|
|
22
|
-
zIndex:
|
|
22
|
+
zIndex: v,
|
|
23
23
|
...Z
|
|
24
24
|
}) => {
|
|
25
|
-
const [H, T, y, nn] = X(!1), en = wn(null), tn =
|
|
26
|
-
|
|
25
|
+
const [H, T, y, nn] = X(!1), en = wn(null), tn = g ?? en, rn = Nn(() => ({ open: T, close: y }), [T, y]), on = (S) => {
|
|
26
|
+
s == null || s(S), nn();
|
|
27
27
|
};
|
|
28
|
-
return /* @__PURE__ */ n(
|
|
28
|
+
return /* @__PURE__ */ n(_, { children: /* @__PURE__ */ n(
|
|
29
29
|
J,
|
|
30
30
|
{
|
|
31
31
|
renderTrigger: (S) => /* @__PURE__ */ n(
|
|
32
32
|
r,
|
|
33
33
|
{
|
|
34
|
-
rightIcon:
|
|
34
|
+
rightIcon: u ? void 0 : i,
|
|
35
35
|
...Z,
|
|
36
36
|
ref: tn,
|
|
37
37
|
onClick: on,
|
|
@@ -44,7 +44,7 @@ const $ = ({
|
|
|
44
44
|
onRequestClose: y,
|
|
45
45
|
placement: t,
|
|
46
46
|
appendTo: B,
|
|
47
|
-
zIndex:
|
|
47
|
+
zIndex: v,
|
|
48
48
|
children: H && /* @__PURE__ */ n(G, { width: a, top: l, trapFocus: !0, children: /* @__PURE__ */ n(an.Provider, { value: rn, children: e(y) }) })
|
|
49
49
|
}
|
|
50
50
|
) });
|
|
@@ -55,8 +55,8 @@ const $ = ({
|
|
|
55
55
|
K,
|
|
56
56
|
{
|
|
57
57
|
trigger: "click",
|
|
58
|
-
renderTrigger: (r) => /* @__PURE__ */ n(
|
|
59
|
-
|
|
58
|
+
renderTrigger: (r) => /* @__PURE__ */ n(c, { children: /* @__PURE__ */ o(
|
|
59
|
+
c,
|
|
60
60
|
{
|
|
61
61
|
spacing: 0.5,
|
|
62
62
|
indent: !0,
|
|
@@ -94,39 +94,39 @@ const $ = ({
|
|
|
94
94
|
children: i,
|
|
95
95
|
right: a,
|
|
96
96
|
center: l,
|
|
97
|
-
onClickMenuButton:
|
|
97
|
+
onClickMenuButton: s
|
|
98
98
|
}) => {
|
|
99
|
-
const
|
|
99
|
+
const u = l ? 1 : void 0;
|
|
100
100
|
return /* @__PURE__ */ o(
|
|
101
|
-
|
|
101
|
+
c,
|
|
102
102
|
{
|
|
103
103
|
justifyContent: "space-between",
|
|
104
|
-
className:
|
|
104
|
+
className: p(An.navBar, t),
|
|
105
105
|
children: [
|
|
106
106
|
/* @__PURE__ */ o(
|
|
107
|
-
|
|
107
|
+
c,
|
|
108
108
|
{
|
|
109
|
-
flex:
|
|
109
|
+
flex: u,
|
|
110
110
|
justifyContent: "flex-start",
|
|
111
111
|
alignItems: "center",
|
|
112
112
|
children: [
|
|
113
|
-
/* @__PURE__ */ o(
|
|
113
|
+
/* @__PURE__ */ o(c, { width: "86px", alignItems: "center", children: [
|
|
114
114
|
/* @__PURE__ */ n(x, {}),
|
|
115
|
-
r && /* @__PURE__ */ n($n, { onClick:
|
|
115
|
+
r && /* @__PURE__ */ n($n, { onClick: s })
|
|
116
116
|
] }),
|
|
117
|
-
e && /* @__PURE__ */ o(
|
|
117
|
+
e && /* @__PURE__ */ o(_, { children: [
|
|
118
118
|
e,
|
|
119
119
|
/* @__PURE__ */ n(x, { num: 2 })
|
|
120
120
|
] }),
|
|
121
|
-
i && /* @__PURE__ */ n(
|
|
121
|
+
i && /* @__PURE__ */ n(_, { children: /* @__PURE__ */ n(c, { justifyContent: "center", alignItems: "center", children: In.Children.map(i, (g, B) => /* @__PURE__ */ o(_, { children: [
|
|
122
122
|
B > 0 && /* @__PURE__ */ n(x, {}),
|
|
123
|
-
|
|
123
|
+
g
|
|
124
124
|
] })) }) })
|
|
125
125
|
]
|
|
126
126
|
}
|
|
127
127
|
),
|
|
128
|
-
l && /* @__PURE__ */ n(
|
|
129
|
-
/* @__PURE__ */ o(
|
|
128
|
+
l && /* @__PURE__ */ n(c, { justifyContent: "center", alignItems: "center", children: l }),
|
|
129
|
+
/* @__PURE__ */ o(c, { justifyContent: "flex-end", alignItems: "center", flex: u, children: [
|
|
130
130
|
a,
|
|
131
131
|
/* @__PURE__ */ n(x, { num: 2 })
|
|
132
132
|
] })
|
|
@@ -143,7 +143,7 @@ const $ = ({
|
|
|
143
143
|
{
|
|
144
144
|
...r,
|
|
145
145
|
ref: i,
|
|
146
|
-
className:
|
|
146
|
+
className: p(
|
|
147
147
|
U.navBarButton,
|
|
148
148
|
e && U.selected,
|
|
149
149
|
t
|
|
@@ -158,17 +158,17 @@ const $ = ({
|
|
|
158
158
|
zIndex: i,
|
|
159
159
|
...a
|
|
160
160
|
}) => {
|
|
161
|
-
const [l, ,
|
|
161
|
+
const [l, , s, u] = X(!1);
|
|
162
162
|
return /* @__PURE__ */ n(
|
|
163
163
|
J,
|
|
164
164
|
{
|
|
165
|
-
renderTrigger: (
|
|
165
|
+
renderTrigger: (g) => /* @__PURE__ */ n(Tn, { ...a, ...g, onClick: u }),
|
|
166
166
|
open: l,
|
|
167
|
-
onRequestClose:
|
|
167
|
+
onRequestClose: s,
|
|
168
168
|
zIndex: i,
|
|
169
169
|
appendTo: r,
|
|
170
|
-
children: /* @__PURE__ */ o(
|
|
171
|
-
e && e({ close:
|
|
170
|
+
children: /* @__PURE__ */ o(d, { children: [
|
|
171
|
+
e && e({ close: s }),
|
|
172
172
|
t
|
|
173
173
|
] })
|
|
174
174
|
}
|
|
@@ -185,24 +185,24 @@ const $ = ({
|
|
|
185
185
|
labelClassName: i,
|
|
186
186
|
iconClassName: a,
|
|
187
187
|
icon: l = dn,
|
|
188
|
-
...
|
|
189
|
-
},
|
|
190
|
-
const
|
|
188
|
+
...s
|
|
189
|
+
}, u) {
|
|
190
|
+
const g = e > 1;
|
|
191
191
|
return /* @__PURE__ */ n(
|
|
192
192
|
sn,
|
|
193
193
|
{
|
|
194
|
-
...
|
|
195
|
-
ref:
|
|
194
|
+
...s,
|
|
195
|
+
ref: u,
|
|
196
196
|
leftIcon: l,
|
|
197
|
-
className:
|
|
197
|
+
className: p(
|
|
198
198
|
C.navBarNotificationButton,
|
|
199
199
|
t && C.unread,
|
|
200
|
-
|
|
200
|
+
g && C.hasCount,
|
|
201
201
|
r
|
|
202
202
|
),
|
|
203
|
-
label:
|
|
204
|
-
labelClassName:
|
|
205
|
-
iconClassName:
|
|
203
|
+
label: g ? String(e) : void 0,
|
|
204
|
+
labelClassName: p(i, C.label),
|
|
205
|
+
iconClassName: p(a, C.icon)
|
|
206
206
|
}
|
|
207
207
|
);
|
|
208
208
|
}), En = "_navBarSearchFieldInput_1rp8g_1", qn = "_navBarSearchFieldWrapper_1rp8g_12", On = "_withButton_1rp8g_24", Xn = "_clearButton_1rp8g_33", I = {
|
|
@@ -217,16 +217,16 @@ const $ = ({
|
|
|
217
217
|
showClearButton: i,
|
|
218
218
|
onClickClearButton: a,
|
|
219
219
|
value: l,
|
|
220
|
-
...
|
|
220
|
+
...s
|
|
221
221
|
}) => /* @__PURE__ */ n(
|
|
222
222
|
Fn,
|
|
223
223
|
{
|
|
224
|
-
wrapperClassName:
|
|
224
|
+
wrapperClassName: p(
|
|
225
225
|
I.navBarSearchFieldWrapper,
|
|
226
226
|
i ? I.withButton : void 0,
|
|
227
227
|
r
|
|
228
228
|
),
|
|
229
|
-
className:
|
|
229
|
+
className: p(I.navBarSearchFieldInput, t),
|
|
230
230
|
placeholder: e,
|
|
231
231
|
value: l,
|
|
232
232
|
buttonRight: l && i ? /* @__PURE__ */ n(
|
|
@@ -238,7 +238,7 @@ const $ = ({
|
|
|
238
238
|
onClick: a
|
|
239
239
|
}
|
|
240
240
|
) : void 0,
|
|
241
|
-
...
|
|
241
|
+
...s
|
|
242
242
|
}
|
|
243
243
|
), Jn = "_navBarUserButton_10f9z_1", Kn = {
|
|
244
244
|
navBarUserButton: Jn
|
|
@@ -253,7 +253,7 @@ const $ = ({
|
|
|
253
253
|
jn,
|
|
254
254
|
{
|
|
255
255
|
...l,
|
|
256
|
-
className:
|
|
256
|
+
className: p(Kn.navBarUserButton, e),
|
|
257
257
|
leftIcon: t != null ? i : void 0,
|
|
258
258
|
label: r ?? t,
|
|
259
259
|
forceRound: r != null,
|
|
@@ -273,32 +273,32 @@ const $ = ({
|
|
|
273
273
|
iconAriaLabel: i,
|
|
274
274
|
contentLeft: a,
|
|
275
275
|
contentRight: l,
|
|
276
|
-
onClose:
|
|
277
|
-
unread:
|
|
278
|
-
variant:
|
|
276
|
+
onClose: s,
|
|
277
|
+
unread: u = !1,
|
|
278
|
+
variant: g,
|
|
279
279
|
iconBackgroundColor: B
|
|
280
280
|
}) => {
|
|
281
|
-
const
|
|
281
|
+
const v = r ? /* @__PURE__ */ n(
|
|
282
282
|
j,
|
|
283
283
|
{
|
|
284
284
|
size: "small",
|
|
285
285
|
icon: r,
|
|
286
286
|
"aria-label": i,
|
|
287
|
-
backgroundColor: B || Zn(
|
|
287
|
+
backgroundColor: B || Zn(u, g)
|
|
288
288
|
}
|
|
289
289
|
) : void 0;
|
|
290
|
-
return /* @__PURE__ */ o(
|
|
291
|
-
/* @__PURE__ */ o(
|
|
292
|
-
a && /* @__PURE__ */ n(
|
|
293
|
-
!a &&
|
|
294
|
-
/* @__PURE__ */ o(
|
|
290
|
+
return /* @__PURE__ */ o(c, { alignItems: "flex-start", indent: 2, spacing: !0, children: [
|
|
291
|
+
/* @__PURE__ */ o(c, { spacing: !0, gap: 2, flex: 1, alignItems: "flex-start", children: [
|
|
292
|
+
a && /* @__PURE__ */ n(d, { minHeight: 20, justifyContent: "center", children: a }),
|
|
293
|
+
!a && v && (u ? /* @__PURE__ */ n(Yn, { children: v }) : v),
|
|
294
|
+
/* @__PURE__ */ o(d, { minHeight: 20, justifyContent: "center", flex: 1, gap: 0.5, children: [
|
|
295
295
|
/* @__PURE__ */ n(b, { variant: "bold", children: e }),
|
|
296
296
|
t && /* @__PURE__ */ n(
|
|
297
297
|
b,
|
|
298
298
|
{
|
|
299
299
|
size: "small",
|
|
300
300
|
color: f(
|
|
301
|
-
|
|
301
|
+
u ? "--lhds-color-blue-600" : "--lhds-color-ui-600"
|
|
302
302
|
),
|
|
303
303
|
children: t
|
|
304
304
|
}
|
|
@@ -306,13 +306,13 @@ const $ = ({
|
|
|
306
306
|
] }),
|
|
307
307
|
l
|
|
308
308
|
] }),
|
|
309
|
-
|
|
310
|
-
|
|
309
|
+
s && /* @__PURE__ */ n(
|
|
310
|
+
d,
|
|
311
311
|
{
|
|
312
312
|
flex: "none",
|
|
313
313
|
justifyContent: "center",
|
|
314
314
|
height: "calc(20px + 2 * var(--swui-metrics-spacing))",
|
|
315
|
-
children: /* @__PURE__ */ n(q, { onClick:
|
|
315
|
+
children: /* @__PURE__ */ n(q, { onClick: s })
|
|
316
316
|
}
|
|
317
317
|
)
|
|
318
318
|
] });
|
|
@@ -333,7 +333,7 @@ const $ = ({
|
|
|
333
333
|
}) => /* @__PURE__ */ o(
|
|
334
334
|
"div",
|
|
335
335
|
{
|
|
336
|
-
className:
|
|
336
|
+
className: p(
|
|
337
337
|
w.notification,
|
|
338
338
|
w[e],
|
|
339
339
|
r && w.unread
|
|
@@ -361,7 +361,7 @@ const $ = ({
|
|
|
361
361
|
maxWidth: a,
|
|
362
362
|
...l
|
|
363
363
|
}) => /* @__PURE__ */ o(
|
|
364
|
-
|
|
364
|
+
d,
|
|
365
365
|
{
|
|
366
366
|
borderRadius: 8,
|
|
367
367
|
background: f("--lhds-color-ui-50"),
|
|
@@ -371,8 +371,8 @@ const $ = ({
|
|
|
371
371
|
role: "alert",
|
|
372
372
|
position: "relative",
|
|
373
373
|
children: [
|
|
374
|
-
/* @__PURE__ */ n(
|
|
375
|
-
r && /* @__PURE__ */ o(
|
|
374
|
+
/* @__PURE__ */ n(d, { className: p({ [R.nonClickable]: e }), children: /* @__PURE__ */ n(Y, { ...l }) }),
|
|
375
|
+
r && /* @__PURE__ */ o(d, { indent: 3, className: p({ [R.nonClickable]: e }), children: [
|
|
376
376
|
r,
|
|
377
377
|
/* @__PURE__ */ n(m, { num: 2 })
|
|
378
378
|
] }),
|
|
@@ -387,35 +387,18 @@ const $ = ({
|
|
|
387
387
|
]
|
|
388
388
|
}
|
|
389
389
|
), se = A(
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
L,
|
|
403
|
-
{
|
|
404
|
-
...B,
|
|
405
|
-
autoFocus: p,
|
|
406
|
-
ref: _,
|
|
407
|
-
label: t,
|
|
408
|
-
onClick: l,
|
|
409
|
-
disabled: c,
|
|
410
|
-
expandable: !0,
|
|
411
|
-
expanded: !a,
|
|
412
|
-
selected: !a,
|
|
413
|
-
left: r,
|
|
414
|
-
right: i,
|
|
415
|
-
children: d
|
|
416
|
-
}
|
|
417
|
-
);
|
|
418
|
-
}
|
|
390
|
+
({ contentLeft: e, contentRight: t, collapsed: r = !1, ...i }, a) => /* @__PURE__ */ n(
|
|
391
|
+
L,
|
|
392
|
+
{
|
|
393
|
+
ref: a,
|
|
394
|
+
expandable: !0,
|
|
395
|
+
expanded: !r,
|
|
396
|
+
selected: !r,
|
|
397
|
+
left: e,
|
|
398
|
+
right: t,
|
|
399
|
+
...i
|
|
400
|
+
}
|
|
401
|
+
)
|
|
419
402
|
), Oe = ({
|
|
420
403
|
children: e
|
|
421
404
|
}) => /* @__PURE__ */ n(h, { gap: 1, children: e }), Xe = ({
|
|
@@ -436,14 +419,14 @@ const $ = ({
|
|
|
436
419
|
onValueChange: t,
|
|
437
420
|
onChange: r,
|
|
438
421
|
disabled: a,
|
|
439
|
-
onClick: (
|
|
422
|
+
onClick: (s) => s.stopPropagation()
|
|
440
423
|
}
|
|
441
424
|
),
|
|
442
425
|
...l
|
|
443
426
|
}
|
|
444
427
|
), de = "_sidebarMenuCollapsibleGroupBox_ikek9_1", ue = {
|
|
445
428
|
sidebarMenuCollapsibleGroupBox: de
|
|
446
|
-
}, he = ({ children: e }) => /* @__PURE__ */ n("div", { className: ue.sidebarMenuCollapsibleGroupBox, children: e }), Je = ({ children: e }) => /* @__PURE__ */ n(
|
|
429
|
+
}, he = ({ children: e }) => /* @__PURE__ */ n("div", { className: ue.sidebarMenuCollapsibleGroupBox, children: e }), Je = ({ children: e }) => /* @__PURE__ */ n(d, { spacing: !0, indent: !0, children: /* @__PURE__ */ n(b, { variant: "overline", size: "smaller", children: e }) }), Ke = ({ text: e = "No content" }) => /* @__PURE__ */ o(h, { indent: !0, spacing: !0, flex: 1, alignItems: "center", children: [
|
|
447
430
|
/* @__PURE__ */ n(gn, { icon: mn, color: f("--lhds-color-ui-500") }),
|
|
448
431
|
/* @__PURE__ */ n(m, {}),
|
|
449
432
|
/* @__PURE__ */ n(b, { size: "small", color: f("--lhds-color-ui-500"), children: e })
|
|
@@ -454,24 +437,24 @@ const $ = ({
|
|
|
454
437
|
buttons: i,
|
|
455
438
|
icon: a = Bn,
|
|
456
439
|
headingLevel: l = "h3",
|
|
457
|
-
...
|
|
440
|
+
...s
|
|
458
441
|
}) => {
|
|
459
|
-
const
|
|
460
|
-
return /* @__PURE__ */ n(bn, { ...
|
|
442
|
+
const u = !e && !t ? "Something unexpected happened." : e;
|
|
443
|
+
return /* @__PURE__ */ n(bn, { ...s, children: /* @__PURE__ */ n(fn, { children: /* @__PURE__ */ o(h, { spacing: 1, gap: 3, alignItems: "center", children: [
|
|
461
444
|
/* @__PURE__ */ o(h, { alignItems: "center", children: [
|
|
462
445
|
/* @__PURE__ */ n(m, { num: 1 }),
|
|
463
446
|
/* @__PURE__ */ n(j, { icon: a, size: "xl" })
|
|
464
447
|
] }),
|
|
465
448
|
t && /* @__PURE__ */ n(M, { as: l, children: t }),
|
|
466
|
-
|
|
449
|
+
u && /* @__PURE__ */ n(b, { children: u }),
|
|
467
450
|
r,
|
|
468
|
-
i && /* @__PURE__ */ o(
|
|
451
|
+
i && /* @__PURE__ */ o(d, { children: [
|
|
469
452
|
/* @__PURE__ */ n(m, { num: 2 }),
|
|
470
453
|
i
|
|
471
454
|
] })
|
|
472
455
|
] }) }) });
|
|
473
456
|
}, Qe = (e) => /* @__PURE__ */ n(
|
|
474
|
-
|
|
457
|
+
d,
|
|
475
458
|
{
|
|
476
459
|
width: "100%",
|
|
477
460
|
height: "100%",
|
|
@@ -481,12 +464,12 @@ const $ = ({
|
|
|
481
464
|
}
|
|
482
465
|
), ge = ({
|
|
483
466
|
text: e = "Loading..."
|
|
484
|
-
}) => /* @__PURE__ */ o(
|
|
467
|
+
}) => /* @__PURE__ */ o(d, { alignItems: "center", children: [
|
|
485
468
|
/* @__PURE__ */ n(_n, { size: "small" }),
|
|
486
469
|
/* @__PURE__ */ n(m, { num: 4 }),
|
|
487
470
|
/* @__PURE__ */ n(M, { variant: "h4", children: e })
|
|
488
471
|
] }), Ve = (e) => /* @__PURE__ */ n(
|
|
489
|
-
|
|
472
|
+
d,
|
|
490
473
|
{
|
|
491
474
|
width: "100%",
|
|
492
475
|
height: "100%",
|
|
@@ -499,10 +482,10 @@ const $ = ({
|
|
|
499
482
|
renderPageHeading: t,
|
|
500
483
|
renderTabs: r,
|
|
501
484
|
children: i
|
|
502
|
-
}) => /* @__PURE__ */ o(
|
|
503
|
-
/* @__PURE__ */ o(
|
|
504
|
-
e && /* @__PURE__ */ o(
|
|
505
|
-
/* @__PURE__ */ n(
|
|
485
|
+
}) => /* @__PURE__ */ o(d, { shadow: "bottom", background: f("--lhds-color-ui-50"), gap: 2, children: [
|
|
486
|
+
/* @__PURE__ */ o(d, { indent: 3, children: [
|
|
487
|
+
e && /* @__PURE__ */ o(c, { spacing: 1, alignItems: "center", children: [
|
|
488
|
+
/* @__PURE__ */ n(c, { width: "64px", height: "16px" }),
|
|
506
489
|
e()
|
|
507
490
|
] }),
|
|
508
491
|
t == null ? void 0 : t(),
|
|
@@ -510,19 +493,19 @@ const $ = ({
|
|
|
510
493
|
r == null ? void 0 : r()
|
|
511
494
|
] }),
|
|
512
495
|
i
|
|
513
|
-
] }), Ze = (e) => /* @__PURE__ */ n(
|
|
496
|
+
] }), Ze = (e) => /* @__PURE__ */ n(c, { indent: 3, spacing: !0, ...e }), nt = ({
|
|
514
497
|
icon: e,
|
|
515
498
|
heading: t,
|
|
516
499
|
headingLevel: r = "h2",
|
|
517
500
|
contentLeft: i,
|
|
518
501
|
contentRight: a
|
|
519
|
-
}) => /* @__PURE__ */ o(
|
|
520
|
-
/* @__PURE__ */ o(
|
|
521
|
-
/* @__PURE__ */ n(
|
|
502
|
+
}) => /* @__PURE__ */ o(c, { alignItems: "center", gap: 2, height: "64px", children: [
|
|
503
|
+
/* @__PURE__ */ o(c, { alignItems: "center", children: [
|
|
504
|
+
/* @__PURE__ */ n(c, { width: "64px", alignItems: "center", children: e && /* @__PURE__ */ n(j, { icon: e }) }),
|
|
522
505
|
/* @__PURE__ */ n(M, { variant: "h3", as: r, children: t })
|
|
523
506
|
] }),
|
|
524
|
-
/* @__PURE__ */ n(
|
|
525
|
-
/* @__PURE__ */ n(
|
|
507
|
+
/* @__PURE__ */ n(c, { alignItems: "center", children: i }),
|
|
508
|
+
/* @__PURE__ */ n(c, { style: { marginLeft: "auto" }, alignItems: "center", children: a })
|
|
526
509
|
] }), me = "_sidebarMenu_1bx5w_1", be = "_sidebarItems_1bx5w_38", fe = "_scrollContainer_1bx5w_48", F = {
|
|
527
510
|
sidebarMenu: me,
|
|
528
511
|
sidebarItems: be,
|
|
@@ -532,7 +515,7 @@ const $ = ({
|
|
|
532
515
|
}, ve = ({ onClick: e }) => /* @__PURE__ */ o(h, { background: f("--lhds-color-ui-50"), children: [
|
|
533
516
|
/* @__PURE__ */ n(m, {}),
|
|
534
517
|
/* @__PURE__ */ o(
|
|
535
|
-
|
|
518
|
+
c,
|
|
536
519
|
{
|
|
537
520
|
justifyContent: "space-between",
|
|
538
521
|
alignItems: "center",
|
|
@@ -556,11 +539,11 @@ const $ = ({
|
|
|
556
539
|
pinButtonVisible: i,
|
|
557
540
|
onClickPinButton: a,
|
|
558
541
|
bottomItems: l,
|
|
559
|
-
isPinned:
|
|
560
|
-
...
|
|
561
|
-
}) => /* @__PURE__ */ o(
|
|
542
|
+
isPinned: s,
|
|
543
|
+
...u
|
|
544
|
+
}) => /* @__PURE__ */ o(d, { ...u, className: p(F.sidebarMenu, e), children: [
|
|
562
545
|
/* @__PURE__ */ n(ve, { onClick: r }),
|
|
563
|
-
/* @__PURE__ */ n(
|
|
546
|
+
/* @__PURE__ */ n(d, { className: F.scrollContainer, children: /* @__PURE__ */ o(
|
|
564
547
|
h,
|
|
565
548
|
{
|
|
566
549
|
className: F.sidebarItems,
|
|
@@ -575,7 +558,7 @@ const $ = ({
|
|
|
575
558
|
i && /* @__PURE__ */ n(
|
|
576
559
|
Ce,
|
|
577
560
|
{
|
|
578
|
-
isPinned:
|
|
561
|
+
isPinned: s,
|
|
579
562
|
onClick: a
|
|
580
563
|
}
|
|
581
564
|
),
|
|
@@ -598,7 +581,7 @@ const $ = ({
|
|
|
598
581
|
bottomItems: a,
|
|
599
582
|
closeButtonTitle: l = "Unpin menu"
|
|
600
583
|
}) => /* @__PURE__ */ o(
|
|
601
|
-
|
|
584
|
+
d,
|
|
602
585
|
{
|
|
603
586
|
position: "fixed",
|
|
604
587
|
left: 0,
|
|
@@ -629,7 +612,7 @@ const $ = ({
|
|
|
629
612
|
}
|
|
630
613
|
), ye = ({
|
|
631
614
|
label: e
|
|
632
|
-
}) => z() ? null : /* @__PURE__ */ o(
|
|
615
|
+
}) => z() ? null : /* @__PURE__ */ o(d, { height: "32px", justifyContent: "center", indent: 1, children: [
|
|
633
616
|
/* @__PURE__ */ n(m, {}),
|
|
634
617
|
/* @__PURE__ */ n(b, { variant: "overline", size: "smaller", children: e })
|
|
635
618
|
] }), Ie = ({
|
|
@@ -649,7 +632,7 @@ const $ = ({
|
|
|
649
632
|
trigger: ["hover", "focus"],
|
|
650
633
|
disablePadding: !0,
|
|
651
634
|
children: /* @__PURE__ */ n(
|
|
652
|
-
|
|
635
|
+
d,
|
|
653
636
|
{
|
|
654
637
|
minWidth: i,
|
|
655
638
|
shadow: "popover",
|
|
@@ -670,12 +653,12 @@ const $ = ({
|
|
|
670
653
|
className: i,
|
|
671
654
|
initialExpand: a = !1
|
|
672
655
|
}) => {
|
|
673
|
-
const [l,
|
|
656
|
+
const [l, s] = Sn(a);
|
|
674
657
|
return z() ? r == null ? null : /* @__PURE__ */ n(we, { label: t, icon: r, children: e }) : /* @__PURE__ */ n(
|
|
675
658
|
L,
|
|
676
659
|
{
|
|
677
660
|
label: t,
|
|
678
|
-
onClick: () =>
|
|
661
|
+
onClick: () => s(!l),
|
|
679
662
|
leftIcon: r,
|
|
680
663
|
className: i,
|
|
681
664
|
expandable: !0,
|
|
@@ -691,7 +674,7 @@ const $ = ({
|
|
|
691
674
|
...e
|
|
692
675
|
}
|
|
693
676
|
), at = ({ numItemsSelected: e, label: t, afterLabelContent: r, rightContent: i }) => /* @__PURE__ */ o(
|
|
694
|
-
|
|
677
|
+
c,
|
|
695
678
|
{
|
|
696
679
|
indent: 3,
|
|
697
680
|
spacing: !0,
|
|
@@ -703,8 +686,8 @@ const $ = ({
|
|
|
703
686
|
flex: 1,
|
|
704
687
|
borderRadius: "var(--swui-border-radius)",
|
|
705
688
|
children: [
|
|
706
|
-
/* @__PURE__ */ o(
|
|
707
|
-
e != null || t != null ? /* @__PURE__ */ n(
|
|
689
|
+
/* @__PURE__ */ o(c, { alignItems: "center", gap: 2, children: [
|
|
690
|
+
e != null || t != null ? /* @__PURE__ */ n(c, { alignItems: "center", children: e != null ? /* @__PURE__ */ o(_, { children: [
|
|
708
691
|
/* @__PURE__ */ n(b, { children: e }),
|
|
709
692
|
/* @__PURE__ */ n(m, {}),
|
|
710
693
|
/* @__PURE__ */ o(b, { children: [
|
|
@@ -712,13 +695,13 @@ const $ = ({
|
|
|
712
695
|
e === 1 ? "" : "s",
|
|
713
696
|
" selected"
|
|
714
697
|
] })
|
|
715
|
-
] }) : t != null ? /* @__PURE__ */ n(
|
|
716
|
-
r && /* @__PURE__ */ n(
|
|
698
|
+
] }) : t != null ? /* @__PURE__ */ n(_, { children: typeof t == "string" ? /* @__PURE__ */ n(b, { children: t }) : t }) : null }) : null,
|
|
699
|
+
r && /* @__PURE__ */ n(c, { children: r })
|
|
717
700
|
] }),
|
|
718
|
-
/* @__PURE__ */ n(
|
|
701
|
+
/* @__PURE__ */ n(c, { gap: 2, children: i })
|
|
719
702
|
]
|
|
720
703
|
}
|
|
721
|
-
), lt = ({ children: e }) => /* @__PURE__ */ n(
|
|
704
|
+
), lt = ({ children: e }) => /* @__PURE__ */ n(c, { spacing: 0.5, indent: 0.5, flex: 1, children: e });
|
|
722
705
|
export {
|
|
723
706
|
jn as ActionMenuFlatButton,
|
|
724
707
|
Pe as ActionMenuPrimaryButton,
|