@dmsi/wedgekit-react 0.0.299 → 0.0.301
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CalendarRange.css +3 -0
- package/dist/components/DateInput.css +3 -0
- package/dist/components/DateRangeInput.css +3 -0
- package/dist/components/NestedMenu.cjs +18 -4
- package/dist/components/NestedMenu.js +21 -5
- package/dist/components/index.css +3 -0
- package/dist/index.css +3 -0
- package/package.json +1 -1
- package/src/components/NestedMenu.tsx +18 -6
|
@@ -2166,6 +2166,9 @@
|
|
|
2166
2166
|
.text-text-action-disabled {
|
|
2167
2167
|
color: var(--color-text-action-disabled);
|
|
2168
2168
|
}
|
|
2169
|
+
.text-text-action-normal {
|
|
2170
|
+
color: var(--color-text-action-normal);
|
|
2171
|
+
}
|
|
2169
2172
|
.text-text-action-primary-normal {
|
|
2170
2173
|
color: var(--color-text-action-primary-normal);
|
|
2171
2174
|
}
|
|
@@ -2166,6 +2166,9 @@
|
|
|
2166
2166
|
.text-text-action-disabled {
|
|
2167
2167
|
color: var(--color-text-action-disabled);
|
|
2168
2168
|
}
|
|
2169
|
+
.text-text-action-normal {
|
|
2170
|
+
color: var(--color-text-action-normal);
|
|
2171
|
+
}
|
|
2169
2172
|
.text-text-action-primary-normal {
|
|
2170
2173
|
color: var(--color-text-action-primary-normal);
|
|
2171
2174
|
}
|
|
@@ -2166,6 +2166,9 @@
|
|
|
2166
2166
|
.text-text-action-disabled {
|
|
2167
2167
|
color: var(--color-text-action-disabled);
|
|
2168
2168
|
}
|
|
2169
|
+
.text-text-action-normal {
|
|
2170
|
+
color: var(--color-text-action-normal);
|
|
2171
|
+
}
|
|
2169
2172
|
.text-text-action-primary-normal {
|
|
2170
2173
|
color: var(--color-text-action-primary-normal);
|
|
2171
2174
|
}
|
|
@@ -614,17 +614,31 @@ function NestedMenu(props) {
|
|
|
614
614
|
MenuOption,
|
|
615
615
|
{
|
|
616
616
|
testid: testid ? `${testid}-back` : void 0,
|
|
617
|
-
variant: "
|
|
618
|
-
before: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
617
|
+
variant: "normal",
|
|
618
|
+
before: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
619
|
+
Icon,
|
|
620
|
+
{
|
|
621
|
+
name: "chevron_left",
|
|
622
|
+
className: "icon text-text-action-normal",
|
|
623
|
+
size: 24
|
|
624
|
+
}
|
|
625
|
+
),
|
|
619
626
|
onClick: () => {
|
|
620
627
|
var _a2;
|
|
621
628
|
return handleMenuClick((_a2 = currentMenu.previousMenu) != null ? _a2 : null, true);
|
|
622
629
|
},
|
|
623
630
|
selected: selectedIndex === -1,
|
|
624
|
-
children: currentMenu.previousMenu ? currentMenu.previousMenu.label : "Main Menu"
|
|
631
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Label, { color: "text-action-normal", children: currentMenu.previousMenu ? currentMenu.previousMenu.label : "Main Menu" })
|
|
632
|
+
}
|
|
633
|
+
),
|
|
634
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
635
|
+
MenuOption,
|
|
636
|
+
{
|
|
637
|
+
variant: "action",
|
|
638
|
+
testid: testid ? `${testid}-title` : void 0,
|
|
639
|
+
children: (_a = currentMenu.title) != null ? _a : currentMenu.label
|
|
625
640
|
}
|
|
626
641
|
),
|
|
627
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MenuOption, { variant: "action", testid: testid ? `${testid}-title` : void 0, children: (_a = currentMenu.title) != null ? _a : currentMenu.label }),
|
|
628
642
|
(currentMenu.subEntries || []).map((item, idx) => {
|
|
629
643
|
var _a2;
|
|
630
644
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
MenuOption
|
|
4
4
|
} from "../chunk-CKQNJNU3.js";
|
|
5
|
-
import
|
|
5
|
+
import {
|
|
6
|
+
Label
|
|
7
|
+
} from "../chunk-7CS736EF.js";
|
|
6
8
|
import {
|
|
7
9
|
useKeydown
|
|
8
10
|
} from "../chunk-JUJBS4ZV.js";
|
|
@@ -71,17 +73,31 @@ function NestedMenu(props) {
|
|
|
71
73
|
MenuOption,
|
|
72
74
|
{
|
|
73
75
|
testid: testid ? `${testid}-back` : void 0,
|
|
74
|
-
variant: "
|
|
75
|
-
before: /* @__PURE__ */ jsx(
|
|
76
|
+
variant: "normal",
|
|
77
|
+
before: /* @__PURE__ */ jsx(
|
|
78
|
+
Icon,
|
|
79
|
+
{
|
|
80
|
+
name: "chevron_left",
|
|
81
|
+
className: "icon text-text-action-normal",
|
|
82
|
+
size: 24
|
|
83
|
+
}
|
|
84
|
+
),
|
|
76
85
|
onClick: () => {
|
|
77
86
|
var _a2;
|
|
78
87
|
return handleMenuClick((_a2 = currentMenu.previousMenu) != null ? _a2 : null, true);
|
|
79
88
|
},
|
|
80
89
|
selected: selectedIndex === -1,
|
|
81
|
-
children: currentMenu.previousMenu ? currentMenu.previousMenu.label : "Main Menu"
|
|
90
|
+
children: /* @__PURE__ */ jsx(Label, { color: "text-action-normal", children: currentMenu.previousMenu ? currentMenu.previousMenu.label : "Main Menu" })
|
|
91
|
+
}
|
|
92
|
+
),
|
|
93
|
+
/* @__PURE__ */ jsx(
|
|
94
|
+
MenuOption,
|
|
95
|
+
{
|
|
96
|
+
variant: "action",
|
|
97
|
+
testid: testid ? `${testid}-title` : void 0,
|
|
98
|
+
children: (_a = currentMenu.title) != null ? _a : currentMenu.label
|
|
82
99
|
}
|
|
83
100
|
),
|
|
84
|
-
/* @__PURE__ */ jsx(MenuOption, { variant: "action", testid: testid ? `${testid}-title` : void 0, children: (_a = currentMenu.title) != null ? _a : currentMenu.label }),
|
|
85
101
|
(currentMenu.subEntries || []).map((item, idx) => {
|
|
86
102
|
var _a2;
|
|
87
103
|
return /* @__PURE__ */ jsx(
|
|
@@ -2166,6 +2166,9 @@
|
|
|
2166
2166
|
.text-text-action-disabled {
|
|
2167
2167
|
color: var(--color-text-action-disabled);
|
|
2168
2168
|
}
|
|
2169
|
+
.text-text-action-normal {
|
|
2170
|
+
color: var(--color-text-action-normal);
|
|
2171
|
+
}
|
|
2169
2172
|
.text-text-action-primary-normal {
|
|
2170
2173
|
color: var(--color-text-action-primary-normal);
|
|
2171
2174
|
}
|
package/dist/index.css
CHANGED
|
@@ -2144,6 +2144,9 @@
|
|
|
2144
2144
|
.text-text-action-disabled {
|
|
2145
2145
|
color: var(--color-text-action-disabled);
|
|
2146
2146
|
}
|
|
2147
|
+
.text-text-action-normal {
|
|
2148
|
+
color: var(--color-text-action-normal);
|
|
2149
|
+
}
|
|
2147
2150
|
.text-text-action-primary-normal {
|
|
2148
2151
|
color: var(--color-text-action-primary-normal);
|
|
2149
2152
|
}
|
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import { useState } from "react";
|
|
|
4
4
|
import { Icon } from "./Icon";
|
|
5
5
|
import { MenuOption } from "./MenuOption";
|
|
6
6
|
import { useKeydown } from "../hooks";
|
|
7
|
+
import { Label } from "./Label";
|
|
7
8
|
|
|
8
9
|
export type NestedMenuEntry = {
|
|
9
10
|
id: string; // Unique identifier for the nested menu entry
|
|
@@ -70,16 +71,27 @@ export function NestedMenu(props: NestedMenuProps) {
|
|
|
70
71
|
<div className="flex flex-col w-full">
|
|
71
72
|
<MenuOption
|
|
72
73
|
testid={testid ? `${testid}-back` : undefined}
|
|
73
|
-
variant="
|
|
74
|
-
before={
|
|
74
|
+
variant="normal"
|
|
75
|
+
before={
|
|
76
|
+
<Icon
|
|
77
|
+
name="chevron_left"
|
|
78
|
+
className="icon text-text-action-normal"
|
|
79
|
+
size={24}
|
|
80
|
+
/>
|
|
81
|
+
}
|
|
75
82
|
onClick={() => handleMenuClick(currentMenu.previousMenu ?? null, true)}
|
|
76
83
|
selected={selectedIndex === -1}
|
|
77
84
|
>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
85
|
+
<Label color="text-action-normal">
|
|
86
|
+
{currentMenu.previousMenu
|
|
87
|
+
? currentMenu.previousMenu.label
|
|
88
|
+
: "Main Menu"}
|
|
89
|
+
</Label>
|
|
81
90
|
</MenuOption>
|
|
82
|
-
<MenuOption
|
|
91
|
+
<MenuOption
|
|
92
|
+
variant="action"
|
|
93
|
+
testid={testid ? `${testid}-title` : undefined}
|
|
94
|
+
>
|
|
83
95
|
{currentMenu.title ?? currentMenu.label}
|
|
84
96
|
</MenuOption>
|
|
85
97
|
{(currentMenu.subEntries || []).map((item, idx) => (
|