@ultraviolet/ui 3.15.0 → 3.15.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationContent.d.ts","sourceRoot":"","sources":["../../../src/compositions/Navigation/NavigationContent.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAY9C,eAAO,MAAM,iBAAiB,iGAQ3B,eAAe,
|
|
1
|
+
{"version":3,"file":"NavigationContent.d.ts","sourceRoot":"","sources":["../../../src/compositions/Navigation/NavigationContent.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAY9C,eAAO,MAAM,iBAAiB,iGAQ3B,eAAe,4CA+GjB,CAAA"}
|
|
@@ -29,6 +29,7 @@ var init_NavigationContent = __esmMin(() => {
|
|
|
29
29
|
const context = useNavigation();
|
|
30
30
|
if (!context) throw new Error("Navigation should be inside NavigationProvider to use it properly.");
|
|
31
31
|
const { setWidth, width, expanded, toggleExpand, navigationRef, allowNavigationResize, shouldAnimate } = context;
|
|
32
|
+
const clampedWidth = clamp(220, width, 320);
|
|
32
33
|
const sliderRef = useRef(null);
|
|
33
34
|
const contentRef = useRef(null);
|
|
34
35
|
useEffect(() => {
|
|
@@ -57,7 +58,7 @@ var init_NavigationContent = __esmMin(() => {
|
|
|
57
58
|
if (shouldCollapseOnMouseUp || shouldExpandOnMouseUp) {
|
|
58
59
|
toggleExpand();
|
|
59
60
|
onToggleExpand === null || onToggleExpand === void 0 || onToggleExpand(!expanded);
|
|
60
|
-
if (navigationRef.current) setElementVars(navigationRef.current, { [widthNavigationContainerExpanded]: `${
|
|
61
|
+
if (navigationRef.current) setElementVars(navigationRef.current, { [widthNavigationContainerExpanded]: `${clampedWidth}px` });
|
|
61
62
|
}
|
|
62
63
|
if (navigationRef.current) {
|
|
63
64
|
if (!(shouldCollapseOnMouseUp || shouldExpandOnMouseUp)) {
|
|
@@ -86,7 +87,7 @@ var init_NavigationContent = __esmMin(() => {
|
|
|
86
87
|
setWidth,
|
|
87
88
|
toggleExpand,
|
|
88
89
|
shouldAnimate,
|
|
89
|
-
|
|
90
|
+
clampedWidth
|
|
90
91
|
]);
|
|
91
92
|
return /* @__PURE__ */ jsxs("nav", {
|
|
92
93
|
className: cn(className, navigationStyle.navigation),
|
|
@@ -96,8 +97,8 @@ var init_NavigationContent = __esmMin(() => {
|
|
|
96
97
|
className: navigationStyle.container(),
|
|
97
98
|
ref: navigationRef,
|
|
98
99
|
style: assignInlineVars({
|
|
99
|
-
[widthNavigationContainer]: `${expanded ?
|
|
100
|
-
[widthNavigationContainerExpanded]: `${
|
|
100
|
+
[widthNavigationContainer]: `${expanded ? clampedWidth : 64}px`,
|
|
101
|
+
[widthNavigationContainerExpanded]: `${clampedWidth}px`,
|
|
101
102
|
[widthNavigationContainerDuration]: `${shouldAnimate ? 250 : 0}ms`
|
|
102
103
|
}),
|
|
103
104
|
children: [logo ? /* @__PURE__ */ jsx(Header, { logo }) : null, /* @__PURE__ */ jsxs("div", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultraviolet/ui",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.1",
|
|
4
4
|
"description": "Ultraviolet UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"react-intersection-observer": "10.0.3",
|
|
83
83
|
"react-toastify": "11.1.0",
|
|
84
84
|
"@ultraviolet/animations": "1.0.0",
|
|
85
|
-
"@ultraviolet/icons": "5.3.3",
|
|
86
85
|
"@ultraviolet/themes": "3.1.6",
|
|
86
|
+
"@ultraviolet/icons": "5.3.3",
|
|
87
87
|
"@ultraviolet/utils": "1.0.11"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|