@ultraviolet/plus 0.12.6 → 0.12.7

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/index.d.ts CHANGED
@@ -477,6 +477,7 @@ type NavigationProps = {
477
477
  * This function is called when resize occur using the vertical bar on the left of the navigation.
478
478
  */
479
479
  onWidthResize?: (width: number) => void;
480
+ id?: string;
480
481
  };
481
482
  /**
482
483
  * Navigation is a component that allows you to create a sidebar navigation.
@@ -484,7 +485,7 @@ type NavigationProps = {
484
485
  * to make it work in your application.
485
486
  */
486
487
  declare const Navigation: {
487
- ({ children, logo, pinnedFeature, onClickPinUnpin, onClickExpand, initialPinned, initialExpanded, locales, pinLimit, width, onWidthResize, className, }: NavigationProps): _emotion_react_jsx_runtime.JSX.Element;
488
+ ({ children, logo, pinnedFeature, onClickPinUnpin, onClickExpand, initialPinned, initialExpanded, locales, pinLimit, width, onWidthResize, className, id, }: NavigationProps): _emotion_react_jsx_runtime.JSX.Element;
488
489
  Group: ({ children, label }: {
489
490
  children: ReactNode;
490
491
  label: string;
@@ -25,7 +25,8 @@ const Navigation = ({
25
25
  pinLimit = 7,
26
26
  width = NAVIGATION_WIDTH,
27
27
  onWidthResize,
28
- className
28
+ className,
29
+ id
29
30
  }) => jsx(NavigationProvider, {
30
31
  onClickPinUnpin: onClickPinUnpin,
31
32
  pinnedFeature: pinnedFeature,
@@ -39,6 +40,7 @@ const Navigation = ({
39
40
  className: className,
40
41
  width: width,
41
42
  onWidthResize: onWidthResize,
43
+ id: id,
42
44
  children: children
43
45
  })
44
46
  });
@@ -70,7 +70,8 @@ const NavigationContent = ({
70
70
  onClickExpand,
71
71
  width,
72
72
  onWidthResize,
73
- className
73
+ className,
74
+ id
74
75
  }) => {
75
76
  const sliderRef = useRef(null);
76
77
  const navigationRef = useRef(null);
@@ -188,6 +189,7 @@ const NavigationContent = ({
188
189
  }, [expanded, onWidthResize, toggleExpand]);
189
190
  return jsxs(StyledNav, {
190
191
  className: className,
192
+ id: id,
191
193
  children: [jsxs(Container, {
192
194
  ref: navigationRef,
193
195
  "data-animation": animation,
@@ -86,7 +86,7 @@ const StyledContainer = /*#__PURE__*/_styled(Stack, {
86
86
  theme
87
87
  }) => theme.colors.neutral.textWeakHover, ";}", ExpandedPinnedButton, ",", CollapsedPinnedButton, "{opacity:1;}&[data-is-pinnable='true']{", StyledBadge, "{opacity:0;}}}&:hover[data-has-children='false'][data-is-active='false']{", WrapText, "{color:", ({
88
88
  theme
89
- }) => theme.colors.neutral.textWeakHover, ";transition:background-color 0.2s ease-in-out;}}&:active[data-has-no-expand='false']:not([disabled]):not(\n [data-is-active='true']\n ){background-color:", ({
89
+ }) => theme.colors.neutral.textWeakHover, ";}}&:active[data-has-no-expand='false']:not([disabled]):not(\n [data-is-active='true']\n ){background-color:", ({
90
90
  theme
91
91
  }) => theme.colors.neutral.backgroundHover, ";}&[data-is-active='true'],&:hover[data-has-active='true']{background-color:", ({
92
92
  theme
@@ -243,7 +243,7 @@ const Item = ({
243
243
  justifyContent: "center",
244
244
  children: jsx(CategoryIcon, {
245
245
  name: categoryIcon,
246
- variant: categoryIconVariant,
246
+ variant: active ? 'primary' : categoryIconVariant,
247
247
  disabled: disabled
248
248
  })
249
249
  }) : null, jsxs(Stack, {
@@ -347,7 +347,8 @@ const Item = ({
347
347
  alignItems: "center",
348
348
  justifyContent: "center",
349
349
  children: jsx(CategoryIcon, {
350
- name: categoryIcon
350
+ name: categoryIcon,
351
+ variant: active ? 'primary' : categoryIconVariant
351
352
  })
352
353
  }) : null
353
354
  }),
@@ -374,7 +375,7 @@ const Item = ({
374
375
  justifyContent: "center",
375
376
  children: jsx(CategoryIcon, {
376
377
  name: categoryIcon ?? 'console',
377
- variant: categoryIconVariant
378
+ variant: active ? 'primary' : categoryIconVariant
378
379
  })
379
380
  })
380
381
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultraviolet/plus",
3
- "version": "0.12.6",
3
+ "version": "0.12.7",
4
4
  "description": "Ultraviolet Plus",
5
5
  "homepage": "https://github.com/scaleway/ultraviolet#readme",
6
6
  "repository": {