@stenajs-webui/elements 21.29.16 → 21.30.0
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,6 +1,6 @@
|
|
1
1
|
import * as React from "react";
|
2
|
-
import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
3
2
|
import { ReactNode } from "react";
|
3
|
+
import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
4
4
|
export interface MenuButtonContentProps {
|
5
5
|
leftIcon?: IconDefinition;
|
6
6
|
left?: ReactNode;
|
package/dist/index.es.js
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
import * as y from "react";
|
3
3
|
import { forwardRef as f, Children as a1, useState as R1, useCallback as T, useId as V1, useContext as T1, useMemo as D1 } from "react";
|
4
4
|
import { jsx as C, jsxs as r, Fragment as B } from "react/jsx-runtime";
|
5
|
-
import { Box as
|
5
|
+
import { Box as x, getDataProps as H, Column as _, Row as Z, Heading as X, Text as k, Space as I, Indent as t1, exhaustSwitchCaseElseThrow as b1, useForwardedRef as F1, Spacing as j1, SeparatorLine as E1, Txt as S, ScreenReaderOnlyText as O1 } from "@stenajs-webui/core";
|
6
6
|
import { FontAwesomeIcon as R } from "@fortawesome/react-fontawesome";
|
7
7
|
import l from "classnames";
|
8
8
|
import { keyframes as P1, ClassNames as W1 } from "@emotion/react";
|
9
|
-
import { cssColor as
|
9
|
+
import { cssColor as p } from "@stenajs-webui/theme";
|
10
10
|
import { FocusScope as U1, useFocusManager as G1 } from "@react-aria/focus";
|
11
11
|
const K1 = ({
|
12
12
|
title: n,
|
@@ -3670,7 +3670,7 @@ const K1 = ({
|
|
3670
3670
|
if (!o)
|
3671
3671
|
return null;
|
3672
3672
|
const g = typeof c == "string" ? c : c / 10 + "rem";
|
3673
|
-
return /* @__PURE__ */ C(
|
3673
|
+
return /* @__PURE__ */ C(x, { justifyContent: "center", alignItems: "center", display: u, children: /* @__PURE__ */ C(
|
3674
3674
|
R,
|
3675
3675
|
{
|
3676
3676
|
className: L,
|
@@ -3766,8 +3766,8 @@ const K1 = ({
|
|
3766
3766
|
] })
|
3767
3767
|
] }),
|
3768
3768
|
i && /* @__PURE__ */ r(Z, { children: [
|
3769
|
-
/* @__PURE__ */ C(
|
3770
|
-
/* @__PURE__ */ r(
|
3769
|
+
/* @__PURE__ */ C(x, { minWidth: p1 }),
|
3770
|
+
/* @__PURE__ */ r(x, { children: [
|
3771
3771
|
/* @__PURE__ */ C(I, {}),
|
3772
3772
|
i
|
3773
3773
|
] })
|
@@ -3914,7 +3914,7 @@ const K1 = ({
|
|
3914
3914
|
{
|
3915
3915
|
icon: C2,
|
3916
3916
|
size: 8,
|
3917
|
-
color:
|
3917
|
+
color: p("--lhds-color-ui-700")
|
3918
3918
|
}
|
3919
3919
|
) }),
|
3920
3920
|
L
|
@@ -4229,7 +4229,7 @@ const K1 = ({
|
|
4229
4229
|
{
|
4230
4230
|
variant: "bold",
|
4231
4231
|
className: M.label,
|
4232
|
-
color: "
|
4232
|
+
color: p("--swui-text-primary-color"),
|
4233
4233
|
children: n
|
4234
4234
|
}
|
4235
4235
|
),
|
@@ -4239,12 +4239,12 @@ function _1({
|
|
4239
4239
|
content: n,
|
4240
4240
|
icon: L
|
4241
4241
|
}) {
|
4242
|
-
return n ? /* @__PURE__ */ C(B, { children: n }) : L ? /* @__PURE__ */ C(
|
4242
|
+
return n ? /* @__PURE__ */ C(B, { children: n }) : L ? /* @__PURE__ */ C(x, { alignItems: "center", justifyContent: "center", width: "20px", children: /* @__PURE__ */ C(
|
4243
4243
|
z,
|
4244
4244
|
{
|
4245
4245
|
icon: L,
|
4246
4246
|
size: 20,
|
4247
|
-
color: "
|
4247
|
+
color: p("--swui-text-primary-color"),
|
4248
4248
|
"data-hover": !0
|
4249
4249
|
}
|
4250
4250
|
) }) : null;
|
@@ -4268,9 +4268,9 @@ const T5 = f(
|
|
4268
4268
|
...g
|
4269
4269
|
}, w) {
|
4270
4270
|
const A = !n && !e;
|
4271
|
-
return /* @__PURE__ */ r(
|
4271
|
+
return /* @__PURE__ */ r(x, { children: [
|
4272
4272
|
/* @__PURE__ */ C(
|
4273
|
-
|
4273
|
+
x,
|
4274
4274
|
{
|
4275
4275
|
"aria-expanded": L,
|
4276
4276
|
className: l(M.menuButton),
|
@@ -4306,7 +4306,7 @@ const T5 = f(
|
|
4306
4306
|
{
|
4307
4307
|
icon: L ? w1 : y1,
|
4308
4308
|
size: 18,
|
4309
|
-
color:
|
4309
|
+
color: p("--lhds-color-blue-600")
|
4310
4310
|
}
|
4311
4311
|
)
|
4312
4312
|
]
|
@@ -4324,7 +4324,7 @@ const T5 = f(
|
|
4324
4324
|
contentMenuButton: D5
|
4325
4325
|
}, gC = f(({ children: n, ...L }, e) => /* @__PURE__ */ C("label", { className: F5.contentMenuButton, ref: e, ...L, children: /* @__PURE__ */ C(Z, { justifyContent: "flex-start", alignItems: "center", indent: 2, children: n }) })), bC = f(function({ selected: n, className: L, icon: e, disabled: i, variant: o = "standard", ...a }, t) {
|
4326
4326
|
return /* @__PURE__ */ C(
|
4327
|
-
|
4327
|
+
x,
|
4328
4328
|
{
|
4329
4329
|
className: l(M.menuButton),
|
4330
4330
|
width: "100%",
|
@@ -4345,7 +4345,7 @@ const T5 = f(
|
|
4345
4345
|
disabled: i,
|
4346
4346
|
ref: t,
|
4347
4347
|
...a,
|
4348
|
-
children: /* @__PURE__ */ C(Z, { justifyContent: "center", alignItems: "center", indent: 1, children: /* @__PURE__ */ C(
|
4348
|
+
children: /* @__PURE__ */ C(Z, { justifyContent: "center", alignItems: "center", indent: 1, children: /* @__PURE__ */ C(x, { alignItems: "center", justifyContent: "center", width: "20px", children: /* @__PURE__ */ C(
|
4349
4349
|
z,
|
4350
4350
|
{
|
4351
4351
|
icon: e,
|
@@ -4395,10 +4395,10 @@ const T5 = f(
|
|
4395
4395
|
children: s
|
4396
4396
|
}
|
4397
4397
|
);
|
4398
|
-
return /* @__PURE__ */ C(
|
4398
|
+
return /* @__PURE__ */ C(x, { className: l(M.menuButton), width: "100%", children: w });
|
4399
4399
|
}), yC = f(function({ className: n, icon: L, disabled: e, variant: i = "standard", href: o, ...a }, t) {
|
4400
4400
|
var w;
|
4401
|
-
const c = /* @__PURE__ */ C(Z, { justifyContent: "center", indent: 1, children: /* @__PURE__ */ C(
|
4401
|
+
const c = /* @__PURE__ */ C(Z, { justifyContent: "center", indent: 1, children: /* @__PURE__ */ C(x, { alignItems: "center", justifyContent: "center", width: "20px", children: /* @__PURE__ */ C(
|
4402
4402
|
z,
|
4403
4403
|
{
|
4404
4404
|
icon: L,
|
@@ -4434,7 +4434,7 @@ const T5 = f(
|
|
4434
4434
|
}
|
4435
4435
|
);
|
4436
4436
|
return /* @__PURE__ */ C(
|
4437
|
-
|
4437
|
+
x,
|
4438
4438
|
{
|
4439
4439
|
className: l(M.menuButton),
|
4440
4440
|
width: "100%",
|
@@ -4565,15 +4565,15 @@ const T5 = f(
|
|
4565
4565
|
}) => {
|
4566
4566
|
const a = K5(e), t = X5(e);
|
4567
4567
|
return /* @__PURE__ */ C(
|
4568
|
-
|
4568
|
+
x,
|
4569
4569
|
{
|
4570
4570
|
borderRadius: "50%",
|
4571
|
-
background:
|
4571
|
+
background: p(n ?? Q5(i)),
|
4572
4572
|
width: a,
|
4573
4573
|
height: a,
|
4574
4574
|
justifyContent: "center",
|
4575
4575
|
alignItems: "center",
|
4576
|
-
children: /* @__PURE__ */ C(z, { ...o, color:
|
4576
|
+
children: /* @__PURE__ */ C(z, { ...o, color: p(L), size: t })
|
4577
4577
|
}
|
4578
4578
|
);
|
4579
4579
|
}, K5 = (n) => {
|
@@ -4654,16 +4654,16 @@ const T5 = f(
|
|
4654
4654
|
className: i,
|
4655
4655
|
...o
|
4656
4656
|
}) => /* @__PURE__ */ r(
|
4657
|
-
|
4657
|
+
x,
|
4658
4658
|
{
|
4659
4659
|
...o,
|
4660
|
-
background:
|
4660
|
+
background: p(L),
|
4661
4661
|
position: e ? "relative" : void 0,
|
4662
4662
|
className: l(d1.cardy, i),
|
4663
4663
|
children: [
|
4664
4664
|
n,
|
4665
4665
|
e && /* @__PURE__ */ C(
|
4666
|
-
|
4666
|
+
x,
|
4667
4667
|
{
|
4668
4668
|
top: 0,
|
4669
4669
|
bottom: 0,
|
@@ -4684,7 +4684,7 @@ const T5 = f(
|
|
4684
4684
|
leftIcon: e,
|
4685
4685
|
headingLevel: i,
|
4686
4686
|
...o
|
4687
|
-
}) => /* @__PURE__ */ r(
|
4687
|
+
}) => /* @__PURE__ */ r(x, { className: d1.cardyIndent, children: [
|
4688
4688
|
/* @__PURE__ */ r(Z, { alignItems: "center", justifyContent: "space-between", gap: 2, children: [
|
4689
4689
|
/* @__PURE__ */ r(Z, { alignItems: "center", gap: 2, children: [
|
4690
4690
|
e && /* @__PURE__ */ C(z, { icon: e, size: "var(--swui-heading-font-size)" }),
|
@@ -4693,7 +4693,7 @@ const T5 = f(
|
|
4693
4693
|
L
|
4694
4694
|
] }),
|
4695
4695
|
/* @__PURE__ */ C(I, { num: 3 })
|
4696
|
-
] }), TC = (n) => /* @__PURE__ */ C(
|
4696
|
+
] }), TC = (n) => /* @__PURE__ */ C(x, { className: d1.cardyIndent, ...n }), Y5 = "_chip_1k9u8_1", C4 = "_chipCell_1k9u8_25", L4 = "_label_1k9u8_36", e4 = "_removable_1k9u8_40", n4 = "_close_1k9u8_79", i4 = "_circle_1k9u8_83", o4 = "_primary_1k9u8_104", a4 = "_secondary_1k9u8_112", v = {
|
4697
4697
|
chip: Y5,
|
4698
4698
|
chipCell: C4,
|
4699
4699
|
label: L4,
|
@@ -4755,19 +4755,19 @@ const T5 = f(
|
|
4755
4755
|
const m = t4(L, i), d = m && /* @__PURE__ */ C(
|
4756
4756
|
k,
|
4757
4757
|
{
|
4758
|
-
color:
|
4758
|
+
color: p("--lhds-color-ui-800"),
|
4759
4759
|
variant: "caption",
|
4760
4760
|
size: "small",
|
4761
4761
|
children: m
|
4762
4762
|
}
|
4763
4763
|
);
|
4764
4764
|
return /* @__PURE__ */ r("label", { htmlFor: t, className: c, children: [
|
4765
|
-
/* @__PURE__ */ r(
|
4765
|
+
/* @__PURE__ */ r(x, { ...s, row: o, gap: !0, children: [
|
4766
4766
|
/* @__PURE__ */ r(Z, { alignItems: "center", width: a, children: [
|
4767
4767
|
/* @__PURE__ */ C(
|
4768
4768
|
k,
|
4769
4769
|
{
|
4770
|
-
color:
|
4770
|
+
color: p("--tjara"),
|
4771
4771
|
variant: "bold",
|
4772
4772
|
size: "small",
|
4773
4773
|
whiteSpace: "nowrap",
|
@@ -4807,13 +4807,13 @@ const T5 = f(
|
|
4807
4807
|
case "none":
|
4808
4808
|
return;
|
4809
4809
|
case "info":
|
4810
|
-
return
|
4810
|
+
return p("--lhds-color-blue-100");
|
4811
4811
|
case "error":
|
4812
|
-
return
|
4812
|
+
return p("--lhds-color-red-100");
|
4813
4813
|
case "warning":
|
4814
|
-
return
|
4814
|
+
return p("--lhds-color-orange-100");
|
4815
4815
|
case "success":
|
4816
|
-
return
|
4816
|
+
return p("--lhds-color-green-100");
|
4817
4817
|
}
|
4818
4818
|
}, c4 = "_badge_1b6e7_1", r4 = "_info_1b6e7_17", m4 = "_warning_1b6e7_21", l4 = "_error_1b6e7_25", d4 = "_label_1b6e7_29", L1 = {
|
4819
4819
|
badge: c4,
|
@@ -4841,7 +4841,7 @@ const T5 = f(
|
|
4841
4841
|
...o
|
4842
4842
|
}) => /* @__PURE__ */ r(Z, { children: [
|
4843
4843
|
n,
|
4844
|
-
/* @__PURE__ */ C("div", { style: { position: "relative" }, children: i ? null : /* @__PURE__ */ C(
|
4844
|
+
/* @__PURE__ */ C("div", { style: { position: "relative" }, children: i ? null : /* @__PURE__ */ C(x, { top: L, left: e, position: "absolute", children: /* @__PURE__ */ C(M4, { ...o }) }) })
|
4845
4845
|
] }), Z4 = "_toggleButton_u1x04_1", u4 = "_selected_u1x04_50", f4 = "_disabled_u1x04_56", p4 = "_small_u1x04_62", x4 = "_medium_u1x04_69", h4 = "_large_u1x04_73", O = {
|
4846
4846
|
toggleButton: Z4,
|
4847
4847
|
selected: u4,
|
@@ -5128,7 +5128,7 @@ const T5 = f(
|
|
5128
5128
|
children: /* @__PURE__ */ C("tbody", { children: a1.map(n, (a, t) => /* @__PURE__ */ C("tr", { className: P.row, children: a }, t)) })
|
5129
5129
|
}
|
5130
5130
|
),
|
5131
|
-
e && /* @__PURE__ */ C(Z, { spacing: !0, children: /* @__PURE__ */ C(k, { size: "small", color:
|
5131
|
+
e && /* @__PURE__ */ C(Z, { spacing: !0, children: /* @__PURE__ */ C(k, { size: "small", color: p("--lhds-color-ui-600"), children: e }) })
|
5132
5132
|
] }), YC = ({
|
5133
5133
|
label: n,
|
5134
5134
|
value: L,
|
@@ -5140,7 +5140,7 @@ const T5 = f(
|
|
5140
5140
|
{
|
5141
5141
|
icon: D,
|
5142
5142
|
size: 14,
|
5143
|
-
color:
|
5143
|
+
color: p("--lhds-color-ui-700")
|
5144
5144
|
}
|
5145
5145
|
) : "-" : typeof L == "number" ? String(L) : L, [L]);
|
5146
5146
|
return /* @__PURE__ */ r(B, { children: [
|
@@ -5153,7 +5153,7 @@ const T5 = f(
|
|
5153
5153
|
children: /* @__PURE__ */ C(
|
5154
5154
|
k,
|
5155
5155
|
{
|
5156
|
-
color:
|
5156
|
+
color: p("--tjara"),
|
5157
5157
|
variant: "bold",
|
5158
5158
|
whiteSpace: "nowrap",
|
5159
5159
|
children: n
|
@@ -5183,7 +5183,7 @@ const T5 = f(
|
|
5183
5183
|
{
|
5184
5184
|
size: "small",
|
5185
5185
|
variant: "bold",
|
5186
|
-
color:
|
5186
|
+
color: p("--lhds-color-ui-600"),
|
5187
5187
|
style: { textDecoration: "line-through" },
|
5188
5188
|
children: e
|
5189
5189
|
}
|
@@ -5198,7 +5198,7 @@ const T5 = f(
|
|
5198
5198
|
{
|
5199
5199
|
size: "small",
|
5200
5200
|
variant: "bold",
|
5201
|
-
color:
|
5201
|
+
color: p("--lhds-color-ui-600"),
|
5202
5202
|
style: { textDecoration: "line-through" },
|
5203
5203
|
children: e
|
5204
5204
|
}
|
@@ -5212,7 +5212,7 @@ const T5 = f(
|
|
5212
5212
|
S,
|
5213
5213
|
{
|
5214
5214
|
variant: "bold",
|
5215
|
-
color:
|
5215
|
+
color: p("--lhds-color-ui-600"),
|
5216
5216
|
style: { textDecoration: "line-through" },
|
5217
5217
|
children: e
|
5218
5218
|
}
|
@@ -5239,7 +5239,7 @@ const T5 = f(
|
|
5239
5239
|
{
|
5240
5240
|
icon: X1,
|
5241
5241
|
size: 16,
|
5242
|
-
color:
|
5242
|
+
color: p("--lhds-color-blue-600"),
|
5243
5243
|
className: e1.selectedIcon
|
5244
5244
|
}
|
5245
5245
|
),
|
@@ -5248,18 +5248,18 @@ const T5 = f(
|
|
5248
5248
|
/* @__PURE__ */ C(z, { icon: c, fixedWidth: !0, size: 20 }),
|
5249
5249
|
/* @__PURE__ */ C(I, { half: !0 }),
|
5250
5250
|
/* @__PURE__ */ C(
|
5251
|
-
|
5251
|
+
x,
|
5252
5252
|
{
|
5253
5253
|
flex: 1,
|
5254
|
-
border: `1px solid ${
|
5254
|
+
border: `1px solid ${p("--lhds-color-ui-900")}`,
|
5255
5255
|
borderRadius: "2px 2px 0 0"
|
5256
5256
|
}
|
5257
5257
|
),
|
5258
5258
|
/* @__PURE__ */ C(
|
5259
|
-
|
5259
|
+
x,
|
5260
5260
|
{
|
5261
5261
|
borderRadius: "50%",
|
5262
|
-
border: `2px solid ${
|
5262
|
+
border: `2px solid ${p("--lhds-color-ui-900")}`,
|
5263
5263
|
width: 16,
|
5264
5264
|
height: 16
|
5265
5265
|
}
|
@@ -5292,7 +5292,7 @@ const T5 = f(
|
|
5292
5292
|
}, eL = ({
|
5293
5293
|
className: n,
|
5294
5294
|
...L
|
5295
|
-
}) => /* @__PURE__ */ C(
|
5295
|
+
}) => /* @__PURE__ */ C(x, { className: l(J4.shimmerBox, n), ...L }), Y4 = "_line_vg53u_1", C3 = "_currentStep_vg53u_13", L3 = "_passedStep_vg53u_17", i1 = {
|
5296
5296
|
line: Y4,
|
5297
5297
|
currentStep: C3,
|
5298
5298
|
passedStep: L3
|