@webstudio-is/sdk-components-react-radix 0.91.0 → 0.92.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.
- package/lib/__generated__/accordion.props.js +6 -12
- package/lib/__generated__/checkbox.props.js +3 -6
- package/lib/__generated__/collapsible.props.js +4 -8
- package/lib/__generated__/dialog.props.js +8 -16
- package/lib/__generated__/label.props.js +2 -4
- package/lib/__generated__/navigation-menu.props.js +8 -16
- package/lib/__generated__/popover.props.js +4 -8
- package/lib/__generated__/radio-group.props.js +4 -8
- package/lib/__generated__/select.props.js +15 -19
- package/lib/__generated__/sheet.props.js +8 -16
- package/lib/__generated__/switch.props.js +3 -6
- package/lib/__generated__/tabs.props.js +5 -10
- package/lib/__generated__/tooltip.props.js +4 -8
- package/lib/accordion.js +7 -14
- package/{src/accordion.stories.tsx → lib/accordion.stories.js} +9 -12
- package/lib/accordion.ws.js +11 -22
- package/lib/checkbox.js +3 -6
- package/lib/checkbox.stories.js +19 -0
- package/lib/checkbox.ws.js +5 -10
- package/lib/collapsible.js +5 -10
- package/{src/collapsible.stories.tsx → lib/collapsible.stories.js} +9 -12
- package/lib/collapsible.ws.js +7 -14
- package/lib/components.js +13 -62
- package/lib/dialog.js +9 -18
- package/{src/dialog.stories.tsx → lib/dialog.stories.js} +9 -12
- package/lib/dialog.ws.js +15 -30
- package/lib/hooks.js +2 -4
- package/lib/label.js +2 -4
- package/lib/label.stories.js +19 -0
- package/lib/label.ws.js +3 -6
- package/lib/metas.js +55 -105
- package/lib/navigation-menu.js +9 -18
- package/{src/navigation-menu.stories.tsx → lib/navigation-menu.stories.js} +9 -12
- package/lib/navigation-menu.ws.js +16 -31
- package/lib/popover.js +5 -10
- package/{src/popover.stories.tsx → lib/popover.stories.js} +9 -12
- package/lib/popover.ws.js +7 -14
- package/lib/props-descriptions.js +2 -4
- package/lib/props.js +54 -103
- package/lib/radio-group.js +4 -8
- package/lib/radio-group.stories.js +19 -0
- package/lib/radio-group.ws.js +7 -14
- package/lib/select.js +10 -20
- package/{src/select.stories.tsx → lib/select.stories.js} +9 -12
- package/lib/select.ws.js +17 -34
- package/lib/sheet.js +9 -18
- package/{src/sheet.stories.tsx → lib/sheet.stories.js} +9 -12
- package/lib/sheet.ws.js +2 -4
- package/lib/switch.js +3 -6
- package/lib/switch.stories.js +19 -0
- package/lib/switch.ws.js +5 -10
- package/lib/tabs.js +6 -12
- package/{src/tabs.stories.tsx → lib/tabs.stories.js} +9 -12
- package/lib/tabs.ws.js +9 -18
- package/lib/theme/__generated__/tailwind-theme.js +517 -0
- package/lib/theme/styles.js +3 -6
- package/lib/theme/tailwind-classes.js +149 -301
- package/lib/theme/tailwind-colors.js +2 -4
- package/lib/tooltip.js +5 -10
- package/{src/tooltip.stories.tsx → lib/tooltip.stories.js} +9 -12
- package/lib/tooltip.ws.js +7 -14
- package/lib/types/__generated__/accordion.props.d.ts +1 -1
- package/lib/types/__generated__/checkbox.props.d.ts +1 -1
- package/lib/types/__generated__/collapsible.props.d.ts +1 -1
- package/lib/types/__generated__/dialog.props.d.ts +1 -1
- package/lib/types/__generated__/label.props.d.ts +1 -1
- package/lib/types/__generated__/navigation-menu.props.d.ts +1 -1
- package/lib/types/__generated__/popover.props.d.ts +1 -1
- package/lib/types/__generated__/radio-group.props.d.ts +1 -1
- package/lib/types/__generated__/select.props.d.ts +1 -1
- package/lib/types/__generated__/sheet.props.d.ts +1 -1
- package/lib/types/__generated__/switch.props.d.ts +1 -1
- package/lib/types/__generated__/tabs.props.d.ts +1 -1
- package/lib/types/__generated__/tooltip.props.d.ts +1 -1
- package/lib/types/accordion.d.ts +1 -1
- package/lib/types/sheet.d.ts +1 -1
- package/lib/types/theme/__generated__/tailwind-theme.d.ts +26 -0
- package/lib/types/theme/styles.d.ts +60 -60
- package/lib/types/theme/tailwind-classes.d.ts +33 -33
- package/package.json +20 -23
- package/lib/__generated__/button.props.js +0 -565
- package/lib/__generated__/input.props.js +0 -668
- package/lib/__generated__/textarea.props.js +0 -577
- package/lib/cjs/__generated__/accordion.props.js +0 -2645
- package/lib/cjs/__generated__/button.props.js +0 -585
- package/lib/cjs/__generated__/checkbox.props.js +0 -1103
- package/lib/cjs/__generated__/collapsible.props.js +0 -1050
- package/lib/cjs/__generated__/dialog.props.js +0 -2623
- package/lib/cjs/__generated__/input.props.js +0 -688
- package/lib/cjs/__generated__/label.props.js +0 -541
- package/lib/cjs/__generated__/navigation-menu.props.js +0 -2585
- package/lib/cjs/__generated__/popover.props.js +0 -582
- package/lib/cjs/__generated__/radio-group.props.js +0 -1647
- package/lib/cjs/__generated__/select.props.js +0 -3698
- package/lib/cjs/__generated__/sheet.props.js +0 -2642
- package/lib/cjs/__generated__/switch.props.js +0 -1103
- package/lib/cjs/__generated__/tabs.props.js +0 -2144
- package/lib/cjs/__generated__/textarea.props.js +0 -597
- package/lib/cjs/__generated__/tooltip.props.js +0 -593
- package/lib/cjs/accordion.js +0 -67
- package/lib/cjs/accordion.ws.js +0 -285
- package/lib/cjs/checkbox.js +0 -31
- package/lib/cjs/checkbox.ws.js +0 -174
- package/lib/cjs/collapsible.js +0 -53
- package/lib/cjs/collapsible.ws.js +0 -122
- package/lib/cjs/components.js +0 -82
- package/lib/cjs/dialog.js +0 -89
- package/lib/cjs/dialog.ws.js +0 -315
- package/lib/cjs/hooks.js +0 -43
- package/lib/cjs/label.js +0 -37
- package/lib/cjs/label.ws.js +0 -75
- package/lib/cjs/metas.js +0 -84
- package/lib/cjs/navigation-menu.js +0 -107
- package/lib/cjs/navigation-menu.ws.js +0 -514
- package/lib/cjs/package.json +0 -1
- package/lib/cjs/popover.js +0 -90
- package/lib/cjs/popover.ws.js +0 -142
- package/lib/cjs/props-descriptions.js +0 -56
- package/lib/cjs/props.js +0 -82
- package/lib/cjs/radio-group.js +0 -30
- package/lib/cjs/radio-group.ws.js +0 -191
- package/lib/cjs/select.js +0 -83
- package/lib/cjs/select.ws.js +0 -350
- package/lib/cjs/sheet.js +0 -96
- package/lib/cjs/sheet.ws.js +0 -257
- package/lib/cjs/switch.js +0 -27
- package/lib/cjs/switch.ws.js +0 -173
- package/lib/cjs/tabs.js +0 -59
- package/lib/cjs/tabs.ws.js +0 -196
- package/lib/cjs/theme/radix-common-types.js +0 -16
- package/lib/cjs/theme/styles.js +0 -96
- package/lib/cjs/theme/tailwind-classes.js +0 -819
- package/lib/cjs/theme/tailwind-colors.js +0 -45
- package/lib/cjs/theme/tailwind-theme.js +0 -46
- package/lib/cjs/tooltip.js +0 -87
- package/lib/cjs/tooltip.ws.js +0 -143
- package/lib/theme/radix-common-types.js +0 -0
- package/lib/theme/tailwind-theme.js +0 -16
- package/lib/types/__generated__/button.props.d.ts +0 -2
- package/lib/types/__generated__/input.props.d.ts +0 -2
- package/lib/types/__generated__/textarea.props.d.ts +0 -2
- package/lib/types/theme/radix-common-types.d.ts +0 -85
- package/lib/types/theme/tailwind-theme.d.ts +0 -72
- package/src/__generated__/accordion.props.ts +0 -2949
- package/src/__generated__/button.props.ts +0 -635
- package/src/__generated__/checkbox.props.ts +0 -1217
- package/src/__generated__/collapsible.props.ts +0 -1156
- package/src/__generated__/dialog.props.ts +0 -2923
- package/src/__generated__/input.props.ts +0 -748
- package/src/__generated__/label.props.ts +0 -585
- package/src/__generated__/navigation-menu.props.ts +0 -2882
- package/src/__generated__/popover.props.ts +0 -626
- package/src/__generated__/radio-group.props.ts +0 -1828
- package/src/__generated__/select.props.ts +0 -4130
- package/src/__generated__/sheet.props.ts +0 -2942
- package/src/__generated__/switch.props.ts +0 -1217
- package/src/__generated__/tabs.props.ts +0 -2386
- package/src/__generated__/textarea.props.ts +0 -645
- package/src/__generated__/tooltip.props.ts +0 -639
- package/src/accordion.tsx +0 -88
- package/src/accordion.ws.ts +0 -296
- package/src/checkbox.stories.ts +0 -22
- package/src/checkbox.tsx +0 -22
- package/src/checkbox.ws.ts +0 -154
- package/src/collapsible.tsx +0 -62
- package/src/collapsible.ws.ts +0 -115
- package/src/components.ts +0 -50
- package/src/dialog.tsx +0 -92
- package/src/dialog.ws.tsx +0 -320
- package/src/hooks.ts +0 -22
- package/src/label.stories.ts +0 -22
- package/src/label.tsx +0 -15
- package/src/label.ws.ts +0 -50
- package/src/metas.ts +0 -74
- package/src/navigation-menu.tsx +0 -130
- package/src/navigation-menu.ws.ts +0 -524
- package/src/popover.tsx +0 -96
- package/src/popover.ws.tsx +0 -128
- package/src/props-descriptions.ts +0 -43
- package/src/props.ts +0 -73
- package/src/radio-group.stories.ts +0 -22
- package/src/radio-group.tsx +0 -17
- package/src/radio-group.ws.ts +0 -178
- package/src/select.tsx +0 -112
- package/src/select.ws.ts +0 -349
- package/src/sheet.tsx +0 -79
- package/src/sheet.ws.tsx +0 -236
- package/src/switch.stories.ts +0 -22
- package/src/switch.tsx +0 -10
- package/src/switch.ws.ts +0 -146
- package/src/tabs.tsx +0 -64
- package/src/tabs.ws.ts +0 -198
- package/src/theme/radix-common-types.ts +0 -496
- package/src/theme/styles.ts +0 -76
- package/src/theme/tailwind-classes.ts +0 -1026
- package/src/theme/tailwind-colors.ts +0 -39
- package/src/theme/tailwind-theme.ts +0 -24
- package/src/tooltip.tsx +0 -95
- package/src/tooltip.ws.tsx +0 -130
package/lib/cjs/metas.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var metas_exports = {};
|
|
20
|
-
__export(metas_exports, {
|
|
21
|
-
Accordion: () => import_accordion.metaAccordion,
|
|
22
|
-
AccordionContent: () => import_accordion.metaAccordionContent,
|
|
23
|
-
AccordionHeader: () => import_accordion.metaAccordionHeader,
|
|
24
|
-
AccordionItem: () => import_accordion.metaAccordionItem,
|
|
25
|
-
AccordionTrigger: () => import_accordion.metaAccordionTrigger,
|
|
26
|
-
Checkbox: () => import_checkbox.metaCheckbox,
|
|
27
|
-
CheckboxIndicator: () => import_checkbox.metaCheckboxIndicator,
|
|
28
|
-
Collapsible: () => import_collapsible.metaCollapsible,
|
|
29
|
-
CollapsibleContent: () => import_collapsible.metaCollapsibleContent,
|
|
30
|
-
CollapsibleTrigger: () => import_collapsible.metaCollapsibleTrigger,
|
|
31
|
-
Dialog: () => import_dialog.metaDialog,
|
|
32
|
-
DialogClose: () => import_dialog.metaDialogClose,
|
|
33
|
-
DialogContent: () => import_dialog.metaDialogContent,
|
|
34
|
-
DialogDescription: () => import_dialog.metaDialogDescription,
|
|
35
|
-
DialogOverlay: () => import_dialog.metaDialogOverlay,
|
|
36
|
-
DialogTitle: () => import_dialog.metaDialogTitle,
|
|
37
|
-
DialogTrigger: () => import_dialog.metaDialogTrigger,
|
|
38
|
-
Label: () => import_label.meta,
|
|
39
|
-
NavigationMenu: () => import_navigation_menu.metaNavigationMenu,
|
|
40
|
-
NavigationMenuContent: () => import_navigation_menu.metaNavigationMenuContent,
|
|
41
|
-
NavigationMenuItem: () => import_navigation_menu.metaNavigationMenuItem,
|
|
42
|
-
NavigationMenuLink: () => import_navigation_menu.metaNavigationMenuLink,
|
|
43
|
-
NavigationMenuList: () => import_navigation_menu.metaNavigationMenuList,
|
|
44
|
-
NavigationMenuTrigger: () => import_navigation_menu.metaNavigationMenuTrigger,
|
|
45
|
-
NavigationMenuViewport: () => import_navigation_menu.metaNavigationMenuViewport,
|
|
46
|
-
Popover: () => import_popover.metaPopover,
|
|
47
|
-
PopoverContent: () => import_popover.metaPopoverContent,
|
|
48
|
-
PopoverTrigger: () => import_popover.metaPopoverTrigger,
|
|
49
|
-
RadioGroup: () => import_radio_group.metaRadioGroup,
|
|
50
|
-
RadioGroupIndicator: () => import_radio_group.metaRadioGroupIndicator,
|
|
51
|
-
RadioGroupItem: () => import_radio_group.metaRadioGroupItem,
|
|
52
|
-
Select: () => import_select.metaSelect,
|
|
53
|
-
SelectContent: () => import_select.metaSelectContent,
|
|
54
|
-
SelectItem: () => import_select.metaSelectItem,
|
|
55
|
-
SelectItemIndicator: () => import_select.metaSelectItemIndicator,
|
|
56
|
-
SelectItemText: () => import_select.metaSelectItemText,
|
|
57
|
-
SelectTrigger: () => import_select.metaSelectTrigger,
|
|
58
|
-
SelectValue: () => import_select.metaSelectValue,
|
|
59
|
-
SelectViewport: () => import_select.metaSelectViewport,
|
|
60
|
-
Sheet: () => import_sheet.meta,
|
|
61
|
-
Switch: () => import_switch.metaSwitch,
|
|
62
|
-
SwitchThumb: () => import_switch.metaSwitchThumb,
|
|
63
|
-
Tabs: () => import_tabs.metaTabs,
|
|
64
|
-
TabsContent: () => import_tabs.metaTabsContent,
|
|
65
|
-
TabsList: () => import_tabs.metaTabsList,
|
|
66
|
-
TabsTrigger: () => import_tabs.metaTabsTrigger,
|
|
67
|
-
Tooltip: () => import_tooltip.metaTooltip,
|
|
68
|
-
TooltipContent: () => import_tooltip.metaTooltipContent,
|
|
69
|
-
TooltipTrigger: () => import_tooltip.metaTooltipTrigger
|
|
70
|
-
});
|
|
71
|
-
module.exports = __toCommonJS(metas_exports);
|
|
72
|
-
var import_collapsible = require("./collapsible.ws");
|
|
73
|
-
var import_dialog = require("./dialog.ws");
|
|
74
|
-
var import_sheet = require("./sheet.ws");
|
|
75
|
-
var import_popover = require("./popover.ws");
|
|
76
|
-
var import_tooltip = require("./tooltip.ws");
|
|
77
|
-
var import_tabs = require("./tabs.ws");
|
|
78
|
-
var import_label = require("./label.ws");
|
|
79
|
-
var import_accordion = require("./accordion.ws");
|
|
80
|
-
var import_navigation_menu = require("./navigation-menu.ws");
|
|
81
|
-
var import_select = require("./select.ws");
|
|
82
|
-
var import_switch = require("./switch.ws");
|
|
83
|
-
var import_checkbox = require("./checkbox.ws");
|
|
84
|
-
var import_radio_group = require("./radio-group.ws");
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var navigation_menu_exports = {};
|
|
30
|
-
__export(navigation_menu_exports, {
|
|
31
|
-
NavigationMenu: () => NavigationMenu,
|
|
32
|
-
NavigationMenuContent: () => NavigationMenuContent,
|
|
33
|
-
NavigationMenuItem: () => NavigationMenuItem,
|
|
34
|
-
NavigationMenuLink: () => NavigationMenuLink,
|
|
35
|
-
NavigationMenuList: () => NavigationMenuList,
|
|
36
|
-
NavigationMenuTrigger: () => NavigationMenuTrigger,
|
|
37
|
-
NavigationMenuViewport: () => NavigationMenuViewport,
|
|
38
|
-
hooksNavigationMenu: () => hooksNavigationMenu
|
|
39
|
-
});
|
|
40
|
-
module.exports = __toCommonJS(navigation_menu_exports);
|
|
41
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
-
var NavigationMenuPrimitive = __toESM(require("@radix-ui/react-navigation-menu"), 1);
|
|
43
|
-
var import_react_sdk = require("@webstudio-is/react-sdk");
|
|
44
|
-
var import_react = require("react");
|
|
45
|
-
const NavigationMenu = (0, import_react.forwardRef)(({ value: propsValue, ...props }, ref) => {
|
|
46
|
-
const { renderer } = (0, import_react.useContext)(import_react_sdk.ReactSdkContext);
|
|
47
|
-
let value = propsValue;
|
|
48
|
-
if (renderer === "canvas") {
|
|
49
|
-
value = value === "" ? "-1" : value;
|
|
50
|
-
}
|
|
51
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NavigationMenuPrimitive.Root, { ref, value, ...props });
|
|
52
|
-
});
|
|
53
|
-
const NavigationMenuList = NavigationMenuPrimitive.List;
|
|
54
|
-
const NavigationMenuViewport = NavigationMenuPrimitive.Viewport;
|
|
55
|
-
const NavigationMenuContent = NavigationMenuPrimitive.Content;
|
|
56
|
-
const NavigationMenuItem = (0, import_react.forwardRef)(({ value, ...props }, ref) => {
|
|
57
|
-
const index = (0, import_react_sdk.getIndexWithinAncestorFromComponentProps)(props);
|
|
58
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NavigationMenuPrimitive.Item, { ref, value: value ?? index, ...props });
|
|
59
|
-
});
|
|
60
|
-
const NavigationMenuLink = (0, import_react.forwardRef)(({ children, ...props }, ref) => {
|
|
61
|
-
const firstChild = import_react.Children.toArray(children)[0];
|
|
62
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NavigationMenuPrimitive.Link, { asChild: true, ref, ...props, children: firstChild ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { children: "Add link component" }) });
|
|
63
|
-
});
|
|
64
|
-
const NavigationMenuTrigger = (0, import_react.forwardRef)(({ children, ...props }, ref) => {
|
|
65
|
-
const firstChild = import_react.Children.toArray(children)[0];
|
|
66
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NavigationMenuPrimitive.Trigger, { asChild: true, ref, ...props, children: firstChild ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { children: "Add button or link" }) });
|
|
67
|
-
});
|
|
68
|
-
const namespace = "@webstudio-is/sdk-components-react-radix";
|
|
69
|
-
const hooksNavigationMenu = {
|
|
70
|
-
onNavigatorUnselect: (context, event) => {
|
|
71
|
-
for (const instance of event.instancePath) {
|
|
72
|
-
if (instance.component === `${namespace}:NavigationMenuContent`) {
|
|
73
|
-
const menu = (0, import_react_sdk.getClosestInstance)(
|
|
74
|
-
event.instancePath,
|
|
75
|
-
instance,
|
|
76
|
-
`${namespace}:NavigationMenu`
|
|
77
|
-
);
|
|
78
|
-
if (menu) {
|
|
79
|
-
context.setPropVariable(menu.id, "value", "");
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
onNavigatorSelect: (context, event) => {
|
|
85
|
-
for (const instance of event.instancePath) {
|
|
86
|
-
if (instance.component === `${namespace}:NavigationMenuContent`) {
|
|
87
|
-
const menu = (0, import_react_sdk.getClosestInstance)(
|
|
88
|
-
event.instancePath,
|
|
89
|
-
instance,
|
|
90
|
-
`${namespace}:NavigationMenu`
|
|
91
|
-
);
|
|
92
|
-
const menuItem = (0, import_react_sdk.getClosestInstance)(
|
|
93
|
-
event.instancePath,
|
|
94
|
-
instance,
|
|
95
|
-
`${namespace}:NavigationMenuItem`
|
|
96
|
-
);
|
|
97
|
-
if (menuItem === void 0 || menu === void 0) {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
const contentValue = context.getPropValue(menuItem.id, "value") ?? context.indexesWithinAncestors.get(menuItem.id)?.toString();
|
|
101
|
-
if (contentValue) {
|
|
102
|
-
context.setPropVariable(menu.id, "value", contentValue);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
};
|