@smwb/ui-react 2.0.0 → 2.0.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.
- package/README.md +2 -1
- package/dist/components/navigation/menu/menuComponent.js +13 -9
- package/dist/components/navigation/menu/menuComponent.js.map +1 -1
- package/dist/headless/components/navigation/menu/menuComponent.js +13 -9
- package/dist/headless/components/navigation/menu/menuComponent.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,8 @@ runtime light/dark theming and LESS-based customization. Part of the `@smwb` des
|
|
|
17
17
|
|
|
18
18
|
## Component catalog
|
|
19
19
|
|
|
20
|
-
- **Storybook (production):** https://summerweb.ru/ui
|
|
20
|
+
- **Storybook (production):** https://summerweb.ru/ui-react/
|
|
21
|
+
- **Storybook (dev):** https://summerweb.ru/ui-dev-react/
|
|
21
22
|
- **Local:** `npm run storybook` → http://localhost:6006
|
|
22
23
|
|
|
23
24
|
## Installation
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { useMenuContext as
|
|
4
|
-
import { MenuList as
|
|
5
|
-
import { MenuFloating as
|
|
6
|
-
const
|
|
7
|
-
const { variant:
|
|
8
|
-
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import { useMenuContext as i } from "./menuContext.js";
|
|
4
|
+
import { MenuList as a } from "./menuList.js";
|
|
5
|
+
import { MenuFloating as p } from "./menuFloating.js";
|
|
6
|
+
const g = m.forwardRef(function(o, n) {
|
|
7
|
+
const { variant: e } = i();
|
|
8
|
+
if (e === "static") {
|
|
9
|
+
const { anchorElement: u, isOpen: c, onClose: f, placement: l, middleware: M, ...r } = o;
|
|
10
|
+
return /* @__PURE__ */ t(a, { ref: n, ...r });
|
|
11
|
+
}
|
|
12
|
+
return /* @__PURE__ */ t(p, { ref: n, ...o });
|
|
9
13
|
});
|
|
10
14
|
export {
|
|
11
|
-
|
|
15
|
+
g as MenuComponent
|
|
12
16
|
};
|
|
13
17
|
//# sourceMappingURL=menuComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menuComponent.js","sources":["../../../../src/components/navigation/menu/menuComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { useMenuContext } from \"./menuContext\";\nimport { MenuList } from \"./menuList\";\nimport { MenuFloating, MenuFloatingProps } from \"./menuFloating\";\n\nexport const MenuComponent = React.forwardRef<HTMLDivElement, MenuFloatingProps>(function MenuComponent(props, ref) {\n const { variant } = useMenuContext();\n
|
|
1
|
+
{"version":3,"file":"menuComponent.js","sources":["../../../../src/components/navigation/menu/menuComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { useMenuContext } from \"./menuContext\";\nimport { MenuList } from \"./menuList\";\nimport { MenuFloating, MenuFloatingProps } from \"./menuFloating\";\n\nexport const MenuComponent = React.forwardRef<HTMLDivElement, MenuFloatingProps>(function MenuComponent(props, ref) {\n const { variant } = useMenuContext();\n if (variant === \"static\") {\n // Static menus render MenuList directly; strip the floating-only props so\n // they don't leak onto the underlying <div> (e.g. isOpen → DOM attribute).\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { anchorElement, isOpen, onClose, placement, middleware, ...domProps } = props;\n return <MenuList ref={ref} {...domProps} />;\n }\n return <MenuFloating ref={ref} {...props} />;\n});\n"],"names":["MenuComponent","React","props","ref","variant","useMenuContext","anchorElement","isOpen","onClose","placement","middleware","domProps","jsx","MenuList","MenuFloating"],"mappings":";;;;;AAKO,MAAMA,IAAgBC,EAAM,WAA8C,SAAuBC,GAAOC,GAAK;AAClH,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA;AACpB,MAAID,MAAY,UAAU;AAIxB,UAAM,EAAE,eAAAE,GAAe,QAAAC,GAAQ,SAAAC,GAAS,WAAAC,GAAW,YAAAC,GAAY,GAAGC,MAAaT;AAC/E,WAAO,gBAAAU,EAACC,GAAA,EAAS,KAAAV,GAAW,GAAGQ,EAAA,CAAU;AAAA,EAC3C;AACA,SAAO,gBAAAC,EAACE,GAAA,EAAa,KAAAX,GAAW,GAAGD,EAAA,CAAO;AAC5C,CAAC;"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { useMenuContext as
|
|
4
|
-
import { MenuList as
|
|
5
|
-
import { MenuFloating as
|
|
6
|
-
const
|
|
7
|
-
const { variant:
|
|
8
|
-
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import { useMenuContext as i } from "./menuContext.js";
|
|
4
|
+
import { MenuList as a } from "./menuList.js";
|
|
5
|
+
import { MenuFloating as p } from "./menuFloating.js";
|
|
6
|
+
const g = m.forwardRef(function(o, n) {
|
|
7
|
+
const { variant: e } = i();
|
|
8
|
+
if (e === "static") {
|
|
9
|
+
const { anchorElement: u, isOpen: c, onClose: f, placement: l, middleware: M, ...r } = o;
|
|
10
|
+
return /* @__PURE__ */ t(a, { ref: n, ...r });
|
|
11
|
+
}
|
|
12
|
+
return /* @__PURE__ */ t(p, { ref: n, ...o });
|
|
9
13
|
});
|
|
10
14
|
export {
|
|
11
|
-
|
|
15
|
+
g as MenuComponent
|
|
12
16
|
};
|
|
13
17
|
//# sourceMappingURL=menuComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menuComponent.js","sources":["../../../../../src/components/navigation/menu/menuComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { useMenuContext } from \"./menuContext\";\nimport { MenuList } from \"./menuList\";\nimport { MenuFloating, MenuFloatingProps } from \"./menuFloating\";\n\nexport const MenuComponent = React.forwardRef<HTMLDivElement, MenuFloatingProps>(function MenuComponent(props, ref) {\n const { variant } = useMenuContext();\n
|
|
1
|
+
{"version":3,"file":"menuComponent.js","sources":["../../../../../src/components/navigation/menu/menuComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { useMenuContext } from \"./menuContext\";\nimport { MenuList } from \"./menuList\";\nimport { MenuFloating, MenuFloatingProps } from \"./menuFloating\";\n\nexport const MenuComponent = React.forwardRef<HTMLDivElement, MenuFloatingProps>(function MenuComponent(props, ref) {\n const { variant } = useMenuContext();\n if (variant === \"static\") {\n // Static menus render MenuList directly; strip the floating-only props so\n // they don't leak onto the underlying <div> (e.g. isOpen → DOM attribute).\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { anchorElement, isOpen, onClose, placement, middleware, ...domProps } = props;\n return <MenuList ref={ref} {...domProps} />;\n }\n return <MenuFloating ref={ref} {...props} />;\n});\n"],"names":["MenuComponent","React","props","ref","variant","useMenuContext","anchorElement","isOpen","onClose","placement","middleware","domProps","jsx","MenuList","MenuFloating"],"mappings":";;;;;AAKO,MAAMA,IAAgBC,EAAM,WAA8C,SAAuBC,GAAOC,GAAK;AAClH,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA;AACpB,MAAID,MAAY,UAAU;AAIxB,UAAM,EAAE,eAAAE,GAAe,QAAAC,GAAQ,SAAAC,GAAS,WAAAC,GAAW,YAAAC,GAAY,GAAGC,MAAaT;AAC/E,WAAO,gBAAAU,EAACC,GAAA,EAAS,KAAAV,GAAW,GAAGQ,EAAA,CAAU;AAAA,EAC3C;AACA,SAAO,gBAAAC,EAACE,GAAA,EAAa,KAAAX,GAAW,GAAGD,EAAA,CAAO;AAC5C,CAAC;"}
|